]> git.ipfire.org Git - thirdparty/u-boot.git/log
thirdparty/u-boot.git
7 weeks agoMerge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-riscv
Tom Rini [Wed, 29 Oct 2025 13:40:40 +0000 (07:40 -0600)] 
Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-riscv

CI: https://source.denx.de/u-boot/custodians/u-boot-riscv/-/pipelines/28051

- riscv: dts: starfive: cherry-pick jh7110 updates from v6.18-rc1-dts
- riscv: Add upstream boards Milk-V Mars CM and Mars CM Lite
- timer: sifive_clint: Add GHRTv2 compaible string

7 weeks agoMerge branch 'master' of git://source.denx.de/u-boot-usb
Tom Rini [Wed, 29 Oct 2025 01:43:19 +0000 (19:43 -0600)] 
Merge branch 'master' of git://source.denx.de/u-boot-usb

- Fix assorted issues found by Smatch

7 weeks agoMerge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sh
Tom Rini [Wed, 29 Oct 2025 01:43:02 +0000 (19:43 -0600)] 
Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sh

7 weeks agoMAINTAINERS: update my email address
Raymond Mao [Tue, 28 Oct 2025 20:26:17 +0000 (13:26 -0700)] 
MAINTAINERS: update my email address

Update my email address in the maintainers list.

Signed-off-by: Raymond Mao <raymondmaoca@gmail.com>
7 weeks agoRevert "clk: Return value calculated by ERR_PTR"
Tom Rini [Tue, 28 Oct 2025 19:24:44 +0000 (13:24 -0600)] 
Revert "clk: Return value calculated by ERR_PTR"

This reverts commit 644b4650ee57c429bede77f44752cc867dac0e00.

While the intention of the above commit is correct, it leads to test
failures in CI that need to be addressed at the same time.

Signed-off-by: Tom Rini <trini@konsulko.com>
7 weeks agospi: altera_spi: Add missing <time.h> to altera_spi.c
Tom Rini [Mon, 4 Aug 2025 21:57:18 +0000 (15:57 -0600)] 
spi: altera_spi: Add missing <time.h> to altera_spi.c

This driver references the get_timer macro while relying on an
indirection inclusion of <time.h>. Add the missing include directly.

Signed-off-by: Tom Rini <trini@konsulko.com>
7 weeks agospi: Tighten some spi driver dependencies
Tom Rini [Mon, 4 Aug 2025 21:57:17 +0000 (15:57 -0600)] 
spi: Tighten some spi driver dependencies

A few spi drivers cannot build without access to some platform
specific header files. Express those requirements in Kconfig as well.

Signed-off-by: Tom Rini <trini@konsulko.com>
7 weeks agoclk: Tighten some clock driver dependencies
Tom Rini [Fri, 18 Jul 2025 01:14:18 +0000 (19:14 -0600)] 
clk: Tighten some clock driver dependencies

A few clock drivers cannot build without access to some platform
specific header files. Express those requirements in Kconfig as well.

Signed-off-by: Tom Rini <trini@konsulko.com>
7 weeks agox86: Rename arch/x86/include/asm/pnp_def.h to include/pnp_def.h
Tom Rini [Fri, 11 Jul 2025 15:20:19 +0000 (09:20 -0600)] 
x86: Rename arch/x86/include/asm/pnp_def.h to include/pnp_def.h

There is nothing x86-centric in this include file, and moving it will
allow for some drivers to be compile-tested on sandbox.

Signed-off-by: Tom Rini <trini@konsulko.com>
7 weeks agomtd: nvmxip: Make use of LBAF for printing lbaint_t
Tom Rini [Fri, 11 Jul 2025 15:16:01 +0000 (09:16 -0600)] 
mtd: nvmxip: Make use of LBAF for printing lbaint_t

When printing the contents of an lbaint_t variable we need to use LBAF
to print it in order to get the correct format type depending on 32 or
64bit-ness.

Signed-off-by: Tom Rini <trini@konsulko.com>
7 weeks agomtd: spi: sf_dataflash.c: Make use of 'z' for printing size_t
Tom Rini [Fri, 11 Jul 2025 15:15:57 +0000 (09:15 -0600)] 
mtd: spi: sf_dataflash.c: Make use of 'z' for printing size_t

When printing the contents of an size_t variable we need to use z prefix
to the format character in order to get the correct format type
depending on 32 or 64bit-ness.

