pandora-u-boot.git
13 days agoMerge branch 'staging' of https://source.denx.de/u-boot/custodians/u-boot-tegra
Tom Rini [Wed, 3 Sep 2025 21:21:14 +0000 (15:21 -0600)]
Merge branch 'staging' of https://source.denx.de/u-boot/custodians/u-boot-tegra

Branch contains minor improvents for ASUS SL101 and Jetson Nano along
with support for Microsoft Surface 2 tablet.

13 days agoMerge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sh
Tom Rini [Wed, 3 Sep 2025 21:19:15 +0000 (15:19 -0600)]
Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sh

- Fix an issue reported by smatch in rzg2l pinctrl driver

2 weeks agopinctrl: rzg2l: Variable may not have been assigned to
Andrew Goodbody [Thu, 7 Aug 2025 14:41:18 +0000 (15:41 +0100)]
pinctrl: rzg2l: Variable may not have been assigned to

In rzg2l_pinconf_set and rzg2l_get_pin_muxing if the call to
rzg2l_selector_decode fails then the variable pin may not have been
assigned to. Remove the use of pin from the error message. Also update
the error message to show the invalid selector used instead of port
which will be the error code returned.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Reviewed-by: Paul Barker <paul@pbarker.dev>
Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2 weeks agoMerge tag 'u-boot-rockchip-20250831' of https://source.denx.de/u-boot/custodians...
Tom Rini [Mon, 1 Sep 2025 15:50:01 +0000 (09:50 -0600)]
Merge tag 'u-boot-rockchip-20250831' of https://source.denx.de/u-boot/custodians/u-boot-rockchip

CI: https://source.denx.de/u-boot/custodians/u-boot-rockchip/-/pipelines/27522

- New Board support:
  rk3588 Xunlong Orange Pi 5 Ultra;
  rk3588s GameForce Ace;
  rk3576 ArmSoM Sige5;

- rk3328 soc fixes;
- usb controller and phy fixes;
- new rk3328 ddr timing;
- other board level updates;

2 weeks agoMerge tag 'efi-2025-10-rc4' of https://source.denx.de/u-boot/custodians/u-boot-efi
Tom Rini [Mon, 1 Sep 2025 13:50:36 +0000 (07:50 -0600)]
Merge tag 'efi-2025-10-rc4' of https://source.denx.de/u-boot/custodians/u-boot-efi

Pull request efi-2025-10-rc4.

CI:

* https://source.denx.de/u-boot/custodians/u-boot-efi/-/pipelines/27527

Documentation:

* Rephrasing and text corrections for buildman

UEFI:

* Serial: Use correct EFI status type
* Let EFI_HTTP_BOOT select CMD_DHCP
* Let EFI_VARIABLES_PRESEED depend on !COMPILE_TEST

2 weeks agoboard: transformer-t20: add separate env for SL101
Svyatoslav Ryhel [Mon, 1 Sep 2025 05:43:40 +0000 (08:43 +0300)]
board: transformer-t20: add separate env for SL101

SL101 unlike TF101/G has no Lid sensor, so lets add a separate env for
SL101 without Lid sensor used.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
2 weeks agoARM: tegra20: transformer: fix Hall sensor behavior
Svyatoslav Ryhel [Mon, 1 Sep 2025 05:50:13 +0000 (08:50 +0300)]
ARM: tegra20: transformer: fix Hall sensor behavior

Hall sensor found in SL101 is not used for closed dock detection as on
TF101 or TF101G, it is used to detect if keyboard slider is out. To address
this, lets move Lid sensor switch into TF101/G trees and add Tablet mode
switch into SL101 tree.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
2 weeks agoarm: Fix swtiching typo
Simon Glass [Mon, 18 Aug 2025 06:47:15 +0000 (08:47 +0200)]
arm: Fix swtiching typo

This should say 'switching', so fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2 weeks agodoc: Capitalize the word Buildman whenever it's used as a proper noun
Adriano Carvalho [Mon, 25 Aug 2025 22:32:36 +0000 (23:32 +0100)]
doc: Capitalize the word Buildman whenever it's used as a proper noun

This consistency reads a bit nicer.

Signed-off-by: Adriano Carvalho <adrianocarvalho.pt@gmail.com>
2 weeks agodoc: Rephrase to be more precise and less confusing (build)
Adriano Carvalho [Mon, 25 Aug 2025 22:32:35 +0000 (23:32 +0100)]
doc: Rephrase to be more precise and less confusing (build)

It was "... doing the same build ... will not trigger a rebuild".

Signed-off-by: Adriano Carvalho <adrianocarvalho.pt@gmail.com>
2 weeks agodoc: Rephrase to read a bit nicer
Adriano Carvalho [Mon, 25 Aug 2025 22:32:34 +0000 (23:32 +0100)]
doc: Rephrase to read a bit nicer

Reads better.

Signed-off-by: Adriano Carvalho <adrianocarvalho.pt@gmail.com>
2 weeks agodoc: Rephrase to be more clear
Adriano Carvalho [Mon, 25 Aug 2025 22:32:33 +0000 (23:32 +0100)]
doc: Rephrase to be more clear

It might not be clear what is meant with "to make sure the shell leaves it alone".

Signed-off-by: Adriano Carvalho <adrianocarvalho.pt@gmail.com>
2 weeks agodoc: Rephrase in a simpler way
Adriano Carvalho [Mon, 25 Aug 2025 22:32:32 +0000 (23:32 +0100)]
doc: Rephrase in a simpler way

It reads a bit nicer.

Signed-off-by: Adriano Carvalho <adrianocarvalho.pt@gmail.com>
2 weeks agodoc: Add riscv and unfold the list with the architecture/code name
Adriano Carvalho [Mon, 25 Aug 2025 22:32:31 +0000 (23:32 +0100)]
doc: Add riscv and unfold the list with the architecture/code name

riscv was missing from the list.
To some, the architecture's name may not be obvious from the code name.

Signed-off-by: Adriano Carvalho <adrianocarvalho.pt@gmail.com>
2 weeks agodoc: Use "supports" instead of "has"
Adriano Carvalho [Mon, 25 Aug 2025 22:32:30 +0000 (23:32 +0100)]
doc: Use "supports" instead of "has"

Strictly speaking, "has" doesn't make sense.
"supports" seems like a better word and it probably was what the original author meant.

Signed-off-by: Adriano Carvalho <adrianocarvalho.pt@gmail.com>
2 weeks agodoc: Quote all long form options using double backticks/grave accents
Adriano Carvalho [Mon, 25 Aug 2025 22:32:29 +0000 (23:32 +0100)]
doc: Quote all long form options using double backticks/grave accents

Otherwise, the two dashes are rendered as just one.

Signed-off-by: Adriano Carvalho <adrianocarvalho.pt@gmail.com>
2 weeks agodoc: Fix obvious typos and minor improvements
Adriano Carvalho [Mon, 25 Aug 2025 22:32:28 +0000 (23:32 +0100)]
doc: Fix obvious typos and minor improvements

These are fixes to what looks like obvious typos.
Some minor improvments are also included, such as:
- Write "symbolic link" instead of symlink
- Correct capitalization for LLVM (all caps)
- Remove dead link and surrounding sentence

Signed-off-by: Adriano Carvalho <adrianocarvalho.pt@gmail.com>
2 weeks agoefi: Select also CMD_DHCP from EFI_HTTP_BOOT
Jan Kiszka [Tue, 19 Aug 2025 14:33:52 +0000 (16:33 +0200)]
efi: Select also CMD_DHCP from EFI_HTTP_BOOT

