84361 Commits

Author SHA1 Message Date
Samuel Holland
2c940eed61 Merge branch 'bl808/usb' into bl808/all 2023-02-05 14:37:47 -06:00
Samuel Holland
a9026dd92a Merge branch 'bl808/sysreset' into bl808/all 2023-02-05 14:37:47 -06:00
Samuel Holland
e9c6af350c Merge branch 'bl808/serial' into bl808/all 2023-02-05 14:37:47 -06:00
Samuel Holland
52f7b2906a Merge branch 'bl808/rproc' into bl808/all 2023-02-05 14:37:47 -06:00
Samuel Holland
e19f9e5235 Merge branch 'bl808/ram' into bl808/all 2023-02-05 14:37:47 -06:00
Samuel Holland
24f212f4e6 Merge branch 'bl808/pinctrl' into bl808/all 2023-02-05 14:37:46 -06:00
Samuel Holland
1eb3f7e048 Merge branch 'bl808/mmc' into bl808/all 2023-02-05 14:37:46 -06:00
Samuel Holland
a8893235ae Merge branch 'bl808/emac' into bl808/all 2023-02-05 14:37:46 -06:00
Samuel Holland
b4a4c08f94 Merge branch 'bl808/clk-dump' into bl808/all 2023-02-05 14:37:46 -06:00
Samuel Holland
e6e447a3ba Merge branch 'bl808/clk-reset' into bl808/all 2023-02-05 14:37:46 -06:00
Samuel Holland
d3b559dddf Merge branch 'bl808/board' into bl808/all 2023-02-05 14:37:46 -06:00
Samuel Holland
af1a14b3f4 Merge branch 'bl808/headers' into bl808/all 2023-02-05 14:37:46 -06:00
Samuel Holland
eebd223b5c Merge branch 'bl808/cpu' into bl808/all 2023-02-05 14:37:46 -06:00
Samuel Holland
05115a6844 clk: bflb: Implement the .dump operation
Print the parent name, rate, and bit field values for each clock.

Signed-off-by: Samuel Holland <samuel@sholland.org>
2023-02-05 14:37:37 -06:00
Samuel Holland
ecca454c9e clk: Implement soc_clk_dump() using the .dump operation
This provides a common implementation of soc_clk_dump() for platforms
that use DM clock drivers but not the CCF.

Signed-off-by: Samuel Holland <samuel@sholland.org>
2023-02-05 14:37:37 -06:00
Samuel Holland
340b94d3d7 clk: Add a .dump operation
Instead of having each clock driver implement soc_clk_dump() separately,
implement it at the uclass level, so the output can include all devices.
Add the .dump operation to support this.

Signed-off-by: Samuel Holland <samuel@sholland.org>
2023-02-05 14:37:37 -06:00
Samuel Holland
f579a60dc0 phy: Add BL808 USB PHY driver
Signed-off-by: Samuel Holland <samuel@sholland.org>
2023-02-05 14:37:36 -06:00
Samuel Holland
1e26ec977f sysreset: Add BL808 sysreset driver
Signed-off-by: Samuel Holland <samuel@sholland.org>
2023-02-05 14:37:36 -06:00
Samuel Holland
65f8f547d8 serial: Add a Bouffalo Lab UART driver
This driver supports the UARTs found in BL808 and related SoCs.

Signed-off-by: Samuel Holland <samuel@sholland.org>
2023-02-05 14:37:36 -06:00
Samuel Holland
86ac9d21a3 remoteproc: Add BL808 remoteproc driver
Signed-off-by: Samuel Holland <samuel@sholland.org>
2023-02-05 14:37:36 -06:00
Samuel Holland
cc6790a7e9 remoteproc: Remove legacy probing method
This removes code that abused the device's platform data, interpreting
it as the uclass platform data.

Signed-off-by: Samuel Holland <samuel@sholland.org>
2023-02-05 14:37:36 -06:00
Michael Walle
3e7287720b ram: Add Bouffalo Lab PSRAM driver
All the intitalization routines and values are taken from the
Bouffalolab MCU SDK @a574195a4b33:
https://github.com/bouffalolab/bl_mcu_sdk/

Signed-off-by: Michael Walle <michael@walle.cc>
2023-02-05 14:37:35 -06:00
Samuel Holland
64ca2ff591 pinctrl: Add Bouffalo Lab pinctrl driver
This driver supports the pinmux, pinconf, and GPIO functions of the
Bouffalo Lab BL616 and BL808 SoCs.