Signed-off-by: Tom Rini <trini@konsulko.com>
7 weeks agomtd: Correct dependency on SYS_FLASH_CHECKSUM
Tom Rini [Fri, 4 Jul 2025 21:45:56 +0000 (15:45 -0600)] 
mtd: Correct dependency on SYS_FLASH_CHECKSUM

This feature requires that CFG_SYS_FLASH_BASE is defined and this in
turn is only done in the case of FLASH_CFI_DRIVER && !CFI_FLASH or in
other words, when DM_MTD is not enabled.

Signed-off-by: Tom Rini <trini@konsulko.com>
7 weeks agomtd: Add function prototype for mtd_read_oob_bf(...)
Tom Rini [Wed, 2 Jul 2025 01:06:09 +0000 (19:06 -0600)] 
mtd: Add function prototype for mtd_read_oob_bf(...)

The function mtd_read_oob_bf is called by cmd/nand.c but does not have a
prototype in any header. Add this to include/linux/mtd/mtd.h as that is
the most logical place currently.

Fixes: 1fac57720719 ("nand: Add a watch command")
Signed-off-by: Tom Rini <trini@konsulko.com>
7 weeks agoclk: Add missing <dm/device.h> to include/clk.h
Tom Rini [Wed, 2 Jul 2025 01:05:33 +0000 (19:05 -0600)] 
clk: Add missing <dm/device.h> to include/clk.h

In this header we make direct references to some dm/device.h functions
while not including the header directly. Add the missing include.

Signed-off-by: Tom Rini <trini@konsulko.com>
7 weeks agomtd: nand: Prevent dereference of NULL pointer
Andrew Goodbody [Tue, 1 Jul 2025 16:12:44 +0000 (17:12 +0100)] 
mtd: nand: Prevent dereference of NULL pointer

In nand_wait_ready there is a loop that includes a NULL check for
chip->dev_ready before it is dereferenced. Use a NULL check once the
loop is exited as well to cover the case where it exits due to a timeout
and it is therefore not known if chip->dev_ready is NULL or not.

This issue found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Reviewed-by: Michael Trimarchi <michael@amarulasolutions.com>
7 weeks agocmd: mtd: Prevent use of uninitialised variable
Andrew Goodbody [Thu, 26 Jun 2025 10:49:32 +0000 (11:49 +0100)] 
cmd: mtd: Prevent use of uninitialised variable

ret maybe used uninitialised in some cases so instead
initialise it first to prevent this.

This issue was found by Smatch.

Fixes: 9671243e8d10 (cmd: mtd: Use the subcmd infrastructure to declare mtd sub-commands)
Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
7 weeks agoARM: renesas: Drop 'imply MULTI_DTB_FIT_USER_DEFINED_AREA' lines
Tom Rini [Sat, 15 Mar 2025 01:29:11 +0000 (19:29 -0600)] 
ARM: renesas: Drop 'imply MULTI_DTB_FIT_USER_DEFINED_AREA' lines

As the code is today, we get a warning about "select" statements on
"choice" options not doing anything. This is why for all of the boards
which had an 'imply MULTI_DTB_FIT_USER_DEFINED_AREA' they then also had
to set the option in the defconfig. Drop the imply lines here.

Signed-off-by: Tom Rini <trini@konsulko.com>
7 weeks agospi: spi-uclass: Use unwind goto
Andrew Goodbody [Mon, 6 Oct 2025 15:09:25 +0000 (16:09 +0100)] 
spi: spi-uclass: Use unwind goto

In _spi_get_bus_and_cs the check for stacked parallel support needing
multiple chip select support does a direct return on error. Instead it
should set the error code in ret and then use the unwind goto.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
7 weeks agospi: fspi: Logical or used instead of logical and
Andrew Goodbody [Tue, 12 Aug 2025 16:42:59 +0000 (17:42 +0100)] 
spi: fspi: Logical or used instead of logical and

In erratum_err050568 the test for apllicability uses logical or to check
multiple chip IDs but this means the test will always evaluate to true
as at least 1 term will always be true. Logical and should have been
used so that the expression evaluates to true if all terms are true
which would mean that no chip ID of interest was in use.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
7 weeks agospi: npcm-fiu: Remove repeated test
Andrew Goodbody [Tue, 12 Aug 2025 16:29:07 +0000 (17:29 +0100)] 
spi: npcm-fiu: Remove repeated test

