]> git.ipfire.org Git - thirdparty/u-boot.git/log
thirdparty/u-boot.git
6 weeks agonet: fm: Correct test for timeout
Andrew Goodbody [Mon, 4 Aug 2025 16:03:57 +0000 (17:03 +0100)] 
net: fm: Correct test for timeout

In bmi_rx_port_disable and bmi_tx_port_disable the use of post-decrement
on the test in the while loop for a timeout means that timeout will be
equal to -1 on exit in that case. Adjust the test for this expected
value.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
6 weeks agoddr: fsl: Provide initial value for zqcs_init
Andrew Goodbody [Thu, 24 Jul 2025 15:32:55 +0000 (16:32 +0100)] 
ddr: fsl: Provide initial value for zqcs_init

In the case of !zq_en zqcs_init is never assigned to although its value
is used. Correct by initialising zqcs_init to 0.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
6 weeks agoMerge tag 'v2025.10-rc3' into next
Tom Rini [Mon, 25 Aug 2025 19:28:49 +0000 (13:28 -0600)] 
Merge tag 'v2025.10-rc3' into next

Prepare v2025.10-rc3

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

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

7 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

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

7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 weeks agoi2c: omap24xx_i2c: remove unused members of struct omap_i2c
Rasmus Villemoes [Fri, 15 Aug 2025 06:17:19 +0000 (08:17 +0200)] 
i2c: omap24xx_i2c: remove unused members of struct omap_i2c

The clk and clk_id members of struct omap_i2c are not used anywhere,
and AFAICT never have been.

Signed-off-by: Rasmus Villemoes <ravi@prevas.dk>
Reviewed-by: Aniket Limaye <a-limaye@ti.com>
7 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
7 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>
7 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>
7 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>
7 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>
7 weeks agoqemu_arm: Select CONFIG_SYS_EARLY_PCI_INIT
Fabio Estevam [Thu, 14 Aug 2025 18:14:36 +0000 (15:14 -0300)] 
qemu_arm: Select CONFIG_SYS_EARLY_PCI_INIT

Select CONFIG_SYS_EARLY_PCI_INIT so that eMMC emulation can
work.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Tested-by: Jan Kiszka <jan.kiszka@siemens.com>
7 weeks agoKconfig: Convert SYS_EARLY_PCI_INIT to Kconfig
Fabio Estevam [Thu, 14 Aug 2025 18:14:35 +0000 (15:14 -0300)] 
Kconfig: Convert SYS_EARLY_PCI_INIT to Kconfig

The CONFIG_SYS_EARLY_PCI_INIT symbol is currently not supported
by Kconfig.

Make it a Kconfig symbol so that users could select it via defconfig.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 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>
7 weeks agomach-sc5xx: generate U-Boot proper in ADI ldr format
Philip Molloy [Thu, 14 Aug 2025 13:28:13 +0000 (13:28 +0000)] 
mach-sc5xx: generate U-Boot proper in ADI ldr format

Generating an ldr boot stream containing U-Boot Proper was never added
to U-Boot because it is done by the ADI Yocto layer. Add it to U-Boot to
support projects that do not use that layer.

Signed-off-by: Philip Molloy <philip.molloy@analog.com>
7 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.

7 weeks agoremoteproc: k3-r5: Add support for single cpu mode
Hari Nagalla [Wed, 13 Aug 2025 21:47:05 +0000 (16:47 -0500)] 
remoteproc: k3-r5: Add support for single cpu mode

Add early boot support for AM64 single cpu mode configuration.
In single CPU mode the 2nd core of the R5F cluster can't be used or
unavailable.

Signed-off-by: Hari Nagalla <hnagalla@ti.com>
7 weeks agoboard: phytec: common: k3: Making setup_mac_from_eeprom optional
John Ma [Wed, 13 Aug 2025 21:31:16 +0000 (14:31 -0700)] 
board: phytec: common: k3: Making setup_mac_from_eeprom optional

Making the setup_mac_from_eeprom optional for boards without
CONFIG_PHYTEC_SOM_DETECTION_BLOCKS.