Signed-off-by: Samuel Holland <samuel@sholland.org>
2023-02-05 14:37:35 -06:00
Samuel Holland
cda0d26518 mmc: Add Bouffalo Lab SDHCI driver
Signed-off-by: Samuel Holland <samuel@sholland.org>
2023-02-05 14:37:35 -06:00
Samuel Holland
42e6b3ef7b remoteproc: Remove unused mem_type platform data
There is only one possible value for this field, it is unused except for
debugging, and the devicetree property is not documented.

Signed-off-by: Samuel Holland <samuel@sholland.org>
2023-02-05 14:37:35 -06:00
Samuel Holland
3463ddf5a9 remoteproc: Move rproc_cfg_arr out of the uclass header
This array is private to the IPU driver, so it should be declared there.

Signed-off-by: Samuel Holland <samuel@sholland.org>
2023-02-05 14:37:35 -06:00
Samuel Holland
e110ca11b3 clk: bflb: Add BL808 clock/reset descriptions
BL808 contains clocks and resets controlled by registers in several MMIO
regions, mostly because each MMIO region is in a separate power domain.
Add the descriptions for the known clocks and resets.

Signed-off-by: Samuel Holland <samuel@sholland.org>
2023-02-05 14:37:34 -06:00
Samuel Holland
3ee1aaa682 clk: Add Bouffalo Lab reset controller driver
This driver extends the clock driver with reset control capability.

Signed-off-by: Samuel Holland <samuel@sholland.org>
2023-02-05 14:37:34 -06:00
Samuel Holland
970e1a1f7f clk: Add Bouffalo Lab clock driver
This driver supports most of the clocks in Bouffalo Lab SoCs, including
their parent selection, divider, and enable bits. It supports a
hierarchy of clocks provided by multiple devices/drivers.

Signed-off-by: Samuel Holland <samuel@sholland.org>
2023-02-05 14:37:34 -06:00
Samuel Holland
a3041de622 clk: Add a .get_parent operation
This allows clk_get_parent() to work with non-CCF clock drivers.

Signed-off-by: Samuel Holland <samuel@sholland.org>
2023-02-05 14:37:34 -06:00
Samuel Holland
91ad6fd6b8 clk: Remove an unneeded check from clk_get_parent_rate()
There is no need to check the parent clock's ops. The following call to
clk_get_rate() does that already.

Signed-off-by: Samuel Holland <samuel@sholland.org>
2023-02-05 14:37:34 -06:00
Samuel Holland
319f3749f6 clk: Fix rate caching in clk_get_parent_rate()
clk_get_rate() can return an error value. Recompute the rate if the
cached value is an error value.

Fixes: 4aa78300a025 ("dm: clk: Define clk_get_parent_rate() for clk operations")
Signed-off-by: Samuel Holland <samuel@sholland.org>
2023-02-05 14:37:34 -06:00
Samuel Holland
430dfca65b clk: Fix error handling in clk_get_parent()
Do not return both NULL and error pointers. The function is only
documented as returning error pointers.

Fixes: 8a1661f20e6c ("drivers: clk: Handle gracefully NULL pointers")
Signed-off-by: Samuel Holland <samuel@sholland.org>
2023-02-05 14:37:34 -06:00
Samuel Holland
e12726eac8 clk: Fix error handling in clk_get_rate()
log_ret() cannot work with unsigned values, and the assignment to 'ret'
incorrectly truncated the rate on 64-bit platforms.

Fixes: 5c5992cb90cf ("clk: Add debugging for return values")
Signed-off-by: Samuel Holland <samuel@sholland.org>
2023-02-05 14:37:34 -06:00
Samuel Holland
785b402d2b bl808: Add Ox64 defconfigs
Signed-off-by: Samuel Holland <samuel@sholland.org>
2023-02-05 14:37:22 -06:00
Samuel Holland
4e1d28ed5b bl808: Add SoC and Ox64 devicetrees
Signed-off-by: Samuel Holland <samuel@sholland.org>
2023-02-05 14:16:30 -06:00
Samuel Holland
90c4031d97 bl808: Add Bouffalo Lab BL808 board support
All boards with this SoC share a generic board configuration.

This SoC contains two RISC-V processors that can run U-Boot: M0, a
32-bit T-HEAD E907, and D0, a 64-bit T-HEAD C906.

