]> git.ipfire.org Git - thirdparty/u-boot.git/log
thirdparty/u-boot.git
5 months agoclk: versaclock: Use IS_ERR check before dereference
Andrew Goodbody [Wed, 23 Jul 2025 15:54:08 +0000 (16:54 +0100)] 
clk: versaclock: Use IS_ERR check before dereference

In versaclock_probe vc5->pin_xin may be an error pointer so need to
check with IS_ERR before attempting to dereference it.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
5 months agoclk: versaclock: return value calculated by ERR_PTR
Andrew Goodbody [Wed, 23 Jul 2025 15:54:07 +0000 (16:54 +0100)] 
clk: versaclock: return value calculated by ERR_PTR

In versaclock_get_name -ENOMEM is passed to ERR_PTR but nothing is
done with the value that this calculates which is obviously not the
intention of the code. This is confirmed by the code around where this
function is called.
Instead return the value from ERR_PTR.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
5 months agousb: musb-new: Cannot test unsigned member to be negative
Andrew Goodbody [Tue, 30 Sep 2025 15:52:24 +0000 (16:52 +0100)] 
usb: musb-new: Cannot test unsigned member to be negative

You cannot test an unsigned member of a struct for being negative, the
test will always fail. Instead assign the return value of
fdtdec_get_int, which returns an int, to a temporary variable declared
as an int, so that it can be tested for being negative before being
assigned to the unsigned struct member.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
5 months agousb: musb-new: Limit check array index before use
Andrew Goodbody [Tue, 30 Sep 2025 15:52:23 +0000 (16:52 +0100)] 
usb: musb-new: Limit check array index before use

epnum is used as an index into an array. The limit check for this index
should be performed before using it to access an element in the array to
prevent possible bounds overrun.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
5 months agousb: musb-new: Null check before dereference
Andrew Goodbody [Tue, 30 Sep 2025 15:52:22 +0000 (16:52 +0100)] 
usb: musb-new: Null check before dereference

A null check for the variable 'data' was introduced before dereferencing
it for set_phy_power but other uses were not so protected. Add the null
check for other dereferences of 'data'.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
5 months agousb: xhci: exynos: variable node should be signed
Andrew Goodbody [Tue, 30 Sep 2025 10:34:44 +0000 (11:34 +0100)] 
usb: xhci: exynos: variable node should be signed

The variable node is assigned to the return value of a function that
returns an int. It is tested for being negative and then passed as an
argument to a function that takes an int. So 'node' should not be
declared as unsigned. Correct it.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
5 months agousb: ulpi: Incorrect operator used
Andrew Goodbody [Tue, 30 Sep 2025 16:06:44 +0000 (17:06 +0100)] 
usb: ulpi: Incorrect operator used

Combining two bits into a mask to be used so that the same write code
can be used to set or reset bits in a register clearly needs to use the
binary 'or' operator, not the binary 'and'. Fix it.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
5 months agousb: ohci-hcd: Null check lurb_priv before dereference
Andrew Goodbody [Tue, 30 Sep 2025 09:56:02 +0000 (10:56 +0100)] 
usb: ohci-hcd: Null check lurb_priv before dereference

When a variable needs a null check before it is dreferenced ensure that
this is done even in the case of assignment on declaration. This was not
happening for lurb_priv so correct it.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
5 months agousb: fsl-dt-fixup: Return an error code on error
Andrew Goodbody [Thu, 25 Sep 2025 11:56:44 +0000 (12:56 +0100)] 
usb: fsl-dt-fixup: Return an error code on error

fsl_fdt_fixup_usb_erratum uses strcmp to detect an error but then
returns 'err' without it being set to an error. Calling code may not
detect that an error occurred leading to a silent failure. Instead just
return -EINVAL.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
5 months agousb: ehci: exynos: variable node should be signed
Andrew Goodbody [Mon, 29 Sep 2025 16:53:11 +0000 (17:53 +0100)] 
usb: ehci: exynos: variable node should be signed

THe variable node is assigned to the return value of a function that
returns an int. It is tested for being negative and then passed as an
argument to a function that takes an int. So 'node' should not be
declared as unsigned. Correct it.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Reviewed-by: Marek Vasut <marek.vasut@mailbox.org>
5 months agoboard: starfive: Add initial Milk-V Mars CM and Mars CM Lite user documentation
E Shattow [Tue, 21 Oct 2025 23:10:00 +0000 (16:10 -0700)] 
board: starfive: Add initial Milk-V Mars CM and Mars CM Lite user documentation

Add initial board docs for Milk-V Mars CM (eMMC) and Milk-V Mars CM Lite
(SD Card) to the visionfive2 board target.

Signed-off-by: E Shattow <e@freeshell.de>
5 months agoconfigs: starfive: Add Milk-V Mars CM and Mars CM Lite to visionfive2
E Shattow [Tue, 21 Oct 2025 23:09:59 +0000 (16:09 -0700)] 
configs: starfive: Add Milk-V Mars CM and Mars CM Lite to visionfive2

Add Milk-V Mars CM and Mars CM Lite to visionfive2.

These boards were previously supported and then removed in the transition
to OF_UPSTREAM. The dts have landed in the for-next queue so let's add the
boards again.

Signed-off-by: E Shattow <e@freeshell.de>
Reviewed-by: Hal Feng <hal.feng@starfivetech.com>
5 months agoboard: starfive: visionfive2: Add Milk-V Mars CM and Mars CM Lite selection by product_id
E Shattow [Tue, 21 Oct 2025 23:09:58 +0000 (16:09 -0700)] 
board: starfive: visionfive2: Add Milk-V Mars CM and Mars CM Lite selection by product_id

Add identifier for Milk-V Mars CM to dts selection callback in SPL, and
to fdtfile environment variable default value selection in payload.

Signed-off-by: E Shattow <e@freeshell.de>
Reviewed-by: Hal Feng <hal.feng@starfivetech.com>
5 months agoriscv: dts: starfive: prune redundant jh7110 overrides
E Shattow [Tue, 21 Oct 2025 20:54:00 +0000 (13:54 -0700)] 
riscv: dts: starfive: prune redundant jh7110 overrides

Prune overrides of upstream jh7110.dtsi now that the required nodes are
available through the devicetree-rebasing subtree.

Signed-off-by: E Shattow <e@freeshell.de>
5 months agoriscv: dts: starfive: add Milk-V Mars CM Lite system-on-module
E Shattow [Wed, 15 Oct 2025 10:22:53 +0000 (03:22 -0700)] 
riscv: dts: starfive: add Milk-V Mars CM Lite system-on-module

Milk-V Mars CM Lite is a System-on-Module based on the Milk-V Mars CM
without the onboard eMMC storage component populated and configured
instead for SD3.0 Card Slot on that interface via 100-pin connector.

Link to Milk-V Mars CM Lite schematics: https://github.com/milkv-mars/mars-files/tree/main/Mars-CM_Hardware_Schematices
Link to StarFive JH7110 Technical Reference Manual: https://doc-en.rvspace.org/JH7110/TRM/index.html
Link to Raspberry Pi CM4IO datasheet: https://datasheets.raspberrypi.com/cm4io/cm4io-datasheet.pdf

Add the devicetree file to make use of StarFive JH7110 common supported
features PMIC, EEPROM, UART, I2C, GPIO, PCIe, QSPI Flash, PWM, and
Ethernet. Also configure the eMMC interface mmc0 for SD Card use and
configure the common SD Card interface mmc1 for onboard SDIO BT+WiFi.

Signed-off-by: E Shattow <e@freeshell.de>
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
[ upstream commit: 4cce8b2503ab50f75a2dbc3eef2e55722836588e ]

(cherry picked from commit c7821d537e5a61e5d543588674b71fb43ec0665b)

5 months agodt-bindings: riscv: starfive: add milkv,marscm-lite
E Shattow [Wed, 15 Oct 2025 10:22:52 +0000 (03:22 -0700)] 
dt-bindings: riscv: starfive: add milkv,marscm-lite

