]> git.ipfire.org Git - thirdparty/u-boot.git/log
thirdparty/u-boot.git
10 hours agoGitlab CI: Switch to git.u-boot-project.org master
Tom Rini [Fri, 10 Jul 2026 16:37:06 +0000 (10:37 -0600)] 
Gitlab CI: Switch to git.u-boot-project.org

Now that we have everything available on git.u-boot-project.org, switch
URLs to that location.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
3 days agoMerge patch series "fs: btrfs: add support for readdir"
Tom Rini [Fri, 10 Jul 2026 21:55:23 +0000 (15:55 -0600)] 
Merge patch series "fs: btrfs: add support for readdir"

Alexey Charkov <alchark@flipper.net> says:

Btrfs in U-boot currently uses a custom callback for ls and doesn't
expose the standard opendir/readdir/closedir interface, making it harder
to use in generic code. One area where this would be useful is in
discovering BLS type 1 entries [1] on a Btrfs filesystem.

Add support for the standard interface, and implement ls in terms of it.

[1] https://lore.kernel.org/u-boot/20260604-bls-v1-0-4ce6d1ee4711@flipper.net/
Link: https://lore.kernel.org/r/20260626-btrfs-readdir-v2-0-7dd43f72d1b4@flipper.net
3 days agofs: btrfs: use fs_ls_generic() and drop custom implementation
Alexey Charkov [Fri, 26 Jun 2026 15:18:22 +0000 (19:18 +0400)] 
fs: btrfs: use fs_ls_generic() and drop custom implementation

Now that generic callbacks for opendir/readdir/closedir are implemented,
the custom btrfs_ls() implementation is no longer needed, along with the
btrfs_iter_dir() callback iterator.

Use fs_ls_generic() instead.

Signed-off-by: Alexey Charkov <alchark@flipper.net>
Reviewed-by: Qu Wenruo <wqu@suse.com>
3 days agofs: btrfs: implement opendir(), readdir() and closedir()
Alexey Charkov [Fri, 26 Jun 2026 15:18:21 +0000 (19:18 +0400)] 
fs: btrfs: implement opendir(), readdir() and closedir()

Add support for generic directory iteration with opendir(), readdir() and
closedir() in the btrfs filesystem driver.

Signed-off-by: Alexey Charkov <alchark@flipper.net>
Reviewed-by: Qu Wenruo <wqu@suse.com>
3 days agocmd: x86: zboot: remove duplicate zboot_setup() call in do_zboot_setup
Naveen Kumar Chaudhary [Fri, 26 Jun 2026 03:50:22 +0000 (09:20 +0530)] 
cmd: x86: zboot: remove duplicate zboot_setup() call in do_zboot_setup

do_zboot_setup() invokes zboot_setup() twice: once with proper error
reporting, and again immediately afterwards with no diagnostic. The
second call re-runs the entire boot parameter setup on the
already-populated zero page, which is at best wasted work and at
worst leaves the structure in an unexpected state.

Drop the stray second invocation; the first call already covers both
success and failure handling.

Fixes: cb19931ee56 ("x86: zboot: Drop intermediate zboot_setup() function")
Signed-off-by: Naveen Kumar Chaudhary <naveen.osdev@gmail.com>
3 days agocmd: upl: fix off-by-one argc check in do_upl_read
Naveen Kumar Chaudhary [Fri, 26 Jun 2026 03:49:18 +0000 (09:19 +0530)] 
cmd: upl: fix off-by-one argc check in do_upl_read

do_upl_read() guards against missing arguments with "argc < 1", but
argc always counts argv[0] (the command name) so that condition is
never true. The function then unconditionally dereferences argv[1],
which is out of bounds when the user runs "upl read" with no address
argument and feeds garbage into hextoul()/map_sysmem().

Use "argc < 2" so the address argument is actually required.

Fixes: 264f4b0b34c ("upl: Add a command")
Signed-off-by: Naveen Kumar Chaudhary <naveen.osdev@gmail.com>
3 days agocmd: ini: avoid NULL deref when loadaddr/filesize env vars are unset
Naveen Kumar Chaudhary [Fri, 26 Jun 2026 03:48:02 +0000 (09:18 +0530)] 
cmd: ini: avoid NULL deref when loadaddr/filesize env vars are unset

When the user runs "ini <section>" without explicit address or size
arguments, do_ini() falls back to env_get("loadaddr") and
env_get("filesize") and passes the results straight to hextoul().
env_get() returns NULL for an undefined variable and hextoul() does
not tolerate a NULL pointer, so on a board without these variables
set the command dereferences NULL.

Fetch the strings into locals first, reject the NULL case with
CMD_RET_USAGE, and only then convert to numeric values.

Fixes: c167cc02033 ("Add a new "ini" command")
Signed-off-by: Naveen Kumar Chaudhary <naveen.osdev@gmail.com>
3 days agocmd: host: fix duplicate device_unbind and wrong error message in unbind
Naveen Kumar Chaudhary [Fri, 26 Jun 2026 03:46:46 +0000 (09:16 +0530)] 
cmd: host: fix duplicate device_unbind and wrong error message in unbind

do_host_unbind()'s error handler for device_unbind() prints the
misleading message "Cannot attach file" and then calls device_unbind()
a second time on the same device, both of which look like copy-paste
mistakes left over from neighbouring code.

Remove the duplicate device_unbind() call and report the correct
failure with the device name.

Fixes: 952018117ab ("dm: sandbox: Switch over to using the new host uclass")
Signed-off-by: Naveen Kumar Chaudhary <naveen.osdev@gmail.com>
3 days agocmd: clone: report destination block number on dest write error
Naveen Kumar Chaudhary [Fri, 26 Jun 2026 03:45:42 +0000 (09:15 +0530)] 
cmd: clone: report destination block number on dest write error

The error path of the destination blk_dwrite() prints srcblk, which
refers to the source device's block counter and is unrelated to the
write that just failed. This produces misleading diagnostics that
point at the wrong block on the wrong device when a clone aborts on
a write error.

Print destblk so the message identifies the block that actually
failed, mirroring the existing "Src read error @blk %ld" message
above which correctly uses srcblk.

Fixes: 4a4830cf915 ("cmd: add clone command")
Signed-off-by: Naveen Kumar Chaudhary <naveen.osdev@gmail.com>
3 days agoremoteproc: k3-r5: Fix crash when issuing rproc init
Richard Genoud (TI) [Thu, 25 Jun 2026 13:30:06 +0000 (15:30 +0200)] 
remoteproc: k3-r5: Fix crash when issuing rproc init

Prevent NULL pointer dereference with lockstep mode.

Since commit 21d03d60e909 ("j7200 defconfig: add rproc commands"),
issuing rproc init command with cluster configured in lockstep results
in a NULL pointer dereference.

This is because ti_sci_proc_request() is called on both cores on the
same cluster, without checking if they are populated.
To fix that, only request the core being probed, as there is no need to
request the other one.

Moreover, the old code was requesting both cores in lockstep mode, but
only releasing one:
it called k3_r5f_proc_request() with ti_sci_proc_release(), instead of
using k3_r5f_proc_request()/k3_r5f_proc_release() or
ti_sci_proc_request()/ti_sci_proc_release().

So, replacing k3_r5f_proc_request() by ti_sci_proc_request() restores
the intended behavior.

Fixes: 21d03d60e909 ("j7200 defconfig: add rproc commands")
Signed-off-by: Richard Genoud (TI) <richard.genoud@bootlin.com>
3 days agotreewide: Kconfig: use bool instead of tristate
Anshul Dalal [Thu, 25 Jun 2026 03:17:06 +0000 (08:47 +0530)] 
treewide: Kconfig: use bool instead of tristate

U-Boot does not support modules, so having tristate options is useless.

Therefore this patch does a blind replace of all tristate options to
bool tree-wide.

Signed-off-by: Anshul Dalal <anshuld@ti.com>
Reviewed-by: Heiko Schocher <hs@nabladev.com>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Siddharth Vadapalli <s-vadapalli@ti.com>
Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
Reviewed-by: Romain Gantois <romain.gantois@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
3 days agoMerge tag 'u-boot-rockchip-2026.10-20260710' of https://git.u-boot-project.org/u...
Tom Rini [Fri, 10 Jul 2026 16:04:04 +0000 (10:04 -0600)] 
Merge tag 'u-boot-rockchip-2026.10-20260710' of https://git.u-boot-project.org/u-boot/custodians/u-boot-rockchip

CI: https://git.u-boot-project.org/u-boot/custodians/u-boot-rockchip/-/pipelines/597

- Add new rockchip custodian,
- Remove inactive rockchip custodian,
- Preemptively fix rk3528/rk356x DTS issue that will come with 7.1
  upstream DTS sync,
- Fix typo in doc,
- Fix variable used before being set in rockchip_nfc,
- Fix asm-operand-widths clang warning for RK3528, RK3576 and RK3588,
- Work around HW undefined state for NVMEs on RK3588 Jaguar,
- Added support for new devices:
  - LinkEase EasePi R1
  - 9Tripod X3568 v4

3 days agoboard: rockchip: Add support for 9Tripod X3568 v4
Coia Prant [Thu, 9 Jul 2026 18:51:01 +0000 (02:51 +0800)] 
board: rockchip: Add support for 9Tripod X3568 v4

The 9Tripod X3568 v4 is an RK3568-based SBC, just like the RK3568-EVB.
It always uses soldered connections between the X3568CV2/X3568CV3/X3568CV4 core board
and the X3568bv4 I/O board.

