]> git.ipfire.org Git - thirdparty/u-boot.git/log
thirdparty/u-boot.git
5 weeks agospi: stm32: extend support to STM32MP25
Dario Binacchi [Wed, 25 Feb 2026 16:16:59 +0000 (17:16 +0100)] 
spi: stm32: extend support to STM32MP25

The SPI IP in this platform is fully compatible with the current driver
implementation, requiring only a new compatible string.

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
5 weeks agospi: stm32: add support for bits-per-word setting
Dario Binacchi [Wed, 25 Feb 2026 16:16:58 +0000 (17:16 +0100)] 
spi: stm32: add support for bits-per-word setting

Implement the set_wordlen operation to allow dynamic bus width
configuration. This is required for peripherals with non-standard
requirements, such as display panels that need 9-bit word transfers
during the initialization and setup phase.

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
5 weeks agospi: stm32: add stm32_spi_is_enabled() helper
Dario Binacchi [Wed, 25 Feb 2026 16:16:57 +0000 (17:16 +0100)] 
spi: stm32: add stm32_spi_is_enabled() helper

Add a helper to check the SPE (SPI Enable) bit and replace the
open-coded bitwise check in stm32_spi_stopxfer() with this helper to
improve readability and consistency.

This is also a preparatory step for future driver updates that require
checking the SPI enable state across different code paths.

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
5 weeks agospi: stm32: clean up buffer length assignment
Dario Binacchi [Wed, 25 Feb 2026 16:16:56 +0000 (17:16 +0100)] 
spi: stm32: clean up buffer length assignment

Remove redundant divisions by using the already available xferlen
variable for setting the rx/tx buffer lengths.

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
5 weeks agotest: dm: spi: add testcase for spi_set_wordlen()
Dario Binacchi [Wed, 25 Feb 2026 16:16:55 +0000 (17:16 +0100)] 
test: dm: spi: add testcase for spi_set_wordlen()

Add a unit test to verify that the SPI word length configuration is
correctly handled by the SPI uclass and successfully passed down to
the sandbox driver.

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Reviewed-by: Simon Glass <simon.glass@canonical.com>
5 weeks agotest: spi: add sandbox_spi_get_wordlen interface
Dario Binacchi [Wed, 25 Feb 2026 16:16:54 +0000 (17:16 +0100)] 
test: spi: add sandbox_spi_get_wordlen interface

Add the sandbox_spi_get_wordlen() public interface to retrieve the
internal word length state of the sandbox SPI device.

This is intended for use in sandbox SPI test cases to verify that
the word length is correctly propagated from the SPI uclass to
the driver.

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Reviewed-by: Simon Glass <simon.glass@canonical.com>
5 weeks agospi: sandbox_spi: support wordlen setup
Dario Binacchi [Wed, 25 Feb 2026 16:16:53 +0000 (17:16 +0100)] 
spi: sandbox_spi: support wordlen setup

The driver currently ignores the word length configuration. Implement
the set_wordlen operation to store and track the current word length.

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Reviewed-by: Simon Glass <simon.glass@canonical.com>
5 weeks agospi: add support for bits-per-word setting
Dario Binacchi [Wed, 25 Feb 2026 16:16:52 +0000 (17:16 +0100)] 
spi: add support for bits-per-word setting

Allow dynamic configuration of the SPI word length. This is required
for controllers and slaves that need to operate with non-standard
word lengths, such as 9-bit wide transfers.

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Reviewed-by: Simon Glass <simon.glass@canonical.com>
5 weeks agoarm: stm32mp: Drop unnecessary BOARD_EARLY_INIT_F usage
Tom Rini [Wed, 25 Mar 2026 19:00:27 +0000 (13:00 -0600)] 
arm: stm32mp: Drop unnecessary BOARD_EARLY_INIT_F usage

All of these platforms enable CONFIG_BOARD_EARLY_INIT_F and then have a
do-nothing board_early_init_f function. Change to not enabling the
option and so not needing an empty function.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
5 weeks agoARM: stm32mp2: Factorize TAMP_FWU_BOOT_IDX_MASK/OFFSET definition
Patrice Chotard [Wed, 1 Apr 2026 07:48:38 +0000 (09:48 +0200)] 
ARM: stm32mp2: Factorize TAMP_FWU_BOOT_IDX_MASK/OFFSET definition

Factorize TAMP_FWU_BOOT_IDX_MASK and TAMP_FWU_BOOT_IDX_OFFSET
definition which are common to STM32MP1 and STM32MP2 SoCs family.

Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
5 weeks agoclk: stm32: Add STM32MP23 support
Patrice Chotard [Wed, 1 Apr 2026 09:34:48 +0000 (11:34 +0200)] 
clk: stm32: Add STM32MP23 support

Add STM32MP23 support.

Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Raphaƫl Gallais-Pou <rgallaispou@gmail.com>
5 weeks agospi: add STM32MP23 OSPI support
Patrice Chotard [Wed, 1 Apr 2026 09:36:02 +0000 (11:36 +0200)] 
spi: add STM32MP23 OSPI support

Add STM32MP23 OSPI support.

Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
5 weeks agovideo: stm32: dsi: fix unchecked return values
Raphael Gallais-Pou [Sun, 12 Apr 2026 19:07:58 +0000 (21:07 +0200)] 
video: stm32: dsi: fix unchecked return values

Fix the following errors yielded by Coverity Scan:

CID 644836:         Error handling issues  (CHECKED_RETURN)
Calling device_chld_unbind without checking return value (as is done elsewhere 6 out of 7 times)
CID 644834:         Error handling issues  (CHECKED_RETURN)
Calling device_chld_remove without checking return value (as is done elsewhere 4 out of 5 times).

Link: https://lore.kernel.org/r/20260309212331.GF1388590@bill-the-cat/
Fixes: a6d047c0a86b ("video: stm32: remove all child of DSI bridge when its probe failed")
Signed-off-by: Raphael Gallais-Pou <rgallaispou@gmail.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
5 weeks agoboard: stm32pm1: Fix board_check_usb_power()
Patrice Chotard [Tue, 14 Apr 2026 09:06:50 +0000 (11:06 +0200)] 
board: stm32pm1: Fix board_check_usb_power()

Depending of plugged power source (computer, wall charger, ...) it can
happen that we got the following message:

"****************************************************"
"*      USB TYPE-C charger not compliant with       *"
"*                   specification                  *"
"****************************************************"
"                                                    "
"### ERROR ### Please RESET the board ###            "

This issue has been detected on STM32MP135f-DK board.

It's due to max_uV and min_uV value are initialized at beginning of
board_check_usb_power() and can then be used for the 2 iteration of
adc_measurement().
max_uV/min_uV values issued of the first adc_measurement() iteration
are used as input of the second adc_measurement() iteration, which
can lead to incoherent pair of min_uV/max_uV values.

To ensure that adc_measurement() returns coherent value for max_uV and
min_uV, initialize max_uV and min_uV at each loop start.

Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Kory Maincent <kory.maincent@bootlin.com>
5 weeks agoMerge tag 'mediatek-for-master-2026-04-29' of https://source.denx.de/u-boot/custodian...
Tom Rini [Wed, 29 Apr 2026 20:49:24 +0000 (14:49 -0600)] 
Merge tag 'mediatek-for-master-2026-04-29' of https://source.denx.de/u-boot/custodians/u-boot-mediatek

* MMC fixes for Genio 520/720 (mt8189)
* SPI NOR Flash controller fixes
* SPI NOR Flash support for Genio 520/720
* PMIC controller fixes
* PMIC support for Genio 1200 (mt8195)
* Drop CONFIG_IDENT_STRING to be consistent across the platform
* Remove empty header on mt7622

5 weeks agoMerge branch 'master' of git://source.denx.de/u-boot-usb
Tom Rini [Wed, 29 Apr 2026 15:04:11 +0000 (09:04 -0600)] 
Merge branch 'master' of git://source.denx.de/u-boot-usb

- Fix UMS and eMMC HW partition selection

5 weeks agosocfpga: vining: Enable LTO
Tom Rini [Wed, 29 Apr 2026 23:07:46 +0000 (17:07 -0600)] 
socfpga: vining: Enable LTO

This platform is often close to the binary size limit and minor changes
lead to exceeding image size. Enable LTO for this platform.

Signed-off-by: Tom Rini <trini@konsulko.com>
---
Cc: Marek Vasut <marex@nabladev.com>
Cc: Tien Fong Chee <tien.fong.chee@altera.com>
5 weeks agopower: pmic: mtk-pwrap: add MT8195 support
Julien Stephan [Thu, 9 Apr 2026 20:30:40 +0000 (15:30 -0500)] 
power: pmic: mtk-pwrap: add MT8195 support

Add mt8195 support.