Add "milkv,marscm-lite" as a StarFive JH7110 SoC-based system-on-module.

Signed-off-by: E Shattow <e@freeshell.de>
Acked-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
[ upstream commit: 12a29108384cfe073a4de778d5207d53b492f85e ]

(cherry picked from commit ae7213970a0c80e90fac9ff0d2aa2966655983f5)

5 months agoriscv: dts: starfive: add Milk-V Mars CM system-on-module
E Shattow [Wed, 15 Oct 2025 10:22:51 +0000 (03:22 -0700)] 
riscv: dts: starfive: add Milk-V Mars CM system-on-module

Milk-V Mars CM is a System-on-Module based on the StarFive VisionFive 2
board and Radxa CM3 System-on-Module compatible with the Raspberry Pi
CM4IO Classic IO Board.

Mars CM SoM features:

- StarFive JH7110 System on Chip with RV64GC up to 1.5GHz
- AXP15060 Power Management Unit
- LPDDR4 2GB / 4GB / 8GB DRAM memory
- BL24C04F 4K bits (512 x 8) EEPROM
- GigaDevice 25LQ128EWIG QSPI NOR Flash 16M or SoC ROM UART loader for
  boot (selectable by GPIO)
- eMMC5.0 8GB / 16GB / 32GB flash storage onboard
- AP6256 via SDIO 2.0 onboard wireless connectivity WiFi 5 + Bluetooth
  5.2 (optional, present in models with WiFi feature)
- 1x Motorcomm YT8531C Gigabit Ethernet PHY
- IMG BXE-4-32 Integrated GPU with 3D Acceleration:
  - H.264 & H.265 4K@60fps Decoding
  - H.265 1080p@30fps Encoding
  - JPEG encoder / decoder

Additional features available via 2x 100-pin connectors for CM4IO Board:
- 1x HDMI 2.0
- 1x MIPI DSI (4-lanes)
- 1x 2CH Audio out (via GPIO)
- 1x MIPI CSI (2x2-lanes or 1x4-lanes)
- 1x USB 2.0
- 1x PCIe 1-lane Host, Gen 2 (5Gbps)
- Up to 28x GPIO, supporting 3.3V
- UART x6
- PWM x8
- I2C x7
- SPI
- I2S

Link to Milk-V Mars CM schematics: https://github.com/milkv-mars/mars-files/tree/main/Mars-CM_Hardware_Schematices
Link to StarFive JH7110 Technical Reference Manual: https://doc-en.rvspace.org/JH7110/TRM/index.html
Link to Raspberry Pi CM4IO datasheet: https://datasheets.raspberrypi.com/cm4io/cm4io-datasheet.pdf

Add the devicetree file to make use of StarFive JH7110 common supported
features PMIC, EEPROM, UART, I2C, GPIO, eMMC, PCIe, QSPI Flash, PWM, and
Ethernet. Also configure the common SD Card interface mmc1 for onboard
SDIO BT+WiFi.

Signed-off-by: E Shattow <e@freeshell.de>
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
[ upstream commit: 8d193bc0aa2e802be30de331317639482735d738 ]

(cherry picked from commit 8e935d097e975e6322b63fdc8ef9894c8582bef0)

5 months agodt-bindings: riscv: starfive: add milkv,marscm-emmc
E Shattow [Wed, 15 Oct 2025 10:22:50 +0000 (03:22 -0700)] 
dt-bindings: riscv: starfive: add milkv,marscm-emmc

Add "milkv,marscm-emmc" as a StarFive JH7110 SoC-based system-on-module.

Signed-off-by: E Shattow <e@freeshell.de>
Acked-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
[ upstream commit: d1829e0b2f0619c39b0ce0b84fcbf67569108376 ]

(cherry picked from commit 4df5d2ff67fa10ad1ba5760dedf1b3cbc2037739)

5 months agoriscv: dts: starfive: add common board dtsi for Milk-V Mars CM variants
E Shattow [Wed, 15 Oct 2025 10:22:49 +0000 (03:22 -0700)] 
riscv: dts: starfive: add common board dtsi for Milk-V Mars CM variants

Add a common board dtsi for use by Milk-V Mars CM and Milk-V Mars CM Lite.

Signed-off-by: E Shattow <e@freeshell.de>
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
[ upstream commit: 651b30c58775e334c79aa3ecd44a3d98ac201db2 ]

(cherry picked from commit 034af14dcd1e6dbfa4f41a340b6d92b054604858)

5 months agoriscv: dts: starfive: jh7110-common: drop mmc post-power-on-delay-ms
E Shattow [Wed, 15 Oct 2025 10:22:48 +0000 (03:22 -0700)] 
riscv: dts: starfive: jh7110-common: drop mmc post-power-on-delay-ms

Drop post-power-on-delay-ms from mmc0 mmc1 interfaces. There is no
known reason for these properties to continue, testing appears to be fine
without them [1].

1: https://lore.kernel.org/lkml/NT0PR01MB1312E0D9EE9F158A57B77700E63D2@NT0PR01MB1312.CHNPR01.prod.partner.outlook.cn/

Signed-off-by: E Shattow <e@freeshell.de>
Tested-by: Hal Feng <hal.feng@starfivetech.com>
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
[ upstream commit: b5a861a438d1a456952665cf6167969f01209479 ]

(cherry picked from commit 9c18e97b9be437c97789c9687148f3dd3f25b809)

5 months agoriscv: dts: starfive: jh7110-common: drop no-mmc property from mmc1
E Shattow [Wed, 15 Oct 2025 10:22:47 +0000 (03:22 -0700)] 
riscv: dts: starfive: jh7110-common: drop no-mmc property from mmc1

Relax no-mmc restriction on mmc1 for jh7110 boards. The restriction is
only needed to block use of commands that would cause a device to
malfunction, which by testing and observation [1] is not any problem.

1: https://lore.kernel.org/lkml/NT0PR01MB1312E0D9EE9F158A57B77700E63D2@NT0PR01MB1312.CHNPR01.prod.partner.outlook.cn/

Signed-off-by: E Shattow <e@freeshell.de>
Tested-by: Hal Feng <hal.feng@starfivetech.com>
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
[ upstream commit: 08128670a931a4117f7b93c703d0186c67c9e1e2 ]

(cherry picked from commit cd5d4277d9515be5c10752fd8140f03c3dfec541)

5 months agoriscv: dts: starfive: jh7110: bootph-pre-ram hinting needed by boot loader
E Shattow [Wed, 15 Oct 2025 10:22:46 +0000 (03:22 -0700)] 
riscv: dts: starfive: jh7110: bootph-pre-ram hinting needed by boot loader

Add bootph-pre-ram hinting to jh7110.dtsi:
  - CPU interrupt controller(s)
  - gmac1_rgmii_rxin fixed-clock (dependency of syscrg)
  - gmac1_rmii_refin fixed-clock (dependency of syscrg)
  - oscillator
  - core local interrupt timer
  - syscrg clock-controller
  - pllclk clock-controller (dependency of syscrg)
  - DDR memory controller

Signed-off-by: E Shattow <e@freeshell.de>
Reviewed-by: Hal Feng <hal.feng@starfivetech.com>
Reviewed-by: Emil Renner Berthing <emil.renner.berthing@canonical.com>
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
[ upstream commit: 8181cc2f3f21657392da912eb20ee17514c87828 ]

(cherry picked from commit a31c1c85876bf9f15f3df14959354ab9a200ffa0)

5 months agoriscv: dts: starfive: jh7110: add DMC memory controller
E Shattow [Wed, 15 Oct 2025 10:22:45 +0000 (03:22 -0700)] 
riscv: dts: starfive: jh7110: add DMC memory controller

Add JH7110 SoC DDR external memory controller.