The differences between the core boards
- PCB size, layout
- CPU (RK3568B2/RK3568J)
- Memory type (DDR4/LPDDR4/LPDDR4X) and size
- eMMC size
- DSI/EDP resistor values
Although the components vary, they maintain full compatibility.

The X3568 board has multiple hardware revisions, and we currently support v4 (I/O board).

Specification:
- SoC: RockChip RK3568 ARM64 (4 cores)
- eMMC: 16-128 GB
- RAM: 2-16 GB
- Power: DC 12V 2A
- Ethernet: 2x YT8521SC RGMII (10/100/1000 Mbps)
- Wireless radio: 802.11b/g/n/ac/ax dual-band
- LED:
  Power: AlwaysOn
  User: GPIO
- Button:
  VOL+: SARADC/0 <35k µV>
  VOL-: SARADC/0 <450k µV>
  Power/Reset: PMIC RK809
- CAN
  CAN/1: 4-pin (PH 2.0)
- PWM
  PWM/4: Backlight DSI/0 DSI/1
  PWM/7: IR Receiver [may not install]
- UART:
  UART/2: Debug TTL - 1500000 8N1 (1.25mm)
  UART/3: TTL (PH 2.0)
  UART/4: TTL (PH 2.0)
  UART/8: AP6275S Bluetooth
  UART/9: TTL (PH 2.0)
- I2C:
  I2C/0: PMIC RK809
  I2C/1: Touchscreen DSI/0 DSI/1
  I2C/4: Camera
  I2C/5: RTC@51 PCF8563
- I2S:
  I2S/0: miniHDMI Sound
  I2S/1: RK809 Audio Codec
  I2S/3: AP6275S Bluetooth Sound
- SDMMC:
  SDMMC/0: microSD (TF) slot
  SDMMC/2: AP6275S SDIO WiFi card
- Camera: 1x CSI
- Video: miniHDMI / DSI0 (MIPI/LVDS) / DSI1 (MIPI/EDP)
- Audio: miniHDMI / MIC on-board / Speaker / SPDIF / 3.5mm Headphones / AP6275S Bluetooth
- USB:
  USB 2.0 HOST x2
  USB 2.0 HOST x3 (4-pin)
  USB 2.0 OTG x1 (shared with USB 3.0 OTG/HOST) [slot may not install]
  USB 3.0 HOST x1
  USB 3.0 OTG/HOST x1
- SATA: 1x SATA 3.0 with Power/4-pin [slot may not install]
- PCIe: 1x PCIe 3.0 x2 (x4 connector) [power/clock/slot may not install]

Link:
- https://appletsapi.52solution.com/media/X3568V4%E5%BC%80%E5%8F%91%E6%9D%BF%E7%A1%AC%E4%BB%B6%E6%89%8B%E5%86%8C.pdf
- https://blog.gov.cooking/archives/research-ninetripod-x3568-v4-and-flash.html

Signed-off-by: Coia Prant <coiaprant@gmail.com>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Link: https://patch.msgid.link/20260709185101.2149485-1-coiaprant@gmail.com
Signed-off-by: Quentin Schulz <u-boot@0leil.net>
3 days agoboard: rockchip: set M.2 NVMe PERSTN low in spl_board_init on Jaguar
Jakob Unterwurzacher [Thu, 25 Jun 2026 11:55:15 +0000 (13:55 +0200)] 
board: rockchip: set M.2 NVMe PERSTN low in spl_board_init on Jaguar

As it is, an NVMe's built-in PERSTN pull-up fights against the
SoC's built-in pull-down which results in an undefined logic state
on the Samsung SSD 980 and likely others.

Fix that by forcing PERSTN low as early as possible, which is SPL.

Both Linux and U-Boot (via "pci enum") set the pin high later
as needed and the NVMe is detected fine.

Oscillocope shots ("x" means undefined logic state at around 1.5V):

Before:

3V3     ____|‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
PERSTN  ____xxxxxxxxxxxxxxx_|‾‾‾‾‾
PCICLK  ____∿∿∿∿∿∿∿∿∿∿∿∿___∿∿∿∿∿∿∿
                    ^U-Boot     ^ Linux

After:

3V3     ____|‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
PERSTN  ____x_______________|‾‾‾‾‾
PCICLK  ____∿∿∿∿∿∿∿∿∿∿∿∿___∿∿∿∿∿∿∿
                    ^U-Boot     ^ Linux

With this change, the power-up sequence conforms to PCIe specs,
except a remaining short PERSTN glitch. The glitch is about 400ms
long. It could be shortened by moving the logic to TPL, but
completely fixing it is only possible in hardware.

Signed-off-by: Jakob Unterwurzacher <jakob.unterwurzacher@cherry.de>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Link: https://patch.msgid.link/20260625-pub-jaguar-puma-ringneck-tiger-v2025-07_nvme-v2-1-c57bf1020d63@cherry.de
Signed-off-by: Quentin Schulz <u-boot@0leil.net>
4 days agorockchip: fix asm-operand-widths clang warning
Quentin Schulz [Thu, 23 Apr 2026 14:05:13 +0000 (16:05 +0200)] 
rockchip: fix asm-operand-widths clang warning

CONFIG_COUNTER_FREQUENCY is currently 24000000 for all SoCs, meaning it
fits in a 32b type. For 64b SoCs, it's an issue since the registers are
64b.

clang complains that we're trying to fit a 32b value into a 64b
register:

arch/arm/mach-rockchip/rk3528/rk3528.c:98:45: error: value size does not match register size specified by the constraint and modifier [-Werror,-Wasm-operand-widths]
   98 |         asm volatile("msr cntfrq_el0, %0" : : "r" (CONFIG_COUNTER_FREQUENCY));
      |                                                    ^
include/generated/autoconf.h:372:34: note: expanded from macro 'CONFIG_COUNTER_FREQUENCY'
  372 | #define CONFIG_COUNTER_FREQUENCY 24000000
      |                                  ^
/home/qschulz/work/upstream/u-boot/arch/arm/mach-rockchip/rk3528/rk3528.c:98:32: note: use constraint modifier "w"
   98 |         asm volatile("msr cntfrq_el0, %0" : : "r" (CONFIG_COUNTER_FREQUENCY));
      |                                       ^~
      |                                       %w0

Even though cntfrq_el0[1] is only using the 32b LSB of its 64b, use the
'x' operand modifier[2] to force the value to be 64b and fix the
warning.

[1] https://developer.arm.com/documentation/ddi0601/2026-03/AArch64-Registers/CNTFRQ-EL0--Counter-timer-Frequency-Register?lang=en
[2] https://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html#AArch64-Operand-Modifiers

Suggested-by: Mark Kettenis <mark.kettenis@xs4all.nl>
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Link: https://patch.msgid.link/20260423-rk35-cnt-freq-v1-1-8f07677be5ca@cherry.de
Signed-off-by: Quentin Schulz <u-boot@0leil.net>
4 days agorockchip: rk3568: Add support for LinkEase EasePi R1
Liangbin Lian [Thu, 25 Jun 2026 12:58:18 +0000 (20:58 +0800)] 
rockchip: rk3568: Add support for LinkEase EasePi R1

LinkEase EasePi R1 [1] is a high-performance mini router.

Specification:
- Rockchip RK3568
- 2GB/4GB LPDDR4 RAM
- 16GB on-board eMMC
- 1x M.2 key for 2280 NVMe (PCIe 3.0)
- 1x USB 3.0 Type-A
- 1x USB 2.0 Type-C (for USB flashing)
- 2x 1000 Base-T (native, RTL8211F)
- 2x 2500 Base-T (PCIe, RTL8125B)
- 1x HDMI 2.0 Output
- 12v DC Jack
- 1x Power key connected to PMIC
- 2x LEDs (one static power supplied, one GPIO controlled)

[1] https://doc.linkease.com/zh/guide/easepi-r1/hardware.html

Signed-off-by: Liangbin Lian <jjm2473@gmail.com>
Link: https://patch.msgid.link/20260625125818.18914-2-jjm2473@gmail.com
Signed-off-by: Quentin Schulz <u-boot@0leil.net>
4 days agomtd: nand: raw: rockchip_nfc: fix oobfree length calculation
Johan Jonker [Tue, 30 Jun 2026 13:32:46 +0000 (15:32 +0200)] 
mtd: nand: raw: rockchip_nfc: fix oobfree length calculation

The oobfree[0].length calculation depends on the
rknand->metadata_size value, but this is calculated
after the function rk_nfc_ecc_init is called. Move this
calculation to a location before it's value is required.

Fixes: 1b3fcb3c0456 ("mtd: nand: raw: rockchip_nfc: add layout structure")
Signed-off-by: Johan Jonker <jbx6244@gmail.com>
Tested-by: Hüseyin BIYIK <boogiepop@gmx.com>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Link: https://patch.msgid.link/12b6e0d5-637e-446e-9e4b-82c82e6fad40@gmail.com
Signed-off-by: Quentin Schulz <u-boot@0leil.net>
4 days agoMerge tag 'i2c-updates-for-2026.10-rc1' of https://git.u-boot-project.org/u-boot...
Tom Rini [Thu, 9 Jul 2026 17:42:48 +0000 (11:42 -0600)] 
Merge tag 'i2c-updates-for-2026.10-rc1' of https://git.u-boot-project.org/u-boot/custodians/hs/u-boot-i2c

i2c updates for 2026.10-rc1

- i2c: designware: fix i2c probe error
  from Coben

  It would be good to have some Testers...