Support comes directly from commit e88edc977b00 ("soc: mediatek: pwrap:
add pwrap driver for MT8195 SoC") from the Linux Kernel.

Signed-off-by: Julien Stephan <jstephan@baylibre.com>
Link: https://patch.msgid.link/20260409-mtk-pmic-fixes-v2-8-73e83aa6345b@baylibre.com
Signed-off-by: David Lechner <dlechner@baylibre.com>
5 weeks agopower: pmic: mtk-pwrap: use tabs for alignment
Julien Stephan [Thu, 9 Apr 2026 20:30:39 +0000 (15:30 -0500)] 
power: pmic: mtk-pwrap: use tabs for alignment

Fix mt8188_regs definition to use tabs instead of spaces for alignment
to be consistent with other definitions.

Reviewed-by: Macpaul Lin <macpaul.lin@mediatek.com>
Signed-off-by: Julien Stephan <jstephan@baylibre.com>
Link: https://patch.msgid.link/20260409-mtk-pmic-fixes-v2-7-73e83aa6345b@baylibre.com
Signed-off-by: David Lechner <dlechner@baylibre.com>
5 weeks agopower: pmic: mtk-pwrap: use pmic compatible to select child info
David Lechner [Thu, 9 Apr 2026 20:30:38 +0000 (15:30 -0500)] 
power: pmic: mtk-pwrap: use pmic compatible to select child info

Change the logic for selecting pmic_children_info to use the compatible
string from the devicetree instead of expecting the pwrap (part of the
MCU) to correspond to the separate PMIC chip.

In addition to being more correct, it also saves a few lines of code for
each MCU type that is added by dropping the enum and type field.

Reviewed-by: Julien Stephan <jstephan@baylibre.com>
Link: https://patch.msgid.link/20260409-mtk-pmic-fixes-v2-6-73e83aa6345b@baylibre.com
Signed-off-by: David Lechner <dlechner@baylibre.com>
5 weeks agopower: pmic: mtk-pwrap: remove interrupt related code
David Lechner [Thu, 9 Apr 2026 20:30:37 +0000 (15:30 -0500)] 
power: pmic: mtk-pwrap: remove interrupt related code

Remove the interrupt related code in mtk-pwrap driver. This was just
enabling interrupts without any handler.

Even if we did have a handler, the only thing we could do is log a
message. Since U-Boot isn't long running, this likely wouldn't be very
useful.

Reviewed-by: Julien Stephan <jstephan@baylibre.com>
Link: https://patch.msgid.link/20260409-mtk-pmic-fixes-v2-5-73e83aa6345b@baylibre.com
Signed-off-by: David Lechner <dlechner@baylibre.com>
5 weeks agopower: pmic: mtk-pwrap: drop PWRAP_SLV_CAP_DUALIO on mt6359
David Lechner [Thu, 9 Apr 2026 20:30:36 +0000 (15:30 -0500)] 
power: pmic: mtk-pwrap: drop PWRAP_SLV_CAP_DUALIO on mt6359

Drop the PWRAP_SLV_CAP_DUALIO flag from the mt6359 PMIC definition. The
mt6359p variant of the PMIC does support dual I/O.

Prior to this change, the driver would attempt to write to the
PWRAP_DEW_DIO_EN register, which was not defined, so would write
register 0 (DONE2).

Reviewed-by: Julien Stephan <jstephan@baylibre.com>
Reviewed-by: Macpaul Lin <macpaul.lin@mediatek.com>
Link: https://patch.msgid.link/20260409-mtk-pmic-fixes-v2-4-73e83aa6345b@baylibre.com
Signed-off-by: David Lechner <dlechner@baylibre.com>
5 weeks agopower: pmic: mtk-pwrap: add init capability flag
David Lechner [Thu, 9 Apr 2026 20:30:35 +0000 (15:30 -0500)] 
power: pmic: mtk-pwrap: add init capability flag

Add a PWRAP_CAP_INIT capability flag to specify if it is safe to call
pwrap_init() or not. Not all targets define the registers accessed
by pwrap_init(). In that case, it is expected that an earlier bootloader
has already initialized the PMIC. If not, we now return an error instead
of trying to access undefined registers.

Reviewed-by: Julien Stephan <jstephan@baylibre.com>
Link: https://patch.msgid.link/20260409-mtk-pmic-fixes-v2-3-73e83aa6345b@baylibre.com
Signed-off-by: David Lechner <dlechner@baylibre.com>
5 weeks agopower: pmic: mtk-pwrap: add PWRAP_CAP_WDT_SRC flag
David Lechner [Thu, 9 Apr 2026 20:30:34 +0000 (15:30 -0500)] 
power: pmic: mtk-pwrap: add PWRAP_CAP_WDT_SRC flag

Add a PWRAP_CAP_WDT_SRC flag to indicate if a PMIC wrapper has a WDT_SRC
or not. Then use this to conditionally enable the watchdog timer.

Prior to this change, since the register was not defined, it defaulted
to 0, so the wrong register (DONE2) was being written to.

Reviewed-by: Julien Stephan <jstephan@baylibre.com>
Link: https://patch.msgid.link/20260409-mtk-pmic-fixes-v2-2-73e83aa6345b@baylibre.com
Signed-off-by: David Lechner <dlechner@baylibre.com>
5 weeks agopower: pmic: mtk-pwrap: fix file description
David Lechner [Thu, 9 Apr 2026 20:30:33 +0000 (15:30 -0500)] 
power: pmic: mtk-pwrap: fix file description

Fix the comment at the start of the file to accurately describe what
this file does. The old description was likely copied from the related
regulator driver.

Reviewed-by: Julien Stephan <jstephan@baylibre.com>
Link: https://patch.msgid.link/20260409-mtk-pmic-fixes-v2-1-73e83aa6345b@baylibre.com
Signed-off-by: David Lechner <dlechner@baylibre.com>
5 weeks agoconfigs: mt7622: remove empty header file
Weijie Gao [Tue, 28 Apr 2026 03:36:25 +0000 (11:36 +0800)] 
configs: mt7622: remove empty header file

Remove the empty include/configs/mt7622.h header file as it is not needed.
The Kconfig entry that referenced it is also removed.

Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
Link: https://patch.msgid.link/20260428033625.109032-1-weijie.gao@mediatek.com
Signed-off-by: David Lechner <dlechner@baylibre.com>
5 weeks agocmd: ums: Switch HW partition before block access
Marek Vasut [Fri, 24 Apr 2026 03:33:38 +0000 (05:33 +0200)] 
cmd: ums: Switch HW partition before block access

An UMS session with eMMC device specifier "ums C mmc dev.part1,dev.part2"
exposes the same eMMC HW partition 'part2' twice instead of exposing both
HW partitions 'part1' and 'part2'. Fix this by switching the eMMC HW
partition before block device read/write access.

An eMMC is represented by a single struct blk_desc, with the currently
selected HW partition being stored in this struct blk_desc. Each call to
part_get_info_by_dev_and_name_or_num() with partition string dev[.partN]
does trigger HW partition switch by calling blk_get_device_part_str() ->
blk_get_device_part_str() -> get_dev_hwpart() -> get_dev_hwpart() ->
blk_dselect_hwpart(). The ums_init() iterates over the device specifier
string and calls part_get_info_by_dev_and_name_or_num() in a loop for
each dev[.partN] entry used as the partition string. If the device
specifier string contains more than one dev[.partN] partition strings
for the same dev device, then it is the HW partition described in the
last dev[.partN] partition string entry that is accessed for all dev
device partition strings in the device specifier string, because that
last dev[.partN] partition string entry was the last one that triggered
blk_dselect_hwpart() call for that device.

To access the expected HW partition for every dev[.partN] partition string
entry, it is necessary to call blk_dselect_hwpart() before each block read
or write. Store HW partition described for each dev[.partN] partition string
in struct ums and use the stored value to make it so.

The blk_dselect_hwpart() does test whether the currently selected HW
partition is already configured in hardware and does not reconfigure
the hardware if that is the case, therefore for the majority of block
reads and writes, blk_dselect_hwpart() is a no-op with negligible
performance impact.

Example reproducer is listed below. The last sector of both eMMC HW BOOT
partitions is populated with distinct test pattern and UMS is launched:

"
=> mmc dev 1 1 ; mmc read $loadaddr 0x1fff 1 ; md $loadaddr 4
switch to partitions #1, OK
mmc1(part 1) is current device
MMC read: dev # 1, block # 8191, count 1 ... 1 blocks read: OK
840000001234abcd 1234abcd 1234abcd 1234abcd  ..4...4...4...4.

=> mmc dev 1 2 ; mmc read $loadaddr 0x1fff 1 ; md $loadaddr 4
switch to partitions #2, OK
mmc1(part 2) is current device
MMC read: dev # 1, block # 8191, count 1 ... 1 blocks read: OK
84000000567890ef 567890ef 567890ef 567890ef  ..xV..xV..xV..xV

=> ums 0 mmc 1.1,1.2
UMS: LUN 0, dev mmc 1, hwpart 1, sector 0x0, count 0x2000
UMS: LUN 1, dev mmc 1, hwpart 2, sector 0x0, count 0x2000
"

Read of the two block devices on host without this fix produces
identical data present in HW BOOT partition 2:

"
$ dd if=/dev/sdX of=mmc-a.bin ; dd if=/dev/sdY of=mmc-b.bin
$ hexdump -C mmc-a.bin | tail -n 3 | head -n 1 ; \
  hexdump -C mmc-b.bin | tail -n 3 | head -n 1
003ffe00  ef 90 78 56 ef 90 78 56  ef 90 78 56 ef 90 78 56  |..xV..xV..xV..xV|
003ffe00  ef 90 78 56 ef 90 78 56  ef 90 78 56 ef 90 78 56  |..xV..xV..xV..xV|
"

Read of the two block devices on host with this fix produces the
expected distinct data from either HW BOOT partition 1 or 2:

"
$ dd if=/dev/sdX of=mmc-a.bin ; dd if=/dev/sdY of=mmc-b.bin
$ hexdump -C mmc-a.bin | tail -n 3 | head -n 1 ; \
  hexdump -C mmc-b.bin | tail -n 3 | head -n 1
003ffe00  cd ab 34 12 cd ab 34 12  cd ab 34 12 cd ab 34 12  |..4...4...4...4.|
003ffe00  ef 90 78 56 ef 90 78 56  ef 90 78 56 ef 90 78 56  |..xV..xV..xV..xV|
"

Reported-by: Christoph Niedermaier <cniedermaier@dh-electronics.com>
Signed-off-by: Marek Vasut <marex@nabladev.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 weeks agoconfigs: mediatek: add required config for SNOR on Genio 520/720 EVK
David Lechner [Mon, 6 Apr 2026 20:37:10 +0000 (15:37 -0500)] 
configs: mediatek: add required config for SNOR on Genio 520/720 EVK

Enable options to be able to access the SNOR flash on Genio 520/720 EVK
boards.

Reviewed-by: Macpaul Lin <macpaul.lin@mediatek.com>
Link: https://patch.msgid.link/20260406-mtk-genio-720-snor-v1-2-cbfd5fc4e59a@baylibre.com
Signed-off-by: David Lechner <dlechner@baylibre.com>
5 weeks agoarm: dts: mediatek: add Genio 520/720 SNOR support
David Lechner [Mon, 6 Apr 2026 20:37:09 +0000 (15:37 -0500)] 
arm: dts: mediatek: add Genio 520/720 SNOR support

Add devicetree nodes needed to enable SNOR support on Genio 520 and 720
EVKs. This is copied from the most recent upstream submission [1] of the
devicetree for these boards, so there should be minimal differences when
we eventually switch to OF_UPSTREAM.

Link: https://lore.kernel.org/linux-mediatek/20251111070031.305281-10-jh.hsu@mediatek.com/
Link: https://patch.msgid.link/20260406-mtk-genio-720-snor-v1-1-cbfd5fc4e59a@baylibre.com
Signed-off-by: David Lechner <dlechner@baylibre.com>
5 weeks agospi: mtk_snor: Remove status register write procedure in probe()
Meiker Gao [Mon, 6 Apr 2026 20:13:34 +0000 (15:13 -0500)] 
spi: mtk_snor: Remove status register write procedure in probe()

Remove status register write procedure in probe(). This is handled in
spi-nor-core by the SPI_NOR_HAS_LOCK flag.

Signed-off-by: Meiker Gao <ot_meiker.gao@mediatek.com>
Reviewed-by: Julien Stephan <jstephan@baylibre.com>
Link: https://patch.msgid.link/20260406-mtk-spi-nor-improvements-v1-8-66f675cbbd3e@baylibre.com
Signed-off-by: David Lechner <dlechner@baylibre.com>
5 weeks agospi: mtk_snor: fix zeroed data in DMA read bounce path
Macpaul Lin [Mon, 6 Apr 2026 20:13:33 +0000 (15:13 -0500)] 
spi: mtk_snor: fix zeroed data in DMA read bounce path

Implement proper bounce buffer handling for the read path to fix zeroed
data when using DMA. In the bounce path, map the bounce buffer with
dma_map_single(), perform DMA using bounce_dma, then copy data from the
bounce buffer to the user buffer, and finally unmap with
dma_unmap_single().

Signed-off-by: Macpaul Lin <macpaul.lin@mediatek.com>
Reviewed-by: Julien Stephan <jstephan@baylibre.com>
Link: https://patch.msgid.link/20260406-mtk-spi-nor-improvements-v1-7-66f675cbbd3e@baylibre.com
Signed-off-by: David Lechner <dlechner@baylibre.com>
5 weeks agospi: mtk_snor: support newer SOCs
Noah.Shen [Mon, 6 Apr 2026 20:13:32 +0000 (15:13 -0500)] 
spi: mtk_snor: support newer SOCs

Add support for some newer SOCs. New compatible strings are added to the
lookup table. Some SOCs also need a extra bit clocked out as a hardware
quirk, so a new capability structure and code is added to support that.

Signed-off-by: Noah.Shen <noah.shen@mediatek.com>
Reviewed-by: Julien Stephan <jstephan@baylibre.com>
Link: https://patch.msgid.link/20260406-mtk-spi-nor-improvements-v1-6-66f675cbbd3e@baylibre.com
Signed-off-by: David Lechner <dlechner@baylibre.com>
5 weeks agospi: mtk-snor: add bounds checking in mtk_snor_cmd_program()
Noah.Shen [Mon, 6 Apr 2026 20:13:31 +0000 (15:13 -0500)] 
spi: mtk-snor: add bounds checking in mtk_snor_cmd_program()

Add bounds checking of the various lengths in mtk_snor_cmd_program() to
prevent reading or writing registers out of bounds.

Signed-off-by: Noah.Shen <noah.shen@mediatek.com>
Reviewed-by: Julien Stephan <jstephan@baylibre.com>
Link: https://patch.msgid.link/20260406-mtk-spi-nor-improvements-v1-5-66f675cbbd3e@baylibre.com
Signed-off-by: David Lechner <dlechner@baylibre.com>
5 weeks agospi: mtk_snor: check return value of mtk_snor_cmd_exec()
Noah.Shen [Mon, 6 Apr 2026 20:13:30 +0000 (15:13 -0500)] 
spi: mtk_snor: check return value of mtk_snor_cmd_exec()

Always check the return value of mtk_snor_cmd_exec() and propagate the
error.

Signed-off-by: Noah.Shen <noah.shen@mediatek.com>
Reviewed-by: Julien Stephan <jstephan@baylibre.com>
Link: https://patch.msgid.link/20260406-mtk-spi-nor-improvements-v1-4-66f675cbbd3e@baylibre.com
Signed-off-by: David Lechner <dlechner@baylibre.com>
5 weeks agospi: mtk_snor: conditionally copy tx/rx data
Noah.Shen [Mon, 6 Apr 2026 20:13:29 +0000 (15:13 -0500)] 
spi: mtk_snor: conditionally copy tx/rx data

Only write out data for OUT command and read in data for IN commands.

Signed-off-by: Noah.Shen <noah.shen@mediatek.com>
Reviewed-by: Julien Stephan <jstephan@baylibre.com>
Link: https://patch.msgid.link/20260406-mtk-spi-nor-improvements-v1-3-66f675cbbd3e@baylibre.com
Signed-off-by: David Lechner <dlechner@baylibre.com>
5 weeks agospi: mtk_snor: avoid alloc in mtk_snor_cmd_program()
Noah.Shen [Mon, 6 Apr 2026 20:13:28 +0000 (15:13 -0500)] 
spi: mtk_snor: avoid alloc in mtk_snor_cmd_program()

Rework mtk_snor_cmd_program() to avoid allocating a temporary buffer
for tx data. This improves performance a bit by avoiding the need to
allocate memory and copy data an extra time.

Signed-off-by: Noah.Shen <noah.shen@mediatek.com>
Reviewed-by: Julien Stephan <jstephan@baylibre.com>
Link: https://patch.msgid.link/20260406-mtk-spi-nor-improvements-v1-2-66f675cbbd3e@baylibre.com
Signed-off-by: David Lechner <dlechner@baylibre.com>
5 weeks agospi: mtk_snor: clean up comments
Noah.Shen [Mon, 6 Apr 2026 20:13:27 +0000 (15:13 -0500)] 
spi: mtk_snor: clean up comments

Avoid use of C++-style comments and fix multi-line comment style.

Signed-off-by: Noah.Shen <noah.shen@mediatek.com>
Reviewed-by: Julien Stephan <jstephan@baylibre.com>
Link: https://patch.msgid.link/20260406-mtk-spi-nor-improvements-v1-1-66f675cbbd3e@baylibre.com
Signed-off-by: David Lechner <dlechner@baylibre.com>
5 weeks agoconfigs: mediatek: mt8395_genio_1200_evk_ufs: remove CONFIG_IDENT_STRING
David Lechner [Tue, 21 Apr 2026 14:09:38 +0000 (09:09 -0500)] 
configs: mediatek: mt8395_genio_1200_evk_ufs: remove CONFIG_IDENT_STRING

Remove CONFIG_IDENT_STRING from the mt8395_genio_1200_evk_ufs defconfig.
This makes it consistent with other mediatek defconfigs and frees the
option for use by downstream users. This only affects the version string
printed by U-Boot, so it doesn't have any functional impact.

Reviewed-by: Julien Stephan <jstephan@baylibre.com>
Link: https://patch.msgid.link/20260421-mtk-configs-remove-ident-string-v1-5-66d5fc3d67be@baylibre.com
Signed-off-by: David Lechner <dlechner@baylibre.com>
5 weeks agoconfigs: mediatek: mt8395_genio_1200_evk: remove CONFIG_IDENT_STRING
David Lechner [Tue, 21 Apr 2026 14:09:37 +0000 (09:09 -0500)] 
configs: mediatek: mt8395_genio_1200_evk: remove CONFIG_IDENT_STRING

Remove CONFIG_IDENT_STRING from the mt8395_genio_1200_evk defconfig.
This makes it consistent with other mediatek defconfigs and frees the
option for use by downstream users. This only affects the version string
printed by U-Boot, so it doesn't have any functional impact.

Reviewed-by: Julien Stephan <jstephan@baylibre.com>
Link: https://patch.msgid.link/20260421-mtk-configs-remove-ident-string-v1-4-66d5fc3d67be@baylibre.com
Signed-off-by: David Lechner <dlechner@baylibre.com>
5 weeks agoconfigs: mediatek: mt8390_genio_700_evk: remove CONFIG_IDENT_STRING
David Lechner [Tue, 21 Apr 2026 14:09:36 +0000 (09:09 -0500)] 
configs: mediatek: mt8390_genio_700_evk: remove CONFIG_IDENT_STRING

Remove CONFIG_IDENT_STRING from the mt8390_genio_700_evk defconfig. This
makes it consistent with other mediatek defconfigs and frees the option
for use by downstream users. This only affects the version string
printed by U-Boot, so it doesn't have any functional impact.

Reviewed-by: Julien Stephan <jstephan@baylibre.com>
Link: https://patch.msgid.link/20260421-mtk-configs-remove-ident-string-v1-3-66d5fc3d67be@baylibre.com
Signed-off-by: David Lechner <dlechner@baylibre.com>
5 weeks agoconfigs: mediatek: mt8370_genio_510_evk: remove CONFIG_IDENT_STRING
David Lechner [Tue, 21 Apr 2026 14:09:35 +0000 (09:09 -0500)] 
configs: mediatek: mt8370_genio_510_evk: remove CONFIG_IDENT_STRING

Remove CONFIG_IDENT_STRING from the mt8370_genio_510_evk defconfig. This
makes it consistent with other mediatek defconfigs and frees the option
for use by downstream users. This only affects the version string
printed by U-Boot, so it doesn't have any functional impact.

Reviewed-by: Julien Stephan <jstephan@baylibre.com>
Link: https://patch.msgid.link/20260421-mtk-configs-remove-ident-string-v1-2-66d5fc3d67be@baylibre.com
Signed-off-by: David Lechner <dlechner@baylibre.com>
5 weeks agoconfigs: mediatek: mt8365_evk: remove CONFIG_IDENT_STRING
David Lechner [Tue, 21 Apr 2026 14:09:34 +0000 (09:09 -0500)] 
configs: mediatek: mt8365_evk: remove CONFIG_IDENT_STRING

Remove CONFIG_IDENT_STRING from the mt8365_evk defconfig. This makes it
consistent with other mediatek defconfigs and frees the option for use
by downstream users. This only affects the version string printed by
U-Boot, so it doesn't have any functional impact.

Reviewed-by: Julien Stephan <jstephan@baylibre.com>
Link: https://patch.msgid.link/20260421-mtk-configs-remove-ident-string-v1-1-66d5fc3d67be@baylibre.com
Signed-off-by: David Lechner <dlechner@baylibre.com>
5 weeks agommc: mtk-sd: fix msdc cmd ready check
ht.lin [Tue, 21 Apr 2026 14:24:06 +0000 (09:24 -0500)] 
mmc: mtk-sd: fix msdc cmd ready check

Correct the check condition in msdc_cmd_is_ready() for MSDC_PS_DAT0
polling. Without this change, it may not be able to detect if the SD
controller is busy correctly for issuing the command.

Fixes: d24b69395949 ("mmc: mtk-sd: add SD/MMC host controller driver for MT7623 SoC")
Signed-off-by: ht.lin <ht.lin@mediatek.com>
Reviewed-by: Julien Stephan <jstephan@baylibre.com>
Tested-by: Julien Stephan <jstephan@baylibre.com>
Link: https://patch.msgid.link/20260421-mmc-mtk-sd-fixes-v1-3-5b840c546af2@baylibre.com
Signed-off-by: David Lechner <dlechner@baylibre.com>
5 weeks agommc: mtk-sd: enable async_fifo_crcsts on mt8189
David Lechner [Tue, 21 Apr 2026 14:24:05 +0000 (09:24 -0500)] 
mmc: mtk-sd: enable async_fifo_crcsts on mt8189

Enable the async_fifo_crcsts option for mediatek,mt8189-mmc compatible.

Without this option, writing will fail in HS200 mode.

Fixes: b3d16267b509 ("mmc: mtk-sd: add mediatek,mt8189-mmc compatible")
Reviewed-by: Julien Stephan <jstephan@baylibre.com>
Tested-by: Julien Stephan <jstephan@baylibre.com>
Link: https://patch.msgid.link/20260421-mmc-mtk-sd-fixes-v1-2-5b840c546af2@baylibre.com
Signed-off-by: David Lechner <dlechner@baylibre.com>
5 weeks agommc: mtk-sd: enable DMA on mediatek,mt8189-mmc
David Lechner [Tue, 21 Apr 2026 14:24:04 +0000 (09:24 -0500)] 
mmc: mtk-sd: enable DMA on mediatek,mt8189-mmc

Enable DMA on mediatek,mt8189-mmc compatible. The issue that was
preventing DMA from working correctly was fixed by the
get_effective_memsize() implementation in commit a7c682565b4b ("arm:
mediatek: add support of MT8189 SoC family").

Reviewed-by: Julien Stephan <jstephan@baylibre.com>
Tested-by: Julien Stephan <jstephan@baylibre.com>
Link: https://patch.msgid.link/20260421-mmc-mtk-sd-fixes-v1-1-5b840c546af2@baylibre.com
Signed-off-by: David Lechner <dlechner@baylibre.com>
5 weeks agoPrepare v2026.07-rc1 943/head v2026.07-rc1
Tom Rini [Mon, 27 Apr 2026 23:03:18 +0000 (17:03 -0600)] 
Prepare v2026.07-rc1

Signed-off-by: Tom Rini <trini@konsulko.com>
5 weeks agoMerge patch series "scsi: Replace SYNC_CACHE with FUA for scsi write"
Tom Rini [Mon, 27 Apr 2026 19:44:11 +0000 (13:44 -0600)] 
Merge patch series "scsi: Replace SYNC_CACHE with FUA for scsi write"

Balaji Selvanathan <balaji.selvanathan@oss.qualcomm.com> says:

This series replaces the SYNC_CACHE approach with FUA (Force Unit
Access) to prevent data loss during board resets while avoiding
system hangs during large sparse image flashing operations.

The previous SYNC_CACHE implementation caused timeouts and hangs
when flashing large sparse images because it issued cache sync
commands after every write operation. The FUA approach achieves
the same data integrity goal by setting the FUA bit in
WRITE10 commands.

Link: https://lore.kernel.org/r/20260416-enable_fua-v3-0-84508de2bfd9@oss.qualcomm.com
5 weeks agoscsi: Enable FUA bit in WRITE10 commands
Aswin Murugan [Thu, 16 Apr 2026 09:10:47 +0000 (14:40 +0530)] 
scsi: Enable FUA bit in WRITE10 commands

Enable the Force Unit Access (FUA) bit in SCSI WRITE10 commands to
ensure writes bypass the device's volatile cache and go directly to
non-volatile storage. This provides write-through behavior that prevents
data loss during board resets.

Reviewed-by: Varadarajan Narayanan <varadarajan.narayanan@oss.qualcomm.com>
Signed-off-by: Aswin Murugan <aswin.murugan@oss.qualcomm.com>
Signed-off-by: Balaji Selvanathan <balaji.selvanathan@oss.qualcomm.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 weeks agoRevert "scsi: sync cache on write"
Balaji Selvanathan [Thu, 16 Apr 2026 09:10:46 +0000 (14:40 +0530)] 
Revert "scsi: sync cache on write"

While the SYNC_CACHE approach prevents data loss during board resets,
it causes system hangs during large sparse image flashing operations.
This will be replaced with a FUA (Force Unit Access) approach in future
commit, which achieves the same data integrity goal more efficiently.

This reverts commit ffe4e6ab42d2534302be825e49a2d085acf80f30.

Signed-off-by: Balaji Selvanathan <balaji.selvanathan@oss.qualcomm.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
5 weeks agoMerge patch series "net: migrate NO_NET out of the networking stack choice"
Tom Rini [Mon, 27 Apr 2026 17:28:25 +0000 (11:28 -0600)] 
Merge patch series "net: migrate NO_NET out of the networking stack choice"

Quentin Schulz <foss+uboot@0leil.net> says:

This migrates the net options away from the main Kconfig to net/Kconfig,
rename the current NET option to NET_LEGACY to really highlight what it
is and hopefully encourage more people to use lwIP, add a new NET
menuconfig (but keep NO_NET as an alias to NET=n for now) which then
allows us to replace all the "if legacy_stack || lwip_stack" checks with
"if net_support" which is easier to read and maintain.

The only doubt I have is wrt SYS_RX_ETH_BUFFER which seems to be needed
for now even when no network is configured? Likely due to
include/net-common.h with PKTBUFSRX?

No change in behavior is intended. Only change in defconfig including
other defconfigs where NO_NET=y or NET is not set, in which case NO_NET
is not set or NET=y should be set in the top defconfig. Similar change
required for config fragments. See commit log in patch adding NET
menuconfig for details.

This was tested based on 70fd0c3bb7c2 ("x86: there is no
CONFIG_UBOOT_ROMSIZE_KB_12288"), from within the GitLab CI container
trini/u-boot-gitlab-ci-runner:noble-20251013-23Jan2026 and set up
similarly as in "build all platforms in a single job" GitLab CI job.

 #!/usr/bin/env bash
 set -o pipefail
 set -eux

 ARGS="-BvelPEWM --reproducible-builds --step 0"
 ./tools/buildman/buildman -o ${O} --force-build $ARGS -CE $*
 ./tools/buildman/buildman -o ${O} $ARGS -Ssd $*

O=../build/u-boot/ ../u-boot.sh -b master^..b4/net-kconfig |& tee ../log.txt

I can't really decipher the log.txt, but there's no line starting with
+ which would be an error according to tools/buildman/builder.py help
text. Additionally, because I started the script with set -e set and
because buildman has an exit code != 0 when it fails to build a board,
and I have the summary printed (which is the second buildman call), I
believe it means all builds passed.

The summary is the following:
   aarch64: (for 537/537 boards) all +0.0 rodata +0.0
            uniphier_v8    : all +1 rodata +1
               u-boot: add: 0/0, grow: 1/0 bytes: 1/0 (1)
                 function                                   old     new   delta
                 data_gz                                  10640   10641      +1
       arm: (for 733/733 boards) all -0.0 rodata -0.0
            uniphier_v7    : all -1 rodata -1
               u-boot: add: 0/0, grow: 0/-1 bytes: 0/-1 (-1)
                 function                                   old     new   delta
                 data_gz                                  11919   11918      -1
            opos6uldev     : all -3 rodata -3
               u-boot: add: 0/0, grow: 0/-1 bytes: 0/-3 (-3)
                 function                                   old     new   delta
                 data_gz                                  18778   18775      -3
            uniphier_ld4_sld8: all -3 rodata -3
               u-boot: add: 0/0, grow: 0/-1 bytes: 0/-3 (-3)
                 function                                   old     new   delta
                 data_gz                                  11276   11273      -3
            stemmy         : all -20 rodata -20
               u-boot: add: 0/0, grow: 0/-1 bytes: 0/-20 (-20)
                 function                                   old     new   delta
                 data_gz                                  15783   15763     -20

As far as I could tell this data_gz is an automatically generated array
when CONFIG_CMD_CONFIG is enabled. It is the compressed .config stored
in binary form. Because I'm changing the name of symbols, replacing a
menu with a menuconfig, additional text makes it to .config and the
"# Networking" section in .config disappears.

Here is the diff for the 5 defconfigs listed above, generated with:

for f in build/*-m; do
diff --unified=0 $f/.config $(dirname $f)/$(basename -a -s '-m' $f)/.config
done

(-m is the build directory for master, and without the suffix, it's the
top commit of this series)

"""
 --- build/opos6uldev-m/.config 2026-04-20 10:53:49.804528526 +0200
 +++ build/opos6uldev/.config 2026-04-20 11:03:37.430242767 +0200
 @@ -970,4 +969,0 @@
 -
 -#
 -# Networking
 -#
 @@ -975,0 +972 @@
 +CONFIG_NET_LEGACY=y
 --- build/stemmy-m/.config 2026-04-20 11:01:33.653698123 +0200
 +++ build/stemmy/.config 2026-04-20 11:04:53.452577311 +0200
 @@ -733,4 +732,0 @@
 -
 -#
 -# Networking
 -#
 @@ -738,2 +733,0 @@
 -# CONFIG_NET is not set
 -# CONFIG_NET_LWIP is not set
 --- build/uniphier_ld4_sld8-m/.config 2026-04-20 11:00:41.605469071 +0200
 +++ build/uniphier_ld4_sld8/.config 2026-04-20 11:04:22.226439899 +0200
 @@ -997,4 +996,0 @@
 -
 -#
 -# Networking
 -#
 @@ -1002,0 +999 @@
 +CONFIG_NET_LEGACY=y
 --- build/uniphier_v7-m/.config 2026-04-20 10:53:04.019307319 +0200
 +++ build/uniphier_v7/.config 2026-04-20 11:03:01.688085486 +0200
 @@ -1004,4 +1003,0 @@
 -
 -#
 -# Networking
 -#
 @@ -1009,0 +1006 @@
 +CONFIG_NET_LEGACY=y
 --- build/uniphier_v8-m/.config 2026-04-20 10:43:05.614441175 +0200
 +++ build/uniphier_v8/.config 2026-04-20 10:41:03.214852130 +0200
 @@ -875,4 +874,0 @@
 -
 -#
 -# Networking
 -#
 @@ -880,0 +877 @@
 +CONFIG_NET_LEGACY=y
"""

This is fine:
- Networking menu doesn't exist anymore so "#\n# Networking\n#\n" won't
  be in .config anymore.
- opos6uldev, uniphier_ld4_sld8, uniphier_v7 and uniphier_v8 all have
  (old) CONFIG_NET enabled, (new) CONFIG_NET will still be set but
  CONFIG_NET_LEGACY also needs to be defined now to reflect the stack
  choice (even if default),
- stemmy has CONFIG_NO_NET set, which means CONFIG_NET and
  CONFIG_NET_LWIP are not reachable anymore hence why they don't need to
  be part of .config,

GitLab CI was run on this series (well, not exactly, but it's only
changes to the git logs that were made):
https://source.denx.de/u-boot/contributors/qschulz/u-boot/-/pipelines/29849

It passes.

Link: https://lore.kernel.org/r/20260420-net-kconfig-v1-0-9900002d8e72@cherry.de
5 weeks agoboot: remove NO_NET use
Quentin Schulz [Mon, 20 Apr 2026 11:36:12 +0000 (13:36 +0200)] 
boot: remove NO_NET use

NO_NET is now a transitional symbol which may eventually be removed. Its
meaning is the opposite of the new meaning of NET (that is, any
networking stack).

Update the symbol dependency by using NET instead of !NO_NET.

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 weeks agodoc: remove mention to non-existing TPL_NET
Quentin Schulz [Mon, 20 Apr 2026 11:36:11 +0000 (13:36 +0200)] 
doc: remove mention to non-existing TPL_NET

TPL_NET symbol never existed in the first place, so let's remove this
misleading piece of documentation.

Fixes: 143c9a7e9d68 ("doc: describe TPL/VPL/SPL boot")
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 weeks agosimplify NET_LEGACY || NET_LWIP condition with NET condition
Quentin Schulz [Mon, 20 Apr 2026 11:36:10 +0000 (13:36 +0200)] 
simplify NET_LEGACY || NET_LWIP condition with NET condition

Since the move to make NET a menuconfig and NO_NET a synonym of NET=n,
when NET is enabled, NET_LEGACY || NET_LWIP is necessarily true, so
let's simplify the various checks across the codebase.

SPL_NET_LWIP doesn't exist but SPL_NET_LEGACY is an alias for SPL_NET so
the proper symbol is still defined in SPL whenever needed.

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 weeks agonet: make NET a menuconfig (and downgrade NO_NET to a simple config)
Quentin Schulz [Mon, 20 Apr 2026 11:36:09 +0000 (13:36 +0200)] 
net: make NET a menuconfig (and downgrade NO_NET to a simple config)

This will allow a bunch of simplifications across the code base.
Disabling NET is the equivalent of today's NO_NET choice. This means
that if NET is enabled, either the legacy or lwIP stack is necessarily
selected, which allows us to simplify if NET_LEGACY || NET_LWIP into
if NET in a later commit.

Config fragments - or defconfigs including other defconfigs - setting
the network stack (NET_LEGACY or NET_LWIP) must also set NET (or unset
NO_NET) if the config they apply to - or the included defconfigs -
unsets NET (or selects NO_NET) as otherwise the NET_LEGACY and NET_LWIP
symbols are unreachable. This is the case for the two defconfig modified
in this commit.

NO_NET is now a convenience symbol which hides NET entirely to avoid
modifying many defconfigs. If one selected NO_NET to disable the
networking stack in the past, this will still work for now. Technically,
we should be using the "transitional" Kconfig attribute but that is only
available since Kconfig from Linux kernel v6.18 and we're on 6.1 right
now.

Note that this moves CONFIG_SYS_RX_ETH_BUFFER from under the Network
menu back into the main menu as it seems like it needs to be defined
even when there's no need for NET support at all and menuconfig option
doesn't work the same way as a menu.

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 weeks agorename NET to NET_LEGACY
Quentin Schulz [Mon, 20 Apr 2026 11:36:08 +0000 (13:36 +0200)] 
rename NET to NET_LEGACY

Highlight that NET really is the legacy networking stack by renaming the
option to NET_LEGACY.

This requires us to add an SPL_NET_LEGACY alias to SPL_NET as otherwise
CONFIG_IS_ENABLED(NET_LEGACY) will not work for SPL.

The "depends on !NET_LWIP" for SPL_NET clearly highlights that it is
using the legacy networking app so this seems fine to do.

This also has the benefit of removing potential confusion on NET being a
specific networking stack instead of "any" network stack.

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 weeks agomove networking menu in net/Kconfig
Quentin Schulz [Mon, 20 Apr 2026 11:36:07 +0000 (13:36 +0200)] 
move networking menu in net/Kconfig

In the main Kconfig, there are only two more menus, General Setup and
Expert, in addition to the net menu. Since the part in the main Kconfig
is mostly about selecting the network stack (legacy or lwIP), and that
we already have a net/Kconfig, let's move those to net/Kconfig to have
everything in the same place.

No intended change in behavior.

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
5 weeks agoMerge patch series "board: toradex: aquila-am69: Fix 16GB dual-rank DDR cfg and memor...
Tom Rini [Mon, 27 Apr 2026 17:26:25 +0000 (11:26 -0600)] 
Merge patch series "board: toradex: aquila-am69: Fix 16GB dual-rank DDR cfg and memory size detection"

Emanuele Ghidoli <emanuele.ghidoli@toradex.com> says:

This patch series:
 - fix an oversight in 16GB dual-rank DDR configuration
 - fix the memory size setup logic

Link: https://lore.kernel.org/r/20260421151604.1141082-1-ghidoliemanuele@gmail.com
5 weeks agoboard: toradex: aquila-am69: Fix memory size setup logic
Emanuele Ghidoli [Tue, 21 Apr 2026 15:15:56 +0000 (17:15 +0200)] 
board: toradex: aquila-am69: Fix memory size setup logic

The hardware configuration pins are used both to select the DDR
configuration and to determine the installed memory size.

On Aquila AM69, the DDR timing patch is applied in the R5 SPL, while the
memory size fixup for the next-stage U-Boot DT is done later in the A72
SPL path.
The previous immplementation was not taking in account that the hw_cfg
value is lost both during SPL execution (board_init_f and board_init_r)
and between SPL and U-Boot proper.

Fix this by reading the hardware configuration pins when the memory size
is actually needed:
- in the R5 SPL, to select the correct DDR configuration
- in the A72 SPL, to fix up the U-Boot DT memory size and bank layout

Fixes: 3f0528882c0d ("board: toradex: add aquila am69 support")
Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
Acked-by: Francesco Dolcini <francesco.dolcini@toradex.com>
5 weeks agoboard: toradex: aquila-am69: Fix 16GB dual-rank DDR configuration
Emanuele Ghidoli [Tue, 21 Apr 2026 15:15:55 +0000 (17:15 +0200)] 
board: toradex: aquila-am69: Fix 16GB dual-rank DDR configuration

The 16GB dual-rank DDR configuration uses an incorrect DDRSS_PLL_FHS_CNT
value. This makes DDR initialization hang during the DDR frequency
handshake sequence.

Update DDRSS_PLL_FHS_CNT to the correct value for the 16GB dual-rank
configuration.

Fixes: 39e014f43a15 ("board: toradex: aquila-am69: Add support for 16GB dual rank memory configuration")
Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com>
Acked-by: Francesco Dolcini <francesco.dolcini@toradex.com>
5 weeks agoMerge patch series "k3-am69-aquila: Migrate to OF_UPSTREAM and add remoteproc FW...
Tom Rini [Mon, 27 Apr 2026 17:19:46 +0000 (11:19 -0600)] 
Merge patch series "k3-am69-aquila: Migrate to OF_UPSTREAM and add remoteproc FW pre-loading"

Ernest Van Hoecke <ernestvanhoecke@gmail.com> says:

This patch series migrates the Aquila AM69 to OF_UPSTREAM to receive
automatic device tree updates. It also adds remoteproc firmware
pre-loading to the environment.

Link: https://lore.kernel.org/r/20260417-elb-6911-aquila69-ofupstr-v1-0-400d93db3747@toradex.com
5 weeks agoboard: toradex: aquila-am69: add remoteproc firmware pre-loading
Vitor Soares [Fri, 17 Apr 2026 13:42:04 +0000 (15:42 +0200)] 
board: toradex: aquila-am69: add remoteproc firmware pre-loading

Some use cases require remoteproc firmware to be loaded before Linux
boots. Introduce rprocsemmcboot and rproc_fw_binaries to load the
remoteproc cores from U-Boot, relying on the TI k3_rproc framework
which already handles the secure firmware variants, firmware loading,
and proper initialization.

The firmware binaries are expected to be present in the eMMC rootfs
under /lib/firmware/.

To activate, run rprocsemmcboot or add it to bootcmd:
  bootcmd=run rprocsemmcboot; bootflow scan -b

The upstream U-Boot does not yet have the remoteproc DT nodes enabled
for the Aquila AM69, making firmware loading fail. Marking as pending
waiting for remoteproc enabling, which could happen along with the
OF_UPSTREAM migration.

Signed-off-by: Vitor Soares <vitor.soares@toradex.com>
Acked-by: Francesco Dolcini <francesco.dolcini@toradex.com>
5 weeks agoarm: dts: k3-am69-aquila: migrate to OF_UPSTREAM
Ernest Van Hoecke [Fri, 17 Apr 2026 13:42:03 +0000 (15:42 +0200)] 
arm: dts: k3-am69-aquila: migrate to OF_UPSTREAM

Enable CONFIG_OF_UPSTREAM to receive automatic
device tree updates for the Aquila AM69.

Remove the now-obsolete device tree files:
- arch/arm/dts/k3-am69-aquila-dev.dts
- arch/arm/dts/k3-am69-aquila.dtsi

Signed-off-by: Ernest Van Hoecke <ernest.vanhoecke@toradex.com>
Acked-by: Francesco Dolcini <francesco.dolcini@toradex.com>
5 weeks agovirtio: add support for SIZE_MAX & SEG_MAX features
Christian Pƶtzsch [Fri, 17 Apr 2026 12:03:19 +0000 (14:03 +0200)] 
virtio: add support for SIZE_MAX & SEG_MAX features

Some virtio implementations may forward the virtio requests directly to
the underlying hw. The hw may have some restrictions in how many and how
big the requests can be. Therefore, the corresponding virtio device will
announce this limitations with the SIZE_MAX & SEG_MAX feature.

Add support for those features. Split an io request into multiple virtio
requests if more than seg_max segments would be used. Also split a
single buffer request into multiple segments if the buffer is bigger
then size_max.

Signed-off-by: Christian Pƶtzsch <christian.poetzsch@kernkonzept.com>
Signed-off-by: Adam Lackorzynski <adam@l4re.org>
5 weeks agopci: correct PCI device enumeration to include all functions on device 0
Maximilian Brune [Wed, 22 Apr 2026 12:57:53 +0000 (14:57 +0200)] 
pci: correct PCI device enumeration to include all functions on device 0

Currently the implementation does not just skip all devices beside
device 0, it also skips all functions (besides 0) on device 0. This
broke basically all AMD platforms, since they have a lot of internal SOC
devices behind these functions.

This was detected, because the XHCI controller and therefore the USB
devices were not found by u-boot on AMD/crater platform.

PCI_MASK_BUS() returns both device and function bits, so it skips any
bdf where either device > 0 or function > 0. Using PCI_DEV() extracts
only the device number, matching the intent in only_one_child().
It therefore now checks all functions on device 0 (Linux does the same).

I build tested u-boot as coreboot payload and run it on a recent x86 AMD
platform. Devices like the XHCI controller are now found again.

Fixes: fbde868ba4aa ("pci: skip unnecessary PCIe scanning")
Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
CC: Tom Rini <trini@konsulko.com>
CC: Andrew Goodbody <andrew.goodbody@linaro.org>
CC: George McCollister <george.mccollister@konsulko.com>
CC: Simon Glass <sjg@chromium.org>
5 weeks agoMerge patch series "Add support for DT overlays handoff"
Tom Rini [Mon, 27 Apr 2026 15:44:40 +0000 (09:44 -0600)] 
Merge patch series "Add support for DT overlays handoff"

Raymond Mao <raymond.mao@linaro.org> says:

The series include refactoring on bloblist and fdtdec to support handoff
of multiple DT overlays and applying them into the DT base during setup.
All changes are aligned to the spec update for supporting DT overlay
handoff[1].

Notes for testing:

Currently DT overlay is not yet enabled in TF-A, but with the test
patches I provided for TF-A and OP-TEE build, importing a DT overlay
blob file from QEMU to TF-A reserved memory is supported.
Follow below instructions to build and run for test:
$ repo init -u https://github.com/OP-TEE/manifest.git -m qemu_v8.xml
Replace your local qemu_v8.xml with [2], which contains all necessary
changes in both TF-A and OP-TEE build.
$ repo sync
$ cd build
$ make toolchains
$ make ARM_FIRMWARE_HANDOFF=y all
Copy and rename your DT overlay blob as 'qemu_v8.dtb' into out/bin
$ make ARM_FIRMWARE_HANDOFF=y run-only

[1] Add Transfer Entry for Devicetree Overlay
https://github.com/FirmwareHandoff/firmware_handoff/pull/74

[2] https://github.com/raymo200915/optee_manifest/blob/dt_overlay_handoff/qemu_v8.xml

Link: https://lore.kernel.org/r/20250718141621.3147633-1-raymond.mao@linaro.org
5 weeks agoconfigs: Select OF_LIBFDT_OVERLAY to hand over DTO via bloblist
Raymond Mao [Fri, 18 Jul 2025 14:16:19 +0000 (07:16 -0700)] 
configs: Select OF_LIBFDT_OVERLAY to hand over DTO via bloblist

Select OF_LIBFDT_OVERLAY for qemu_arm64 and vexpress_fvp_bloblist
to hand over DTO via bloblist.

Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
Tested-by: Michal Simek <michal.simek@amd.com>
5 weeks agofdtdec: apply DT overlays from bloblist
Raymond Mao [Fri, 18 Jul 2025 14:16:18 +0000 (07:16 -0700)] 
fdtdec: apply DT overlays from bloblist

During FDT setup, apply all existing DT overlays from the bloblist
to the base FDT if bloblist is being used for handoff from previous
boot stage.
According to the Firmware Handoff spec update to support DT overlay [1],
an overlay must have the same top-level compatible string as its target
base DT has.
Before applying the overlays, check whether sufficient space is
reserved in the base DT blob, if not, resize the blob to the allowed
padded size, which is limited by CONFIG_SYS_FDT_PAD and the bloblist
spare space size.
After all overlays are applied, resize the merged DT to its actual size.

[1] Add Transfer Entry for Devicetree Overlay
https://github.com/FirmwareHandoff/firmware_handoff/pull/74

Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Tested-by: Michal Simek <michal.simek@amd.com>
5 weeks agobloblist: add API for applying blobs with specified tag
Raymond Mao [Fri, 18 Jul 2025 14:16:17 +0000 (07:16 -0700)] 
bloblist: add API for applying blobs with specified tag

Add an API to search for the blobs with specified tag and use the
hook function to apply the blob data.
Add a helper function to return the inline header size as according
to recent spec[1] updates, the actual data can be following an inline
header instead of following the TE header immediately.

[1] Firmware Handoff spec:
https://github.com/FirmwareHandoff/firmware_handoff

Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Tested-by: Michal Simek <michal.simek@amd.com>
5 weeks agobloblist: fix a potential negative size for memmove
Raymond Mao [Fri, 18 Jul 2025 14:16:16 +0000 (07:16 -0700)] 
bloblist: fix a potential negative size for memmove

It causes a panic when blob is shrunk and 'new_alloced' is less than
'next_ofs'. The data area that needs to be moved should end up at
'hdr->used_size'.

Fixes: 1fe59375498f ("bloblist: Support resizing a blob")
Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Tested-by: Michal Simek <michal.simek@amd.com>
5 weeks agobloblist: add helper functions
Raymond Mao [Fri, 18 Jul 2025 14:16:15 +0000 (07:16 -0700)] 
bloblist: add helper functions

Add two helper functions for:
1. marking a blob void
2. getting blob record from a given blob data pointer.

Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Tested-by: Michal Simek <michal.simek@amd.com>
5 weeks agobloblist: add blob type for DT overlay
Raymond Mao [Fri, 18 Jul 2025 14:16:14 +0000 (07:16 -0700)] 
bloblist: add blob type for DT overlay

Add blob type for DT overlay according to the update of Firmware
Handoff spec[1].
Add an inline header to represent the 'subtype' in a DT overlay
blob payload.

[1] Add Transfer Entry for Devicetree Overlay
https://github.com/FirmwareHandoff/firmware_handoff/pull/74

Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Tested-by: Michal Simek <michal.simek@amd.com>
5 weeks agoMerge branch 'casey/qcom-main-13Apr2026' of https://source.denx.de/u-boot/custodians...
Tom Rini [Mon, 27 Apr 2026 14:05:40 +0000 (08:05 -0600)] 
Merge branch 'casey/qcom-main-13Apr2026' of https://source.denx.de/u-boot/custodians/u-boot-snapdragon

Various Qualcomm additions this cycle:
* USB superspeed support for 1 platform
* Initial support for the Milos platform and the Fairphone Gen 6
  (chainloaded from ABL)
* Improved support for booting with OP-TEE on supported platforms
* Initial basic power domain support

Notably there is a generic change to the device core, missing power
domains will no longer cause a device to fail probe and instead will
just print a warning. This shouldn't affect any existing platforms.

5 weeks agoMerge tag 'u-boot-ufs-20260427' of https://source.denx.de/u-boot/custodians/u-boot-ufs
Tom Rini [Mon, 27 Apr 2026 14:04:22 +0000 (08:04 -0600)] 
Merge tag 'u-boot-ufs-20260427' of https://source.denx.de/u-boot/custodians/u-boot-ufs

- Update line reset configuration for rcar-gen5
- core: Fix heap corruption due to out of bounds write
- rockchip: Make use of controller resets

5 weeks agoMerge tag 'u-boot-amlogic-next-20260427' of https://source.denx.de/u-boot/custodians...
Tom Rini [Mon, 27 Apr 2026 14:04:06 +0000 (08:04 -0600)] 
Merge tag 'u-boot-amlogic-next-20260427' of https://source.denx.de/u-boot/custodians/u-boot-amlogic

- enable EFI Capsule on Disk (+ sysreset fixup/cleanup)
- do not fail when setting SD_EMMC_x_CLK0 on GX/G12

5 weeks agoqcom_defconfig: Disable EFI_HAVE_RUNTIME_RESET in qcom_defconfig
Aswin Murugan [Tue, 24 Mar 2026 17:59:13 +0000 (23:29 +0530)] 
qcom_defconfig: Disable EFI_HAVE_RUNTIME_RESET in qcom_defconfig

Qualcomm platforms rely on the kernel to manage specialized reboot modes
such as EDL, bootloader entry, and other vendor-specific reset flows.
Allowing U-Boot to override these via EFI runtime reset services leads to
incorrect behavior when the kernel issues advanced reboot requests.

Now that EFI_HAVE_RUNTIME_RESET is exposed as a user-configurable Kconfig
option, disable it for qcom_defconfig so that the kernel retains full
control over reboot handling on Qualcomm SoCs.

This ensures that EFI runtime reboot callbacks are not registered on
these platforms, preventing conflicts with kernel-managed PSCI reset
paths.

Signed-off-by: Aswin Murugan <aswin.murugan@oss.qualcomm.com>
Reviewed-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
Acked-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Link: https://patch.msgid.link/20260324175913.92858-3-aswinm@qti.qualcomm.com
Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
5 weeks agoefi_loader: make EFI_HAVE_RUNTIME_RESET a user-selectable option
Aswin Murugan [Tue, 24 Mar 2026 17:59:12 +0000 (23:29 +0530)] 
efi_loader: make EFI_HAVE_RUNTIME_RESET a user-selectable option

Expose EFI_HAVE_RUNTIME_RESET as a proper Kconfig boolean with a prompt
so platforms can explicitly enable or disable advertising the EFI reset
runtime service.

The current PSCI-based EFI runtime reset implementation is always
enabled whenever CONFIG_PSCI_RESET is selected, but it does not support
passing the additional arguments required for specialized reset modes.
As a result, reboot requests such as bootloader mode or EDL mode cannot
be propagated correctly and instead fall back to a normal reboot.

By making EFI_HAVE_RUNTIME_RESET user-configurable, platforms that
depend on extended PSCI reset can now explicitly disable EFI runtime
reset handling even when CONFIG_PSCI_RESET is enabled, ensuring
that the kernel retains full control of advanced reboot paths.

Default behavior for existing platforms remains unchanged.

Signed-off-by: Aswin Murugan <aswin.murugan@oss.qualcomm.com>
Reviewed-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Link: https://patch.msgid.link/20260324175913.92858-2-aswinm@qti.qualcomm.com
Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
5 weeks agodts: qcs6490-rb3gen2: Remove USB controller dr_mode override
Balaji Selvanathan [Tue, 24 Mar 2026 15:46:55 +0000 (21:16 +0530)] 
dts: qcs6490-rb3gen2: Remove USB controller dr_mode override

Remove the USB controller dr_mode override from the u-boot device
tree. The upstream Linux device tree already configures the USB
controller with dr_mode = "otg", which supports both host and
peripheral modes including fastboot.

The previous override to "host" mode prevented fastboot from working
as it requires peripheral mode support. By removing this override,
the upstream OTG configuration is inherited, enabling fastboot while
maintaining host mode capability through the usb-role-switch
property.

Signed-off-by: Balaji Selvanathan <balaji.selvanathan@oss.qualcomm.com>
Link: https://patch.msgid.link/20260324-kodiak_dts-v2-1-243c28a3ffb9@oss.qualcomm.com
Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
5 weeks agoboard/qualcomm: add debug config fragment for Milos
Luca Weiss [Wed, 18 Mar 2026 12:46:33 +0000 (13:46 +0100)] 
board/qualcomm: add debug config fragment for Milos

Add a fragment similar to others to enable earlycon.

Reviewed-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
Link: https://patch.msgid.link/20260318-milos-bringup-v2-7-650b91dd75d8@fairphone.com
Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
5 weeks agoqcom_defconfig: Enable Milos clock driver
Luca Weiss [Wed, 18 Mar 2026 12:46:32 +0000 (13:46 +0100)] 
qcom_defconfig: Enable Milos clock driver

Enable the driver so that Milos devices can boot with qcom_defconfig.

Reviewed-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
Link: https://patch.msgid.link/20260318-milos-bringup-v2-6-650b91dd75d8@fairphone.com
Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
5 weeks agogpio: qcom: Support GPIOs on PM7550 PMIC
Luca Weiss [Wed, 18 Mar 2026 12:46:31 +0000 (13:46 +0100)] 
gpio: qcom: Support GPIOs on PM7550 PMIC

The GPIOs on PM7550 work fine using the qcom_spmi_gpio driver and
enables the use of the Volume Up button on the Fairphone (Gen. 6)
smartphone.

Reviewed-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
Link: https://patch.msgid.link/20260318-milos-bringup-v2-5-650b91dd75d8@fairphone.com
Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
5 weeks agoregulator: qcom-rpmh-regulator: add support for PM7550 regulators
Luca Weiss [Wed, 18 Mar 2026 12:46:30 +0000 (13:46 +0100)] 
regulator: qcom-rpmh-regulator: add support for PM7550 regulators

Add the PM7550 regulator data found on Qualcomm Milos devices.
The tables are imported from the Linux driver (tag v7.0-rc4). The SMPS
regulators were not added now.

Reviewed-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
Link: https://patch.msgid.link/20260318-milos-bringup-v2-4-650b91dd75d8@fairphone.com
Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
5 weeks agophy: qcom: Add Milos to QMP UFS PHY driver
Luca Weiss [Wed, 18 Mar 2026 12:46:29 +0000 (13:46 +0100)] 
phy: qcom: Add Milos to QMP UFS PHY driver

Import the configuration for the Milos SoC from Linux (tag v7.0-rc4).

Reviewed-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
Link: https://patch.msgid.link/20260318-milos-bringup-v2-3-650b91dd75d8@fairphone.com
Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
5 weeks agoclk/qcom: Add Milos clock driver
Luca Weiss [Wed, 18 Mar 2026 12:46:28 +0000 (13:46 +0100)] 
clk/qcom: Add Milos clock driver

Add Clock driver for the GCC block found in the Milos SoC.

The qcom-snps-eusb2-hsphy driver requires the TCXO frequency ("ref"
clock), so we need to pass that as well.

Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
Reviewed-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
Link: https://patch.msgid.link/20260318-milos-bringup-v2-2-650b91dd75d8@fairphone.com
Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
5 weeks agodrivers: pinctrl: Add Qualcomm Milos TLMM driver
Luca Weiss [Wed, 18 Mar 2026 12:46:27 +0000 (13:46 +0100)] 
drivers: pinctrl: Add Qualcomm Milos TLMM driver

Add support for TLMM pin controller block (Top Level Mode Multiplexer)
on Milos SoC, with support for special pins.

Correct pin configuration is required for working debug UART and eMMC/SD
cards.

Reviewed-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
Link: https://patch.msgid.link/20260318-milos-bringup-v2-1-650b91dd75d8@fairphone.com
Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
5 weeks agoclk: qcom: sc7280: add missing SDCC1 clocks
Ajit Singh [Thu, 26 Feb 2026 19:32:17 +0000 (01:02 +0530)] 
clk: qcom: sc7280: add missing SDCC1 clocks

Add GCC_SDCC1_AHB_CLK and GCC_SDCC1_APPS_CLK gate clocks.
Required on platforms where SDCC1 is used for eMMC.

Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=a3cc092196ef63570c8744c3ac88c3c6c67ab44b
Signed-off-by: Ajit Singh <blfizzyy@gmail.com>
Reviewed-by: Casey Connolly <casey.connolly@linaro.org>
Reviewed-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
Link: https://patch.msgid.link/20260226193217.82657-1-blfizzyy@gmail.com
Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
5 weeks agoboard/qualcomm: Introduce TF-A and OP-TEE config fragment
Sumit Garg [Tue, 27 Jan 2026 06:23:41 +0000 (11:53 +0530)] 
board/qualcomm: Introduce TF-A and OP-TEE config fragment

Recently upstream TF-A/OP-TEE has started gaining support for Qcom
platforms. RB3Gen2 being the first one and more to come. U-Boot in
corresponding boot flow is packaged as a position independent executable.

So, lets add a generic U-Boot config fragment for Qcom platforms to
support TF-A/OP-TEE based TrustZone stack. Build command:

$ ./scripts/kconfig/merge_config.sh \
       configs/qcom_defconfig \
       board/qualcomm/tfa-optee.config
$ make -j`nproc` DEVICE_TREE=qcom/qcs6490-rb3gen2

For more information refer here:
https://trustedfirmware-a.readthedocs.io/en/latest/plat/qti/rb3gen2.html

Signed-off-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
Reviewed-by: Casey Connolly <casey.connolly@linaro.org>
Link: https://patch.msgid.link/20260127062341.723966-4-sumit.garg@kernel.org
Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
5 weeks agomach-snapdragon: of_fixup: Add OP-TEE DT fixup support
Sumit Garg [Tue, 27 Jan 2026 06:23:40 +0000 (11:53 +0530)] 
mach-snapdragon: of_fixup: Add OP-TEE DT fixup support

Add support for OP-TEE live tree DT fixup support which enables U-Boot
OP-TEE driver to be probed. As well as the EFI DT fixup protocol allows
the live tree fixup to be carried over to the OS for the OP-TEE driver
in the OS to probe as well.

Note that this fixup only gets applied if OP-TEE support is detected via
checking for OP-TEE message UID.

Signed-off-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
Link: https://patch.msgid.link/20260127062341.723966-3-sumit.garg@kernel.org
Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
5 weeks agotee: optee: Export OP-TEE message UID check API
Sumit Garg [Tue, 27 Jan 2026 06:23:39 +0000 (11:53 +0530)] 
tee: optee: Export OP-TEE message UID check API

OP-TEE message UID check API can be useful to know whether OP-TEE
is enabled on not assuming the corresponding SMC call is properly
handled if OP-TEE is not supported.

This API can be used by platform code to know OP-TEE presence and
on that basis OP-TEE DT node can be added as part of DT fixups for
the OP-TEE driver probe to happen for both U-Boot and Linux.

Signed-off-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
Reviewed-by: Casey Connolly <casey.connolly@linaro.org>
Link: https://patch.msgid.link/20260127062341.723966-2-sumit.garg@kernel.org
Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
5 weeks agoqcom_defconfig: enable psci based sysreset
Varadarajan Narayanan [Wed, 21 Jan 2026 06:39:20 +0000 (12:09 +0530)] 
qcom_defconfig: enable psci based sysreset

Enable CONFIG_SYSRESET_QCOM_PSCI to allow U-Boot to reset to Emergency
Download mode.

Reviewed-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
Signed-off-by: Varadarajan Narayanan <varadarajan.narayanan@oss.qualcomm.com>
Link: https://patch.msgid.link/20260121063920.1500293-6-varadarajan.narayanan@oss.qualcomm.com
Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
5 weeks agocmd: boot: Add '-edl' option to reset command documentation
Varadarajan Narayanan [Wed, 21 Jan 2026 06:39:19 +0000 (12:09 +0530)] 
cmd: boot: Add '-edl' option to reset command documentation

Add help text about '-edl' option to reset command definition and
related documentation.

Reviewed-by: Casey Connolly <casey.connolly@linaro.org>
Reviewed-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
Signed-off-by: Varadarajan Narayanan <varadarajan.narayanan@oss.qualcomm.com>
Link: https://patch.msgid.link/20260121063920.1500293-5-varadarajan.narayanan@oss.qualcomm.com
Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
5 weeks agosysreset: Implement PSCI based reset to EDL mode for QCOM SoCs
Varadarajan Narayanan [Wed, 21 Jan 2026 06:39:18 +0000 (12:09 +0530)] 
sysreset: Implement PSCI based reset to EDL mode for QCOM SoCs

Implement request_arg() sysreset_op for QCOM SoCs that use
PSCI to reset to EDL (Emergency Download) mode.

Reviewed-by: Casey Connolly <casey.connolly@linaro.org>
Reviewed-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
Signed-off-by: Varadarajan Narayanan <varadarajan.narayanan@oss.qualcomm.com>
Link: https://patch.msgid.link/20260121063920.1500293-4-varadarajan.narayanan@oss.qualcomm.com
[casey: add missing ARM_SMCCC depends to kconfig to fix CI allyesconfig]
Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
5 weeks agodrivers: sysreset: Add sysreset op that can take arguments
Varadarajan Narayanan [Wed, 21 Jan 2026 06:39:17 +0000 (12:09 +0530)] 
drivers: sysreset: Add sysreset op that can take arguments

Add a 'request_arg' op to struct sysreset_ops to enable sysreset drivers
to receive arguments given to the 'reset' command. Process the
request_arg() op before the usual request() op.

Reviewed-by: Casey Connolly <casey.connolly@linaro.org>
Reviewed-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
Signed-off-by: Varadarajan Narayanan <varadarajan.narayanan@oss.qualcomm.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Link: https://patch.msgid.link/20260121063920.1500293-3-varadarajan.narayanan@oss.qualcomm.com
Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
5 weeks agoarm: psci: Add API to check for support of specific PSCI function
Varadarajan Narayanan [Wed, 21 Jan 2026 06:39:16 +0000 (12:09 +0530)] 
arm: psci: Add API to check for support of specific PSCI function

Add an API to check if a specific PSCI function is supported or not.
This is based on the psci_features() function present in Linux kernel
(drivers/firmware/psci/psci.c).

Reviewed-by: Casey Connolly <casey.connolly@linaro.org>
Reviewed-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
Signed-off-by: Varadarajan Narayanan <varadarajan.narayanan@oss.qualcomm.com>
Link: https://patch.msgid.link/20260121063920.1500293-2-varadarajan.narayanan@oss.qualcomm.com
Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
5 weeks agoMAINTAINERS: Add entry for Qualcomm PHY drivers
Balaji Selvanathan [Wed, 3 Dec 2025 11:07:35 +0000 (16:37 +0530)] 
MAINTAINERS: Add entry for Qualcomm PHY drivers

Add the file pattern for Qualcomm PHY drivers to the MAINTAINERS file.

Signed-off-by: Balaji Selvanathan <balaji.selvanathan@oss.qualcomm.com>
Reviewed-by: Varadarajan Narayanan <varadarajan.narayanan@oss.qualcomm.com>
Link: https://patch.msgid.link/20251203110735.1959862-7-balaji.selvanathan@oss.qualcomm.com
Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
5 weeks agoconfigs: qcm6490: Enable super-speed USB support
Balaji Selvanathan [Wed, 3 Dec 2025 11:07:34 +0000 (16:37 +0530)] 
configs: qcm6490: Enable super-speed USB support

Enable the QMP Combo PHY driver to allow super-speed USB
operation on QCM6490 platforms.

Signed-off-by: Balaji Selvanathan <balaji.selvanathan@oss.qualcomm.com>
Reviewed-by: Varadarajan Narayanan <varadarajan.narayanan@oss.qualcomm.com>
Link: https://patch.msgid.link/20251203110735.1959862-6-balaji.selvanathan@oss.qualcomm.com
Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
5 weeks agoarch: arm: mach-snapdragon: Auto-detect USB SSPHY driver support
Balaji Selvanathan [Wed, 3 Dec 2025 11:07:33 +0000 (16:37 +0530)] 
arch: arm: mach-snapdragon: Auto-detect USB SSPHY driver support

Automatically detect super-speed USB PHY driver availability and
skip the USB speed fixup if driver is available, eliminating the need
for manual configuration.

Previously, U-Boot unconditionally limited USB to high-speed mode
on all Qualcomm platforms because most lacked super-speed PHY
drivers.

This change implements runtime detection that checks if a PHY
driver exists for the super-speed PHY node referenced by the DWC3
controller. The fixup is automatically skipped when a compatible
driver is found, allowing the hardware to operate at full
capability. Platforms without super-speed PHY drivers continue to
receive the fixup automatically.

Signed-off-by: Balaji Selvanathan <balaji.selvanathan@oss.qualcomm.com>
[casey: rebased on flat-dwc3 dt support + fix Balaji's signoff]
[casey: make erroneous printf() a debug() again]
Link: https://patch.msgid.link/20251203110735.1959862-5-balaji.selvanathan@oss.qualcomm.com
Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
5 weeks agodrivers: phy: qcom: Add QMP USB3-DP Combo PHY driver
Balaji Selvanathan [Wed, 3 Dec 2025 11:07:32 +0000 (16:37 +0530)] 
drivers: phy: qcom: Add QMP USB3-DP Combo PHY driver

Add support for the Qualcomm QMP USB3-DP Combo PHY found on
SC7280 and QCM6490 platforms. This driver currently implements
USB3 super-speed functionality of the combo PHY.

The QMP Combo PHY is a dual-mode PHY
that can operate in either USB3 mode or DisplayPort mode. This
initial implementation focuses on USB3 mode to enable Super-Speed
USB support.

Taken from Linux commit 3d25d46a255a ("pmdomain: qcom: rpmhpd: Add rpmhpd support for SM8750")

This patch is dependent on this patch: https://lore.kernel.org/u-boot/20251112164204.1557934-1-aswin.murugan@oss.qualcomm.com/

Enabled and tested the driver on Qualcomm RB3 Gen2 (QCS6490) board.

Signed-off-by: Balaji Selvanathan <balaji.selvanathan@oss.qualcomm.com>
Reviewed-by: Varadarajan Narayanan <varadarajan.narayanan@oss.qualcomm.com>
Link: https://patch.msgid.link/20251203110735.1959862-4-balaji.selvanathan@oss.qualcomm.com
[casey: fix unused variable warning]
Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
5 weeks agodrivers: usb: dwc3: Add delay after core soft reset
Balaji Selvanathan [Wed, 3 Dec 2025 11:07:31 +0000 (16:37 +0530)] 
drivers: usb: dwc3: Add delay after core soft reset

Add a 100 ms delay after clearing the core soft reset bit to ensure
the DWC3 controller has sufficient time to complete its reset
sequence before subsequent register accesses.

Without this delay, USB initialization can fail on some Qualcomm
platforms, particularly when using super-speed capable PHYs like
the QMP USB3-DP Combo PHY on SC7280/QCM6490.

Taken from Linux commit f88359e1588b ("usb: dwc3: core: Do core softreset when switch mode")

Signed-off-by: Balaji Selvanathan <balaji.selvanathan@oss.qualcomm.com>
Reviewed-by: Varadarajan Narayanan <varadarajan.narayanan@oss.qualcomm.com>
Link: https://patch.msgid.link/20251203110735.1959862-3-balaji.selvanathan@oss.qualcomm.com
Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
5 weeks agodrivers: clk: qcom: sc7280: Add USB3 PHY pipe clock
Balaji Selvanathan [Wed, 3 Dec 2025 11:07:30 +0000 (16:37 +0530)] 
drivers: clk: qcom: sc7280: Add USB3 PHY pipe clock

Add support for GCC_USB3_PRIM_PHY_PIPE_CLK which is required by
the USB3 PHY on SC7280/QCM6490 platforms.

Signed-off-by: Balaji Selvanathan <balaji.selvanathan@oss.qualcomm.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Casey Connolly <casey.connolly@linaro.org>
Link: https://patch.msgid.link/20251203110735.1959862-2-balaji.selvanathan@oss.qualcomm.com
Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
5 weeks agomach-snapdragon: allocate memory for DT overlays
Antony Kurniawan Soemardi [Tue, 17 Feb 2026 08:51:34 +0000 (08:51 +0000)] 
mach-snapdragon: allocate memory for DT overlays

Allocate a 1 MiB LMB region for fdtoverlay_addr_r when
CONFIG_OF_LIBFDT_OVERLAY is enabled, allowing runtime application of
DT overlays on Snapdragon platforms.

This is useful for Android-based boot flows where the final DT passed
to the kernel must contain modified /firmware/android/fstab entries.
One use case is redirecting system and vendor partitions to microSD
storage instead of internal eMMC without rebuilding the base DTB.

The allocation is conditional on CONFIG_OF_LIBFDT_OVERLAY and has no
effect on boards that do not enable overlay support.

Signed-off-by: Antony Kurniawan Soemardi <linux@smankusors.com>
Reviewed-by: Sumit Garg <sumit.garg@oss.qualcomm.com>
Reviewed-by: Casey Connolly <casey.connolly@linaro.org>
Link: https://patch.msgid.link/20260217-qcom-fdt-overlay-v1-1-d0fa0e70d738@smankusors.com
Signed-off-by: Casey Connolly <casey.connolly@linaro.org>