Signed-off-by: John Ma <jma@phytec.com>
Reviewed-by: Wadim Egorov <w.egorov@phytec.de>
7 weeks agocommon: spl: fix compilation warning
Leo Yu-Chi Liang [Wed, 13 Aug 2025 06:16:35 +0000 (14:16 +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>
7 weeks agoserial-uclass: set GD_FLG_SERIAL_READY only when cur_serial_dev is assigned
Maxim Kochetkov [Wed, 13 Aug 2025 05:54:32 +0000 (08:54 +0300)] 
serial-uclass: set GD_FLG_SERIAL_READY only when cur_serial_dev is assigned

serial_find_console_or_panic() may left cur_serial_dev unassigned if
REQUIRE_SERIAL_CONSOLE is not set. Setting GD_FLG_SERIAL_READY in
this situation confuses serial console code. It tries to use
unassigned driver instead of debug port and stops printing.
So check cur_serial_dev before setting GD_FLG_SERIAL_READY to allow
console to keep printing via debug port.

Signed-off-by: Maxim Kochetkov <fido_max@inbox.ru>
7 weeks agosound: maxim_codec: Fix coding mistake
Andrew Goodbody [Tue, 12 Aug 2025 10:26:06 +0000 (11:26 +0100)] 
sound: maxim_codec: Fix coding mistake

In maxim_i2c_read the code mistakenly just returned the return value
from dm_i2c_read leaving the following code unreachable. Instead assign
ret to be the return value from dm_i2c_read so that the following code
can operate as expected.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
7 weeks agoMerge patch series "env: fat: Add support for NVME"
Tom Rini [Wed, 20 Aug 2025 20:24:57 +0000 (14:24 -0600)] 
Merge patch series "env: fat: Add support for NVME"

This series from Fabio Estevam <festevam@gmail.com> adds support for
having the environment be found on an NVMe device that contains a FAT
filesystem.

Link: https://lore.kernel.org/r/20250812174612.1159634-1-festevam@gmail.com
7 weeks agoenv: fat: Standardize the interface type check
Fabio Estevam [Tue, 12 Aug 2025 17:46:12 +0000 (14:46 -0300)] 
env: fat: Standardize the interface type check

Make the interface type check consistent among the other interface types
by checking it agains the ifname string.

The ifname string contains the string returned by env_fat_get_intf(), which
returns the CONFIG_ENV_FAT_INTERFACE value.

No functional change.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
7 weeks agoenv: ext4: Add support for NVME
Fabio Estevam [Tue, 12 Aug 2025 17:46:11 +0000 (14:46 -0300)] 
env: ext4: Add support for NVME

Add support for retrieving the EXT4 environment from an NVME device, the
same way it can be retrieved from MMC, SCSI, or VIRTIO.

To use the EXT4 environment from an NVME device, pass
CONFIG_ENV_EXT4_INTERFACE="nvme" in the defconfig.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
7 weeks agoenv: fat: Add support for NVME
Fabio Estevam [Tue, 12 Aug 2025 17:46:10 +0000 (14:46 -0300)] 
env: fat: Add support for NVME

Add support for retrieving the FAT environment from an NVME device, the
same way it can be retrieved from MMC, SCSI, or VIRTIO.

To use the FAT environment from an NVME device, pass
CONFIG_ENV_FAT_INTERFACE="nvme" in the defconfig.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
7 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>
7 weeks agoMerge patch series "Add support for Ethernet boot"
Tom Rini [Wed, 20 Aug 2025 17:07:22 +0000 (11:07 -0600)] 
Merge patch series "Add support for Ethernet boot"

Chintan Vankar <c-vankar@ti.com> says:

This series adds bind method for CPSW to avoid explicit probing, removes
explicit probing of CPSW, adds support for Ethernet boot on SK-AM68,
SK-AM62P-LP, J722S, SK-AM69.

Link: https://lore.kernel.org/r/20250731075956.605474-1-c-vankar@ti.com
7 weeks agoconfigs: am69_sk_a72_ethboot: Add configs to enable Ethernet boot
Chintan Vankar [Thu, 31 Jul 2025 07:59:56 +0000 (13:29 +0530)] 
configs: am69_sk_a72_ethboot: Add configs to enable Ethernet boot

Add configs required to enable Ethernet boot for SK-AM69.

Signed-off-by: Chintan Vankar <c-vankar@ti.com>
7 weeks agoconfigs: am69_sk_r5_ethboot: Add configs to enable Ethernet boot in R5SPL
Chintan Vankar [Thu, 31 Jul 2025 07:59:55 +0000 (13:29 +0530)] 
configs: am69_sk_r5_ethboot: Add configs to enable Ethernet boot in R5SPL

Add configs required to enable Ethernet boot for SK-AM69.

Signed-off-by: Chintan Vankar <c-vankar@ti.com>
7 weeks agoarm: mach-k3: j784s4_spl: Alias Ethernet boot to CPGMAC
Chintan Vankar [Thu, 31 Jul 2025 07:59:54 +0000 (13:29 +0530)] 
arm: mach-k3: j784s4_spl: Alias Ethernet boot to CPGMAC

This is required to enable spl_net boot on SK-AM69.

Signed-off-by: Chintan Vankar <c-vankar@ti.com>
7 weeks agoarm: mach-k3: j784s4: Update SoC auto-gen data to enable Ethernet boot
Chintan Vankar [Thu, 31 Jul 2025 07:59:53 +0000 (13:29 +0530)] 
arm: mach-k3: j784s4: Update SoC auto-gen data to enable Ethernet boot

Update dev-data and clk-data to include CPSW device which is required to
enable Ethernet boot for SK-AM69.

Signed-off-by: Chintan Vankar <c-vankar@ti.com>
7 weeks agoconfigs: j722s_evm_a53_ethboot: Enable configs required for Ethernet boot
Chintan Vankar [Thu, 31 Jul 2025 07:59:52 +0000 (13:29 +0530)] 
configs: j722s_evm_a53_ethboot: Enable configs required for Ethernet boot

Enable configs required to support Ethernet boot for J722S.

Signed-off-by: Chintan Vankar <c-vankar@ti.com>
7 weeks agoconfigs: j722s_evm_r5_ethboot: Add configs to enable Ethernet boot in R5SPL
Chintan Vankar [Thu, 31 Jul 2025 07:59:51 +0000 (13:29 +0530)] 
configs: j722s_evm_r5_ethboot: Add configs to enable Ethernet boot in R5SPL

Add configs to enable Ethernet boot in R5SPL, also disable not required
configs to avoid memory limitation.

Signed-off-by: Chintan Vankar <c-vankar@ti.com>
7 weeks agoboard: ti: j722s: evm: Enable cache for J722s
Chintan Vankar [Thu, 31 Jul 2025 07:59:50 +0000 (13:29 +0530)] 
board: ti: j722s: evm: Enable cache for J722s

Enable cache for J722s to optimize performance of CPU to access data from
memory.

Reviewed-by: Alexander Sverdlin <alexander.sverdlin@siemens.com>
Signed-off-by: Chintan Vankar <c-vankar@ti.com>
7 weeks agoarm: mach-k3: j722s: Update SoC autogenerated data to enable Ethernet boot
Chintan Vankar [Thu, 31 Jul 2025 07:59:49 +0000 (13:29 +0530)] 
arm: mach-k3: j722s: Update SoC autogenerated data to enable Ethernet boot

Update dev-data and clk-data to include CPSW device which is required to
enable Ethernet boot.

Signed-off-by: Chintan Vankar <c-vankar@ti.com>
7 weeks agoconfigs: am62px_evm_a53_ethboot: Enable configs required for Ethboot
Chintan Vankar [Thu, 31 Jul 2025 07:59:48 +0000 (13:29 +0530)] 
configs: am62px_evm_a53_ethboot: Enable configs required for Ethboot

Enable config options needed to support Ethernet boot on SK-AM62P-LP.

Signed-off-by: Chintan Vankar <c-vankar@ti.com>
7 weeks agoconfigs: am62px_evm_r5_ethboot: Add configs to enable Ethernet boot in R5SPL
Andreas Dannenberg [Thu, 31 Jul 2025 07:59:47 +0000 (13:29 +0530)] 
configs: am62px_evm_r5_ethboot: Add configs to enable Ethernet boot in R5SPL

Add configs for enabling Ethernet boot in R5SPL, also disable not required
configs to avoid memory limitation.

Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
Signed-off-by: Chintan Vankar <c-vankar@ti.com>
7 weeks agoboard: ti: am62px: evm: Enable cache for AM62p
Andreas Dannenberg [Thu, 31 Jul 2025 07:59:46 +0000 (13:29 +0530)] 
board: ti: am62px: evm: Enable cache for AM62p

Enable cache for AM62p to optimize performance of CPU to access data from
memory.

Reviewed-by: Alexander Sverdlin <alexander.sverdlin@siemens.com>
Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
Signed-off-by: Chintan Vankar <c-vankar@ti.com>
7 weeks agoarm: mach-k3: am62p: Update SoC auto-gen data to enable Ethernet boot
Andreas Dannenberg [Thu, 31 Jul 2025 07:59:45 +0000 (13:29 +0530)] 
arm: mach-k3: am62p: Update SoC auto-gen data to enable Ethernet boot

Update dev-data and clk-data to enable Ethernet boot using CPSW on
SK-AM62P-LP.

Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
Signed-off-by: Chintan Vankar <c-vankar@ti.com>
7 weeks agoconfigs: am68_sk_a72_ethboot: Enable configs required for Ethernet boot
Chintan Vankar [Thu, 31 Jul 2025 07:59:44 +0000 (13:29 +0530)] 
configs: am68_sk_a72_ethboot: Enable configs required for Ethernet boot

Enable config options needed to support Ethernet boot on AM68-SK.

Signed-off-by: Chintan Vankar <c-vankar@ti.com>
7 weeks agoconfigs: am68_sk_r5_ethboot: Add configs for enabling Ethernet boot in R5SPL
Chintan Vankar [Thu, 31 Jul 2025 07:59:43 +0000 (13:29 +0530)] 
configs: am68_sk_r5_ethboot: Add configs for enabling Ethernet boot in R5SPL

Add configs for enabling Ethernet boot in R5SPL, also disable not required
configs to avoid memory limitation.

Signed-off-by: Chintan Vankar <c-vankar@ti.com>
7 weeks agonet: ti: Kconfig: Enable SPL_SYSCON config for CPSW
Chintan Vankar [Thu, 31 Jul 2025 07:59:42 +0000 (13:29 +0530)] 
net: ti: Kconfig: Enable SPL_SYSCON config for CPSW

TI's Ethernet switch needs system controllers enabled in R5SPL stage while
booting via Ethernet. Enable SPL_SYSCON config for
CONFIG_TI_AM65_CPSW_NUSS.

Reviewed-by: Alexander Sverdlin <alexander.sverdlin@siemens.com>
Signed-off-by: Chintan Vankar <c-vankar@ti.com>
7 weeks agoarm: mach-k3: j721s2_spl: Alias Ethernet boot to CPGMAC
Chintan Vankar [Thu, 31 Jul 2025 07:59:41 +0000 (13:29 +0530)] 
arm: mach-k3: j721s2_spl: Alias Ethernet boot to CPGMAC

This is required to enable spl_net boot on SK-AM68.

Signed-off-by: Chintan Vankar <c-vankar@ti.com>
7 weeks agoarm: mach-k3: j721s2: Update SoC auto-gen data to enable Ethernet boot
Chintan Vankar [Thu, 31 Jul 2025 07:59:40 +0000 (13:29 +0530)] 
arm: mach-k3: j721s2: Update SoC auto-gen data to enable Ethernet boot

Update dev-data and clk-data to include CPSW device which is required to
enable Ethernet boot.

Reviewed-by: Bryan Brattlof <bb@ti.com>
Signed-off-by: Chintan Vankar <c-vankar@ti.com>
7 weeks agoRevert "arm: mach-k3: am62x: am625_init: Probe AM65 CPSW NUSS"
Chintan Vankar [Thu, 31 Jul 2025 07:59:39 +0000 (13:29 +0530)] 
Revert "arm: mach-k3: am62x: am625_init: Probe AM65 CPSW NUSS"

This reverts commit 35bddf889652081f150f60740618851b5d4817f4.

Bind method of "am65_cpsw_nuss" driver will ensure binding of it's child
driver "am65_cpsw_nuss_ports", and there is no need to probe CPSW driver
explicitly.

Signed-off-by: Chintan Vankar <c-vankar@ti.com>
7 weeks agoRevert "mach-k3: am642_init: Probe AM65 CPSW NUSS for R5/A53 SPL"
Chintan Vankar [Thu, 31 Jul 2025 07:59:38 +0000 (13:29 +0530)] 
Revert "mach-k3: am642_init: Probe AM65 CPSW NUSS for R5/A53 SPL"

This reverts commit 93c43a8365fae0f188ac091d129542470ddaf62d.

Bind method of "am65_cpsw_nuss" driver will ensure binding of it's child
driver "am65_cpsw_nuss_ports", and there is no need to probe CPSW driver
explicitly.

Signed-off-by: Chintan Vankar <c-vankar@ti.com>
7 weeks agoarch: mach-k3: common: Remove explicit probing of CPSW driver
Chintan Vankar [Thu, 31 Jul 2025 07:59:37 +0000 (13:29 +0530)] 
arch: mach-k3: common: Remove explicit probing of CPSW driver

This reverts commit e58d9284850fa78d364d264087fe744717963675.

Bind method of am65_cpsw_nuss driver will ensure binding of it's child
driver am65_cpsw_nuss_ports, and there is no need to call CPSW driver
explicitly. Remove explicit probing of CPSW driver for AM62x.

Signed-off-by: Chintan Vankar <c-vankar@ti.com>
7 weeks agonet: ti: am65-cpsw-nuss: Define bind method for CPSW driver
Chintan Vankar [Thu, 31 Jul 2025 07:59:36 +0000 (13:29 +0530)] 
net: ti: am65-cpsw-nuss: Define bind method for CPSW driver

CPSW driver is defined as UCLASS_MISC driver which needs to be probed
explicitly. Define bind method for CPSW driver to scan and bind
ethernet-ports with UCLASS_ETH driver which will eventually probe CPSW
driver and avoid probing CPSW driver explicitly.

Signed-off-by: Chintan Vankar <c-vankar@ti.com>
7 weeks agoMerge patch series "ram: k3-ddrss: Support partial inline ECC"
Tom Rini [Tue, 19 Aug 2025 17:26:39 +0000 (11:26 -0600)] 
Merge patch series "ram: k3-ddrss: Support partial inline ECC"

Neha Malcom Francis <n-francis@ti.com> says:

Currently, the inline ECC implementation enables inline ECC across the
entire DDR space. However this is not always required and a more common
ask is to have only a portion of the DDR protected as enabling ECC
impacts read/write performance metrics.

This series aims to modify the logic to firstly support partial inline
ECC in its' most basic form which works for single controllers. Then it
introduces an algorithm to support multi DDR controllers where
interleaving plays a role. Since interleaving is handled by the MSMC, it
only makes sense to have the MSMC decide the inline ECC ranges for each
DDR.

This series also introduces support for multiple partial regions of inline
ECC however due to complexity only support for single DDR is present now.

WIP: A commandline test case patch for verifying the correct behaviour
of inline ECC including partial case. Was targeted for v2 however a little
tricky to make it a general test case especially for multi-DDR cases, so
have not combined it in this series for now.

Testing:
- Memtester runs for J721S2 and J784S4 platforms with and without ECC
  enablement runs fine.
- Along with patches that add support for the commandline test (see WIP
  note above) J784S4 shows expected behavior for three sets of partial
  inline ECC regions (non-overlapping, and after modifying J784S4 to
  have single DDR instead of multi-DDR):
  https://gist.github.com/nehamalcom/bde7e14e96485e4a188c3af3af6d75d6

Link: https://lore.kernel.org/r/20250812124324.124306-1-n-francis@ti.com
7 weeks agoram: k3-ddrss: Support multiple ECC regions for a single controller
Neha Malcom Francis [Tue, 12 Aug 2025 12:43:24 +0000 (18:13 +0530)] 
ram: k3-ddrss: Support multiple ECC regions for a single controller

K3 Inline ECC mechanism can support up to 3 regions of inline ECC, add
this support for single controller.

Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
7 weeks agoram: k3-ddrss: Add support for partial inline ECC in multi-DDR systems
Neha Malcom Francis [Tue, 12 Aug 2025 12:43:23 +0000 (18:13 +0530)] 
ram: k3-ddrss: Add support for partial inline ECC in multi-DDR systems

The existing approach does not account for interleaving in the DDRs when
setting up regions. There is support for MSMC to calculate the regions
for each DDR, so modify k3_ddrss_probe to set the regions accordingly
for multi-DDR systems.

Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
7 weeks agoram: k3-ddrss: Add support for MSMC calculation of DDR inline ECC regions
Neha Malcom Francis [Tue, 12 Aug 2025 12:43:22 +0000 (18:13 +0530)] 
ram: k3-ddrss: Add support for MSMC calculation of DDR inline ECC regions

Add support for calculation of the protected regions for each DDR in
multi-DDR systems. Since MSMC is the parent node of the individual DDRs
as well as responsible for their interleaving, it only makes sense for
MSMC to contain the logic for dividing the regions.

Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
7 weeks agoram: k3-ddrss: Add support for number of controllers under MSMC
Neha Malcom Francis [Tue, 12 Aug 2025 12:43:21 +0000 (18:13 +0530)] 
ram: k3-ddrss: Add support for number of controllers under MSMC

In K3 multi-DDR systems, the MSMC is responsible for the interleave
mechanism across all the DDR controllers. Add support for MSMC to obtain
the number of controllers it's responsible for using the DT.

Reviewed-by: Udit Kumar <u-kumar1@ti.com>
Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
7 weeks agoram: k3-ddrss: Add CONFIG_K3_MULTI_DDR
Neha Malcom Francis [Tue, 12 Aug 2025 12:43:20 +0000 (18:13 +0530)] 
ram: k3-ddrss: Add CONFIG_K3_MULTI_DDR

As we increase the functionalities that the K3 DDRSS sub-system support,
it is becoming more evident that the same logic cannot apply to both
single as well as multiple DDR controller devices. Add
CONFIG_K3_MULTI_DDR to be used to differentiate between the two.

Reviewed-by: Udit Kumar <u-kumar1@ti.com>
Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
7 weeks agoram: k3-ddrss: Add support for a partial inline ECC region
Neha Malcom Francis [Tue, 12 Aug 2025 12:43:19 +0000 (18:13 +0530)] 
ram: k3-ddrss: Add support for a partial inline ECC region

Instead of defaulting to choosing the entire DDR region when enabling
inline ECC, allow picking of a range within the DDR space using DT to
enable.

It expects such a node within the memory node, in the absence of which
we resort to enabling inline ECC for the entire DDR region:

inline_ecc: protected@9e780000 {
        device_type = "ecc";
        reg = <0x9e780000 0x0080000>;
        bootph-all;
};

Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
7 weeks agoram: k3-ddrss: Add comment about ecc_reserved_space
Neha Malcom Francis [Tue, 12 Aug 2025 12:43:18 +0000 (18:13 +0530)] 
ram: k3-ddrss: Add comment about ecc_reserved_space

The reserved space needed for storing the parity remains the same no
matter the size of the region that is being protected. Add this as a
comment for better code understanding.

Reviewed-by: Udit Kumar <u-kumar1@ti.com>
Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
7 weeks agoram: k3-ddrss: s/K3_DDRSS_MAX_ECC_REGIONS/K3_DDRSS_MAX_ECC_REG
Neha Malcom Francis [Tue, 12 Aug 2025 12:43:17 +0000 (18:13 +0530)] 
ram: k3-ddrss: s/K3_DDRSS_MAX_ECC_REGIONS/K3_DDRSS_MAX_ECC_REG

To prevent checkpatch warning once we start using this macro more
frequently, shorten the length of it. While at it, also move the
structure k3_ddrss_ecc_region above k3_msmc so that future patches can
have it as a member of k3_msmc.

Reviewed-by: Udit Kumar <u-kumar1@ti.com>
Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
7 weeks agoram: k3-ddrss: Use DDR address instead of system address for ecc_regions
Neha Malcom Francis [Tue, 12 Aug 2025 12:43:16 +0000 (18:13 +0530)] 
ram: k3-ddrss: Use DDR address instead of system address for ecc_regions

Let ecc_regions[x].start reflect the start of the ECC region in terms of
DDR addressing rather than system addressing. This will make it easier
to extend the usage of the same ecc_regions structure for multi-DDR
systems as well.

Reviewed-by: Udit Kumar <u-kumar1@ti.com>
Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
7 weeks agoMerge patch series "soc: ti: k3-navss-ringacc: Fix Smatch reported issues"
Tom Rini [Tue, 19 Aug 2025 17:26:16 +0000 (11:26 -0600)] 
Merge patch series "soc: ti: k3-navss-ringacc: Fix Smatch reported issues"

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

Smatch reported issues including a derference of a pointer before its
NULL check and the use of an uninitialised variable.

Link: https://lore.kernel.org/r/20250812-k3-navss-v1-0-a88f7db58998@linaro.org
7 weeks agosoc: ti: k3-navss-ringacc: Do not use uninitialised variable
Andrew Goodbody [Tue, 12 Aug 2025 10:13:50 +0000 (11:13 +0100)] 
soc: ti: k3-navss-ringacc: Do not use uninitialised variable

In k3_nav_ringacc_probe_dt there can be no error code returned from
dev_read_u32_default so ret is not assigned to and should not be used.
Remove the use of ret from the dev_err call as it is unitialised.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
7 weeks agosoc: ti: k3-navss-ringacc: NULL check before dereference
Andrew Goodbody [Tue, 12 Aug 2025 10:13:49 +0000 (11:13 +0100)] 
soc: ti: k3-navss-ringacc: NULL check before dereference

Move the first dereference of ring to after the NULL check has occurred.
This will prevent any possible dereference of NULL.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
7 weeks agoMerge patch series "remoteproc: k3: Fix two Smatch issue reports"
Tom Rini [Tue, 19 Aug 2025 17:26:03 +0000 (11:26 -0600)] 
Merge patch series "remoteproc: k3: Fix two Smatch issue reports"

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

Smatch reported two issues, firstly attempting to compare a u8 to a 16
bit macro and secondly a potentially uninitialised variable.

Link: https://lore.kernel.org/r/20250808-remoteproc_tik3-v1-0-f7dae0b177b2@linaro.org
7 weeks agoremoteproc: k3-r5: Ensure ret is initialised
Andrew Goodbody [Fri, 8 Aug 2025 12:00:23 +0000 (13:00 +0100)] 
remoteproc: k3-r5: Ensure ret is initialised

In k3_r5f_split_reset and k3_r5f_unprepare ret may not have been
assigned to before the code reaches the return ret at the function exit.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
7 weeks agoremoteproc: ti_k3_arm64: Cannot set or compare u8 to 16bits
Andrew Goodbody [Fri, 8 Aug 2025 12:00:22 +0000 (13:00 +0100)] 
remoteproc: ti_k3_arm64: Cannot set or compare u8 to 16bits

In the struct ti_sci_proc the fields proc_id and host_id are declared as
u8 so cannot be set to nor compared with a macro defined with a value
using 16 bits. Change the macro to only use 8 bits to make the code work
as expected.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
7 weeks agosandbox: Add generic asm/atomic.h
Tom Rini [Tue, 12 Aug 2025 17:59:08 +0000 (11:59 -0600)] 
sandbox: Add generic asm/atomic.h

In order to compile code that uses <asm/atomic.h> on sandbox, we must
provide this header. RISC-V shows us today how to do so with the generic
header implementation, so copy that.

Signed-off-by: Tom Rini <trini@konsulko.com>
7 weeks agosandbox: Improve dummy local_irq_save implementation
Tom Rini [Tue, 12 Aug 2025 17:59:07 +0000 (11:59 -0600)] 
sandbox: Improve dummy local_irq_save implementation

Normally, local_save_flags is used as part of the local_irq_* macros, so
remove that as it's unused. Make local_irq_save do something to the
passed variable so that it won't trigger unused variable warnings later.

Signed-off-by: Tom Rini <trini@konsulko.com>
7 weeks agosound: rt5677: Cannot test unsigned for being negative
Andrew Goodbody [Tue, 12 Aug 2025 10:36:53 +0000 (11:36 +0100)] 
sound: rt5677: Cannot test unsigned for being negative

In rt5677_bic_or the call to rt5677_i2c_read returns an int so old
should also be an int to receive that value and then be able to test it
for being negative which would indicate an error.

This issue was found by Smatch.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
7 weeks agotools: aisimage: Make aisimage_check_params() static
Ilias Apalodimas [Tue, 12 Aug 2025 06:10:20 +0000 (09:10 +0300)] 
tools: aisimage: Make aisimage_check_params() static

We are trying to enable -Wmissing-prototypes and this functiion is only
used locally. Mark it as static.

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
7 weeks agotools: fit_info: Make usage() static
Ilias Apalodimas [Tue, 12 Aug 2025 06:03:25 +0000 (09:03 +0300)] 
tools: fit_info: Make usage() static

The function is only used locally so declare it as static.

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>