In npcm_fiu_uma_operation to enter a code block nbytes must be non-zero.
So testing for nbytes inside the code block is redundant and can be
removed.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
7 weeks agospi: ich: Do not use uninitialised value
Andrew Goodbody [Tue, 12 Aug 2025 13:31:16 +0000 (14:31 +0100)] 
spi: ich: Do not use uninitialised value

In ich_spi_exec_op_swseq the variable with_address is only assigned a
value in the case of op->addr.nbytes being non-zero.
Initialise with_address to zero. so that it is always valid.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
7 weeks agoMerge patch series "spi: cadence_qspi: Fix Smatch reported issues"
Tom Rini [Tue, 28 Oct 2025 16:32:26 +0000 (10:32 -0600)] 
Merge patch series "spi: cadence_qspi: Fix Smatch reported issues"

Andrew Goodbody <andrew.goodbody@linaro.org> says:

Smatch reported issues with an off by 1 error in a test for a timeout
and also an error exit that did not set an error code.

Link: https://lore.kernel.org/r/20250812-cadence_qspi-v1-0-0d693d810145@linaro.org
7 weeks agoclk: Return value calculated by ERR_PTR
Andrew Goodbody [Thu, 3 Jul 2025 14:40:46 +0000 (15:40 +0100)] 
clk: Return value calculated by ERR_PTR

In clk_set_default_get_by_id ret 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 found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Acked-by: Quentin Schulz <quentin.schulz@cherry.de>
7 weeks agoMerge patch series "clk: versaclock: Fix two issues found by Smatch"
Tom Rini [Tue, 28 Oct 2025 15:59:55 +0000 (09:59 -0600)] 
Merge patch series "clk: versaclock: Fix two issues found by Smatch"

Andrew Goodbody <andrew.goodbody@linaro.org> says:

Should return value calculated by ERR_PTR as calling code attempts to
check for it.
Also do not dereference a pointer that could be an error pointer before
checking it with IS_ERR.

Link: https://lore.kernel.org/r/20250723-clk_versaclock-v1-0-9d70f2530871@linaro.org
7 weeks agommc: owl_mmc: Do not dereference data before NULL check
Andrew Goodbody [Thu, 31 Jul 2025 11:11:47 +0000 (12:11 +0100)] 
mmc: owl_mmc: Do not dereference data before NULL check

In owl_mmc_prepare_data there is a NULL check for the pointer data but
it happens after data has already been dereferenced. Refactor the code
so that the NULL check happens before any code dereferences data.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
7 weeks agogpio: intel_gpio: Initialise or0 and or1
Andrew Goodbody [Fri, 25 Jul 2025 12:04:26 +0000 (13:04 +0100)] 
gpio: intel_gpio: Initialise or0 and or1

In intel_gpio_set_flags the two variables or0 and or1 may be used
uninitialised. Correct this by setting initial values in the
declaration.
Also there is no need to use '|=' when the initial value is 0 and there
is only one assignment performed to each variable so just use '='
instead.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
7 weeks agospi: cadence_qspi: Do not return unset error code
Andrew Goodbody [Tue, 12 Aug 2025 11:34:39 +0000 (12:34 +0100)] 
spi: cadence_qspi: Do not return unset error code

In spi_calibration if the low range fails to calibrate then the code
attempted to return the variable err but this has not been set in this
case. Instead just return -EIO.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
7 weeks agospi: cadence_qspi: Off by 1 in test for timeout
Andrew Goodbody [Tue, 12 Aug 2025 11:34:38 +0000 (12:34 +0100)] 
spi: cadence_qspi: Off by 1 in test for timeout

In cadence_qspi_apb_exec_flash_cmd the test for a timeout uses a
post-decrement on the variable retry which will result in a value of -1
after the loop exit, or it would if the variable were signed.
To fix this make retry a signed variable and test its value for being
equal to -1.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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)

7 weeks 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)

7 weeks 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)

7 weeks 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)

7 weeks 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)

7 weeks 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)

7 weeks 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)

7 weeks 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)

7 weeks 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)

7 weeks 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)

7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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.

7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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

7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
8 weeks 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
8 weeks 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>
8 weeks 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>
8 weeks 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>
8 weeks 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>
8 weeks 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>
8 weeks 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>
8 weeks 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>
8 weeks 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>
8 weeks 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>
8 weeks 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>
8 weeks 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
8 weeks 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>
8 weeks 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>
8 weeks 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>
8 weeks 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>
8 weeks 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>