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

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

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

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

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

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

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

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

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

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

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

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

Fix smatch issues in zynqmp ipi and pinctrl drivers

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

fpga:
- Address reported coverity issues

net:
- axi_emac: Fix timeout test

versal2:
- Define usb_pgood_delay for fix device detection

3 weeks agoconfigs: versal2: Add usb_pgood_delay for versal2 boards
Venkatesh Yadav Abbarapu [Mon, 18 Aug 2025 04:53:04 +0000 (10:23 +0530)]
configs: versal2: Add usb_pgood_delay for versal2 boards

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

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

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

This issue was found by Smatch.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

This issue was found by Smatch.

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

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

This issue was found by Smatch.

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

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

This issue was found by Smatch.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Tested-by: Alice Guo <alice.guo@nxp.com>
3 weeks agomtd: nand: Do not dereference before NULL check
Andrew Goodbody [Thu, 31 Jul 2025 16:21:32 +0000 (17:21 +0100)]
mtd: nand: Do not dereference before NULL check

In nanddev_init mtd and memorg are assigned values that dereference nand
but this happens before a NULL check for nand. Move the assignments
after the NULL check.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
3 weeks agocmd: mtd: Enable speed benchmarking
Miquel Raynal [Mon, 4 Aug 2025 09:21:37 +0000 (11:21 +0200)]
cmd: mtd: Enable speed benchmarking

Linux features a flash_speed speed test from the mtd-utils suite, U-Boot
does not. Benchmarks are useful for speed improvement developments as
well as troubleshooting or regression testing sometimes.

Enable a benchmark option to enable this feature.

Example of output on a Nuvoton platform:

MA35D1> mtd read nor0 0x81000000 0 0x10000
Reading 65536 byte(s) at offset 0x00000000
MA35D1> mtd read.benchmark nor0 0x81000000 0 0x10000
Reading 65536 byte(s) at offset 0x00000000
Read speed: 3752kiB/s

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
3 weeks agocmd: nand: nand dump with ecc option
david regan [Thu, 14 Aug 2025 18:04:58 +0000 (11:04 -0700)]
cmd: nand: nand dump with ecc option

option to show nand dump data ecc corrected as opposed to just raw

Signed-off-by: david regan <dregan@broadcom.com>
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
3 weeks agocmd: nand: nand dump display update
david regan [Thu, 14 Aug 2025 18:04:57 +0000 (11:04 -0700)]
cmd: nand: nand dump display update

show characters with nand dump similar to md
along with offset into NAND

Signed-off-by: david regan <dregan@broadcom.com>
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
3 weeks agocmd: nand: more descriptive help info
david regan [Thu, 14 Aug 2025 18:04:56 +0000 (11:04 -0700)]
cmd: nand: more descriptive help info

nand read/write raw change 'count' to 'pages' since count is ambiguous

Signed-off-by: david regan <dregan@broadcom.com>
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
3 weeks agocmd: nand: bug fix MTD_OOB_AUTO to MTD_OPS_AUTO_OOB
david regan [Thu, 14 Aug 2025 18:04:55 +0000 (11:04 -0700)]
cmd: nand: bug fix MTD_OOB_AUTO to MTD_OPS_AUTO_OOB

bug fix MTD_OOB_AUTO to MTD_OPS_AUTO_OOB since MTD_OOB_AUTO does not exist

Fixes: dfe64e2c8973 ("mtd: resync with Linux-3.7.1")
Signed-off-by: david regan <dregan@broadcom.com>
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
3 weeks agomtd: nand: cadence: Fix device assignment to avoid warm reset issue
Dinesh Maniyam [Tue, 19 Aug 2025 08:35:09 +0000 (16:35 +0800)]
mtd: nand: cadence: Fix device assignment to avoid warm reset issue

The driver currently does:
    mtd->dev->parent = cadence->dev;

This works in Linux because `struct mtd_info` embeds a `struct device`,
so `mtd->dev` is always valid and its `.parent` can be set.

In U-Boot, however, `mtd->dev` is only a pointer to a `struct udevice`.
Dereferencing it before assignment is invalid, which breaks the device
hierarchy. As a result, consumers relying on `mtd->dev` (e.g. partition
parser, reset and re-init paths) operate on a dangling pointer. This
leads to failures during warm reset when the NAND device is accessed
again.

Fix by assigning the device pointer directly:
    mtd->dev = cadence->dev;

This matches U-Boot’s device model, preserves a valid hierarchy, and
resolves the warm reset issue on Cadence NAND.

Fixes: ebc41cad ("drivers: mtd: nand: Add driver for Cadence Nand")
Signed-off-by: Dinesh Maniyam <dinesh.maniyam@altera.com>
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
3 weeks agoimx: imx93_{evk, frdm, qsb}: Fix conflict SPL early malloc address
Ye Li [Wed, 20 Aug 2025 13:08:51 +0000 (15:08 +0200)]
imx: imx93_{evk, frdm, qsb}: Fix conflict SPL early malloc address

Because the early malloc pool size is set to 0x18000, so using this
start address may cause conflict with ATF, then corrupt the heap data.
So we delete the definition to use the default early malloc pool from
CONFIG_SPL_STACK to avoid any conflict

Signed-off-by: Ye Li <ye.li@nxp.com>
Cherry picked from nxp-imx/uboot-imx commit
1ba675df122627a19debe1d807877052705372c6