Signed-off-by: E Shattow <e@freeshell.de>
Reviewed-by: Hal Feng <hal.feng@starfivetech.com>
Reviewed-by: Emil Renner Berthing <emil.renner.berthing@canonical.com>
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
[ upstream commit: 7114969021ec5c4c0f3df1da3a8790f75dda92e2 ]

(cherry picked from commit 8d5c520b73b7c29b714f75e99ed48baa55fc5fa1)

5 months agoriscv: dts: starfive: jh7110-common: drop no-sdio property from mmc1
E Shattow [Wed, 15 Oct 2025 10:22:44 +0000 (03:22 -0700)] 
riscv: dts: starfive: jh7110-common: drop no-sdio property from mmc1

Relax no-sdio restriction on mmc1 for jh7110 boards. Property was
introduced for StarFive VisionFive2 dts to configure mmc1 for SD Card
but this is not necessary, the restriction is only needed to block use of
commands that would cause a device to malfunction.

Signed-off-by: E Shattow <e@freeshell.de>
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
[ upstream commit: 481ee0fcbb9a0f0706d6d29de9570d1048aff631 ]

(cherry picked from commit b4e73596622f791e3c2a2449022671e4e579fbd0)

5 months agotimer: sifive_clint: Add GHRTv2 compaible string
Jimmy Ho [Mon, 13 Oct 2025 02:24:25 +0000 (10:24 +0800)] 
timer: sifive_clint: Add GHRTv2 compaible string

The current sifive_clint driver can fully support GHRTv2 clint.
Add the compatible of GHRTv2 clint, sifive,clint2, to sifive_clint_ids
list.

Signed-off-by: Vincent Chen <vincent.chen@sifive.com>
Signed-off-by: Wayling Chen <wayling.chen@sifive.com>
Signed-off-by: Max Hsu <max.hsu@sifive.com>
Signed-off-by: Jimmy Ho <jimmy.ho@sifive.com>
5 months agogpio: tegra_gpio: convert to use set_flags
Lukasz Majewski [Fri, 3 Oct 2025 17:44:14 +0000 (20:44 +0300)] 
gpio: tegra_gpio: convert to use set_flags

Convert to use set_flags operation.

For now following flags are supported:
- GPIOD_IS_AF (i.e. "alternate function").
- GPIOD_IS_IN
- GPIOD_IS_OUT

Tested-by: Ɓukasz Majewski <lukma@nabladev.com> # Colibri T30
Signed-off-by: Lukasz Majewski <lukma@nabladev.com>
Reviewed-by: Svyatoslav Ryhel <clamor95@gmail.com>
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
5 months agovideo: tegra: Incorrect operator used
Andrew Goodbody [Wed, 1 Oct 2025 11:55:37 +0000 (12:55 +0100)] 
video: tegra: Incorrect operator used

Combining two bits into a mask requires the use of the binary 'or'
operator not the logical one. Correct it.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Acked-by: Svyatoslav Ryhel <clamor95@gmail.com>
5 months agovideo: tegra: Remove unreachable code
Andrew Goodbody [Wed, 1 Oct 2025 11:55:36 +0000 (12:55 +0100)] 
video: tegra: Remove unreachable code

The goto immediately after a return is unreachable. Remove it and its
target label as redundant.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Acked-by: Svyatoslav Ryhel <clamor95@gmail.com>
5 months agoconfigs: tegra: remove ATAGS support
Svyatoslav Ryhel [Tue, 16 Sep 2025 15:05:59 +0000 (18:05 +0300)] 
configs: tegra: remove ATAGS support

Remove support for ATAGS-based OS booting. ATAGS are used for booting
older Linux kernel versions and we are moving away from using those.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
5 months agocrypto: tegra: Tighten TEGRA_AES driver dependency
Tom Rini [Thu, 25 Sep 2025 20:45:35 +0000 (14:45 -0600)] 
crypto: tegra: Tighten TEGRA_AES driver dependency

This driver relies on tegra-specific headers to compile so make it
depend on ARCH_TEGRA.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Svyatoslav Ryhel <clamor95@gmail.com>
5 months agotimer: tegra: Bind watchdog to timer node
Lukasz Majewski [Thu, 18 Sep 2025 08:42:06 +0000 (10:42 +0200)] 
timer: tegra: Bind watchdog to timer node

Bind watchdog driver to the Tegra timer node since it uses one of the
timers to act as a watchdog and has no dedicated hardware block.

Signed-off-by: Lukasz Majewski <lukma@nabladev.com>
Reviewed-by: Svyatoslav Ryhel <clamor95@gmail.com>
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
5 months agowatchdog: Add support for Tegra watchdog timer
Lukasz Majewski [Thu, 18 Sep 2025 08:42:07 +0000 (10:42 +0200)] 
watchdog: Add support for Tegra watchdog timer

Provide support for Tegra watchdog functionality. The WATCHDOG index 0 in
conjunction with TIMER 5 is used inline with existing Linux kernel driver.

Signed-off-by: Lukasz Majewski <lukma@nabladev.com>
Reviewed-by: Svyatoslav Ryhel <clamor95@gmail.com>
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
5 months agoi2c: rcar_i2c: Add R-Car Gen5 support
Minh Le [Mon, 27 Oct 2025 16:38:04 +0000 (17:38 +0100)] 
i2c: rcar_i2c: Add R-Car Gen5 support

Add support for R-Car Gen5 SoCs into the driver.
I2C on R-Car Gen5 is treated the same as Gen3 and Gen4.

Signed-off-by: Minh Le <minh.le.aj@renesas.com>
Signed-off-by: Hai Pham <hai.pham.ud@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> # Tweak commit message
Reviewed-by: Heiko Schocher <hs@nabladev.com>
5 months agoi2c: add support for the MT7621 I2C controller
Justin Swartz [Mon, 27 Oct 2025 13:09:42 +0000 (15:09 +0200)] 
i2c: add support for the MT7621 I2C controller

This commit introduces a port of the Linux kernel's driver for the
Mediatek's MT7621 I2C controller.

The port was undertaken as the existing driver intended for Mediatek
I2C controllers (mtk_i2c.c) is not compatible with the MT7621.

To use the driver:

  1.  Ensure that the mode of the i2c pin group is
      configured for "i2c" rather than "gpio".

  2.  Delete the existing (bitbanged) i2c node from
      arch/mips/dts/mt7621.dtsi, or specify:

        /delete-node/ &i2c;

  3.  Declare:

        i2c: i2c@1e000900 {
                compatible = "mediatek,mt7621-i2c";
                reg = <0x1e000900 0x100>;

                clocks = <&clk50m>;
                clock-names = "sys_clock";

                resets = <&rstctrl RST_I2C>;
                reset-names = "i2c_reset";

                pinctrl-names = "default";
                pinctrl-0 = <&i2c_pins>;

                #address-cells = <1>;
                #size-cells = <0>;
                status = "okay";
        };

Signed-off-by: Justin Swartz <justin.swartz@risingedge.co.za>
Reviewed-by: Heiko Schocher <hs@nabladev.com>
5 months agoPrepare v2026.01-rc1 v2026.01-rc1
Tom Rini [Mon, 27 Oct 2025 22:10:23 +0000 (16:10 -0600)] 
Prepare v2026.01-rc1

Signed-off-by: Tom Rini <trini@konsulko.com>
5 months agoconfigs: Resync with savedefconfig
Tom Rini [Mon, 27 Oct 2025 15:57:45 +0000 (09:57 -0600)] 
configs: Resync with savedefconfig

Resync all defconfig files using qconfig.py

Signed-off-by: Tom Rini <trini@konsulko.com>
5 months agoMerge https://source.denx.de/u-boot/custodians/u-boot-sunxi
Tom Rini [Mon, 27 Oct 2025 15:46:51 +0000 (09:46 -0600)] 
Merge https://source.denx.de/u-boot/custodians/u-boot-sunxi

