pandora-u-boot.git
5 months agorockchip: rk3399: Drop unneeded bob and kevin board specific code
Jonas Karlman [Thu, 12 Dec 2024 23:57:19 +0000 (23:57 +0000)]
rockchip: rk3399: Drop unneeded bob and kevin board specific code

The IO-domain driver will configure io_vsel and always-on/boot-on
regulators will be enabled based on the board device tree now that
required nodes and Kconfig options is enabled for SPL.

Remove the bob and kevin board specific code from the common rk3399.c,
the IO-domain and regulator driver provide similar functionality.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
5 months agorockchip: rk3399-gru: Include pinctrl and regulators in SPL
Jonas Karlman [Thu, 12 Dec 2024 23:57:18 +0000 (23:57 +0000)]
rockchip: rk3399-gru: Include pinctrl and regulators in SPL

Add bootph props and enable related Kconfig options to include vital
regulators in SPL.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 months agorockchip: rk3399-gru: Use SDMA mode to read from eMMC
Jonas Karlman [Thu, 12 Dec 2024 23:57:17 +0000 (23:57 +0000)]
rockchip: rk3399-gru: Use SDMA mode to read from eMMC

Enable use of SDMA mode when reading from eMMC to speed up boot.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 months agorockchip: rk3399-gru: Enable dcache and signature validation in SPL
Jonas Karlman [Thu, 12 Dec 2024 23:57:16 +0000 (23:57 +0000)]
rockchip: rk3399-gru: Enable dcache and signature validation in SPL

With TPL being used to init DRAM, SPL being used to load FIT and the
adjusted FIT payload offset it is now possible to increase the size
limit of SPL to 256 KB and enable uses of dcache and FIT signature
validation.

Drop SPL_SYS_DCACHE_OFF=y to enable use of dcache in SPL.

Drop SPL_FIT_SIGNATURE=n to enable signature validation of FIT in SPL.

Change SPL_MAX_SIZE to 256 KB now that payload offset has moved in SPI
and TF-A may be loaded to 0x40000 in DRAM.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 months agorockchip: rk3399-gru: Remove unused nodes from xPL control FDT
Jonas Karlman [Thu, 12 Dec 2024 23:57:15 +0000 (23:57 +0000)]
rockchip: rk3399-gru: Remove unused nodes from xPL control FDT

The eMMC PHY and SPI flash is not used in all xPL phases.

Change to no longer include emmc_phy and spi_flash in all xPL phases.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 months agorockchip: rk3399: Drop common Kconfig options already implied
Jonas Karlman [Thu, 12 Dec 2024 23:57:14 +0000 (23:57 +0000)]
rockchip: rk3399: Drop common Kconfig options already implied

The last two RK3399 boards, chromebook bob and kevin, have now migraded
to use common bss and stack addresses.

Cleanup and remove Kconfig options no longer needed in rk3399/Kconfig
when all boards now use common bss and stack addresses.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 months agorockchip: rk3399-gru: Include binman generated FIT in u-boot.rom image
Jonas Karlman [Thu, 12 Dec 2024 23:57:13 +0000 (23:57 +0000)]
rockchip: rk3399-gru: Include binman generated FIT in u-boot.rom image

The u-boot.rom image contain u-boot.img FIT instead of the FIT generated
by binman for the u-boot-rockchip.bin image.

Change to include the binman generated FIT for the u-boot.rom image.

This change result in TF-A being included and the use sha256 instead of
crc32 checksum in the u-boot.rom FIT.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 months agorockchip: rk3399-gru: Use TPL with common bss and stack addresses
Jonas Karlman [Thu, 12 Dec 2024 23:57:12 +0000 (23:57 +0000)]
rockchip: rk3399-gru: Use TPL with common bss and stack addresses

Migrate to use TPL, common bss, stack and malloc heap size and addresses
to unify memory use in TPL, SPL and pre-reloc with other RK3399 boards.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
(Disable TPL_BLOBLIST)
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
5 months agorockchip: rk3399-gru: Fix include of TPL in u-boot.rom image
Jonas Karlman [Thu, 12 Dec 2024 23:57:11 +0000 (23:57 +0000)]
rockchip: rk3399-gru: Fix include of TPL in u-boot.rom image

The chromebook specific u-boot.rom image does not include TPL when
building with TPL=y or ROCKCHIP_EXTERNAL_TPL=y.

Fix this by adding rockchip-tpl and u-boot-tpl nodes to the mkimage node
for the u-boot.rom binman image.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 months agorockchip: rk3399-gru: Move SPI flash payload offset for bob and kevin
Jonas Karlman [Thu, 12 Dec 2024 23:57:10 +0000 (23:57 +0000)]
rockchip: rk3399-gru: Move SPI flash payload offset for bob and kevin

The BootROM on RK3399 only read the first 2 KB of each 4 KB page from
SPI flash. With current FIT payload offset of 0x40000 this limits the
supported TPL+SPL size to only 128 KB.

Change to use 0xE0000 as FIT payload offset, similar to other RK3399
boards, to allow a maximum size for TPL of 192 KB and SPL of 256 KB.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 months agorockchip: rk3399-gru: Use SYS_SPI_U_BOOT_OFFS value in offset prop
Jonas Karlman [Thu, 12 Dec 2024 23:57:09 +0000 (23:57 +0000)]
rockchip: rk3399-gru: Use SYS_SPI_U_BOOT_OFFS value in offset prop

Use the offset configured with SYS_SPI_U_BOOT_OFFS Kconfig option
instead of a hardcoded 0x40000 for the FIT payload offset.

This has no intended impact as SYS_SPI_U_BOOT_OFFS=0x40000.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 months agorockchip: rk3399: Fix TPL build of bob and kevin
Jonas Karlman [Thu, 12 Dec 2024 23:57:08 +0000 (23:57 +0000)]
rockchip: rk3399: Fix TPL build of bob and kevin