- i2c: nx_i2c: updates from Peng

  - Added License information
  - use dev_read_addr_ptr()

- cmd: kconfig: i2c: add missing I2C API dependency
  from Julien

4 days agorockchip: doc: fix typo evb-rk3288-rk808_defconfig
Johan Jonker [Tue, 30 Jun 2026 14:01:00 +0000 (16:01 +0200)] 
rockchip: doc: fix typo evb-rk3288-rk808_defconfig

Use correct defconfig name for evb-rk3288-rk808.

Fixes: f339d6a9c3c2 ("rockchip: Switch remaining rk3288 boards to upstream devicetree")
Signed-off-by: Johan Jonker <jbx6244@gmail.com>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Link: https://patch.msgid.link/d0f7ce27-ad87-4910-be25-e867b5af4956@gmail.com
Signed-off-by: Quentin Schulz <u-boot@0leil.net>
4 days agoarm: dts: rockchip: Align OTP nodes for RK3528/RK356x with Linux v7.1
Jonas Karlman [Tue, 7 Jul 2026 10:09:17 +0000 (10:09 +0000)] 
arm: dts: rockchip: Align OTP nodes for RK3528/RK356x with Linux v7.1

The <soc>-u-boot.dtsi OTP nodes for RK3528/RK356x use different names
compared to the OTP nodes that was merged in Linux v7.1. This causes
build issues when dts/upstream pulls in updated DTs, i.e.:

  ERROR (duplicate_label): /soc/nvmem@ffce0000: Duplicate label 'otp'
                           on /soc/nvmem@ffce0000 and /soc/efuse@ffce0000

  ERROR (duplicate_label): /nvmem@fe38c000: Duplicate label 'otp'
                           on /nvmem@fe38c000 and /efuse@fe38c000

Align the OTP node names in <soc>-u-boot.dtsi with the node names used
in upstream Linux v7.1 to avoid build issues when latest DTs are synced.

Also drop the unused RK356x id@a subnode as it has moved under a
nvmem-layout node in the merged upstream DT.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Link: https://patch.msgid.link/20260707100918.3057718-1-jonas@kwiboo.se
Signed-off-by: Quentin Schulz <u-boot@0leil.net>
4 days agoMAINTAINERS: add myself as ARM ROCKCHIP maintainer
Quentin Schulz [Tue, 7 Jul 2026 16:09:26 +0000 (18:09 +0200)] 
MAINTAINERS: add myself as ARM ROCKCHIP maintainer

Kever has been pulled into different responsibilities at Rockchip and
this means he has less to no time for his maintainership in U-Boot as
has been seen for about a year now. Let's try to improve the situation
and have Rockchip-related things merged again by adding myself as
another maintainer.

Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patch.msgid.link/20260707-rk-custodian-v1-12-dbc9c696e613@0leil.net
Signed-off-by: Quentin Schulz <u-boot@0leil.net>
4 days agoMAINTAINERS: remove Philipp Tomsich from ARM ROCKCHIP maintainers
Quentin Schulz [Tue, 7 Jul 2026 16:09:25 +0000 (18:09 +0200)] 
MAINTAINERS: remove Philipp Tomsich from ARM ROCKCHIP maintainers

Philipp hasn't been active for years so we thank Philipp for his work
over the years and update the MAINTAINERS entry to reflect the reality.

Reviewed-by: Tom Rini <trini@konsulko.com>
Link: https://patch.msgid.link/20260707-rk-custodian-v1-11-dbc9c696e613@0leil.net
Signed-off-by: Quentin Schulz <u-boot@0leil.net>
4 days agoMAINTAINERS: add rockusb to ARM ROCKCHIP
Quentin Schulz [Tue, 7 Jul 2026 16:09:24 +0000 (18:09 +0200)] 
MAINTAINERS: add rockusb to ARM ROCKCHIP

rockusb is a Rockchip feature, so let's match *anything* with that in
the path.

Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patch.msgid.link/20260707-rk-custodian-v1-10-dbc9c696e613@0leil.net
Signed-off-by: Quentin Schulz <u-boot@0leil.net>
4 days agoMAINTAINERS: add more Rockchip drivers to ARM ROCKCHIP
Quentin Schulz [Tue, 7 Jul 2026 16:09:23 +0000 (18:09 +0200)] 
MAINTAINERS: add more Rockchip drivers to ARM ROCKCHIP

A few drivers are not using "rockchip" in their path so they aren't
currently detected by get_maintainer.pl as belonging to the ARM ROCKCHIP
entry, so let's fix that oversight by adding them individually. We could
use N: rk_ but I feel this isn't distinctive enough to avoid too many
false positive and I don't want to be keeping a list of things to not
match against.

Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patch.msgid.link/20260707-rk-custodian-v1-9-dbc9c696e613@0leil.net
Signed-off-by: Quentin Schulz <u-boot@0leil.net>
4 days agoMAINTAINERS: add N: rkmtd regex to ARM ROCKCHIP
Quentin Schulz [Tue, 7 Jul 2026 16:09:22 +0000 (18:09 +0200)] 
MAINTAINERS: add N: rkmtd regex to ARM ROCKCHIP

rkmtd is a Rockchip feature, so let's match *anything* with that in the
path.

Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patch.msgid.link/20260707-rk-custodian-v1-8-dbc9c696e613@0leil.net
Signed-off-by: Quentin Schulz <u-boot@0leil.net>
4 days agoMAINTAINERS: add N: rv11 regex to ARM ROCKCHIP
Quentin Schulz [Tue, 7 Jul 2026 16:09:21 +0000 (18:09 +0200)] 
MAINTAINERS: add N: rv11 regex to ARM ROCKCHIP

Rockchip has an RV11xx SoC series (RV1103, RV1106, RV1126) so let's
match *anything* in U-Boot which contains this string in the path and
not only the U-Boot Device Trees.

Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patch.msgid.link/20260707-rk-custodian-v1-7-dbc9c696e613@0leil.net
Signed-off-by: Quentin Schulz <u-boot@0leil.net>
4 days agoMAINTAINERS: add N: rk8 regex to ARM ROCKCHIP
Quentin Schulz [Tue, 7 Jul 2026 16:09:20 +0000 (18:09 +0200)] 
MAINTAINERS: add N: rk8 regex to ARM ROCKCHIP

Rockchip also manufactures PMICs and regulators typically under the
RK8xx naming scheme (e.g. RK806, RK808, RK860, etc.) so let's match
files with rk8 in their path.

Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patch.msgid.link/20260707-rk-custodian-v1-6-dbc9c696e613@0leil.net
Signed-off-by: Quentin Schulz <u-boot@0leil.net>
4 days agoMAINTAINERS: add N: rk3 regex to ARM ROCKCHIP
Quentin Schulz [Tue, 7 Jul 2026 16:09:19 +0000 (18:09 +0200)] 
MAINTAINERS: add N: rk3 regex to ARM ROCKCHIP

Most Rockchip SoCs have their name start with rk3xxx. Historically, the
second digit is for the generation of SoC, e.g. rk31xx was before
rk32xx, itself before rk33xx and now rk35xx (and the expected rk36xx end
of this year). We won't talk about the rk30xx timeline but it's also
prefixed the same way. So let's match *anything* in U-Boot which
contains rk3 in the path to simplify the MAINTAINERS entry and hopefully
catch as much as possible.

board/firefly/ and board/pine64/ only contain subdirectories and each of
them have rk3 in their name.

Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patch.msgid.link/20260707-rk-custodian-v1-5-dbc9c696e613@0leil.net
Signed-off-by: Quentin Schulz <u-boot@0leil.net>
4 days agoMAINTAINERS: add N: px5 regex to ARM ROCKCHIP
Quentin Schulz [Tue, 7 Jul 2026 16:09:18 +0000 (18:09 +0200)] 
MAINTAINERS: add N: px5 regex to ARM ROCKCHIP

PX5 is a Rockchip SoC, so let's match *anything* in U-Boot which
contains this string in the path. However, this matches a bit too much,
specifically the PPC-based kmsupx5_defconfig so we need to exclude it
explicitly.

Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patch.msgid.link/20260707-rk-custodian-v1-4-dbc9c696e613@0leil.net
Signed-off-by: Quentin Schulz <u-boot@0leil.net>
4 days agoMAINTAINERS: add N: px30 regex to ARM ROCKCHIP
Quentin Schulz [Tue, 7 Jul 2026 16:09:17 +0000 (18:09 +0200)] 
MAINTAINERS: add N: px30 regex to ARM ROCKCHIP

PX30 is a Rockchip SoC, so let's match *anything* in U-Boot which
contains this string in the path.

Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patch.msgid.link/20260707-rk-custodian-v1-3-dbc9c696e613@0leil.net
Signed-off-by: Quentin Schulz <u-boot@0leil.net>
4 days agoMAINTAINERS: add rkmux.py to ARM ROCKCHIP
Quentin Schulz [Tue, 7 Jul 2026 16:09:16 +0000 (18:09 +0200)] 
MAINTAINERS: add rkmux.py to ARM ROCKCHIP

It is a tool to be used with Rockchip SoCs so let's add it to the
MAINTAINERS entry for ARM ROCKCHIP.

Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patch.msgid.link/20260707-rk-custodian-v1-2-dbc9c696e613@0leil.net
Signed-off-by: Quentin Schulz <u-boot@0leil.net>
4 days agoMAINTAINERS: remove redundant entries for ARM ROCKCHIP
Quentin Schulz [Tue, 7 Jul 2026 16:09:15 +0000 (18:09 +0200)] 
MAINTAINERS: remove redundant entries for ARM ROCKCHIP