No big features this time, mostly a collection of patches that have been
lying around for a bit.  There are some DT updates, for those SoCs that
do not use OF_UPSTREAM yet, hopefully that's the last time we need to do
this exercise. And that's offset by switching over two more SoCs to
OF_UPSTREAM.  Two new boards get a defconfig, and some improvements for
the sun8i-emac Ethernet driver. Finally a patch that fixes occassional
DRAM size misdetection for new A523 boards.

There are a few outstanding patches that just wait for getting some
details confirmed, which I might send then later.

CI passed, and I tested this briefly on affected boards.

5 months agosunxi: dts: arm: update devicetree files from Linux kernel tree
Andre Przywara [Fri, 24 Oct 2025 00:30:00 +0000 (01:30 +0100)] 
sunxi: dts: arm: update devicetree files from Linux kernel tree

Sync the kernel devicetree source files for the Allwinner SoCs with
32-bit cores that do not use OF_UPSTREAM yet. The files were taken
from a v6.18-rc1 tree.

To maintain ABI compatibility with existing LTS kernels, one change
moving some IP blocks to the r_intc interrupt controller is excluded.
This effectively reverts Linux commits 994e5818392c and 9fdef3c3d8c2.

This commit also adds a new board devicetree for the A33 Vstar board,
plus one DT overlay for the OrangePi Zero interface board.

This update should not impact any existing U-Boot functionality.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
5 months agosunxi: dts: arm64: update devicetree files from Linux kernel tree
Andre Przywara [Fri, 24 Oct 2025 00:08:38 +0000 (01:08 +0100)] 
sunxi: dts: arm64: update devicetree files from Linux kernel tree

Sync the devicetree files from the official Linux kernel tree, v6.18-rc1.
This is covering Allwinner SoCs with 64-bit ARM cores.

The bulk is cosmetic changes: board model name changes, DT node renames,
whitespace fixes.
The actual changes are not dramatic: the CPU cores get their caches
described properly, some A64 video clocks get fixed, some A64 boards
describe the header pins for the WiFi module, the Pinephone adds an
alternative magnetometer used on some board revisions.
On the H5 side the microSD slots get marked as having no write-protect
detection, and the NanoPi Neo Plus2 board describes its regulators better.
The H6 boards switch from RSB to I2C for their PMIC connection.

As before, this omits the non-backwards compatible changes to the R_INTC
controller, to remain compatible with older kernels.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
5 months agosunxi: switch Allwinner A80 boards to OF_UPSTREAM
Andre Przywara [Sat, 25 Oct 2025 18:03:07 +0000 (19:03 +0100)] 
sunxi: switch Allwinner A80 boards to OF_UPSTREAM

In contrast to some other Allwinner SoCs, there is no difference between
the DTs for the Allwinner A80 SoCs (sun9i) between the U-Boot and the
Linux kernel repository.

Remove the old copies of the A80 related .dts and .dtsi files, and switch
most of sun9i boards over to use OF_UPSTREAM.

There is the Sunchip CX-A99 (family of) board(s) for which we don't have
a DT in the kernel tree. Keep the .dts file in the legacy U-Boot DT
directory, and let the board's defconfig opt out of OF_UPSTREAM.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>
5 months agosunxi: switch the Allwinner T113 SoC to OF_UPSTREAM
Andre Przywara [Sat, 25 Oct 2025 17:57:27 +0000 (18:57 +0100)] 
sunxi: switch the Allwinner T113 SoC to OF_UPSTREAM

In contrast to some other Allwinner SoCs, there is no difference between
the DTs for the Allwinner T113-s3 SoC (sun20i) between the U-Boot and the
Linux kernel repository.

Remove the old copies of the T113-s3 related .dts and .dtsi files, and
switch the whole SoC (represented by just one board) over to use
OF_UPSTREAM.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>
5 months agonet: sun8i-emac: Add support for active-low leds with internal PHY
Paul Kocialkowski [Tue, 5 Aug 2025 17:48:27 +0000 (19:48 +0200)] 
net: sun8i-emac: Add support for active-low leds with internal PHY

A device-tree property is already defined to indicate that the internal
PHY should be used with active-low leds, which corresponds to a
specific bit in the dedicated syscon register.

Add support for setting this bit when the property is present.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
5 months agonet: sun8i-emac: Remove internal PHY config default value
Paul Kocialkowski [Tue, 5 Aug 2025 17:48:26 +0000 (19:48 +0200)] 
net: sun8i-emac: Remove internal PHY config default value

We know about all the relevant fields in the syscon register so there
is no reason to read it first and modify it.

Build the register from scratch instead, with all relevant fields set.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
5 months agosunxi: add support for NetCube Systems Kumquat
Lukas Schmid [Tue, 10 Jun 2025 05:38:55 +0000 (07:38 +0200)] 
sunxi: add support for NetCube Systems Kumquat

NetCube Systems Kumquat is a board based on the Allwinner V3s SoC,
including:

- 64MB DDR2 included in SoC
- 10/100 Mbps Ethernet
- USB-C DRD
- Audio Codec
- Isolated CAN-FD
- ESP32 over SDIO
- 8MB SPI-NOR Flash for bootloader
- I2C EEPROM for MAC addresses
- SDIO Connector for eMMC or SD-Card
- 8x 12/24V IOs, 4x normally open relays
- DS3232 RTC with Battery Backup
- QWIIC connectors for external I2C devices

Signed-off-by: Lukas Schmid <lukas.schmid@netcube.li>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
5 months agoMakefile: pass KEYDIR when set to sunxi-spl.bin mkimage
James Hilliard [Fri, 11 Apr 2025 01:10:25 +0000 (19:10 -0600)] 
Makefile: pass KEYDIR when set to sunxi-spl.bin mkimage

Currently we pass this for u-boot-spl.kwb targets, however when
building sunxi-spl.bin in the TOC0 format we may also need to
specify a KEYDIR, as such we should also pass this when set
to mkimage for the sunxi-spl.bin target.

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
5 months agosunxi: a523: Re-use H6/H616 DRAM size detection method
Andre Przywara [Mon, 20 Oct 2025 14:26:22 +0000 (15:26 +0100)] 
sunxi: a523: Re-use H6/H616 DRAM size detection method

The H6 and H616 DRAM initialisation code recently gained a joint and
improved size detection routine, which helped to avoid the occasional
DRAM size misdetection.

Use the same code for the A523 DRAM initialisation as well, which
suffers from the same misdetection at times.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Tested-by: Chen-Yu Tsai <wens@kernel.org>
5 months agosunxi: a523: Add OrangePi 4A defconfig
Chen-Yu Tsai [Mon, 20 Oct 2025 16:19:30 +0000 (00:19 +0800)] 
sunxi: a523: Add OrangePi 4A defconfig

The OrangePi 4A is a typical Raspberry Pi model B sized development
board from Xunlong designed around an Allwinner T527 SoC.

The board has the following features:
- Allwinner T527 SoC
- AXP717B + AXP323 PMICs
- Up to 4GB LPDDR4 DRAM
- micro SD slot
- optional eMMC module
- M.2 slot for PCIe 2.0 x1
- 16 MB SPI-NOR flash
- 4x USB 2.0 type-A ports (one can be used in gadget mode)
- 1x Gigabit ethernet w/ Motorcomm PHY (through yet to be supported GMAC200)
- 3.5mm audio jack via internal audio codec
- HDMI 2.0 output
- eDP, MIPI CSI (2-lane and 4-lane) and MIPI DSI (4-lane) connectors
- USB type-C port purely for power
- AP6256 (Broadcom BCM4345) WiFi 5.0 + BT 5.0
- unsoldered headers for ADC and an additional USB 2.0 host port
- 40-pin GPIO header

Add defconfig for it.