Jérémie Dautheribes: applied the same patch to the frdm and qsb
imx93-based boards
Signed-off-by: Jérémie Dautheribes <jeremie.dautheribes@bootlin.com>
3 weeks agoboard: phytec: phycore-imx93: Fix EEPROM bus mismatch in SPL
Primoz Fiser [Tue, 19 Aug 2025 05:39:41 +0000 (07:39 +0200)]
board: phytec: phycore-imx93: Fix EEPROM bus mismatch in SPL

Fix PHYTEC EEPROM bus mismatch between SPL and U-Boot proper by enabling
CONFIG_SPL_DM_SEQ_ALIAS=y on phyCORE-i.MX93 boards. This way, both the
SPL and U-Boot proper will respect the device-tree aliases for I2C devs
and use the same I2C bus number for phytec_eeprom_data_setup() function
calls. This makes code less confusing and more robust.

Fixes an issue apparent since commit 79f3e77133bd ("Subtree merge tag
'v6.16-dts' of dts repo [1] into dts/upstream") where SPL would spew the
following error:

  phytec_eeprom_read: i2c EEPROM not found: -110.
  phytec_eeprom_data_setup: EEPROM data init failed

While later in U-Boot proper, EEPROM would be successfully read out.
This happens because Linux device-tree for phyBOARD-Segin-i.MX93 since
aforementioned commit enables I2C bus 2 (lpi2c2 is used for audio codec
and RTC) which breaks SPL I2C bus number ordering and I2C EEPROM bus is
shifted by +1. Now, lets prevent this from happening again by utilizing
device-tree aliases also in the SPL.

Signed-off-by: Primoz Fiser <primoz.fiser@norik.com>
3 weeks agoarm: imx: imx9: soc: Fix env location when booting from USB
João Paulo Gonçalves [Mon, 11 Aug 2025 12:57:50 +0000 (09:57 -0300)]
arm: imx: imx9: soc: Fix env location when booting from USB

On i.MX9 platforms, when booting from USB, the U-Boot environment is
always assumed to be in RAM. However, this causes the boot to hang when
`CONFIG_ENV_IS_NOWHERE` is not enabled. The boot also hangs even if the
environment is present in another storage media (for example, eMMC). Fix
the issue by correctly handling the U-Boot environment's location when
booting from USB. Also for i.MX95, set the environment location based on
the ENV config and not solely based on the boot device type.

Suggested-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Signed-off-by: João Paulo Gonçalves <joao.goncalves@toradex.com>
3 weeks agoMerge patch series "bootstd: rauc: Fix segfault when scanning device with unsupported...
Tom Rini [Thu, 21 Aug 2025 21:05:15 +0000 (15:05 -0600)]
Merge patch series "bootstd: rauc: Fix segfault when scanning device with unsupported layout"

Martin Schwan <m.schwan@phytec.de> says:

This series fixes a segfault, that would occur at the end of scanning a
device, which does not contain the required partition layout scheme for
a RAUC system.

With this series, a "bootflow scan" should now correctly scan the
specified devices with boot method "rauc" without crashing on invalid
partition schemes.

Link: https://lore.kernel.org/r/20250813-wip-bootmeth-rauc-priv-free-v1-0-1ef928169469@phytec.de
3 weeks agobootstd: rauc: Free private data when booting
Martin Schwan [Wed, 13 Aug 2025 11:54:08 +0000 (13:54 +0200)]
bootstd: rauc: Free private data when booting

The private data struct can be freed when loading the boot script, as we
don't need the slot information anymore at this point.

Signed-off-by: Martin Schwan <m.schwan@phytec.de>
Tested-by: Wadim Egorov <w.egorov@phytec.de>
3 weeks agobootstd: rauc: Move freeing private struct to its own function
Martin Schwan [Wed, 13 Aug 2025 11:54:07 +0000 (13:54 +0200)]
bootstd: rauc: Move freeing private struct to its own function

Move freeing a distro_rauc_priv struct to a new, separate function for
better reuse.

Signed-off-by: Martin Schwan <m.schwan@phytec.de>
Tested-by: Wadim Egorov <w.egorov@phytec.de>
3 weeks agobootstd: rauc: Don't null bootflow->bootmeth_priv
Martin Schwan [Wed, 13 Aug 2025 11:54:06 +0000 (13:54 +0200)]
bootstd: rauc: Don't null bootflow->bootmeth_priv

Don't null bootflow->bootmeth_priv, as the private struct is freed later
on by the bootflow.

Signed-off-by: Martin Schwan <m.schwan@phytec.de>
Tested-by: Wadim Egorov <w.egorov@phytec.de>
3 weeks agobootstd: rauc: Fix segfault when cleaning up slots
Martin Schwan [Wed, 13 Aug 2025 11:54:05 +0000 (13:54 +0200)]
bootstd: rauc: Fix segfault when cleaning up slots

Fix a segfault when cleaning up the slots from the private struct. This
fault was generated by accessing a member of a null pointer.

Signed-off-by: Martin Schwan <m.schwan@phytec.de>
Tested-by: Wadim Egorov <w.egorov@phytec.de>
3 weeks agoMerge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sh
Tom Rini [Thu, 21 Aug 2025 18:43:10 +0000 (12:43 -0600)]
Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sh

- DRAM controller driver off-by-one error fix.

3 weeks agoram: renesas: dbsc5: Fix off by 1 errors
Andrew Goodbody [Fri, 8 Aug 2025 11:32:36 +0000 (12:32 +0100)]
ram: renesas: dbsc5: Fix off by 1 errors

In dbsc5_read_vref_training the arrays dvw_min_byte0_table and
dvw_min_byte1_table have 128 elements per channel. The variable
vref_stop_index is limited to be a maximum of 128. This means that the
index used to access the arrays must use a test of '< vref_stop_index'
rather than '<= vref_stop_index' in order to prevent out of bounds
accesses to the arrays.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Tested-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
4 weeks agoMerge tag 'net-20250818' of https://source.denx.de/u-boot/custodians/u-boot-net
Tom Rini [Mon, 18 Aug 2025 16:54:44 +0000 (10:54 -0600)]
Merge tag 'net-20250818' of https://source.denx.de/u-boot/custodians/u-boot-net

Pull request net-20250818.

This is mostly code cleanup and fixes, mainly for issues reported by the
Smatch tool, plus two small features for NET_LWIP as well as support for
the BCM54612E phy.

net-common:
- Fix a bunch of issues reported by Smatch
- Introduce CONFIG_DNS
- Add support for BCM54612E phy

net-legacy:
- Add missing SPDX-License-Identifier for files originating from LiMon

net-lwip:
- ping: initialize net_try_count to 1
- sntp: remove redundant sys_check_timeouts()
- tftp: resend initial request
- Add Kconfig option to show ICMP unreachable errors

4 weeks agophy: cadence: torrent: Set an error code for return
Andrew Goodbody [Mon, 18 Aug 2025 10:44:29 +0000 (11:44 +0100)]
phy: cadence: torrent: Set an error code for return

In cdns_torrent_phy_probe the test for too many lanes configured does
not set an error code before taking the error path. This could lead to a
silent failure if the calling code does not detect the error. Add the
code to return -EINVAL in this case.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
4 weeks agophy: cadence: sierra: Remove variable that is not assigned to
Andrew Goodbody [Mon, 18 Aug 2025 10:44:28 +0000 (11:44 +0100)]
phy: cadence: sierra: Remove variable that is not assigned to

In cdns_sierra_pll_bind_of_clocks the variable 'i' is declared but never
assigned to before its value is used in a dev_err. Replace clk_names[i]
by the name passed to device_bind(), i.e., "pll_mux_clk". With that, the
clk_names[] array is unused and can therefore be removed.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
[jf: update description]
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
4 weeks agonet: ks8851_mll: Remove unreachable code
Andrew Goodbody [Tue, 5 Aug 2025 10:34:29 +0000 (11:34 +0100)]
net: ks8851_mll: Remove unreachable code

In ks8851_mll_detect_chip the if..else code detects the case of (val &
0xfff0) != CIDER_ID and returns if found. So testing for this again will
always fail and the code is unreachable. Just remove the test and code
block.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
4 weeks agonet: lwip: ping: set net_try_count to 1
Jerome Forissier [Mon, 4 Aug 2025 12:51:01 +0000 (14:51 +0200)]
net: lwip: ping: set net_try_count to 1

The legacy network stack sets net_try_count to 1 at the beginning of the
net_loop() function. This is required for net_start_again() to work
properly. Therefore, set the variable accordingly in the do_ping()
function when NET_LWIP=y. This fixes an issue where a ping to an
unreachable destination would run twice on the same network device. For
example with qemu_arm64_lwip_defconfig:

 => dhcp
 DHCP client bound to address 10.0.2.15 (3 ms)
 => ping 10.0.0.1
 Using virtio-net#32 device
 ping failed; host 10.0.0.1 is not alive
 Using virtio-net#32 device
 ping failed; host 10.0.0.1 is not alive
 => QEMU: Terminated

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
4 weeks agonet: cortina_ni: Fix typo accessing wrong phy
Andrew Goodbody [Fri, 1 Aug 2025 11:59:40 +0000 (12:59 +0100)]
net: cortina_ni: Fix typo accessing wrong phy

In ca_phy_probe when checking for an external phy it uses a field from
the internal phy due to what is assumed to be a copy/paste typo. Make
the obvious fix to use the field from the external phy.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
4 weeks agolwip: sntp: remove redundant sys_check_timeouts()
Jerome Forissier [Fri, 1 Aug 2025 08:12:20 +0000 (10:12 +0200)]
lwip: sntp: remove redundant sys_check_timeouts()

Now that sys_check_timeouts() is called in net_lwip_rx(), there is no
need to call it from the SNTP receive loop. Remove the redundant call.

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
4 weeks agolwip: tftp: resend initial request
Jerome Forissier [Thu, 24 Jul 2025 16:08:24 +0000 (18:08 +0200)]
lwip: tftp: resend initial request

The TFTP implementation does not resend the initial request if there is
no response from the server. Since TFTP is based on UDP, there should be
a mechanism to deal with unreliable transmissions at this point, similar
to what we have for data packets. Therefore, introduce request
retransmission.

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
CC: Venkatesh Abbarapu <venkatesh.abbarapu@amd.com>
CC: Michal Simek <michal.simek@amd.com>
CC: Ilias Apalodimas <ilias.apalodimas@linaro.org>
4 weeks agonet: introduce CONFIG_DNS
Jerome Forissier [Fri, 18 Jul 2025 10:48:48 +0000 (12:48 +0200)]
net: introduce CONFIG_DNS

Introduce the DNS Kconfig symbol so that various network commands may
use host names without the dns command (CMD_DNS) being selected.

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
CC: E Shattow <e@freeshell.de>
4 weeks agonet: octeontx2: NULL check before dereference
Andrew Goodbody [Tue, 5 Aug 2025 14:53:35 +0000 (15:53 +0100)]
net: octeontx2: NULL check before dereference

In rvu_af_init if the code fails to allocate memory for nix_af it will
take the error path with nix_af == NULL which will dereference nix_af.
Add the appropriate NULL check.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
4 weeks agonet: octeontx2: Restore default value for err
Andrew Goodbody [Tue, 5 Aug 2025 14:53:34 +0000 (15:53 +0100)]
net: octeontx2: Restore default value for err

In nix_lf_setup there is a default value assigned to err in case an
error is detected. However this default value will be overwritten in the
for loop so that later code does not return an error code from the
function. Add a new assignment to restore err to the default error code.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
4 weeks agonet: mvpp2: Use field just assigned in error test
Andrew Goodbody [Tue, 5 Aug 2025 14:18:19 +0000 (15:18 +0100)]
net: mvpp2: Use field just assigned in error test

In mvpp2_probe the code attempts to get a value for "gop-port-id" and
assigns it to port->gop_id but it then tests port->id for being equal to
-1. That is an impossible test as port->id is a field of type u8 so
cannot be negative. Change the test to port->gop_id.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
4 weeks agonet: mvpp2: Cannot test unsigned variable to be negative
Andrew Goodbody [Tue, 5 Aug 2025 14:18:18 +0000 (15:18 +0100)]
net: mvpp2: Cannot test unsigned variable to be negative

In phy_info_parse all uses of the variable phyaddr are as an int so
declaring as u32 is not useful and prevents the test for an error return
from fdtdec_get_int ever detecting an error. Change phyaddr to be an
int.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
4 weeks agonet: mvpp2: Return -ENOMEM for failed alloc
Andrew Goodbody [Tue, 5 Aug 2025 14:18:17 +0000 (15:18 +0100)]
net: mvpp2: Return -ENOMEM for failed alloc

Instead of returning -1 on a failed alloc, return -ENOMEM.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
4 weeks agonet: mvpp2: Fix impossible test
Andrew Goodbody [Tue, 5 Aug 2025 14:18:16 +0000 (15:18 +0100)]
net: mvpp2: Fix impossible test

You cannot test an unsigned char to be >= 256. Instead make the
variables start and end to be ints.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
4 weeks agonet: mv88e6xxx: Fix logical operator instead of bitwise
Andrew Goodbody [Tue, 5 Aug 2025 11:14:14 +0000 (12:14 +0100)]
net: mv88e6xxx: Fix logical operator instead of bitwise

In mv88e6xxx_port_enable when attempting to mask out the previous
settings of two bits a logical operator was used instead of a bitwise
operator. Fix this.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
4 weeks agonet: mediatek: Use correct variable for return
Andrew Goodbody [Tue, 5 Aug 2025 11:04:00 +0000 (12:04 +0100)]
net: mediatek: Use correct variable for return

In mtk_eth_of_to_plat, the last error check has the value in
'priv->phy_addr' but returns ret. Correct to return 'priv->phy_addr'
instead.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
4 weeks agonet: ldpaa_eth: Fix buffer overflow in memset
Andrew Goodbody [Tue, 5 Aug 2025 10:52:00 +0000 (11:52 +0100)]
net: ldpaa_eth: Fix buffer overflow in memset

In ldpaa_eth_open a memset is used to initialise a struct to 0 but the
size passed is that of a different struct. Correct to pass the sizeof
the struct that is being initialised.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
4 weeks agonet: add missing SPDX-License-Identifier for files originating from LiMon
Max Merchel [Thu, 14 Aug 2025 12:03:52 +0000 (14:03 +0200)]
net: add missing SPDX-License-Identifier for files originating from LiMon

The header of LiMon imported files reference a License file which
does not exist in U-Boot. Some files were forgotten when adding the
SPDX-License-Identifier.
The LiMon files were originally licensed under GPLv2 as can be seen in
commit [2ea91039].

Based on this commit, add the correct SPDX license identifier.
While at it drop the reference to the non-existing License file from all
LiMon files and update the SPDX-License-Identifier to SPDX version 3.

Signed-off-by: Max Merchel <Max.Merchel@ew.tq-group.com>
4 weeks agonet: lwip: add Kconfig option to show ICMP unreachable errors
Jerome Forissier [Tue, 12 Aug 2025 12:43:19 +0000 (14:43 +0200)]
net: lwip: add Kconfig option to show ICMP unreachable errors

Add Kconfig symbol LWIP_ICMP_SHOW_UNREACH which, when enabled, prints a
message to the console upon reception of ICMP unreachable messages. For
example:

 $ make qemu_arm64_lwip_defconfig
 $ qemu-system-aarch64 -M virt -cpu max -nographic -bios u-boot.bin
 [...]
 => dhcp
 DHCP client bound to address 10.0.2.15 (0 ms)
 => tftp 192.168.0.100:69:Image
 Using virtio-net#32 device
 TFTP from server 192.168.0.100; our IP address is 10.0.2.15
 Filename 'Image'.
 Load address: 0x40200000
 Loading: ICMP destination unreachable (host unreachable) from 192.168.0.16
 Timeout!
 => tftp 192.168.0.16:69:Image
 Using virtio-net#32 device
 TFTP from server 192.168.0.16; our IP address is 10.0.2.15
 Filename 'Image'.
 Load address: 0x40200000
 Loading: ICMP destination unreachable (port unreachable) from 192.168.0.16
 Timeout!
 =>

Submitted upstream as https://github.com/lwip-tcpip/lwip/pull/73.

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
4 weeks agolwip: icmp: allow reporting ICMP destination unreachable
Jerome Forissier [Tue, 12 Aug 2025 12:43:18 +0000 (14:43 +0200)]
lwip: icmp: allow reporting ICMP destination unreachable

Allow reporting ICMP destination unreachable messages via a user-defined
callback.

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
4 weeks agonet: phy: broadcom: add support for BCM54612E
Jim Liu [Thu, 7 Aug 2025 05:29:31 +0000 (13:29 +0800)]
net: phy: broadcom: add support for BCM54612E

It's Broadcom PHY simply described as single-port
RGMII 10/100/1000BASE-T PHY.

Signed-off-by: Jim Liu <JJLIU0@nuvoton.com>
4 weeks agonet: designware: Fix get_timer value overflow
Jim Liu [Thu, 7 Aug 2025 05:28:32 +0000 (13:28 +0800)]
net: designware: Fix get_timer value overflow

get_timer returns a ulong value representing system time in ms.
On a 64-bit system, this ulong value is 64 bits long. However,
the driver stores it in a 32-bit unsigned integer, which overflows
after 49 days up time, causing the driver to get an incorrect time.

Replace the unsigned int variable with a ulong type to properly store
the value returned by get_timer.

Signed-off-by: Stanley Chu <yschu@nuvoton.com>
Signed-off-by: Jim Liu <JJLIU0@nuvoton.com>
4 weeks agophy: marvell: Cannot test unsigned field to be negative
Andrew Goodbody [Wed, 6 Aug 2025 16:43:25 +0000 (17:43 +0100)]
phy: marvell: Cannot test unsigned field to be negative

In comphy_cp110_init_serdes_map in comphy_cp110.c there are two fields
in cfg, comphy_lanes_count and comphy_mux_bitcount, which are fetched
from the FDT blob with fdtdec_get_int which returns an int. These two
fields are then tested for being negative. However the fields are
declared as unsigned so those tests must always fail. Change the
declaration of those fields to be int instead of u32 and the code will
work as expected.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Reviewed-by: Stefan Roese <stefan.roese@mailbox.org>
4 weeks agophy: marvell: Fix off by 1 limit checks
Andrew Goodbody [Wed, 6 Aug 2025 16:43:24 +0000 (17:43 +0100)]
phy: marvell: Fix off by 1 limit checks

The limit checks in get_speed_string and get_type_string are off by 1 as
they do not account for the maximum index into an array that can be used
is 1 less than the number of elements in that array. Adjust the limit
checks to allow for this.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Reviewed-by: Stefan Roese <stefan.roese@mailbox.org>
4 weeks agonet: phy: vitesse: Fix incorrect test for timeout
Andrew Goodbody [Wed, 6 Aug 2025 09:37:26 +0000 (10:37 +0100)]
net: phy: vitesse: Fix incorrect test for timeout

In vsc8514_config there is a while loop for detecting a config failure
using a timeout counter with a post-decrement. In the case of a timeout
this will result in the loop exiting with timeout == -1 so use that as
the test below the loop to detect that the timeout occurred.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
4 weeks agonet: octeontx: Free allocated memory on error
Andrew Goodbody [Tue, 5 Aug 2025 15:45:49 +0000 (16:45 +0100)]
net: octeontx: Free allocated memory on error

In octeontx_smi_probe if an error is detected then memory that was
allocated is not freed. Small refactor of the code to use a common
return and free memory. Also return -ENOMEM for an allocation failure.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
4 weeks agonet: octeontx: Remove unneeded test
Andrew Goodbody [Tue, 5 Aug 2025 15:45:48 +0000 (16:45 +0100)]
net: octeontx: Remove unneeded test

In nicvf_cq_handler there is a test for !cqe_count which will return if
true so it is guaranteed that cqe_count will true after that point. This
makes the later test for cqe_count redundant so it can be removed.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
4 weeks agonet: octeontx: Remove unneeded code
Andrew Goodbody [Tue, 5 Aug 2025 15:45:47 +0000 (16:45 +0100)]
net: octeontx: Remove unneeded code

In nicvf_rcv_pkt_handler there is no need to initialise err as it is
assigned to immediately after. Also the test for !pkt will return if
true meaning that pkt is guaranteed to be true after that code block and
so no need to test for it and the redundant test can be removed.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
4 weeks agoMerge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sh
Tom Rini [Sun, 17 Aug 2025 23:48:14 +0000 (17:48 -0600)]
Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sh

Fixes for newer revision of Retronix R-Car V4H Sparrow Hawk and fixes
for boards which enable POSITION_INDEPENDENT and also set non-zero
CONFIG_TEXT_BASE.

4 weeks agoconfigs: Remove redundant CONFIG_TEXT_BASE assignments for Renesas defconfigs
Lad Prabhakar [Wed, 23 Jul 2025 08:10:15 +0000 (09:10 +0100)]
configs: Remove redundant CONFIG_TEXT_BASE assignments for Renesas defconfigs

The Renesas board defconfigs explicitly set CONFIG_TEXT_BASE=0x50000000,
however U-Boot's POSITION_INDEPENDENT=y build default already places text
at 0x0. These hardcoded overrides are therefore unnecessary and will be
pruned automatically in upcoming resyncs.

Remove the CONFIG_TEXT_BASE lines from the following defconfigs:
  - hihope_rzg2_defconfig
  - r8a77970_eagle_defconfig
  - r8a77970_v3msk_defconfig
  - r8a77990_ebisu_defconfig
  - r8a77995_draak_defconfig
  - r8a779a0_falcon_defconfig
  - renesas_rzg2l_smarc_defconfig
  - rz2_beacon_defconfig
  - silinux_ek874_defconfig

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
4 weeks agoarm64: dts: renesas: r8a779g3: Describe generic SPI NOR support on Retronix R-Car...
Marek Vasut [Wed, 13 Aug 2025 21:25:56 +0000 (23:25 +0200)]
arm64: dts: renesas: r8a779g3: Describe generic SPI NOR support on Retronix R-Car V4H Sparrow Hawk board

Retronix R-Car V4H Sparrow Hawk EVTA1 is populated with Spansion S25FS512S,
EVTB1 is populated with Winbond W77Q51NW. Describe the SPI NOR using generic
"jedec,spi-nor" compatible, because both flashes can be auto-detected based
on their built-in IDs.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
4 weeks agoarm64: dts: renesas: r8a779g3: Set VDDQ18_25_AVB voltage on Retronix R-Car V4H Sparro...
Marek Vasut [Wed, 13 Aug 2025 21:26:59 +0000 (23:26 +0200)]
arm64: dts: renesas: r8a779g3: Set VDDQ18_25_AVB voltage on Retronix R-Car V4H Sparrow Hawk EVTB1

The Retronix R-Car V4H Sparrow Hawk EVTB1 uses 1V8 IO voltage supply
for VDDQ18_25_AVB power rail. Update the AVB0 pinmux to reflect the
change in IO voltage. Since the VDDQ18_25_AVB power rail is shared,
all four AVB0, AVB1, AVB2, TSN0 PFC/GPIO POC[7..4] registers have to
be configured the same way.

Correct the voltage for EVTA1 boards accordingly by patching the U-Boot
control DT in SPL.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
4 weeks agoarm64: dts: renesas: r8a779g3: Invert microSD voltage selector on Retronix R-Car...
Marek Vasut [Wed, 13 Aug 2025 21:26:27 +0000 (23:26 +0200)]
arm64: dts: renesas: r8a779g3: Invert microSD voltage selector on Retronix R-Car V4H Sparrow Hawk EVTB1

Invert the polarity of microSD voltage selector on Retronix R-Car V4H
Sparrow Hawk board. The voltage selector was not populated on prototype
EVTA1 boards, and is implemented slightly different on EVTB1 boards. As
the EVTA1 boards are from a limited run and generally not available,
update the DT to make it compatible with EVTB1 microSD voltage selector.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
4 weeks agoarm64: renesas: r8a779g3: Enable xHCI USB on Retronix R-Car V4H Sparrow Hawk board
Marek Vasut [Wed, 6 Aug 2025 00:58:30 +0000 (02:58 +0200)]
arm64: renesas: r8a779g3: Enable xHCI USB on Retronix R-Car V4H Sparrow Hawk board

Enable support for PCIe based xHCI USB 3.0 driver and USB mass
storage support on Retronix R-Car V4H Sparrow Hawk board .

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
4 weeks agoarm64: renesas: r8a779g3: Disable dual-rank DRAM on Retronix R-Car V4H ES2 Sparrow...
Marek Vasut [Wed, 6 Aug 2025 00:57:14 +0000 (02:57 +0200)]
arm64: renesas: r8a779g3: Disable dual-rank DRAM on Retronix R-Car V4H ES2 Sparrow Hawk

The R-Car V4H SoC before rev.3.0 can not support dual-rank LPDDR5 DRAM.
This affects 16 GiB dual-rank DRAM configuration of Retronix R-Car V4H
Sparrow Hawk board. Fall back to 8 GiB single-rank DRAM configuration
on such systems instead.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
4 weeks agoarm64: renesas: r8a779g3: Disable MicroSD UHS modes on Retronix R-Car V4H Sparrow...
Marek Vasut [Wed, 6 Aug 2025 00:56:15 +0000 (02:56 +0200)]
arm64: renesas: r8a779g3: Disable MicroSD UHS modes on Retronix R-Car V4H Sparrow Hawk EVTA1

The Retronix R-Car V4H Sparrow Hawk old revision EVTA1 does not have MicroSD
voltage switch populated on the board, therefore the board supports only 3V3
and non-UHS MicroSD cards. While the EVTB1 board is populated with Winbond
W77Q51NW SPI NOR, the EVTA1 board is populated with Spansion S25FS512S SPI
NOR, those those SPI NOR IDs to discern the two board revisions and apply
the MicroSD related DT changes.

The MicroSD related DT changes modify the regulator node, which is now a
regulator-fixed and supplies only 3V3, and remove sd-uhs-sdr50 and
sd-uhs-sdr104 properties from the MicroSD slot controller node.

The MicroSD related DT changes cannot be applied as DTO, because the base
DT contains nodes which have to be removed in case of EVTA1, but have to
be present in case of EVTB1 and newer revisions of the board. Because the
EVTA1 is an old revision of the board that is not generally available, it
is better to special case it and keep the base DT compatible with EVTB1
and newer revisions of the board which are actually available.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
4 weeks agopci: pcie-rcar-gen4: Fix PHY initialization
Marek Vasut [Wed, 6 Aug 2025 19:23:54 +0000 (21:23 +0200)]
pci: pcie-rcar-gen4: Fix PHY initialization

R-Car V4H Reference Manual R19UH0186EJ0130 Rev.1.30 Apr. 21, 2025
page 4581 Figure 104.3b Initial Setting of PCIEC(example) middle
of the figure indicates that fourth write into register 0x148 [2:0]
is 0x3 or GENMASK(1, 0). The current code writes GENMASK(11, 0)
which is a typo. Fix the typo.

Fixes: be3dd0dc2fd9 ("pci: pcie-rcar-gen4: Add Renesas R-Car Gen4 DW PCIe controller driver")
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
4 weeks agobootstd: rauc: Change global method to check any partition
Martin Schwan [Tue, 12 Aug 2025 12:38:34 +0000 (14:38 +0200)]
bootstd: rauc: Change global method to check any partition

The bootmeth rauc should scan all partitions, in particular whole
devices, and not be a global method. There may exist multiple RAUC
systems on different devices and they should all be detected. This also
fixes a bug, where both a global bootflow and one using an actual,
complete device would be detected at the same time, when scanning for
valid bootflows.

Signed-off-by: Martin Schwan <m.schwan@phytec.de>
Tested-by: Wadim Egorov <w.egorov@phytec.de>
4 weeks agoenv: Correct Kconfig type for ENV_MMC_SW_PARTITION
Tom Rini [Tue, 12 Aug 2025 17:31:09 +0000 (11:31 -0600)]
env: Correct Kconfig type for ENV_MMC_SW_PARTITION

As part of renaming environment related Kconfig options,
ENV_MMC_SW_PARTITION was inadvertently changed from a string to a bool.
Correct this.

Fixes: ffc4914703a2 ("env: Rename ENV_MMC_PARTITION to ENV_MMC_SW_PARTITION")
Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
4 weeks agoMerge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-riscv
Tom Rini [Thu, 14 Aug 2025 14:51:42 +0000 (08:51 -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/27379

- Board: mbv: Prepare MBV for CI
- Board: MPFS Icicle Kit cleanup
- Board: Add Andes Voyager board support
- RISCV: Update SYS_BOOTM_LEN to commonly used value
- starfive: fix return code of `mac write_eeprom`
- arch/riscv/lib: update memmove and memcpy for big-endian

4 weeks agoarch/riscv/lib: update memmove and memcpy for big-endian
Ben Dooks [Thu, 7 Aug 2025 16:49:33 +0000 (17:49 +0100)]
arch/riscv/lib: update memmove and memcpy for big-endian

Change the shift patterns for the unaligned memory move and copy code
to deal with big-endian by definign macros to change the shfit left and
right to go the opposite way.

Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
4 weeks agostarfive: fix return code of `mac write_eeprom`
Heinrich Schuchardt [Sat, 9 Aug 2025 08:21:55 +0000 (10:21 +0200)]
starfive: fix return code of `mac write_eeprom`

When writing the EEPROM fails, the command usage help text is displayed
after the error message. We should only display the error message instead.

If writing the EEPROM fails, return CMD_RET_FAILURE (1) instead of
CMD_RET_USAGE (-1).

Fixes: aea1bd95b61e ("eeprom: starfive: Enable ID EEPROM configuration")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Acked-by: E Shattow <e@freeshell.de>
4 weeks agoboard: MAINTAINERS: Add Voyager board maintainer
Leo Yu-Chi Liang [Thu, 7 Aug 2025 11:38:27 +0000 (19:38 +0800)]
board: MAINTAINERS: Add Voyager board maintainer

Add Voyager board maintainer.

Signed-off-by: Randolph Sheng-Kai Lin <randolph@andestech.com>
Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
4 weeks agodoc: board: voyager: Add documentation for Voyager
Leo Yu-Chi Liang [Thu, 7 Aug 2025 11:40:55 +0000 (19:40 +0800)]
doc: board: voyager: Add documentation for Voyager

Add documentation for Voyager board.

Signed-off-by: Randolph Sheng-Kai Lin <randolph@andestech.com>
Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
4 weeks agoconfigs: andes: add Voyager board defconfig
Leo Yu-Chi Liang [Thu, 7 Aug 2025 11:40:40 +0000 (19:40 +0800)]
configs: andes: add Voyager board defconfig

Add default configuration file for Voyager board.

Signed-off-by: Randolph Sheng-Kai Lin <randolph@andestech.com>
Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
4 weeks agoboard: andestech: Add Voyager board support
Leo Yu-Chi Liang [Thu, 7 Aug 2025 11:38:32 +0000 (19:38 +0800)]
board: andestech: Add Voyager board support

Introduce Voyager board specific code, including
- dram info
- shared cache enabling

Signed-off-by: Randolph Sheng-Kai Lin <randolph@andestech.com>
Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
4 weeks agoriscv: dts: andes: Add Voyager device tree
Leo Yu-Chi Liang [Thu, 7 Aug 2025 11:38:17 +0000 (19:38 +0800)]
riscv: dts: andes: Add Voyager device tree

Introduce the initial device tree support for Andes Voyager board.
We will convert to OF_UPSTREAM once the patch series for kernel is merged.

Signed-off-by: Randolph Sheng-Kai Lin <randolph@andestech.com>
Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
4 weeks agoriscv: board: Add Andes Voyager board Kconfig support
Leo Yu-Chi Liang [Thu, 7 Aug 2025 11:38:07 +0000 (19:38 +0800)]
riscv: board: Add Andes Voyager board Kconfig support

The Voyager is Andes' first RISC-V development board.
It is built around Qilai SoC,
which includes Andes AX45MP quad-core cluster.

Introduce the Kconfig entry for the Voyager board.

Signed-off-by: Randolph Sheng-Kai Lin <randolph@andestech.com>
Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
4 weeks agocommon: spl: fix compilation warning
Leo Yu-Chi Liang [Wed, 13 Aug 2025 06:01:04 +0000 (14:01 +0800)]
common: spl: fix compilation warning

Explicitly specify the type by replacing macro with variable
to fix the possible compilation warning.

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
4 weeks agoboard: microchip: mpfs_icicle: update to use system controller
Jamie Gibbons [Fri, 1 Aug 2025 12:36:26 +0000 (13:36 +0100)]
board: microchip: mpfs_icicle: update to use system controller

A new system controller driver has been created to make code modular and
improve and clean code. Update and remove functions to account for these
additional drivers.

Signed-off-by: Jamie Gibbons <jamie.gibbons@microchip.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
4 weeks agoboard: microchip: mpfs_icicle: enable new driver configs
Jamie Gibbons [Fri, 1 Aug 2025 12:36:25 +0000 (13:36 +0100)]
board: microchip: mpfs_icicle: enable new driver configs

Enable the MPFS mailbox and system controller drivers for use with the
Icicle kit. These functions are crucial for the board setup functions
that run in the Icicle board file - mpfs_icicle.c.

Signed-off-by: Jamie Gibbons <jamie.gibbons@microchip.com>
Acked-by: Leo Yu-Chi Liang <ycliang@andestech.com>
4 weeks agomisc: add PolarFire SoC system controller
Jamie Gibbons [Fri, 1 Aug 2025 12:36:24 +0000 (13:36 +0100)]
misc: add PolarFire SoC system controller

This driver provides an interface to access the functions of the system
controller on the Microchip PolarFire SoC.
This driver includes functions to use the system controller to read
the device serial number.

Signed-off-by: Jamie Gibbons <jamie.gibbons@microchip.com>
Acked-by: Leo Yu-Chi Liang <ycliang@andestech.com>
4 weeks agomailbox: add PolarFire SoC mailbox driver
Jamie Gibbons [Fri, 1 Aug 2025 12:36:23 +0000 (13:36 +0100)]
mailbox: add PolarFire SoC mailbox driver

This driver adds support for the single mailbox channel of the MSS
system controller on the Microchip PolarFire SoC.

Signed-off-by: Jamie Gibbons <jamie.gibbons@microchip.com>
Acked-by: Leo Yu-Chi Liang <ycliang@andestech.com>
4 weeks agoboard: microchip: mpfs_icicle: make use of ft_board_setup()
Jamie Gibbons [Fri, 1 Aug 2025 12:36:22 +0000 (13:36 +0100)]
board: microchip: mpfs_icicle: make use of ft_board_setup()

Move ethernet mac address setting to ft_board_setup() to remove the need
for fdt set in custom boot script.

Signed-off-by: Jamie Gibbons <jamie.gibbons@microchip.com>
Acked-by: Leo Yu-Chi Liang <ycliang@andestech.com>
4 weeks agoconfigs: microchip_mpfs_icicle: enable CONFIG_OF_BOARD_SETUP
Jamie Gibbons [Fri, 1 Aug 2025 12:36:21 +0000 (13:36 +0100)]
configs: microchip_mpfs_icicle: enable CONFIG_OF_BOARD_SETUP

Enable CONFIG_OF_BOARD_SETUP and other dependencies to allow the use of
the ft_board_setup() function to replace fdt set in boot scripts for
Microchip's MPFS Icicle kit.

Signed-off-by: Jamie Gibbons <jamie.gibbons@microchip.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
4 weeks agoxilinx: mbv: Use separate DTB for binman nodes
Michal Simek [Tue, 22 Jul 2025 11:03:46 +0000 (13:03 +0200)]
xilinx: mbv: Use separate DTB for binman nodes

The commit d92fdb60677b ("binman: Add option for pointing to separate
description") added support for separating binman description to own file
not the be the part of DT for OS.
The main reason is that binman is not passing dt schema validation that's
why want to keep it separated.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Acked-by: Leo Yu-Chi Liang <ycliang@andestech.com>
4 weeks agoxilinx: mbv: Fix dt properties in interrupt controller node
Michal Simek [Tue, 22 Jul 2025 11:03:45 +0000 (13:03 +0200)]
xilinx: mbv: Fix dt properties in interrupt controller node

Properties didn't match dt binding that's why should be fixed.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
4 weeks agoxilinx: mbv: Add missing mmu-type cpu property
Michal Simek [Tue, 22 Jul 2025 11:03:44 +0000 (13:03 +0200)]
xilinx: mbv: Add missing mmu-type cpu property

OpenSBI expects mmu-type to be present in DT that's why add it. Without it
OpenSBI disable CPU node which ends up in not working boot.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
4 weeks agoxilinx: mbv: Disable OF_HAS_PRIOR_STAGE
Michal Simek [Tue, 22 Jul 2025 11:03:43 +0000 (13:03 +0200)]
xilinx: mbv: Disable OF_HAS_PRIOR_STAGE

There is no reason to use OF_BOARD for MBV because reduced DT is used by
SPL and full DT is passed via u-boot.img or u-boot.itb. There is no reason
to pick up DTB from certain address.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>