The ARM ROCKCHIP entry already specifies an N: rockchip so we don't need
to repeat a path with F: if it has rockchip in the path, so drop it.

Note that for some reason get_maintainer.pl doesn't return the exact
same list before and after this patch.

Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patch.msgid.link/20260707-rk-custodian-v1-1-dbc9c696e613@0leil.net
Signed-off-by: Quentin Schulz <u-boot@0leil.net>
4 days agoMerge tag 'ubi-updates-for-2026.10-rc1' of https://source.denx.de/u-boot/custodians...
Tom Rini [Thu, 9 Jul 2026 14:02:23 +0000 (08:02 -0600)] 
Merge tag 'ubi-updates-for-2026.10-rc1' of https://source.denx.de/u-boot/custodians/u-boot-ubi

ubi updates for 2026.10-rc1

- fs: ubifs: fix ubifs_finddir() from Patrick
Fixes: 0cab29ff467e ("fs: ubifs: Fix and rework error handling in ubifs_finddir")
  fix test -e

- cmd: ubi: rework from Weijie
  - env: ubi: add support to create environment volume if it does not exist
  - cmd: ubi: allow creating volume with all free spaces in ubi_create_vol
  - cmd: ubi: export more APIs to public
  - cmd: ubi: reorganize command messages
  - cmd: ubi: change all positive error return value to negative
  - cmd: ubi: change the type of parameter dynamic to bool
  - cmd: ubifs: mark string parameters with const
  - cmd: ubi: use void * for buf parameter in ubi_volume_read
  - cmd: ubi: mark read-only function parameters with const
  - ubi: remove unnecessary extern directive from function prototypes

4 days agocmd: kconfig: i2c: add missing I2C API dependency
Julien Stephan [Thu, 2 Jul 2026 15:26:57 +0000 (17:26 +0200)] 
cmd: kconfig: i2c: add missing I2C API dependency

CMD_I2C relies on either the Driver Model I2C API or the legacy I2C
API, but its Kconfig currently does not enforce either dependency.

As a result, enabling CMD_I2C without DM_I2C or SYS_I2C_LEGACY can lead
to link errors due to unresolved i2c_* symbols.

Require either DM_I2C or SYS_I2C_LEGACY to prevent unsupported
configurations while preserving support for legacy platforms.

Signed-off-by: Julien Stephan <jstephan@baylibre.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Heiko Schocher <hs@nabladev.com>
5 days agoMerge patch series "pinctrl: add support of Airoha SoCs"
Tom Rini [Wed, 8 Jul 2026 19:42:17 +0000 (13:42 -0600)] 
Merge patch series "pinctrl: add support of Airoha SoCs"

Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu> says:

This patch series add pin controller and gpio driver support for EN7523/
AN7581/AN7583 SoCs. The driver based on official linux airoha pinctrl
and gpio driver with Matheus Sampaio Queiroga changes.

The original Matheus Sampaio Queiroga driver can be taken from the repo:
  https://sirherobrine23.com.br/airoha_en7523/kernel/src/branch/airoha_en7523_pinctrl

Additionally in the EN7523 case the patches removes existing gpio dts
nodes and replaces them with pinctrl node. It should not be very
dangerous, because:
 * No official EN7523 gpio support present in U-Boot
 * Legacy Linux EN7523 GPIO driver is mostly abandoned
 * The same driver is planned for upstream linux/openwrt

This patchset includes bitfield.h patches created for Linux kernel by
Geert Uytterhoeven. It suits U-Boot fine. I preserve original author and
original commit messages. Please note me, if there is a better way.

The patches were tested on EN7523/AN7581/AN7583 boards.

Link: https://lore.kernel.org/r/20260703115627.2317120-1-mikhail.kshevetskiy@iopsys.eu
5 days agoarm: dts: en7523: add pinctrl/gpio support, drop legacy gpio support
Mikhail Kshevetskiy [Fri, 3 Jul 2026 11:56:27 +0000 (14:56 +0300)] 
arm: dts: en7523: add pinctrl/gpio support, drop legacy gpio support

This patch adds pinctrl/gpio dts nodes for airoha pinctrl driver.
It also removes legacy gpio nodes.

It should not be very dangerous, because:
 * No official EN7523 gpio support present in U-Boot
 * The same driver is planned for upstream linux/openwrt

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
Reviewed-by: David Lechner <dlechner@baylibre.com>
5 days agoconfigs: airoha: en7523: enable pinctrl/gpio support
Mikhail Kshevetskiy [Fri, 3 Jul 2026 11:56:26 +0000 (14:56 +0300)] 
configs: airoha: en7523: enable pinctrl/gpio support

This enables EN7523 pin controller and gpio driver.
Defconfig was minimized with 'make savedefconfig'.

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
Reviewed-by: David Lechner <dlechner@baylibre.com>
5 days agoconfigs: airoha: an7581: enable pinctrl/gpio support
Mikhail Kshevetskiy [Fri, 3 Jul 2026 11:56:25 +0000 (14:56 +0300)] 
configs: airoha: an7581: enable pinctrl/gpio support

This enables AN7581 pin controller and gpio driver.
Defconfig was minimized with 'make savedefconfig'.

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
Reviewed-by: David Lechner <dlechner@baylibre.com>
5 days agopinctrl: airoha: add pin controller and gpio driver for EN7523 SoC
Mikhail Kshevetskiy [Fri, 3 Jul 2026 11:56:24 +0000 (14:56 +0300)] 
pinctrl: airoha: add pin controller and gpio driver for EN7523 SoC

This patch adds U-Boot pin controller and gpio driver for Airoha EN7523 SoC.

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
Reviewed-by: David Lechner <dlechner@baylibre.com>
5 days agopinctrl: airoha: add pin controller and gpio driver for AN7583 SoC
Mikhail Kshevetskiy [Fri, 3 Jul 2026 11:56:23 +0000 (14:56 +0300)] 
pinctrl: airoha: add pin controller and gpio driver for AN7583 SoC

This patch adds U-Boot pin controller and gpio driver for Airoha AN7583 SoC.

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
Reviewed-by: David Lechner <dlechner@baylibre.com>
5 days agopinctrl: airoha: add pin controller and gpio driver for AN7581 SoC
Mikhail Kshevetskiy [Fri, 3 Jul 2026 11:56:22 +0000 (14:56 +0300)] 
pinctrl: airoha: add pin controller and gpio driver for AN7581 SoC

This patch adds U-Boot pin controller and gpio driver for Airoha AN7581 SoC.

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
Reviewed-by: David Lechner <dlechner@baylibre.com>
5 days agopinctrl: airoha: add shared pinctrl code
Mikhail Kshevetskiy [Fri, 3 Jul 2026 11:56:21 +0000 (14:56 +0300)] 
pinctrl: airoha: add shared pinctrl code

This patch introduce shared Airoha pinctrl code.
Also it sorts contents of pinctrl makefile.

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
Reviewed-by: David Lechner <dlechner@baylibre.com>
5 days agopinctrl: sort and format the contents of the makefile
Mikhail Kshevetskiy [Fri, 3 Jul 2026 11:56:20 +0000 (14:56 +0300)] 
pinctrl: sort and format the contents of the makefile

sorting rules:
 * rules for generic pinctrl files placed first,
 * obj-y rules,
 * obj-$(CONFIG_ARCH_something) rules
 * obj-$(CONFIG_PINCTRL_something) rules

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
Reviewed-by: David Lechner <dlechner@baylibre.com>
5 days agopinctrl: add more pinconf/pinctrl definitions
Mikhail Kshevetskiy [Fri, 3 Jul 2026 11:56:19 +0000 (14:56 +0300)] 
pinctrl: add more pinconf/pinctrl definitions

These pinconf/pinctrl definitions will be used by the next patches.

The definitions was taken from public headers of linux-7.0. It's used
by several linux pinctrl drivers, so it might be helpful for U-Boot as
well.

Pinconf definitions are placed near the corresponding U-Boot definitions
in file include/dm/pinctrl.h. Pin/group/function definitions stored within
the same path as in linux (include/linux/pinctrl/pinctrl.h).

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
Reviewed-by: David Lechner <dlechner@baylibre.com>
5 days agoboard: renesas: gen5-cm33: Convert to common field_{get, prep}() helpers
Mikhail Kshevetskiy [Fri, 3 Jul 2026 11:56:18 +0000 (14:56 +0300)] 
board: renesas: gen5-cm33: Convert to common field_{get, prep}() helpers

Drop the driver-specific field_get() and field_prep() macros, in favor
of the globally available variants from <linux/bitfield.h>.

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
5 days agoclk: renesas: rcar-cpg-lib: Convert to common field_{get, prep}() helpers
Mikhail Kshevetskiy [Fri, 3 Jul 2026 11:56:17 +0000 (14:56 +0300)] 
clk: renesas: rcar-cpg-lib: Convert to common field_{get, prep}() helpers

Drop the driver-specific field_get() and field_prep() macros, in favor
of the globally available variants from <linux/bitfield.h>.

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
5 days agomtd: nand: raw: sunxi: Convert to common field_{get, prep}() helpers
Mikhail Kshevetskiy [Fri, 3 Jul 2026 11:56:16 +0000 (14:56 +0300)] 
mtd: nand: raw: sunxi: Convert to common field_{get, prep}() helpers