Signed-off-by: Chen-Yu Tsai <wens@kernel.org>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
5 months agoMerge tag 'efi-2026-01-rc1-2' of https://source.denx.de/u-boot/custodians/u-boot-efi
Tom Rini [Sun, 26 Oct 2025 13:51:18 +0000 (07:51 -0600)] 
Merge tag 'efi-2026-01-rc1-2' of https://source.denx.de/u-boot/custodians/u-boot-efi

Pull request efi-2026-01-rc1-2

CI:

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

Documentation:

* develop: virtio: Fix qemu example (true/false -> on/off)
* separate read and write command documentation
* usage: Add general rule for `$?`
* askenv: Reword and remove return value
* seama: Reword return value section
* usage: Use glob for all commands
* Fix typos and formatting

UEFI:

* console: support editable input fields

5 months agodoc/usage: Add a reference to General rules for commands
Tom Rini [Fri, 24 Oct 2025 17:22:09 +0000 (11:22 -0600)] 
doc/usage: Add a reference to General rules for commands

For clarity, add a reference link to the start of the section on command
documentation that all commands follow some general rules.

Signed-off-by: Tom Rini <trini@konsulko.com>
5 months agodoc: usage: Use glob for all commands
Tom Rini [Fri, 24 Oct 2025 17:22:08 +0000 (11:22 -0600)] 
doc: usage: Use glob for all commands

Make use of the glob syntax to automatically include all command
documents.

Signed-off-by: Tom Rini <trini@konsulko.com>
5 months agodoc: seama: Reword return value section
Tom Rini [Fri, 24 Oct 2025 16:02:59 +0000 (10:02 -0600)] 
doc: seama: Reword return value section

With the addition of general text about how the return value is handled,
reference that while retaining the additional information about setting
$seama_image_size

Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
5 months agodoc: askenv: Reword and remove return value
Tom Rini [Fri, 24 Oct 2025 16:02:58 +0000 (10:02 -0600)] 
doc: askenv: Reword and remove return value

With the addition of general text about how the return value is handled,
remove the examples from the askenv documentation as they are all normal
expected results.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
5 months agodoc: usage: Add general rule for `$?`
Tom Rini [Fri, 24 Oct 2025 16:02:57 +0000 (10:02 -0600)] 
doc: usage: Add general rule for `$?`

For nearly all commands in U-Boot the '?' variable is handled the same
way with 0 meaning success, 1 meaning any failure.  Explain this in the
general rules section of the cmdline documentation (with a link to a
counter example) and then remove the redundant wording from most
commands. We retain a section about the return value in a number of
places where we are doing something such as always returning a specific
value or we have useful additional information to go along with the
normal return codes.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
5 months agodoc: develop: virtio: Fix qemu example (true/false -> on/off)
Wolfgang Wallner [Fri, 24 Oct 2025 15:12:05 +0000 (17:12 +0200)] 
doc: develop: virtio: Fix qemu example (true/false -> on/off)

The given qemu examples use true/false, while qemu actually on/off.

Signed-off-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
5 months agodoc: Fix whitespace in devicetree example in overlay-fdt-boot.rst
Wolfgang Wallner [Fri, 24 Oct 2025 15:12:04 +0000 (17:12 +0200)] 
doc: Fix whitespace in devicetree example in overlay-fdt-boot.rst

Fix the whitespace and add a missing quotation mark
(default = "foo-reva.dtb") in overlay-fdt-boot.rst.

Signed-off-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
5 months agoboot: Fix typo
Wolfgang Wallner [Fri, 24 Oct 2025 15:12:03 +0000 (17:12 +0200)] 
boot: Fix typo

Fix a typo in image-fit.c.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
5 months agobootm: Fix typo in bootm.h
Wolfgang Wallner [Fri, 24 Oct 2025 15:12:02 +0000 (17:12 +0200)] 
bootm: Fix typo in bootm.h

Fix a typo in include/bootm.h.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
5 months agoimage: Fix typos in image.h
Wolfgang Wallner [Fri, 24 Oct 2025 15:12:01 +0000 (17:12 +0200)] 
image: Fix typos in image.h

Fix some typos in include/image.h.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
5 months agoboot: kconfig: Fix typos
Wolfgang Wallner [Fri, 24 Oct 2025 15:12:00 +0000 (17:12 +0200)] 
boot: kconfig: Fix typos

Fix typos in boot/Kconfig.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
5 months agodoc: Fix typos
Wolfgang Wallner [Fri, 24 Oct 2025 15:11:59 +0000 (17:11 +0200)] 
doc: Fix typos

Fix typos/wording in various files in doc/.

Signed-off-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
Reviewed-by: E Shattow <e@freeshell.de>
5 months agodoc: develop: Change formatting to make binman doc more readable
Wolfgang Wallner [Fri, 24 Oct 2025 15:11:58 +0000 (17:11 +0200)] 
doc: develop: Change formatting to make binman doc more readable

Change the formatting of binman.rst so that the compiled HTML output
becomes more readable. Changes include enumerations and the escaping of
arguments starting with a double dash (e.g. --debug).

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
5 months agodoc: develop: Fix typos in binman/binman.rst
Wolfgang Wallner [Fri, 24 Oct 2025 15:11:57 +0000 (17:11 +0200)] 
doc: develop: Fix typos in binman/binman.rst

Fix some typos in binman.rst.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
5 months agoefi_loader: efi_console: support editable input fields
Casey Connolly [Thu, 23 Oct 2025 14:26:46 +0000 (16:26 +0200)] 
efi_loader: efi_console: support editable input fields

When editing eficonfig "optional data" (typically cmdline arguments)
it's useful to be able to edit the string rather than having to re-type
the entire thing. Implement support for editing buffers to make this a
whole lot nicer. Specifically, add support for moving the cursor with
the arrow keys and End key as well as deleting backwards with the delete
key.

Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Tested-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
5 months agodoc: separate read and write command documentation
Heinrich Schuchardt [Sat, 18 Oct 2025 11:07:44 +0000 (13:07 +0200)] 
doc: separate read and write command documentation

* Avoid two step navigation to get to the description of the write command.
* Add missing index entries
* Correct formatting of the examples.
* Describe configuration and return value.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
5 months agoMerge patch series "firmware: scmi: Support SCMI LMM/CPU protocol for i.MX95"
Tom Rini [Fri, 24 Oct 2025 18:09:02 +0000 (12:09 -0600)] 
Merge patch series "firmware: scmi: Support SCMI LMM/CPU protocol for i.MX95"

Peng Fan (OSS) <peng.fan@oss.nxp.com> says:

i.MX95 System Manager(SM) implements Logical Machine Management(LMM) and
CPU protocol to manage Logical Machine(LM) and CPUs(eg, M7).

To manage M7 in a separate LM or in same LM as U-Boot/Linux itself. LMM
APIs and CPU APIs are needed.

When M7 is in LM 'lm-m7', and this LM is managable by 'uboot-lm', U-Boot
could use LMM_BOOT, LMM_SHUTDOWN and etc to manage 'lm-m7'.

If in same LM, use CPU_START, CPU_STOP, CPU_RESET_VECTOR_SET and etc to
manage M7.

Both LMM/CPU APIs will be used by remoteproc driver.

The documentation could be found in Linux Kernel:
drivers/firmware/arm_scmi/vendors/imx/imx95.rst

Link: https://lore.kernel.org/r/20251017-scmi-lmm-v1-0-9fd41e7a5ac0@nxp.com
5 months agobootstd: make it possible to use tftp for netboot with standardboot
Benjamin Hahn [Tue, 21 Oct 2025 14:34:17 +0000 (16:34 +0200)] 
bootstd: make it possible to use tftp for netboot with standardboot

Add the option to load the bootscript with the tftp command (static IP)
instead of the dhcp command (dynamic IP). For this a new function
tftpb_run similar to dhcp_run, is needed. The selection of which command
to use can be done with the ip_dyn environment variable, which can be
set to yes or no. The ip_dyn variable was chosen as it is already in use
on the imx platforms.
Also edit the bootstd doc.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Benjamin Hahn <B.Hahn@phytec.de>
5 months agofirmware: scmi: Add i.MX95 SCMI CPU Protocol
Peng Fan [Fri, 17 Oct 2025 09:32:34 +0000 (17:32 +0800)] 
firmware: scmi: Add i.MX95 SCMI CPU Protocol