This is needed because distro_efi_read_bootflow_net will then need
dhcp_run which is not already enabled by CMD_NET.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2 weeks agoefi_loader: Make EFI_VARIABLES_PRESEED depend on !COMPILE_TEST
Tom Rini [Tue, 12 Aug 2025 18:01:32 +0000 (12:01 -0600)]
efi_loader: Make EFI_VARIABLES_PRESEED depend on !COMPILE_TEST

When doing compile testing build we cannot rely on having a valid file
for EFI_VAR_SEED_FILE to exist, so disable this option when doing
compile tests.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Acked-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2 weeks agoefi: serial: Use correct EFI status type
Andrew Goodbody [Mon, 11 Aug 2025 12:05:15 +0000 (13:05 +0100)]
efi: serial: Use correct EFI status type

int is not sufficient to hold and test the return from an EFI function
call. Use efi_status_t instead so that the test can work as expected.

This issue was found by Smatch.

Fixes: 275854baeeec ("efi: Add a serial driver")
Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2 weeks agorockchip: rk3588-generic: Move usb nodes to board dts
Jonas Karlman [Mon, 21 Jul 2025 22:07:19 +0000 (22:07 +0000)]
rockchip: rk3588-generic: Move usb nodes to board dts

After the commit 7a53abb18325 ("rockchip: rk3588: Remove USB3 DRD nodes
in u-boot.dtsi") was merged for v2024.10 there is no reason to keep the
usb nodes for the Generic RK3588 board in the board u-boot.dtsi.

Move usb related nodes from board u-boot.dtsi to main board device tree.

While at it, also drop use of the usb3-phy as we only want to enable the
usb2-phy to be compatible with as many boards as possible.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2 weeks agorockchip: rk3576: Disable USB3OTG0 U3 port early
Jonas Karlman [Mon, 21 Jul 2025 22:07:18 +0000 (22:07 +0000)]
rockchip: rk3576: Disable USB3OTG0 U3 port early

The RK3576 SoC comes with USB OTG support using a DWC3 controller with
a USB2 PHY and a USB3 PHY (USBDP PHY).

Some board designs may not use the USBDP PHY for USB3 purpose. For these
board to use USB OTG the input clock source must change to use UTMI clk
instead of PIPE clk.

Change to always disable the USB3OTG0 U3 port early and leave it to the
USBDP PHY driver to re-enable the U3 port when a usb3-phy is described
in the board device tree.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2 weeks agorockchip: rk3588: Disable USB3OTG U3 ports early
Jonas Karlman [Mon, 21 Jul 2025 22:07:17 +0000 (22:07 +0000)]
rockchip: rk3588: Disable USB3OTG U3 ports early

The RK3588 SoC comes with USB OTG support using a DWC3 controller with
a USB2 PHY and a USB3 PHY (USBDP PHY).

Some board designs may not use the USBDP PHY for USB3 purpose. For these
board to use USB OTG the input clock source must change to use UTMI clk
instead of PIPE clk.

Change to always disable the USB3OTG U3 ports early and leave it to the
USBDP PHY driver to re-enable the U3 port when a usb3-phy is described
in the board device tree.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2 weeks agophy: rockchip: typec: Fix improper use of UCLASS_PHY
Jonas Karlman [Mon, 21 Jul 2025 22:07:16 +0000 (22:07 +0000)]
phy: rockchip: typec: Fix improper use of UCLASS_PHY

The Rockchip TypeC glue driver improperly present itself as a UCLASS_PHY
driver, without ever implementing the required phy_ops.

This is something that in special circumstances can lead to a NULL
pointer dereference followed by a SError crash.

Change the glue driver to use UCLASS_NOP to fix this.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2 weeks agophy: rockchip: inno-usb2: Fix improper use of UCLASS_PHY
Jonas Karlman [Mon, 21 Jul 2025 22:07:15 +0000 (22:07 +0000)]
phy: rockchip: inno-usb2: Fix improper use of UCLASS_PHY

The Rockchip USB2PHY glue driver improperly present itself as a
UCLASS_PHY driver, without ever implementing the required phy_ops.

This is something that in special circumstances can lead to a NULL
pointer dereference followed by a SError crash.

Change the glue driver to use UCLASS_NOP to fix this.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2 weeks agophy: rockchip: naneng-combphy: Use syscon_regmap_lookup_by_phandle
Jonas Karlman [Mon, 21 Jul 2025 22:07:14 +0000 (22:07 +0000)]
phy: rockchip: naneng-combphy: Use syscon_regmap_lookup_by_phandle

Change to use syscon_regmap_lookup_by_phandle() helper instead of
finding the syscon udevice and making a call to syscon_get_regmap().

No runtime change is expected with this simplication.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2 weeks agophy: rockchip: naneng-combphy: Simplify init ops
Jonas Karlman [Mon, 21 Jul 2025 22:07:13 +0000 (22:07 +0000)]
phy: rockchip: naneng-combphy: Simplify init ops

The init ops for Rockchip COMBPHY driver is more complex than it needs
to be, e.g. declaring multiple init functions that only differ in the
error message.

Simplify the init ops based on code from the Linux mainline driver.

This change also ensure that errors returned from combphy_cfg() and
reset_deassert_bulk() is propertly propagated to the caller. No other
runtime change is expected with this simplication.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2 weeks agophy: rockchip: naneng-combphy: Fix Generic PHY reference counting
Jonas Karlman [Mon, 21 Jul 2025 22:07:12 +0000 (22:07 +0000)]
phy: rockchip: naneng-combphy: Fix Generic PHY reference counting

Generic PHY reference counting helps ensure driver ops for init/exit and
power on/off are called at correct state. For this to work the PHY
driver must initialize PHY-id to a persistent value in of_xlate ops.

The Rockchip COMBPHY driver does not initialize the PHY-id field, this
typically lead to use of unshared reference counting among different
struct phy instances.

Initialize the PHY-id in of_xlate ops to ensure use of shared reference
counting among all struct phy instances.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2 weeks agophy: rockchip: usbdp: Simplify init ops
Jonas Karlman [Mon, 21 Jul 2025 22:07:11 +0000 (22:07 +0000)]
phy: rockchip: usbdp: Simplify init ops

With working shared reference counting for Generic PHY ops there is no
need for the Rockchip USBDP PHY driver to keep its own status (reference
counting) handling.

Simplify the init ops now that shared reference counting is working.
This also removes the unused mode_change handling as part of the
simplication.

No runtime change is expected with this simplication.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2 weeks agophy: rockchip: usbdp: Fix Generic PHY reference counting
Jonas Karlman [Mon, 21 Jul 2025 22:07:10 +0000 (22:07 +0000)]
phy: rockchip: usbdp: Fix Generic PHY reference counting

Generic PHY reference counting helps ensure driver ops for init/exit and
power on/off are called at correct state. For this to work the PHY
driver must initialize PHY-id to a persistent value in of_xlate ops.

The Rockchip USBDP PHY driver does not initialize the PHY-id field, this
typically lead to use of unshared reference counting among different
struct phy instances.

Initialize the PHY-id in of_xlate ops to ensure use of shared reference
counting among all struct phy instances.

E.g. on a ROCK 5B following could be observed:

  => usb start
  starting USB...
  [...]
  Bus usb@fc400000: 2 USB Device(s) found
         scanning usb for storage devices... 1 Storage Device(s) found

  => usb reset
  resetting USB...
  [...]
  rockchip_udphy phy@fed90000: cmn ana lcpll lock timeout
  rockchip_udphy phy@fed90000: failed to init usbdp combophy
  rockchip_udphy phy@fed90000: PHY: Failed to init phy@fed90000: -110.
  Can't init PHY1
  Bus usb@fc400000: probe failed, error -110
         scanning usb for storage devices... 0 Storage Device(s) found

With shared reference counting this is fixed:

  => usb reset
  resetting USB...
  [...]
  Bus usb@fc400000: 2 USB Device(s) found
         scanning usb for storage devices... 1 Storage Device(s) found

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2 weeks agoboard: rockchip: Add Xunlong Orange Pi 5 Ultra
Niu Zhihong [Wed, 23 Jul 2025 04:22:17 +0000 (12:22 +0800)]
board: rockchip: Add Xunlong Orange Pi 5 Ultra

The Orange Pi 5 Ultra is another board in the Orange Pi 5 family.

Orange Pi 5 Ultra uses Rockchip RK3588,
a new generation of octa-core 64-bit ARM processor,
which includes quad-core A76 and quad-core A55.

Features tested on a Orange Pi 5 Ultra 16GB:
- SD-card boot
- eMMC boot

ROCKCHIP_TPL:
https://github.com/rockchip-linux/rkbin/tree/master/bin/rk35/rk3588_ddr_lp4_2112MHz_lp5_2400MHz_v1.18.bin

BL31:
https://github.com/rockchip-linux/rkbin/tree/master/bin/rk35/rk3588_bl31_v1.48.elf

Signed-off-by: Niu Zhihong <zhihong@nzhnb.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2 weeks agorockchip: rk3568-nanopi-r5s: Enable ROCKUSB on NanoPi R5S
Diederik de Haas [Thu, 31 Jul 2025 12:47:05 +0000 (14:47 +0200)]
rockchip: rk3568-nanopi-r5s: Enable ROCKUSB on NanoPi R5S

Enable the needed modules so that ROCKUSB can be used to update the
NanoPi R5S.

Signed-off-by: Diederik de Haas <didi.debian@cknow.org>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2 weeks agommc: rockchip_sdhci: Do not test unsigned for being less than 0
Andrew Goodbody [Thu, 31 Jul 2025 11:46:10 +0000 (12:46 +0100)]
mmc: rockchip_sdhci: Do not test unsigned for being less than 0

In rockchip_sdhci_execute_tuning the variable tuning_loop_counter is
tested for being less than 0. Ensure that it is a signed type by
declaring it as s8 instead of char.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2 weeks agopower: rk8xx: allow to customize RK806 reset mode
Quentin Schulz [Wed, 13 Aug 2025 14:07:43 +0000 (16:07 +0200)]
power: rk8xx: allow to customize RK806 reset mode

The RK806 PMIC has a bitfield for configuring the restart/reset behavior
(which I assume Rockchip calls "function") whenever the PMIC is reset
either programmatically (c.f. DEV_RST in the datasheet) or via PWRCTRL
or RESETB pins.

For RK806, the following values are possible for RST_FUN:

0b00 means "Restart PMU"
0b01 means "Reset all the power off reset registers, forcing
the state to switch to ACTIVE mode"
0b10 means "Reset all the power off reset registers, forcing
the state to switch to ACTIVE mode, and simultaneously
pull down the RESETB PIN for 5mS before releasing"
0b11 means the same as for 0b10 just above.

This adds the appropriate logic in the driver to parse the new
rockchip,reset-mode DT property to pass this information. It just
happens that the values in the binding match the values to write in the
bitfield so no mapping is necessary.

For backward compatibility reasons, if the property is missing we set it
to 0b10 (i.e. BIT(7)) like before this commit was merged instead of
leaving it untouched like in the kernel driver.

Note that this does nothing useful for U-Boot at the moment as the ways
to reset the device (e.g. via `reset` command) doesn't interact with the
RK8xx PMIC and simply does a CPU reset.
Considering the upstream Linux kernel left this register untouched until
(assumed) v6.17[1], this is useful for cases in which the U-Boot
bootloader has this patch (and running with a DT with
rockchip,reset-mode property set) and running an upstream kernel before
(assumed) v6.17, or alternatively later without the property in the
kernel DT.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git/commit/?id=87b48d86b77686013f5c2a8866ed299312b671db

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2 weeks agoarm64: dts: rockchip: force PMIC reset behavior to restart PMU on RK3588 Tiger
Quentin Schulz [Wed, 13 Aug 2025 14:07:42 +0000 (16:07 +0200)]
arm64: dts: rockchip: force PMIC reset behavior to restart PMU on RK3588 Tiger

The bootloader for RK3588 Tiger currently forces the PMIC reset behavior
(stored in RST_FUN bitfield in register SYS_CFG3 of the PMIC) to 0b1X
which is incorrect for our devices.

It is required to restart the PMU as otherwise the companion
microcontroller cannot detect the PMIC (and by extension the full
product and main SoC) being rebooted which is an issue as that is used
to reset a few things like the PWM beeper and watchdogs.

Let's add the new rockchip,reset-mode property to make sure the PMIC
reset behavior is the expected one.

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Link: https://lore.kernel.org/r/20250627-rk8xx-rst-fun-v4-5-ce05d041b45f@cherry.de
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
[ upstream commit: e82f642b9821384045915dc30e73df7de8424827 ]

(cherry picked from commit d9c568906be166834f4f977bc7f704176bac5b8a)
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2 weeks agoarm64: dts: rockchip: force PMIC reset behavior to restart PMU on RK3588 Jaguar
Quentin Schulz [Wed, 13 Aug 2025 14:07:41 +0000 (16:07 +0200)]
arm64: dts: rockchip: force PMIC reset behavior to restart PMU on RK3588 Jaguar

The bootloader for RK3588 Jaguar currently forces the PMIC reset
behavior (stored in RST_FUN bitfield in register SYS_CFG3 of the PMIC)
to 0b1X which is incorrect for our devices.

It is required to restart the PMU as otherwise the companion
microcontroller cannot detect the PMIC (and by extension the full
product and main SoC) being rebooted which is an issue as that is used
to reset a few things like the PWM beeper and watchdogs.

Let's add the new rockchip,reset-mode property to make sure the PMIC
reset behavior is the expected one.

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Link: https://lore.kernel.org/r/20250627-rk8xx-rst-fun-v4-4-ce05d041b45f@cherry.de
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
[ upstream commit: ee907113430aa02a8202c91bb574c385ecc28aa2 ]

(cherry picked from commit 8bd14566b75f9409de703a0d2f9a0704b71a7ebe)
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2 weeks agoarm64: dts: rockchip: add header for RK8XX PMIC constants
Quentin Schulz [Wed, 13 Aug 2025 14:07:40 +0000 (16:07 +0200)]
arm64: dts: rockchip: add header for RK8XX PMIC constants

To make it easier to read the device tree, let's add constants for the
rockchip,reset-mode property values that are currently only applicable
to RK806 PMIC.

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
[dt-maintainers did not consider this part of the binding, so we're
 keeping the header in the devicetree directory]
Link: https://lore.kernel.org/r/20250627-rk8xx-rst-fun-v4-3-ce05d041b45f@cherry.de
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
[ upstream commit: 304be20e65ca08fc2e9cb58eb939a0054d8a8b81 ]

(cherry picked from commit 0e417bfcbc385c127c7f5ea01df6289aed8325c2)
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2 weeks agodt-bindings: mfd: rk806: Allow to customize PMIC reset mode
Quentin Schulz [Wed, 13 Aug 2025 14:07:39 +0000 (16:07 +0200)]
dt-bindings: mfd: rk806: Allow to customize PMIC reset mode

The RK806 PMIC allows to configure its reset/restart behavior whenever
the PMIC is reset either programmatically or via some external pins
(e.g. PWRCTRL or RESETB).

The following modes exist:
 - 0; restart PMU,
 - 1; reset all power off reset registers and force state to switch to
   ACTIVE mode,
 - 2; same as mode 1 and also pull RESETB pin down for 5ms,

For example, some hardware may require a full restart (mode 0) in order
to function properly as regulators are shortly interrupted in this mode.

This is the case for RK3588 Jaguar and RK3588 Tiger which have a
companion microcontroller running on an independent power supply and
monitoring the PMIC power rail to know the state of the main system.
When it detects a restart, it resets its own IPs exposed to the main
system as if to simulate its own reset. Failing to perform this fake
reset of the microcontroller may break things (e.g. watchdog not
automatically disabled, buzzer still running until manually disabled,
leftover configuration from previous main system state, etc...).

Some other systems may be depending on the power rails to not be
interrupted even for a small amount of time[1].

This allows to specify how the PMIC should perform on the hardware level
and may differ between hardware designs, so a DT property seems
warranted. I unfortunately do not see how this could be made generic
enough to make it a non-vendor property.

[1] https://lore.kernel.org/linux-rockchip/2577051.irdbgypaU6@workhorse/

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: "Rob Herring (Arm)" <robh@kernel.org>
Link: https://lore.kernel.org/r/20250627-rk8xx-rst-fun-v4-1-ce05d041b45f@cherry.de
Signed-off-by: Lee Jones <lee@kernel.org>
[ upstream commit: 404005d1083997daec7236620b9ba14bccdce449 ]

(cherry picked from commit 8ee72356e9844265334fd344bc05139d1f615c4d)
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2 weeks agorockchip: rk3528-radxa-e20c: Enable USB gadget Kconfig options
Jonas Karlman [Wed, 30 Jul 2025 23:52:49 +0000 (23:52 +0000)]
rockchip: rk3528-radxa-e20c: Enable USB gadget Kconfig options

Radxa E20C has a USB OTG Type-C port for Debug and Data.

Add required Kconfig options to use USB gadget features once pending
USB nodes finally lands in dts/upstream by a future sync.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2 weeks agophy: rockchip: naneng-combphy: Add support for RK3528
Jianwei Zheng [Wed, 30 Jul 2025 23:52:48 +0000 (23:52 +0000)]
phy: rockchip: naneng-combphy: Add support for RK3528

Add support for the PCIe/USB3 combo PHY used in the RK3528 SoC.

Config values are taken from vendor U-Boot linux-6.1-stan-rkr5 tag.

Signed-off-by: Jianwei Zheng <jianwei.zheng@rock-chips.com>
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2 weeks agousb: dwc3-generic: Use combined glue and ctrl node for RK3528
Jonas Karlman [Wed, 30 Jul 2025 23:52:47 +0000 (23:52 +0000)]
usb: dwc3-generic: Use combined glue and ctrl node for RK3528

Like Rockchip RK3328, RK3568 and RK3588, the RK3528 also have a single
node to represent the glue and ctrl for USB 3.0.

Use rk_ops as driver data to select correct ctrl node for RK3528 DWC3.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2 weeks agorockchip: clk: clk_rk3528: Add dummy CLK_REF_PCIE_INNER_PHY support
Jonas Karlman [Wed, 30 Jul 2025 23:52:46 +0000 (23:52 +0000)]
rockchip: clk: clk_rk3528: Add dummy CLK_REF_PCIE_INNER_PHY support

Add dummy support for the CLK_REF_PCIE_INNER_PHY clock to allow probe of
the phy-rockchip-naneng-combphy driver on RK3528.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2 weeks agorockchip: rk3528: Disable USB3OTG U3 port early
Jonas Karlman [Wed, 30 Jul 2025 23:52:45 +0000 (23:52 +0000)]
rockchip: rk3528: Disable USB3OTG U3 port early

The RK3528 SoC comes with USB OTG support using a DWC3 controller with
a USB2 PHY and a USB3 PHY (COMBPHY).

Some board designs may not use the COMBPHY for USB3 purpose. For these
board to use USB OTG the input clock source must change to use UTMI clk
instead of PIPE clk.

Change to always disable the USB3OTG U3 port early and leave it to the
COMBPHY driver to re-enable the U3 port when a usb3-phy is described in
the board device tree.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2 weeks agoarm: dts: rockchip: Set init-microvolt for pwm-regulators on Radxa E20C
Jonas Karlman [Wed, 30 Jul 2025 23:52:44 +0000 (23:52 +0000)]
arm: dts: rockchip: Set init-microvolt for pwm-regulators on Radxa E20C

Radxa E20C has two main pwm-regulators, vdd_arm and vdd_logic.

Add init-microvolt props to ensure the regulators are initialized at
the recommended power-on sequence voltage instead of at max voltage.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2 weeks agoarm: dts: rockchip: Use sdmmc node from dts/upstream on RK3528
Jonas Karlman [Wed, 30 Jul 2025 23:52:43 +0000 (23:52 +0000)]
arm: dts: rockchip: Use sdmmc node from dts/upstream on RK3528

Drop the sdmmc node from soc u-boot.dtsi and instead use the sdmmc node
from rk3528.dtsi with v6.16-dts now merged to dts/upstream.

This cleanup has no intended functional change.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2 weeks agorockchip: rk3528-generic: Fix boot after dts/upstream v6.16-dts merge
Jonas Karlman [Wed, 30 Jul 2025 23:52:42 +0000 (23:52 +0000)]
rockchip: rk3528-generic: Fix boot after dts/upstream v6.16-dts merge

The rk3528-generic target can no longer boot after v6.16-dts was merged
into dts/upstream, and instead end up in a boot loop:

  No serial driver found
  resetting ...

After Linux commit 34d2730fbbdd ("arm64: dts: rockchip: move rk3528
i2c+uart aliases to board files") there is no longer an alias for
serial0 defined for the U-Boot only rk3528-generic device tree.

Add a board specific aliases node that include the missing serial0 alias
to resolve the boot issue and ensure that stdout-path = "serial0:..."
can be resolved by U-Boot.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2 weeks agork3288: add fdtoverlay_addr_r to default env
Marius Dinu [Wed, 11 Jun 2025 11:04:54 +0000 (11:04 +0000)]
rk3288: add fdtoverlay_addr_r to default env

rk3288 is missing fdtoverlay_addr_r.
The new addresses match those used by rk3308.
Tested on Asus TinkerBoard S.

Signed-off-by: Marius Dinu <m95d+git@psihoexpert.ro>
Cc: Simon Glass <sjg@chromium.org>
Cc: Philipp Tomsich <philipp.tomsich@vrull.eu>
Cc: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2 weeks agoboard: rockchip: unblock CAN bus in spl_board_init on Jaguar
Jakob Unterwurzacher [Tue, 17 Jun 2025 08:42:52 +0000 (10:42 +0200)]
board: rockchip: unblock CAN bus in spl_board_init on Jaguar

GPIO0_B7 is routed to TXI of the on-board CAN transceiver. The
line has a pull-down per SoC default.

This means the CAN transceiver transmits a dominant zero
and blocks the CAN bus until Linux boots and reconfigures the pin.

Let's switch to pull-up as soon as we can (i.e. in SPL).
This cuts down the "bus is blocked" time from 10 seconds to < 1 second.

Of course, to this needs CONFIG_SPL_BOARD_INIT, so enable it
the Jaguar defconfig.

Signed-off-by: Jakob Unterwurzacher <jakob.unterwurzacher@cherry.de>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2 weeks agorockchip: puma-rk3399: enable "env erase" command
Quentin Schulz [Fri, 27 Jun 2025 13:30:19 +0000 (15:30 +0200)]
rockchip: puma-rk3399: enable "env erase" command

Erasing the environment to start from scratch is actually very useful
and "env erase" is the proper way to do it instead of using "env
default -a && env save", so let's enable support for it.

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2 weeks agorockchip: ringneck-px30: enable "env erase" command
Quentin Schulz [Fri, 27 Jun 2025 13:30:18 +0000 (15:30 +0200)]
rockchip: ringneck-px30: enable "env erase" command

Erasing the environment to start from scratch is actually very useful
and "env erase" is the proper way to do it instead of using "env
default -a && env save", so let's enable support for it.

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2 weeks agorockchip: jaguar-rk3588: enable "env erase" command
Quentin Schulz [Fri, 27 Jun 2025 13:30:17 +0000 (15:30 +0200)]
rockchip: jaguar-rk3588: enable "env erase" command

Erasing the environment to start from scratch is actually very useful
and "env erase" is the proper way to do it instead of using "env
default -a && env save", so let's enable support for it.

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2 weeks agorockchip: tiger-rk3588: enable "env erase" command
Quentin Schulz [Fri, 27 Jun 2025 13:30:16 +0000 (15:30 +0200)]
rockchip: tiger-rk3588: enable "env erase" command

Erasing the environment to start from scratch is actually very useful
and "env erase" is the proper way to do it instead of using "env
default -a && env save", so let's enable support for it.

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2 weeks agoboard: rockchip: Add ArmSoM Sige5
Jonas Karlman [Fri, 1 Aug 2025 20:43:39 +0000 (20:43 +0000)]
board: rockchip: Add ArmSoM Sige5

ArmSoM-Sige5 adopts the second-generation 8nm high-performance AIOT
platform Rockchip RK3576, with a 6 TOPS computing power NPU and support
for up to 16GB of large memory. It supports 4K video encoding and
decoding, offers rich interfaces including dual gigabit Ethernet ports,
WiFi 6 & BT5, and various video outputs.

Features tested on a ArmSoM Sige5 v1.1:
- SD-card boot
- eMMC boot
- Ethernet
- PCIe NVMe

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2 weeks agophy: rockchip: naneng-combphy: Add support for RK3576
Jon Lin [Fri, 1 Aug 2025 20:43:38 +0000 (20:43 +0000)]
phy: rockchip: naneng-combphy: Add support for RK3576

Add support for the PCIe/USB3/SATA combo PHYs used in the RK3576 SoC.

Config values are taken from vendor U-Boot linux-6.1-stan-rkr5 tag.

Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2 weeks agorockchip: clk: clk_rk3576: Add dummy CLK_REF_PCIEx_PHY support
Jonas Karlman [Fri, 1 Aug 2025 20:43:37 +0000 (20:43 +0000)]
rockchip: clk: clk_rk3576: Add dummy CLK_REF_PCIEx_PHY support

Add dummy support for the CLK_REF_PCIEx_PHY clocks to allow probe of the
phy-rockchip-naneng-combphy driver on RK3576.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2 weeks agophy: rockchip: usbdp: Add support for RK3576
Frank Wang [Fri, 1 Aug 2025 20:32:44 +0000 (20:32 +0000)]
phy: rockchip: usbdp: Add support for RK3576

Add support for the USB3.0+DP PHY used in the RK3576 SoC.

Config values are taken from vendor U-Boot linux-6.1-stan-rkr5 tag.

Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2 weeks agophy: rockchip-inno-usb2: Add support for RK3576
Frank Wang [Fri, 1 Aug 2025 20:32:43 +0000 (20:32 +0000)]
phy: rockchip-inno-usb2: Add support for RK3576

Add support for the USB2.0 PHYs used in the RK3576 SoC.

Config values are taken from vendor U-Boot linux-6.1-stan-rkr5 tag.

Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2 weeks agousb: dwc3-generic: Use combined glue and ctrl node for RK3576
Jonas Karlman [Fri, 1 Aug 2025 20:32:42 +0000 (20:32 +0000)]
usb: dwc3-generic: Use combined glue and ctrl node for RK3576

Like Rockchip RK3328, RK3568 and RK3588, the RK3576 also have a single
node to represent the glue and ctrl for USB 3.0.

Use rk_ops as driver data to select correct ctrl node for RK3576 DWC3.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2 weeks agoarm: dts: rockchip: Include OTP in U-Boot pre-reloc phase for RK3576
Jonas Karlman [Fri, 1 Aug 2025 20:32:41 +0000 (20:32 +0000)]
arm: dts: rockchip: Include OTP in U-Boot pre-reloc phase for RK3576

Update rk3576-u-boot.dtsi to include OTP in U-Boot pre-reloc phase for
checkboard() to be able to read information about the running SoC model
and variant from OTP and print it during boot:

  U-Boot 2025.04 (Apr 22 2025 - 20:43:17 +0000)

  Model: Generic RK3576
  SoC:   RK3576
  DRAM:  8 GiB

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2 weeks agorockchip: rk3576: Implement checkboard() to print SoC variant
Jonas Karlman [Fri, 1 Aug 2025 20:32:40 +0000 (20:32 +0000)]
rockchip: rk3576: Implement checkboard() to print SoC variant

Implement checkboard() to print current SoC model used by a board when
U-Boot proper is running.

  U-Boot 2025.04 (Apr 22 2025 - 20:43:17 +0000)

  Model: Generic RK3576
  SoC:   RK3576
  DRAM:  8 GiB

Information about the SoC model and variant is read from OTP.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2 weeks agoboard: rockchip: Add minimal generic RK3576 board
Jonas Karlman [Fri, 1 Aug 2025 20:32:39 +0000 (20:32 +0000)]
board: rockchip: Add minimal generic RK3576 board

Add a minimal generic RK3576 board that only have eMMC, SDMMC and USB
OTG enabled. This defconfig can be used to boot from eMMC or SD-card on
most RK3576 boards that follow reference board design.

eMMC and SD-card boot tested on:
- ArmSoM CM5
- ArmSoM Sige5
- FriendlyElec NanoPi M5
- Luckfox Omni3576
- Toybrick TB-RK3576D

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2 weeks agorockchip: Add default USB_GADGET_PRODUCT_NUM for RK3576
Jonas Karlman [Fri, 1 Aug 2025 20:32:38 +0000 (20:32 +0000)]
rockchip: Add default USB_GADGET_PRODUCT_NUM for RK3576

Use 0x350e as the default USB Product ID for Rockchip RK3576, same PID
being used by the BootROM when the device is in MASKROM mode.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2 weeks agorng: rockchip_rng: Add compatible for RK3576
Jonas Karlman [Fri, 1 Aug 2025 20:32:37 +0000 (20:32 +0000)]
rng: rockchip_rng: Add compatible for RK3576

The RK3576 SoC contains a RKRNG block that can be used to generate
random numbers using the rockchip_rng driver.

Add compatible for RK3576 to support random numbers:

  => rng list
  RNG #0 - rng@2a410000

  => rng
  00000000: 36 dd ab 98 ec fb fe d1 cf 36 b3 e1 9b 3d 00 90  6........6...=..
  00000010: f5 84 de 75 6b 27 48 9e 13 62 12 6c 50 ca 47 1a  ...uk'H..b.lP.G.
  00000020: b3 4d fc 43 c5 b5 2d be 07 27 03 26 bb 69 61 2a  .M.C..-..'.&.ia*
  00000030: 6f 70 01 83 4e ce 91 7a 5a 6c 7c 00 43 87 3e c5  op..N..zZl|.C.>.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2 weeks agousb: gadget: rockchip: Fix spacing around the Kconfig option
Tom Rini [Wed, 2 Jul 2025 01:03:46 +0000 (19:03 -0600)]
usb: gadget: rockchip: Fix spacing around the Kconfig option

This Kconfig option used spaces and not tabs for indentation. Switch to
tabs.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2 weeks agousb: gadget: rockchip: Add missing dependency
Tom Rini [Wed, 2 Jul 2025 01:03:45 +0000 (19:03 -0600)]
usb: gadget: rockchip: Add missing dependency

The rockchip usb gadget driver cannot build without platform specific
headers being available. Express that requirement in Kconfig as well.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2 weeks agoarm64: dts: rockchip: roc-3328-cc: use 1600 ddr4 timing
Da Xue [Tue, 10 Jun 2025 19:08:20 +0000 (19:08 +0000)]
arm64: dts: rockchip: roc-3328-cc: use 1600 ddr4 timing

Swap the ROC-3328-CC from DDR4 666 to 1600 timing to boost performance.

Signed-off-by: Da Xue <da@libre.computer>
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2 weeks agoram: rk3328: add ddr4-1600 sdram timing
Da Xue [Tue, 10 Jun 2025 19:08:19 +0000 (19:08 +0000)]
ram: rk3328: add ddr4-1600 sdram timing

Add DDR4 1600MHz SDRAM timing data from LibreComputer u-boot sources
for the ROC-3328-CC board.

Signed-off-by: Da Xue <da@libre.computer>
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2 weeks agorockchip: Add support for GameForce Ace
Chris Morgan [Tue, 10 Jun 2025 03:06:16 +0000 (22:06 -0500)]
rockchip: Add support for GameForce Ace

The GameForce Ace is an RK3588S based handheld gaming device.

Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2 weeks agorockchip: px30/rk3326: Implement checkboard() to print SoC variant
Quentin Schulz [Tue, 10 Jun 2025 09:42:50 +0000 (11:42 +0200)]
rockchip: px30/rk3326: Implement checkboard() to print SoC variant

This implements checkboard() to print the current SoC model used by a
board, e.g. one of:

SoC:   PX30
SoC:   PX30S
SoC:   PX30K
SoC:   RK3326
SoC:   RK3326S

when U-Boot proper is running.

The information is read from the OTP and also the DDR_GRF. There's no
public information as far as I know about the layout and stored
information on OTP but this was provided by Rockchip themselves through
their support channel.

The OTP stores the information of whether the SoC is PX30K or something
else. To differentiate between PX30/RK3326 and PX30S/RK3326S, one needs
to read some undocumented bitfield in a DDR_GRF register as done in
vendor kernel,
c.f. https://github.com/armbian/linux-rockchip/blob/rk-6.1-rkr5.1/drivers/soc/rockchip/rockchip-cpuinfo.c#L118-L133.

I do not own a PX30S, nor RK3326/RK3326S so cannot test it works
properly.

Also add the OTP node to the pre-relocation phase of U-Boot proper so
that the SoC variant can be printed when DISPLAY_BOARDINFO is enabled.
This is not required if DISPLAY_BOARDINFO_LATE is enabled because this
happens after relocation. If both are enabled, then the SoC variant will
be printed twice in the boot log, e.g.:

U-Boot 2025.07-rc3-00014-g7cb731574ae6-dirty (May 28 2025 - 13:52:47 +0200)

Model: Theobroma Systems PX30-uQ7 SoM on Haikou devkit
SoC:   PX30  <---- due to DISPLAY_BOARDINFO
DRAM:  2 GiB
PMIC:  RK809 (on=0x40, off=0x00)
Core:  293 devices, 27 uclasses, devicetree: separate
MMC:   mmc@ff370000: 1, mmc@ff390000: 0
Loading Environment from MMC... Reading from MMC(1)... OK

In:    serial@ff030000
Out:   serial@ff030000
Err:   serial@ff030000
Model: Theobroma Systems PX30-uQ7 SoM on Haikou devkit
SoC:   PX30  <----- due to DISPLAY_BOARDINFO_LATE
Net:   eth0: ethernet@ff360000

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2 weeks agorockchip: rockchip-inno-usb2: Fix Synchronous Abort on usb start
Alex Shumsky [Thu, 3 Jul 2025 06:04:48 +0000 (09:04 +0300)]
rockchip: rockchip-inno-usb2: Fix Synchronous Abort on usb start

Fix NULL pointer dereference that happen when rockchip-inno-usb2 clock
enabled before device probe. This early clock enable call happen in process
of parent clock activation added in ac30d90f3367.

Fixes: 229218373c22 ("phy: rockchip-inno-usb2: Add support for clkout_ctl_phy").
Fixes: ac30d90f3367 ("clk: Ensure the parent clocks are enabled while reparenting")
Co-authored-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Alex Shumsky <alexthreed@gmail.com>
Reviewed-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2 weeks agoMerge branch 'master' of git://source.denx.de/u-boot-usb
Tom Rini [Fri, 29 Aug 2025 20:58:45 +0000 (14:58 -0600)]
Merge branch 'master' of git://source.denx.de/u-boot-usb

- Fix a use after free error in cdns3 gadget support in some cases.

2 weeks agousb: cdns3: Do not access memory after free
Andrew Goodbody [Wed, 13 Aug 2025 16:30:12 +0000 (17:30 +0100)]
usb: cdns3: Do not access memory after free

The call to cdns3_gadget_ep_free_request will free priv_req so do the
call to list_del_init which accesses the memory pointed to by priv_req
before the free.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Reviewed-by: Siddharth Vadapalli <s-vadapalli@ti.com>
3 weeks agoMerge tag 'u-boot-stm32-20250825' of https://source.denx.de/u-boot/custodians/u-boot-stm
Tom Rini [Tue, 26 Aug 2025 14:33:10 +0000 (08:33 -0600)]
Merge tag 'u-boot-stm32-20250825' of https://source.denx.de/u-boot/custodians/u-boot-stm

CI: https://source.denx.de/u-boot/custodians/u-boot-stm/-/pipelines/27466

- Enable OF_UPSTREAM_BUILD_VENDOR for stm32mp25_defconfig
- Fix to avoid inifite loop in stm32_sdmmc2 driver
- Populate oobavail field of nand_ecclayout in stm32_fmc2_nand driver

3 weeks agoMerge tag 'u-boot-at91-fixes-2025.10-a' of https://source.denx.de/u-boot/custodians...
Tom Rini [Tue, 26 Aug 2025 14:30:21 +0000 (08:30 -0600)]
Merge tag 'u-boot-at91-fixes-2025.10-a' of https://source.denx.de/u-boot/custodians/u-boot-at91

First set of u-boot-at91 fixes for the 2025.10 cycle:

This set includes smatch fixes for clocks and mmc and one QSPI fix.

3 weeks agoPrepare v2025.10-rc3 v2025.10-rc3
Tom Rini [Mon, 25 Aug 2025 19:06:38 +0000 (13:06 -0600)]
Prepare v2025.10-rc3

Signed-off-by: Tom Rini <trini@konsulko.com>
3 weeks agoremoteproc: k3: update compatible for am654 syscon
Anshul Dalal [Thu, 14 Aug 2025 15:21:43 +0000 (20:51 +0530)]
remoteproc: k3: update compatible for am654 syscon

The existing compatible name for U-Boot's k3 system controller driver
i.e "ti,am625-system-controller" has been added to linux[1] device-tree.
This compatible in kernel is meant for configuring the Control Module
registers (CTRL_MMR0).

However in U-Boot, the matching driver was being used to load the system
firmware on the secure M-cores by the R5 SPL and therefore must be
updated to a different compatible to avoid conflicts.

Therefore, this patch renames all references of the compatible to
"ti,am654-tisci-rproc-r5". The "-r5" is appended so as to avoid any
future conflicts since r5 specific compatibles should only be useful for
U-Boot.

[1]: 5959618631fe ("dt-bindings: mfd: ti,j721e-system-controller: Add compatible string for AM654")
     https://lore.kernel.org/r/20250421214620.3770172-2-afd@ti.com

Signed-off-by: Anshul Dalal <anshuld@ti.com>
3 weeks agoboard: phytec: phycore_am6xx: Add rauc to bootmeths
Wadim Egorov [Mon, 18 Aug 2025 10:26:05 +0000 (12:26 +0200)]
board: phytec: phycore_am6xx: Add rauc to bootmeths

Add rauc to bootmeths variable if BOOTMETH_RAUC is enabled.
This is setting a proper default for RAUC enabled systems.

Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
Reviewed-by: Martin Schwan <m.schwan@phytec.de>
3 weeks agobootstd: rauc: Do not select BOOTMETH_GLOBAL
Martin Schwan [Fri, 15 Aug 2025 07:12:56 +0000 (09:12 +0200)]
bootstd: rauc: Do not select BOOTMETH_GLOBAL

Since the bootmeth "rauc" is not a global boot method, do not select the
corresponding BOOTMETH_GLOBAL option.

Signed-off-by: Martin Schwan <m.schwan@phytec.de>
3 weeks agoMerge tag 'xilinx-for-v2025.10-rc3' of https://source.denx.de/u-boot/custodians/u...
Tom Rini [Mon, 25 Aug 2025 16:06:03 +0000 (10:06 -0600)]
Merge tag 'xilinx-for-v2025.10-rc3' of https://source.denx.de/u-boot/custodians/u-boot-microblaze

AMD/Xilinx/FPGA changes for v2025.10-rc3

Fix smatch issues in zynqmp ipi and pinctrl drivers

zynqmp:
- Add missing zu1cg device
- Add missing ethernet alias for kr260-revB
- Define empty BOOTENV_DEV_SHARED_XSPI macro

fpga:
- Address reported coverity issues

net:
- axi_emac: Fix timeout test

versal2:
- Define usb_pgood_delay for fix device detection

3 weeks agoconfigs: stm32mp25: Enable OF_UPSTREAM_BUILD_VENDOR
Patrice Chotard [Thu, 14 Aug 2025 12:09:38 +0000 (14:09 +0200)]
configs: stm32mp25: Enable OF_UPSTREAM_BUILD_VENDOR

Initially, only one STM32MP25 based board was available, the
stm32mp257f-ev1 board which was set by default in stm32mp25_defconfig.

Since commit 79f3e77133bd ("Subtree merge tag 'v6.16-dts' of dts repo [1] into dts/upstream")
we inherited of a second MP25 based board which is the stm32mp257f-dk board.

Enable OF_UPSTREAM_BUILD_VENDOR and set OF_UPSTREAM_VENDOR to allow all
STMicroelectronics DT compilation.

Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
3 weeks agommc: stm32_sdmmc2: avoid infinite while loop
Christophe Kerello [Tue, 12 Aug 2025 13:55:26 +0000 (15:55 +0200)]
mmc: stm32_sdmmc2: avoid infinite while loop

Avoid unlimited while loop by adding a timeout. The timeout is
calculated based on a minimal throughput of 256 KB/s.
The timeout is set at least to 2 seconds.

Signed-off-by: Christophe Kerello <christophe.kerello@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
3 weeks agomtd: rawnand: stm32_fmc2: set available OOB bytes per page
Christophe Kerello [Tue, 12 Aug 2025 12:35:11 +0000 (14:35 +0200)]
mtd: rawnand: stm32_fmc2: set available OOB bytes per page

File system such as YAFFS2 need to know the number of available
OOB bytes per page to be able to choose if they should locate their
metadata in the data area or in the spare area.

Signed-off-by: Christophe Kerello <christophe.kerello@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
3 weeks agoconfigs: versal2: Add usb_pgood_delay for versal2 boards
Venkatesh Yadav Abbarapu [Mon, 18 Aug 2025 04:53:04 +0000 (10:23 +0530)]
configs: versal2: Add usb_pgood_delay for versal2 boards

Add usb_pgood_delay to ensure proper detection of USB devices.
Increase the USB power good delay for versal2 specific boards,
as certain USB sticks may not be detected without it.

Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
Link: https://lore.kernel.org/r/20250818045304.4058177-1-venkatesh.abbarapu@amd.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
3 weeks agonet: axi_emac: Fix timeout test
Andrew Goodbody [Mon, 18 Aug 2025 09:24:36 +0000 (10:24 +0100)]
net: axi_emac: Fix timeout test

The timeout test in axi_dma_init is not correct due to the
post-decrement used on the timeout variable which will mean timeout is
not 0 if the timeout occurs. Make the timeout variable an int instead of
a u32 and then test for timeout being -1.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Link: https://lore.kernel.org/r/20250806-net_xilinx_axi-v2-1-6311cf59451d@linaro.org
Signed-off-by: Michal Simek <michal.simek@amd.com>
3 weeks agoarm64: versal2: Define BOOTENV_DEV_SHARED_XSPI when distro is disabled
Michal Simek [Wed, 30 Jul 2025 14:32:01 +0000 (16:32 +0200)]
arm64: versal2: Define BOOTENV_DEV_SHARED_XSPI when distro is disabled

When DISTRO_DEFAULT is disabled there is missing empty
BOOTENV_DEV_SHARED_XSPI macro defined.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/4c195468c0341ddd2aca98f83cdcbd40117cc9ee.1753885919.git.michal.simek@amd.com
3 weeks agoarm64: zynqmp: Add missing ethernet alias for kr260-revB
Michal Simek [Tue, 29 Jul 2025 13:55:20 +0000 (15:55 +0200)]
arm64: zynqmp: Add missing ethernet alias for kr260-revB

Ethernet aliases are used in fdt_fixup_ethernet() to inject
local-mac-address in every boot for OS. Similar change has been done for
other carrier cards by commit c4a711253613 ("arm64: zynqmp: Describe
ethernet controllers via aliases on SOM").

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/87d88dba98f7ed96463964684ee45a506d557226.1753797318.git.michal.simek@amd.com
3 weeks agofpga: lattice: Remove unused support
Michal Simek [Mon, 28 Jul 2025 07:07:54 +0000 (09:07 +0200)]
fpga: lattice: Remove unused support

There is no single platform which is using this driver that's why remove it
completely. Some issues regarding this code are also reported by Coverity
(CID 583143, 583144, 583145, 583146).

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/367cd55ab8d9fb262ac23fe748babc6b2b59bee0.1753686468.git.michal.simek@amd.com
3 weeks agofpga: Remove ancient ACEX1K support
Michal Simek [Mon, 28 Jul 2025 07:07:53 +0000 (09:07 +0200)]
fpga: Remove ancient ACEX1K support

Coverity (CID 583149) reports issue on code which is not enabled by any
real platform that's why remove it completely.

Acked-by: Alexander Dahl <ada@thorsis.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/20fe425910b6266a2bf0555bda67f60c1dd3aa61.1753686468.git.michal.simek@amd.com
3 weeks agofpga: xilinx: Check valid desc structure
Michal Simek [Mon, 28 Jul 2025 07:07:52 +0000 (09:07 +0200)]
fpga: xilinx: Check valid desc structure

FPGA validation can fail and return value needs to be checked.

Addresses-Coverity-ID: CID 583150: Null pointer dereferences  (NULL_RETURNS)
Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/876b6f8dbc99ca305460183dbd18635a35ccc989.1753686468.git.michal.simek@amd.com
3 weeks agofpga: cyclon2: Remove message never printed
Alexander Dahl [Mon, 4 Aug 2025 09:08:16 +0000 (11:08 +0200)]
fpga: cyclon2: Remove message never printed

else branch is never reached.  Print "Done." anyways to keep behaviour.

Addresses-Coverity-ID: 583148
Link: https://lore.kernel.org/u-boot/20250725132645.GA1807455@bill-the-cat/
Fixes: f0ff4692ff33 ("Add FPGA Altera Cyclone 2 support Patch by Heiko Schocher, 15 Aug 2006")
Signed-off-by: Alexander Dahl <ada@thorsis.com>
Link: https://lore.kernel.org/r/20250804090816.42603-1-ada@thorsis.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
3 weeks agosoc: xilinx: zynqmp: Fix zu1cg device detection
Frank Böwingloh [Fri, 8 Aug 2025 12:31:34 +0000 (14:31 +0200)]
soc: xilinx: zynqmp: Fix zu1cg device detection

Currently u-boot displayed a zu1cg soc as "Chip:  zu1eg".
A value of 0468_8093h in the IDCODE (CSU) Register defines a ZU1 soc
not only for the EG family but also for the CG family as described
in the Xilinx Zynq UltraScale+ UG1085 documentation in Table 1-2.

Signed-off-by: Frank Böwingloh <f.boewingloh@beckhoff.com>
Cc: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/20250808123134.636-1-f.boewingloh@beckhoff.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
3 weeks agopinctrl: zynqmp: Avoid using uninitialised variable
Andrew Goodbody [Thu, 7 Aug 2025 10:04:05 +0000 (11:04 +0100)]
pinctrl: zynqmp: Avoid using uninitialised variable

In zynqmp_pinconf_set if param is PIN_CFG_IOSTANDARD or
PIN_CONFIG_POWER_SOURCE and zynqmp_pm_pinctrl_get_config returns an
error then value will not be assigned to when its value is tested to be
not equal to arg. Add code to only test value not equal to arg if ret is
false.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Link: https://lore.kernel.org/r/20250807-pinctrl_misc-v1-4-eeb564a1b032@linaro.org
Signed-off-by: Michal Simek <michal.simek@amd.com>
3 weeks agopinctrl: zynqmp: Ensure ret is initialised
Andrew Goodbody [Thu, 7 Aug 2025 10:04:04 +0000 (11:04 +0100)]
pinctrl: zynqmp: Ensure ret is initialised

In zynqmp_pinctrl_prepare_func_groups if called with func->ngroups == 0
then ret will not be assigned to before its value is returned on exit.
Initialise ret to ensure it is always valid.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Link: https://lore.kernel.org/r/20250807-pinctrl_misc-v1-3-eeb564a1b032@linaro.org
Signed-off-by: Michal Simek <michal.simek@amd.com>
3 weeks agomailbox: zynqmp: Fix off by 1 errors
Andrew Goodbody [Mon, 28 Jul 2025 15:47:09 +0000 (16:47 +0100)]
mailbox: zynqmp: Fix off by 1 errors

Use resource_size to correctly calculate the size to pass to
devm_ioremap and avoid the off by 1 errors previously present.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Link: https://lore.kernel.org/r/20250728-zynqmp-ipi-v1-1-b2bd144a9521@linaro.org
Signed-off-by: Michal Simek <michal.simek@amd.com>
3 weeks agoMerge branch 'u-boot-nand-23082025' of https://source.denx.de/u-boot/custodians/u...
Tom Rini [Sun, 24 Aug 2025 14:01:29 +0000 (08:01 -0600)]
Merge branch 'u-boot-nand-23082025' of https://source.denx.de/u-boot/custodians/u-boot-nand-flash

CI: https://source.denx.de/u-boot/custodians/u-boot-nand-flash/-/pipelines/27449

This series address issues found by Andrew Goodbody and David Regan. Add
a new benchmark tool from Miguel and small feature

3 weeks agoMerge branch 'master' of git://source.denx.de/u-boot-usb
Tom Rini [Sat, 23 Aug 2025 19:53:34 +0000 (13:53 -0600)]
Merge branch 'master' of git://source.denx.de/u-boot-usb

- A DWC2 fix, i.MX95 USB3 PHY support and i.MX95 OTG support

3 weeks agoMerge tag 'u-boot-imx-master-20250823' of https://gitlab.denx.de/u-boot/custodians...
Tom Rini [Sat, 23 Aug 2025 19:52:54 +0000 (13:52 -0600)]
Merge tag 'u-boot-imx-master-20250823' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx

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

- Fix the environment location when booting from USB on i.MX93.
- Fix env location when booting from USB on phycore-imx93.
- Fix conflict early SPL malloc address on imx93 boards.

3 weeks agousb: dwc2: fix reset logic in dwc2_core_reset
Patrick Delaunay [Wed, 23 Jul 2025 15:09:16 +0000 (17:09 +0200)]
usb: dwc2: fix reset logic in dwc2_core_reset

Use GUSBCFG_FORCEHOSTMODE to detected the HOST forced mode as it is done
in the Linux driver drivers/usb/dwc2/core.c:dwc2_core_reset().

The host polling must be executed only if the current mode is host,
either due to the force HOST mode (which persists after core reset)
or the connector id pin.

The GUSBCFG_FORCEDEVMODE bits is used to force the device mode (for
example used on STM32MP1x platform) and when it is activated the DWC2 reset
failed with the trace:
"dwc2_core_reset: Waiting for GINTSTS_CURMODE_HOST timeout"

Fixes: c5d685b8993c ("usb: dwc2: Unify flush and reset logic with v4.20a support")
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Junhui Liu <junhui.liu@pigmoral.tech>
Tested-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Marek Vasut <marek.vasut@mailbox.org>
3 weeks agousb: ehci-mx6: Add i.MX95 OTG support
Tim Harvey [Mon, 21 Jul 2025 18:02:05 +0000 (11:02 -0700)]
usb: ehci-mx6: Add i.MX95 OTG support

When the usb node is defined dr_mode="otg" ehci_usb_phy_mode() is called
to determine the mode from status registers.

The IMX95RM does not currently define the USBNC STATUS register but it is
assumed to be an omission as the first three registers are defined.
It has been expirimentally verified that the USBNC_PHY_STATUS register
at offset 0x23C bit4 (USBNC_PHYSTATUS_ID_DIG) reads 0 when USB_ID is GND
and 1 when floating.

Use is_imx9() as this driver works for i.MX91, i.MX93 and i.MX95 and all
of these determine the role based on the USBNC_PHY_STATUS register.

Fixes: 801b5fafd35d "(usb: ehci-mx6: Add i.MX95 support")
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Reviewed-by: Alice Guo <alice.guo@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
3 weeks agophy: phy-imx8mq-usb: Add support for i.MX95 USB3 PHY
Tim Harvey [Wed, 9 Jul 2025 15:24:08 +0000 (08:24 -0700)]
phy: phy-imx8mq-usb: Add support for i.MX95 USB3 PHY

Add initial support for i.MX95 USB.30 PHY, which is similar to
the i.MX8MQ and i.MX8MP USB PHY.

The i.MX95 USB3 PHY has a Type-C Assist block (TCA) consisting of two
functional blocks (XBar assist and VBus assist) and is documented
in the i.MX95 RM Chapter 163.3.8 Type-C assist (TCA) block.

Instead of relying on an external MUX for Type-C plug orientation the
XBar can handle the flip internally.

Add initial support for i.MX95 by:
 - allowing the driver to be enabled i.MX95
 - resetting the XBar
 - configuring the TCA in System Configuration mode (which was determined
   to be necessary to enable the PHY in device-mode)

Follow-on support will need to be added to steer the XBar based on
either board design (if only one pair is brought out) or if used with a
Type-C controller.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Tested-by: Alice Guo <alice.guo@nxp.com>