Drop the driver-specific field_get() and field_prep() macros, in favor
of the globally available variants from <linux/bitfield.h>.

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
5 days agonet: hifemac: Convert to common field_{get, prep}() helpers
Mikhail Kshevetskiy [Fri, 3 Jul 2026 11:56:15 +0000 (14:56 +0300)] 
net: hifemac: Convert to common field_{get, prep}() helpers

Drop the driver-specific field_get() and field_prep() macros, in favor
of the globally available variants from <linux/bitfield.h>.

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
5 days agopower: domain: renesas-r8a78000: Convert to common field_{get, prep}() helpers
Mikhail Kshevetskiy [Fri, 3 Jul 2026 11:56:14 +0000 (14:56 +0300)] 
power: domain: renesas-r8a78000: Convert to common field_{get, prep}() helpers

Drop the driver-specific field_get() and field_prep() macros, in favor
of the globally available variants from <linux/bitfield.h>.

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
5 days agowatchdog: renesas_wwdt: Convert to common field_{get, prep}() helpers
Mikhail Kshevetskiy [Fri, 3 Jul 2026 11:56:13 +0000 (14:56 +0300)] 
watchdog: renesas_wwdt: Convert to common field_{get, prep}() helpers

Drop the driver-specific field_get() and field_prep() macros, in favor
of the globally available variants from <linux/bitfield.h>.

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 days agobitfield: Add non-constant field_{prep, get}() helpers
Geert Uytterhoeven [Fri, 3 Jul 2026 11:56:12 +0000 (14:56 +0300)] 
bitfield: Add non-constant field_{prep, get}() helpers

The existing FIELD_{GET,PREP}() macros are limited to compile-time
constants.  However, it is very common to prepare or extract bitfield
elements where the bitfield mask is not a compile-time constant.

To avoid this limitation, the AT91 clock driver and several other
drivers already have their own non-const field_{prep,get}() macros.
Make them available for general use by adding them to
<linux/bitfield.h>, and improve them slightly:
  1. Avoid evaluating macro parameters more than once,
  2. Replace "ffs() - 1" by "__ffs()",
  3. Support 64-bit use on 32-bit architectures,
  4. Wire field_{get,prep}() to FIELD_{GET,PREP}() when mask is
     actually constant.

This is deliberately not merged into the existing FIELD_{GET,PREP}()
macros, as people expressed the desire to keep stricter variants for
increased safety, or for performance critical paths.

Yury: use __mask within new macros.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Acked-by: Crt Mori <cmo@melexis.com>
Acked-by: Nuno Sá <nuno.sa@analog.com>
Acked-by: Richard Genoud <richard.genoud@bootlin.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Reviewed-by: Yury Norov (NVIDIA) <yury.norov@gmail.com>
Signed-off-by: Yury Norov (NVIDIA) <yury.norov@gmail.com>
[Linux commit: c1c6ab80b25c8db1e2ef5ae3ac8075d2c242ae13]
Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
Reviewed-by: David Lechner <dlechner@baylibre.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 days agobitfield: Add less-checking __FIELD_{GET,PREP}()
Geert Uytterhoeven [Fri, 3 Jul 2026 11:56:11 +0000 (14:56 +0300)] 
bitfield: Add less-checking __FIELD_{GET,PREP}()

The BUILD_BUG_ON_MSG() check against "~0ull" works only with "unsigned
(long) long" _mask types.  For constant masks, that condition is usually
met, as GENMASK() yields an UL value.  The few places where the
constant mask is stored in an intermediate variable were fixed by
changing the variable type to u64.

However, for non-constant masks, smaller unsigned types should be valid,
too, but currently lead to "result of comparison of constant
18446744073709551615 with expression of type ... is always
false"-warnings with clang and W=1.

Hence refactor the __BF_FIELD_CHECK() helper, and factor out
__FIELD_{GET,PREP}().  The later lack the single problematic check, but
are otherwise identical to FIELD_{GET,PREP}(), and are intended to be
used in the fully non-const variants later.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Yury Norov (NVIDIA) <yury.norov@gmail.com>
[Linux commit: 2a6c045640c38a407a39cd40c3c4d8dd2fd89aa8]
Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
Reviewed-by: David Lechner <dlechner@baylibre.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Scott Wood <scottwood@freescale.com>
Acked-by: Gerald Van Baren <vanbaren@cideas.com>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 days agobitops: import BITS_PER_TYPE() macro from linux
Mikhail Kshevetskiy [Fri, 3 Jul 2026 11:56:10 +0000 (14:56 +0300)] 
bitops: import BITS_PER_TYPE() macro from linux

This macro will be used by include/linux/bitfield.h header.

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
Reviewed-by: David Lechner <dlechner@baylibre.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 days agoboard: renesas: gen5-cm33: #undef field_{get, prep}() before definition
Mikhail Kshevetskiy [Fri, 3 Jul 2026 11:56:09 +0000 (14:56 +0300)] 
board: renesas: gen5-cm33: #undef field_{get, prep}() before definition

Prepare for the advent of globally available common field_get() and
field_prep() macros by undefining the symbols before defining local
variants.  This prevents redefinition warnings from the C preprocessor
when introducing the common macros later.

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
5 days agoclk: renesas: #undef field_{get, prep}() before definition
Mikhail Kshevetskiy [Fri, 3 Jul 2026 11:56:08 +0000 (14:56 +0300)] 
clk: renesas: #undef field_{get, prep}() before definition

Prepare for the advent of globally available common field_get() and
field_prep() macros by undefining the symbols before defining local
variants.  This prevents redefinition warnings from the C preprocessor
when introducing the common macros later.

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
5 days agomtd: nand: raw: sunxi: #undef field_{get, prep}() before definition
Mikhail Kshevetskiy [Fri, 3 Jul 2026 11:56:07 +0000 (14:56 +0300)] 
mtd: nand: raw: sunxi: #undef field_{get, prep}() before definition

Prepare for the advent of globally available common field_get() and
field_prep() macros by undefining the symbols before defining local
variants.  This prevents redefinition warnings from the C preprocessor
when introducing the common macros later.

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
5 days agonet: hifemac: #undef field_{get, prep}() before definition
Mikhail Kshevetskiy [Fri, 3 Jul 2026 11:56:06 +0000 (14:56 +0300)] 
net: hifemac: #undef field_{get, prep}() before definition

Prepare for the advent of globally available common field_get() and
field_prep() macros by undefining the symbols before defining local
variants.  This prevents redefinition warnings from the C preprocessor
when introducing the common macros later.

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
5 days agopower: domain: renesas-r8a78000: #undef field_{get, prep}() before definition
Mikhail Kshevetskiy [Fri, 3 Jul 2026 11:56:05 +0000 (14:56 +0300)] 
power: domain: renesas-r8a78000: #undef field_{get, prep}() before definition

Prepare for the advent of globally available common field_get() and
field_prep() macros by undefining the symbols before defining local
variants.  This prevents redefinition warnings from the C preprocessor
when introducing the common macros later.

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
5 days agowatchdog: renesas_wwdt: #undef field_{get, prep}() before definition
Mikhail Kshevetskiy [Fri, 3 Jul 2026 11:56:04 +0000 (14:56 +0300)] 
watchdog: renesas_wwdt: #undef field_{get, prep}() before definition

Prepare for the advent of globally available common field_get() and
field_prep() macros by undefining the symbols before defining local
variants.  This prevents redefinition warnings from the C preprocessor
when introducing the common macros later.

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
5 days agoMerge tag 'xilinx-for-v2026.10-rc1-v3' of https://git.u-boot-project.org/u-boot/custo... 1007/head
Tom Rini [Wed, 8 Jul 2026 16:13:24 +0000 (10:13 -0600)] 
Merge tag 'xilinx-for-v2026.10-rc1-v3' of https://git.u-boot-project.org/u-boot/custodians/u-boot-amd

AMD/Xilinx/FPGA changes for v2026.10-rc1 v3

AMD:
- Firmware interface decoupling (part 1)

ZynqMP:
- DT updates
- Add TCG variant detection

Versal/Versal2:
- Drop DDR MMU mapping and map it dynamically

tools:
- Add register initialization to mkimage

MAINTAINERS:
- Clean Zynq/ZynqMP fragments

ufs:
- Fix driver reregistration

fpga:
- altera: Simplify driver conditional compilation selection

5 days agoenv: ubi: add support to create environment volume if it does not exist
Weijie Gao [Wed, 20 May 2026 08:27:41 +0000 (16:27 +0800)] 
env: ubi: add support to create environment volume if it does not exist

When U-Boot is booting from a fresh device, the environment volume may not
exist in the factory UBI image. This is a common case where factory UBI
image contains only volumes with valid data.

With the current design, even if the volume is created manually, the
environment will still be unusable (e.g., saveenv) before a reboot.

This patch adds support to automatically create missing volumes before
loading environment. This will make environment available at first boot.

There are two options:
CONFIG_ENV_UBI_VOLUME_CREATE: whether to enable volume creation
CONFIG_ENV_UBI_VOLUME_STATIC: create static volume (default is dynamic)

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
5 days agocmd: ubi: allow creating volume with all free spaces in ubi_create_vol
Weijie Gao [Wed, 20 May 2026 08:27:40 +0000 (16:27 +0800)] 
cmd: ubi: allow creating volume with all free spaces in ubi_create_vol

Although the ubi command itself supports creating volume with all
free spaces, the api ubi_create_vol() does not.