This protocol allows an agent to start, stop a CPU or set reset vector.
It is used to manage auxiliary CPUs in an LM (e.g. additional cores in an
AP cluster).

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Alice Guo <alice.guo@nxp.com>
5 months agophy: ti: phy-j721e-wiz: Allow reinitialization when SERDES is pre-configured
Hrushikesh Salunke [Fri, 17 Oct 2025 05:25:19 +0000 (10:55 +0530)] 
phy: ti: phy-j721e-wiz: Allow reinitialization when SERDES is pre-configured

Move the SERDES configuration check after clock and reset initialization
and change it from a hard failure to a skip of WIZ initialization. This
allows the driver to probe successfully when the SERDES has been
pre-configured by a previous boot stage (e.g., ROM or SPL).

This approach aligns with how the Linux kernel handles pre-configured
SERDES, where the driver gracefully skips reinitialization rather than
failing to probe.

Signed-off-by: Hrushikesh Salunke <h-salunke@ti.com>
5 months agofirmware: scmi: Add i.MX95 SCMI LMM protocol driver
Peng Fan [Fri, 17 Oct 2025 09:32:33 +0000 (17:32 +0800)] 
firmware: scmi: Add i.MX95 SCMI LMM protocol driver

Add Logical Machine Management(LMM) protocol which is intended for boot,
shutdown, and reset of other logical machines (LM). It is usually used to
allow one LM to manager another used as an offload or accelerator engine.

Following Linux Kernel, created a separate folder for holding vendor
protocol drivers.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Alice Guo <alice.guo@nxp.com>
5 months agoarm: armv8: Make save_boot_params simpler
Ilias Apalodimas [Thu, 16 Oct 2025 13:27:43 +0000 (16:27 +0300)] 
arm: armv8: Make save_boot_params simpler

The idiom used in save_boot_params is common for armv7.
In armv8 is much easier to do the same thing with adr/adrp.

So let's simplify the code a bit.

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
5 months agofirmware: scmi: Support probe vendor ID 0x80 and 0x82
Peng Fan [Fri, 17 Oct 2025 09:32:32 +0000 (17:32 +0800)] 
firmware: scmi: Support probe vendor ID 0x80 and 0x82

Preparing to add i.MX LMM and CPU protocol driver, support probe SCMI
vendor ID 0x80(i.MX SCMI LMM ID) and 0x82(i.MX SCMI CPU ID). And use
Kconfig option to support conditional compilation.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Alice Guo <alice.guo@nxp.com>
5 months agoenv: fat, ubi: Fix gd->env_valid for the first write
Tom Rini [Tue, 21 Oct 2025 20:37:01 +0000 (14:37 -0600)] 
env: fat, ubi: Fix gd->env_valid for the first write