Signed-off-by: Samuel Holland <samuel@sholland.org>
2023-02-05 14:16:30 -06:00
Samuel Holland
1c4944d70d net: ethoc: Invalidate after RX instead of flush
Signed-off-by: Samuel Holland <samuel@sholland.org>
2023-02-05 14:16:10 -06:00
Samuel Holland
0636e3e95b riscv: cpu: thead: Add CPU-specific cache operations
Use the vendor CSRs for enabling/disabling the caches, and the ISA
extension for cache maintenance.

Signed-off-by: Samuel Holland <samuel@sholland.org>
2023-02-05 14:15:31 -06:00
Samuel Holland
88065c42f7 riscv: cpu: thead: Initialize extension CSRs
Enable the T-HEAD ISA extensions, as these are required to use the cache
maintenance instructions. Enable the branch predictor and BTB to improve
performance. Some bits are only available on specific CPU models, so
provide Kconfig symbols for selecting the right model.

Signed-off-by: Samuel Holland <samuel@sholland.org>
2023-02-05 12:05:24 -06:00
Samuel Holland
8ac224a247 riscv: cpu: thead: Add extension CSR definitions
T-HEAD C9xx and E9xx CPUs contain some extra CSRs which control the
branch predictor and cache-related functionality.

Signed-off-by: Samuel Holland <samuel@sholland.org>
2023-02-05 12:05:24 -06:00
Samuel Holland
722832d48b riscv: cpu: Add skeleton for T-HEAD CPUs
This is a direct copy of the existing generic CPU code.

Signed-off-by: Samuel Holland <samuel@sholland.org>
2023-02-05 12:05:24 -06:00
Samuel Holland
fe4d294777 net: ethoc: Add BL808 EMAC support
Signed-off-by: Samuel Holland <samuel@sholland.org>
2023-02-05 10:36:53 -06:00
Samuel Holland
bbcc76ee51 riscv: Weakly define invalidate_icache_range()
Some RISC-V CPUs have a vendor-specific way to invalidate a portion of
the instruction cache. Allow them to override invalidate_icache_range().

Signed-off-by: Samuel Holland <samuel@sholland.org>
2023-02-05 09:58:59 -06:00
Samuel Holland
8ab2c5eb41 riscv: Support CONFIG_REMAKE_ELF
Add flags to tell objcopy what kind of ELF to create.

Signed-off-by: Samuel Holland <samuel@sholland.org>
2023-02-04 13:09:14 -06:00
Samuel Holland
37b26beb1c bl808: Add BL808 register definitions
These are copied from the vendor's MCU SDK. They are not really
upstreamable, but they help with porting other code from the MCU SDK,
and they avoid wasting time due to typos in hand-copied register
definitions.

Signed-off-by: Samuel Holland <samuel@sholland.org>
2023-02-04 09:44:30 -06:00
Tom Rini
a209c3e6b4 For 2023.04
-----------
 
 CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/15028
 
 - Boards:
 	- UDoo
 	- MX53 Menlo
 -----BEGIN PGP SIGNATURE-----
 
 iG0EABECAC0WIQS2TmnA27QKhpKSZe309WXkmmjvpgUCY90hNQ8cc2JhYmljQGRl
 bnguZGUACgkQ9PVl5Jpo76bHAwCfSmjacuzcLNO7S+w6MUgF3thHFHoAoJMk18KY
 jVKuwOJjLIv60IacIb6p
 =fFpi
 -----END PGP SIGNATURE-----

Merge tag 'u-boot-imx-20230203' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx

For 2023.04
-----------

CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/15028

- Boards:
	- UDoo
	- MX53 Menlo
2023-02-03 10:30:45 -05:00
Tom Rini
b102bfa15e Merge branch '2023-02-02-assorted-networking-updates'
- DSA driver for the MV88E6xxx, assorted IPv6 fixes, TFTP fix, fsl-mc
  cleanup coding style and fsl_ls_mdio bugfix
2023-02-03 10:27:27 -05:00
Peter Robinson
01f372d8d6 udoo_neo: Select DM_SERIAL and drop iomux board level init
Convert to DM_SERIAL and drop the iomux board file
level init as it's handled as part of the DM serial
layer instead.

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
Reviewed-by: Fabio Estevam <festevam@denx.de>
2023-02-03 13:10:01 +01:00
Peter Robinson
99a94c368c udoo_neo: Move to DM for REGULATOR/PMIC/I2C drivers
This moves over the PMIC power init to DM and the associated i2c and
regulator bits.

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
Reviewed-by: Fabio Estevam <festevam@denx.de>
2023-02-03 13:10:01 +01:00