Since negative size is invalid, this patch replaces negative size
with all free space size in ubi_create_vol().

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
5 days agocmd: ubi: export more APIs to public
Weijie Gao [Wed, 20 May 2026 08:27:38 +0000 (16:27 +0800)] 
cmd: ubi: export more APIs to public

Export the following functions to public:

- ubi_detach(): this is paired with ubi_part(). One may call this function
  to completely clean up the ubi subsystem after using ubi_part().

- ubi_{create,find,remove}_vol: this is a set of functions for volume
  management.

The original ubi_remove_vol is renamed to __ubi_remove_vol to allow the new
ubi_remove_vol() being used as a wrapper for __ubi_remove_vol() with volume
name.

Also, comments are added for all exported functions.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
5 days agocmd: ubi: reorganize command messages
Weijie Gao [Wed, 20 May 2026 08:27:36 +0000 (16:27 +0800)] 
cmd: ubi: reorganize command messages

This patch moves normal subcommand messages into the main command function.
This will allow current and potential api functions being called with clean
output on success.

A new function ubi_require_volume() is added for finding and printing error
message if volume not found. The original ubi_find_volume() will be silent
for being an api function.

To avoid ubi_require_volume() being called twice for volume read/remove,
some changes are required:
- The parameter of ubi_remove_vol() is changed to accept
'struct ubi_volume *' directly.
- The original ubi_volume_read() is renamed to __ubi_volume_read, with its
  first parameter changed to accept also 'struct ubi_volume *' directly.
- A new ubi_volume_read() is added to wrap __ubi_volume_read() to accept
  volume name as its first parameter.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
5 days agocmd: ubi: change all positive error return value to negative
Weijie Gao [Wed, 20 May 2026 08:27:35 +0000 (16:27 +0800)] 
cmd: ubi: change all positive error return value to negative

Change all return value using errno codes to negative. This makes it
consistent with the linux ubi layer.

Also, to follow the standard definition of U-Boot command, in the do_ubi()
command handler, the return value is converted to CMD_RET_FAILURE for error
returning, and CMD_RET_USAGE for incorrect usage.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
5 days agocmd: ubi: change the type of parameter dynamic to bool
Weijie Gao [Wed, 20 May 2026 08:27:33 +0000 (16:27 +0800)] 
cmd: ubi: change the type of parameter dynamic to bool

This patch changes the type of the 'dynamic' parameter of ubi_create_vol()
to bool as it's used as a boolean.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
5 days agocmd: ubifs: mark string parameters with const
Weijie Gao [Wed, 20 May 2026 08:27:31 +0000 (16:27 +0800)] 
cmd: ubifs: mark string parameters with const

File name and volume name should be const as they will not be modified in
these functions.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
5 days agocmd: ubi: use void * for buf parameter in ubi_volume_read
Weijie Gao [Wed, 20 May 2026 08:27:30 +0000 (16:27 +0800)] 
cmd: ubi: use void * for buf parameter in ubi_volume_read

Use void * to avoid explicit type casting as what ubi_volume_write has done
already.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
5 days agocmd: ubi: mark read-only function parameters with const
Weijie Gao [Wed, 20 May 2026 08:27:28 +0000 (16:27 +0800)] 
cmd: ubi: mark read-only function parameters with const

Parameters like part/volume name and buffer for writing are not being
modified by the callee functions and should be marked const.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
5 days agoubi: remove unnecessary extern directive from function prototypes
Weijie Gao [Wed, 20 May 2026 08:27:25 +0000 (16:27 +0800)] 
ubi: remove unnecessary extern directive from function prototypes

The extern directive is unnecessary for function declaration and should be
removed.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
5 days agofs: ubifs: fix ubifs_finddir() result check
Patrick Delaunay [Tue, 9 Jun 2026 09:00:41 +0000 (11:00 +0200)] 
fs: ubifs: fix ubifs_finddir() result check

ubifs_finddir() can return a negative error code (-ENOMEM or
PTR_ERR(dent)) and returns 1 when the name is found in the directory.
Fix the result check accordingly.

This fixes file existence detection (for "test -e") when U-Boot uses
UBIFS through ops ubifs_exists(). Since this function is also called
before other file operations, commands such as "load" could be executed
on a non-existing file without reporting an error.

Fixes: 0cab29ff467e ("fs: ubifs: Fix and rework error handling in ubifs_finddir")
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
5 days agoi2c: designware: fix i2c probe error
Coben Han [Thu, 11 Jun 2026 03:06:46 +0000 (12:06 +0900)] 
i2c: designware: fix i2c probe error

Probing i2c slave device just needs its device address.

A certain type of chipsets such as RTC S35390A have no offset,
which means address length should be 0.

But the current designware_i2c_probe_chip function requires
offset 0 and its length 1.

This causes the designware-i2c to be initialized again and again.

Furthermore, after booting into kernel, the designware-i2c kernel
driver complains its controller timeout.

This patch fixes this misbehaviour in such way that  only device
address is issued, no reinitialization needs when target device
not detected, the designware-i2c kernel driver continues working.

Signed-off-by: Coben Han <cobenhan@mediastek.com>
5 days agoi2c: nx: Add License
Peng Fan [Mon, 25 May 2026 04:03:03 +0000 (12:03 +0800)] 
i2c: nx: Add License

Add License information for nx_i2c driver.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Heiko Schocher <hs@nabladev.com>
5 days agoi2c: nx: Use dev_read_addr_ptr()
Peng Fan [Mon, 25 May 2026 04:03:02 +0000 (12:03 +0800)] 
i2c: nx: Use dev_read_addr_ptr()

Use dev_read_addr_ptr() which supports both live device tree and flat DT
backends, avoiding direct dependency on devfdt_* helpers.

No functional changes.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Heiko Schocher <hs@nabladev.com>
5 days agoarm: dts: zynqmp: Fix space indentation to use tabs
Michal Simek [Mon, 29 Jun 2026 09:46:36 +0000 (11:46 +0200)] 
arm: dts: zynqmp: Fix space indentation to use tabs

Fix indentation issues where spaces were used instead of tabs in several
ZynqMP device tree overlay files. Device tree files should use tabs for
indentation to maintain consistency with the kernel coding style.

Reviewed-by: Tomas Melin <tomas.melin@vaisala.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://patch.msgid.link/0dc7b65ebd48676719ace15a505ecec2f324822a.1782726386.git.michal.simek@amd.com
5 days agoarm64: xilinx: Add missing newline in kr260-revA
Michal Simek [Mon, 29 Jun 2026 09:46:35 +0000 (11:46 +0200)] 
arm64: xilinx: Add missing newline in kr260-revA

Add missing newline available in Linux already.

Reviewed-by: Tomas Melin <tomas.melin@vaisala.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://patch.msgid.link/ab6f006ee87efb54ee17f24a12c9f31aafc2f2ae.1782726386.git.michal.simek@amd.com
5 days agoarm64: zynqmp: Disable ina226 iio-hwmon nodes
Michal Simek [Mon, 29 Jun 2026 09:46:34 +0000 (11:46 +0200)] 
arm64: zynqmp: Disable ina226 iio-hwmon nodes

ina226 IIO driver doesn't need to be enabled by default in Linux that's why
disable iio-hwmon nodes to avoid warnings about it.

Reviewed-by: Tomas Melin <tomas.melin@vaisala.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://patch.msgid.link/deb2e92d5030a31dbb91b36fa77de3ad2de38a71.1782726386.git.michal.simek@amd.com
5 days agoarch: arm: dts: Add RTC clock nodes for ZynqMP platform
Harini T [Mon, 29 Jun 2026 09:46:33 +0000 (11:46 +0200)] 
arch: arm: dts: Add RTC clock nodes for ZynqMP platform

Add fixed RTC clock nodes at 32.768 kHz for ZynqMP. The RTC driver uses
this clock to calculate the calibration value, replacing the deprecated
calibration device tree property.

Signed-off-by: Harini T <harini.t@amd.com>
Reviewed-by: Tomas Melin <tomas.melin@vaisala.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://patch.msgid.link/8838c8c4fcd0dfe151bcee2a6c4da51df81e23cb.1782726386.git.michal.simek@amd.com
5 days agoarm64: versal-net: Add mmc_get_env_dev() and deduplicate MMC handling
Michal Simek [Tue, 23 Jun 2026 12:53:43 +0000 (14:53 +0200)] 
arm64: versal-net: Add mmc_get_env_dev() and deduplicate MMC handling

The SD and eMMC cases in boot_targets_setup() duplicated the MMC device
lookup, and versal-net relied on the weak mmc_get_env_dev() default
instead of selecting the device matching the boot mode (unlike versal and
zynqmp).

Factor the lookup into mmc_get_bootseq(), mirroring spi_get_bootseq():
it maps the boot mode to the MMC node and returns the device sequence,
optionally handing back the mode banner so only boot_targets_setup()
prints it. mmc_get_env_dev() is now provided as a thin wrapper, and the
SD/eMMC cases call the helper instead of open-coding the lookups. The
local udevice pointer in boot_targets_setup() is no longer needed.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://patch.msgid.link/7750a79c17146c66adeb83ad6d1bfa78b22ec8fa.1782219202.git.michal.simek@amd.com
5 days agoarm64: versal-net: Look up eMMC device in boot_targets_setup()
Michal Simek [Tue, 23 Jun 2026 12:53:42 +0000 (14:53 +0200)] 
arm64: versal-net: Look up eMMC device in boot_targets_setup()

The EMMC_MODE case set bootseq from dev_seq(dev) without ever assigning
dev, so it used an uninitialized pointer and produced a bogus device
sequence in boot_targets.