As resolved and explained in detail in commit e589d5822cac ("env: spi:
Fix gd->env_valid for the first write") and archived discussion there is
a corner case where we don't do the right thing with redundant
environments. This same exact check was present in the mmc code and
resolved with commit 813a0df27a8a ("env: Invert gd->env_valid for
env_mmc_save") and in the discussion of that patch, I noted that both
fat and ubi (and at the time, sf) were doing the same thing. Take the
time now to correct fat and ubi environment.

Signed-off-by: Tom Rini <trini@konsulko.com>
5 months agofirmware: scmi: Cleanup the SCMI MISC ID
Peng Fan [Fri, 17 Oct 2025 09:32:31 +0000 (17:32 +0800)] 
firmware: scmi: Cleanup the SCMI MISC ID

SCMI_IMX_PROTOCOL_ID_MISC was never used, so drop it. And move
SCMI_PROTOCOL_ID_IMX_MISC out of enum scmi_std_protocol to
scmi_nxp_protocols.h, because it is i.MX specific and following Linux
Kernel style, use macro definition.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Alice Guo <alice.guo@nxp.com>
5 months agofirmware: scmi: Conditionally compile protocol support
Peng Fan [Fri, 17 Oct 2025 09:32:30 +0000 (17:32 +0800)] 
firmware: scmi: Conditionally compile protocol support

Add conditional compilation for SCMI protocol support in scmi_get_protocol()
and scmi_add_protocol() based on corresponding Kconfig options. This ensures
that only the enabled protocols are compiled and accessed, and reducing binary
size.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Alice Guo <alice.guo@nxp.com>
5 months agomakefile: Fix recursive makes
Ilias Apalodimas [Wed, 22 Oct 2025 12:23:15 +0000 (15:23 +0300)] 
makefile: Fix recursive makes

Since the Kbuild bump to 5.1 and specifically
commit af1a9935708a ("kbuild: make -r/-R effective in top Makefile for old Make versions")
the recursion rules have changed.

'make O=/output/dir/' as well as './test/py/test.py --bd sandbox --build'
is working fine but anything that recursively called the makefile was
failing e.g 'make tests', 'make qcheck' etc, which calls a bash script
that ends up calling the makefile again.

The reason is that the internal 'sub_make_done' variable of the makefile
was set after the first pass and the output dir was never evaluated
properly.  Reset the variable value if we are executing any of these
tests.

Fixes: af1a9935708a ("kbuild: make -r/-R effective in top Makefile for old Make versions")
Reported-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Test-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
5 months agoMerge patch series "boot: Support priority for global bootmeths"
Tom Rini [Wed, 22 Oct 2025 20:17:16 +0000 (14:17 -0600)] 
Merge patch series "boot: Support priority for global bootmeths"

Simon Glass <sjg@chromium.org> says:

At present global bootmeths always run first, before all other
bootmeths. Optimisations in the code take advantage of this, putting
them at the end, so they can be used once and then forgotten.

In some cases it is useful to run global bootmeths later in the boot.
For example, the EFI-bootmgr bootmeth may itself scan devices and the
network, so running it first can hold up the boot significantly for
boards not actually relying on EFI-bootmgr to boot.

This series introduces a new field in global bootmeths which indicates
the priority, using the same scheme as is used with bootdev hunters.
Thus it is possible to insert the EFI-bootmgr bootmeth just before the
hunter for network bootdevs is invoked.

Despite the simplicity of the concept and the relatively small series,
this is a fairly significant enhancement. It is also quite tricky to
implement, largely due to the way the original code was written, with
global bootmeths being a small, size-optimised add-on to the original
bootstd implementation.

For now we only allow each global bootmeth to run at most once, but this
implementation is written in a way that we could relax that if needed.
Then the bootmeth itself could decide whether to run at any particular
point in the bootflow iteration.

Link: https://lore.kernel.org/r/20251015154423.908468-1-sjg@chromium.org
5 months agoboot: Run the EFI bootmgr just before network devices
Simon Glass [Wed, 15 Oct 2025 15:44:14 +0000 (16:44 +0100)] 
boot: Run the EFI bootmgr just before network devices

At present the EFI bootmgr scans all devices in the system before
deciding which one to boot. Ideally it would use the bootstd iterator
for this, but in the meantime, give it a lower priority, so it runs
just before the network devices.

Note that if there are no hunted network devices hunted, then it will
run at the end, after all bootdevs are exhausted. In other words, it
will always run.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 months agoboot: Run global bootmeths after all bootdevs are exhausted
Simon Glass [Wed, 15 Oct 2025 15:44:13 +0000 (16:44 +0100)] 
boot: Run global bootmeths after all bootdevs are exhausted

When there are no more bootdevs we should still go through the global
bootmeths, since some may not have yet been used, if their priority has
not yet come up.

Add a final check for this at the end of the iterator.

Update the documentation to match the new behaviour of global bootmeths.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 months agoboot: Don't change the method count after global bootmeths
Simon Glass [Wed, 15 Oct 2025 15:44:12 +0000 (16:44 +0100)] 
boot: Don't change the method count after global bootmeths

At present before scanning global bootmeths, the iterator sets the
method count to the index of the first global bootmeth. Now that we
support scanning the global bootmeths multiple times, we must leave this
count alone.

Check against have_global and first_glob_method instead.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 months agoboot: Implement a priority for global bootmeths
Simon Glass [Wed, 15 Oct 2025 15:44:11 +0000 (16:44 +0100)] 
boot: Implement a priority for global bootmeths

Allow bootmeths to select when they want to run, using the bootdev
priority. Provide a new bootmeth_glob_allowed() function which checks if
a bootmeth is ready to use.

Fix a comment in bootflow_system() which is a test for global bootmeths.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 months agoboot: Only run global bootmeths once each
Simon Glass [Wed, 15 Oct 2025 15:44:10 +0000 (16:44 +0100)] 
boot: Only run global bootmeths once each

Use the methods_done flags to make sure that each global bootmeth is
only used once. For now this has no effect, since they are all processed
at the start.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 months agoboot: Support rescanning the global bootmeths
Simon Glass [Wed, 15 Oct 2025 15:44:09 +0000 (16:44 +0100)] 
boot: Support rescanning the global bootmeths

Add the logic to scan through the global bootmeths for every new
bootdev, in preparation for allowing global bootmeths to select where in
the hunter ordering they go.

Use a new bootmeth_glob_allowed() function to check if a bootmeth is
allowed, ensuring that each can run at most once.

For now this has no actual effect, since the global bootmeths are
unconditionally processed at the start, with iter->methods_done being
updated to include all of them. Therefore when scanning again, no
unprocessed global bootmeths will be found.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 months agoboot: Keep track of which bootmeths have been used
Simon Glass [Wed, 15 Oct 2025 15:44:08 +0000 (16:44 +0100)] 
boot: Keep track of which bootmeths have been used

Add a bitfield which tracks when bootmeths have been used. This will be
needed when global bootmeths can be used later in the iteration.

Fix a missing bootflow_free() while here.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 months agoboot: Add a flag for whether there are global bootmeths
Simon Glass [Wed, 15 Oct 2025 15:44:07 +0000 (16:44 +0100)] 
boot: Add a flag for whether there are global bootmeths

The current 'doing_global' refers to being in the state of processing
global bootmeths. Since global bootmeths are currently used once at the
start, it becomes false once the last global bootmeth has been used.

In preparation for allowing bootmeths to run at other points in the
bootstd interation, add a new 'have_global' flag which tracks whether
there are any global bootmeths in the method_order[] list. It is set up
when iteration starts. Unlike doing_global which resets back to false
after the global bootmeths have been handled, once have_global is set to
true, it remains true for the entire iteration process. This provides a
quick check as to whether global-bootmeth processing is needed.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 months agoboot: Update first_glob_method when dropping a bootmeth
Simon Glass [Wed, 15 Oct 2025 15:44:06 +0000 (16:44 +0100)] 
boot: Update first_glob_method when dropping a bootmeth

For now we only support dropping non-global bootmeths from the
iteration. Update first_glob_method in that case and add a few checks
that things are correct.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 months agoboot: Add a new test for global bootmeths
Simon Glass [Wed, 15 Oct 2025 15:44:05 +0000 (16:44 +0100)] 
boot: Add a new test for global bootmeths

These have different behaviour from normal bootmeths and we are about to
enhance it. So add a test and also an extra check in bootflow_iter()

Signed-off-by: Simon Glass <sjg@chromium.org>
5 months agoboot: Try all bootmeths on the final partition
Simon Glass [Wed, 15 Oct 2025 15:44:04 +0000 (16:44 +0100)] 
boot: Try all bootmeths on the final partition

At present, normally when one bootmeth fails on a partition, we move on
and try the next bootmeth. However, this was not the case for the final
partition due to a bug. Rework the logic so that all partitions are
treated the same.

Signed-off-by: Simon Glass <sjg@chromium.org>
5 months agoMerge patch series "Add support for dynamic MMU configuration"
Tom Rini [Wed, 22 Oct 2025 18:23:48 +0000 (12:23 -0600)] 
Merge patch series "Add support for dynamic MMU configuration"

Anshul Dalal <anshuld@ti.com> says:

In U-Boot, TI only provides a single memory map for all k3 platforms, this
does not scale for devices where atf and optee lie outside the range 0x80000000
- 0x80080000 and 0x9e780000 - 0xa0000000 respectively.

There are also issues for devices with < 2GiB of memory (eg am62SiP with 512MiB
of RAM) as the maximum size for the first DRAM bank is hardcoded to 2GiB in the
current memory map. Furthermore the second DRAM bank is mapped even for devices
that only have a single bank.

Therefore this patch set adds the required functionality to create the MMU table
at runtime based on the device-tree.

The patch set has been build tested on all effected platforms but boot-tested
only on TI's K3 EVMs, the beagleplay and phytec's phycore-am6* platforms.

The following effected boards have not been boot tested:
 - verdin-am62
 - iot2050

Link: https://lore.kernel.org/r/20251017131540.3636067-1-anshuld@ti.com
5 months agoarm: mach-k3: reserve space for page table entries
Anshul Dalal [Fri, 17 Oct 2025 13:15:33 +0000 (18:45 +0530)] 
arm: mach-k3: reserve space for page table entries

With the memory map configuration being done dynamically, reserve extra
space during U-Boot relocation to ensure we have enough for the fixups.

Reviewed-by: Dhruva Gole <d-gole@ti.com>
Signed-off-by: Anshul Dalal <anshuld@ti.com>
5 months agomach-k3: add carveouts for TFA and optee
Anshul Dalal [Fri, 17 Oct 2025 13:15:32 +0000 (18:45 +0530)] 
mach-k3: add carveouts for TFA and optee

K3 platforms have reserved memory regions for TFA and OPTEE which should
be unmapped for U-Boot. While other "no-map" memory regions like the
memory pools for remote cores should not be unmapped to allow U-Boot to
load firmware during remoteproc.

Therefore this patch adds the necessary fdt fixups to properly set the
load address for TFA/OPTEE and unmaps both by mmu_unmap_reserved_mem.

Reviewed-by: Dhruva Gole <d-gole@ti.com>
Signed-off-by: Anshul Dalal <anshuld@ti.com>
Tested-by: Wadim Egorov <w.egorov@phytec.de>
5 months agomach-k3: add reserved memory fixups for next boot stage
Anshul Dalal [Fri, 17 Oct 2025 13:15:31 +0000 (18:45 +0530)] 
mach-k3: add reserved memory fixups for next boot stage

The boot flow in K3 platforms requires the subsequent boot stages to be
aware of the memory reserved for previous boot binaries. In the regular
boot sequence of:

R5 SPL -> ATF -> OP-TEE -> A-core SPL -> U-Boot -> Kernel,

Both A-core SPL and U-Boot should be made aware of the memory reserved
for ATF and OP-TEE from their device-tree. Currently this information is
absent.

Therefore this patch adds the reserved-memory regions as part of
spl_perform_arch_fixups for the next stage's DT. This is called during
both R5 and A-core SPL which fixes up the DT for their respective next
stages: A-core SPL and U-Boot proper.

Reviewed-by: Dhruva Gole <d-gole@ti.com>
Signed-off-by: Anshul Dalal <anshuld@ti.com>
Tested-by: Wadim Egorov <w.egorov@phytec.de>
5 months agospl: split spl_board_fixups to arch/board specific
Anshul Dalal [Fri, 17 Oct 2025 13:15:30 +0000 (18:45 +0530)] 
spl: split spl_board_fixups to arch/board specific

The current spl_board_fixups API allows for modification of spl_image
before the SPL jumps to it. This can be used to modify the DT for the
next boot stage, however the current API only allows either the machine
arch or the board to use it.

This limits the utility of the API as there might be certain fixups that
should be applied to all boards sharing the same machine architecture
with others being board specific.

For TI's K3 specifically, this prevents us from performing architecture
level fixups since a lot of TI boards are already making use of the
spl_board_fixups API.

Therefore this patch splits the API into two to allow both board and the
architecture specific fixups. The order is kept as arch then board to
give board specific fixups the precedence.

Reviewed-by: Dhruva Gole <d-gole@ti.com>
Signed-off-by: Anshul Dalal <anshuld@ti.com>
Tested-by: Wadim Egorov <w.egorov@phytec.de>
5 months agoarm: armv8: mmu: add mmu_unmap_reserved_mem
Anshul Dalal [Fri, 17 Oct 2025 13:15:29 +0000 (18:45 +0530)] 
arm: armv8: mmu: add mmu_unmap_reserved_mem

For armv8, U-Boot uses a static map defined as 'mem_map' for configuring
the MMU's page tables, done by mmu_setup.

Though this works well for simpler platforms, it makes creating runtime
carveouts by modifying the static array at runtime exceedingly complex
like in mach-snapdragon/board.c.

Creation of such carveouts are much better handled by APIs such as
mmu_change_region_attr once the page tables are configured. Usually such
carveouts are configured via the device-tree's reserved-memory node
which provides the address and size for the carveout.

Therefore this patch adds mmu_unmap_reserved_mem which acts as a wrapper
over mmu_change_region_attr, helping unmap a reserved-memory region.

Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Anshul Dalal <anshuld@ti.com>
Tested-by: Wadim Egorov <w.egorov@phytec.de>
5 months agomach-k3: map all banks using mem_map_from_dram_banks
Anshul Dalal [Fri, 17 Oct 2025 13:15:28 +0000 (18:45 +0530)] 
mach-k3: map all banks using mem_map_from_dram_banks

The static memory map for K3 (k3_mem_map) only maps the first DRAM bank
and therefore doesn't scale for platforms with multiple memory banks.

This patch modifies enable_caches to add mem_map_from_dram_banks which
appends all the memory banks to k3_mem_map before calling mmu_setup.

Signed-off-by: Anshul Dalal <anshuld@ti.com>
Tested-by: Wadim Egorov <w.egorov@phytec.de>
5 months agoarm: armv8: mmu: add mem_map_from_dram_banks
Anshul Dalal [Fri, 17 Oct 2025 13:15:27 +0000 (18:45 +0530)] 
arm: armv8: mmu: add mem_map_from_dram_banks

For armv8, U-Boot uses a static map defined as 'mem_map' for configuring
the MMU as part of mmu_setup.

But since the exact configuration of memory banks might not be known at
build time, many platforms such as imx9, versal2 etc. utilize
gd->bd->bi_dram to configure the static map at runtime.

Therefore this patch adds a new API mem_map_from_dram_banks that
modifies the static map in a similar way. Allowing the caller to map all
dram banks by just passing the index to last entry in their mem_map and
it's length.

Reviewed-by: Dhruva Gole <d-gole@ti.com>
Signed-off-by: Anshul Dalal <anshuld@ti.com>
Tested-by: Wadim Egorov <w.egorov@phytec.de>
5 months agoarm: armv8: invalidate dcache entries on dcache_enable
Anshul Dalal [Fri, 17 Oct 2025 13:15:26 +0000 (18:45 +0530)] 
arm: armv8: invalidate dcache entries on dcache_enable

In dcache_enable, currently the dcache entries are only invalidated when
the MMU is not enabled. This causes issues when dcache_enable is called
with the MMU already configured, in such cases the existing dcache
entries are not flushed which might result in un-expected behavior.

This patch invalidates the cache entries on every call of dcache_enable
before enabling dcache (by setting CR_C). This makes dcache_enable
behave similar to icache_enable as well.

Reviewed-by: Dhruva Gole <d-gole@ti.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Anshul Dalal <anshuld@ti.com>
Tested-by: Wadim Egorov <w.egorov@phytec.de>
5 months agoarm: armv8: mmu: export mmu_setup
Anshul Dalal [Fri, 17 Oct 2025 13:15:25 +0000 (18:45 +0530)] 
arm: armv8: mmu: export mmu_setup

The mmu_setup function configures the page tables based on the board
supplied mem_map struct array. It is called implicitly as part of
dcache_enable but this limits us to only be able to use APIs such as
mmu_change_region_attr only after caches are enabled.

This might lead to speculative accesses before we can unmap a region
that is marked as cacheable in the static memory map.

Therefore this patch exports the mmu_setup function in mmu.h allowing
users to have more control over when the mmu is configured.

For K3 specifically this allows for the following configuration sequence
as part of enable_caches:

static mem_map fixups (TODO) -> mmu_setup -> carveouts using
mmu_change_region_attr (TODO) -> icache/dcache enable

Reviewed-by: Dhruva Gole <d-gole@ti.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Anshul Dalal <anshuld@ti.com>
Tested-by: Wadim Egorov <w.egorov@phytec.de>
5 months agomach-k3: use custom enable_cache
Anshul Dalal [Fri, 17 Oct 2025 13:15:24 +0000 (18:45 +0530)] 
mach-k3: use custom enable_cache

U-Boot's provided enable_caches enforces the following sequence:
icache_enable -> mmu_setup (as part of dcache_enable) -> dcache_enable

Whereas for K3 devices, we would like to add entries to the provided
static array (k3_mem_map) as per gd->bd->bi_dram and then call mmu_setup
to configure the MMU but also create carveouts for TFA/TEE before we
enable caches to prevent speculative accesses to the region. Thus the
following desired sequence:

add dram banks -> mmu_setup -> carveout TFA/TEE -> icache/dcache enable

Therefore this patch adds K3's own implementation of enable_cache for
ARM64, allowing for greater control over the cache enablement sequence.

Reviewed-by: Dhruva Gole <d-gole@ti.com>
Signed-off-by: Anshul Dalal <anshuld@ti.com>
Tested-by: Wadim Egorov <w.egorov@phytec.de>
5 months agomach-k3: use minimal memory map for all K3
Anshul Dalal [Fri, 17 Oct 2025 13:15:23 +0000 (18:45 +0530)] 
mach-k3: use minimal memory map for all K3

The K3 family of SoCs encompasses a wide variety of devices with varying
DDR configurations and memory carveout requirements, the current static
memory map provides basic support for TI EVMs but does not scale well
for newer platforms (such as AM62SiP with 512MiB of RAM).

Therefore this patch replaces the existing memory map with a minimal
one, that could be more easily modified at runtime.

Reviewed-by: Dhruva Gole <d-gole@ti.com>
Signed-off-by: Anshul Dalal <anshuld@ti.com>
Tested-by: Wadim Egorov <w.egorov@phytec.de>
5 months agoMerge tag 'net-20251022' of https://source.denx.de/u-boot/custodians/u-boot-net
Tom Rini [Wed, 22 Oct 2025 15:07:56 +0000 (09:07 -0600)] 
Merge tag 'net-20251022' of https://source.denx.de/u-boot/custodians/u-boot-net

Pull request net-20251022

net:
- airoha: improvements
- Tighten a few more driver dependencies
- designware: fix bitbang init error
- phy: Make driver overloading get_phy_id depend on !COMPILE_TEST
- phy: add paged PHY register accessors
- make dhcp_run() common for NET and NET_LWIP
- dwc_eth_ops: Correct check for FDT_64BIT
- mediatek: mt7988: various fixup + MDIO detach
- phy: aquantia: switch to use phy_get_ofnode(), fix bindings typo

net-legacy:
- bootp: Prevent buffer overflow to avoid leaking the RAM content
- tftp: make TFTP ports unconditionally configurable

misc:
- uthreads: Make use of CONFIG_IS_ENABLED consistently