Building chromebook_bob/kevin with TPL=y ends with a linking error:

  arch/arm/mach-rockchip/rk3399/rk3399.o: in function `board_debug_uart_init':
  arch/arm/mach-rockchip/rk3399/rk3399.c:148:(.text.board_debug_uart_init+0x34):
    undefined reference to `spl_gpio_output'
  arch/arm/mach-rockchip/rk3399/rk3399.c:148:(.text.board_debug_uart_init+0x34):
    relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `spl_gpio_output'

  make[2]: *** [scripts/Makefile.xpl:542: tpl/u-boot-tpl] Error 1
  make[1]: *** [Makefile:2134: tpl/u-boot-tpl] Error 2
  make: *** [Makefile:568: __build_one_by_one] Error 2

Change to only use spl_gpio functions in SPL to fix this.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 months agorockchip: rk3399: expand space for decompressed kernel
FUKAUMI Naoki [Mon, 2 Dec 2024 23:40:18 +0000 (23:40 +0000)]
rockchip: rk3399: expand space for decompressed kernel

fix following error by using same ENV_MEM_LAYOUT_SETTINGS with rk35xx:

U-Boot 2025.01-rc3-00001-g1527c7dcdb01 (Dec 02 2024 - 22:57:18 +0000)
  :
Retrieving file: /boot/extlinux/../nixos/dhqjsnprmzjxncil3m0g9l09a479crn3-linux-6.12.1-Image
Retrieving file: /boot/extlinux/../nixos/6fq8fmmab31yxdwcs7zw44p78fq9fy1s-initrd-linux-6.12.1-initrd
append: init=/nix/store/yjbxgzf1vkwbw6ab738bf4kxazhyypa1-nixos-system-rock-5b-25.05.20241201.ac35b10/init console=ttyS2,1500000n8 console=ttyAMA0,115200n8 console=tty0 loglevel=7
Retrieving file: /boot/extlinux/../nixos/dhqjsnprmzjxncil3m0g9l09a479crn3-linux-6.12.1-dtbs/rockchip/rk3399-rock-4se.dtb
Moving Image from 0x2080000 to 0x2200000, end=0x60d0000
ERROR: RD image overlaps OS image (OS=2200000..60d0000)
Boot failed (err=-14)

$ ls -lh boot/nixos/
total 84M
-r--r--r--  1 root root  24M Jan  1  1970 6fq8fmmab31yxdwcs7zw44p78fq9fy1s-initrd-linux-6.12.1-initrd
-r--r--r--  1 root root  62M Jan  1  1970 dhqjsnprmzjxncil3m0g9l09a479crn3-linux-6.12.1-Image
dr-xr-xr-x 36 root root 4.0K Jan  1  1970 dhqjsnprmzjxncil3m0g9l09a479crn3-linux-6.12.1-dtbs

similar problem was fixed for rk35xx by:

commit 69b73877f02c ("rockchip: rk35xx: expand space for decompressed kernel")

Signed-off-by: FUKAUMI Naoki <naoki@radxa.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 months agoboard: theobroma-systems: Update TF-A setup steps for RK3588 boards
Daniel Semkowicz [Tue, 26 Nov 2024 08:27:15 +0000 (09:27 +0100)]
board: theobroma-systems: Update TF-A setup steps for RK3588 boards

ddrbin_tool interface has been changed. Additional chip_name argument
is now required to modify ddr binary file. Update documentation
to be consistent with the new interface.

Update BL31 and ROCKCHIP_TPL file paths to match current version
of binaries available in the rkbin repository.

Signed-off-by: Daniel Semkowicz <dse@thaumatec.com>
Acked-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
5 months agorockchip: rk3066a/rk3188: use includes from dts/upstream
Johan Jonker [Sun, 8 Dec 2024 17:46:31 +0000 (18:46 +0100)]
rockchip: rk3066a/rk3188: use includes from dts/upstream

The clock and power DT includes for rk3066a and rk3188 are now
available in the dts/upstream directory, so remove the ones that
are now redundant.

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 months agorockchip: use OF_UPSTREAM for rk3066a/rk3188
Johan Jonker [Mon, 16 Dec 2024 12:44:32 +0000 (13:44 +0100)]
rockchip: use OF_UPSTREAM for rk3066a/rk3188

The device tree for rk3066a/rk3188 combined is now
available in the /dts/upstream directory.
Use imply OF_UPSTREAM to migrate all rk3066a/rk3188 boards.

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 months agorockchip: Add support for Radxa ROCK 5C
FUKAUMI Naoki [Sat, 4 Jan 2025 01:57:04 +0000 (01:57 +0000)]
rockchip: Add support for Radxa ROCK 5C

Radxa ROCK 5C[1] is a Rockchip RK3588S2 based single board computer.

[1] https://radxa.com/products/rock5/5c

Signed-off-by: FUKAUMI Naoki <naoki@radxa.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 months agoarm64: dts: rockchip: add Radxa ROCK 5C
FUKAUMI Naoki [Sat, 4 Jan 2025 01:57:03 +0000 (01:57 +0000)]
arm64: dts: rockchip: add Radxa ROCK 5C

Radxa ROCK 5C is a 8K computer for everything[1] using the Rockchip
RK3588S2 chip:

- Rockchip RK3588S2
- Quad A76 and Quad A55 CPU
- 6 TOPS NPU
- up to 32GB LPDDR4x RAM
- eMMC / SPI flash connector
- Micro SD Card slot
- Gigabit ethernet port (supports PoE with add-on PoE HAT)
- WiFi6 / BT5.4
- 1x USB 3.0 Type-A HOST port
- 1x USB 3.0 Type-A OTG port
- 2x USB 2.0 Type-A HOST port
- 1x USB Type-C 5V power port

[1] https://radxa.com/products/rock5/5c

Signed-off-by: FUKAUMI Naoki <naoki@radxa.com>
Link: https://lore.kernel.org/r/20241021090548.1052-2-naoki@radxa.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
[ upstream commit: 3ddf5cdb77e6efd6fe9b70f36dec935e324a3cd2 ]

(cherry picked from commit f80689fcef4b9b07a97b629b4075cc1a4c21a68e)
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 months agoarm64: dts: rockchip: Add HDMI0 node to rk3588
Cristian Ciocaltea [Sat, 4 Jan 2025 01:57:02 +0000 (01:57 +0000)]
arm64: dts: rockchip: Add HDMI0 node to rk3588

Add support for the HDMI0 output port found on RK3588 SoC.

Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Link: https://lore.kernel.org/r/20241019-rk3588-hdmi0-dt-v2-1-466cd80e8ff9@collabora.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
[ upstream commit: d7bb71e69f58c1b3665a9f926bf8d3855111bf8e ]

(cherry picked from commit a839348380c2072e00a26bbdb80744982fe04c56)
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 months agoarm64: dts: rockchip: Split up RK3588's PCIe pinctrls
Sam Edwards [Sat, 4 Jan 2025 01:57:01 +0000 (01:57 +0000)]
arm64: dts: rockchip: Split up RK3588's PCIe pinctrls

These pinctrls manage the low-speed PCIe signals:
- CLKREQ#: An output on the RK3588 (both RC or EP modes), used to
  request that external clock-generation circuitry provide a clock.
- PERST#: An input on the RK3588 in EP mode, used to detect a reset
  signal from the RC. In RC mode, the hardware does not use this signal:
  Linux itself generates it by putting the pin in GPIO mode.
- WAKE#: In EP mode, this is an output; in RC mode, this is an input.

Each of these signals serves a distinct purpose, and more importantly,
PERST# should not be muxed when the RK3588 is in the RC role. Bundling
them together in pinctrl groups prevents proper use: indeed, almost none
of the current board-specific .dts files make any use of them.
(Exception: Rock 5A recently had a patch land that misuses _pins; this
 patch corrects that.)

However, on some RK3588 boards, the PCIe 3 controller will indefinitely
stall the boot if CLKREQ# is not muxed (details in the next patch).
This patch unbundles the signals to allow them to be used.

Signed-off-by: Sam Edwards <CFSworks@gmail.com>
Link: https://lore.kernel.org/r/20240912025034.180233-2-CFSworks@gmail.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
[ upstream commit: 4294e32111781b3de4d73b944cbd1bc1662a9a7a ]

(cherry picked from commit 8713425fa162b61bcf5f7a6dcd171fddfb12be36)
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 months agoboard: rockchip: add FriendlyElec NanoPi R3S
Tianling Shen [Thu, 26 Dec 2024 09:20:43 +0000 (17:20 +0800)]
board: rockchip: add FriendlyElec NanoPi R3S

The NanoPi R3S(as "R3S") is an open source platform with dual-Gbps
Ethernet ports designed and developed by FriendlyElec for IoT
applications.

Specification:
- Rockchip RK3566
- 2GB LPDDR4X RAM
- optional 32GB eMMC module
- SD card slot
- 2x 1000 Base-T
- 3x LEDs (POWER, LAN, WAN)
- 2x Buttons (Reset, MaskROM)
- 1x USB 3.0 Port
- Type-C 5V 2A Power

Signed-off-by: Tianling Shen <cnsztl@gmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
5 months agoarm64: dts: rockchip: reorder mmc aliases for NanoPi R3S
Tianling Shen [Thu, 26 Dec 2024 09:20:42 +0000 (17:20 +0800)]
arm64: dts: rockchip: reorder mmc aliases for NanoPi R3S

Typically any non-removable storage (emmc) is listed before removable
storage (sd-card) options. Also U-Boot will try to override and use
mmc0=sdhci and mmc1=sdmmc0 for all rk356x boards.

Fixes: 50decd493c83 ("arm64: dts: rockchip: Add FriendlyARM NanoPi R3S board")
Suggested-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Tianling Shen <cnsztl@gmail.com>
Link: https://lore.kernel.org/r/20241022193537.1117919-6-cnsztl@gmail.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
[ upstream commit: b7cd1115456d312f8c5e60c80fdc35fd35ea6eab ]

Signed-off-by: Tianling Shen <cnsztl@gmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 months agoarm64: dts: rockchip: enable eMMC HS200 mode for NanoPi R3S
Tianling Shen [Thu, 26 Dec 2024 09:20:41 +0000 (17:20 +0800)]
arm64: dts: rockchip: enable eMMC HS200 mode for NanoPi R3S

It is required to boot from eMMC without additional patch in u-boot.

Fixes: 50decd493c83 ("arm64: dts: rockchip: Add FriendlyARM NanoPi R3S board")
Suggested-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Tianling Shen <cnsztl@gmail.com>
Link: https://lore.kernel.org/r/20241022193537.1117919-5-cnsztl@gmail.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
[ upstream commit: 1b5365034410f1ca21adadadd492b99bdf4f2c55 ]

Signed-off-by: Tianling Shen <cnsztl@gmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 months agoarm64: dts: rockchip: sort props in pmu_io_domains node for NanoPi R3S
Tianling Shen [Thu, 26 Dec 2024 09:20:40 +0000 (17:20 +0800)]
arm64: dts: rockchip: sort props in pmu_io_domains node for NanoPi R3S

The status prop is typically the last prop.

Fixes: 50decd493c83 ("arm64: dts: rockchip: Add FriendlyARM NanoPi R3S board")
Suggested-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Tianling Shen <cnsztl@gmail.com>
Link: https://lore.kernel.org/r/20241022193537.1117919-4-cnsztl@gmail.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
[ upstream commit: 17e150fdd983c7e59b9240e34a166285f3c3fb39 ]

Signed-off-by: Tianling Shen <cnsztl@gmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 months agoarm64: dts: rockchip: replace deprecated snps, reset props for NanoPi R3S
Tianling Shen [Thu, 26 Dec 2024 09:20:39 +0000 (17:20 +0800)]
arm64: dts: rockchip: replace deprecated snps, reset props for NanoPi R3S

Replace deprecated snps,reset props and move them to the PHY node.

Fixes: 50decd493c83 ("arm64: dts: rockchip: Add FriendlyARM NanoPi R3S board")
Suggested-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Tianling Shen <cnsztl@gmail.com>
Link: https://lore.kernel.org/r/20241022193537.1117919-3-cnsztl@gmail.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
[ upstream commit: 82b2868937883b65732da498b26366d34db61510 ]

Signed-off-by: Tianling Shen <cnsztl@gmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 months agoarm64: dts: rockchip: fix model name for FriendlyElec NanoPi R3S
Tianling Shen [Thu, 26 Dec 2024 09:20:38 +0000 (17:20 +0800)]
arm64: dts: rockchip: fix model name for FriendlyElec NanoPi R3S

Use the marketing name for model name, this matches the dt-binding.
Also update the website url in copyright.

Fixes: 50decd493c83 ("arm64: dts: rockchip: Add FriendlyARM NanoPi R3S board")
Suggested-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Tianling Shen <cnsztl@gmail.com>
Link: https://lore.kernel.org/r/20241022193537.1117919-2-cnsztl@gmail.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
[ upstream commit: b5bf84206a5c77528f9dd4cbca4e72caa063c102 ]

Signed-off-by: Tianling Shen <cnsztl@gmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 months agoarm64: dts: rockchip: Add FriendlyARM NanoPi R3S board
Tianling Shen [Thu, 26 Dec 2024 09:20:37 +0000 (17:20 +0800)]
arm64: dts: rockchip: Add FriendlyARM NanoPi R3S board

The NanoPi R3S(as "R3S") is an open source platform with dual-Gbps
Ethernet ports designed and developed by FriendlyElec for IoT
applications.

Specification:
- Rockchip RK3566
- 2GB LPDDR4X RAM
- optional 32GB eMMC module
- SD card slot
- 2x 1000 Base-T
- 3x LEDs (POWER, LAN, WAN)
- 2x Buttons (Reset, MaskROM)
- 1x USB 3.0 Port
- Type-C 5V 2A Power

Signed-off-by: Tianling Shen <cnsztl@gmail.com>
Link: https://lore.kernel.org/r/20241020173946.225960-2-cnsztl@gmail.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
[ upstream commit: 50decd493c8394c52d04561fe4ede34df27a46ba ]

Signed-off-by: Tianling Shen <cnsztl@gmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 months agorockchip: rk3288-firefly: Change to use FIT
Jonas Karlman [Thu, 12 Dec 2024 22:09:44 +0000 (22:09 +0000)]
rockchip: rk3288-firefly: Change to use FIT

Change to use FIT and FIT_SIGNATURE when loading U-Boot proper in SPL to
allow checksum validation and fallback loading of FIT from a different
mmc device.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 months agorockchip: rk3288-firefly: Fix slow Ethernet initializion
Jonas Karlman [Thu, 12 Dec 2024 22:09:43 +0000 (22:09 +0000)]
rockchip: rk3288-firefly: Fix slow Ethernet initializion

For some reason the Ethernet PHY reset delay is set to 1 second, this
cause an unneccecery long boot delay.

Firefly-RK3288 use RTL8211 Ethernet PHY, datasheet list an initial 10ms
delay and then a 30-76ms delay before accessing registers.

Change to use 80ms delay instead of a full second to speed up Ethernet
initializion in U-Boot.

Also enable PHY_REALTEK, DM_ETH_PHY and PHY_GIGE to improve Ethernet PHY
support in U-Boot.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 months agorockchip: rk3288-firefly: Migrate to OF_UPSTREAM
Jonas Karlman [Thu, 12 Dec 2024 22:09:42 +0000 (22:09 +0000)]
rockchip: rk3288-firefly: Migrate to OF_UPSTREAM

The device tree for Firefly-RK3288 in dts/upstream can be used as-is by
U-Boot, migrate board to use OF_UPSTREAM.

Add chosen stdout-path prop to board u-boot.dtsi as it is missing in DT
from dts/upstream. Also change to use the upstream power_led symbol.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 months agorockchip: rk3288-firefly: Drop USE_PREBOOT Kconfig option
Jonas Karlman [Thu, 12 Dec 2024 22:09:41 +0000 (22:09 +0000)]
rockchip: rk3288-firefly: Drop USE_PREBOOT Kconfig option

After the migration to use standard boot, storage media devices should
automatically be initialized in the order listed in boot_targets env.

Drop USE_PREBOOT to speed up boot when booting from SD-card or eMMC.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 months agorockchip: rk3288-firefly: Drop use of silent console and late boardinfo
Jonas Karlman [Thu, 12 Dec 2024 22:09:40 +0000 (22:09 +0000)]
rockchip: rk3288-firefly: Drop use of silent console and late boardinfo

Current use of SILENT_CONSOLE hide valuable information when something
goes wrong during boot, drop this Kconfig option to allow user to see
e.g. from what media U-Boot proper is loaded from.

A second Model line is printed on console due to DISPLAY_BOARDINFO_LATE,
drop this Kconfig option to remove the second redundant line.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 months agorockchip: rk3288-firefly: Include sdmmc regulator in SPL
Jonas Karlman [Thu, 12 Dec 2024 22:09:39 +0000 (22:09 +0000)]
rockchip: rk3288-firefly: Include sdmmc regulator in SPL

Add bootph props and enable related Kconfig options to include the sdmmc
regulator in SPL. Also enable SPL_DM_SEQ_ALIAS to ensure aliases is
handled correctly in SPL.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 months agorockchip: rk3288-firefly: Include required DT nodes in xPL
Jonas Karlman [Thu, 12 Dec 2024 22:09:38 +0000 (22:09 +0000)]
rockchip: rk3288-firefly: Include required DT nodes in xPL

Add bootph- props to emmc, sdmmc, uart and related pinctrl nodes to
ensure devices and pinctrl can be used in xPL and U-Boot pre-reloc.

Remove the explicit bootph-all prop from the pinctrl node, any bootph-
prop will automatically be propagated to the pinctrl node.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 months agorockchip: rk3288-firefly: Use common bss and stack addresses
Jonas Karlman [Thu, 12 Dec 2024 22:09:37 +0000 (22:09 +0000)]
rockchip: rk3288-firefly: Use common bss and stack addresses

Migrate to use common bss, stack and malloc heap size and addresses to
unify memory use in TPL, SPL and pre-reloc.

ENV_OFFSET is using the default value of 0x3f8000 and is also dropped.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 months agorockchip: rk3288-firefly: Set ethaddr env based on cpuid
Jonas Karlman [Thu, 12 Dec 2024 22:09:36 +0000 (22:09 +0000)]
rockchip: rk3288-firefly: Set ethaddr env based on cpuid

Enable Kconfig options to read cpuid from efuse and set cpuid#, serial#
and ethaddr env vars based on the value read from efuse.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 months agorockchip: rk3288-firefly: Sort u-boot.dtsi nodes alphabetically
Jonas Karlman [Thu, 12 Dec 2024 22:09:35 +0000 (22:09 +0000)]
rockchip: rk3288-firefly: Sort u-boot.dtsi nodes alphabetically

Sort the nodes in rk3288-firefly-u-boot.dtsi in alphabetical order.

This has no intended change to board DT, this only rearrange nodes in
preparation for future changes.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 months agorockchip: rk3288-firefly: Drop unused SPL_LED related code
Jonas Karlman [Thu, 12 Dec 2024 22:09:34 +0000 (22:09 +0000)]
rockchip: rk3288-firefly: Drop unused SPL_LED related code

The firefly-rk3288_defconfig build target does not enable the SPL_LED
Kconfig option.

Drop the unused SPL_LED related code and replace it with a default-state
prop to ensure the LED driver enable the LED at U-Boot proper phase.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 months agorockchip: rk3399-rockpro64: Disable bootstage instrumentation config
Paul Kocialkowski [Thu, 26 Sep 2024 18:31:10 +0000 (20:31 +0200)]
rockchip: rk3399-rockpro64: Disable bootstage instrumentation config

The boot timing and reporting (bootstage) infrastructure is useful for
performance analysis and debug but adds overhead and console noise when
using the device normally. Remove it from the device config.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 months agorockchip: rk3399-rockpro64: Hook sysreset gpio to enable full reset
Paul Kocialkowski [Thu, 26 Sep 2024 18:31:09 +0000 (20:31 +0200)]
rockchip: rk3399-rockpro64: Hook sysreset gpio to enable full reset

The reset mechanism used by Linux to reset the SoC is known to only
partially reset the logic. A mechanism is implemented in
rk3399_force_power_on_reset to use a GPIO connected to the PMIC's
over-temperature (OTP) reset pin, which fully resets all logic.

Hook the associated GPIO where the function expects it to enable this
reset mechanism and avoid any possible side-effect of partially-reset
units.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
5 months agorockchip: rk3399-roc-pc: Hook sysreset gpio to enable full reset
Paul Kocialkowski [Thu, 26 Sep 2024 18:31:08 +0000 (20:31 +0200)]
rockchip: rk3399-roc-pc: Hook sysreset gpio to enable full reset

The reset mechanism used by Linux to reset the SoC is known to only
partially reset the logic. A mechanism is implemented in
rk3399_force_power_on_reset to use a GPIO connected to the PMIC's
over-temperature (OTP) reset pin, which fully resets all logic.

Hook the associated GPIO where the function expects it to enable this
reset mechanism and avoid any possible side-effect of partially-reset
units.

Without this patch, reading from the micro sd slot fails after a reset.
With this mechanism, U-Boot is able to boot from it reliably.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
5 months agoboard: rockchip: add Khadas Edge2 RK3588 board
Jacobe Zang [Tue, 19 Nov 2024 07:46:47 +0000 (15:46 +0800)]
board: rockchip: add Khadas Edge2 RK3588 board

Khadas Edge2 is a Rockchip RK3588S based SBC (Single Board Computer)
by Khadas.

There are tree variants depending on the DRAM size : 8G and 16G.

Specification:

    Rockchip RK3588S SoC
    4x ARM Cortex-A76, 4x ARM Cortex-A55
    8/16GB memory LPDDR4x
    Mali G610MP4 GPU
    3x MIPI CSI 4x lanes
    2x MIPI-DSI DPHY 4x lanes
    32/64GB eMMC
    1x USB 2.0, 1x USB 3.0, 2x USB-Type-C
    1x HDMI 2.1 output, 1x DP 1.4 output
    USB PD over USB Type-C

Kernel commit:
04d552993522 ("arm64: dts: rockchip: Add Khadas edge2 board")

Signed-off-by: Jacobe Zang <jacobe.zang@wesion.com>
5 months agorockchip: rk3288-miqi: Change to use FIT
Jonas Karlman [Tue, 5 Nov 2024 21:51:47 +0000 (21:51 +0000)]
rockchip: rk3288-miqi: Change to use FIT

Change to use FIT and FIT_SIGNATURE when loading U-Boot proper in SPL to
allow checksum validation and fallback loading of FIT from a different
mmc device.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 months agorockchip: rk3288-miqi: Fix slow Ethernet initializion
Jonas Karlman [Tue, 5 Nov 2024 21:51:46 +0000 (21:51 +0000)]
rockchip: rk3288-miqi: Fix slow Ethernet initializion

For some reason the Ethernet PHY reset delay is set to 1 second, this
cause an unneccecery long boot delay.

MiQi use RTL8211 Ethernet PHY, datasheet list an initial 10ms delay and
then a 30-76ms delay before accessing registers.

Change to use 80ms delay instead of a full second to speed up Ethernet
initializion in U-Boot.

Also enable PHY_REALTEK, DM_ETH_PHY and PHY_GIGE to improve Ethernet PHY
support in U-Boot.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 months agorockchip: rk3288-miqi: Migrate to OF_UPSTREAM
Jonas Karlman [Tue, 5 Nov 2024 21:51:45 +0000 (21:51 +0000)]
rockchip: rk3288-miqi: Migrate to OF_UPSTREAM

The device tree for mqmaker MiQi in dts/upstream can be used as-is by
U-Boot, migrate board to OF_UPSTREAM.

The change to use DT from dts/upstream will include minor changes and
fixes related to work led and usb otg.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 months agorockchip: rk3288-miqi: Drop USE_PREBOOT Kconfig option
Jonas Karlman [Tue, 5 Nov 2024 21:51:44 +0000 (21:51 +0000)]
rockchip: rk3288-miqi: Drop USE_PREBOOT Kconfig option

After the migration to use standard boot, storage media devices should
automatically be initialized in the order listed in boot_targets env.

Drop USE_PREBOOT to speed up boot when booting from SD-card or eMMC.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 months agorockchip: rk3288-miqi: Drop use of silent console and late boardinfo
Jonas Karlman [Tue, 5 Nov 2024 21:51:43 +0000 (21:51 +0000)]
rockchip: rk3288-miqi: Drop use of silent console and late boardinfo

Current use of SILENT_CONSOLE hide valuable information when something
goes wrong during boot, drop this Kconfig option to allow user to see
e.g. from what media U-Boot proper is loaded from.

A second Model line is printed on console due to DISPLAY_BOARDINFO_LATE,
drop this Kconfig option to remove the second redundant line.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 months agorockchip: rk3288-miqi: Include sdmmc regulator in SPL
Jonas Karlman [Tue, 5 Nov 2024 21:51:42 +0000 (21:51 +0000)]
rockchip: rk3288-miqi: Include sdmmc regulator in SPL

Add bootph props and enable related Kconfig options to include the sdmmc
regulator in SPL. Also enable SPL_DM_SEQ_ALIAS to ensure aliases is
handled correctly in SPL.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 months agorockchip: rk3288-miqi: Include required DT nodes in xPL
Jonas Karlman [Tue, 5 Nov 2024 21:51:41 +0000 (21:51 +0000)]
rockchip: rk3288-miqi: Include required DT nodes in xPL

Add bootph- props to emmc, sdmmc, uart and related pinctrl nodes to
ensure devices and pinctrl can be used in xPL and U-Boot pre-reloc.

Remove the explicit bootph-all prop from the pinctrl node, any bootph-
prop will automatically be propagated to the pinctrl node.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 months agorockchip: rk3288-miqi: Use TPL with common bss and stack addresses
Jonas Karlman [Tue, 5 Nov 2024 21:51:40 +0000 (21:51 +0000)]
rockchip: rk3288-miqi: Use TPL with common bss and stack addresses

Migrate to use TPL, common bss, stack and malloc heap size and addresses
to unify memory use in TPL, SPL and pre-reloc.

ENV_OFFSET is using the default value of 0x3f8000 and is also dropped.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 months agorockchip: rk3288-miqi: Set ethaddr env based on cpuid
Jonas Karlman [Tue, 5 Nov 2024 21:51:39 +0000 (21:51 +0000)]
rockchip: rk3288-miqi: Set ethaddr env based on cpuid

Enable Kconfig options to read cpuid from efuse and set cpuid#, serial#
and ethaddr env vars based on the value read from efuse.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 months agorockchip: rk3288-miqi: Remove unused work led node from xPL
Jonas Karlman [Tue, 5 Nov 2024 21:51:38 +0000 (21:51 +0000)]
rockchip: rk3288-miqi: Remove unused work led node from xPL

The work led is not used in xPL on rk3288-miqi, remove bootph props from
the work led node to exclude it from xPL control FDT.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 months agorockchip: rk3288-miqi: Sort u-boot.dtsi nodes alphabetically
Jonas Karlman [Tue, 5 Nov 2024 21:51:37 +0000 (21:51 +0000)]
rockchip: rk3288-miqi: Sort u-boot.dtsi nodes alphabetically

Sort the nodes in rk3288-miqi-u-boot.dtsi in alphabetical order.

This has no intended change to board DT, this only rearrange nodes in
preparation for future changes.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 months agorockchip: rk3288-tinker: Change to use FIT
Jonas Karlman [Tue, 5 Nov 2024 16:00:36 +0000 (16:00 +0000)]
rockchip: rk3288-tinker: Change to use FIT

Change to use FIT and FIT_SIGNATURE when loading U-Boot proper in SPL to
allow checksum validation and fallback loading of FIT from a different
mmc device.

Checksum validation of FIT adds around 140 ms to boot time:

Before:

       Mark    Elapsed  Stage
          0          0  reset
         13         13  TPL
      6,957      6,944  end tpl
     25,102     18,145  SPL
    131,932    106,830  end phase
    132,137        205  board_init_f
    444,277    312,140  board_init_r
  1,404,987    960,710  eth_common_init
  1,519,110    114,123  eth_initialize
  1,524,734      5,624  main_loop
  1,525,452        718  cli_loop

After:

       Mark    Elapsed  Stage
          0          0  reset
         13         13  TPL
      6,957      6,944  end tpl
     35,744     28,787  SPL
    271,220    235,476  end phase
    271,420        200  board_init_f
    588,474    317,054  board_init_r
  1,548,950    960,476  eth_common_init
  1,663,105    114,155  eth_initialize
  1,668,734      5,629  main_loop
  1,669,417        683  cli_loop

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 months agorockchip: rk3288-tinker: Fix slow Ethernet initializion
Jonas Karlman [Tue, 5 Nov 2024 16:00:35 +0000 (16:00 +0000)]
rockchip: rk3288-tinker: Fix slow Ethernet initializion

For some reason the Ethernet PHY reset delay is set to 1 second, this
cause an unneccecery long boot delay.

Tinker Board use RTL8211E or RTL8211F Ethernet PHY, datasheet list an
initial 10ms delay and then a 30-76ms delay before accessing registers.

Change to use 80ms delay instead of a full second to speed up Ethernet
initializion in U-Boot.

Also enable PHY_REALTEK, DM_ETH_PHY and PHY_GIGE to improve Ethernet PHY
support in U-Boot.

Before:

  1,404,971    960,924  eth_common_init
  2,438,830  1,033,859  eth_initialize
  2,444,449      5,619  main_loop
  2,445,153        704  cli_loop

After:

  1,404,987    960,710  eth_common_init
  1,519,110    114,123  eth_initialize
  1,524,734      5,624  main_loop
  1,525,452        718  cli_loop

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 months agorockchip: rk3288-tinker: Migrate to OF_UPSTREAM
Jonas Karlman [Tue, 5 Nov 2024 16:00:34 +0000 (16:00 +0000)]
rockchip: rk3288-tinker: Migrate to OF_UPSTREAM

The device tree for ASUS Tinker Board and S variant in dts/upstream can
be used as-is by U-Boot, migrate board to OF_UPSTREAM.

The change to use DT from dts/upstream will include minor changes and
fixes related to leds and regulators.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 months agorockchip: rk3288-tinker: Drop USE_PREBOOT Kconfig option
Jonas Karlman [Tue, 5 Nov 2024 16:00:33 +0000 (16:00 +0000)]
rockchip: rk3288-tinker: Drop USE_PREBOOT Kconfig option

After the migration to use standard boot, storage media should
automatically be initialized in the order listed in boot_targets env.

Drop USE_PREBOOT to speed up boot with ~12 seconds when booting from
e.g. SD-card or eMMC.

Before:

  3,048,599      2,056  main_loop
  3,050,717      2,118  usb_start
 15,070,499 12,019,782  cli_loop

After:

  3,058,244      2,054  main_loop
  3,063,260      5,016  cli_loop

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 months agorockchip: rk3288-tinker: Drop use of silent console and late boardinfo
Jonas Karlman [Tue, 5 Nov 2024 16:00:32 +0000 (16:00 +0000)]
rockchip: rk3288-tinker: Drop use of silent console and late boardinfo

Current use of SILENT_CONSOLE hide valuable information when something
goes wrong during boot, drop this Kconfig option to allow user to see
e.g. from what media U-Boot proper is loaded from.

A second Model line is printed on console due to DISPLAY_BOARDINFO_LATE,
drop this Kconfig option to remove the second redundant line.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 months agorockchip: rk3288-tinker: Use common bss and stack addresses
Jonas Karlman [Tue, 5 Nov 2024 16:00:31 +0000 (16:00 +0000)]
rockchip: rk3288-tinker: Use common bss and stack addresses

Migrate to use common bss, stack and malloc heap size and addresses to
unify memory use in TPL, SPL and pre-reloc.

Ensure SYS_MALLOC_F_LEN and TPL variant stay at 0x2000 and is unaffected
on other boards not changed to use common malloc heap size.

ENV_OFFSET is using the default value of 0x3f8000 and is also dropped.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 months agorockchip: rk3288-tinker: Sync defconfig options from rk3288-tinker-s
Jonas Karlman [Tue, 5 Nov 2024 16:00:30 +0000 (16:00 +0000)]
rockchip: rk3288-tinker: Sync defconfig options from rk3288-tinker-s

Add missing Kconfig options used by the rk3288-tinker-s variant.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 months agorockchip: rk3288-tinker: Set cpuid and serial env var
Jonas Karlman [Tue, 5 Nov 2024 16:00:29 +0000 (16:00 +0000)]
rockchip: rk3288-tinker: Set cpuid and serial env var

Enable MISC_INIT_R and ROCKCHIP_EFUSE to read cpuid from efuse and set
the cpuid# and serial# env vars.

Change to read mac address from eeprom in rockchip_early_misc_init_r()
to ensure the ethaddr env var is set before rockchip_setup_macaddr() try
to set ethaddr based on cpuid.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 months agorockchip: rk3288-tinker: Include mmc nodes in pre-reloc for env load
Jonas Karlman [Tue, 5 Nov 2024 16:00:28 +0000 (16:00 +0000)]
rockchip: rk3288-tinker: Include mmc nodes in pre-reloc for env load

Include mmc related nodes in U-Boot proper pre-reloc phase to ensure
environment can be loaded from mmc devices.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 months agorockchip: rk3288-tinker: Drop unused vcc_sd regulator from SPL
Jonas Karlman [Tue, 5 Nov 2024 16:00:27 +0000 (16:00 +0000)]
rockchip: rk3288-tinker: Drop unused vcc_sd regulator from SPL

The sdmmc power come from vcc33_sd pmic regulator and not from the
vcc_sd fixed regulator, as currently defined in the in-tree DT.

Drop vcc_sd and the related gpio7 and sdmmc_pwr nodes from being
included in SPL along with any related Kconfig option. Also enable
SPL_DM_SEQ_ALIAS to ensure aliases is handled correctly in SPL.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 months agorockchip: rk3288-tinker: Only include required DT nodes in TPL
Jonas Karlman [Tue, 5 Nov 2024 16:00:26 +0000 (16:00 +0000)]
rockchip: rk3288-tinker: Only include required DT nodes in TPL

Drop the unneeded bootph-all prop from dmc node, it is already defined
in soc u-boot.dtsi.

Remove booth-all prop from gpio7 node, this node is not needed in TPL.

Adjust bootph props to include pinctrl related nodes for UART2.

Remove the explicit bootph-all prop from the pinctrl node, any bootph-
prop will automatically be propagated to the pinctrl node.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 months agorockchip: rk3288-tinker: Sort u-boot.dtsi nodes alphabetically
Jonas Karlman [Tue, 5 Nov 2024 16:00:25 +0000 (16:00 +0000)]
rockchip: rk3288-tinker: Sort u-boot.dtsi nodes alphabetically

Sort the nodes in rk3288-tinker u-boot.dtsi files in alphabetical order.

This has no intended change to board DTs and only rearrange nodes in
preparation for future changes.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 months agoboard: rockchip: rk3288-tinker: Add myself as reviewer to MAINTAINERS
Jonas Karlman [Tue, 5 Nov 2024 16:00:24 +0000 (16:00 +0000)]
board: rockchip: rk3288-tinker: Add myself as reviewer to MAINTAINERS

Add myself as a reviewer for Tinker Board and S variant so that I can
help with review and testing of defconfig and device tree changes.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 months agorockchip: rk3288: Fix bootph prop for vop nodes
Jonas Karlman [Mon, 4 Nov 2024 20:25:40 +0000 (20:25 +0000)]
rockchip: rk3288: Fix bootph prop for vop nodes

The vop nodes does not need to be included in xPL control FDT, they only
need to be included at U-Boot proper pre-reloc phase.

Change to use bootph-some-ram prop to fix this.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 months agorockchip: rk3288: Use rk3288.dtsi from dts/upstream
Jonas Karlman [Sat, 9 Nov 2024 21:04:12 +0000 (21:04 +0000)]
rockchip: rk3288: Use rk3288.dtsi from dts/upstream

rk3288.dtsi from arch/arm/dts is almost identical to the rk3288.dtsi
from dts/upstream, it differs only with a minor change in hdmi port
nodes, something that does not affect U-Boot.

Remove arch/arm/dts/rk3288.dtsi to use rk3288.dtsi from dts/upstream.
Also drop gpio aliases from -u-boot.dtsi that has been part of
rk3288.dtsi for some time.

No functional change to board DTs is intended with this removal.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 months agorockchip: clk: rk3288: Drop use of SCLK_MAC_PLL
Jonas Karlman [Sat, 9 Nov 2024 21:04:10 +0000 (21:04 +0000)]
rockchip: clk: rk3288: Drop use of SCLK_MAC_PLL

The SCLK_MAC_PLL id is not exported or referenced upstream. It is also
not referenced in vendor U-Boot or vendor kernel 4.4, 4.19, 5.10 or 6.1.

Relax the check for parent id SCLK_MAC_PLL when using internal clock
source for gmac to allow use of clock/rk3288-cru.h from dts/upstream.

All in-tree and upstream rk3288 DTs use an external clock as parent,
so no functional change to boards is expected with this change.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 months agorockchip: rk3288: Use rk3288-power.h from dts/upstream
Jonas Karlman [Sat, 9 Nov 2024 21:04:09 +0000 (21:04 +0000)]
rockchip: rk3288: Use rk3288-power.h from dts/upstream

power/rk3288-power.h in include/dt-bindings is identical to the version
in dts/upstream, remove the copy from include/dt-bindings to only use
the version from dts/upstream.

No functional change to board DTs is intended with this removal.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
5 months agoMerge tag 'tpm-master-07012025' of https://source.denx.de/u-boot/custodians/u-boot-tpm
Tom Rini [Thu, 9 Jan 2025 17:10:18 +0000 (11:10 -0600)]
Merge tag 'tpm-master-07012025' of https://source.denx.de/u-boot/custodians/u-boot-tpm

A few changes for the TPM subsystem wrt to EventLong creation and measurements.

Generally speaking it's insecure for a TPM to not cap all the active PCRs
when performing measurements.
Up to now we had code querying the active PCR banks on the fly and reason
whether it should perform a measurement or not. Since a TPM requires a reset
to change the active PCR banks, it's easier and faster to store them in an
array in the device private data and check against that.

This relates to an interesting feature some bootloaders have. For example
TF-A can't extend a PCR since it has no TPM drivers, but can produce an
EventLog that U-Boot can replay on the hardware once that comes up.
The supported hash algorithms of the TF-A generated Eventlog are generated
at compile time. When trying to replay an EventLog the TPM active PCR banks
and the created EventLog algorithms must agree. We used to report an error
but that changed in commit 97707f12fdab ("tpm: Support boot measurements").

This PR also brings up the old behavior and an error is reported now while
printing a human readable list of the mismatched algorithms.

5 months agotpm: update descriptions in tpm headers
Heinrich Schuchardt [Fri, 27 Dec 2024 12:25:41 +0000 (14:25 +0200)]
tpm: update descriptions in tpm headers

* Provide a link to 'TPM 2.0 Library Specification'
* Remove outdated comment for TPM2_NUM_PCR_BANKS.
  The value 16 can be found in the current standard
  TCG TSS 2.0 Overview and Common Structures Specification 1.0, rev 10
* Describe some of the structures in Sphinx style.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
5 months agoMerge tag 'efi-next-20250105' of https://source.denx.de/u-boot/custodians/u-boot-efi
Tom Rini [Thu, 9 Jan 2025 00:05:51 +0000 (18:05 -0600)]
Merge tag 'efi-next-20250105' of https://source.denx.de/u-boot/custodians/u-boot-efi

Pull request efi-next-20250105

Documentation:

* doc: develop: Fix typos and wording in binman/binman.rst
* doc: develop: Fix typos and wording in gdb.rst
* doc: sandbox: Fix the "sb" command name
* doc/develop/distro.rst: Better document upstream definition of extlinux.conf

UEFI:

* efi_loader: avoid writing message in Exit() boot service
* efi_loader: update EFI specification version
* cmd: efidebug: update output of memory attributes
* efi_loader: Don't warn if the TCG2 FinalEvents table is not installed
* cmd: bootmenu: add parameter -e for UEFI boot options
* efi_loader: Update startimage_exit self-test to check error
* efi: Correct ECPT table GUID

Others:

Building the API demo application for riscv64 is supported.

* API: unify platform_sys_info() implementations
* examples: implement _start and syscall for RISC-V
* examples: use architecture specific memset() on RISC-V
* examples: use QEMU compatible LOAD_ADDR on RISC-V
* test: fix test_extension.py
* configs: sandbox_deconfig: remove CONFIG_AMIGA_PARTITION
* CI: xilinx_versal_virt: disable USB_DWC3
* net: eth_bootdev_hunt() should not run DHCP

5 months agoMerge branch 'next'
Tom Rini [Wed, 8 Jan 2025 20:19:22 +0000 (14:19 -0600)]
Merge branch 'next'

5 months agoMerge patch series "cmd: Add support for optee commands."
Tom Rini [Thu, 2 Jan 2025 17:08:00 +0000 (11:08 -0600)]
Merge patch series "cmd: Add support for optee commands."

Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com> says:

Add the basic 'hello world ta' command which increments the value passed.
This provides easy test for establishing a session with OP-TEE TA and verify.

It includes following subcommands:
optee hello
optee hello <value>; value to increment via OP-TEE HELLO WORLD TA.

Link: https://lore.kernel.org/r/20241219043918.1646095-1-venkatesh.abbarapu@amd.com
5 months agoMerge patch series "Enable MMC UHS modes"
Tom Rini [Thu, 2 Jan 2025 17:07:42 +0000 (11:07 -0600)]
Merge patch series "Enable MMC UHS modes"

Judith Mendez <jm@ti.com> says:

This patch series adds config options for Sitara K3 boards
to support MMC UHS modes.

While testing with SD card boot and eMMC boot,
found missing eMMC boot support for am62ax in am62a7_init,
patch 1/7, and missing config option to support eMMC boot.

While we are here, for am62ax, enable config option to
change MMC bus modes and enable r5 SDHCI ADMA for faster boot
time.

Also for all k3 Sitara boards, cleanup MMC ENV configs that
are no longer needed since we no longer load env from MMC
device.

Link: https://lore.kernel.org/r/20241220203704.2076499-1-jm@ti.com
5 months agotpm: add kconfig control in tcg2_create_digest()
Raymond Mao [Tue, 24 Dec 2024 16:01:13 +0000 (08:01 -0800)]
tpm: add kconfig control in tcg2_create_digest()

To allow disabling algorithms for tcg2, in function
tcg2_create_digest(), each hash algorithm operations should under
the hash kconfig control to avoid building errors when the algorithm
is disabled.

Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
5 months agotpm: Don't replay an EventLog if tcg2_log_parse() fails
Ilias Apalodimas [Tue, 24 Dec 2024 16:01:12 +0000 (08:01 -0800)]
tpm: Don't replay an EventLog if tcg2_log_parse() fails

We used to stop replaying an EventLog if parsing failed, but that got
lost in commit 97707f12fdab ("tpm: Support boot measurements").

When an EventLog is passed yo us from a previous bootloader, we want to
validate it as much as we can and make sure the defined PCR banks of
the log exist in our TPM and firmware so we can replay it if needed or
use it as-in, in case the PCRs are already extended.

So let's add the checks back and while at it simplify the logic of
rejecting an EventLog.

Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
5 months agotpm: Simplify tcg2_log_init()
Ilias Apalodimas [Tue, 24 Dec 2024 16:01:11 +0000 (08:01 -0800)]
tpm: Simplify tcg2_log_init()

A previous patch is storing the active PCR banks on the TPM private
data. Instead of parsing them on the fly use the stored values.
This allows us to simplify our checks during the log creation and
parsing.

Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
5 months agotpm: Simplify tcg2_create_digest()
Ilias Apalodimas [Tue, 24 Dec 2024 16:01:10 +0000 (08:01 -0800)]
tpm: Simplify tcg2_create_digest()

A previous patch is storing the active PCR banks on the TPM private
data. Instead of parsing them on the fly use the stored values.
This allows us to simplify our checks during the log creation and
parsing.

Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
5 months agotpm: Keep the active PCRs in the chip private data
Ilias Apalodimas [Tue, 24 Dec 2024 16:01:09 +0000 (08:01 -0800)]
tpm: Keep the active PCRs in the chip private data

We have a lot of code trying to reason about the active TPM PCRs
when creating an EventLog. Since changing the active banks can't
be done on the fly and requires a TPM reset,  let's store them
in the chip private data instead.

Upcoming patches will use this during the EventLog creation.

Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
5 months agotpm: Don't create an EventLog if algorithms are misconfigured
Ilias Apalodimas [Tue, 24 Dec 2024 16:01:08 +0000 (08:01 -0800)]
tpm: Don't create an EventLog if algorithms are misconfigured

We already check the active banks vs what U-Boot was compiled with when
trying to extend a PCR and we refuse to do so if the TPM active ones
don't match the ones U-Boot supports.

Do the same thing for the EventLog creation since extending will fail
anyway and print a message so the user can figure out the missing
algorithms.

Co-developed-by: Raymond Mao <raymond.mao@linaro.org>
Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
5 months agotpm: add flag in hash_algo_list and API to check if algorithm is supported
Raymond Mao [Tue, 24 Dec 2024 16:01:07 +0000 (08:01 -0800)]
tpm: add flag in hash_algo_list and API to check if algorithm is supported

Add a bool var into hash_algo_list to indicate whether the algorithm
is supported or not and move the IS_ENABLED to only cover this var.
So that we can have the name, hash, mask and size no matter the
digest kconfigs are enabled or not.

In before, tpm2_algorithm_to_len() and tcg2_algorithm_to_mask() are used to
identify an unsupported algorithm when they return 0.
It is not the case now when hash_algo_list always provides algorithm size
and mask, thus a new API is introduced to check if an algorithm is
supported by U-Boot.

Suggested-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
5 months agotpm: refactor tcg2_get_pcr_info()
Raymond Mao [Tue, 24 Dec 2024 16:01:06 +0000 (08:01 -0800)]
tpm: refactor tcg2_get_pcr_info()

Rename the arguments of tcg2_get_pcr_info() to clarify
they are bank masks, not PCR mask.
Remove the unused local variable.

Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
5 months agotpm: Rename tpm2_allow_extend()
Ilias Apalodimas [Tue, 24 Dec 2024 16:01:05 +0000 (08:01 -0800)]
tpm: Rename tpm2_allow_extend()

When that function was introduced we were only using it to check if
extending a PCR was allowed, so the name made sense. A few patches ago
we used that function to reason about the EventLog creation and general
usage of PCRs , so let's rename it to something more generic that makes
more sense in all contexts.

Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
5 months agotpm: Rename tpm2_is_active_pcr()
Ilias Apalodimas [Tue, 24 Dec 2024 16:01:04 +0000 (08:01 -0800)]
tpm: Rename tpm2_is_active_pcr()

This function is checking for active PCR banks, so rename it
to something that's easier to read and closer to what the function
does.

Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
5 months agoPrepare v2025.01 v2025.01
Tom Rini [Tue, 7 Jan 2025 00:54:44 +0000 (18:54 -0600)]
Prepare v2025.01

Signed-off-by: Tom Rini <trini@konsulko.com>
5 months agoefi: Correct ECPT table GUID
Yang Gang [Fri, 3 Jan 2025 08:18:42 +0000 (16:18 +0800)]
efi: Correct ECPT table GUID

Refer to UEFI specification 2.10:
  #define EFI_CONFORMANCE_PROFILES_TABLE_GUID \
  { 0x36122546, 0xf7e7, 0x4c8f, \
  { 0xbd, 0x9b, 0xeb, 0x85, 0x25, 0xb5, 0x0c, 0x0b }}

Signed-off-by: Yang Gang <yanggang@byosoft.com.cn>
Fixes: 6b92c1735205 ("efi: Create ECPT table")
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
5 months agodoc/develop/distro.rst: Better document upstream definition of extlinux.conf
Tom Rini [Sat, 21 Dec 2024 17:45:29 +0000 (11:45 -0600)]
doc/develop/distro.rst: Better document upstream definition of extlinux.conf

First, the "Boot Loader Specification" link has moved to a new location,
so link to that directly. Second, that link does not document as much of
the extlinux.conf format as I recall the old version doing at least.
However, the Syslinux Project wiki is the current location of the documentation
linked to in doc/README.pxe and also has a reference for SYSLINUX. Link
to both of these.

Signed-off-by: Tom Rini <trini@konsulko.com>
5 months agocmd: efidebug: update output of memory attributes
Heinrich Schuchardt [Fri, 13 Dec 2024 09:20:32 +0000 (10:20 +0100)]
cmd: efidebug: update output of memory attributes

* add EFI_MEMORY_CPU_CRYPTO, EFI_MEMORY_HOT_PLUGGABLE
* correct output for EFI_MEMORY_XP
* remove duplicate list entry for EFI_MEMORY_UC

Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
5 months agoefi_loader: update EFI specification version
Heinrich Schuchardt [Fri, 13 Dec 2024 08:58:40 +0000 (09:58 +0100)]
efi_loader: update EFI specification version

UEFI specification 2.11 has been published.
There are no changes relevant for the U-Boot scope.
So let us update the supported specification version.

Change the comment for the constant to Sphinx style.

Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
5 months agoefi_loader: Expose efi_reinstall_protocol_interface in efi_loader.h
Adriano Cordova [Fri, 6 Dec 2024 17:18:34 +0000 (14:18 -0300)]
efi_loader: Expose efi_reinstall_protocol_interface in efi_loader.h

This is done so that the device path protocol interface of the network
device can be changed internally by u-boot when a new bootfile gets
downloaded.

Signed-off-by: Adriano Cordova <adriano.cordova@canonical.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
5 months agodoc: sandbox: Fix the "sb" command name
Olivier L'Heureux [Wed, 4 Dec 2024 22:31:00 +0000 (23:31 +0100)]
doc: sandbox: Fix the "sb" command name

The command name was "sbi" instead of "sb" in "doc/usage/cmd/sb.rst",
the file documenting the "sb" command. It is annoying, because the
index in the left panel on the
<https://docs.u-boot.org/en/latest/usage/cmd/sb.html> page shows no
"sb" command, which makes difficult to navigate to the "sb"
documentation.

Fixed the command name: "sbi" -> "sb".

Fixes: ec6d30649cd5 (doc: sandbox: Add docs for the sb command, 2024-10-28)
Signed-off-by: Olivier L'Heureux <olivier.lheureux@mind.be>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 months agodoc: develop: Fix typos and wording in gdb.rst
Lothar Rubusch [Wed, 4 Dec 2024 18:33:13 +0000 (18:33 +0000)]
doc: develop: Fix typos and wording in gdb.rst

Fix some typos and duplicate words in gdb.rst.

Signed-off-by: Lothar Rubusch <l.rubusch@gmail.com>
Acked-by: Alexander Dahl <ada@thorsis.com>
5 months agodoc: develop: Fix typos and wording in binman/binman.rst
Lothar Rubusch [Wed, 4 Dec 2024 18:33:12 +0000 (18:33 +0000)]
doc: develop: Fix typos and wording in binman/binman.rst

Fix some typos and duplicate words in binman.rst.

Signed-off-by: Lothar Rubusch <l.rubusch@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 months agoefi_loader: Update startimage_exit self-test to check error
Simon Glass [Sun, 1 Dec 2024 15:24:25 +0000 (08:24 -0700)]
efi_loader: Update startimage_exit self-test to check error

Check for an error returned from the decompress() function, just in
case.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
5 months agoefi_loader: fix pe reloc pointer overrun
Aleksandar Gerasimovski [Fri, 29 Nov 2024 21:09:44 +0000 (21:09 +0000)]
efi_loader: fix pe reloc pointer overrun

The fix provided by 997fc12ec91 is actually introducing
a buffer overrun, and the overrun is effective if the
memory after the reloc section is not zeroed.
Probably that's why this bug is not always noticeable.

The problem is that 8-bytes 'rel' pointer can be 4-bytes aligned
according to the PE Format, so the actual relocate function can
take values after the reloc section.

One example is the following dump from the reloc section:

    bce26000: 3000 0000 000c 0000 0000 0000 0000 0000
    bce26010: 7c00 9340 67e0 f900 1c00 0ea1 a400 0f20

This section has two relocations at offset bce26008 and bce2600a,
however the given size (rel_size) for this relocation is 16-bytes
and this is coming form the efi image Misc.VirtualSize, so in this
case the 'reloc' pointer ends at affset bce2600c and is taken as
valid and this is where the overflow is.

In our system we see this problem when we are starting the
Boot Guard efi image.

This patch is fixing the overrun while preserving the fix done
by 997fc12ec91.

Signed-off-by: Aleksandar Gerasimovski <aleksandar.gerasimovski@belden.com>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
5 months agoefi_loader: Don't warn if the TCG2 FinalEvents table is not installed
Ilias Apalodimas [Thu, 28 Nov 2024 07:11:20 +0000 (09:11 +0200)]
efi_loader: Don't warn if the TCG2 FinalEvents table is not installed

When the TCG2 protocol installation fails, we are trying to remove
all the objects we created in tcg2_uninit().

However, there are cases when this function runs before the config
table was installed. So instead of printing an error unconditionally
check against EFI_NOT_FOUND and don't print anything if the table wasn't
installed to begin with.

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
5 months agocmd: bootmenu: add parameter -e for UEFI boot options
Heinrich Schuchardt [Wed, 27 Nov 2024 07:06:30 +0000 (08:06 +0100)]
cmd: bootmenu: add parameter -e for UEFI boot options

The bootmenu command can display

* menu entries defined by environment variables
* menu entries defined by UEFI boot options

Not in all cases showing the UEFI boot options is desired.
Provide a new parameter '-e' to select the display of UEFI boot options.

Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
5 months agonet: eth_bootdev_hunt() should not run DHCP
Heinrich Schuchardt [Wed, 27 Nov 2024 07:06:29 +0000 (08:06 +0100)]
net: eth_bootdev_hunt() should not run DHCP

Currently when booting dhcp_run() may be executed multiple times:
once in eth_bootdev_hunt() and once in the network booting bootmeth.

We need to call eth_bootdev_hunt() when setting up the EFI sub-system to
supply the simple network protocol. We don't need an IP address set up.

We can reduce the bootime by not executing dhcp_run() in
eth_bootdev_hunt().

Furthermore eth_bootdev_hunt() with autostart=yes leads on the legacy
network stack leads to downloading a file via TFTP and to booting the
downloaded file.

Instead of running dchp_run() just check that there is a network device
in eth_bootdev_hunt().

Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Simon Glass <sjg@chromium.org>