eMMC is wired to the SD1 controller (mmc@f1050000, see
versal-net-mini-emmc.dts). Look that device up like the SD cases do
before using its sequence number.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://patch.msgid.link/bf779dcdd30c900d7614c0fa8382cb3f4cb57c20.1782219202.git.michal.simek@amd.com
5 days agoarm64: versal-net: Do not print bootmode from spi_get_env_dev()
Michal Simek [Tue, 23 Jun 2026 12:53:41 +0000 (14:53 +0200)] 
arm64: versal-net: Do not print bootmode from spi_get_env_dev()

spi_get_bootseq() printed the QSPI/OSPI mode banner, which is noise when
called from spi_get_env_dev() during environment setup. The banner is
only meaningful for the "Bootmode:" announcement in boot_targets_setup().

Make spi_get_bootseq() a pure lookup that returns the banner string
through an optional output argument instead of printing it.
spi_get_env_dev() passes NULL and stays silent, while
boot_targets_setup() prints the returned mode name as before.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://patch.msgid.link/ae257af9d2fe026306b32c647e406450319a3c7a.1782219202.git.michal.simek@amd.com
5 days agoarm64: versal-net: Simplify spi_get_bootseq() bootmode switch
Michal Simek [Tue, 23 Jun 2026 12:53:40 +0000 (14:53 +0200)] 
arm64: versal-net: Simplify spi_get_bootseq() bootmode switch

The QSPI and OSPI cases only differ in the SPI device name. Pick the name
in the switch and perform a single uclass_get_device_by_name() lookup
afterwards, instead of repeating the lookup and dev_seq() in every case.

No functional change.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://patch.msgid.link/191f0f583e2d02c184ea2a2a2fe0ef473ca9fe61.1782219202.git.michal.simek@amd.com
5 days agoarm64: versal-net: Deduplicate SPI bootmode handling
Michal Simek [Tue, 23 Jun 2026 12:53:39 +0000 (14:53 +0200)] 
arm64: versal-net: Deduplicate SPI bootmode handling

spi_get_env_dev() and boot_targets_setup() both decoded the QSPI/OSPI
boot modes into a SPI device sequence number with identical
uclass_get_device_by_name() lookups.

Factor that logic into a single spi_get_bootseq() helper that takes the
bootmode and returns the device sequence. spi_get_env_dev() becomes a
thin wrapper around it, and boot_targets_setup() calls it for the
QSPI/OSPI cases instead of open-coding the lookups. Passing the bootmode
in avoids reading the bootmode register twice in boot_targets_setup().

No functional change.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://patch.msgid.link/f98037220a20c441f0ea964f94647948bc035997.1782219202.git.michal.simek@amd.com
5 days agoarm64: zynqmp: Decouple MMIO accessors from firmware
Michal Simek [Tue, 23 Jun 2026 12:53:38 +0000 (14:53 +0200)] 
arm64: zynqmp: Decouple MMIO accessors from firmware

zynqmp_mmio_read() and zynqmp_mmio_write() selected between direct MMIO
and the firmware (PM_MMIO_READ/WRITE) interface with an in-function
IS_ENABLED(CONFIG_ZYNQMP_FIRMWARE) / current_el() check. Generic arch
code should not carry firmware-specific ifdefs, and with SCMI the access
method changes again.

Split the accessors like the multiboot and bootmode hooks: the weak
default in arch/arm/mach-zynqmp does the direct MMIO access (used in SPL,
at EL3 and when no firmware is present), while firmware-zynqmp.c provides
a strong definition that issues the firmware call and falls back to the
direct access in SPL/EL3 where the SMC path is unavailable. The raw MMIO
primitives zynqmp_mmio_rawread() and zynqmp_mmio_rawwrite() are exported
for the shared fallback, and the read-modify-write helper now uses the
raw read instead of routing through the firmware-aware accessor.

The firmware-vs-MMIO decision is selected at link time, so adding SCMI
later only requires a third strong definition with no changes to generic
code.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://patch.msgid.link/d532df144d2c8e34be835bad6d0de3b26befdf01.1782219202.git.michal.simek@amd.com
5 days agoarm64: versal-net: Move bootmode decoding out of board code
Michal Simek [Tue, 23 Jun 2026 12:53:37 +0000 (14:53 +0200)] 
arm64: versal-net: Move bootmode decoding out of board code

versal_net_get_bootmode() open-coded the
IS_ENABLED(CONFIG_ZYNQMP_FIRMWARE) selection between the firmware call
zynqmp_pm_get_bootmode_reg() and a direct readl() in board code. Like
the Versal change, move the whole function behind an overridable hook so
generic board code stays free of firmware specifics and is ready for
SCMI.

The weak versal_net_get_bootmode() in arch/arm/mach-versal-net does the
plain MMIO read via versal_net_bootmode_reg() and decodes it (used at EL3
and without firmware). When CONFIG_ZYNQMP_FIRMWARE is enabled,
firmware-zynqmp.c provides a strong definition that reads the register
through the firmware call, falling back to the direct read at EL3 where
the SMC path to firmware is unavailable. This preserves the existing
firmware-based bootmode behaviour while removing the firmware interface
from board code; the now unused zynqmp_firmware.h include is dropped.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://patch.msgid.link/be67e9c6d0bc36840a46594413886d2003967c64.1782219202.git.michal.simek@amd.com
5 days agoarm64: versal-net: Move SoC detection out of board code
Michal Simek [Tue, 23 Jun 2026 12:53:36 +0000 (14:53 +0200)] 
arm64: versal-net: Move SoC detection out of board code

soc_detection() and soc_name_decode() read the PMC_TAP version/idcode
registers and decode the platform. This is SoC information rather than
board policy, and a firmware interface could provide it instead, so it
does not belong in board code.

Move both functions, together with the shared platform_id and
platform_version state, into arch/arm/mach-versal-net where they still
override the weak stubs in the Xilinx common board code. The board file
drops the now unused linux/bitfield.h include.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://patch.msgid.link/8757111cb254543d61541fb030d51f62c3c555a8.1782219202.git.michal.simek@amd.com
5 days agoarm64: versal2: Move SoC detection out of board code
Michal Simek [Tue, 23 Jun 2026 12:53:35 +0000 (14:53 +0200)] 
arm64: versal2: Move SoC detection out of board code

soc_detection() and soc_name_decode() read the PMC_TAP version/idcode
registers and decode the platform. This is SoC information rather than
board policy, and a firmware interface could provide it instead, so it
does not belong in board code.

Move both functions, together with the shared platform_id and
platform_version state, into arch/arm/mach-versal2 where they still
override the weak stubs in the Xilinx common board code. The board file
drops the now unused linux/bitfield.h include.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://patch.msgid.link/c332ab27f66f1c808f32a4bcb453d9e8da543331.1782219202.git.michal.simek@amd.com
5 days agoarm64: zynqmp: Move board_early_init_r clock setup to mach code
Michal Simek [Tue, 23 Jun 2026 12:53:34 +0000 (14:53 +0200)] 
arm64: zynqmp: Move board_early_init_r clock setup to mach code

board_early_init_r() programmed the system timestamp counter directly
with readl()/writel() in board code. This is SoC register setup rather
than board policy, and similar code exists across the Xilinx SoCs.

Move it into zynqmp_timer_setup() in arch/arm/mach-zynqmp so the board
hook only keeps the EL3 guard and calls the helper. The asm/arch/clk.h
include (for zynqmp_get_system_timer_freq()) moves to cpu.c along with
the code.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://patch.msgid.link/2d8f2419fab314b4ff8fd53b846e1dd6151586d3.1782219202.git.michal.simek@amd.com
5 days agoarm64: versal-net: Move board_early_init_r clock setup to mach code
Michal Simek [Tue, 23 Jun 2026 12:53:33 +0000 (14:53 +0200)] 
arm64: versal-net: Move board_early_init_r clock setup to mach code

board_early_init_r() programmed the IOU switch clock and the system
timestamp counter directly with readl()/writel() in board code. This is
SoC register setup rather than board policy, and the same block is
duplicated across the Xilinx SoCs.

Move it into versal_net_timer_setup() in arch/arm/mach-versal-net so the
board hook only keeps the EL3 guard and calls the helper.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://patch.msgid.link/10dd9f35d03be0402ce13475f20b2cd3761189a6.1782219202.git.michal.simek@amd.com
5 days agoarm64: versal2: Move board_early_init_r clock setup to mach code
Michal Simek [Tue, 23 Jun 2026 12:53:32 +0000 (14:53 +0200)] 
arm64: versal2: Move board_early_init_r clock setup to mach code

board_early_init_r() programmed the IOU switch clock and the system
timestamp counter directly with readl()/writel() in board code. This is
SoC register setup rather than board policy, and the same block is
duplicated across the Xilinx SoCs.

Move it into versal2_timer_setup() in arch/arm/mach-versal2 so the board
hook only keeps the EL3 guard and calls the helper.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://patch.msgid.link/08e835a183c39de6f666375ac390eee6a8f3f12e.1782219202.git.michal.simek@amd.com
5 days agoarm64: versal: Move board_early_init_r clock setup to mach code
Michal Simek [Tue, 23 Jun 2026 12:53:31 +0000 (14:53 +0200)] 
arm64: versal: Move board_early_init_r clock setup to mach code

board_early_init_r() programmed the IOU switch clock and the system
timestamp counter directly with readl()/writel() in board code. This is
SoC register setup rather than board policy, and the same block is
duplicated across the Xilinx SoCs.

Move it into versal_timer_setup() in arch/arm/mach-versal so the board
hook only keeps the EL3 guard and calls the helper.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://patch.msgid.link/2234d746ab5b8240e88b1a629d51f93751ee3b60.1782219202.git.michal.simek@amd.com
5 days agoarm64: versal: Move bootmode decoding out of board code
Michal Simek [Tue, 23 Jun 2026 12:53:30 +0000 (14:53 +0200)] 
arm64: versal: Move bootmode decoding out of board code

versal_get_bootmode() lived in board code and open-coded the
IS_ENABLED(CONFIG_ZYNQMP_FIRMWARE) selection between the firmware call
zynqmp_pm_get_bootmode_reg() and a direct readl(). To keep generic board
code free of firmware specifics and SoC register details and ready for
SCMI, move the whole function, including the alt-shift and mask decoding,
behind an overridable hook.

The weak versal_get_bootmode() in arch/arm/mach-versal does the plain
MMIO read via versal_bootmode_reg() and decodes it (used at EL3 and
without firmware). When CONFIG_ZYNQMP_FIRMWARE is enabled,
firmware-zynqmp.c provides a strong definition that reads the register
through the firmware call, falling back to the direct read at EL3 where
the SMC path to firmware is unavailable. This preserves the existing
firmware-based bootmode behaviour while removing the firmware interface
from board code; the now unused zynqmp_firmware.h include is dropped.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://patch.msgid.link/d60073feed8da8d3aff9eabee6ab132e0bbd0f8e.1782219202.git.michal.simek@amd.com
5 days agoarm64: versal: Decouple multiboot register access from firmware
Michal Simek [Tue, 23 Jun 2026 12:53:29 +0000 (14:53 +0200)] 
arm64: versal: Decouple multiboot register access from firmware

versal_multi_boot() in board code selected between the firmware call
zynqmp_pm_get_pmc_multi_boot_reg() and a direct readl() based on an
IS_ENABLED(CONFIG_ZYNQMP_FIRMWARE) check. Generic board code should not
carry firmware-specific ifdefs, and this becomes harder to maintain once
SCMI introduces yet another access method.

Introduce an overridable accessor versal_pmc_multi_boot(). The weak
default lives in arch/arm/mach-versal and performs the plain MMIO read
(used at EL3 and when no firmware is present). When CONFIG_ZYNQMP_FIRMWARE
is enabled, firmware-zynqmp.c provides a strong definition that issues the
firmware call, falling back to the direct read at EL3 where the SMC path
to firmware is unavailable. The shared MMIO read is factored into
versal_multi_boot_reg() so the firmware override does not duplicate it.

versal_multi_boot() keeps the generic JTAG/QEMU workaround and simply
calls the accessor, so board code no longer references the firmware
interface for the multiboot register. The firmware-vs-MMIO decision is
selected at link time, and adding SCMI later only requires a third strong
definition with no board-code changes.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://patch.msgid.link/199ef6a1411c54f154fe4a43b5fef166b9927f7a.1782219202.git.michal.simek@amd.com
5 days agoarm64: versal2: Move bootmode decoding out of board code
Michal Simek [Tue, 23 Jun 2026 12:53:28 +0000 (14:53 +0200)] 
arm64: versal2: Move bootmode decoding out of board code

versal2_get_bootmode() lived in board code and accessed the CRP boot
mode register with a direct readl(). To keep generic board code free of
SoC register details and ready for firmware/SCMI based access, move the
whole function, including the alt-shift and mask decoding, into
arch/arm/mach-versal2 as a __weak default.

Board code now simply calls versal2_get_bootmode(). When a firmware
based implementation is available and tested it can provide a strong
definition that overrides the weak one at link time; until then only the
weak MMIO version is built.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://patch.msgid.link/f3274ec77218373bc0452f6795a3ad6016be0058.1782219202.git.michal.simek@amd.com
5 days agoarm64: versal2: Decouple multiboot register access from firmware
Michal Simek [Tue, 23 Jun 2026 12:53:27 +0000 (14:53 +0200)] 
arm64: versal2: Decouple multiboot register access from firmware

versal2_multi_boot() in board code selected between the firmware call
zynqmp_pm_get_pmc_multi_boot_reg() and a direct readl() based on an
IS_ENABLED(CONFIG_ZYNQMP_FIRMWARE) check. Generic board code should not
carry firmware-specific ifdefs, and this becomes harder to maintain once
SCMI introduces yet another access method.

Introduce an overridable accessor versal2_pmc_multi_boot(). The weak
default lives in arch/arm/mach-versal2 and performs the plain MMIO read
(used at EL3 and when no firmware is present). When CONFIG_ZYNQMP_FIRMWARE
is enabled, firmware-zynqmp.c provides a strong definition that issues the
firmware call, falling back to the direct read at EL3 where the SMC path
to firmware is unavailable. The shared MMIO read is factored into
versal2_multi_boot_reg() so the firmware override does not duplicate it.

versal2_multi_boot() keeps the generic JTAG/QEMU workaround and simply
calls the accessor, so board code no longer references the firmware
interface and the now unused zynqmp_firmware.h include is dropped. The
firmware-vs-MMIO decision is selected at link time, and adding SCMI later
only requires a third strong definition with no board-code changes.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://patch.msgid.link/0033a1fa8efb4ae0c3ac6a6f5c5c1b4e0f22f02c.1782219202.git.michal.simek@amd.com
5 days agoarm: xilinx: Guard mach sys_proto.h against multiple inclusion
Michal Simek [Tue, 23 Jun 2026 12:53:26 +0000 (14:53 +0200)] 
arm: xilinx: Guard mach sys_proto.h against multiple inclusion

The Versal and Versal Gen 2 mach sys_proto.h headers lacked an include
guard. mach-versal/sys_proto.h additionally defines enum tcm_mode, so
including it twice in one translation unit fails to build with a
redeclaration error.

This is about to happen in firmware-zynqmp.c, which needs the SoC
prototypes unconditionally for the upcoming weak/strong multiboot and
bootmode accessors. Add the standard _ASM_ARCH_SYS_PROTO_H guard, as
already used by mach-zynqmp, so the header can be included more than once.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://patch.msgid.link/1bf5b1d49abb271c2c5e7135837b740179b95553.1782219202.git.michal.simek@amd.com
5 days agosoc: xilinx: zynqmp: Add TCG variant detection for ZU3TCG
Padmarao Begari [Tue, 23 Jun 2026 15:08:22 +0000 (20:38 +0530)] 
soc: xilinx: zynqmp: Add TCG variant detection for ZU3TCG

The XCZU3TCG device shares IDCODE 0x04718093 with XCZU3TEG but has
the GPU disable eFuse bit set (Consumer Grade, no GPU). Previously,
the TEG detection branch appended "teg" unconditionally, causing
U-Boot to report the device as zu3teg and failing bitstream ID
checks for xczu3tcg bitstreams.

Check EFUSE_GPU_DIS_MASK in the TEG branch to distinguish the two
sub-variants, mirroring the existing EG/CG detection logic:
- GPU disabled -> TCG family -> "zu3tcg"
- GPU enabled  -> TEG family -> "zu3teg"

Fixes: fa2f0c97af96 ("soc: zynqmp: Add the IDcode for TEG variant")
Signed-off-by: Padmarao Begari <padmarao.begari@amd.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://patch.msgid.link/20260623150943.2662500-1-padmarao.begari@amd.com
5 days agodrivers: fpga: Use FPGA_INTEL_SDM_MAILBOX conditional instead of Agilex/Stratix10
Danish Ahmad Rosdi [Mon, 8 Jun 2026 09:45:47 +0000 (17:45 +0800)] 
drivers: fpga: Use FPGA_INTEL_SDM_MAILBOX conditional instead of Agilex/Stratix10

Replace the conditional compilation checks for
CONFIG_ARCH_SOCFPGA_AGILEX and CONFIG_ARCH_SOCFPGA_STRATIX10 with
CONFIG_FPGA_INTEL_SDM_MAILBOX.

Signed-off-by: Danish Ahmad Rosdi <danish.ahmad.rosdi@altera.com>
Signed-off-by: Chen Huei Lok <chen.huei.lok@altera.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/20260608094547.3026-1-chen.huei.lok@altera.com
5 days agoufs: amd-versal2: Fix missing .priv_auto in driver registration
Pranav Tilak [Tue, 23 Jun 2026 03:53:51 +0000 (09:23 +0530)] 
ufs: amd-versal2: Fix missing .priv_auto in driver registration

Add missing .priv_auto field to the driver. Without it,
struct ufs_versal2_priv is never properly allocated and dev_get_priv()
returns NULL, leading to DDR corruption at low DDR addresses.

Fixes: b5ac5f030720 ("ufs: ufs-amd-versal2: Add support for AMD UFS controller")
Signed-off-by: Pranav Tilak <pranav.vinaytilak@amd.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/20260623035411.2088224-1-pranav.vinaytilak@amd.com
5 days agoMAINTAINERS: Replace Zynq/ZynqMP with N:
Marek Vasut [Wed, 17 Jun 2026 02:48:46 +0000 (04:48 +0200)] 
MAINTAINERS: Replace Zynq/ZynqMP with N:

Use N: to match on all zynq/zynqmp files, drop the large list of
entries which represent the same set of relevant files and miss a
few in the process. Combine Zynq and ZynqMP entries into single
entry to further cut down the duplication.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/20260617024902.153555-1-marek.vasut+renesas@mailbox.org