Compare commits

...

280 Commits

Author SHA1 Message Date
Tom Rini
127a42c725 Prepare v2026.01
Signed-off-by: Tom Rini <trini@konsulko.com>
2026-01-05 14:49:22 -06:00
Tom Rini
228810d0ba Merge tag 'scmi-master-2026-1-5' of https://source.denx.de/u-boot/custodians/u-boot-fsl-qoriq
CI: https://source.denx.de/u-boot/custodians/u-boot-fsl-qoriq/-/pipelines/28902

- Fix non-CCF priv initialization in scmi_clk_gate()
- Fix typo in scmi_clk_get_attibute()
- Remove duplicated scmi_generic_protocol_version() request
2026-01-05 08:39:49 -06:00
Patrice Chotard
4c3aa5356d clk: scmi: Remove duplicated scmi_generic_protocol_version() request
scmi_generic_protocol_version() request is done twice in scmi_clk_probe().
Remove first call which is useless.

Fixes: ae7e0330ce ("clk: scmi: add compatibility with clock protocol 2.0")
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2026-01-05 10:04:48 +08:00
Patrice Chotard
0e9055b148 clk: scmi: Fix priv initialization in scmi_clk_gate()
In scmi_clk_probe(), in case of CLK_CCF is not enabled, parent private
data is not set, so in scmi_clk_gate(), an uninitialized priv struct is
retrieved.

SCMI request is performed either using scmi_clk_state_in_v1 or
scmi_clk_state_in_v2 struct depending of the unpredictable value of
priv->version which leads to error during SCMI clock enable.

Issue detected on STM32MP157C-DK2 board using the SCMI device tree
stm32mp157c-dk2-scmi.dts.

Fixes: 0619cb3203 ("firmware: scmi: Add clock v3.2 CONFIG_SET support")
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2026-01-05 10:04:48 +08:00
Patrice Chotard
9a23c1e5f2 clk: scmi: Fix typo scmi_clk_get_attibute
Fix typo attibute, rename scmi_clk_get_attibute() to
scmi_clk_get_attribute().

Reviewed-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2026-01-05 10:04:48 +08:00
Jerome Forissier
eb18217b63 MAINTAINERS: update my email address
My linaro.org email isn't valid anymore. Use my personal email instead.

Signed-off-by: Jerome Forissier <jerome@forissier.org>
2026-01-02 09:03:42 -06:00
Tom Rini
556631ffde Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sh
- Fix R-Car D3 ability to boot Linux kernel.
2025-12-29 16:38:22 -06:00
Niklas Söderlund
06df1a5072 clk: renesas: Do not disable realtime modules on R8A77995 D3
Later versions of the datasheet makes it clear D3 do not have any
realtime module stop control registers (RMSTPCRx). Remove the
manipulation of them from the module clock table to match this.

Suggested-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
2025-12-29 20:47:53 +01:00
Niklas Söderlund
3147cd713e clk: renesas: Do not enable MSTP4 extra modules on R8A77995 D3
Since commit a2bd99549c ("clk: renesas: Tear clock controller down
last before booting OS") enabling the module gated by bit 8 in MSTP4
prevents Linux from booting. The bits 8 and 7 of MSTP4 where only
documented in early versions of the datasheet and have since been
removed.

To allow Linux to boot update the MSTP4 enable value to reflect the
hardware default, 0x80.

Suggested-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
2025-12-29 20:47:53 +01:00
Tom Rini
56cac250b0 Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sh
- net: ravb: Configure CXR31 and CXR35 on rzg2l
2025-12-23 11:17:37 -06:00
Mathieu Othacehe
0c230a3a8e net: ravb: Configure CXR31 and CXR35 on rzg2l
As in Linux with d78c0ced60 ("net: ravb: Make write access to CXR35 first
before accessing other EMAC register"), configure CXR31 and CXR35 correctly
on rzg2. MII mode does not work correctly unless those registers are
properly configured.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2025-12-23 15:35:34 +01:00
Tom Rini
0f6ff53d55 Prepare v2026.01-rc5
Signed-off-by: Tom Rini <trini@konsulko.com>
2025-12-22 16:26:11 -06:00
Balaji Selvanathan
c0add00398 drivers: scsi: fix double decrement of block count in 64-bit LBA path
The scsi_read function incorrectly decrements the block count twice
when handling large disks that trigger the CONFIG_SYS_64BIT_LBA code
path (reads beyond block 268,435,455). The variable 'blks' was being
decremented both inside the 64-bit LBA block and after the successful
scsi_exec() call, causing incorrect block count tracking and data
abort errors on large capacity disks.

Signed-off-by: Balaji Selvanathan <balaji.selvanathan@oss.qualcomm.com>
Tested-by: Tony Dinh <mibodhi@gmail.com>
2025-12-22 16:19:39 -06:00
Brian Sune
f26db83ca9 fix PL330 CMD supported target
The config is wrongly written, result
in only support socdk board.

Fixes: 92dcb3ad5d ("cmd/dma: implement dmareset command")
Signed-off-by: Brian Sune <briansune@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2025-12-22 10:03:59 -06:00
Tom Rini
d24f4ae654 test/py, buildman: Update filelock package version
The GitHub dependabot tool has reported a "medium" priority bug
CVE-2025-68146, with this package. Update to the patched version.

Reported-by: GitHub dependabot
Signed-off-by: Tom Rini <trini@konsulko.com>
2025-12-18 10:28:10 -06:00
Quentin Schulz
24ab2b9684 doc: pytest: fix typo in multiple config options example for buildconfigspec
The option should be 'net_lwip' and not 'net lwip' (see all usage of it
in the test code base).

Fixes: 2bac578c5a ("test: allow multiple config options in buildconfigspec")
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
2025-12-18 10:26:35 -06:00
Marek Vasut
2333d446b7 cmd: nvedit: Validate argument count before use
Avoid NULL pointer dereference in case 'env select' is invoked
without parameters, check the arg count and make sure it is at
least 2, otherwise print usage.

The crash is easy to trigger e.g. in sandbox:
$ ./u-boot -Tc "env select"

Fixes: a97d22ebba ("cmd: env: add env select command")
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Tested-by: Vincent Stehlé <vincent.stehle@arm.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2025-12-18 10:26:22 -06:00
Anshul Dalal
d865f2f016 doc: board: ti: fix alt name for tispl.bin in DFU mode
The alt name for tispl binary is "tispl.bin" and not "tispl", this patch
fixes the documentation to the correct alt name.

Fixes: def64b4937 ("doc: board: Add document for DFU boot on am62x SoCs")
Fixes: 3633fdbb6b ("ti: add support for AM6254atl SiP")

Signed-off-by: Anshul Dalal <anshuld@ti.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
2025-12-18 10:25:44 -06:00
Tom Rini
8d210fa37f Merge tag 'net-20251218' of https://source.denx.de/u-boot/custodians/u-boot-net
Pull request net-20251218.

net-lwip:
- Avoid NULL dereference in _set_cacert()
- Fix filename handling in TFTP
2025-12-18 10:24:39 -06:00
Heinrich Schuchardt
a8a81af848 cmd: lwip/wget: avoid NULL dereference in _set_cacert()
Running `wget cacert builtin` leads to a crash in _set_cacert():

    Unhandled exception: Load access fault

Function _set_cacert() dereferences variable wget_info.
We must initialize it before executing the cacert sub-command.

Fixes: d3761a31ef ("lwip: split net/lwip/wget.c")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2025-12-18 16:27:15 +01:00
Andrew Goodbody
8910efa71b net: lwip: tftp: Fix filename handling
The code to choose the filename to use does not cope with no name set at
all. Firstly the test for a name in net_boot_file_name tests the pointer
rather than the string it points to. Secondly the cleanup on exit in
this case attempts to free a global variable. Fix both issues.

Signed-off-by: Andrew Goodbody <andrew.goodbody@linaro.org>
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
2025-12-18 16:27:15 +01:00
Jonathan GUILLOT
47b50fb112 cmd: part: Fix part argument description for part number
Signed-off-by: Jonathan GUILLOT <jonathan@joggee.fr>
Fixes: ff6ef4b909 ("doc: man-page for the part command")
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
2025-12-16 11:14:53 -06:00
David Lechner
9d08916a57 clk: mediatek: remove duplicate '@parent' field doc
Remove duplicate '@parent' field documentation in struct mtk_composite.
There is no need to say the same thing twice.

Also fix spelling mistake in the word "parent" while we're at it.

Signed-off-by: David Lechner <dlechner@baylibre.com>
2025-12-16 11:14:31 -06:00
Max Merchel
798bef8e83 tools/libfdt/fdt_rw: fix SPDX-License-Identifier
Currently, the terms of both licenses (GPL 2.0 and BSD-2-Clause) must be
met.
However, before switching to the SPDX license identifier, the license
information in the file begins with:

"libfdt is dual licensed: you can use it either under the terms of
the GPL, or the BSD license, at your option."

Therefore, the missing "OR" between the licenses is added.

Fixes: 3508476 ("libfdt: SPDX-License-Identifier: GPL-2.0+ BSD-2-Clause")

Signed-off-by: Max Merchel <Max.Merchel@ew.tq-group.com>
2025-12-16 11:02:27 -06:00
Tom Rini
41eddd8923 Merge tag 'u-boot-rockchip-20251214' of https://source.denx.de/u-boot/custodians/u-boot-rockchip
CI: https://source.denx.de/u-boot/custodians/u-boot-rockchip/-/pipelines/28748

Please pull the updates for rockchip platform:
- New Board support: rk3588 Radxa ROCK 5T, ROCK 5B+;
- I2C Fixes;
- RAM boot from maskrom;
2025-12-15 11:20:43 -06:00
Quentin Schulz
0ed7abc85d rockchip: mkimage: enhance comments for v1 header
Improve the image header documentation for v1 header:

- specify this applies to all MMC, not only SD cards,
- specify the offset for SPI flashes,
- specify the key used for RC4 encoding,
- specify what "init" refers to, especially since some configs enable
  TPL,
- specify what "init_boot_size" refers to, especially since some configs
  enable TPL,
- specify the size of a block,
- add documentation for init_size and init_boot_size,

Note that the offset on the storage medium isn't necessarily 32KiB (64
blocks) for MMC or 0 for SPI flashes, it's just the first offset the
BootROM checks. Barebox[1] lists a few options, though those are
applicable to RK35xx which use the v2 header, so not guaranteed they can
be shared. On RK3399, the binary can at least be stored at offset 0 and
32KiB on SPI flashes.

[1] https://git.pengutronix.de/cgit/barebox/tree/arch/arm/mach-rockchip/bbu.c#n19

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-12-14 00:02:10 +08:00
Quentin Schulz
0e5e980819 rockchip: i2c: fix illegal I2C START/STOP condition
In the last message sent in rockchip_i2c_xfer, the controller is
disabled (see rk_i2c_disable() in rk_i2c_read()/rk_i2c_write()), then
the STOP condition is sent (see rk_i2c_send_stop_bit() in
rockchip_i2c_xfer()) and the controller is disabled once again (see
rk_i2c_disable() right after).

The issue is that re-enabling the controller just to send the STOP
condition doesn't work. When, the controller is disabled, the SCL and
SDA lanes are not driven anymore and thus enter the idle mode where they
are kept high by the external HW pull-up. To send a STOP condition, one
needs to drive the SDA line so that a rising edge happens while SCL is
high. Experimentally (on PX30 and RK3399), when enabling the controller
to send a STOP condition after it's been disabled, the controller only
drives the SDA line to trigger the rising edge for the STOP condition,
leaving SCL undriven (and thus, high). This means, that because SDA is
high before this happens and that we need a rising edge, the controller
drives the SDA line low and then releases it, meaning we trigger a START
condition followed by a STOP condition:

SCL
        _________
_____...
        __  _____
_____...  \/
SDA
	    ^ STOP
	  ^ START

This is illegal in I2C protocol[1]:

 5. A START condition immediately followed by a STOP condition (void
    message) is an illegal format. Many devices however are designed to
    operate properly under this condition.

My guess is that the I2C controller IP knows that it makes only sense to
send a STOP condition after a START condition, meaning the controller is
already driving the SCL line low and neither the device nor controller
drive the SDA line after the last ACK/NACK as there's no need to, then
it needs to drive SDA, release SCL to make it high and then release the
SDA line. However, after it's been disabled, the SCL is already released
so the controller only essentially drives SDA and then releases it.

It happens that this seems to be breaking the SE050 Secure Element after
a few transfers in the middle of a transfer where it starts clock
stretching the bus forever. It may be related to Errata 3.2[2] but the
description of the setup isn't an exact match to the current situation.

It seems to be required to disable the I2C controller between messages
as the Linux kernel states that "The HW is actually not capable of
REPEATED START. But we can get the intended effect by resetting its
internal state and issuing an ordinary START.". Between messages, this
logic seems fine as I get an Sr (repeated START condition) before
starting the next message in the transfer without a STOP condition.
However, we should NOT disable the controller after the last message in
the transfer otherwise we do this illegal START condition followed by
the STOP condition, hence the added check.

[1] https://www.nxp.com/docs/en/user-guide/UM10204.pdf 3.1.10 The target address and R/W bit point 5
[2] https://www.nxp.com/docs/en/errata/SE050_Erratasheet.pdf

Fixes: c9fca5ec88 ("rockchip: i2c: don't sent stop bit after each message")
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Heiko Schocher <hs@nabladev.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-12-14 00:02:10 +08:00
Quentin Schulz
1cf8d0b68d rockchip: i2c: move ACK comment where it applies
The I2C_CON_LASTACK is kind of a misnomer as setting it means sending a
NACK as last byte acknowledge when the controller is in receive mode. It
should therefore be used only when there's no more data to transfer
after this.

Move the comment in the proper if block.

Sync the comment with the Linux kernel's while at it so it's more
explicit.

Fixes: 5deaa53028 ("rockchip: i2c: fix >32 byte reads")
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Heiko Schocher <hs@nabladev.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-12-14 00:02:10 +08:00
Quentin Schulz
c9d2713315 rockchip: i2c: fix incorrect STOP flag for the interrupt enable register
I2C_CON_STOP is a flag to be used for the con register, where it is bit
4 to send the STOP condition.

To enable the interrupt the controller sends to tell it's finished
sending the STOP condition, it's the ien register at bit 5.

Let's use the proper offset.

My hunch is that enabling the interrupt is useless as the interrupt
status register is always up-to-date and enabling the interrupt is just
so that the interrupt is available via the GIC. However, U-Boot has no
interrupt support and the logic was working well before this patch. This
is just so people aren't side-tracked when debugging I2C issues on
Rockchip by checking all writes are proper.

Fixes: 3437469985 ("rockchip: Add I2C driver")
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Heiko Schocher <hs@nabladev.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-12-14 00:02:10 +08:00
FUKAUMI Naoki
73159af02d rockchip: rock5b-rk3588: Add support for Radxa ROCK 5T
Include the FDT for Radxa ROCK 5T in the FIT, in addition to those for
5B and 5B+, and add board selection code to load the 5T FDT when the
DRAM type is LPDDR5 and ADC channel 5 value is close to 1016.

Signed-off-by: FUKAUMI Naoki <naoki@radxa.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-12-14 00:02:10 +08:00
Jonas Karlman
2df3666a24 rockchip: rock5b-rk3588: Add support for ROCK 5B+
Include FDTs for both ROCK 5B and 5B+ in the FIT and add board selection
code to load the 5B+ FDT when the DRAM type is LPDDR5 and ADC channel 5
value is close to 4095.

  U-Boot 2025.07 (Jul 14 2025 - 21:28:20 +0000)

  Model: Radxa ROCK 5B+
  SoC:   RK3588
  DRAM:  8 GiB

Features tested on a ROCK 5B+ v1.2:
- SD-card boot
- eMMC boot
- SPI flash boot
- PCIe/NVMe
- Ethernet
- USB/TCPM

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-12-14 00:02:10 +08:00
Jonas Karlman
57dc75fb9b rockchip: sdram: Add rockchip_sdram_type() helper
Add a helper function based on rockchip_sdram_size() that return what
DRAM type is used on current running board.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-12-14 00:02:10 +08:00
Jonas Karlman
e22335a221 rockchip: Add support for RAM boot from maskrom mode
The BootROM in Rockchip SoCs will enter maskrom mode when boot firmware
cannot be found in nand/spi/mmc storage.

In maskrom mode the USB OTG port can accept one of two custom commands.

Initially a 0x471 command to load TPL into SRAM. After TPL has been
executed and it has returned back-to-BROM, a 0x472 command to load SPL
into start of DRAM.

Add two binman images that can be used to RAM boot from maskrom mode:
- u-boot-rockchip-usb471.bin that contains TPL to init DRAM.
- u-boot-rockchip-usb472.bin that contains SPL and the normal FIT
  payload with i.e. U-Boot proper, TF-A and FDT.

A config fragment rockchip-ramboot.config can be used to enable building
of these two binman images, e.g.:

  make generic-rk3588_defconfig rockchip-ramboot.config

These binman images can be used with the proprietary rkbin boot_merger
tool to create a special loader image that can be used with tools such
as rkdeveloptool or rockusb tools to RAM boot from maskrom, e.g.:

  Create loader image:
    $ ../rkbin/tools/boot_merger ./RK3588MINIALL.ini

  Boot from maskrom:
    $ rkdeveloptool db u-boot-rockchip-rk3588-loader.bin
   or
    $ rockusb download-boot u-boot-rockchip-rk3588-loader.bin

Another option that does not require use of proprietary tools is using
open source tools such as rkflashtool or rkusbboot that can load the
binman images directly without any need to first create a special loader
image to RAM boot from maskrom, e.g.:

  $ rkflashtool l < u-boot-rockchip-usb471.bin
  $ rkflashtool L < u-boot-rockchip-usb472.bin
 or
  $ rkusbboot u-boot-rockchip-usb471.bin u-boot-rockchip-usb472.bin

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Tested-by: Arnaud Patard <arnaud.patard@collabora.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-12-14 00:02:10 +08:00
Jonas Karlman
b57363a2b9 rockchip: Move TEXT_BASE to 8 MiB offset from start of DRAM
Drop SoC specific TEXT_BASE and use a common TEXT_BASE for all SoCs.

Move the common TEXT_BASE to 8 MiB offset from start of DRAM to help
support RAM boot from maskrom introduced in next patch.

RAM boot from maskrom mode will expect the FIT payload to be located at
2 MiB offset from start or DRAM.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Tested-by: Arnaud Patard <arnaud.patard@collabora.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-12-14 00:02:10 +08:00
Quentin Schulz
b3a141846b board: theobroma-systems: jaguar_rk3588: explicit UART IOMUX
When one attempts to build Tiger and Jaguar from the same directory,
because Tiger will set the IOMUX to 2 but Jaguar doesn't reset it,
Jaguar will have IOMUX set to 2 if built after Tiger.

This isn't an issue if in separate directories or building Tiger after
Jaguar because the default if missing from the configuration file is 0.

Let's make it explicit that the iomux is 0 for Jaguar.

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-12-14 00:02:10 +08:00
Quentin Schulz
1bea4284b0 board: theobroma-systems: add instructions for how to use upstream TF-A
Upstream TF-A has support for RK3588 since v2.12 so let's document how
to use upstream TF-A instead of the prebuilt binary blob from Rockchip
if one wants to do that.

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-12-14 00:02:10 +08:00
Quentin Schulz
a4dcf3183f board: theobroma-systems: update instructions for newer Rockchip rkbin
The instructions are regularly out of date because the generated or
prebuilt binaries are updated and the filename doesn't match our
instructions anymore.

Additionally, since commit 55a95caaef15 ("tools: ddrbin_tool: add
ddrbin_tool.py and update to v1.21 20241211") end of October 2024,
ddrbin_tool doesn't exist anymore and has been replaced by
ddrbin_tool.py python script (which currently isn't an executable) so
let's update these instructions as well.

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-12-14 00:02:10 +08:00
Tom Rini
87d85139a9 fs: fat: Perform sanity checks on getsize in get_fatent()
We do not perform a check on the value of getsize in get_fatent to
ensure that it will fit within the allocated buffer. For safety sake,
add a check now and if the value exceeds FATBUFBLOCKS use that value
instead. While not currently actively exploitable, it was in the past so
adding this check is worthwhile.

This addresses CVE-2025-24857 and was originally reported by Harvey
Phillips of Amazon Element55.

Signed-off-by: Tom Rini <trini@konsulko.com>
2025-12-12 08:52:57 -06:00
Tom Rini
1b3050dfc4 Merge tag 'efi-2026-01-rc5' of https://source.denx.de/u-boot/custodians/u-boot-efi
Pull request efi-2026-01-rc5

CI: https://source.denx.de/u-boot/custodians/u-boot-efi/-/pipelines/28738

Documentation:

* Fix typos in the TI K3 board documentation.
* Describe the TI J742S2.

UEFI:

* Add EFI_PARTITION_INFO_PROTOCOL_GUID translation in the UUID library.
2025-12-12 08:48:50 -06:00
Andrew Davis
ec1c966285 doc: board: ti: k3: Fix a couple small typos
s/Uenv.txt/uEnv.txt
s/then/than

Signed-off-by: Andrew Davis <afd@ti.com>
Reviewed-by: Bryan Brattlof <bb@ti.com>
2025-12-12 12:52:31 +01:00
Udit Kumar
1205204a43 doc: board: ti: Add J742S2 support
J742S2 SOC is derivative of J784S4, most of build infra of j784s4 is used
to build u-boot for J742S2 EVM board.

Add guide users on how to build for that board.

Signed-off-by: Udit Kumar <u-kumar1@ti.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
2025-12-12 12:51:53 +01:00
Heinrich Schuchardt
f9f4f8df57 lib: uuid: add EFI_PARTITION_INFO_PROTOCOL_GUID translation
Add support for translating the EFI_PARTITION_INFO_PROTOCOL_GUID
to a text.

Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2025-12-12 12:51:17 +01:00
Heinrich Schuchardt
ff80e95fed tools: use setuptools 78.1.1
CVE-2025-47273 describes a path traversal vulnerability.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2025-12-10 09:28:43 -06:00
Adriana Nicolae
93d000bc52 test: dm: fdtdec: Validate FDT size in unit test
The current FDT decoding tests calculate the memory required
for FDT manipulation by directly adding a fixed margin to
fdt_totalsize(gd->fdt_blob). The static analyzer flagged
"gd->fdt_blob->totalsize" as a tainted value being passed
to fdt_open_into().

Ensure the size is validated by checking that the total size
is within a reasonable maximum FDT limit for unit tests.

Signed-off-by: Adriana Nicolae <adriana@arista.com>
2025-12-10 09:28:40 -06:00
Beleswar Padhi
da54deb1ac configs: am43xx: Migrate to CONFIG_SYS_MEM_TOP_HIDE from CFG_PRAM
The TI AM43xx HS boards have been using CFG_PRAM to hide the top 64MB
firewalled DRAM memory from U-Boot. However, CFG_PRAM only prevents
U-Boot from relocating into that memory, but it is still open for access
for any other usage.

Therefore, migrate into using CONFIG_SYS_MEM_TOP_HIDE which reduces the
ram size itself ensuring that memory is not visible to U-Boot at all
(either for reloc, or general usage).

Signed-off-by: Beleswar Padhi <b-padhi@ti.com>
2025-12-10 09:28:37 -06:00
Heinrich Schuchardt
7da7ca7cf5 Makefile: use --output-target instead of --target
The objcopy man-page teaches:

    --target=bfdname
      Use bfdname as the object format for
      both the input and the output file

This implies for --target=efi-app-x86_64 that the input file would have
to be an EFI app.

Objcopy in binutils 2.45 checks this more strictly than previous versions
and refuses to accept an ELF file as input with --target=efi-app-x86_64.

Replace --target by --output-target for building sandbox and x86 EFI
binaries.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2025-12-10 09:06:13 -06:00
Tom Rini
fbfaf5f63e Merge tag 'u-boot-stm32-20251209' of https://source.denx.de/u-boot/custodians/u-boot-stm
CI: https://source.denx.de/u-boot/custodians/u-boot-stm/-/pipelines/28704

_ Add 1 GiB DRAM support for STM32MP13x DHCOR SoM
_ Fix 512 MiB DRAM support for STM32MP13x DHCOR SoM
_ Fix handling OPTEE in middle of the DRAM
_ Add missing debug UART build for STM32MP1 DHSOM
2025-12-10 09:05:27 -06:00
Marek Vasut
78e94666dd ARM: stm32: Add missing build of debug UART init code on DH STM32MP1 DHSOM
Commit c37a668481 ("stm32mp: fix compilation issue with DEBUG_UART")
split the debug UART initialization code into two files, but failed to
update other non-ST boards. This did not lead to noticeable breakage
until debug UART is enabled, which is not the default. Update the
Makefile accordingly to allow debug UART to work.

Fixes: c37a668481 ("stm32mp: fix compilation issue with DEBUG_UART")
Signed-off-by: Marek Vasut <marek.vasut@mailbox.org>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2025-12-09 15:24:36 +01:00
Marek Vasut
86ff2cfa80 ARM: dts: stm32: Add 1 GiB DRAM settings for DH STM32MP13xx DHCOR SoM
Add DRAM settings for 1 GiB variant of DH STM32MP13xx DHCOR SoM
and support for SoM DRAM coding HW straps decoding and automatic
DRAM configuration selection. Enable CONFIG_BOARD_EARLY_INIT_F on
all STM32MP1 DHSOM, as it is required for the HW straps decoding.

Signed-off-by: Marek Vasut <marek.vasut@mailbox.org>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2025-12-09 15:24:30 +01:00
Marek Vasut
fd26267b4c ARM: dts: stm32: Fix 512 MiB DRAM settings for DH STM32MP13xx DHCOR SoM
Update DRAM chip type and density comment for 512 MiB DRAM settings for
DH STM32MP13xx DHCOR DHSBC to match the chip on the SoM. No functional
change.

Signed-off-by: Marek Vasut <marek.vasut@mailbox.org>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2025-12-09 15:24:11 +01:00
Marek Vasut
f0baa0a668 stm32mp: Fix handling of OPTEE in the middle of DRAM
STM32MP13xx may have OPTEE-OS at 0xdd000000 even on systems with 1 GiB
of DRAM at 0xc0000000, which is not the end of DRAM anymore. This puts
the OPTEE-OS in the middle of DRAM. Currently, the code sets RAM top to
0xdd000000 and prevents the DRAM range past OPTEE at 0xe0000000..0xffffffff
from being set as cacheable and from being usable. The code also sets the
area over OPTEE as invalid region in MMU tables, which is not correct.

Adjust the code such, that it only ever sets RAM top just before OPTEE
in case the OPTEE is really at the end of DRAM, mainly to be backward
compatible. Furthermore, adjust the MMU table configuration such, that
the regions over the OPTEE are simply skipped and not reconfigured, and
the regions between end of OPTEE and RAM top are set as cacheable, if
any actually exist.

Signed-off-by: Marek Vasut <marek.vasut@mailbox.org>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Tested-by: Patrice Chotard <patrice.chotard@foss.st.com>
2025-12-09 15:24:04 +01:00
Tom Rini
0e0a198a68 Prepare v2026.01-rc4
Signed-off-by: Tom Rini <trini@konsulko.com>
2025-12-08 12:54:47 -06:00
Yao Zi
543900ab53 MAINTAINERS: update my email address
My old mail address, ziyao@disroot.org, has stopped working. Switch to
my new address, me@ziyao.cc, and map it in .mailmap.

Signed-off-by: Yao Zi <me@ziyao.cc>
2025-12-08 12:53:25 -06:00
Pranav Tilak
f2c148e0df arm64: versal: Fix LTO for mini_ospi/mini_qspi
With LTO enabled, mini U-Boot was hanging during reloc_fdt().
The initial stack pointer was placed too low, and the FDT memcpy
destination was carved only 4KB above it. This left insufficient
margin, causing the FDT copy to overwrite the live early stack
and corrupt execution before relocation.

To fix this, increase the malloc heap from 8KB to 12KB and raise the
initial stack pointer by 4KB. Together these adjustments increase
the separation between the early stack and the FDT region during
the pre-relocation phase, eliminating the overlap and fixing the
hang on mini builds (QSPI/OSPI).

Signed-off-by: Pranav Tilak <pranav.vinaytilak@amd.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
2025-12-08 09:05:15 -06:00
Tom Rini
ae184121e0 omap3_evm: Take over maintainership
After talking with Derald, take over the maintainership role for this
platform.

Signed-off-by: Tom Rini <trini@konsulko.com>
2025-12-08 08:48:10 -06:00
Tom Rini
976c1cb85f doc: Update urllib3 version for building
The GitHub dependabot tool has reported two "high" priority bugs,
CVE-2025-66418 and CVE-2025-66471, with this package. Update to the
patched version.

Reported-by: GitHub dependabot
Acked-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
2025-12-08 08:44:36 -06:00
Tom Rini
f21a301147 configs: Resync with savedefconfig
Resync all defconfig files using qconfig.py

Signed-off-by: Tom Rini <trini@konsulko.com>
2025-12-08 08:37:35 -06:00
Dominik Haller
d3291d35b6 configs: phycore_am64x_a53_defconfig: Drop eMMC HS400 mode
Remove the unsupported MMC_HS400 mode and select MMC_HS200 instead to avoid
confusion.

Signed-off-by: Dominik Haller <d.haller@phytec.de>
2025-12-06 11:40:49 -06:00
Chintan Vankar
c7c2c3c010 arm: mach-k3: j722s: Fix eMMC boot functionality broken by Ethernet boot
While adding CPSW device support to enable Ethernet boot for J722S,
dev-data and clk-data for eMMC was removed by mistake, which leads to eMMC
boot failure. Update the dev-data and clk-data to fix that.

Fixes: a02009f3a8 ("arm: mach-k3: j722s: Update SoC autogenerated data to enable Ethernet boot")
Reported-by: Michael Walle <mwalle@kernel.org>
Signed-off-by: Chintan Vankar <c-vankar@ti.com>
Tested-by: Michael Walle <mwalle@kernel.org>
Reviewed-by: Udit Kumar <u-kumar1@ti.com>
2025-12-06 08:35:29 -06:00
Brian Sune
bb1c2b4632 update GCC version check after Kbuild bump
ARM GCC tool check is not up to date,
while issues are reported such as file truncated linker errors.
Using ARM official cross tools shows that 10.0.1 is a safe
version to support latest kbuild bump properly.

Signed-off-by: Brian Sune <briansune@gmail.com>
2025-12-06 08:18:16 -06:00
Linus Walleij
b5d592eff1 MAINTAINERS: update my email address
I am moving over to using my email address at kernel.org.
Change this in all the affected MAINTAINERS files.

Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Signed-off-by: Linus Walleij <linusw@kernel.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
2025-12-06 08:14:59 -06:00
Tom Rini
a1feb08d02 Merge tag 'efi-2026-01-rc4' of https://source.denx.de/u-boot/custodians/u-boot-efi
Pull request efi-2026-01-rc4

CI: https://source.denx.de/u-boot/custodians/u-boot-efi/-/pipelines/28652

Documentation:

* Correct and add missing pytest hook script environment variable names
* board: verdin-am62p: Fix boot log output
* Add a page for downloading the U-Boot logo with and without text

UEFI:

* Fix a memory leak when retrieving device paths from boot vars
2025-12-06 08:13:37 -06:00
Francesco Dolcini
e5996e3ed3 doc: board: verdin-am62p: Fix boot log output
Fix boot log output not being rendered correctly, fix
it doing the same as done in verdin-am62.rst.

Fixes: b8c43968b8 ("board: toradex: add verdin am62p support")
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
2025-12-06 12:04:57 +01:00
Ilias Apalodimas
ad53505a48 efi_loader: Fix a memory leak when retrieving device paths from boot vars
get_dp_device() is used to derive the device path from a boot variable.
However, if the last efi_get_variable_int() call fails, we return an
error without freeing 'buf'.

There's no need to call efi_get_variable_int() for variables we don't
know the size since we have the efi_get_var() wrapper.

Replace that in the two instances we use it. The first one will also
fix the memory leak.
A nice sideeffect is that the code size is also reduced, since we are
re-using functions instead of open coding them

$~ bloat-o-meter u-boot u-boot.new
add/remove: 0/0 grow/shrink: 1/2 up/down: 6/-196 (-190)
Function                                     old     new   delta
version_string                                70      76      +6
efi_launch_capsules                         2288    2196     -92
get_dp_device                                244     140    -104
Total: Before=1222331, After=1222141, chg -0.02%

Fixes: c74cd8bd08 ("efi_loader: capsule: add capsule_on_disk support")
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2025-12-06 11:43:28 +01:00
David Lechner
18e2a059ff doc: pytest: add missing hook script env vars
Add the _EXTRA variants of U_BOOT_BUILD_DIR and U_BOOT_RESULT_DIR to the
list of environment variables set for hook scripts.

These were added in commit 8f2a9fa7d6 ("test: Support testing with two
board-builds") but were not documented.

Signed-off-by: David Lechner <dlechner@baylibre.com>
2025-12-06 11:42:43 +01:00
David Lechner
50cbdaba66 doc: pytest: fix hook script environment variable names
Fix the names of environment variables set for hook scripts. These
have a U_BOOT_ prefix, not UBOOT_.

Signed-off-by: David Lechner <dlechner@baylibre.com>
2025-12-06 11:42:43 +01:00
Heinrich Schuchardt
cb8156e9ef doc: add a page for downloading the U-Boot logo
Add a page showing the logo with and without text.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2025-12-06 11:32:02 +01:00
Heinrich Schuchardt
56778d4c27 tools/logos: Add U-Boot logo with text 'U-Boot'
The logo with the text 'U-Boot' has been used in multiple presentations.
Up to now it was only available from my upload to wikimedia.org.
Make it available in our repository.

Link: https://upload.wikimedia.org/wikipedia/commons/9/9e/U-Boot_Logo.svg
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2025-12-06 11:32:02 +01:00
Sean Anderson
c98b6a6dcd clk: Remove myself as a maintainer
Unfortunately I don't really have time to review clock patches. When I
initially started maintaining this subsystem I had more free time than I do
now. But I also found it hard to motivate myself to review patches.  Many
clock patches add support for new SoCs and they are time consuming to
review properly. You effectively have to spend a few hours reading the
reference manual (if it's public!) and reviewing drivers is no small feat
either. This is made more difficult since clocking is often very different
between SoCs and it can be difficult to determine whether something is a
bug in the driver or a workaround for some hardware behavior. I mostly
don't care about any given SoC unless I'm hacking on it so I ended up with
a ton (more than 7000) of unreviewed patches piling up in my inbox. I'd
love to be more active, but I have a day job and I usually want to work on
something more interesting when I get home. I still think the clock
subsystem is a major mess but I don't care enough to fix it :l

The subsystem itself should probably get orphaned since AFAICT all patches
go through the mach/arch maintainer or to Tom.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
2025-12-04 13:45:30 -06:00
Sean Anderson
a0bf98cedb test: strlcat: Fix SPDX license
When I modified this code I meant to accept the LGPL offer to convert the
license to GPL. However, while there is an LGPL 2.1, the next version of
the GPL after 2.0 is 3.0. Fix the license version

Fixess: c4ac52f55d ("test: Add test for strlcat")
Signed-off-by: Sean Anderson <seanga2@gmail.com>
2025-12-04 13:45:30 -06:00
Chukun Pan
02aa1a56a7 binman: fallback to importlib_resources on Python 3.8
Python 3.7 and 3.8 lack the files attribute in importlib.resources.
Use importlib_resources to fix build errors with Python 3.8:
binman: module 'importlib.resources' has no attribute 'files'

Fixes: 538719cb6a ("binman: migrate from pkg_resources to importlib")
Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
Acked-by: Quentin Schulz <quentin.schulz@cherry.de>
[trini: Re-add # pragma: no cover line]
Signed-off-by: Tom Rini <trini@konsulko.com>
2025-12-04 13:45:10 -06:00
Wolfgang Wallner
97e202a721 board: BuR: Update MAINTAINERS files
The MAINTAINERS files for B&R boards are not in sync
with the current file names. Update the files so
that they are correct again.

Signed-off-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
2025-12-04 13:35:45 -06:00
Wolfgang Wallner
d9a765222d Change email addresses for B&R Industrial Automation
B&R Industrial Automation has been acquired by ABB in 2017, and this
will be reflected in our email addresses beginning from December 2025.

The email addresses change as follows:
 @br-automation.com -> @<country-code>.abb.com

The existing email addresses will be valid until December 2026.

Add entries for Bernhard Messerklinger and myself to .mailmap, and
update the MAINTAINERS files.

Signed-off-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
Signed-off-by: Wolfgang Wallner <wolfgang.wallner@at.abb.com>
2025-12-04 13:35:29 -06:00
Tom Rini
69c8ea98a7 Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sh
This is R-Car X5H support. It was originally posted before rc1 and the
changes are well isolated. This is the final patchset which enables the
Gen5 drivers that are already in tree. I waited with this a bit until
the SCMI ID discussion stabilized and TFA X5H support landed. So now, I
can add the final piece into U-Boot too.

Note that this is still very much experimental, the X5H upstreaming is
in very early stages. The OF_UPSTREAM conversion will happen likely in
2026.04 or 2026.07 window, depending on when the Linux DTs land. The
compound-clock.c is surely going to go away once SCP gets updated and
the MFIS mailbox will be reworked once upstream bindings get developed.

This also includes SH DT alignment fix.
2025-12-03 08:30:18 -06:00
Hai Pham
186de8a8fa arm64: renesas: Extend stub PSCI implementation to R-Car Gen5
Extend the stub PSCI implementation with support for R-Car Gen5.
R-Car Gen5 uses different register to perform reset, therefore
add a compile-time conditional. This is __secure code, therefore
the runtime SoC detection parts are not available to it, hence
the compile time conditional.

Signed-off-by: Hai Pham <hai.pham.ud@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> # Tweak commit message
2025-12-03 00:17:15 +01:00
Hai Pham
cf71963778 arm64: dts: renesas: Add Renesas R-Car X5H R8A78000 Ironhide board code
Add initial support for Renesas R-Car X5H R8A78000 Ironhide board.
This consists mainly of DTs, Makefile and Kconfig entries and board
specific configuration files.

The DTs will be gradually switched over to Linux DTs via OF_UPSTREAM
once Linux DTs become available upstream, as upstreaming progresses.

Signed-off-by: Hai Pham <hai.pham.ud@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2025-12-03 00:17:15 +01:00
Hai Pham
b546189a4b arm64: dts: renesas: Add Renesas R-Car X5H R8A78000 SoC DTs
Add initial device trees for Renesas R-Car X5H R8A78000 SoC.
Include very basic clock, reset, power domain headers which
are used to control supported peripherals via SCMI / SCP. The
headers are currently kept limited to avoid possible ABI break.
A lot of clock are still stubbed via fixed-clock, this is going
to be gradually removed over time, as more of the platform is
upstreamed.

Signed-off-by: Hai Pham <hai.pham.ud@renesas.com>
Signed-off-by: Khanh Le <khanh.le.xr@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2025-12-03 00:17:15 +01:00
Hai Pham
e84a0bbefe arm64: renesas: Add Renesas R-Car Gen5 infrastructure
Add initial changes to support Renesas R-Car Gen5 SoC.

Introduce Kconfig entries, architecture headers and PRR IDs for Renesas
R-Car Gen5 and R-Car X5H R8A78000 SoC. Add Makefile change to produce
u-boot-elf.srec with correct offset for installation tooling. Update
MAINTAINERS entry to cover both r8a77nnn and r8a78nnn .

Signed-off-by: Hai Pham <hai.pham.ud@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2025-12-03 00:17:15 +01:00
Tuyen Dang
5353fc464f mailbox: renesas: Add Renesas MFIS Multifunctional Interface mailbox driver
Add support for the Renesas MFIS mailbox, which provides an interface
between the different CPU Cores, such as AP System Core domain and the
Realtime Core domain, SCP Core domain and AP System Core domain or
Realtime Core domain and AP System Core domain or Realtime Core domain.

Signed-off-by: Tuyen Dang <tuyen.dang.xa@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> # Update the driver
[Marek: Rename the driver to renesas-mfis, simplify the driver.
        Always use only one TX channel and no RX channel, drop all
	unnecessary code. Perform 1ms delay in send callback which
	is perfectly fine to do in U-Boot which does RX polling]
2025-12-03 00:17:15 +01:00
Marek Vasut
af96395a82 clk: renesas: Introduce temporary compound clock for SCP compatibility
The current state of SCP on Renesas R-Car Gen5 is not yet final and
is still missing full clock control, the clock control is exposed as
separate enable/disable and rate controls.

Temporarily introduce custom local compound clock, which are used as
an adaptation layer between U-Boot clock tree and current state of
SCP, and which bind two SCP clock into a single compound clock, which
provides both enable/disable and rate controls.

This is mainly meant to be used by SD/eMMC controller, to allow the
driver to both turn its clock on and off, and also obtain the current
clock rate. This is going to be removed once the SCP clock protocol
solidifies.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2025-12-03 00:17:15 +01:00
Marek Vasut
db95933996 sh: Assure end of U-Boot is at 8-byte aligned offset
Make sure the end of U-Boot is at 8-byte aligned offset, not 4-byte
aligned offset. This allows safely appending DT at the end of U-Boot
with the guarantee that the DT will be at 8-byte aligned offset. This
8-byte alignment is now checked by newer libfdt 1.7.2 .

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2025-12-03 00:15:40 +01:00
Adriana Nicolae
209bbc4e00 boot/bootfdt: Add smbios3-entrypoint to FDT for non-EFI boots
The Linux kernel can discover SMBIOS tables through two primary methods:
1. Via EFI tables, when using EFI boot;
2. Via the 'smbios3-entrypoint' property in the /chosen node of the
device tree.

When U-Boot boots a Linux kernel using a non-EFI command ("bootm",
"bootz", or "booti"), the kernel relies on the device tree to detect
the hardware. If SMBIOS tables are available in U-Boot, they should
be passed to the kernel via this device tree property.

This patch modifies boot_fdt_prepare(), to inject the SMBIOSv3 table
address into the device tree if there is a table generated by U-boot.
The "board_fdt_chosen_smbios" is weak in order to leave the possibilty
for specific boards to select custom SMBIOS addresses.

The changes in this patch are added in the context of supporting this
device tree property in linux kernel:
https://lkml.org/lkml/2025/10/24/1393

Device tree schema was updated to include the "smbios3-entrypoint" node
in pull request: https://github.com/devicetree-org/dt-schema/pull/177

Signed-off-by: Adriana Nicolae <adriana@arista.com>
2025-12-02 16:34:27 -06:00
Tom Rini
d4a8124805 Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sh
Two fixes for R-Car Gen4 and CONFIG_ENV_OVERWRITE=n to always expect
"setenv -f" to be used when overwriting ethernet MAC on all R-Car.
2025-12-02 15:25:14 -06:00
Tom Rini
d35a98834d Merge tag 'u-boot-at91-fixes-2026.01-a' of https://source.denx.de/u-boot/custodians/u-boot-at91
First set of u-boot-at91 fixes for the 2026.01 cycle:

This small fixes set includes a fix on the mtd pmecc driver.
2025-12-02 13:00:47 -06:00
Tom Rini
30a9f675e5 Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-samsung
- Assorted updates
2025-12-02 13:00:44 -06:00
Marek Vasut
6ec94acd15 arm64: renesas: r8a779g3: Use redundant env on Retronix R-Car V4H Sparrow Hawk board
The redundant environment offset is already set in board configuration,
but the redundant environment itself is not explicitly enabled. Make
sure the redundant environment is enabled, as we most certainly do want
to have two copies of the environment.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2025-12-02 19:25:17 +01:00
Marek Vasut
925e0cb3b9 ARM: renesas: Disable CONFIG_ENV_OVERWRITE on all boards
The CONFIG_ENV_OVERWRITE allows easy rewrite of environment variables
like 'ethaddr' and 'serial#' without any protection against accidental
removal of those variables. Remove this setting to add extra layer of
protection to those variables. The variables can still be overridden
using 'env set -f' (force set) if really needed.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2025-12-02 19:25:17 +01:00
Marek Vasut
710a7c7912 ARM: dts: renesas: Enable R8A779G0 V4H White Hawk RPC SPI DT node
Disabling RPC breaks SPL boot on R-Car V4H White Hawk board, re-enable RPC.

Fixes: 1d94364c7f ("ARM: dts: renesas: Disable R8A779G0 V4H White Hawk RPC SPI DT node again")
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2025-12-02 19:25:17 +01:00
Kaustabh Chakraborty
422b15bb5b doc: samsung: exynos-mobile: add documentation for exynos7870
Document the image preparation and flashing techniques for
Exynos7870-based boards. This is done in a separate file in a
sub-directory, which is linked back to the main documentation.

Signed-off-by: Kaustabh Chakraborty <kauschluss@disroot.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2025-12-02 13:38:28 +09:00
Kaustabh Chakraborty
8580ca964f board: samsung: exynos-mobile: add exynos7870 support and three devices
Add basic support for the Exynos7870 SoC, this includes device tree
match logic using multiple boards, where devices use a stub dtb in
Samsung's QCDT format. S-BOOT, the previous stage bootloader, places its
cmdline arguments there, which has identifying information.

This is added with support for three devices:
 * Samsung Galaxy A2 Core (codename: a2corelte)
 * Samsung Galaxy J6 (codename: j6lte)
 * Samsung Galaxy J7 Prime (codename: on7xelte)

Add their device trees in the defconfig, and also enable the clock and
pin controller drivers.

Signed-off-by: Kaustabh Chakraborty <kauschluss@disroot.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2025-12-02 13:38:28 +09:00
Kaustabh Chakraborty
ed9ba442ee board: samsung: add support for Samsung Exynos mobile device boards
Add support for a generic platform which intends to support multiple
boards powered by ARMv8 Samsung Exynos SoCs. Some important features
include:
 * Fastboot: This is present to provide an open alternative to Samsung's
   proprietary Odin protocol. The board file configures certain features
   for fastboot, such as a dynamically allocated fastboot buffer, and
   standardized (lowercase) partition aliases.
 * EFI: Kernel image can be loaded from an EFI partition. This
   adopts a standard booting process, which multiple OS distributions
   can rely on.

Signed-off-by: Kaustabh Chakraborty <kauschluss@disroot.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2025-12-02 13:38:27 +09:00
Tom Rini
c6ee44b557 Merge tag 'u-boot-socfpga-next-20251201' of https://source.denx.de/u-boot/custodians/u-boot-socfpga
This pull request delivers a broad set of improvements across the
SoCFPGA family, including Agilex5, Cyclone V, SoC64, and common code.
Key updates include refined boot flows, new driver enablement, handoff
tooling enhancements, and several stability fixes.

Highlights:

* Agilex5:
  - Enable FAT-based environment storage
  - MMC driver restores legacy clkmgr-based clock lookup
  - Cleanup of MMC raw mode enablement logic

* Cyclone V:
  - SPL FAT boot support and updated bootcmd sequence
  - Disable SPL SPI to prevent contention with FAT-based boot
  - New board handoff script and BSP generator tooling
  - Optimized Makefile support for SoCFPGA handoff workflows* New drivers:
  - Cadence xSPI driver with full protocol and command support
  - SPL enablement for DW APB GPIO controller

* Networking:
  - xgmac MDIO now supports Clause 45 read/write operations

* NAND / SoC64:
  - Enable ONFI detection in Denali NAND controller for SoC64 devices

* DTS and board updates:
  - Sync common SoCFPGA U-Boot DTS with kernel sources
  - Fixes for FPGA2SDRAM configuration and SoCFPGA boot stall behavior
  - Vining_FPGA migrated to the modern LED framework
  - Device tree relocation no longer forced off for Vining FPGA

* Tooling:
  - Introduces a new Python-based Cyclone V BSP generator
    covering EMIF, IOCSR, HPS, XML parsing, rendering, and documentation
    to simplify board enablement and handoff regeneration workflows

Overall, this series improves boot robustness, enhances xSPI and MDIO
capabilities, modernizes board support, and introduces new tooling to
streamline SoCFPGA handoff generation.

Pipelines test passing
https://source.denx.de/u-boot/custodians/u-boot-socfpga/-/pipelines/28569
2025-12-01 10:37:45 -06:00
Tom Rini
532582d217 Merge tag 'net-20251201' of https://source.denx.de/u-boot/custodians/u-boot-net
Pull request net-20251201

net:
- phy: broadcom: fix RGMII delays for BCM54210E
- phy: dp83869: fix STRAP_OPMODE bitmask
2025-12-01 10:26:02 -06:00
Tom Rini
5e9f5ea30f Azure: Rework jobs for disk space and 29 jobs
The problem we face currently with Azure jobs is that we're running out
of disk space on the runners as we build. There's not a good way to
split approximately 1500 configurations across 10 jobs and not be close
to or exceeding that limit. Split this in to 29 jobs instead with a goal
of averaging an hour per job. This split gets us close, but there are
still some challenging jobs to try and break up further. The list is
mostly alphabetized but with some intentional changes (catch-all are
last, mx/imx are together, SoC family splits are just grouped together).

The average build time should be close to the same, but outliers can and
will happen.

Signed-off-by: Tom Rini <trini@konsulko.com>
2025-12-01 10:24:19 -06:00
Brian Sune
87cb318344 Add optimized Makefile support for SoCFPGA handoff
- Introduce socfpga_g5_handoff_prepare target in U-Boot
  arch/arm/mach-socfpga/config.mk
- Users can convert the handoff via make prepare.
- Detects Altera/Intel SoCFPGA boards from .config
- Combines vendor/board extraction into a single shell call
- Checks for hps_isw_handoff folder and .hiof files
- Uses ls -d instead of find for faster folder detection
- Runs BSP generator script only if files exist
- Non-blocking: continues if handoff folder or files are missing
- HANDOFF_PATH user define allows overriding auto-detected folder
- Minimizes subshells and other slow constructs for faster CI

Signed-off-by: Brian Sune <briansune@gmail.com>
2025-12-01 17:26:52 +08:00
Michael Walle
7c1b99bd60 net: phy: broadcom: fix RGMII delays for BCM54210E
bcm54210e_config() configures the RGMII delays and then calls
bcm5461_config(). But the latter will do a PHY soft reset and thus
resets the delay settings again. Call bcm5461_config() first to fix it.

Fixes: cba79a1b2e ("net: phy: broadcom: add support for BCM54210E")
Signed-off-by: Michael Walle <mwalle@kernel.org>
Reviewed-by: Rafał Miłecki <rafal@milecki.pl>
2025-12-01 09:52:33 +01:00
Thanh Quan
85a7e45c33 net: phy: dp83869: fix STRAP_OPMODE bitmask
According to the TI DP83869HM datasheet Revision D (June 2025), section
7.6.1.41 STRAP_STS Register, the STRAP_OPMODE bitmask is bit [11:9].
Fix this.

In case the PHY is auto-detected via PHY ID registers, or not described
in DT, or, in case the PHY is described in DT but the optional DT property
"ti,op-mode" is not present, then the driver reads out the PHY functional
mode (RGMII, SGMII, ...) from hardware straps.

Currently, all upstream users of this PHY specify both DT compatible string
"ethernet-phy-id2000.a0f1" and ti,op-mode = <DP83869_RGMII_COPPER_ETHERNET>
property, therefore it seems no upstream users are affected by this bug.

The driver currently interprets bits [2:0] of STRAP_STS register as PHY
functional mode. Those bits are controlled by ANEG_DIS, ANEGSEL_0 straps
and an always-zero reserved bit. Systems that use RGMII-to-Copper functional
mode are unlikely to disable auto-negotiation via ANEG_DIS strap, or change
auto-negotiation behavior via ANEGSEL_0 strap. Therefore, even with this bug
in place, the STRAP_STS register content is likely going to be interpreted
by the driver as RGMII-to-Copper mode.

However, for a system with PHY functional mode strapping set to other mode
than RGMII-to-Copper, the driver is likely to misinterpret the strapping
as RGMII-to-Copper and misconfigure the PHY.

For example, on a system with SGMII-to-Copper strapping, the STRAP_STS
register reads as 0x0c20, but the PHY ends up being configured for
incompatible RGMII-to-Copper mode.

Fixes: f3e22eea81 ("net: phy: add TI DP83869HM ethernet driver")
Signed-off-by: Thanh Quan <thanh.quan.xn@renesas.com>
Signed-off-by: Hai Pham <hai.pham.ud@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> # Use FIELD_GET()
2025-12-01 09:52:33 +01:00
Alif Zakuan Yuslaimi
05f72f28e9 configs: cyclone5: Disable SPI in SPL
Disable support for using SPI in SPL to solve Cyclone V storage issue as
the OCRAM is only 64kb. The SPI configurations are only
required during uboot proper only.

Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com>
Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
2025-12-01 14:31:44 +08:00
Alif Zakuan Yuslaimi
cd74c05619 configs: cyclone5: Update boot command for CycloneV
Update CycloneV boot command to sync with Altera official release

Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com>
Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
2025-12-01 14:31:31 +08:00
Alif Zakuan Yuslaimi
5790f5ef33 configs: cyclone5: Enable SPL FAT support
Enable support for FAT filesystem with SPL for CycloneV instead of raw
mode.

Recent changes breaks CycloneV MMC boot from raw mode, and so we are taking
this opportunity to migrate MMC boot mode to FAT as smaller OCRAM size is
required, as well as aligning MMC boot flow with our other devices.

Fixes: 2a00d73d08 ("spl: mmc: Try to clean up raw-mode options")

Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com>
Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
2025-12-01 14:31:12 +08:00
Alif Zakuan Yuslaimi
f85293aac7 spl: Remove ARCH_SOCFPGA from MMC raw mode enablement
We no longer use raw mode to boot from MMC for our devices in favor
of FAT filesystem.

Maintaining this config for legacy gen5 devices as to not risk breaking
any configurations still utilizing raw mode.

Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com>
Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
2025-12-01 14:30:46 +08:00
Alif Zakuan Yuslaimi
a2bd59f7c3 mmc: socfpga_dw_mmc: Restore legacy clkmgr address retrieval
Restore legacy implementation of retrieving clkmgr base address from
mach-socfpga/misc.c driver for our legacy devices.

Excluding Agilex7/7M from this implementation as these devices' clock
driver is already following clock driver model and is supporting
enable/disable APIs.

The legacy devices' clock driver will have to be refactored to support
driver model which enables us to support enable/disable APIs for these
devices.

Fixes: ab27182cac ("mmc: socfpga_dw_mmc: Enable/disable SDMMC clock via API")

Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com>
Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
2025-12-01 14:30:31 +08:00
Alif Zakuan Yuslaimi
83d157e036 configs: cyclone5: Disable mkeficapsule tool build
mkeficapsule tool will be built by default if EFI_LOADER is set due to
commit b7a625b1ce ("tools: Build mkeficapsule tool by default if
EFI_LOADER is set").

This will cause compilation error on all our SoCFPGA devices, hence we will
be disabling this config as we do not utilize this tool.

Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com>
Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
2025-12-01 14:30:12 +08:00
Quentin Schulz
da09bb6a6c board: softing: vining: migrate to modern LED framework
This migrates from the legacy LED API to use the modern LED framework
which makes use of the FDT.

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Acked-by: Tien Fong Chee <tien.fong.chee@altera.com>
2025-12-01 14:29:37 +08:00
Tom Rini
0af9efa7c1 socfpga_vining_fpga: Stop disabling device tree relocation
Remove setting of fdt_high to ~0, which disables device tree relocation,
from the default environment. Doing so prevents U-Boot from correcting
problems such as having an unaligned device tree and leads to various
failure modes in the OS.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Marek Vasut <marek.vasut@mailbox.org>
2025-12-01 14:29:06 +08:00
Brian Sune
5b1fe6ef6b Altera SoCFpga Boot Stall Fix
Since U-Boot 2025.07 pure SD Card
boot no longer works. Now Altera released 2025.07
shows the different on the u-boot files.
After testing, the major root case is
get_managers_addr. And this patch fix the
SD boot stall via pulling from offical.

Signed-off-by: Brian Sune <briansune@gmail.com>
Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
2025-12-01 14:02:24 +08:00
Brian Sune
e291277689 sync socfpga common u-boot dts
The dtsi for socfpga common should
turn on L2 and memory and no reason not
to do so

Signed-off-by: Brian Sune <briansune@gmail.com>
Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
2025-12-01 14:02:01 +08:00
Dinesh Maniyam
6beb48a395 nand: denali: enable ONFI detection for SoCFPGA SoC64
Enable ONFI parameter page detection for SoCFPGA SoC64 devices by
selecting SYS_NAND_ONFI_DETECTION in the NAND_DENALI Kconfig entry.

This allows SoCFPGA SoC64 platforms using the Denali NAND controller
to automatically detect NAND parameters via the ONFI interface instead
of relying on hardcoded configuration values.

The selection is limited to TARGET_SOCFPGA_SOC64 to avoid affecting
non-SoC64 platforms that use legacy NAND handling.

Signed-off-by: Dinesh Maniyam <dinesh.maniyam@altera.com>
Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
2025-12-01 14:01:37 +08:00
Brian Sune
3ba9b1f7bd Cyclone V Board handsoff script
Since turning from old build flow.
New Altera SoCFPGA requires converting handsoff
conversion via the python script. This is from
official provided, and now sync to U-Boot with
better location at tools/cv_xxxx. Meantime,
requirement.txt is also provided to further
explain the libraries require for these scripts.

Signed-off-by: Brian Sune <briansune@gmail.com>
Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
2025-12-01 14:01:12 +08:00
Boon Khai Ng
5eb14e1ea2 spi: cadence: Add driver for xSPI
This patch ports the Cadence xSPI controller driver from
the Linux kernel. The controller supports three operating modes:

1. ACMD (Auto Command) mode
   - Includes PIO and CDMA submodes.
   - CDMA mode uses linked descriptors for high-performance,
     low-overhead operation.
   - PIO mode is suitable for simple, single-command transactions.

2. STIG (Software Triggered Instruction Generator) mode
   - Issues low-level 128-bit instructions to memory.
   - Uses the Slave DMA interface for data transfers.

3. Direct mode
   - Enables direct data access through the slave interface
     without commands.

Currently, only the STIG work mode is enabled. Additional modes will be
supported in future updates.

At the same time, also enabling the kconfig option for xSPI driver.

This driver has been ported and functionally verified on the Intel Simics
platform. It is intended for evaluation and experimental use at this stage.

Link: https://lore.kernel.org/all/1632038734-23999-1-git-send-email-pthombar@cadence.com/

Signed-off-by: Boon Khai Ng <boon.khai.ng@altera.com>
Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
2025-12-01 13:57:32 +08:00
Alif Zakuan Yuslaimi
ec4b7710f8 configs: agilex5: Enable FAT-based environment storage in defconfig
Enable storing the U-Boot environment in a FAT filesystem for Agilex5.

This allows the board to read and write environment variables from the
first partition of the first device formatted with FAT, in addition to the
existing UBI-based environment configuration.

Signed-off-by: Alif Zakuan Yuslaimi <alif.zakuan.yuslaimi@altera.com>
Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
2025-12-01 13:56:27 +08:00
Brian Sune
1feebc36e5 FPGA2SDRAM setup fix
After testing, w/o proper setup
the FPGA2SDRAM bridge will not work and stall.
Pulling from official fix and w/o this initialization,
both 2025.07 and 2025.10 also suffer stall on U-Boot
and distro. Any FPGA to HPS-SDRAM action will immediate
stall the CPU. As such, this patch fix the issue.

Signed-off-by: Brian Sune <briansune@gmail.com>
Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
2025-12-01 13:55:27 +08:00
Tanmay Kathpalia
2b30c416f0 gpio: dwapb: Enable SPL support for DWAPB GPIO driver
Add SPL_DWAPB_GPIO configuration option to enable the Designware APB
GPIO driver in SPL builds.

Changes:
- Add SPL_DWAPB_GPIO Kconfig option with SPL_DM_GPIO dependency
- Update Makefile to use CONFIG_$(PHASE_)DWAPB_GPIO pattern for
  conditional compilation in both SPL and main U-Boot builds

Signed-off-by: Tanmay Kathpalia <tanmay.kathpalia@altera.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2025-12-01 13:55:02 +08:00
Nikunj Kela
b17c28488b net: xgmac: Augment mdio read/write with cl-45 format support
Currently, clause-22 format is supported. This change adds
support for clause-45 format.

Signed-off-by: Nikunj Kela <nikunj.kela@sima.ai>
Reviewed-by: Boon Khai Ng <boon.khai.ng@altera.com>
Tested-by: Boon Khai Ng <boon.khai.ng@altera.com>
Reviewed-by: Boon Khai Ng <boon.khai.ng@altera.com>
Tested-by: Boon Khai Ng <boon.khai.ng@altera.com>
Reviewed-by: Tien Fong Chee <tien.fong.chee@altera.com>
2025-12-01 13:54:04 +08:00
Tom Rini
31bf4a1c30 Merge tag 'rpi-2026.01-rc3' of https://source.denx.de/u-boot/custodians/u-boot-raspberrypi
Updates for RPi for 2026.01-rc4:

- rpi: Fix DRAM size reporting to show total RAM
- rpi: Use the U-Boot control FDT for fdt_addr
- pinctrl: bcm283x: Add GPIO pull-up/down control for BCM2835 and BCM2711
- rpi: Fix compilation with larger configs
2025-11-28 08:26:44 -06:00
Tom Rini
781e6e35a0 Merge branch 'master' of git://source.denx.de/u-boot-usb
- A Kconfig dependency fix and a patch to avoid a noisy print
2025-11-28 08:25:20 -06:00
Anders Roxell
5b702cf4d0 rpi: Fix DRAM size reporting to show total RAM
The VideoCore mailbox GET_ARM_MEMORY only reports the size of the
first accessible memory region (~947 MiB on RPi4 with 8GB), not the
total RAM. This causes U-Boot to display "DRAM: 947 MiB (total 7.9 GiB)"
instead of "DRAM: 7.9 GiB".

On Raspberry Pi 4 with 8GB RAM, the memory is split across multiple
non-contiguous banks. The dram_init() function only sets gd->ram_size
to the first bank size reported by the VideoCore firmware, while
fdtdec_setup_memory_banksize() correctly populates all memory banks
from the device tree.

Fix this by updating gd->ram_size after dram_init_banksize() has
populated all memory banks, so it reflects the actual total RAM
across all banks.

Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
2025-11-28 13:50:51 +00:00
Heinrich Schuchardt
7dbcc316a6 usb/xhci: avoid noisy 'Register NbrPorts' message
We should avoid overwhelming users with non-essential messages.

'Register NbrPorts' is a debug message for EHCI. Do the same for XHCI.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Marek Vasut <marek.vasut@mailbox.org>
2025-11-27 19:41:03 +01:00
Max Krummenacher
610a3eb27e configs: toradex-smarc-imx95: set spl_stack
The SPL_STACK config option now depends on having SPL_HAVE_INIT_STACK
defined. This made savedefconfig dropping SPL_STACK when sending the
initial configuration.
Note that SPL/U-Boot are able to boot linux from mass storage with
SPL_STACK not set but other use cases might run out of stack or
overlap with other RAM use.

Compare with:
commit d6a53f523a ("spl: Add an SPL_HAVE_INIT_STACK option")
commit 25fefa05d7 ("configs: Resync with savedefconfig")

Fixes: ff0540fcfe ("board: toradex: add Toradex SMARC iMX95")
Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Acked-by: Francesco Dolcini <francesco.dolcini@toradex.com>
2025-11-27 12:39:15 -06:00
Heinrich Schuchardt
2736ed925e usb: USB_EHCI_PCI depends on PCI
CONFIG_USB_EHCI_PCI cannot work without CONFIG_PCI.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Marek Vasut <marek.vasut@mailbox.org>
2025-11-27 19:14:09 +01:00
Leonard Anderweit
962711498d bootstd: rauc: Only require partitions for one slot
Partitions can be become unusable due to power cuts or failed updates.
Use the bootmeth RAUC if partitions for at least one slot exist. The
bootmeth can then select the working slot.

Signed-off-by: Leonard Anderweit <l.anderweit@phytec.de>
Tested-by: Martin Schwan <m.schwan@phytec.de>
2025-11-27 09:27:03 -06:00
Leonard Anderweit
5d7c080ae5 bootstd: rauc: Don't check root part filesystem
Only check if the root partition exists when scanning for the slots
partitions and not if the filesystem can be accessed. It is not needed
to access the filesystem of the root partition as it might not be
supported by u-boot or be encrypted.

Signed-off-by: Leonard Anderweit <l.anderweit@phytec.de>
Tested-by: Martin Schwan <m.schwan@phytec.de>
2025-11-27 09:27:03 -06:00
Greg Malysa
70ab39e230 board: adi: Fix missing semicolon in nfsroot
The nfsroot constructed as part of the default Analog Devices boot
strategy is missing a semicolon between the server ip and the root path
itself. This adds the missing semicolon.

Signed-off-by: Greg Malysa <malysagreg@gmail.com>
2025-11-27 09:27:03 -06:00
Maarten Brock
f06e1c04bf board: ti: am335x: Fix DM_TPS65910 condition
scale_vcores_generic() calls functions implemented in
tps65910.c, not tps65910_dm.c. Change guard from CONFIG_DM_PMIC_TPS65910 to
CONFIG_SPL_POWER_TPS65910.

Fixes: 0b9ff08515 ("board: ti: am335x: Do not call disabled PMIC functions")
Signed-off-by: Markus Schneider-Pargmann (TI.com) <msp@baylibre.com>
Signed-off-by: Maarten Brock <maarten.brock@sttls.nl>
Reviewed-by: Kory Maincent <kory.maincent@bootlin.com>
Acked-by: Maarten Brock <maarten.brock@sttls.nl>
2025-11-27 09:27:03 -06:00
Guillaume La Roque (TI.com)
3afc99727a board: ti: am6x: Restore do_board_detect functions
This patch fixes a boot failure on the AM64x EVM that was introduced when the do_board_detect function was removed during a refactoring.

It restores the do_board_detect function for the AM64x, AM62x, and AM65x boards to ensure the common board detection logic is executed correctly.

Fixes: 804b80288a ("board: am65x: Use generic AM6x board detection function")
Fixes: ce56e553c3 ("board: am64x: Use generic AM6x board detection functions")
Fixes: ff1b83c095 ("board: am62x: Add support for reading eeprom data")
Signed-off-by: Guillaume La Roque (TI.com) <glaroque@baylibre.com>
2025-11-27 09:27:03 -06:00
Siddharth Vadapalli
cc0ce9e8c4 net: ti: am65-cpsw-nuss: Ignore disabled ethernet ports
Currently, the bind callback of the driver namely am65_cpsw_nuss_bind()
registers all ethernet ports including the ones that have been disabled
in the device-tree. Since the ports that have been disabled are ought to
be ignored, fix the implementation to register only the enabled ports as
indicated by their 'status' in their respective device-tree node.

Fixes: 3943531a54 ("net: ti: am65-cpsw-nuss: Define bind method for CPSW driver")
Reported-by: Wadim Egorov <w.egorov@phytec.de>
Closes: https://patch.msgid.link/8b4ac072-125c-493b-b12a-f0a4e9d56e7e@phytec.de
Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
2025-11-27 09:27:03 -06:00
Siddharth Vadapalli
e3b7dd93d3 power: domain: ti: fix ti_pd_get() to return after verifying transition
The helper function "ti_pd_get()" is responsible for powering on a
domain if it is powered off. In the current implementation, if a power
domain is determined to be powered off - no prior users and the PDCTL
register indicates that the user desired state is OFF, then powering on
the domain constitutes setting 'PDCTL_STATE_ON' field of the PDCTL
register.

While the current implementation indeed requests the power domain to be
transition to the ON state, the helper function "ti_pd_get()" doesn't
verify that the power domain has 'transitioned' to the ON state before
returning to its caller. As a result, it is possible that the device(s)
belonging to the power domain may be accessed before it is truly powered
on, leading to a bus abort.

Fix this by waiting for the power domain to transition to the ON state
by using "ti_pd_wait()" before returning from "ti_pd_get()".

Fixes: 144464bd2c ("power: domain: Introduce driver for raw TI K3 PDs")
Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
Tested-by: Hrushikesh Salunke <h-salunke@ti.com>
2025-11-27 08:43:51 -06:00
Heinrich Schuchardt
642a9e716e cmd/extension: avoid NULL pointer dereference
extension_get_list() will return NULL if there is no extension device.
Check for this situation.

Addresses-Coverity-ID: 638557 - Null pointer dereferences (NULL_RETURNS)
Fixes: 2d12958ee7 ("boot: Remove legacy extension board support")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Acked-by: Kory Maincent <kory.maincent@bootlin.com>
2025-11-27 08:43:45 -06:00
Tom Rini
d49e48462b Merge tag 'u-boot-imx-master-20251126' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx
CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/28502

- Fix i.MX8ULP boot regression.
- Fix colibri-imx7 fdtfile overwrite.
- Fix some i.MX91 pinmux macro definitions.
2025-11-26 15:53:00 -06:00
Tom Rini
0ae3dc6809 CI: Update to latest container
- Move to jammy-20251013 tag
- Bring in tkinter so that FATtools should run and more tests should be
  run.
- Update to QEMU 10.0.6
- Pick tags for (most of) trace-cmd

Signed-off-by: Tom Rini <trini@konsulko.com>
2025-11-26 10:30:24 -06:00
Tom Rini
4dfa4c14b8 Dockerfile: Update building trace tools slightly
We have not been picking a tag for the trace-cmd build process.
Currently the tip of libtraceevent fails to build. Address both problems
here by picking recent stable tags for libtraceevent and libtracefs
(trace-cmd has no recent tags). Further, as it is often reported that
this fails to build due to a race, stop using "make -j$(nproc)" as this
is also small enough of a set of builds to not be an issue.

Signed-off-by: Tom Rini <trini@konsulko.com>
2025-11-26 10:21:54 -06:00
Tom Rini
bc4a1e56bf Dockerfile: Include python3-tk for FATtools
In some cases our tests for exFAT don't run because we fail to be able
to create the underlying image. This is in turn because while creation
of the image succeeds, it seems that some way of how we invoke FATtools
wants to import tkinter, that fails and so the test stops there. Having
tkinter available (and then presumably a fallback to non-GUI because
it's not available) leads to the tests running as expected.

Reviewed-by: Marek Vasut <marek.vasut@mailbox.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
2025-11-26 09:39:42 -06:00
Tom Rini
bd19527c75 Docker: Update QEMU to 10.0.6
The QEMU project has the 10.0.x series as an LTS release. While we are
not doing an LTS ourselves, we can be confident in the changes between
10.0.2 and 10.0.6, so update ourselves.

Signed-off-by: Tom Rini <trini@konsulko.com>
2025-11-26 09:39:03 -06:00
Tom Rini
ff3b4e9936 s5p4418_nanopi2: Stop disabling device tree relocation
Remove setting of fdt_high to ~0, which disables device tree relocation,
from the default environment. Doing so prevents U-Boot from correcting
problems such as having an unaligned device tree and leads to various
failure modes in the OS.

Signed-off-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2025-11-26 19:17:49 +09:00
Sam Protsenko
17d6b90a5f board: samsung: e850-96: Enter DFU automatically on USB boot
Doing USB boot on E850-96 is most useful in two cases:

  1. For unbricking the board
  2. During the bootloader development

In both cases a U-Boot binary is being re-flashed to eMMC. The most
convenient way to update U-Boot in eMMC is by using DFU. Implement
entering DFU flashing mode automatically when U-Boot is executed on USB
boot. That makes it easier for users to re-flash U-Boot without even
having serial console running, e.g.:

    $ ./smdk-usbdl
    $ dfu-util -D u-boot.bin -a bootloader

See [1,2] for details.

Entering DFU mode is implemented by setting corresponding environment
variables:

    bootcmd="dfu 0 mmc 0"
    bootdelay=0

Do not save the U-Boot environment though, to avoid falling through to
DFU mode on a regular eMMC boot.

[1] doc/board/samsung/e850-96.rst
[2] https://gitlab.com/LinaroLtd/e850-96/tools/dltool/-/tree/uboot

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2025-11-26 17:55:57 +09:00
Sam Protsenko
7b583b6663 board: samsung: e850-96: Load firmwares over USB on USB boot
During USB boot it's expected that the bootloader (U-Boot) should
download LDFW and TZSW firmware binaries over USB, using corresponding
SMC call. Once it's done, the Boot ROM code can release the USB block,
so that it can be used in U-Boot (e.g. for flashing images to eMMC using
DFU or fastboot). Otherwise USB wouldn't be accessible in U-Boot, and
any attempt to access USB PHY or DWC3 registers will lead to abort.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2025-11-26 17:55:57 +09:00
Sam Protsenko
3d9115a045 board: samsung: e850-96: Add routine for loading images over USB
During USB boot U-Boot is supposed to download some firmware over USB.
It's done by EL3 software, so it has to be requested via corresponding
SMC call. Implement a routine for doing that.

No functional change.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2025-11-26 17:55:57 +09:00
Sam Protsenko
3d1ae437a6 board: samsung: e850-96: Split LDFW loading and init
The LDFW firmware loading is done in two steps:

  1. Read the firmware binary from some block device
  2. Provide it to EL3 monitor software via an SMC call, so it can copy
     it to a Secure World memory and start using it

Let's split the load_ldfw() function by two functions correspondingly,
to reflect that process better:

  - load_ldfw_from_blk()
  - init_ldfw()

It can be useful in case when the LDFW binary should be obtained from
some different media, e.g. downloaded over USB during USB boot.

No functional change.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2025-11-26 17:55:57 +09:00
Sam Protsenko
1d9aafa751 board: samsung: e850-96: Add routines for checking boot dev
Implement functionality to check the current boot device (a device where
the SoC ROM code is loading the bootloaders from). The boot device order
can be changed using the SW1 DIP switch on the E850-96 board (which
controls XOM SoC lines), as stated in [1].

The boot device information is requested from EL3 software using the
corresponding SMC call, which in turn reads it from iRAM memory, which
was written by the ROM code. New routines decode that data and allow the
user to check the current boot device, boot order, etc. That API can be
used further to implement different code flows depending on the current
boot device, e.g.:

  - on eMMC boot: obtain the firmware binaries from eMMC
  - on USB boot: download the firmware over USB instead

No functional change; this patch only adds new functionality but it's
not used yet.

[1] doc/board/samsung/e850-96.rst

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2025-11-26 17:55:57 +09:00
Sam Protsenko
f737f0675f board: samsung: e850-96: Keep public functions together
Move DRAM init functions close to other public functions, to make things
visually distinct and improve the readability.

No functional change.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2025-11-26 17:55:57 +09:00
Alice Guo
e2c435bd0a arm: dts: imx8ulp: Disable wdog3 until DM watchdog support is available
The driver model for watchdog timer is not enabled yet, so disable wdog3
temporarily.

Signed-off-by: Alice Guo <alice.guo@nxp.com>
2025-11-25 21:54:53 -03:00
Alice Guo
091df90a89 arm: dts: imx8ulp: Ensure mu@27020000 and lpuart5 availability during all boot phases
mu@27020000 is required for communication with ELE firmware, and
lpuart5 is the standard output device. Both peripherals must be
available before U-Boot relocation. Use bootph-all instead of
bootph-pre-ram so these nodes are retained across all boot phases.

Signed-off-by: Alice Guo <alice.guo@nxp.com>
2025-11-25 21:54:52 -03:00
Ernest Van Hoecke
1312a50346 configs: colibri-imx7*: set 'fdtfile' generically in PREBOOT
In TEZI (Toradex Easy Installer), we use one U-Boot binary for both our
NAND and eMMC Colibri iMX7 modules. Currently, CONFIG_PREBOOT sets the
environment variable 'fdtfile' depending on which defconfig was used,
adding the '-emmc' variant for the emmc defconfig. Since we always build
the TEZI recovery U-Boot with the standard (non-emmc) defconfig, fdtfile
has to be overwritten later or it will be wrong there.

By using '$variant', the fdtfile var is properly constructed at run time
for both the NAND and eMMC variants, and we do not have to worry about
setting fdtfile again when building the recovery TEZI U-Boot.

This also synchronizes these configs with how we handle the iMX6ULL.

Fixes: 327381e8b5 ("colibri_imx7: use preboot for fdtfile evaluation")
Signed-off-by: Ernest Van Hoecke <ernest.vanhoecke@toradex.com>
Reviewed-by: Francesco Dolcini <francesco.dolcini@toradex.com>
2025-11-25 21:54:18 -03:00
Francesco Valla
29f6afc6e3 imx91: fix pinmux macros for ENET1_TD3 and I2C2_SCL
Fix macros for the GPIO function for two pads (ENET1_TD3 and I2C2_SCL),
aligning them to the functions specified in the datasheet.

Fixes: a9d562daa3 ("imx: Add iMX91 support")

Suggested-by: Javier Viguera <javier.viguera@digi.com>
Signed-off-by: Francesco Valla <francesco@valla.it>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
2025-11-25 21:53:58 -03:00
Kaustabh Chakraborty
4937a9778c gpio: s5p: increment bank base address only if bank is initialized
There is a condition guard which ensures that the GPIO node, indeed
describes a GPIO controller.

	if (!fdtdec_get_bool(blob, node, "gpio-controller"))
		continue;

Since the bank base is being incremented in the loop, it is done so
irrespective of whether the node is a GPIO controller or not. This leads
to the incorrect resolution of bank base addresses.

Move it out of the loop, and instead increment the bank base address
only if the driver successfully binds a GPIO controller.

Reviewed-by: Henrik Grimler <henrik@grimler.se>
Fixes: b8809e60cd ("dm: exynos: gpio: Convert to driver model")
Signed-off-by: Kaustabh Chakraborty <kauschluss@disroot.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2025-11-25 19:00:47 +09:00
Simon Glass
15c719174c rpi: Use the U-Boot control FDT for fdt_addr
The fdt_addr variable is used in extlinux as a fallback devicetree if
none is provided by the boot command. Otherwise the only use in U-Boot
seems to me efi_install_fdt() when the internal FDT is required.

The existing mechanism uses the devicetree provided to U-Boot, but in
its original, unrelocated position. In my testing on an rpi_4, this ends
up at 2b35ef00 which is not a convenient place in memory, if the ramdisk
is large.

U-Boot already deals with this sort of problem by relocating the FDT
to a safe address.

So use the control-FDT address instead.

Remove the existing comment, which is confusing, since the FDT is not
actually passed unmodified to the kernel: U-Boot adds various things
using its FDT-fixup mechanism.

Note that board_get_usable_ram_top() reduces the RAM top for boards with
less RAM. This behaviour is left unchanged as there is no other
mechanism for U-Boot to handle this.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Christopher Obbard <christopher.obbard@linaro.org>
Tested-by: Christopher Obbard <christopher.obbard@linaro.org> # CM4 1G
2025-11-25 09:22:12 +00:00
Cibil Pankiras
2c39d975f8 pinctrl: bcm283x: Add GPIO pull-up/down control for BCM2835 and BCM2711
This patch adds support for configuring GPIO pull-up and pull-down
resistors in the BCM283x pinctrl driver. It implements the brcm,pull
device tree property to control pin bias settings.

The implementation follows the hardware-specific pull control
mechanisms:
- BCM2835: two-step GPPUD register sequence
- BCM2711: direct per-pin control registers

This enables device tree configurations to specify pull-up, pull-down,
or no bias for individual GPIO pins.

Tested on Raspberry Pi boards with both BCM2835 and BCM2711 SoCs.

Signed-off-by: Cibil Pankiras <cibil.pankiras@egym.com>
Reviewed-by: Matthias Brugger <mbrugger@suse.com>
2025-11-25 09:22:12 +00:00
Ilias Apalodimas
46e0ac55e5 rpi: Fix compilation with larger configs
Tom reports that adding more Kconfig options fails with
board/raspberrypi/rpi/lowlevel_init.o: in function `save_boot_params':
board/raspberrypi/rpi/lowlevel_init.S:20:(.text+0x0):
relocation truncated to fit: R_AARCH64_ADR_PREL_LO21
against symbol `fw_dtb_pointer' defined in .data section
in board/raspberrypi/rpi/rpi.o
make: *** [Makefile:2029: u-boot] Error 1

Since fw_dtb_pointer lives in .data it might end up above the
+-1MB that adr can reach.
So switch over to adrp+add which has a +-4gb reach.

Reported-by: Tom Rini <trini@konsulko.com>
Closes: https://source.denx.de/u-boot/custodians/u-boot-raspberrypi/-/issues/2
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
2025-11-25 09:22:12 +00:00
Tom Rini
c5e6d2ab7e Prepare v2026.01-rc3
Signed-off-by: Tom Rini <trini@konsulko.com>
2025-11-24 09:27:35 -06:00
Jonas Karlman
e8c10f9d24 rockchip: rk3588: Map SCMI shared memory area as non-cacheable
The SCMI shared memory area is no longer automatically marked as
non-cacheable after the commit a5a0134570 ("firmware: scmi: Drop
mmu_set_region_dcache_behaviour() misuse").

This change in behavior cause Rockchip RK3588 boards to fail boot with:

  SoC:   RK3588
  DRAM:  8 GiB
  scmi-over-smccc scmi: Channel unexpectedly busy
  scmi_base_drv scmi-base.0: getting protocol version failed
  scmi-over-smccc scmi: failed to probe base protocol
  initcall_run_r(): initcall initr_dm() failed
  ### ERROR ### Please RESET the board ###

Update the memory mapping on RK3588 to mark the SCMI shared memory area
as non-cacheable to fix the SCMI shared memory based transport issue
that prevented RK3588 boards from booting.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2025-11-24 07:40:08 -06:00
Tom Rini
9eeed95044 configs: Resync with savedefconfig
Resync all defconfig files using qconfig.py

Signed-off-by: Tom Rini <trini@konsulko.com>
2025-11-22 11:43:21 -06:00
Kory Maincent (TI.com)
2d7eee5a55 boot: pxe_utils: Fix memory allocation issues in overlay_dir handling
Fix two memory allocation bugs in label_boot_extension():

1. When label->fdtdir is not set, overlay_dir was used without any
   memory allocation.

2. When label->fdtdir is set, the allocation size was incorrect,
   using 'len' (just the fdtdir length) instead of 'dir_len' (which
   includes the trailing slash and null terminator).

Resolve both issues by moving the memory allocation and string
formatting outside the conditional block, resulting in clearer code
flow and correct sizing in all cases.

Closes: https://lists.denx.de/pipermail/u-boot/2025-November/602892.html
Addresses-Coverity-ID: 638558 Memory - illegal accesses (UNINIT)
Fixes: 935109cd9e ("boot: pxe_utils: Add extension board devicetree overlay support")
Signed-off-by: Kory Maincent (TI.com) <kory.maincent@bootlin.com>
Tested-by: Surkov Kirill <fanra3.tk@gmail.com>
2025-11-22 08:49:09 -06:00
Francois Berder
8385ecc8ef upl: Fix buf array size
Size of array buf was incorrect due to sizeof returning the
size of an integer (typically 32 bits) instead of a u64 type
(64 bits). Hence, buf array was shorter than expected.

Signed-off-by: Francois Berder <fberder@outlook.fr>
Reviewed-by: Simon Glass <sjg@chromium.org>
2025-11-22 08:48:13 -06:00
Tom Rini
74c68b5497 Merge tag 'efi-2026-01-rc3-2' of https://source.denx.de/u-boot/custodians/u-boot-efi
Pull request efi-2026-01-rc3-2

CIL https://source.denx.de/u-boot/custodians/u-boot-efi/-/pipelines/28454

Documentation:

* board: ti: am6254atl_sk: correct value of PRELOADED_BL33_BASE
* pytest: fix u-boot-test-flash typo
* samsung: Fix PXE description for the E850-96 board
* board: ti: k3: Update TI firmware repository URL to GitHub
* add missing macro descriptions to include/test/ut.h and add it to
  the API documenation
* rearrange the description of DM tests and describe return values

Testing:

* Enable CI testing ACPI on qemu-riscv64_smode_acpi_defconfig
* Add qemu-riscv64_smode_defconfig to the CI tests
* Generalize tests such that they can run on RISC-V QEMU
  - fdt_test_apply requires CONFIG_OF_LIBFDT_OVERLAY
  - cmd/fdt: do not assume RNG device exists
  - cmd/bdinfo: make no flash assumption
  - cmd/bdinfo: consider arch_print_bdinfo() output
  - common/print: do not use fixed buffer addresses
  - cmd/fdt: do not use fixed buffer addresses
  - raise CONFIG_CONSOLE_RECORD_OUT_SIZE default to 0x6000
* enable CONFIG_CONSOLE_RECORD=y on qemu-riscv64_smode_acpi

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCAAdFiEEbcT5xx8ppvoGt20zxIHbvCwFGsQFAmkg1IsACgkQxIHbvCwF
# GsQVLA//dmiApob+J9FUhD8joD+DaKSNfLYmv8zwfIFL2xRxx7D+CQT+r+I9FJYI
# KojiLyn4PE/5VOm+wrsvAoYoMLJwAHvg5nmYJLLzvm6V//DLd1AEopP/+Uh8gEVW
# xYGLcvDyGgZpraAhcmqRnAS89py3SigwGzhcUMbT6ZC6pgMVEsBpg8XeMpY7N05c
# rwyqFAAPD8RcF7veQCpry87NiK5o+9YuM1zKl5sDFOpEWKq5ToNwhQ00bnux9lUd
# HWz9X6ge58iFiMXRqUCnOaPeXeChn9ejyEiKtfQ0JtykOf9NT2WMdD2VKe9PCYsd
# f7OynJTGG2OXTKBhon/xj75itiTm7EELc/FHwHEdtZIIHgpi/C33yQgKxLf9mtUo
# Z7DKYpPoaTCbJhs9LCK942KPtshbtAJLKTVqyBPo7Jn0mneeCQUsbaQRU7JruJTK
# hKluUjsAry3Do3wv/w6B8R6MMgfpBktPkqjg9e/maSdhYdkNAYpjajtORgpqmJRV
# HTGJXfL3qFC50jlenlMYOm4Qake33MIMzubaxoM3j5ENDUJ7KAbWADEoWDpve8Tu
# b/fX8uuW+g2T18Y/M9Bsk/jaUjDTx0xtZUSYNIIQJFDaJMzUxGYWlmtXhLZwFU8g
# 7S5pBmgxoSAtQSMAeoJPJp9FSgXYqiGLUeSwcOH2NaPn0lLFvK0=
# =D0Yy
# -----END PGP SIGNATURE-----
# gpg: Signature made Fri 21 Nov 2025 03:07:23 PM CST
# gpg:                using RSA key 6DC4F9C71F29A6FA06B76D33C481DBBC2C051AC4
# gpg: Good signature from "Heinrich Schuchardt <xypron.glpk@gmx.de>" [unknown]
# gpg:                 aka "[jpeg image of size 1389]" [unknown]
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 6DC4 F9C7 1F29 A6FA 06B7  6D33 C481 DBBC 2C05 1AC4
2025-11-22 08:44:38 -06:00
David Lechner
fff78d3bb2 doc: pytest: fix u-boot-test-flash typo
Fix typo: `s/u-boot-test-flash1/u-boot-test-flash/`. The correct name of
the script doesn't have a "1" in it.

Signed-off-by: David Lechner <dlechner@baylibre.com>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2025-11-21 19:29:23 +01:00
Sam Protsenko
a5dc935df7 doc: samsung: Fix PXE doc for E850-96 board
As stated in PXELINUX doc [1], the PXE configuration file has to be in
the format of "01-MAC-address" for Ethernet connections:

    The hardware type (using its ARP "htype" code) and address, all in
    lowercase hexadecimal with dash separators. For example, for an
    Ethernet (i.e. ARP hardware type "1") with address
    "88:99:AA:BB:CC:DD", it would search for the filename
    "01-88-99-aa-bb-cc-dd".

Indeed, PXE implementation in U-Boot looks for files like that, as can
be seen from this call chain:

    format_mac_pxe()
    pxe_mac_path()
    pxe_get()
    extlinux_pxe_read_bootflow()

Mention the fact that PXE expects the configuration file to be prepended
with "01" in the PXE section of E850-96 documentation. While at it, fix
some other minor issues in PXE section.

[1] https://wiki.syslinux.org/wiki/index.php?title=PXELINUX

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
2025-11-21 19:26:52 +01:00
Heinrich Schuchardt
b0be86bbf8 doc: describe return values of C tests
* Enumerate return values of C tests
* Reference assertion macros

Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2025-11-21 19:25:56 +01:00
Heinrich Schuchardt
3fea6dfd2e doc: add include/test/ut.h to HTML documentation
The asserts in ut.h are often used. Provide online documentation.

Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2025-11-21 19:25:56 +01:00
Heinrich Schuchardt
8d18eac76d test: document ut.h
Add missing Sphinx comments in include/test/ut.h

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2025-11-21 19:25:56 +01:00
Heinrich Schuchardt
eb2d933a99 doc: make writing DM test subsection of writing C test
A driver model test is just a special case of a C test.

Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2025-11-21 19:25:56 +01:00
Anshul Dalal
a1f1a41b13 doc: board: ti: am6254atl_sk: fix PRELOADED_BL33_BASE
The SPL_TEXT_BASE for AM62x SiP is set as 0x82000000 whereas the
documentation states 0x81880000 as the PRELOADED_BL33_BASE value.

Both should match to allow TFA to jump to the address where A53 SPL has
been loaded.

Signed-off-by: Anshul Dalal <anshuld@ti.com>
Acked-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2025-11-21 19:25:03 +01:00
Vignesh Raghavendra
767d21e619 doc: board: ti: k3: Update TI firmware repository URL to GitHub
Update the TI firmware repository URL from git.ti.com to the
GitHub mirror at github.com/TexasInstruments/ti-linux-firmware
which is much more reliable.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Reported-by: Tom Rini <trini@konsulko.com>
Tested-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2025-11-21 19:20:04 +01:00
Heinrich Schuchardt
703efbb1a5 CI: test qemu-riscv64_smode[_acpi]
QEMU comes with its own OpenSBI. For running RISC-V virtual machine
using one of qemu-riscv64_smode_defconfig or
qemu-riscv64_smode_acpi_defconfig is the natural choice.

Add the riscv64 smode configurations to the test scope.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2025-11-21 19:18:22 +01:00
Heinrich Schuchardt
27f890611d configs: CONFIG_CONSOLE_RECORD=y on qemu-riscv64_smode_acpi
For testing ACPI on QEMU we need a defconfig that supports acpi command
test.

Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2025-11-21 19:18:22 +01:00
Heinrich Schuchardt
e7eeeeb415 common: default CONFIG_CONSOLE_RECORD_OUT_SIZE=0x6000
For some tests the current default of 0x400 for
CONFIG_CONSOLE_RECORD_OUT_SIZE is too small.

Raise the value to 0x6000 which is already the most common value.

Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2025-11-21 19:18:22 +01:00
Heinrich Schuchardt
1a498e5fb8 test: cmd/fdt: do not use fixed buffer addresses
The location of memory depends on the board. Do not assume memory at fixed
memory locations. Use memalign() instead to allocate a buffer.

Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2025-11-21 19:18:22 +01:00
Heinrich Schuchardt
394c39960e test: common/print: do not use fixed buffer addresses
The location of memory depends on the board. Do not assume memory at fixed
memory locations. Use calloc() instead to allocate buffers.

Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2025-11-21 19:18:22 +01:00
Heinrich Schuchardt
61ca6c5214 test: cmd/bdinfo: consider arch_print_bdinfo() output
On x86 commit 9b35dbc93f ("x86: Show the timestamp counter with bdinfo")
has added another bdinfo output line.

On RISC-V commit 66b5ee9c55 ("riscv: add RISC-V fields to bdinfo
command") implemented arch_print_bdinfo().

Update the bdinfo test accordingly.

Fixes: 9b35dbc93f ("x86: Show the timestamp counter with bdinfo")
Fixes: 66b5ee9c55 ("riscv: add RISC-V fields to bdinfo command")
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2025-11-21 19:18:22 +01:00
Heinrich Schuchardt
1ad68e1822 test: cmd/bdinfo: make no flash assumption
The location and size of flash is device-dependent. Do not make any
assumption about the location and size.

Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2025-11-21 19:18:22 +01:00
Heinrich Schuchardt
797fe74ef7 test: cmd/fdt: do not assume RNG device exists
In fdt_test_chosen() currently we test if DM_RNG is configured.
CONFIG_DM_RNG=y does not imply that a RNG device actually exists.
For instance QEMU may be called with -device virtio-rng-device or not.
The current test framework evicts the virtio RNG device even if QEMU is
called with -device virtio-rng-device.

In the fdt_test_chosen() check if a RNG device exists.
Ignore 'No RNG device' messages.

Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2025-11-21 19:18:22 +01:00
Heinrich Schuchardt
094f71064b test: fdt_test_apply requires CONFIG_OF_LIBFDT_OVERLAY
The `fdt apply` sub-command is only available if CONFIG_OF_LIBFDT_OVERLAY
is enabled.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2025-11-21 19:18:22 +01:00
Zixun LI
ba7721badf mtd: rawnand: atmel: atmel_pmecc_create: Remove unused code
"timing" and "timing_res_idx" are unused and not exist in Linux driver,
let's remove them.

Signed-off-by: Zixun LI <admin@hifiphile.com>
Acked-by: Alexander Dahl <ada@thorsis.com>
Reviewed-by: Eugen Hristev <eugen.hristev@linaro.org>
2025-11-21 10:36:11 +02:00
Zixun LI
ee5053adcb mtd: rawnand: atmel: set pmecc data setup time
Setup the pmecc data setup time as 3 clock cycles for 133MHz as
recommended by the datasheet.

Backported from Linux: f55f552a7c7e0a1 ("mtd: rawnand: atmel: set pmecc
data setup time")

Fixes: a490e1b7c0 ("nand: atmel: Add pmecc driver")

Signed-off-by: Zixun LI <admin@hifiphile.com>
Tested-by: Alexander Dahl <ada@thorsis.com>
Reviewed-by: Eugen Hristev <eugen.hristev@linaro.org>
2025-11-21 10:36:11 +02:00
Tom Rini
2bc0715b55 Merge tag 'u-boot-ufs-20251119' of https://source.denx.de/u-boot/custodians/u-boot-ufs
- Sort again the UFS Kconfig & Makefile
- Use unique name for the rcar-gen5 ufs driver
2025-11-19 09:04:32 -06:00
Tom Rini
05ea0a387f Merge tag 'xilinx-for-v2026.01-rc3' of https://source.denx.de/u-boot/custodians/u-boot-microblaze
CI: https://source.denx.de/u-boot/custodians/u-boot-microblaze/-/pipelines/28413

AMD/Xilinx/FPGA changes for v2026.01-rc3

- Align brcp1 boot.bin location
- Fix MB-V compilation warning when AXI enet is enabled
2025-11-19 08:21:29 -06:00
Tom Rini
942b85636f Merge branch 'u-boot-nand-20250918' of https://source.denx.de/u-boot/custodians/u-boot-nand-flash
CI: https://source.denx.de/u-boot/custodians/u-boot-nand-flash/-/pipelines/28408

This pull request enhances NAND and SPI flash support, primarily
focusing on the Airoha EN7523 platform. The Airoha SPI driver receives
a major update, adding DMA, dual/quad-wire modes, and a critical
workaround to prevent flash damage if the UART_TXD pin shorts to Ground.

New chips supported include FudanMicro FM25S01A SPI-NAND and several
Winbond SPI NOR devices. Fixes include correcting Kconfig dependencies,
updating the mtd benchmark command to use lldiv(), and addressing minor
bugs in the generic spi-mem and SPL NAND code.
2025-11-19 08:15:58 -06:00
Sai Varun Venkatapuram
2e86581d05 net: axi_emac: Fix compilation warnings
Fix compiler warnings about casting integers to pointers of different
sizes by using uintptr_t as intermediate type. This ensures proper
type conversion across 32-bit and 64-bit architectures.

Signed-off-by: Sai Varun Venkatapuram <saivarun.venkatapuram@amd.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/11b1d9b1a5589d06cff724e807832f366794c075.1762510401.git.michal.simek@amd.com
2025-11-19 09:28:50 +01:00
Wolfgang Wallner
8d6f0c787e arm: dts: brcp1: Move SPL partition to offset 0x8000 in SPI flash
The ROM code of Xilinx Zynq searches the boot flash for a "BootROM header"
at increments of 32k (0x8000), beginning with 0x0000 for a
configuration without authentication and beginning with 0x8000
for a configuration with authentication. [1]

Move the offset of the SPL partition on the brcp1 board to 0x8000
so that both cases are the same, e.g. a board that is configured
without authentication can boot an SPL partition with or without
authentication.

[1] Zynq 7000 TRM, section 6.3 "BootROM Code"

Signed-off-by: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/20251029092252.115582-1-wolfgang.wallner@br-automation.com
2025-11-19 09:25:27 +01:00
Sam Protsenko
c2b25f8f66 mailmap: Add entry for Sam Protsenko
Use 'Sam Protsenko' as my name consistently in git-shortlog. Also map my
home email address (which I used at some point) to my current work
email.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
2025-11-18 15:55:01 -06:00
Heinrich Schuchardt
829c2f0220 .mailmap: add Raymond Mao
The Linaro email address is no longer valid.
See commit 4cad9faf8d ("MAINTAINERS: update my email address")

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2025-11-18 15:54:35 -06:00
Quentin Schulz
1c13c9bbb5 lib: optee: forbid OP-TEE OS loading without adding OP-TEE OS reserved-memory nodes
I've spent time trying to figure out why my board (Rockchip PX30-based)
suddenly boot loops when running a specific program in Linux userspace
after working on a U-Boot upgrade. I actually inadvertently had the TEE
environment variable set for a device which doesn't actually need to run
any TEE OS (so had OPTEE_LIB disabled).

It is currently possible to build an image with an OP-TEE OS (via the
TEE environment variable) without OPTEE_LIB. U-Boot will happily load
the TEE OS and the next OS (e.g. the Linux kernel).

This is an issue because on FDT-enabled devices, OP-TEE OS adds nodes to
the reserved-memory FDT node for the memory regions it just reserved for
itself. This updated FDT is then passed to U-Boot proper which should
know better not to use memory from there. The actual issue is that
without OPTEE_LIB and OF_LIBFDT enabled, U-Boot proper will not copy
those nodes over to the next OS's FDT before starting it. This results
in the next OS's (e.g. Linux kernel) to not be aware of reserved memory,
incurring random crashes or device reboots when it tries to access
secure reserved memory area.

On Rockchip, the U-Boot FIT image which contains both the TEE OS and
U-Boot proper is generated by binman. Unfortunately, binman doesn't seem
to have access to Kconfig symbols (grep CONFIG_ doesn't return anything
meaningful and binman is either configured through FDT nodes or via CLI
arguments, c.f. cmd_binman in the root Makefile) so we cannot try to be
smart and guide the user to the correct Kconfig option to select if TEE
is set. We could add a property based on the presence of OPTEE_LIB in
rockchip-u-boot.dtsi for example and have a custom message based on
that, the issue is that I assume all FDT-based platforms do actually
need to do this dance, and not only Rockchip.

Another option could be to add a CLI argument to binman through which
we would pass the state of OPTEE_LIB and error out the build in that
case, but that feels like opening the door to other various dirty hacks.

Another option is to propagate the TEE environment variable to the
preprocessor of the FDT (via dtc_cpp_flags) and then we can do

  #if defined(TEE) && !IS_ENABLED(CONFIG_OPTEE_LIB)
  #error "CONFIG_OPTEE_LIB must be enabled!"
  #endif

but we have the same issue as above, it is then Rockchip-specific and
doesn't feel right to me.

Yet another option is to remove the @tee-SEQ node from the binman FIT
description when OPTEE_LIB isn't set but then we would lose the
following nice message when no TEE is provided:

Image 'simple-bin' is missing optional external blobs but is still functional: tee-os

and even worse, build without any TEE OS even though we could provide
one via the TEE environment variable.

Finally, another option could be to move this hack under
arch/arm/mach-rockchip/Kconfig to make it Rockchip-specific or add a
depends on ARCH_ROCKCHIP. However OP-TEE OS on Aarch32 Rockchip boards
doesn't actually need any of that if SPL_OPTEE_IMAGE is set because
arch/arm/mach-rockchip/sdram.c then marks some hardcoded memory regions
in RAM as holes in DRAM, which has the same effect as reserved memory
regions I guess. I assume other platforms may use something different,
so it may be casting too wide of a net.

This commit is what I could come up with as a stopgap measure to avoid
building images that simply cannot reliably work and fail randomly.

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
2025-11-18 15:54:03 -06:00
Tom Rini
2d226a735e smbios: Fix warning when building with clang
When building with clang, we see warnings such as:
error: field max_size within 'struct smbios_type7' is less aligned than
'union cache_size_word' and is usually due to 'struct smbios_type7'
being packed, which can lead to unaligned accesses
[-Werror,-Wunaligned-access]
when building drivers/sysinfo/smbios.c. Resolve this error by packing
the unions as well after verifying they are complete (16 or 32 bits).

Reviewed-by: Raymond Mao <raymondmaoca@gmail.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
2025-11-18 15:53:39 -06:00
Tom Rini
a70b4f5cae Merge patch series "Fixes for Clang builds for AArch64, improve CROSS_COMPILE handling"
Dmitrii Sharshakov <d3dx12.xx@gmail.com> says:

Initially fix the inconsistency reported in reply to the previous
series and also make sure AArch64 images can be built with latest
Clang versions by guarding AArch32-specific options behind extra
config checks.

Tested qemu_arm_defconfig and qemu_arm64_defconfig with Clang 21,
mainline (to be 22) ce7f9f9c and also Clang 18 (for AArch64 only, as I
have not managed to build an AArch32 image with clang-18).

Link: https://lore.kernel.org/r/20251108-clang-cross-fixes-v1-0-ea6c4282844a@gmail.com
2025-11-18 15:53:18 -06:00
Dmitrii Sharshakov
2ed758fa7e arch: arm: fix AArch64 builds with Clang 21+
Clang is strict with respect to unknown options.

Therefore, only enable AArch32-specific options when CONFIG_ARM64
is not set.

Signed-off-by: Dmitrii Sharshakov <d3dx12.xx@gmail.com>
2025-11-18 15:52:11 -06:00
Dmitrii Sharshakov
91bb236194 build: fix prefix for Clang when CROSS_COMPILE is an absolute path
Clang cross-compilation worked when cross binutils were available
in PATH. However, when binutils are not in the PATH clang failed to
discover the assembler, falling back to host one.

Make --prefix always absolute, Clang supports this and will search for
e.g. $(prefix)-as for assembler. This makes sure user does not have to
add cross binutils to PATH for Clang build.

Fixes build for these examples (with qemu_arm(64)_defconfig):

make CC=clang-21 CROSS_COMPILE=/.../bin/arm-none-eabi-
make CC=clang-20 CROSS_COMPILE=/.../bin/aarch64-linux-gnu-

Also validated for the case when provided with cross toolchain on PATH:

PATH=/.../bin:$PATH make CC=clang-21 CROSS_COMPILE=arm-none-eabi- -j20

This patch does not affect GCC builds, and they have _not_ been
validated against regressions.

Reported-by: Tom Rini <trini@konsulko.com>
Closes: https://lore.kernel.org/u-boot/20251106221355.GZ6688@bill-the-cat/
Signed-off-by: Dmitrii Sharshakov <d3dx12.xx@gmail.com>
2025-11-18 15:52:11 -06:00
Mikhail Kshevetskiy
19548adfe9 spi: airoha: en7523: workaround flash damaging if UART_TXD was short to GND
We found that some serial console may pull TX line to GROUND during board
boot time. Airoha uses TX line as one of it's BOOT pins. This will lead
to booting in RESERVED boot mode.

It was found that some flashes operates incorrectly in RESERVED mode.
Micron and Skyhigh flashes are definitely affected by the issue,
Winbond flashes are NOT affected.

Details:
--------
DMA reading of odd pages on affected flashes operates incorrectly. Page
reading offset (start of the page) on hardware level is replaced by 0x10.
Thus results in incorrect data reading. Usage of UBI make things even
worse. Any attempt to access UBI leads to ubi damaging. As result OS loading
becomes impossible.

Non-DMA reading is OK.

This patch detects booting in reserved mode, turn off DMA and print big
fat warning.

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
2025-11-18 20:07:41 +01:00
Mikhail Kshevetskiy
b49b859ecb spi: airoha: avoid usage of flash specific parameters
The spinand driver do 3 type of dirmap requests:
 * read/write whole flash page without oob
   (offs = 0, len = page_size)
 * read/write whole flash page including oob
   (offs = 0, len = page_size + oob_size)
 * read/write oob area only
   (offs = page_size, len = oob_size)

The trick is:
 * read/write a single "sector"
 * set a custom sector size equal to offs + len. It's a bit safer to
   round up "sector size" value 64.
 * set the transfer length equal to custom sector size

And it works!

Thus we can find all data directly from dirmap request, so flash specific
parameters is not needed anymore. Also
 * airoha_snand_nfi_config(),
 * airoha_snand_nfi_setup()
functions becomes unnecessary.

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
2025-11-18 20:07:41 +01:00
Mikhail Kshevetskiy
269a4d6556 spi: airoha: set custom sector size equal to flash page size
Set custom sector size equal to flash page size including oob. Thus we
will always read a single sector. The maximum custom sector size is
8187, so all possible flash sector sizes are supported.

This patch is a necessary step to avoid usage of flash specific
parameters.

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
2025-11-18 20:07:41 +01:00
Mikhail Kshevetskiy
a0f6931c32 spi: airoha: reduce the number of modification of REG_SPI_NFI_CNFG and REG_SPI_NFI_SECCUS_SIZE registers
This just reduce the number of modification of REG_SPI_NFI_CNFG and
REG_SPI_NFI_SECCUS_SIZE registers during dirmap operation.

This patch is a necessary step to avoid usage of flash specific
parameters.

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
2025-11-18 20:07:41 +01:00
Mikhail Kshevetskiy
ad811a6525 spi: airoha: avoid setting of page/oob sizes in REG_SPI_NFI_PAGEFMT
spi-airoha-snfi uses custom sector size in REG_SPI_NFI_SECCUS_SIZE
register, so setting of page/oob sizes in REG_SPI_NFI_PAGEFMT is not
required.

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
2025-11-18 20:07:41 +01:00
Mikhail Kshevetskiy
00d81bd52b dts: airoha: en7523: enable double speed flash reading
it should work properly after the airoha-snfi driver patches

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
2025-11-18 20:07:41 +01:00
Mikhail Kshevetskiy
2996c2a7a8 spi: airoha: buffer must be 0xff-ed before writing
During writing, the entire flash page (including OOB) will be updated
with the values from the temporary buffer, so we need to fill the
untouched areas of the buffer with 0xff value to prevent accidental
data overwriting.

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
2025-11-18 20:07:41 +01:00
Mikhail Kshevetskiy
531e1fe34b spi: airoha: support of dualio/quadio flash reading commands
Airoha snfi spi controller supports acceleration of DUAL/QUAD
operations, but does not supports DUAL_IO/QUAD_IO operations.
Luckily DUAL/QUAD operations do the same as DUAL_IO/QUAD_IO ones,
so we can issue corresponding DUAL/QUAD operation instead of
DUAL_IO/QUAD_IO one.

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
2025-11-18 20:07:41 +01:00
Mikhail Kshevetskiy
8bd05b632a spi: airoha: return an error for continuous mode dirmap creation cases
This driver can accelerate single page operations only, thus
continuous reading mode should not be used.

Continuous reading will use sizes up to the size of one erase block.
This size is much larger than the size of single flash page. Use this
difference to identify continuous reading and return an error.

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
2025-11-18 20:07:41 +01:00
Mikhail Kshevetskiy
a7c3319bc0 spi: airoha: add dma support
This patch speed up cache reading/writing/updating opearions.
It was tested on en7523/an7581 and some other Airoha chips.

It will speed up
 * page reading/writing without oob
 * page reading/writing with oob
 * oob reading/writing (significant for UBI scanning)

The only know issue appears in a very specific conditions for en7523 family
chips only.

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
2025-11-18 20:07:41 +01:00
Mikhail Kshevetskiy
ba04299ff7 spi: airoha: add support of dual/quad wires spi modes to exec_op() handler
Booting without this patch and disabled dirmap support results in

[    2.980719] spi-nand spi0.0: Micron SPI NAND was found.
[    2.986040] spi-nand spi0.0: 256 MiB, block size: 128 KiB, page size: 2048, OOB size: 128
[    2.994709] 2 fixed-partitions partitions found on MTD device spi0.0
[    3.001075] Creating 2 MTD partitions on "spi0.0":
[    3.005862] 0x000000000000-0x000000020000 : "bl2"
[    3.011272] 0x000000020000-0x000010000000 : "ubi"
...
[    6.195594] ubi0: attaching mtd1
[   13.338398] ubi0: scanning is finished
[   13.342188] ubi0 error: ubi_read_volume_table: the layout volume was not found
[   13.349784] ubi0 error: ubi_attach_mtd_dev: failed to attach mtd1, error -22
[   13.356897] UBI error: cannot attach mtd1

If dirmap is disabled or not supported in the spi driver, the dirmap requests
will be executed via exec_op() handler. Thus, if the hardware supports
dual/quad spi modes, then corresponding requests will be sent to exec_op()
handler. Current driver does not support such requests, so error is arrised.
As result the flash can't be read/write.

This patch adds support of dual and quad wires spi modes to exec_op() handler.

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
2025-11-18 20:07:41 +01:00
Mikhail Kshevetskiy
ba54a70f5c spi: airoha: remove unnecessary operation adjust_op_size
This operation is not needed because airoha_snand_write_data() and
airoha_snand_read_data() will properly handle data transfers above
SPI_MAX_TRANSFER_SIZE.

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
2025-11-18 20:07:41 +01:00
Mikhail Kshevetskiy
c3c758c20d spi: spi-mem: fix coverity report CID 537478
Coverity finds a potential integer overflow in the following code:

  ncycles += ((op->data.nbytes * 8) / op->data.buswidth) / (op->data.dtr ? 2 : 1);

A quick analysis shows that the only caller of the suspicious code is the
spinand_select_op_variant() function from the drivers/mtd/nand/spi/core.c
file.

According to the code the value of op->data.nbytes is equal to

  nanddev_per_page_oobsize(nand) + nanddev_page_size(nand)

Therefore it's maximum value a bit larger than 4Kb (I never seen flashes
with page size large than 4Kb). So op->data.nbytes always fits within
13 bits. As result an overflow will never happen.

Anyway it's better fix an issue to eliminate the error message.

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
2025-11-18 20:07:41 +01:00
Tom Rini
c675162bcb mtd: nand: raw: Drop SYS_NAND_SOFT_ECC from NAND_SANDBOX
This option is only meaningful within the davinci nand driver, so drop
the statement here (which had no effect).

Signed-off-by: Tom Rini <trini@konsulko.com>
2025-11-18 20:07:41 +01:00
Tianling Shen
8b984b5a39 mtd: spinand: add support for FudanMicro FM25S01A
Add support for FudanMicro FM25S01A SPI NAND.

This driver is ported from linux v6.18 and tested on a MT7981 board.

Link: https://lore.kernel.org/linux-mtd/20250824170013.3328777-1-cnsztl@gmail.com/
Reviewed-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
Signed-off-by: Tianling Shen <cnsztl@gmail.com>
2025-11-18 20:07:41 +01:00
Heinrich Schuchardt
bd763a4483 spl: nand: typo 'destintion'
%s/destintion/destination/

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2025-11-18 20:07:41 +01:00
Mikhail Kshevetskiy
5572d94100 cmd: mtd: benchmark: use lldiv() instead of 64-bit division
As was noted by Heinrich Schuchardt, some SoCs may not support 64-bit
divisions. Fix an issue by using lldiv() instead.

The code assumes that the benchmark never takes more than 4294 seconds
and thus the difference will be less than U32_MAX.

Also replace (speed / 1024) by (speed >> 10) to avoid potential 64-bit
division.

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
2025-11-18 20:06:21 +01:00
Tom Rini
75153d92a5 nand: raw: Kconfig: Correct some dependency issues
The hidden symbol SPL_SYS_NAND_SELF_INIT was not being used correctly
leading to Kconfig dependency issues seen with "make allyesconfig". As
it's a select'd symbol we don't need to have a depends line on it, and
then in turn we need to also update the logic on SYS_NAND_PAGE_SIZE and
SYS_NAND_OOBSIZE.

Signed-off-by: Tom Rini <trini@konsulko.com>
2025-11-18 20:06:17 +01:00
Miquel Raynal
78dafa8e9e mtd: spinor: winbond: Describe several chips
All these chips are dual and quad capable. They are also DTR capable,
but the core is not yet ready for that.

Performances of all chips are comparable at 30MHz and are as follow:
Eraseblock single read speed: 938kiB/s
Eraseblock dual read speed:  1068kiB/s
Eraseblock quad read speed:  3751kiB/s

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
2025-11-18 20:05:59 +01:00
Tom Rini
91861e5a30 Merge tag 'u-boot-stm32-20251117' of https://source.denx.de/u-boot/custodians/u-boot-stm
CI: https://source.denx.de/u-boot/custodians/u-boot-stm/-/pipelines/28392

dhelectronics:
  - Move dh_add_item_number_and_serial_to_env() to common code
  - Read values from M24256 write-lockable page on STM32MP13xx DHCOR
  - Add MAC address readout from fuses on DH STM32MP1 DHSOM
  - Keep the reg11 and reg18 regulators always enabled on STM32MP13xx DHCOR.
  - Fix boot for stm32mp15xx-dhsom.
  - Fix build of ST DFU virt code on DH STM32MP1 DHSOM
  - Introduce DH STM32MP13x target.

STM32MP2:
  - Add support for stm32mp257-dk board.
  - Fix arm, smc-id value for stm32mp23/25.
  - Fix stm32mp235f-dk boot (add syscon compatible, add txbyteclk).
  - Add display support:
    - Introduce LVDS driver.
    - Add LTDC support.
  -  Add Ethernet support for stm32mp255.

STM32MP13:
  - Add ADC support.
  - Add power check for stm32mp135f-dk board.
2025-11-17 10:45:11 -06:00
Marek Vasut
96b66742a9 ARM: stm32: Add MAC address readout from fuses on DH STM32MP1 DHSOM
Add support for reading out the MAC address from SoC fuses on DH STM32MP1 DHSOM.
The DH STM32MP1 DHSOM may contain external ethernet MACs, which benefit from the
MAC address stored in SoC fuses as well, handle those consistently. This however
means the architecture setup_mac_address() cannot be used and instead a simpler
local fuse read out is implemented in the board file.

Signed-off-by: Marek Vasut <marek.vasut@mailbox.org>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2025-11-17 10:45:11 -06:00
Marek Vasut
f37f0dc8e9 ARM: stm32: Read values from M24256 write-lockable page on STM32MP13xx DHCOR
The STM32MP13xx DHCOR SoM is populated with M24256 EEPROM that contains
an additional write-lockable page called ID page, which is populated with
a structure containing ethernet MAC addresses, DH item number and DH serial
number.

Read out the MAC address from the WL page between higher priority SoC fuses
and lower priority plain EEPROM storage area. Read out the DH item and serial
numbers and set environment variables accordingly.

Signed-off-by: Marek Vasut <marek.vasut@mailbox.org>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2025-11-17 10:45:11 -06:00
Marek Vasut
c5c5d8a4f8 board: dhelectronics: Move dh_add_item_number_and_serial_to_env() to common code
Move dh_add_item_number_and_serial_to_env() to common code, so it
can be used by both STM32MP13xx and iMX8MP DHSOM. No functional
change.

Signed-off-by: Marek Vasut <marek.vasut@mailbox.org>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2025-11-17 10:45:11 -06:00
Marek Vasut
da9e7637df ARM: stm32: Add missing build of ST DFU virt code on DH STM32MP1 DHSOM
Commit 6d91f0a3a1 ("board: st: common: cleanup dfu support") split
the vendor-specific DFU implementation into two files, but failed to
update other non-ST boards. This did not lead to noticeable breakage
with plain simple dfu-util, but it makes the ST proprietary programmer
CLI tool end in an infinite loop. Update the Makefile accordingly to
allow even that kind of tooling to work.

Fixes: 6d91f0a3a1 ("board: st: common: cleanup dfu support")
Signed-off-by: Marek Vasut <marek.vasut@mailbox.org>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2025-11-17 10:45:00 -06:00
Marek Vasut
f65ca70193 ARM: dts: stm32: Introduce DH STM32MP13x target
Split the DH STM32MP13x based boards from ST STM32MP13x target,
this way the DH board specific code can be reused for STM32MP13x
DHSOM.

Signed-off-by: Marek Vasut <marek.vasut@mailbox.org>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2025-11-17 10:44:22 -06:00
Marek Vasut
68430f102d ARM: dts: stm32: Keep the reg11 and reg18 regulators always enabled on STM32MP13xx DHCOR
Do not disable reg11 and reg18, disabling these regulators causes
the SoC to hang.

Signed-off-by: Marek Vasut <marek.vasut@mailbox.org>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2025-11-17 10:44:21 -06:00
Marek Vasut
9853527d6c ARM: dts: stm32: Fix STM32MP15xx DHSOM boot breakage due to ETZPC
Switch etzpc bus to simple-bus to prevent breakage on non-TFA systems.
This fixes boot of every STM32MP15xx DHSOM device.

Fixes: ad3cdc677d ("ARM: stm32mp: add ETZPC system bus driver for STM32MP1")
Signed-off-by: Marek Vasut <marek.vasut@mailbox.org>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2025-11-17 10:44:20 -06:00
Asadeds
16da035641 arm: stm32mp25: add ethernet support for stm32mp255 series
Add missing CPU_STM32MP255* cases in get_eth_nb() so that U-Boot
correctly reports 2 Ethernet interfaces on stm32mp255 devices.
This fixes the "ethernet not found" error during boot.

Signed-off-by: Md Asadullah <md.asadullah@eds-india.com>
2025-11-17 10:44:19 -06:00
Raphael Gallais-Pou
8876396fc7 configs: stm32mp25: enable LVDS display support
Compile VIDEO_STM32 and VIDEO_STM32_LVDS by default.

Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Signed-off-by: Raphael Gallais-Pou <raphael.gallais-pou@foss.st.com>
Acked-by: Yannick Fertre <yannick.fertre@foss.st.com>
2025-11-17 10:43:57 -06:00
Raphael Gallais-Pou
35be946147 video: stm32: ltdc: properly search the first available panel
Initially there was only one DSI bridge with one panel attached to this
device. This explained the call to uclass_first_device_err(UCLASS_PANEL,
...) which worked fine at the time.

Now that multiple bridges and panels, with different technologies, can
be plugged onto the board this way to get the panel device is outdated.

The lookup is done is two steps. First we circle through the
UCLASS_VIDEO_BRIDGE, and once we get one, we search through its
endpoints until we get a UCLASS_PANEL device available.

Acked-by: Yannick Fertre <yannick.fertre@foss.st.com>
Signed-off-by: Raphael Gallais-Pou <raphael.gallais-pou@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2025-11-17 10:43:52 -06:00
Raphael Gallais-Pou
b3316f6053 video: stm32: ltdc: support new hardware version for STM32MP25 SoC
STM32MP2 SoCs feature a new version of the LTDC IP.  This new version
features a bus clock, as well as a 150MHz pad frequency.  Add its
compatible to the list of device to probe and handle quirks.  The new
hardware version features a bus clock.

Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Acked-by: Yannick Fertre <yannick.fertre@foss.st.com>
Signed-off-by: Raphael Gallais-Pou <raphael.gallais-pou@foss.st.com>
2025-11-17 10:43:43 -06:00
Raphael Gallais-Pou
16cfbbbe2b video: stm32: STM32 driver support for LVDS
The LVDS Display Interface Transmitter handles the LVDS protocol:
it maps the pixels received from the upstream Pixel-DMA (LTDC)
onto the LVDS PHY.

The LVDS controller driver supports the following high-level features:
        • FDP-Link-I and OpenLDI (v0.95) protocols
        • Single-Link or Dual-Link operation
        • Single-Display or Double-Display (with the same content
          duplicated on both)
        • Flexible Bit-Mapping, including JEIDA and VESA
        • RGB888 or RGB666 output
        • Synchronous design, with one input pixel per clock cycle
        • No resolution limitation.

Acked-by: Yannick Fertre <yannick.fertre@foss.st.com>
Signed-off-by: Raphael Gallais-Pou <raphael.gallais-pou@foss.st.com>
2025-11-17 10:43:40 -06:00
Raphael Gallais-Pou
a58312b3c2 video: simple_panel: add support for "panel-lvds" display
Add the compatible "panel-lvds" for simple-panel driver in U-Boot.  In
Linux this compatible is managed by the driver
drivers/gpu/drm/panel/panel-lvds.c but in U-Boot the specific LVDS
features (bus_format/bus_flags) are not supported.

Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Yannick Fertre <yannick.fertre@foss.st.com>
Signed-off-by: Raphael Gallais-Pou <raphael.gallais-pou@foss.st.com>
2025-11-17 10:43:36 -06:00
Raphael Gallais-Pou
1a7ea0280e ofnode: support panel-timings in ofnode_decode_display_timing
The "Display Timings" in panel-common.yaml can be provided by 2 properties
- panel-timing: when display panels are restricted to a single resolution
                the "panel-timing" node expresses the required timings.
- display-timings: several resolutions with different timings are supported
                   with several timing subnode of "display-timings" node

This patch update the parsing function to handle this 2 possibility
when index = 0.

Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Yannick Fertre <yannick.fertre@foss.st.com>
Signed-off-by: Raphael Gallais-Pou <raphael.gallais-pou@foss.st.com>
2025-11-17 10:43:26 -06:00
Patrice Chotard
75defb7fbf ARM: dts: Add st, adc_usb_pd property for stm32mp135-dk-u-boot
Add st,adc_usb_pd property in /config node for stm32mp135-dk-u-boot.
This needed to check board USB power delivery.

Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2025-11-17 10:43:25 -06:00
Patrice Chotard
371baac357 configs: stm32: Enable ADC support for stm32mp13_defconfig
Enable STM_ADC and CM_ADC for stm32mp13_defconfig

Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2025-11-17 10:43:24 -06:00
Olivier Moysan
58d718b111 adc: stm32mp13: add support of adc to stm32mp13
Add support of STM32 ADCs to STM32MP13x. This patch introduces
stm32_adc_regspec structure, as this is already done in kernel
driver, to manage smartly the differences in register set
between STMP32MP15 and STM32MP13 ADCs.

Signed-off-by: Olivier Moysan <olivier.moysan@foss.st.com>
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2025-11-17 10:43:21 -06:00
Patrice Chotard
87b0ab0365 stm32mp: Add stm32mp23 support for syscon driver
Add "st,stm32mp23-syscfg" compatible.

Fixes: fdd30ee308 ("ARM: stm32mp: Add STM32MP23 support")

Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2025-11-17 10:43:20 -06:00
Patrice Chotard
3192a7eb0e ARM: dts: Add txbyteclk clock in stm32mp235f-dk-u-boot.dtsi
Add txbyteclk to avoid error during clock registration.

Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2025-11-17 10:43:20 -06:00
Patrice Chotard
64b115d8f1 ARM: dts: Fix "arm, smc-id" value for stm32mp25-u-boot.dtsi
OP-TEE "arm,smc-id" is equal to 0xbc000000 but kernel DT has been
upstream with an incorrect value.
Fix it temporarily until kernel DT is fixed.

Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2025-11-17 10:43:19 -06:00
Patrice Chotard
125b3c8b6d ARM: dts: Fix "arm, smc-id" value for stm32mp23-u-boot.dtsi
OP-TEE "arm,smc-id" is equal to 0xbc000000 but kernel DT has been
upstream with an incorrect value.
Fix it temporarily until kernel DT is fixed.

Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2025-11-17 10:43:18 -06:00
Patrice Chotard
c4097ec6a9 ARM: dts: Add stm32mp257f-dk-u-boot.dtsi
Add U-Boot support for stm32mp257f-dk board.

Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2025-11-17 10:43:16 -06:00
Tom Rini
d4f80bddc5 ufs: rcar-gen5: Use a unique U_BOOT_DRIVER name
All instances of U_BOOT_DRIVER must be unique or we will have link time
failures. It is possible to enable both ufs-renesas-rcar.c and
ufs-renesas-rcar-gen5.c at the same time, so give
ufs-renesas-rcar-gen5.c a new unique U_BOOT_DRIVER name.

Fixes: 3351fe7ecc ("ufs: Add UFS driver for Renesas R-Car X5H")
Signed-off-by: Tom Rini <trini@konsulko.com>
Acked-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Link: https://patch.msgid.link/20251112211841.1428696-1-trini@konsulko.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2025-11-17 10:28:45 +01:00
Marek Vasut
65c843ebe5 ufs: Keep Makefile and Kconfig sorted one more time
Sort the Makefile and Kconfig alphabetically again. No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Igor Belwon <igor.belwon@mentallysanemainliners.org>
Link: https://patch.msgid.link/20251029201435.215966-1-marek.vasut+renesas@mailbox.org
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2025-11-17 10:27:06 +01:00
Tom Rini
69cc92d686 Merge tag 'efi-2026-01-rc3' of https://source.denx.de/u-boot/custodians/u-boot-efi
Pull request efi-2026-01-rc3

CI:

* https://source.denx.de/u-boot/custodians/u-boot-efi/-/pipelines/28355

Documentation:

* Correct the linux/arm64 platform string for Docker builds
* Complete pytest dependencies list with missing packages

UEFI:

* Use Sphinx style comments in efi_selftest_console.c
* Don't include asm/global_data.h in lib/efi_client/efi_app.c twice
* efi_client: correct memset() return value
* Assure fitImage from capsule is used from 8-byte aligned address
* Fix warning when building efi_selftest_snp with clang
2025-11-15 08:05:45 -06:00
Tom Rini
55d60ef1c9 Merge tag 'i2c-updates-for-2026.01-rc3' of https://source.denx.de/u-boot/custodians/u-boot-i2c
I2C updates for 2026.01-rc3

- i2c: mux: declare staic functions where posible
  from Michal
2025-11-15 08:03:39 -06:00
Marek Vasut
8cc144227e efi_loader: Assure fitImage from capsule is used from 8-byte aligned address
The fitImage may be stored in EFI update capsule at address that
is not aligned to 8 bytes. Since fitImage is a DT, new version of
libfdt 1.7.2 rejects such an unaligned DT. Patch the code and copy
the fitImage into aligned buffer in case it is not aligned. This
does increase overhead for unaligned fitImages in EFI capsules, but
tries to keep the overhead low for aligned ones.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2025-11-15 11:50:42 +01:00
Tom Rini
b8f2614eca efi_selftest: efi_selftest_snp: Fix warning when building with clang
When building with clang, we see a warning:
lib/efi_selftest/efi_selftest_snp.c:63:18: error: field dhcp_hdr within
'struct dhcp' is less aligned than 'struct dhcp_hdr' and is usually due
to 'struct dhcp' being packed, which can lead to unaligned accesses
[-Werror,-Wunaligned-access]
when building lib/efi_selftest/efi_selftest_snp.c. Resolve this error by
packing struct dhcp_hdr as well, as the only place it is used also is
packed.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2025-11-15 11:45:29 +01:00
Bin Meng
e0adf4c5a4 docker: Correct the linux/arm64 platform string
The Dockerfile is using linux/arm64 without the /v8 suffix.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2025-11-15 11:43:45 +01:00
Heinrich Schuchardt
ea99509b67 efi_client: correct memset() return value
Memset() must return a pointer to the start of the updated memory block.

Fixes: 476476e73b ("efi: Add support for loading U-Boot through an EFI stub")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2025-11-15 11:36:50 +01:00
Heinrich Schuchardt
033780768e efi_client: don't include asm/global_data.h twice
Remove duplicate #include.

Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2025-11-15 11:36:33 +01:00
Heinrich Schuchardt
479ba0cc4d efi_loader: typo 'eventfor' in efi_ipconfig.c
%s/eventfor/event for/

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2025-11-15 11:36:22 +01:00
Heinrich Schuchardt
691eab09df efi_selftest: use Sphinx style comments in efi_console.c
Convert function comments in efi_selftest_console.c to match
Sphinx style.

Correct function name in print_uuid() comment.

Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2025-11-15 11:36:08 +01:00
Kory Maincent (TI.com)
a557c50977 doc: pytest: Complete dependencies list with missing packages
Add missing dependencies to the pytest usage documentation and correct
the device tree compiler package name from 'dtc' to 'device-tree-compiler'.

This ensures users have the complete list of dependencies needed to run
the pytest test suite without errors.

Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
Signed-off-by: Kory Maincent (TI.com) <kory.maincent@bootlin.com>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2025-11-15 11:34:38 +01:00
Michal Simek
107d5f340b i2c: muxes: i2c_mux_select/deselect() should be static
i2c_mux_select/deselect() are not called out of i2c-mux-uclass.c that's why
they should be static.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Reviewed-by: Heiko Schocher <hs@nabladev.com>
2025-11-15 07:37:25 +01:00
Tom Rini
1a255d6620 Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sh
- R-Car Gen4 pinctrl alignment with latest reference manual.
2025-11-13 19:23:31 -06:00
Geert Uytterhoeven
f71eea7f85 pinctrl: renesas: r8a779h0: Remove STPWT_EXTFXR
Rev.0.81 of the R-Car V4M Series Hardware User’s Manual removed the
"STPWT_EXTFXR" signal from the pin control register tables.  As this is
further unused in the pin control driver, it can be removed safely.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2025-11-13 16:30:26 +01:00
Huy Bui
c2583a837e pinctrl: renesas: r8a779h0: Remove CC5_OSCOUT
Rev.0.71 of the R-Car V4M Series Hardware User’s Manual removed the
"CC5_OSCOUT" signal from the pin control register tables.  As this is
further unused in the pin control driver, it can be removed safely.

Signed-off-by: Huy Bui <huy.bui.wm@renesas.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2025-11-13 16:30:26 +01:00
Huy Bui
51205a6e39 pinctrl: renesas: r8a779g0: Remove STPWT_EXTFXR
Rev.1.30 of the R-Car V4H Series Hardware User’s Manual removed the
"STPWT_EXTFXR" signal from the pin control register tables.  As this is
further unused in the pin control driver, it can be removed safely.

Signed-off-by: Huy Bui <huy.bui.wm@renesas.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2025-11-13 16:30:26 +01:00
Huy Bui
5a616724f0 pinctrl: renesas: r8a779g0: Remove CC5_OSCOUT
Rev.1.30 of the R-Car V4H Series Hardware User’s Manual removed the
"CC5_OSCOUT" signal from the pin control register tables.  As this is
further unused in the pin control driver, it can be removed safely.

Signed-off-by: Huy Bui <huy.bui.wm@renesas.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2025-11-13 16:30:26 +01:00
Thanh Quan
f261367462 pinctrl: renesas: r8a779g0: Remove AVB[01]_MII
Rev.1.30 of the R-Car V4H Series Hardware User’s Manual removed the
"AVB[01]_MII_*" signals from the pin control register tables.  As these
are further unused in the pin control driver, they can be removed
safely.

Signed-off-by: Thanh Quan <thanh.quan.xn@renesas.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2025-11-13 16:30:26 +01:00
Tom Rini
6c2f2d9aa6 Merge branch 'master' of git://source.denx.de/u-boot-usb
- Remove some legacy code and tighten Kconfig dependencies.
2025-11-13 08:01:57 -06:00
Tom Rini
70c3b4c318 usb: gadget: Tighten CI_UDC dependencies
This driver cannot build when DM_USB_GADGET is enabled as both options
control building of files that use the same global namespace and
functionality. In this case make CI_UDC depend on DM_USB_GADGET being
disabled as non-DM support is the legacy choice.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
2025-11-12 22:13:03 +01:00
Tom Rini
4ea93faceb usb: host: xhci: Make U_BOOT_DRIVER entries unique
All instances of the U_BOOT_DRIVER must use a unique name or they will
lead to link time failures due to name space conflicts when both are
present. Most of the XHCI drivers follow pattern of xhci_xxx in their
name, but a few used "usb_xhci". Change these to follow the pattern of
the rest of the XHCI glue drivers.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
2025-11-12 22:13:03 +01:00
Tom Rini
91b9659273 usb: gadget: Tighten the dependency for DWC2 OTG support
The DWC2 OTG driver depends on an ARM-specific header file to compile,
so make it depend on ARM.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
2025-11-12 22:13:03 +01:00
Peter Robinson
fa9864f1c4 usb: musb: drop musb legacy drivers
The last of the users of the legacy musb drivers have been
migrated so now remove the old musb stack, all users should
now be using the new musb stack if they need this functionality.

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
[trini: Remove a Makefile reference that was missed in v1]
Signed-off-by: Tom Rini <trini@konsulko.com>
2025-11-12 22:13:03 +01:00
Peter Robinson
c8e93255f6 omap3: evm: Drop old musb omap3 driver
The USB_OMAP3 driver was (re)added in commit e74e9f620a as part
of migrating to DM_USB but the config already had MUSB_OMAP2PLUS
which is the newer musb driver and what other omap3 devices use.
So drop it so we can drop the old driver.

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
2025-11-12 22:13:03 +01:00
Tom Rini
3b0945fb7b usb: gadget: spl: Add missing dependency for SPL_USB_GADGET
It makes no sense to ask about nor enable SPL_USB_GADGET without
SPL_FRAMEWORK being enabled. Attempting to do so leads to Kconfig noting
dependency issues. Add the missing dependency.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
2025-11-12 22:13:03 +01:00
Kaustabh Chakraborty
1ca7bcdb9d soc: exynos-pmu: add support for Exynos7 PMU
Add the compatible string of Exynos7's PMU as defined in upstream
dt-schema. This also supports derivative PMUs as defined in schema.
There's no additional setup required here, so pmu_init is skipped.

Signed-off-by: Kaustabh Chakraborty <kauschluss@disroot.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2025-11-12 13:59:08 +09:00
Kaustabh Chakraborty
0bdc54e8df serial: s5p: add compatible for exynos8895
Add the compatible for Exynos8895 UART as described in upstream
devicetree bindings. This enables support for Exynos8895 and other
similar UART devices, such as Exynos7870. Other than that, the driver
works as-is.

Signed-off-by: Kaustabh Chakraborty <kauschluss@disroot.org>
Reviewed-by: Henrik Grimler <henrik@grimler.se>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2025-11-12 13:58:36 +09:00
Kaustabh Chakraborty
9145d93c59 pinctrl: exynos78x0: add proper support for exynos7870 pinctrl
The pinctrl blocks for Exynos7870 and Exynos7880 are similar, however in
Exynos7870, the CCORE block is actually referred to as MIF. Since
ordering happens lexically, it isn't directly compatible with
samsung,exynos78x0-pinctrl.

Signed-off-by: Kaustabh Chakraborty <kauschluss@disroot.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2025-11-12 13:57:51 +09:00
Kaustabh Chakraborty
b526ec6f3c pinctrl: exynos: bind GPIO driver along with pinctrl
The devicetree of Samsung devices typically have the pin controller and
GPIO bank descriptors under the same pinctrl node. In U-Boot, these are
handled by two separate drivers. It is not possible to invoke both
drivers from a single node compatible.

Bind the GPIO driver on pinctrl driver bind, with the same OF node as
the pinctrl driver. This solution is already being used in other pinctrl
drivers. The hierarchy, as represented in `dm tree`, is as follows:

  pinctrl@13750000
  |-- gpio-banks
  |   |-- gpr0-gpio-bank
  |   |-- gpr1-gpio-bank
  |   |-- gpr2-gpio-bank
  |   |-- gpr3-gpio-bank
  |   `-- gpr4-gpio-bank
  |-- sd0-bus-width1-pins
  |-- sd0-bus-width4-pins
  |-- sd0-bus-width8-pins
  `-- sd0-clk-pins

Since a bind function doesn't exist, create and add it to all pinctrl
drivers.

Signed-off-by: Kaustabh Chakraborty <kauschluss@disroot.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2025-11-12 13:57:51 +09:00
Kaustabh Chakraborty
07b8261d48 clk: use private clk struct to access clock flags
There may be cases where the flags set for a clock is not available.
This is usually the case with clocks which have been retrieved using
clk_request(). However, clock flags are found in their respective
private clock struct, so use that instead.

Signed-off-by: Kaustabh Chakraborty <kauschluss@disroot.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2025-11-12 13:56:12 +09:00
Kaustabh Chakraborty
67fea5775b clk: exynos: add support for Exynos7870 CMU
Introduce a simple clock driver for Exynos7870's CMU blocks, more
specifically, CMU_MIF, CMU_FSYS, and CMU_PERI banks. This should be
enough to serve U-Boot's minimal requirements.

Signed-off-by: Kaustabh Chakraborty <kauschluss@disroot.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2025-11-12 13:56:12 +09:00
Kaustabh Chakraborty
4bee54fbfa clk: exynos: add function for Samsung CMU ops->request
The request function performs a simple check if the clock with the
provided ID is present or not. This is done with a simple call to
clk_get_by_id(). A non-zero return value indicates that the requested
clock is not available.

In some cases, clk->dev points to the clock bank device instead of
the clock device. This pointer is therefore overwritten in order to
reference to the correct device instance.

Signed-off-by: Kaustabh Chakraborty <kauschluss@disroot.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2025-11-12 13:56:12 +09:00
Kaustabh Chakraborty
526a257fdb clk: exynos: add support for PLL1417X
PLL1417X seem to be compatible with PLL0822X, as also seen in the
respective Linux kernel driver. Add an enum entry for the type, while
merely being an alias for PLL0822X.

Signed-off-by: Kaustabh Chakraborty <kauschluss@disroot.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2025-11-12 13:56:12 +09:00
Kaustabh Chakraborty
b006e40963 clk: exynos: add support for fixed rate and fixed factor clocks
Add register functions for fixed rate and fixed factor clock drivers.
The vendor-specific structs defined are borrowed from the CCF driver
found in the Linux kernel.

Signed-off-by: Kaustabh Chakraborty <kauschluss@disroot.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2025-11-12 13:56:12 +09:00
Kaustabh Chakraborty
2a07137641 clk: exynos: provide device pointer to clk_register_* functions
The device pointer set as NULL causes problems when clock banks depend
on clocks from another clock bank. In such case, the appropriate clock
needs to be resolved from OF phandle arguments, which is not possible if
the associated device is not provided. Make necessary changes to make
the correct device pointer available.

Signed-off-by: Kaustabh Chakraborty <kauschluss@disroot.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
2025-11-12 13:56:12 +09:00
Tom Rini
caa740df9c Gitlab: Optimize the job dependency list more
In general, we want to fail the whole pipeline as soon as we can if we
spot an error while also letting bigger jobs get started as soon as
possible. Currently we use the "Run binman, buildman, dtoc, Kconfig and
patman testsuites" job from the testsuite stage to unblock the next
stage as this test is complex enough that if it passes, likely the whole
stager will pass. Using this same logic, unblock the world build (and
sjg-lab) stages if "sandbox test.py" has completed as if there's no
failures here, there's likely not failures in the rest of the test.py
stages.

Signed-off-by: Tom Rini <trini@konsulko.com>
2025-11-11 11:55:16 -06:00
Tom Rini
363ef8e491 Gitlab: Prefix more of the sjg lab with "sjg"
In preparation for adding more labs to CI, prefix more of the sjg lab
components with "sjg".

Signed-off-by: Tom Rini <trini@konsulko.com>
2025-11-11 11:55:12 -06:00
Heinrich Schuchardt
307b0f03b9 dm: typo programmaticaly
%s/programmaticaly/programmatically/

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2025-11-11 11:55:02 -06:00
Marek Vasut
aa99fc54ed ARM: Fix HAS_ARMV7_SECURE_BASE help text
Drop the 'a' from 'ahardware', no functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2025-11-11 11:54:56 -06:00
Yegor Yefremov
21181beb7e .gitignore: ignore more files generated for the sandbox
Change the existing regex "/capsule.*.efi-capsule" to
also ignore the following files when building the sandbox:

capsule_in.capsule1.efi-capsule
capsule_in.capsule10.efi-capsule
capsule_in.capsule11.efi-capsule
capsule_in.capsule2.efi-capsule
capsule_in.capsule3.efi-capsule
capsule_in.capsule4.efi-capsule
capsule_in.capsule5.efi-capsule
capsule_in.capsule6.efi-capsule
capsule_in.capsule7.efi-capsule
capsule_in.capsule8.efi-capsule
capsule_in.capsule9.efi-capsule

As test/overlay folder was renamed to test/fdt_overlay,
fix the related ignore entries:

test/fdt_overlay/test-fdt-overlay-stacked.dtbo.S
test/fdt_overlay/test-fdt-overlay.dtbo.S

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
2025-11-11 11:54:51 -06:00
Bin Meng
c6e8befd4b scsi: Fix the name string memory leak during scsi scan
There is a memory leak during the scsi scan process due to the
strdup'ed name string is never freed. Actually it is unnecessary
to pass a strdup'ed name string to blk_create_devicef() as we can
use the name string on the stack directly.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2025-11-11 11:54:48 -06:00
Yegor Yefremov
749ec88604 gpio: OMAP: add dependency to TI_SYSC
OMAP GPIO driver needs TI_SYSC to initialize its clocks when
using a devicetree-based setup.

Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
2025-11-11 11:54:45 -06:00
Kory Maincent (TI.com)
664cdc5fd5 qfw: Fix segfault from uninitialized variables in sandbox
There are cases where qfw_read_entry() does not set the output parameter
passed by address. This occurs with qfw_sandbox_read_entry_dma, which
leaves the size variables uninitialized and causes a segfault when running
bootflow scan in U-Boot sandbox.

$ ./u-boot
...
U-Boot 2026.01-rc1-00199-gc2637036b8f0 (Nov 04 2025 - 10:32:21 +0100)
...
Hit any key to stop autoboot: 0
=> bootflow scan
     efi_var_to_file() Cannot persist EFI variables without system partition
   efi_tcg2_register() Missing TPMv2 device for EFI_TCG_PROTOCOL
    efi_rng_register() Missing RNG device for EFI_RNG_PROTOCOL
scanning bus for devices...
[3]    1015761 segmentation fault (core dumped)  ./u-boot

Initalize all these variables to 0 to fix this issue.

Signed-off-by: Kory Maincent (TI.com) <kory.maincent@bootlin.com>
2025-11-11 11:54:42 -06:00
Tom Rini
c7e33aae35 Merge tag 'scmi-master-2025-11-11' of https://source.denx.de/u-boot/custodians/u-boot-fsl-qoriq
CI: https://source.denx.de/u-boot/custodians/u-boot-fsl-qoriq/-/pipelines/28272

- Support scmi v3.2 CONFIG_SET for clock protocol
- A patchset from Marek to optimize the scmi clk booting time
- Fix scmi clk set_parent in non-CCF case
- Drop mmu_set_region_dcache_behaviour in firmware scmi
2025-11-10 21:52:28 -06:00
Marek Vasut
3547e315c1 clk: scmi: Defer issue of SCMI_CLOCK_ATTRIBUTES
Instead of resolving clock control flags using SCMI_CLOCK_ATTRIBUTES
during probe for each and every clock, resolve the clock control
flags using SCMI_CLOCK_ATTRIBUTES when the clock control flags are
first used. Because most clock are never used by U-Boot, this allows
reducing the amount of SCMI_CLOCK_ATTRIBUTES considerably, and this
improve probe time of the scmi clock driver and U-Boot start up time.

On Renesas X5H, with 1700+ SCMI clock, the boot time improved by 1.7s .

Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2025-11-10 20:57:49 +08:00
Marek Vasut
fdb1bffe28 clk: scmi: Postpone clock name resolution
The clock names are retrived via SCMI_CLOCK_ATTRIBUTES, called for each
clock ID. This may take a lot of time to complete and is not strictly
necessary. Register each clock as "scmi-%zu" instead, and let the first
call of SCMI_CLOCK_ATTRIBUTES fill in the actual clock name.

This has a side effect, which can be considered both an upside and also
a downside. Unused clock are never renamed and retain their placeholder
"scmi-%zu" name, which avoids empty clock names for nameless SCMI clock,
and avoids the name resolution and improves boot time. But for those
SCMI clock which do have name, that name is not listed until the clock
are used.

This is a preparatory patch for deferred issue of SCMI_CLOCK_ATTRIBUTES.

Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2025-11-10 20:57:48 +08:00
Marek Vasut
21bfe6a291 clk: scmi: Factor out clock control flags resolution
Pull clock control flags resolution into dedicated function and
call it from each site that does access clock control flags. No
functional change.

This is a preparatory patch for deferred issue of SCMI_CLOCK_ATTRIBUTES.

Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2025-11-10 20:57:48 +08:00
Marek Vasut
ef52f697f2 clk: scmi: Bulk allocate all sub-driver instance data
Allocate all sub-driver instance data at once. The amount of data that
have to be allocated is known up front, so is the size of the data, so
there is no need to call malloc() in a loop, mallocate all data at once.

The upside is, less heap fragmentation and fewer malloc() calls overall,
and a faster boot time.

The downside is, if some of the clock fail to register, then the clock
driver cannot free parts of the bulk allocated sub-driver instance data.
Such a failure can only occur if clk_register() were to fail, and if that
happens, the system has more significant problems. Worse, if a core clock
driver fails to probe, the system has even bigger problem.

Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2025-11-10 20:57:46 +08:00
Kamlesh Gurudasani
66cb830291 clk: scmi: fix set_parent support when CCF is not being used
When not using Common clock framework(CCF), calls to
scmi_clk_set_parent returns -ENOTSUPP, which should not be the case.
Fix that.

Fixes: 15fdfef664 ("clk: scmi: check the clock state/parent/rate
control permissions)

Signed-off-by: Kamlesh Gurudasani <kamlesh@ti.com>
Reviewed-by: Dhruva Gole <d-gole@ti.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2025-11-10 20:57:44 +08:00
Vinh Nguyen
0619cb3203 firmware: scmi: Add clock v3.2 CONFIG_SET support
SCMI v3.2 introduces a new clock CONFIG_SET message format that can
optionally carry also OEM specific configuration values beside the usual
clock enable/disable requests. Add support to use such new format when
talking to a v3.2 compliant SCMI platform.

Support existing enable/disable operations across different clock protocol
versions: this patch still does not add protocol operations to support the
new OEM specific optional configuration capabilities.

No functional change for the SCMI drivers users of the related enable and
disable clock operations.

[Marek: Remodel after Linux e49e314a2cf7 ("firmware: arm_scmi: Add clock v3.2 CONFIG_SET support")
        Support both old < 2.1 and new >= 2.1 protocol versions.
	Update commit message based on Linux one]

Signed-off-by: Vinh Nguyen <vinh.nguyen.xz@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Alice Guo <alice.guo@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2025-11-10 20:57:42 +08:00
Marek Vasut
a5a0134570 firmware: scmi: Drop mmu_set_region_dcache_behaviour() misuse
MMU region cache behavior configuration for SCMI/SMT mailboxes is
platform specific. Even on ARM systems, the mailbox memory may not
even be located in any cacheable MMU region and may instead reside
in some SRAM. Remove this non-generic cache behavior configuration
code from generic code path.

It is unlikely that any platform is affected by this change if it
did configure its MMU regions correctly on start up. Platforms
which might be affected are i.MX94/95 and STM32MP.

Fixes: 240720e905 ("firmware: scmi: mailbox/smt agent device")
Fixes: 2a3f161c8b ("scmi: correctly configure MMU for SCMI buffer")
Fixes: b2ae10970d ("firmware: scmi: use PAGE_SIZE alignment for ARM64")
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Tested-by: Alice Guo <alice.guo@nxp.com>
Tested-by: Patrice Chotard <patrice.chotard@foss.st.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2025-11-10 20:57:42 +08:00
Marek Vasut
431f6cce11 firmware: scmi: Fix up code comments
Fix multiple instances of copy-paste errors. Fill in missing
headers for CLOCK_GET_PERMISSIONS message and response.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Alice Guo <alice.guo@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2025-11-10 20:57:40 +08:00
394 changed files with 12028 additions and 4559 deletions

View File

@@ -2,7 +2,7 @@ variables:
windows_vm: windows-2022
ubuntu_vm: ubuntu-24.04
macos_vm: macOS-14
ci_runner_image: trini/u-boot-gitlab-ci-runner:jammy-20251001-04Nov2025
ci_runner_image: trini/u-boot-gitlab-ci-runner:jammy-20251013-26Nov2025
# Ensure we do a shallow clone
Agent.Source.Git.ShallowFetchDepth: 1
# Add '-u 0' options for Azure pipelines, otherwise we get "permission
@@ -11,16 +11,35 @@ variables:
container_option: -u 0
work_dir: /u
# We define all of these as variables so we can easily reference them twice
am33xx_kirkwood_ls1_mvebu_omap: "am33xx kirkwood ls1 mvebu omap -x siemens,freescale"
amlogic_bcm_boundary_engicam_siemens_technexion_oradex: "amlogic bcm boundary engicam siemens technexion toradex -x mips"
arm_nxp_minus_imx_and_at91: "at91 freescale -x powerpc,m68k,imx,mx"
imx: "mx imx -x boundary,engicam,technexion,toradex"
rk: "rk"
sunxi: "sunxi"
am33xx_kirkwood: "am33xx kirkwood"
amd: "amd xilinx zynq"
amlogic_bcm: "amlogic bcm -x mips"
atmel: "atmel"
engicam_renesas: "engicam renesas"
k3_32b: "k3 -x aarch64,phytec,toradex"
k3_64b: "k3 -x armv7,phytec,toradex"
kirkwood_mvebu: "kirkwood mvebu"
layerscape_vf610: "ls1 ls2 lx2 vf610 -x phytec,toradex"
m68k_remaining_mx_xtensa: "m68k imxrt mx xtensa -x mx6,aarch64"
mips_x86: "mips x86 -x mediatek"
mx6: "mx6 -x engicam,phytec,toradex"
imx8: "imx8 -x engicam,phytec,toradex"
imx9_arc_nios2_socfpga: "imx9 arc nios2 socfpga -x phytec,toradex"
phytec_toradex: "phytec toradex"
powerpc: "powerpc"
arm_catch_all: "arm -x aarch64,am33xx,at91,bcm,ls1,kirkwood,mvebu,omap,rk,siemens,mx,sunxi,technexion,toradex"
aarch64_catch_all: "aarch64 -x amlogic,bcm,engicam,imx,ls1,ls2,lx216,mvebu,rk,siemens,sunxi,toradex"
everything_but_arm_and_powerpc: "arc m68k microblaze mips nios2 riscv sandbox sh x86 xtensa -x arm,powerpc"
riscv_stm32: "riscv stm32 -x engicam,xilinx"
rk3399: "rk3399"
rk352x_rk358x: "rk352 rk358"
rk356x_rk357x: "rk356 rk357"
rk3xxx_rest: "rk30 rk31 rk32 rk33 -x rk3399,phytec"
sandbox_tegra: "tegra sandbox -x toradex"
samsung_omap_mediatek: "samsung omap mediatek"
sun4i_5i: "sun4i sun5i"
sun6i_sun7i: "sun6i sun7i"
sun8i: "sun8i"
sunxi_rest: "sunxi -x sun4i,sun5i,sun6i,sun7i,sun8i"
arm_catch_all: "arm -x aarch64,am33xx,atmel,bcm,ls,lx,imx,k3,kirkwood,mvebu,mx,omap,renesas,rk,samsung,socfpga,stm32,sunxi,tegra,vf610,xilinx,zynq"
aarch64_catch_all: "aarch64 -x amd,amlogic,bcm,engicam,imx,k3,ls,lx,mediatek,mvebu,renesas,rk,samsung,socfpga,stm32,sunxi,tegra,xilinx,zynq"
stages:
- stage: testsuites
@@ -213,16 +232,36 @@ stages:
# First get the total number of boards
total=$(tools/buildman/buildman ${BMANARGS} | grep "Total boards to build for each commit" | cut -d ' ' -f 8)
# Now build up the list of what each job built.
built="$(tools/buildman/buildman ${BMANARGS} $(am33xx_kirkwood_ls1_mvebu_omap) | grep '^ ')"
built="$built $(tools/buildman/buildman ${BMANARGS} $(amlogic_bcm_boundary_engicam_siemens_technexion_oradex) | grep '^ ')"
built="$built $(tools/buildman/buildman ${BMANARGS} $(arm_nxp_minus_imx_and_at91) | grep '^ ')"
built="$built $(tools/buildman/buildman ${BMANARGS} $(imx) | grep '^ ')"
built="$built $(tools/buildman/buildman ${BMANARGS} $(rk) | grep '^ ')"
built="$built $(tools/buildman/buildman ${BMANARGS} $(sunxi) | grep '^ ')"
built="$(tools/buildman/buildman ${BMANARGS} $(am33xx_kirkwood) | grep '^ ')"
built="$built $(tools/buildman/buildman ${BMANARGS} $(amd) | grep '^ ')"
built="$built $(tools/buildman/buildman ${BMANARGS} $(amlogic_bcm) | grep '^ ')"
built="$built $(tools/buildman/buildman ${BMANARGS} $(atmel) | grep '^ ')"
built="$built $(tools/buildman/buildman ${BMANARGS} $(engicam_renesas) | grep '^ ')"
built="$built $(tools/buildman/buildman ${BMANARGS} $(k3_32b) | grep '^ ')"
built="$built $(tools/buildman/buildman ${BMANARGS} $(k3_64b) | grep '^ ')"
built="$built $(tools/buildman/buildman ${BMANARGS} $(kirkwood_mvebu) | grep '^ ')"
built="$built $(tools/buildman/buildman ${BMANARGS} $(layerscape_vf610) | grep '^ ')"
built="$built $(tools/buildman/buildman ${BMANARGS} $(m68k_remaining_mx_xtensa) | grep '^ ')"
built="$built $(tools/buildman/buildman ${BMANARGS} $(mips_x86) | grep '^ ')"
built="$built $(tools/buildman/buildman ${BMANARGS} $(mx6) | grep '^ ')"
built="$built $(tools/buildman/buildman ${BMANARGS} $(imx8) | grep '^ ')"
built="$built $(tools/buildman/buildman ${BMANARGS} $(imx9_arc_nios2_socfpga) | grep '^ ')"
built="$built $(tools/buildman/buildman ${BMANARGS} $(phytec_toradex) | grep '^ ')"
built="$built $(tools/buildman/buildman ${BMANARGS} $(powerpc) | grep '^ ')"
built="$built $(tools/buildman/buildman ${BMANARGS} $(riscv_stm32) | grep '^ ')"
built="$built $(tools/buildman/buildman ${BMANARGS} $(rk3399) | grep '^ ')"
built="$built $(tools/buildman/buildman ${BMANARGS} $(rk352x_rk358x) | grep '^ ')"
built="$built $(tools/buildman/buildman ${BMANARGS} $(rk356x_rk357x) | grep '^ ')"
built="$built $(tools/buildman/buildman ${BMANARGS} $(rk3xxx_rest) | grep '^ ')"
built="$built $(tools/buildman/buildman ${BMANARGS} $(sandbox_tegra) | grep '^ ')"
built="$built $(tools/buildman/buildman ${BMANARGS} $(samsung_omap_mediatek) | grep '^ ')"
built="$built $(tools/buildman/buildman ${BMANARGS} $(sun4i_5i) | grep '^ ')"
built="$built $(tools/buildman/buildman ${BMANARGS} $(sun6i_sun7i) | grep '^ ')"
built="$built $(tools/buildman/buildman ${BMANARGS} $(sun8i) | grep '^ ')"
built="$built $(tools/buildman/buildman ${BMANARGS} $(sunxi_rest) | grep '^ ')"
built="$built $(tools/buildman/buildman ${BMANARGS} $(arm_catch_all) | grep '^ ')"
built="$built $(tools/buildman/buildman ${BMANARGS} $(aarch64_catch_all) | grep '^ ')"
built="$built $(tools/buildman/buildman ${BMANARGS} $(everything_but_arm_and_powerpc) | grep '^ ')"
# Finally see how many machines that is.
actual=$(tools/buildman/buildman ${BMANARGS} $built | grep "Total boards to build for each commit" | cut -d ' ' -f 8)
echo We would build a total of $actual out of $total platforms this CI run
@@ -510,6 +549,12 @@ stages:
qemu_riscv64_spl:
TEST_PY_BD: "qemu-riscv64_spl"
TEST_PY_TEST_SPEC: "not sleep"
qemu_riscv64_smode:
TEST_PY_BD: "qemu-riscv64_smode"
TEST_PY_TEST_SPEC: "not sleep"
qemu_riscv64_smode_acpi:
TEST_PY_BD: "qemu-riscv64_smode_acpi"
TEST_PY_TEST_SPEC: "not sleep"
qemu_x86:
TEST_PY_BD: "qemu-x86"
TEST_PY_TEST_SPEC: "not sleep"
@@ -611,26 +656,64 @@ stages:
# We split the world up in to 10 jobs as we can have at most 10
# parallel jobs going on the free tier of Azure.
matrix:
am33xx_kirkwood_ls1_mvebu_omap:
BUILDMAN: $(am33xx_kirkwood_ls1_mvebu_omap)
amlogic_bcm_boundary_engicam_siemens_technexion_oradex:
BUILDMAN: $(amlogic_bcm_boundary_engicam_siemens_technexion_oradex)
arm_nxp_minus_imx_and_at91:
BUILDMAN: $(arm_nxp_minus_imx_and_at91)
imx:
BUILDMAN: $(imx)
rk:
BUILDMAN: $(rk)
sunxi:
BUILDMAN: $(sunxi)
am33xx_kirkwood:
BUILDMAN: $(am33xx_kirkwood)
amd:
BUILDMAN: $(amd)
amlogic_bcm:
BUILDMAN: $(amlogic_bcm)
atmel:
BUILDMAN: $(atmel)
engicam_renesas:
BUILDMAN: $(engicam_renesas)
k3_32b:
BUILDMAN: $(k3_32b)
k3_64b:
BUILDMAN: $(k3_64b)
kirkwood_mvebu:
BUILDMAN: $(kirkwood_mvebu)
layerscape_vf610:
BUILDMAN: $(layerscape_vf610)
m68k_remaining_mx_xtensa:
BUILDMAN: $(m68k_remaining_mx_xtensa)
mips_x86:
BUILDMAN: $(mips_x86)
mx6:
BUILDMAN: $(mx6)
imx8:
BUILDMAN: $(imx8)
imx9_arc_nios2_socfpga:
BUILDMAN: $(imx9_arc_nios2_socfpga)
phytec_toradex:
BUILDMAN: $(phytec_toradex)
powerpc:
BUILDMAN: $(powerpc)
riscv_stm32:
BUILDMAN: $(riscv_stm32)
rk3399:
BUILDMAN: $(rk3399)
rk352x_rk358x:
BUILDMAN: $(rk352x_rk358x)
rk356x_rk357x:
BUILDMAN: $(rk356x_rk357x)
rk3xxx_rest:
BUILDMAN: $(rk3xxx_rest)
sandbox_tegra:
BUILDMAN: $(sandbox_tegra)
samsung_omap_mediatek:
BUILDMAN: $(samsung_omap_mediatek)
sun4i_5i:
BUILDMAN: $(sun4i_5i)
sun6i_sun7i:
BUILDMAN: $(sun6i_sun7i)
sun8i:
BUILDMAN: $(sun8i)
sunxi_rest:
BUILDMAN: $(sunxi_rest)
arm_catch_all:
BUILDMAN: $(arm_catch_all)
aarch64_catch_all:
BUILDMAN: $(aarch64_catch_all)
everything_but_arm_and_powerpc:
BUILDMAN: $(everything_but_arm_and_powerpc)
steps:
- script: |
cat << EOF > build.sh

6
.gitignore vendored
View File

@@ -73,15 +73,15 @@ fit-dtb.blob*
/defconfig
/generated_defconfig
/Test*
/capsule.*.efi-capsule
/capsule*.efi-capsule
/capsule*.map
/keep-syms-lto.*
/*imx8mimage*
/*imx8mcst*
/*rcar4-sa0*
/drivers/video/u_boot_logo.S
/test/overlay/test-fdt-overlay.dtbo.S
/test/overlay/test-fdt-overlay-stacked.dtbo.S
/test/fdt_overlay/test-fdt-overlay-stacked.dtbo.S
/test/fdt_overlay/test-fdt-overlay.dtbo.S
capsule_esl_file
#

View File

@@ -18,7 +18,7 @@ workflow:
# Grab our configured image. The source for this is found
# in the u-boot tree at tools/docker/Dockerfile
image: ${MIRROR_DOCKER}/trini/u-boot-gitlab-ci-runner:jammy-20251001-04Nov2025
image: ${MIRROR_DOCKER}/trini/u-boot-gitlab-ci-runner:jammy-20251013-26Nov2025
# We run some tests in different order, to catch some failures quicker.
stages:
@@ -142,6 +142,7 @@ stages:
build all platforms in a single job:
stage: world build
dependencies: []
needs: [ "sandbox test.py" ]
tags:
- ${DEFAULT_FAST_TAG}
script:
@@ -465,6 +466,18 @@ qemu-riscv64_spl test.py:
TEST_PY_TEST_SPEC: "not sleep"
<<: *buildman_and_testpy_dfn
qemu-riscv64_smode test.py:
variables:
TEST_PY_BD: "qemu-riscv64_smode"
TEST_PY_TEST_SPEC: "not sleep"
<<: *buildman_and_testpy_dfn
qemu-riscv64_smode_acpi test.py:
variables:
TEST_PY_BD: "qemu-riscv64_smode_acpi"
TEST_PY_TEST_SPEC: "not sleep"
<<: *buildman_and_testpy_dfn
qemu-x86 test.py:
variables:
TEST_PY_BD: "qemu-x86"
@@ -587,7 +600,7 @@ coreboot test.py:
TEST_PY_ID: "--id qemu"
<<: *buildman_and_testpy_dfn
.lab_template: &lab_dfn
.sjg_lab_template: &sjg_lab_dfn
stage: sjg-lab
rules:
- if: $SJG_LAB == "1"
@@ -596,6 +609,7 @@ coreboot test.py:
when: manual
allow_failure: true
dependencies: []
needs: [ "sandbox test.py" ]
tags: [ 'lab' ]
script:
# Environment:
@@ -633,131 +647,131 @@ coreboot test.py:
rpi3:
variables:
ROLE: rpi3
<<: *lab_dfn
<<: *sjg_lab_dfn
opi_pc:
variables:
ROLE: opi_pc
<<: *lab_dfn
<<: *sjg_lab_dfn
pcduino3_nano:
variables:
ROLE: pcduino3_nano
<<: *lab_dfn
<<: *sjg_lab_dfn
samus:
variables:
ROLE: samus
<<: *lab_dfn
<<: *sjg_lab_dfn
link:
variables:
ROLE: link
<<: *lab_dfn
<<: *sjg_lab_dfn
jerry:
variables:
ROLE: jerry
<<: *lab_dfn
<<: *sjg_lab_dfn
minnowmax:
variables:
ROLE: minnowmax
<<: *lab_dfn
<<: *sjg_lab_dfn
opi_pc2:
variables:
ROLE: opi_pc2
<<: *lab_dfn
<<: *sjg_lab_dfn
bpi:
variables:
ROLE: bpi
<<: *lab_dfn
<<: *sjg_lab_dfn
rpi2:
variables:
ROLE: rpi2
<<: *lab_dfn
<<: *sjg_lab_dfn
bob:
variables:
ROLE: bob
<<: *lab_dfn
<<: *sjg_lab_dfn
ff3399:
variables:
ROLE: ff3399
<<: *lab_dfn
<<: *sjg_lab_dfn
coral:
variables:
ROLE: coral
<<: *lab_dfn
<<: *sjg_lab_dfn
rpi3z:
variables:
ROLE: rpi3z
<<: *lab_dfn
<<: *sjg_lab_dfn
bbb:
variables:
ROLE: bbb
<<: *lab_dfn
<<: *sjg_lab_dfn
kevin:
variables:
ROLE: kevin
<<: *lab_dfn
<<: *sjg_lab_dfn
pine64:
variables:
ROLE: pine64
<<: *lab_dfn
<<: *sjg_lab_dfn
c4:
variables:
ROLE: c4
<<: *lab_dfn
<<: *sjg_lab_dfn
rpi4:
variables:
ROLE: rpi4
<<: *lab_dfn
<<: *sjg_lab_dfn
rpi0:
variables:
ROLE: rpi0
<<: *lab_dfn
<<: *sjg_lab_dfn
snow:
variables:
ROLE: snow
<<: *lab_dfn
<<: *sjg_lab_dfn
pcduino3:
variables:
ROLE: pcduino3
<<: *lab_dfn
<<: *sjg_lab_dfn
nyan-big:
variables:
ROLE: nyan-big
<<: *lab_dfn
<<: *sjg_lab_dfn
rpi:
variables:
ROLE: rpi
<<: *lab_dfn
<<: *sjg_lab_dfn
# StarFive VisionFive 2
vf2:
variables:
ROLE: vf2
<<: *lab_dfn
<<: *sjg_lab_dfn
qemu-x86_64:
variables:
ROLE: qemu-x86_64
TEST_PY_TEST_SPEC: "and not sleep"
<<: *lab_dfn
<<: *sjg_lab_dfn

View File

@@ -28,6 +28,7 @@ Anurag Kumar Vulisha <AnuragKumar.Vulisha@amd.com> <anurag.kumar.vulisha@xilinx.
Appana Durga Kedareswara rao <appana.durga.kedareswara.rao@amd.com> <appana.durga.rao@xilinx.com>
Ashok Reddy Soma <ashok.reddy.soma@amd.com> <ashok.reddy.soma@xilinx.com>
Atish Patra <atishp@atishpatra.org> <atish.patra@wdc.com>
Bernhard Messerklinger <bernhard.messerklinger@at.abb.com> <bernhard.messerklinger@br-automation.com>
Bharat Kumar Gogada <bharat.kumar.gogada@amd.com> <bharat.kumar.gogada@xilinx.com>
Bharat Kumar Gogada <bharat.kumar.gogada@amd.com> <bharatku@xilinx.com>
Bhargava Sreekantappa Gayathri <bhargava.sreekantappa-gayathri@amd.com> <bhargava.sreekantappa-gayathri@xilinx.com>
@@ -68,12 +69,14 @@ Jagan Teki <jagannadha.sutradharudu-teki@xilinx.com>
Jakob Unterwurzacher <jakob.unterwurzacher@cherry.de> <jakob.unterwurzacher@theobroma-systems.com>
Jay Buddhabhatti <jay.buddhabhatti@amd.com> <jay.buddhabhatti@xilinx.com>
Jernej Skrabec <jernej.skrabec@gmail.com> <jernej.skrabec@siol.net>
Jerome Forissier <jerome@forissier.org> <jerome.forissier@linaro.org>
John Linn <john.linn@amd.com> <john.linn@xilinx.com>
Jyotheeswar Reddy Mutthareddyvari <jyotheeswar.reddy.mutthareddyvari@amd.com> <jyothee@xilinx.com>
Jyotheeswar Reddy Mutthareddyvari <jyotheeswar.reddy.mutthareddyvari@amd.com> <jyotheeswar.reddy.mutthareddyvari@xilinx.com>
Kalyani Akula <kalyani.akula@amd.com> <kalyani.akula@xilinx.com>
Klaus Goger <klaus.goger@cherry.de> <klaus.goger@theobroma-systems.com>
Masahisa Kojima <kojima.masahisa@socionext.com> <masahisa.kojima@linaro.org>
Linus Walleij <linusw@kernel.org> <linus.walleij@linaro.org>
Love Kumar <love.kumar@amd.com> <love.kumar@xilinx.com>
Lukasz Majewski <lukma@denx.de>
Marek Behún <kabel@kernel.org> <marek.behun@nic.cz>
@@ -114,6 +117,7 @@ Radhey Shyam Pandey <radhey.shyam.pandey@amd.com> <radhey.shyam.pandey@xilinx.co
Rajeshwari Shinde <rajeshwari.s@samsung.com>
Raju Kumar Pothuraju <rajukumar.pothuraju@amd.com> <raju.kumar-pothuraju@xilinx.com>
Ravi Patel <ravi.patel@amd.com> <ravi.patel@xilinx.com>
Raymond Mao <raymondmaoca@gmail.com> <raymond.mao@linaro.org>
Ricardo Ribalda <ricardo@ribalda.com> <ricardo.ribalda@gmail.com>
Ricardo Ribalda <ricardo@ribalda.com> <ricardo.ribalda@uam.es>
Rohit Visavalia <rohit.visavalia@amd.com> <rohit.visavalia@xilinx.com>
@@ -121,6 +125,8 @@ Ruchika Gupta <ruchika.gupta@nxp.com> <ruchika.gupta@freescale.com>
Saeed Nowshadi <saeed.nowshadi@amd.com> <saeed.nowshadi@xilinx.com>
Sai Krishna Potthuri <sai.krishna.potthuri@amd.com> <lakshmi.sai.krishna.potthuri@xilinx.com>
Sai Pavan Boddu <sai.pavan.boddu@amd.com> <sai.pavan.boddu@xilinx.com>
Sam Protsenko <semen.protsenko@linaro.org>
Sam Protsenko <semen.protsenko@linaro.org> <joe.skb7@gmail.com>
Sandeep Gundlupet Raju <sandeep.gundlupet-raju@amd.com> <sandeep.gundlupet-raju@xilinx.com>
Sandeep Paulraj <s-paulraj@ti.com>
Sandeep Reddy Ghanapuram <sandeep.reddy-ghanapuram@amd.com> <sandeep.reddy-ghanapuram@xilinx.com>
@@ -153,6 +159,8 @@ Wolfgang Denk <wd@denx.de> <wd@pollux.(none)>
Wolfgang Denk <wd@denx.de> <wd@pollux.denx.de>
Wolfgang Denk <wd@denx.de> <wd@xpert.denx.de>
Wolfgang Denk <wd@denx.de> <wdenk>
Wolfgang Wallner <wolfgang.wallner@at.abb.com> <wolfgang.wallner@br-automation.com>
Yao Zi <me@ziyao.cc> <ziyao@disroot.org>
York Sun <york.sun@nxp.com>
York Sun <yorksun@freescale.com>
Łukasz Majewski <l.majewski@samsung.com>

View File

@@ -734,6 +734,7 @@ F: drivers/spi/stm32_ospi.c
F: drivers/spi/stm32_qspi.c
F: drivers/spi/stm32_spi.c
F: drivers/video/stm32/stm32_ltdc.c
F: drivers/video/stm32/stm32_lvds.c
F: drivers/watchdog/stm32mp_wdt.c
F: include/dt-bindings/clock/stm32fx-clock.h
F: include/dt-bindings/clock/stm32mp*
@@ -819,7 +820,7 @@ F: include/linux/soc/ti/
ARM U8500
M: Stephan Gerhold <stephan@gerhold.net>
R: Linus Walleij <linus.walleij@linaro.org>
R: Linus Walleij <linusw@kernel.org>
S: Maintained
F: arch/arm/dts/ste-*
F: arch/arm/mach-u8500/
@@ -1038,7 +1039,6 @@ F: drivers/mtd/jedec_flash.c
CLOCK
M: Lukasz Majewski <lukma@denx.de>
M: Sean Anderson <seanga2@gmail.com>
S: Maintained
T: git https://source.denx.de/u-boot/custodians/u-boot-clk.git
F: drivers/clk/
@@ -1431,7 +1431,7 @@ N: mmc
NETWORK
M: Joe Hershberger <joe.hershberger@ni.com>
M: Ramon Fried <rfried.dev@gmail.com>
M: Jerome Forissier <jerome.forissier@linaro.org>
M: Jerome Forissier <jerome@forissier.org>
S: Maintained
T: git https://source.denx.de/u-boot/custodians/u-boot-net.git
F: drivers/net/
@@ -1439,7 +1439,7 @@ F: include/net.h
F: net/
NETWORK (LWIP)
M: Jerome Forissier <jerome.forissier@linaro.org>
M: Jerome Forissier <jerome@forissier.org>
S: Maintained
T: git https://source.denx.de/u-boot/custodians/u-boot-net.git
F: cmd/lwip/
@@ -1605,7 +1605,7 @@ F: drivers/pinctrl/pinctrl-k210.c
F: include/k210/
RISC-V T-HEAD TH1520
M: Yao Zi <ziyao@disroot.org>
M: Yao Zi <me@ziyao.cc>
S: Maintained
F: arch/riscv/cpu/th1520/
F: drivers/clk/thead/clk-th1520-ap.c
@@ -1648,7 +1648,7 @@ F: include/scmi*
N: scmi
SEAMA
M: Linus Walleij <linus.walleij@linaro.org>
M: Linus Walleij <linusw@kernel.org>
S: Maintained
F: cmd/seama.c
F: doc/usage/cmd/seama.rst
@@ -1884,7 +1884,7 @@ F: drivers/usb/host/xhci*
F: include/usb/xhci.h
UTHREAD
M: Jerome Forissier <jerome.forissier@linaro.org>
M: Jerome Forissier <jerome@forissier.org>
S: Maintained
F: cmd/spawn.c
F: include/uthread.h

View File

@@ -3,7 +3,7 @@
VERSION = 2026
PATCHLEVEL = 01
SUBLEVEL =
EXTRAVERSION = -rc2
EXTRAVERSION =
NAME =
# *DOCUMENTATION*
@@ -600,7 +600,7 @@ ifneq ($(shell $(CC) --version 2>&1 | head -n 1 | grep clang),)
ifneq ($(CROSS_COMPILE),)
CLANG_FLAGS := --target=$(notdir $(CROSS_COMPILE:%-=%))
GCC_TOOLCHAIN_DIR := $(dir $(shell which $(CROSS_COMPILE)elfedit))
CLANG_FLAGS += --prefix=$(GCC_TOOLCHAIN_DIR)
CLANG_FLAGS += --prefix=$(GCC_TOOLCHAIN_DIR)$(notdir $(CROSS_COMPILE:%-=%))-
GCC_TOOLCHAIN := $(realpath $(GCC_TOOLCHAIN_DIR)/..)
endif
ifneq ($(GCC_TOOLCHAIN),)
@@ -1041,7 +1041,6 @@ libs-$(CONFIG_USB_GADGET) += drivers/usb/gadget/
libs-$(CONFIG_USB_GADGET) += drivers/usb/gadget/udc/
libs-y += drivers/usb/host/
libs-y += drivers/usb/mtu3/
libs-y += drivers/usb/musb/
libs-y += drivers/usb/musb-new/
libs-y += drivers/usb/isp1760/
libs-y += drivers/usb/phy/
@@ -1500,6 +1499,15 @@ ifeq ($(CONFIG_POSITION_INDEPENDENT)$(CONFIG_RCAR_GEN3),yy)
OBJCOPYFLAGS_u-boot-elf.srec += --change-addresses=0x50000000
endif
ifeq ($(CONFIG_POSITION_INDEPENDENT)$(CONFIG_RCAR_GEN5),yy)
# The flash_writer tool and previous recovery tools
# require the SREC load address to be 0x8e30_0000 .
# The PIE U-Boot build sets the address to 0x0, so
# override the address back to make u-boot-elf.srec
# compatible with the recovery tools.
OBJCOPYFLAGS_u-boot-elf.srec += --change-addresses=0x8e300000
endif
u-boot-elf.srec: u-boot.elf FORCE
$(call if_changed,zobjcopy)

View File

@@ -30,18 +30,19 @@ PLATFORM_RELFLAGS += $(call cc-option,-mgeneral-regs-only)
endif
# LLVM support
LLVM_RELFLAGS := $(call cc-option,-mllvm,) \
$(call cc-option,-mno-movt,)
PLATFORM_RELFLAGS += $(LLVM_RELFLAGS)
LLVM_RELFLAGS := $(call cc-option,-mllvm,)
PLATFORM_CPPFLAGS += -D__ARM__
ifdef CONFIG_ARM64
PLATFORM_ELFFLAGS += -B aarch64 -O elf64-littleaarch64
else
PLATFORM_ELFFLAGS += -B arm -O elf32-littlearm
# no-movt is only available when targeting AArch32
LLVM_RELFLAGS += $(call cc-option,-mno-movt,)
endif
PLATFORM_RELFLAGS += $(LLVM_RELFLAGS)
# Choose between ARM/Thumb instruction sets
ifeq ($(CONFIG_$(PHASE_)SYS_THUMB_BUILD),y)
AFLAGS_IMPLICIT_IT := $(call as-option,-Wa$(comma)-mimplicit-it=always)
@@ -50,14 +51,14 @@ PF_CPPFLAGS_ARM := $(AFLAGS_IMPLICIT_IT) \
$(call cc-option,-marm,)\
$(call cc-option,-mno-thumb-interwork,)\
)
else
else ifneq ($(CONFIG_ARM64),y)
PF_CPPFLAGS_ARM := $(call cc-option,-marm,) \
$(call cc-option,-mno-thumb-interwork,)
endif
# Only test once
ifeq ($(CONFIG_$(PHASE_)SYS_THUMB_BUILD),y)
archprepare: checkthumb checkgcc6
archprepare: checkthumb checkgcc10
checkthumb:
@if test "$(call cc-name)" = "gcc" -a \
@@ -68,13 +69,13 @@ checkthumb:
false; \
fi
else
archprepare: checkgcc6
archprepare: checkgcc10
endif
checkgcc6:
checkgcc10:
@if test "$(call cc-name)" = "gcc" -a \
"$(call cc-version)" -lt "0600"; then \
echo '*** Your GCC is older than 6.0 and is not supported'; \
"$(call cc-version)" -lt "1000"; then \
echo '*** Your GCC is older than 10.0 and is not supported'; \
false; \
fi

View File

@@ -28,7 +28,7 @@ config ARMV7_BOOT_SEC_DEFAULT
variable to "sec" or "nonsec".
config HAS_ARMV7_SECURE_BASE
bool "Enable support for a ahardware secure memory area"
bool "Enable support for a hardware secure memory area"
default y if ARCH_LS1021A || ARCH_MX7 || ARCH_MX7ULP || ARCH_STM32MP \
|| MACH_SUN6I || MACH_SUN7I || MACH_SUN8I || TEGRA124

View File

@@ -918,6 +918,13 @@ dtb-$(CONFIG_RZA1) += \
r7s72100-genmai.dtb \
r7s72100-gr-peach.dtb
dtb-$(CONFIG_RCAR_GEN5) += \
r8a78000-ironhide.dtb
ifdef CONFIG_RCAR_GEN5
DTC_FLAGS += -R 4 -p 0x1000
endif
dtb-$(CONFIG_TARGET_AT91SAM9261EK) += at91sam9261ek.dtb
dtb-$(CONFIG_TARGET_PM9261) += at91sam9261ek.dtb

View File

@@ -60,7 +60,7 @@
reg = <0>;
spi-max-frequency = <50000000>;
spi-tx-bus-width = <1>;
spi-rx-bus-width = <1>;
spi-rx-bus-width = <2>;
};
};
};

View File

@@ -10,16 +10,16 @@
compatible = "fsl,imx8ulp-mu";
reg = <0 0x27020000 0 0x10000>;
status = "okay";
bootph-pre-ram;
bootph-all;
};
};
&soc {
bootph-pre-ram;
bootph-all;
};
&per_bridge3 {
bootph-pre-ram;
bootph-all;
};
&per_bridge4 {
@@ -27,15 +27,15 @@
};
&iomuxc1 {
bootph-pre-ram;
bootph-all;
};
&pinctrl_lpuart5 {
bootph-pre-ram;
bootph-all;
};
&lpuart5 {
bootph-pre-ram;
bootph-all;
};
&usdhc0 {

View File

@@ -119,3 +119,7 @@
>;
};
};
&wdog3 {
status = "disabled";
};

View File

@@ -503,7 +503,7 @@
MX91_PAD_ENET1_TD0__GPIO4_IO5 0x31e
MX91_PAD_ENET1_TD1__GPIO4_IO4 0x31e
MX91_PAD_ENET1_TD2__GPIO4_IO3 0x31e
MX91_PAD_ENET1_TD3__GPIO4_IO3 0x31e
MX91_PAD_ENET1_TD3__GPIO4_IO2 0x31e
MX91_PAD_ENET1_TXC__GPIO4_IO7 0x31e
MX91_PAD_ENET1_TX_CTL__GPIO4_IO6 0x31e
>;

View File

@@ -330,7 +330,7 @@
#define MX91_PAD_ENET1_TD3__CAN2_TX 0x00a0 0x0250 0x0000 0x02 0x00
#define MX91_PAD_ENET1_TD3__HSIOMIX_OTG_ID2 0x00a0 0x0250 0x0000 0x03 0x00
#define MX91_PAD_ENET1_TD3__FLEXIO2_FLEXIO2 0x00a0 0x0250 0x0000 0x04 0x00
#define MX91_PAD_ENET1_TD3__GPIO4_IO3 0x00a0 0x0250 0x0000 0x05 0x00
#define MX91_PAD_ENET1_TD3__GPIO4_IO2 0x00a0 0x0250 0x0000 0x05 0x00
#define MX91_PAD_ENET1_TD3__LPI2C2_SCL 0x00a0 0x0250 0x03e8 0x06 0x00
#define MX91_PAD_ENET1_TD2__ENET_QOS_RGMII_TD2 0x00a4 0x0254 0x0000 0x00 0x00
@@ -680,7 +680,7 @@
#define MX91_PAD_I2C2_SCL__LPUART2_DCB_B 0x0178 0x0328 0x0000 0x02 0x00
#define MX91_PAD_I2C2_SCL__TPM2_CH2 0x0178 0x0328 0x0000 0x03 0x00
#define MX91_PAD_I2C2_SCL__SAI1_RX_SYNC 0x0178 0x0328 0x0000 0x04 0x00
#define MX91_PAD_I2C2_SCL__GPIO1_IO3 0x0178 0x0328 0x0000 0x05 0x00
#define MX91_PAD_I2C2_SCL__GPIO1_IO2 0x0178 0x0328 0x0000 0x05 0x00
#define MX91_PAD_I2C2_SCL__I3C1_PUR_B 0x0178 0x0328 0x0000 0x06 0x00
#define MX91_PAD_I2C2_SDA__LPI2C2_SDA 0x017c 0x032c 0x03ec 0x00 0x01

View File

@@ -23,8 +23,6 @@
&rpc {
bootph-all;
status = "disabled";
flash@0 {
bootph-all;
spi-tx-bus-width = <1>;

View File

@@ -0,0 +1,8 @@
// SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
/*
* Device Tree Source extras for U-Boot for the Ironhide board
*
* Copyright (C) 2025 Renesas Electronics Corp.
*/
#include "r8a78000-u-boot.dtsi"

View File

@@ -0,0 +1,257 @@
// SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
/*
* Device Tree Source for the Ironhide board
*
* Copyright (C) 2025 Renesas Electronics Corp.
*/
/dts-v1/;
#include "r8a78000.dtsi"
#include <dt-bindings/net/ti-dp83869.h>
/ {
model = "Renesas Ironhide board based on r8a78000";
compatible = "renesas,ironhide", "renesas,r8a78000";
aliases {
i2c0 = &i2c0;
i2c1 = &i2c1;
i2c2 = &i2c2;
i2c3 = &i2c3;
i2c4 = &i2c4;
i2c5 = &i2c5;
i2c6 = &i2c6;
i2c7 = &i2c7;
i2c8 = &i2c8;
mmc0 = &mmc0;
serial0 = &hscif0;
};
chosen {
stdout-path = "serial0:1843200n8";
};
memory@40000000 {
device_type = "memory";
reg = <0x0 0x40000000 0x0 0x80000000>;
};
memory@1080000000 {
device_type = "memory";
reg = <0x10 0x80000000 0x0 0x80000000>;
};
memory@1200000000 {
device_type = "memory";
reg = <0x12 0x00000000 0x1 0x00000000>;
};
memory@1400000000 {
device_type = "memory";
reg = <0x14 0x00000000 0x1 0x00000000>;
};
memory@1600000000 {
device_type = "memory";
reg = <0x16 0x00000000 0x1 0x00000000>;
};
memory@1800000000 {
device_type = "memory";
reg = <0x18 0x00000000 0x1 0x00000000>;
};
memory@1a00000000 {
device_type = "memory";
reg = <0x1a 0x00000000 0x1 0x00000000>;
};
memory@1c00000000 {
device_type = "memory";
reg = <0x1c 0x00000000 0x1 0x00000000>;
};
memory@1e00000000 {
device_type = "memory";
reg = <0x1e 0x00000000 0x1 0x00000000>;
};
reg_1p8v: regulator-1p8v {
compatible = "regulator-fixed";
regulator-name = "fixed-1.8V";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-boot-on;
regulator-always-on;
};
reg_3p3v: regulator-3p3v {
compatible = "regulator-fixed";
regulator-name = "fixed-3.3V";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-boot-on;
regulator-always-on;
};
};
&extal_clk {
clock-frequency = <16666600>;
};
&extalr_clk {
clock-frequency = <32768>;
};
&hscif0 {
pinctrl-0 = <&hscif0_pins>;
pinctrl-names = "default";
uart-has-rtscts;
status = "okay";
};
&i2c0 {
pinctrl-0 = <&i2c0_pins>;
pinctrl-names = "default";
clock-frequency = <400000>;
status = "okay";
eeprom@50 {
compatible = "rohm,br24g01", "atmel,24c01";
reg = <0x50>;
pagesize = <8>;
};
};
&i2c1 {
pinctrl-0 = <&i2c1_pins>;
pinctrl-names = "default";
clock-frequency = <400000>;
status = "okay";
};
&eth_pcs {
phys = <&mp_phy 2 1>;
status = "okay";
};
&mmc0 {
pinctrl-0 = <&mmc0_pins>;
pinctrl-1 = <&mmc0_pins>;
pinctrl-names = "default", "state_uhs";
bus-width = <8>;
full-pwr-cycle-in-suspend;
mmc-hs200-1_8v;
mmc-hs400-1_8v;
no-sd;
no-sdio;
non-removable;
vmmc-supply = <&reg_3p3v>;
vqmmc-supply = <&reg_1p8v>;
status = "okay";
};
&ufs0 {
status = "okay";
};
&ufs1 {
status = "okay";
};
&mp_phy {
status = "okay";
};
&pfc {
pinctrl-0 = <&scif_clk_pins>;
pinctrl-names = "default";
eth25g2_pins: eth25g2 {
groups = "eth25g2_mdio", "eth25g2_link", "eth25g2_phyint";
function = "eth25g2";
drive-strength = <24>;
};
ethes0_pins: ethes0 {
groups = "ethes0_match", "ethes0_capture", "ethes0_pps";
function = "ethes0";
drive-strength = <24>;
};
hscif0_pins: hscif0 {
groups = "hscif0_data", "hscif0_ctrl";
function = "hscif0";
};
i2c0_pins: i2c0 {
groups = "i2c0";
function = "i2c0";
};
i2c1_pins: i2c1 {
groups = "i2c1";
function = "i2c1";
};
mmc0_pins: mmc0 {
groups = "mmc0_data8", "mmc0_ctrl", "mmc0_ds";
function = "mmc0";
drive-strength = <24>;
};
rsw3_pins: rsw3 {
groups = "rsw3_match", "rsw3_capture", "rsw3_pps";
function = "rsw3";
drive-strength = <24>;
};
scif_clk_pins: scif-clk {
groups = "scif_clk";
function = "scif_clk";
};
};
&rswitch3 {
pinctrl-0 = <&rsw3_pins>, <&eth25g2_pins>, <&ethes0_pins>;
pinctrl-names = "default";
status = "okay";
ethernet-ports {
#address-cells = <1>;
#size-cells = <0>;
/*
* NOTE: Only port@4 is configured for R-Car X5H board.
* Other ports (0-3, 5-12) are currently unused or not
* connected.
*/
port@4 {
reg = <4>;
renesas,connect_to_xpcs;
phy-handle = <&dp83869_phy>;
phy-mode = "sgmii";
phys = <&eth_pcs 5>;
mdio {
#address-cells = <1>;
#size-cells = <0>;
dp83869_phy: ethernet-phy@2 {
reg = <2>;
ti,sgmii-interface;
ti,max-output-impedance;
ti,refclk-output-enable;
ti,clk-output-sel = <DP83869_CLK_O_SEL_REF_CLK>;
};
};
};
};
};
&scif_clk {
clock-frequency = <26000000>;
};

View File

@@ -0,0 +1,139 @@
// SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
/*
* Device Tree Source extras for U-Boot on R-Car R8A78000 SoC
*
* Copyright (C) 2025 Renesas Electronics Corp.
*/
/ {
soc {
bootph-all;
};
/* Placeholder clock until the clock provider is in place */
clk_stub_gpio: clk-stub-gpio {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <1000000>;
};
clk_stub_i2c0: clk-stub-i2c0 {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <150000000>;
};
clk_stub_i2c1: clk-stub-i2c1 {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <133333333>;
};
clk_stub_mmc: clk-stub-mmc {
compatible = "renesas,compound-clock";
#clock-cells = <0>;
clocks = <&scmi_clk SCP_CLOCK_ID_MDLC_SDHI0>,
<&scmi_clk 1691>;
clock-names = "mdlc", "per";
};
};
&cpg {
bootph-all;
};
&extal_clk {
bootph-all;
};
&extalr_clk {
bootph-all;
};
&gpio0 {
clocks = <&clk_stub_gpio>;
};
&gpio1 {
clocks = <&clk_stub_gpio>;
};
&gpio2 {
clocks = <&clk_stub_gpio>;
};
&gpio3 {
clocks = <&clk_stub_gpio>;
};
&gpio4 {
clocks = <&clk_stub_gpio>;
};
&gpio5 {
clocks = <&clk_stub_gpio>;
};
&gpio6 {
clocks = <&clk_stub_gpio>;
};
&gpio7 {
clocks = <&clk_stub_gpio>;
};
&gpio8 {
clocks = <&clk_stub_gpio>;
};
&gpio9 {
clocks = <&clk_stub_gpio>;
};
&gpio10 {
clocks = <&clk_stub_gpio>;
};
&i2c0 {
clocks = <&clk_stub_i2c0>;
};
&i2c1 {
clocks = <&clk_stub_i2c1>;
};
&i2c2 {
clocks = <&clk_stub_i2c1>;
};
&i2c3 {
clocks = <&clk_stub_i2c1>;
};
&i2c4 {
clocks = <&clk_stub_i2c1>;
};
&i2c5 {
clocks = <&clk_stub_i2c1>;
};
&i2c6 {
clocks = <&clk_stub_i2c1>;
};
&i2c7 {
clocks = <&clk_stub_i2c1>;
};
&i2c8 {
clocks = <&clk_stub_i2c1>;
};
&mmc0 {
clocks = <&clk_stub_mmc>;
};
&prr {
bootph-all;
};

1164
arch/arm/dts/r8a78000.dtsi Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,3 @@
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
#include "rk3588-rock-5b-u-boot.dtsi"

View File

@@ -46,6 +46,11 @@
};
};
&saradc {
bootph-pre-ram;
vdd-microvolts = <1800000>;
};
&sdhci {
cap-mmc-highspeed;
mmc-hs200-1_8v;

View File

@@ -0,0 +1,3 @@
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
#include "rk3588-rock-5b-u-boot.dtsi"

View File

@@ -226,5 +226,38 @@
};
};
#endif /* CONFIG_ROCKCHIP_SPI_IMAGE */
#ifdef CONFIG_ROCKCHIP_MASKROM_IMAGE
simple-bin-usb471 {
filename = "u-boot-rockchip-usb471.bin";
#ifdef CONFIG_ROCKCHIP_EXTERNAL_TPL
rockchip-tpl {
};
#elif defined(CONFIG_TPL)
u-boot-tpl {
no-write-symbols;
};
#endif
};
simple-bin-usb472 {
filename = "u-boot-rockchip-usb472.bin";
pad-byte = <0x00>;
u-boot-spl {
no-write-symbols;
};
#ifdef HAS_FIT
fit {
insert-template = <&fit_template>;
#else
u-boot-img {
#endif
offset = <(CONFIG_SPL_LOAD_FIT_ADDRESS - CFG_SYS_SDRAM_BASE)>;
};
};
#endif /* CONFIG_ROCKCHIP_MASKROM_IMAGE */
};
#endif /* CONFIG_SPL */

View File

@@ -5,6 +5,10 @@
* Copyright (c) 2019 Simon Goldschmidt
*/
/{
memory {
bootph-all;
};
soc {
bootph-all;
};
@@ -14,6 +18,10 @@
bootph-all;
};
&L2 {
bootph-all;
};
&rst {
bootph-all;
};

View File

@@ -13,6 +13,32 @@
spi0 = "/soc/spi@ff705000";
udc0 = &usb1;
};
leds {
compatible = "gpio-leds";
led-0 {
default-state = "off";
gpios = <&portb 20 GPIO_ACTIVE_HIGH>;
};
led-1 {
default-state = "off";
gpios = <&portb 25 GPIO_ACTIVE_HIGH>;
label = "status_1";
};
led-2 {
default-state = "off";
gpios = <&portb 26 GPIO_ACTIVE_HIGH>;
label = "status_2";
};
led-3 {
default-state = "off";
gpios = <&portc 7 GPIO_ACTIVE_HIGH>;
};
};
};
&mmc {

View File

@@ -3,13 +3,13 @@
* Copyright (C) 2025, DH electronics - All Rights Reserved
*
* STM32MP13xx DHSOM configuration
* 1x DDR3L 1Gb, 16-bit, 533MHz, Single Die Package in flyby topology.
* Reference used W631GU6MB15I from Winbond
* 1x DDR3L 4Gb, 16-bit, 533MHz, Single Die Package in flyby topology.
* Reference used W634GU6RB11I from Winbond
*
* DDR type / Platform DDR3/3L
* freq 533MHz
* width 16
* datasheet 0 = W631GU6MB15I / DDR3-1333
* datasheet 0 = W634GU6RB11I / DDR3-1866
* DDR density 2
* timing mode optimized
* address mapping : RBC

View File

@@ -0,0 +1,100 @@
// SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause
/*
* Copyright (C) 2025, DH electronics - All Rights Reserved
*
* STM32MP13xx DHSOM configuration
* 1x DDR3L 8Gb, 16-bit, 533MHz, Single Die Package in flyby topology.
* Reference used W638GU6QB11I from Winbond
*
* DDR type / Platform DDR3/3L
* freq 533MHz
* width 16
* datasheet 0 = W638GU6QB11I / DDR3-1866
* DDR density 4
* timing mode optimized
* address mapping : RBC
* Tc > + 85C : J
*/
#define DDR_MEM_COMPATIBLE ddr3l-dhsom-1066-888-bin-g-1x4gb-533mhz
#define DDR_MEM_NAME "DDR3-DDR3L 16bits 533000kHz"
#define DDR_MEM_SPEED 533000
#define DDR_MEM_SIZE 0x40000000
#define DDR_MSTR 0x00040401
#define DDR_MRCTRL0 0x00000010
#define DDR_MRCTRL1 0x00000000
#define DDR_DERATEEN 0x00000000
#define DDR_DERATEINT 0x00800000
#define DDR_PWRCTL 0x00000000
#define DDR_PWRTMG 0x00400010
#define DDR_HWLPCTL 0x00000000
#define DDR_RFSHCTL0 0x00210000
#define DDR_RFSHCTL3 0x00000000
#define DDR_RFSHTMG 0x0081008B
#define DDR_CRCPARCTL0 0x00000000
#define DDR_DRAMTMG0 0x121B2414
#define DDR_DRAMTMG1 0x000A041B
#define DDR_DRAMTMG2 0x0607080F
#define DDR_DRAMTMG3 0x0050400C
#define DDR_DRAMTMG4 0x07040607
#define DDR_DRAMTMG5 0x06060403
#define DDR_DRAMTMG6 0x02020002
#define DDR_DRAMTMG7 0x00000202
#define DDR_DRAMTMG8 0x00001005
#define DDR_DRAMTMG14 0x000000A0
#define DDR_ZQCTL0 0xC2000040
#define DDR_DFITMG0 0x02050105
#define DDR_DFITMG1 0x00000202
#define DDR_DFILPCFG0 0x07000000
#define DDR_DFIUPD0 0xC0400003
#define DDR_DFIUPD1 0x00000000
#define DDR_DFIUPD2 0x00000000
#define DDR_DFIPHYMSTR 0x00000000
#define DDR_ADDRMAP1 0x00080808
#define DDR_ADDRMAP2 0x00000000
#define DDR_ADDRMAP3 0x00000000
#define DDR_ADDRMAP4 0x00001F1F
#define DDR_ADDRMAP5 0x07070707
#define DDR_ADDRMAP6 0x07070707
#define DDR_ADDRMAP9 0x00000000
#define DDR_ADDRMAP10 0x00000000
#define DDR_ADDRMAP11 0x00000000
#define DDR_ODTCFG 0x06000600
#define DDR_ODTMAP 0x00000001
#define DDR_SCHED 0x00000F01
#define DDR_SCHED1 0x00000000
#define DDR_PERFHPR1 0x00000001
#define DDR_PERFLPR1 0x04000200
#define DDR_PERFWR1 0x08000400
#define DDR_DBG0 0x00000000
#define DDR_DBG1 0x00000000
#define DDR_DBGCMD 0x00000000
#define DDR_POISONCFG 0x00000000
#define DDR_PCCFG 0x00000010
#define DDR_PCFGR_0 0x00000000
#define DDR_PCFGW_0 0x00000000
#define DDR_PCFGQOS0_0 0x00100009
#define DDR_PCFGQOS1_0 0x00000020
#define DDR_PCFGWQOS0_0 0x01100B03
#define DDR_PCFGWQOS1_0 0x01000200
#define DDR_PGCR 0x01442E02
#define DDR_PTR0 0x0022AA5B
#define DDR_PTR1 0x04841104
#define DDR_PTR2 0x042DA068
#define DDR_ACIOCR 0x10400812
#define DDR_DXCCR 0x00000C40
#define DDR_DSGCR 0xF200011F
#define DDR_DCR 0x0000000B
#define DDR_DTPR0 0x36D477D0
#define DDR_DTPR1 0x098B00D8
#define DDR_DTPR2 0x10023600
#define DDR_MR0 0x00000830
#define DDR_MR1 0x00000000
#define DDR_MR2 0x00000208
#define DDR_MR3 0x00000000
#define DDR_ODTCR 0x00010000
#define DDR_ZQ0CR1 0x00000038
#define DDR_DX0GCR 0x0000CE81
#define DDR_DX1GCR 0x0000CE81
#include "stm32mp13-ddr.dtsi"

View File

@@ -14,6 +14,7 @@
u-boot,boot-led = "led-blue";
u-boot,error-led = "led-red";
u-boot,mmc-env-partition = "u-boot-env";
st,adc_usb_pd = <&adc1 6>, <&adc1 12>;
};
gpio-keys {

View File

@@ -6,10 +6,12 @@
#include <dt-bindings/clock/stm32mp13-clksrc.h>
#include "stm32mp13-u-boot.dtsi"
#include "stm32mp13-ddr3-dhsom-1x2Gb-1066-binG.dtsi"
#include "stm32mp13-ddr3-dhsom-1x4Gb-1066-binG.dtsi"
/ {
aliases {
eeprom0 = &eeprom0;
eeprom0wl = &eeprom0wl;
};
config {
@@ -186,6 +188,14 @@
};
#endif
&reg11 {
regulator-always-on;
};
&reg18 {
regulator-always-on;
};
&sdmmc1 {
status = "disabled";
};

View File

@@ -51,3 +51,7 @@
};
};
};
&etzpc {
compatible = "simple-bus";
};

View File

@@ -37,6 +37,11 @@
soc@0 {
bootph-all;
};
/* temporary until kernel DT update */
watchdog {
arm,smc-id = <0xbc000000>;
};
};
&bsec {

View File

@@ -10,6 +10,14 @@
u-boot,boot-led = "led-blue";
u-boot,mmc-env-partition = "u-boot-env";
};
clocks {
txbyteclk {
#clock-cells = <0>;
compatible = "fixed-clock";
clock-frequency = <0>;
};
};
};
&usart2 {

View File

@@ -39,6 +39,11 @@
soc@0 {
bootph-all;
};
/* temporary until kernel DT update */
watchdog {
arm,smc-id = <0xbc000000>;
};
};
&bsec {

View File

@@ -0,0 +1,26 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR BSD-3-Clause
/*
* Copyright (C) STMicroelectronics 2025 - All Rights Reserved
*/
#include "stm32mp25-u-boot.dtsi"
/ {
config {
u-boot,mmc-env-partition = "u-boot-env";
};
};
&usart2 {
bootph-all;
};
&usart2_pins_a {
bootph-all;
pins1 {
bootph-all;
};
pins2 {
bootph-all;
};
};

View File

@@ -15,7 +15,7 @@
blob@0 {
filename = "spl/boot.bin";
offset = <0x0>;
offset = <0x8000>;
};
fit {

View File

@@ -329,7 +329,7 @@ enum {
MX91_PAD_ENET1_TD3__CAN2_TX = IOMUX_PAD(0x0250, 0x00A0, 0x02, 0x0000, 0x00, 0x00),
MX91_PAD_ENET1_TD3__HSIOMIX_OTG_ID2 = IOMUX_PAD(0x0250, 0x00A0, 0x03, 0x0000, 0x00, 0x00),
MX91_PAD_ENET1_TD3__FLEXIO2_FLEXIO2 = IOMUX_PAD(0x0250, 0x00A0, 0x04, 0x0000, 0x00, 0x00),
MX91_PAD_ENET1_TD3__GPIO4_IO3 = IOMUX_PAD(0x0250, 0x00A0, 0x05, 0x0000, 0x00, 0x00),
MX91_PAD_ENET1_TD3__GPIO4_IO2 = IOMUX_PAD(0x0250, 0x00A0, 0x05, 0x0000, 0x00, 0x00),
MX91_PAD_ENET1_TD3__LPI2C2_SCL = IOMUX_PAD(0x0250, 0x00A0, 0x06, 0x03E8, 0x00, 0x00),
MX91_PAD_ENET1_TD2__ENET_QOS_RGMII_TD2 = IOMUX_PAD(0x0254, 0x00A4, 0x00, 0x0000, 0x00, 0x00),
@@ -679,7 +679,7 @@ enum {
MX91_PAD_I2C2_SCL__LPUART2_DCB_B = IOMUX_PAD(0x0328, 0x0178, 0x02, 0x0000, 0x00, 0x00),
MX91_PAD_I2C2_SCL__TPM2_CH2 = IOMUX_PAD(0x0328, 0x0178, 0x03, 0x0000, 0x00, 0x00),
MX91_PAD_I2C2_SCL__SAI1_RX_SYNC = IOMUX_PAD(0x0328, 0x0178, 0x04, 0x0000, 0x00, 0x00),
MX91_PAD_I2C2_SCL__GPIO1_IO3 = IOMUX_PAD(0x0328, 0x0178, 0x05, 0x0000, 0x00, 0x00),
MX91_PAD_I2C2_SCL__GPIO1_IO2 = IOMUX_PAD(0x0328, 0x0178, 0x05, 0x0000, 0x00, 0x00),
MX91_PAD_I2C2_SCL__I3C1_PUR_B = IOMUX_PAD(0x0328, 0x0178, 0x06, 0x0000, 0x00, 0x00),
MX91_PAD_I2C2_SDA__LPI2C2_SDA = IOMUX_PAD(0x032C, 0x017C, 0x00, 0x03EC, 0x01, 0x00),

View File

@@ -87,6 +87,9 @@ enum {
#define SYS_REG_CS1_COL_SHIFT(ch) (0 + (ch) * 2)
#define SYS_REG_CS1_COL_MASK 3
/* Get sdram type decode from reg */
u8 rockchip_sdram_type(phys_addr_t reg);
/* Get sdram size decode from reg */
size_t rockchip_sdram_size(phys_addr_t reg);

View File

@@ -26,6 +26,16 @@
#define BCM2835_GPIO_FSEL_BANK(gpio) (gpio / 10)
#define BCM2835_GPIO_FSEL_SHIFT(gpio) ((gpio % 10) * 3)
/* BCM2835 GPIO Pull-up/down register offsets */
#define BCM2835_GPPUD 37
#define BCM2835_GPPUDCLK0 38
/* BCM2711 GPIO Pull-up/down control */
#define BCM2711_GPPUD_CNTRL_REG0 57
#define BCM2711_PUD_REG_OFFSET(gpio) ((gpio) / 16)
#define BCM2711_PUD_REG_SHIFT(gpio) (((gpio) % 16) * 2)
#define BCM2711_PUD_2711_MASK 0x3
struct bcm2835_gpio_regs {
u32 gpfsel[6];
u32 reserved1;

View File

@@ -2,7 +2,7 @@ if ARCH_EXYNOS
config BOARD_COMMON
def_bool y
depends on !TARGET_SMDKV310 && !TARGET_ARNDALE && !TARGET_E850_96
depends on !TARGET_SMDKV310 && !TARGET_ARNDALE && !TARGET_EXYNOS_MOBILE && !TARGET_E850_96
config SPI_BOOTING
bool
@@ -252,6 +252,14 @@ config TARGET_E850_96
endchoice
endif
config TARGET_EXYNOS_MOBILE
bool "Samsung Exynos Generic Boards (for mobile devices)"
select ARM64
select BOARD_EARLY_INIT_F
select CLK_EXYNOS
select LINUX_KERNEL_IMAGE_HEADER
select OF_CONTROL
config SYS_SOC
default "exynos"
@@ -277,5 +285,6 @@ source "board/samsung/smdk5420/Kconfig"
source "board/samsung/espresso7420/Kconfig"
source "board/samsung/axy17lte/Kconfig"
source "board/samsung/e850-96/Kconfig"
source "board/samsung/exynos-mobile/Kconfig"
endif

View File

@@ -10,7 +10,7 @@
int imx_clk_scmi_enable(u32 clock_id, bool enable)
{
struct scmi_clk_state_in in = {
struct scmi_clk_state_in_v1 in = {
.clock_id = clock_id,
.attributes = !!enable,
};

View File

@@ -68,6 +68,11 @@ static const char * const main_cp_gemac_cpts_clk_sel_out0_parents[] = {
"sam62_pll_ctrl_wrap_main_0_chip_div1_clk_clk",
};
static const char * const main_emmcsd0_refclk_sel_out0_parents[] = {
"postdiv4_16ff_main_0_hsdivout5_clk",
"hsdiv4_16fft_main_2_hsdivout2_clk",
};
static const char * const main_emmcsd1_refclk_sel_out0_parents[] = {
"postdiv4_16ff_main_0_hsdivout5_clk",
"hsdiv4_16fft_main_2_hsdivout2_clk",
@@ -106,6 +111,8 @@ static const char * const main_timerclkn_sel_out0_parents[] = {
NULL,
NULL,
NULL,
NULL,
NULL,
};
static const char * const wkup_clkout_sel_out0_parents[] = {
@@ -205,6 +212,7 @@ static const struct clk_data clk_list[] = {
CLK_MUX_PLLCTRL("sam62_pll_ctrl_wrap_mcu_0_sysclkout_clk", sam62_pll_ctrl_wrap_mcu_0_sysclkout_clk_parents, 2, 0x4020000, 0),
CLK_DIV("sam62_pll_ctrl_wrap_mcu_0_chip_div1_clk_clk", "sam62_pll_ctrl_wrap_mcu_0_sysclkout_clk", 0x4020118, 0, 5, 0, 0),
CLK_MUX("clkout0_ctrl_out0", clkout0_ctrl_out0_parents, 2, 0x108010, 0, 1, 0),
CLK_MUX("main_emmcsd0_refclk_sel_out0", main_emmcsd0_refclk_sel_out0_parents, 2, 0x108160, 0, 1, 0),
CLK_MUX("main_cp_gemac_cpts_clk_sel_out0", main_cp_gemac_cpts_clk_sel_out0_parents, 8, 0x108140, 0, 3, 0),
CLK_MUX("main_emmcsd1_refclk_sel_out0", main_emmcsd1_refclk_sel_out0_parents, 2, 0x108168, 0, 1, 0),
CLK_MUX("main_gtcclk_sel_out0", main_gtcclk_sel_out0_parents, 8, 0x43008030, 0, 3, 0),
@@ -262,6 +270,10 @@ static const struct dev_clk soc_dev_clk_data[] = {
DEV_CLK(36, 10, "board_0_cp_gemac_cpts0_rft_clk_out"),
DEV_CLK(36, 11, "hsdiv4_16fft_main_1_hsdivout3_clk"),
DEV_CLK(36, 12, "postdiv4_16ff_main_2_hsdivout6_clk"),
DEV_CLK(57, 1, "sam62_pll_ctrl_wrap_main_0_chip_div1_clk_clk"),
DEV_CLK(57, 2, "main_emmcsd0_refclk_sel_out0"),
DEV_CLK(57, 3, "postdiv4_16ff_main_0_hsdivout5_clk"),
DEV_CLK(57, 4, "hsdiv4_16fft_main_2_hsdivout2_clk"),
DEV_CLK(36, 13, "cpsw_3guss_am67_main_0_cpts_genf0"),
DEV_CLK(36, 14, "cpsw_3guss_am67_main_0_cpts_genf1"),
DEV_CLK(58, 0, "main_emmcsd1_io_clklb_sel_out0"),

View File

@@ -23,18 +23,19 @@ static struct ti_pd soc_pd_list[] = {
static struct ti_lpsc soc_lpsc_list[] = {
[0] = PSC_LPSC(0, &soc_psc_list[0], &soc_pd_list[0], NULL),
[1] = PSC_LPSC(12, &soc_psc_list[0], &soc_pd_list[0], &soc_lpsc_list[4]),
[2] = PSC_LPSC(13, &soc_psc_list[0], &soc_pd_list[0], &soc_lpsc_list[4]),
[3] = PSC_LPSC(21, &soc_psc_list[0], &soc_pd_list[0], &soc_lpsc_list[6]),
[4] = PSC_LPSC(23, &soc_psc_list[0], &soc_pd_list[0], &soc_lpsc_list[6]),
[5] = PSC_LPSC(28, &soc_psc_list[0], &soc_pd_list[0], &soc_lpsc_list[6]),
[6] = PSC_LPSC(34, &soc_psc_list[0], &soc_pd_list[0], &soc_lpsc_list[6]),
[7] = PSC_LPSC(42, &soc_psc_list[0], &soc_pd_list[0], &soc_lpsc_list[6]),
[8] = PSC_LPSC(53, &soc_psc_list[0], &soc_pd_list[1], &soc_lpsc_list[6]),
[9] = PSC_LPSC(56, &soc_psc_list[0], &soc_pd_list[2], &soc_lpsc_list[8]),
[10] = PSC_LPSC(72, &soc_psc_list[0], &soc_pd_list[3], &soc_lpsc_list[6]),
[11] = PSC_LPSC(73, &soc_psc_list[0], &soc_pd_list[3], &soc_lpsc_list[10]),
[12] = PSC_LPSC(74, &soc_psc_list[0], &soc_pd_list[3], &soc_lpsc_list[11]),
[1] = PSC_LPSC(12, &soc_psc_list[0], &soc_pd_list[0], &soc_lpsc_list[5]),
[2] = PSC_LPSC(13, &soc_psc_list[0], &soc_pd_list[0], &soc_lpsc_list[5]),
[3] = PSC_LPSC(20, &soc_psc_list[0], &soc_pd_list[0], &soc_lpsc_list[7]),
[4] = PSC_LPSC(21, &soc_psc_list[0], &soc_pd_list[0], &soc_lpsc_list[7]),
[5] = PSC_LPSC(23, &soc_psc_list[0], &soc_pd_list[0], &soc_lpsc_list[7]),
[6] = PSC_LPSC(28, &soc_psc_list[0], &soc_pd_list[0], &soc_lpsc_list[7]),
[7] = PSC_LPSC(34, &soc_psc_list[0], &soc_pd_list[0], &soc_lpsc_list[7]),
[8] = PSC_LPSC(42, &soc_psc_list[0], &soc_pd_list[0], &soc_lpsc_list[7]),
[9] = PSC_LPSC(53, &soc_psc_list[0], &soc_pd_list[1], &soc_lpsc_list[7]),
[10] = PSC_LPSC(56, &soc_psc_list[0], &soc_pd_list[2], &soc_lpsc_list[9]),
[11] = PSC_LPSC(72, &soc_psc_list[0], &soc_pd_list[3], &soc_lpsc_list[7]),
[12] = PSC_LPSC(73, &soc_psc_list[0], &soc_pd_list[3], &soc_lpsc_list[11]),
[13] = PSC_LPSC(74, &soc_psc_list[0], &soc_pd_list[3], &soc_lpsc_list[12]),
};
static struct ti_dev soc_dev_list[] = {
@@ -43,18 +44,19 @@ static struct ti_dev soc_dev_list[] = {
PSC_DEV(61, &soc_lpsc_list[0]),
PSC_DEV(178, &soc_lpsc_list[1]),
PSC_DEV(179, &soc_lpsc_list[2]),
PSC_DEV(58, &soc_lpsc_list[3]),
PSC_DEV(161, &soc_lpsc_list[4]),
PSC_DEV(75, &soc_lpsc_list[5]),
PSC_DEV(36, &soc_lpsc_list[6]),
PSC_DEV(102, &soc_lpsc_list[6]),
PSC_DEV(146, &soc_lpsc_list[6]),
PSC_DEV(13, &soc_lpsc_list[7]),
PSC_DEV(166, &soc_lpsc_list[8]),
PSC_DEV(135, &soc_lpsc_list[9]),
PSC_DEV(170, &soc_lpsc_list[10]),
PSC_DEV(177, &soc_lpsc_list[11]),
PSC_DEV(55, &soc_lpsc_list[12]),
PSC_DEV(57, &soc_lpsc_list[3]),
PSC_DEV(58, &soc_lpsc_list[4]),
PSC_DEV(161, &soc_lpsc_list[5]),
PSC_DEV(75, &soc_lpsc_list[6]),
PSC_DEV(36, &soc_lpsc_list[7]),
PSC_DEV(102, &soc_lpsc_list[7]),
PSC_DEV(146, &soc_lpsc_list[7]),
PSC_DEV(13, &soc_lpsc_list[8]),
PSC_DEV(166, &soc_lpsc_list[9]),
PSC_DEV(135, &soc_lpsc_list[10]),
PSC_DEV(170, &soc_lpsc_list[11]),
PSC_DEV(177, &soc_lpsc_list[12]),
PSC_DEV(55, &soc_lpsc_list[13]),
};
const struct ti_k3_pd_platdata j722s_pd_platdata = {

View File

@@ -46,6 +46,11 @@ config RCAR_GEN4
select RCAR_64
select PINCTRL_PFC
config RCAR_GEN5
bool "Renesas ARM SoCs R-Car Gen5 (64bit)"
select RCAR_64
select PINCTRL_PFC
config RZA1
prompt "Renesas ARM SoCs RZ/A1 (32bit)"
select CPU_V7A

View File

@@ -8,5 +8,6 @@ config OF_LIBFDT_OVERLAY
source "arch/arm/mach-renesas/Kconfig.rcar3"
source "arch/arm/mach-renesas/Kconfig.rcar4"
source "arch/arm/mach-renesas/Kconfig.rcar5"
endif

View File

@@ -0,0 +1,26 @@
if RCAR_GEN5
menu "Select Target SoC"
config R8A78000
bool "Renesas SoC R8A78000"
select GICV3
imply PINCTRL_PFC_R8A78000
endmenu
choice
prompt "Renesas ARM64 SoCs board select"
optional
config TARGET_IRONHIDE
bool "Ironhide board"
imply R8A78000
help
Support for Renesas R-Car Gen5 Ironhide platform
endchoice
source "board/renesas/ironhide/Kconfig"
endif

View File

@@ -12,6 +12,7 @@ obj-$(CONFIG_RCAR_GEN2) += lowlevel_init_ca15.o cpu_info-rcar.o
obj-$(CONFIG_RCAR_64) += lowlevel_init_gen3.o
obj-$(CONFIG_RCAR_GEN3) += cpu_info-rcar.o memmap-gen3.o
obj-$(CONFIG_RCAR_GEN4) += cpu_info-rcar.o memmap-gen3.o
obj-$(CONFIG_RCAR_GEN5) += cpu_info-rcar.o memmap-gen3.o
obj-$(CONFIG_RZ_G2) += cpu_info-rzg.o
obj-$(CONFIG_RZG2L) += cpu_info-rzg2l.o memmap-rzg2l.o

View File

@@ -15,8 +15,12 @@
static u32 renesas_get_prr(void)
{
if (IS_ENABLED(CONFIG_RCAR_64))
return readl(0xFFF00044);
if (IS_ENABLED(CONFIG_RCAR_64)) {
if (IS_ENABLED(CONFIG_RCAR_GEN5))
return readl(0x189E0044);
else
return readl(0xFFF00044);
}
return readl(0xFF000044);
}

View File

@@ -72,6 +72,7 @@ static const struct {
{ RENESAS_CPU_TYPE_R8A779F0, "R8A779F0" },
{ RENESAS_CPU_TYPE_R8A779G0, "R8A779G0" },
{ RENESAS_CPU_TYPE_R8A779H0, "R8A779H0" },
{ RMOBILE_CPU_TYPE_R8A78000, "R8A78000" },
{ 0x0, "CPU" },
};

View File

@@ -0,0 +1,44 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (C) 2025 Renesas Electronics Corp.
*/
#ifndef __ASM_ARCH_RCAR_GEN5_BASE_H
#define __ASM_ARCH_RCAR_GEN5_BASE_H
/*
* R-Car (R8A78000) I/O Addresses
*/
#define TMU_BASE 0x1C030000
/* Arm Generic Timer */
#define CNTCR_BASE 0x1C000FFF /* Region 0 */
#define CNTFID0 (CNTCR_BASE + 0x020)
#define CNTCR_EN BIT(0)
/* Reset */
#define RST_BASE 0xC1320000 /* Domain0 */
#define RST_SWSRES1A (RST_BASE + 0x410)
#define RST_WDTRSTCR (RST_BASE + 0x420)
#define RST_RWDT_RSTMSK BIT(0)
#define RST_WWDT_RSTMSK BIT(2)
#define RST_RESKCPROT0 (RST_BASE + 0x4F0)
#define RST_KCPROT_DIS 0xA5A5A501
/* GICv4 */
/* Distributor Registers */
#define GICD_BASE 0x38000000
#define GICR_BASE (GICR_LPI_BASE)
/* ReDistributor Registers for Control and Physical LPIs */
#define GICR_LPI_BASE 0x38080000
#define GICR_WAKER 0x0014
#define GICR_PWRR 0x0024
#define GICR_LPI_WAKER (GICR_LPI_BASE + GICR_WAKER)
#define GICR_LPI_PWRR (GICR_LPI_BASE + GICR_PWRR)
/* ReDistributor Registers for SGIs and PPIs */
#define GICR_SGI_BASE 0x38090000
#define GICR_IGROUPR0 0x0080
#endif /* __ASM_ARCH_RCAR_GEN5_BASE_H */

View File

@@ -16,6 +16,8 @@
#include <asm/arch/rcar-gen3-base.h>
#elif defined(CONFIG_RCAR_GEN4)
#include <asm/arch/rcar-gen4-base.h>
#elif defined(CONFIG_RCAR_GEN5)
#include <asm/arch/rcar-gen5-base.h>
#elif defined(CONFIG_R7S72100)
#elif defined(CONFIG_RZG2L)
#include <asm/arch/rzg2l.h>
@@ -42,6 +44,7 @@
#define RENESAS_CPU_TYPE_R8A779F0 0x5A
#define RENESAS_CPU_TYPE_R8A779G0 0x5C
#define RENESAS_CPU_TYPE_R8A779H0 0x5D
#define RMOBILE_CPU_TYPE_R8A78000 0x60
#define RENESAS_CPU_TYPE_R9A07G044L 0x9A070440
#ifndef __ASSEMBLY__

View File

@@ -32,7 +32,12 @@ u32 __secure psci_version(void)
void __secure __noreturn psci_system_reset(void)
{
#if defined(CONFIG_RCAR_GEN5)
writel(RST_KCPROT_DIS, RST_RESKCPROT0);
writel(0x1, RST_SWSRES1A);
#else
writel(RST_SPRES, RST_SRESCR0);
#endif
while (1)
;

View File

@@ -706,6 +706,14 @@ config ROCKCHIP_SPI_IMAGE
option to produce a SPI-flash image containing U-Boot. The image
is built by binman. U-Boot sits near the start of the image.
config ROCKCHIP_MASKROM_IMAGE
bool "Build a maskrom mode image for Rockchip"
depends on TPL || ROCKCHIP_EXTERNAL_TPL
select SPL_RAM_DEVICE
help
Rockchip SoCs support maskrom mode boot over USB. Enable this
option to produce maskrom mode boot images containing U-Boot.
config LNX_KRNL_IMG_TEXT_OFFSET_BASE
default TEXT_BASE
@@ -768,9 +776,9 @@ config TPL_SYS_MALLOC_F_LEN
default 0x4000 if CUSTOM_SYS_INIT_SP_ADDR = 0x03f00000
config TEXT_BASE
default 0x60200000 if SPL_TEXT_BASE = 0x60000000
default 0x40200000 if SPL_TEXT_BASE = 0x40000000
default 0x00200000 if SPL_TEXT_BASE = 0x00000000
default 0x60800000 if SPL_TEXT_BASE = 0x60000000
default 0x40800000 if SPL_TEXT_BASE = 0x40000000
default 0x00800000 if SPL_TEXT_BASE = 0x00000000
config SPL_TEXT_BASE
default 0x60000000 if ROCKCHIP_RK3036 || ROCKCHIP_RK3066 || \

View File

@@ -17,9 +17,6 @@ config ROCKCHIP_STIMER_BASE
config SYS_SOC
default "rk3308"
config TEXT_BASE
default 0x00600000
source "board/rockchip/evb_rk3308/Kconfig"
source "board/firefly/firefly-rk3308/Kconfig"

View File

@@ -70,9 +70,6 @@ config ROCKCHIP_STIMER_BASE
config SYS_SOC
default "rk3568"
config TEXT_BASE
default 0x00a00000
source "board/rockchip/evb_rk3568/Kconfig"
source "board/anbernic/rgxx3_rk3566/Kconfig"
source "board/hardkernel/odroid_m1/Kconfig"

View File

@@ -417,9 +417,6 @@ config ROCKCHIP_STIMER_BASE
config SYS_SOC
default "rk3588"
config TEXT_BASE
default 0x00a00000
source "board/armsom/sige7-rk3588/Kconfig"
source "board/coolpi/genbook_cm5_rk3588/Kconfig"
source "board/edgeble/neural-compute-module-6/Kconfig"

View File

@@ -63,7 +63,20 @@ static struct mm_region rk3588_mem_map[] = {
{
.virt = 0x0UL,
.phys = 0x0UL,
.size = 0xf0000000UL,
.size = 0x10f000UL,
.attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) |
PTE_BLOCK_INNER_SHARE
}, {
/* SCMI shared memory area must be mapped as non-cacheable. */
.virt = 0x10f000UL,
.phys = 0x10f000UL,
.size = 0x1000UL,
.attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL_NC) |
PTE_BLOCK_INNER_SHARE
}, {
.virt = 0x110000UL,
.phys = 0x110000UL,
.size = 0xefef0000UL,
.attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) |
PTE_BLOCK_INNER_SHARE
}, {

View File

@@ -345,6 +345,21 @@ int dram_init_banksize(void)
return 0;
}
u8 rockchip_sdram_type(phys_addr_t reg)
{
u32 dram_type, version;
u32 sys_reg2 = readl(reg);
u32 sys_reg3 = readl(reg + 4);
dram_type = (sys_reg2 >> SYS_REG_DDRTYPE_SHIFT) & SYS_REG_DDRTYPE_MASK;
version = (sys_reg3 >> SYS_REG_VERSION_SHIFT) & SYS_REG_VERSION_MASK;
if (version >= 3)
dram_type |= ((sys_reg3 >> SYS_REG_EXTEND_DDRTYPE_SHIFT) &
SYS_REG_EXTEND_DDRTYPE_MASK) << 3;
return dram_type;
}
size_t rockchip_sdram_size(phys_addr_t reg)
{
u32 rank, cs0_col, bk, cs0_row, cs1_row, bw, row_3_4;

View File

@@ -8,6 +8,7 @@
#include <log.h>
#include <mmc.h>
#include <spl.h>
#include <asm/arch-rockchip/bootrom.h>
#include <asm/global_data.h>
#include <dm/uclass-internal.h>
@@ -98,15 +99,22 @@ __weak const char *board_spl_was_booted_from(void)
void board_boot_order(u32 *spl_boot_list)
{
int idx = 0;
/* Add RAM boot for maskrom mode boot over USB */
if (BROM_BOOTSOURCE_ID_ADDR && CONFIG_IS_ENABLED(RAM_DEVICE) &&
read_brom_bootsource_id() == BROM_BOOTSOURCE_USB) {
spl_boot_list[idx++] = BOOT_DEVICE_RAM;
}
/* In case of no fdt (or only plat), use spl_boot_device() */
if (!CONFIG_IS_ENABLED(OF_CONTROL) || CONFIG_IS_ENABLED(OF_PLATDATA)) {
spl_boot_list[0] = spl_boot_device();
spl_boot_list[idx++] = spl_boot_device();
return;
}
const void *blob = gd->fdt_blob;
int chosen_node = fdt_path_offset(blob, "/chosen");
int idx = 0;
int elem;
int boot_device;
int node;
@@ -115,7 +123,7 @@ void board_boot_order(u32 *spl_boot_list)
if (chosen_node < 0) {
debug("%s: /chosen not found, using spl_boot_device()\n",
__func__);
spl_boot_list[0] = spl_boot_device();
spl_boot_list[idx++] = spl_boot_device();
return;
}

View File

@@ -0,0 +1,48 @@
# SPDX-License-Identifier: GPL-2.0+
#
# Brian Sune <briansune@gmail.com>
ifeq ($(CONFIG_TARGET_SOCFPGA_CYCLONE5),y)
archprepare: socfpga_g5_handoff_prepare
else ifeq ($(CONFIG_TARGET_SOCFPGA_ARRIA5),y)
archprepare: socfpga_g5_handoff_prepare
endif
socfpga_g5_handoff_prepare:
@SOCFAMILY="$(SOCFAMILY)"; \
if [ -z "$$SOCFAMILY" ]; then \
exit 0; \
fi; \
echo "[INFO] SOC family detected: $$SOCFAMILY";
@set -- $$(awk -F'"' ' \
/^CONFIG_SYS_VENDOR=/ {v=$$2} \
/^CONFIG_SYS_BOARD=/ {b=$$2} \
END {print v, b}' .config); \
VENDOR=$$1; \
BOARD=$$2; \
if [ -z "$$VENDOR" ] || [ -z "$$BOARD" ]; then \
exit 0; \
fi; \
BOARD_DIR=$(src)/board/$$VENDOR/$$BOARD; \
if [ "$$HANDOFF_PATH" ]; then \
echo "[INFO] Using manually specified handoff folder: $$HANDOFF_PATH"; \
else \
HANDOFF_BASE=$$BOARD_DIR/hps_isw_handoff; \
if [ ! -d "$$HANDOFF_BASE" ]; then \
exit 0; \
fi; \
HANDOFF_PATH=$$(ls -d "$$HANDOFF_BASE"/*/ 2>/dev/null | head -n1); \
if [ -z "$$HANDOFF_PATH" ]; then \
exit 0; \
fi; \
echo "[INFO] Auto-detected handoff folder: $$HANDOFF_PATH"; \
fi; \
HIOF_FILE=$$HANDOFF_PATH/$$(basename $$HANDOFF_PATH).hiof; \
if [ ! -f "$$HIOF_FILE" ]; then \
echo "[WARN] No .hiof file found in $$HANDOFF_PATH, skipping BSP generation."; \
exit 0; \
fi; \
echo "[INFO] Found hiof file: $$HIOF_FILE"; \
echo "[INFO] Running BSP generator..."; \
python3 $(src)/tools/cv_bsp_generator/cv_bsp_generator.py -i "$$HANDOFF_PATH" -o "$$BOARD_DIR/qts" || echo "[WARN] BSP generator failed, continuing..."; \
echo "[DONE] SoCFPGA QTS handoff conversion complete."

View File

@@ -222,7 +222,7 @@ static int do_bridge(struct cmd_tbl *cmdtp, int flag, int argc,
}
U_BOOT_CMD(bridge, 3, 1, do_bridge,
"SoCFPGA HPS FPGA bridge control",
"GEN5 SoCFPGA HPS FPGA bridge control",
"enable [mask] - Enable HPS-to-FPGA (Bit 0), LWHPS-to-FPGA (Bit 1), FPGA-to-HPS (Bit 2) bridges\n"
"bridge disable [mask] - Disable HPS-to-FPGA (Bit 0), LWHPS-to-FPGA (Bit 1), FPGA-to-HPS (Bit 2) bridges\n"
""
@@ -261,7 +261,16 @@ void socfpga_get_managers_addr(void)
if (ret)
hang();
else if (IS_ENABLED(CONFIG_TARGET_SOCFPGA_N5X))
if (!IS_ENABLED(CONFIG_TARGET_SOCFPGA_AGILEX) &&
!IS_ENABLED(CONFIG_TARGET_SOCFPGA_AGILEX7M) &&
!IS_ENABLED(CONFIG_TARGET_SOCFPGA_AGILEX5)) {
ret = socfpga_get_base_addr("altr,sys-mgr",
&socfpga_sysmgr_base);
if (ret)
hang();
}
if (IS_ENABLED(CONFIG_TARGET_SOCFPGA_N5X))
ret = socfpga_get_base_addr("intel,n5x-clkmgr",
&socfpga_clkmgr_base);
else if (!IS_ENABLED(CONFIG_TARGET_SOCFPGA_AGILEX) &&

View File

@@ -217,6 +217,34 @@ int arch_early_init_r(void)
static struct socfpga_sdr_ctrl *sdr_ctrl =
(struct socfpga_sdr_ctrl *)SDR_CTRLGRP_ADDRESS;
void socfpga_sdram_apply_static_cfg(void)
{
const u32 applymask = 0x8;
u32 val = readl(&sdr_ctrl->static_cfg) | applymask;
/*
* SDRAM staticcfg register specific:
* When applying the register setting, the CPU must not access
* SDRAM. Luckily for us, we can use i-cache here to help us
* circumvent the SDRAM access issue. The idea is to make sure
* that the code is in one full i-cache line by branching past
* it and back. Once it is in the i-cache, we execute the core
* of the code and apply the register settings.
*
* The code below uses 7 instructions, while the Cortex-A9 has
* 32-byte cachelines, thus the limit is 8 instructions total.
*/
asm volatile(".align 5 \n"
" b 2f \n"
"1: str %0, [%1] \n"
" dsb \n"
" isb \n"
" b 3f \n"
"2: b 1b \n"
"3: nop \n"
: : "r"(val), "r"(&sdr_ctrl->static_cfg) : "memory", "cc");
}
void do_bridge_reset(int enable, unsigned int mask)
{
int i;
@@ -234,7 +262,10 @@ void do_bridge_reset(int enable, unsigned int mask)
writel(iswgrp_handoff[2],
socfpga_get_sysmgr_addr() +
SYSMGR_GEN5_FPGAINFGRP_MODULE);
writel(iswgrp_handoff[3], &sdr_ctrl->fpgaport_rst);
if (iswgrp_handoff[3]) {
writel(iswgrp_handoff[3], &sdr_ctrl->fpgaport_rst);
socfpga_sdram_apply_static_cfg();
}
writel(iswgrp_handoff[0],
socfpga_get_rstmgr_addr() + RSTMGR_GEN5_BRGMODRST);
writel(iswgrp_handoff[1], &nic301_regs->remap);
@@ -246,6 +277,7 @@ void do_bridge_reset(int enable, unsigned int mask)
writel(0, socfpga_get_sysmgr_addr() +
SYSMGR_GEN5_FPGAINFGRP_MODULE);
writel(0, &sdr_ctrl->fpgaport_rst);
socfpga_sdram_apply_static_cfg();
writel(0x7, socfpga_get_rstmgr_addr() + RSTMGR_GEN5_BRGMODRST);
writel(1, &nic301_regs->remap);
}

View File

@@ -17,6 +17,17 @@ config TARGET_ST_STM32MP13X
managed by board/st/stm32mp1.
The difference between board are managed with devicetree
config TARGET_DH_STM32MP13X
bool "DH electronics STM32MP13x boards"
imply BOOTSTAGE
imply CMD_BOOTSTAGE
imply CMD_CLS if CMD_BMP
imply DISABLE_CONSOLE
imply PRE_CONSOLE_BUFFER
imply SILENT_CONSOLE
help
Target the DH DHSBC development kit with STM32MP13x SoM.
endchoice
config TEXT_BASE
@@ -50,6 +61,7 @@ config DEBUG_UART_CLOCK
default 64000000
endif
source "board/dhelectronics/dh_stm32mp1/Kconfig"
source "board/st/stm32mp1/Kconfig"
endif

View File

@@ -65,6 +65,7 @@ int dram_init(void)
phys_addr_t board_get_usable_ram_top(phys_size_t total_size)
{
phys_addr_t top = gd->ram_top;
phys_size_t size;
phys_addr_t reg;
u32 optee_start, optee_size;
@@ -86,7 +87,8 @@ phys_addr_t board_get_usable_ram_top(phys_size_t total_size)
/* Reserved memory for OP-TEE at END of DDR for STM32MP1 SoC */
if (IS_ENABLED(CONFIG_STM32MP13X) || IS_ENABLED(CONFIG_STM32MP15X)) {
if (!optee_get_reserved_memory(&optee_start, &optee_size))
reg = ALIGN(optee_start - size, MMU_SECTION_SIZE);
if (optee_start + optee_size == top)
reg = ALIGN(optee_start - size, MMU_SECTION_SIZE);
}
/* before relocation, mark the U-Boot memory as cacheable by default */

View File

@@ -82,11 +82,12 @@ void dram_bank_mmu_setup(int bank)
i++) {
addr = i << MMU_SECTION_SHIFT;
option = DCACHE_DEFAULT_OPTION;
if (use_lmb &&
(lmb_is_reserved_flags(i << MMU_SECTION_SHIFT, LMB_NOMAP) ||
(gd->ram_top && addr >= gd->ram_top))
)
option = 0; /* INVALID ENTRY in TLB */
if (use_lmb) {
if (lmb_is_reserved_flags(i << MMU_SECTION_SHIFT, LMB_NOMAP))
continue;
if (gd->ram_top && addr >= gd->ram_top)
option = 0; /* INVALID ENTRY in TLB */
}
set_section_dcache(i, option);
}
}

View File

@@ -77,6 +77,14 @@ int get_eth_nb(void)
case CPU_STM32MP257Axx:
nb_eth = 5; /* dual ETH with TSN support */
break;
case CPU_STM32MP255Fxx:
fallthrough;
case CPU_STM32MP255Dxx:
fallthrough;
case CPU_STM32MP255Cxx:
fallthrough;
case CPU_STM32MP255Axx:
fallthrough;
case CPU_STM32MP253Fxx:
fallthrough;
case CPU_STM32MP253Dxx:

View File

@@ -10,6 +10,7 @@
static const struct udevice_id stm32mp_syscon_ids[] = {
{ .compatible = "st,stm32mp157-syscfg", .data = STM32MP_SYSCON_SYSCFG },
{ .compatible = "st,stm32mp23-syscfg", .data = STM32MP_SYSCON_SYSCFG},
{ .compatible = "st,stm32mp25-syscfg", .data = STM32MP_SYSCON_SYSCFG},
{ }
};

View File

@@ -50,10 +50,10 @@ cmd_u-boot-spl = (cd $(obj) && \
ifeq ($(HOST_ARCH),$(HOST_ARCH_X86_64))
EFI_LDS := ${SRCDIR}/../../../arch/x86/lib/elf_x86_64_efi.lds
EFI_TARGET := --target=efi-app-x86_64
EFI_TARGET := --output-target=efi-app-x86_64
else ifeq ($(HOST_ARCH),$(HOST_ARCH_X86))
EFI_LDS := ${SRCDIR}/../../../arch/x86/lib/elf_ia32_efi.lds
EFI_TARGET := --target=efi-app-ia32
EFI_TARGET := --output-target=efi-app-ia32
else ifeq ($(HOST_ARCH),$(HOST_ARCH_AARCH64))
EFI_LDS := ${SRCDIR}/../../../arch/arm/lib/elf_aarch64_efi.lds
OBJCOPYFLAGS += -j .text -j .secure_text -j .secure_data -j .rodata -j .data \

View File

@@ -72,6 +72,7 @@ SECTIONS
__u_boot_list : {
KEEP(*(SORT(__u_boot_list*)));
. = ALIGN(8);
} >ram
PROVIDE (__init_end = .);
@@ -83,7 +84,7 @@ SECTIONS
.bss :
{
*(.bss)
. = ALIGN(4);
. = ALIGN(8);
} >ram
PROVIDE (bss_end = .);
PROVIDE (__bss_end = .);

View File

@@ -69,7 +69,7 @@ endif
LDSCRIPT_EFI := $(srctree)/arch/x86/lib/elf_$(EFIARCH)_efi.lds
EFISTUB := crt0_$(EFIARCH)_efi.o reloc_$(EFIARCH)_efi.o
OBJCOPYFLAGS_EFI += --target=efi-app-$(EFIARCH)
OBJCOPYFLAGS_EFI += --output-target=efi-app-$(EFIARCH)
CPPFLAGS_REMOVE_crt0-efi-$(EFIARCH).o += $(CFLAGS_NON_EFI)
CPPFLAGS_crt0-efi-$(EFIARCH).o += $(CFLAGS_EFI)
@@ -127,7 +127,7 @@ endif
endif
ifdef CONFIG_X86_64
EFI_TARGET := --target=efi-app-x86_64
EFI_TARGET := --output-target=efi-app-x86_64
else
EFI_TARGET := --target=efi-app-ia32
EFI_TARGET := --output-target=efi-app-ia32
endif

View File

@@ -1,9 +1,8 @@
BRPPT1 BOARD
M: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
M: Wolfgang Wallner <wolfgang.wallner@at.abb.com>
S: Maintained
F: board/BuR/brppt1/
F: board/BuR/common/
F: include/configs/brppt1.h
F: configs/brppt1_mmc_defconfig
F: configs/brppt1_nand_defconfig
F: configs/brppt1_spi_defconfig
F: arch/arm/dts/am335x-brppt1-mmc*

View File

@@ -1,7 +1,8 @@
BUR_PPT2 BOARD
M: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
M: Wolfgang Wallner <wolfgang.wallner@at.abb.com>
S: Maintained
F: board/BuR/brppt2/
F: board/BuR/common/
F: include/configs/brppt2.h
F: configs/brppt2_defconfig
F: arch/arm/dts/imx6dl-brppt2.dts

View File

@@ -1,7 +1,8 @@
BRSMARC1 BOARD
M: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
M: Wolfgang Wallner <wolfgang.wallner@at.abb.com>
S: Maintained
F: board/BuR/brsmarc1/
F: board/BuR/common/
F: include/configs/brsmarc1.h
F: configs/brsmarc1_defconfig
F: arch/arm/dts/am335x-brsmarc1.dts

View File

@@ -1,5 +1,5 @@
BRXRE1 BOARD
M: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
M: Wolfgang Wallner <wolfgang.wallner@at.abb.com>
S: Maintained
F: board/BuR/brxre1/
F: board/BuR/common/

View File

@@ -1,5 +1,5 @@
ZYNQ BOARD
M: Wolfgang Wallner <wolfgang.wallner@br-automation.com>
M: Wolfgang Wallner <wolfgang.wallner@at.abb.com>
S: Maintained
F: board/BuR/zynq/
F: board/BuR/common/

View File

@@ -1,5 +1,5 @@
INTEGRATOR BOARD
M: Linus Walleij <linus.walleij@linaro.org>
M: Linus Walleij <linusw@kernel.org>
S: Maintained
F: board/armltd/integrator/
F: include/configs/integratorcp.h

View File

@@ -1,18 +1,18 @@
VEXPRESS64 PLATFORM
M: David Feng <fenghua@phytium.com.cn>
M: Linus Walleij <linus.walleij@linaro.org>
M: Linus Walleij <linusw@kernel.org>
M: Peter Hoyes <Peter.Hoyes@arm.com>
S: Maintained
F: board/armltd/vexpress64/
F: include/configs/vexpress_aemv8.h
VEXPRESS_AEMV8A_SEMI BOARD
M: Linus Walleij <linus.walleij@linaro.org>
M: Linus Walleij <linusw@kernel.org>
S: Maintained
F: configs/vexpress_aemv8a_semi_defconfig
JUNO DEVELOPMENT PLATFORM BOARD
M: Linus Walleij <linus.walleij@linaro.org>
M: Linus Walleij <linusw@kernel.org>
S: Maintained
F: configs/vexpress_aemv8a_juno_defconfig

View File

@@ -1,5 +1,5 @@
BCMNS BOARD
M: Linus Walleij <linus.walleij@linaro.org>
M: Linus Walleij <linusw@kernel.org>
S: Maintained
F: board/broadcom/bcmns/
F: configs/bcmns_defconfig

View File

@@ -246,3 +246,40 @@ __weak int dh_setup_mac_address(struct eeprom_id_page *eip)
printf("%s: Unable to set mac address!\n", __func__);
return -ENXIO;
}
void dh_add_item_number_and_serial_to_env(struct eeprom_id_page *eip)
{
char *item_number_env;
char item_number[8]; /* String with 7 characters + string termination */
char *serial_env;
char serial[10]; /* String with 9 characters + string termination */
int ret;
ret = dh_get_value_from_eeprom_buffer(DH_ITEM_NUMBER, item_number, sizeof(item_number),
eip);
if (ret) {
printf("%s: Unable to get DHSOM item number from EEPROM ID page! ret = %d\n",
__func__, ret);
} else {
item_number_env = env_get("dh_som_item_number");
if (!item_number_env)
env_set("dh_som_item_number", item_number);
else if (strcmp(item_number_env, item_number))
printf("Warning: Environment dh_som_item_number differs from EEPROM ID page value (%s != %s)\n",
item_number_env, item_number);
}
ret = dh_get_value_from_eeprom_buffer(DH_SERIAL_NUMBER, serial, sizeof(serial),
eip);
if (ret) {
printf("%s: Unable to get DHSOM serial number from EEPROM ID page! ret = %d\n",
__func__, ret);
} else {
serial_env = env_get("dh_som_serial_number");
if (!serial_env)
env_set("dh_som_serial_number", serial);
else if (strcmp(serial_env, serial))
printf("Warning: Environment dh_som_serial_number differs from EEPROM ID page value (%s != %s)\n",
serial_env, serial);
}
}

View File

@@ -107,7 +107,16 @@ int dh_get_value_from_eeprom_buffer(enum eip_request_values request, u8 *data, i
/*
* dh_setup_mac_address - Try to get MAC address from various locations and write it to env
* @eip: ID EEPROM buffer
*
* Return: 0 if OK, other value on error
*/
int dh_setup_mac_address(struct eeprom_id_page *eip);
/*
* dh_add_item_number_and_serial_to_env - Try to get DH IDs from WLP write them to env
* @eip: ID EEPROM buffer
*
* Return: 0 if OK, other value on error
*/
void dh_add_item_number_and_serial_to_env(struct eeprom_id_page *eip);

View File

@@ -116,43 +116,6 @@ int dh_setup_mac_address(struct eeprom_id_page *eip)
return ret;
}
void dh_add_item_number_and_serial_to_env(struct eeprom_id_page *eip)
{
char *item_number_env;
char item_number[8]; /* String with 7 characters + string termination */
char *serial_env;
char serial[10]; /* String with 9 characters + string termination */
int ret;
ret = dh_get_value_from_eeprom_buffer(DH_ITEM_NUMBER, item_number, sizeof(item_number),
eip);
if (ret) {
printf("%s: Unable to get DHSOM item number from EEPROM ID page! ret = %d\n",
__func__, ret);
} else {
item_number_env = env_get("dh_som_item_number");
if (!item_number_env)
env_set("dh_som_item_number", item_number);
else if (strcmp(item_number_env, item_number))
printf("Warning: Environment dh_som_item_number differs from EEPROM ID page value (%s != %s)\n",
item_number_env, item_number);
}
ret = dh_get_value_from_eeprom_buffer(DH_SERIAL_NUMBER, serial, sizeof(serial),
eip);
if (ret) {
printf("%s: Unable to get DHSOM serial number from EEPROM ID page! ret = %d\n",
__func__, ret);
} else {
serial_env = env_get("dh_som_serial_number");
if (!serial_env)
env_set("dh_som_serial_number", serial);
else if (strcmp(serial_env, serial))
printf("Warning: Environment dh_som_serial_number differs from EEPROM ID page value (%s != %s)\n",
serial_env, serial);
}
}
int board_late_init(void)
{
u8 eeprom_buffer[DH_EEPROM_ID_PAGE_MAX_SIZE] = { 0 };

View File

@@ -20,3 +20,26 @@ config ENV_OFFSET_REDUND
source "board/st/common/Kconfig"
endif
if TARGET_DH_STM32MP13X
config SYS_BOARD
default "dh_stm32mp1"
config SYS_VENDOR
default "dhelectronics"
config SYS_CONFIG_NAME
default "stm32mp13_st_common"
config ENV_SECT_SIZE
default 0x10000 if ENV_IS_IN_SPI_FLASH
config ENV_OFFSET
default 0x3E0000 if ENV_IS_IN_SPI_FLASH
config ENV_OFFSET_REDUND
default 0x3F0000 if ENV_IS_IN_SPI_FLASH
source "board/st/common/Kconfig"
endif

View File

@@ -3,6 +3,10 @@
# Copyright (C) 2018, STMicroelectronics - All Rights Reserved
#
obj-y += ../../st/common/stpmic1.o board.o
obj-$(CONFIG_DEBUG_UART_BOARD_INIT) += ../../st/stm32mp1/debug_uart.o
obj-$(CONFIG_PMIC_STPMIC1) += ../../st/common/stpmic1.o
obj-y += board.o
obj-$(CONFIG_SET_DFU_ALT_INFO) += ../../st/common/stm32mp_dfu.o
obj-$(CONFIG_$(PHASE_)DFU_VIRT) += ../../st/common/stm32mp_dfu_virt.o

View File

@@ -119,7 +119,30 @@ static bool dh_stm32_mac_is_in_ks8851(void)
return false;
}
static int dh_stm32_setup_ethaddr(void)
static int dh_stm32_get_mac_from_fuse(unsigned char *enetaddr, int index)
{
struct udevice *dev;
u8 otp[12];
int ret;
ret = uclass_get_device_by_driver(UCLASS_MISC,
DM_DRIVER_GET(stm32mp_bsec),
&dev);
if (ret)
return ret;
ret = misc_read(dev, STM32_BSEC_SHADOW(BSEC_OTP_MAC), otp, sizeof(otp));
if (ret < 0)
return ret;
memcpy(enetaddr, otp + ARP_HLEN * index, ARP_HLEN);
if (!is_valid_ethaddr(enetaddr))
return -EINVAL;
return 0;
}
static int dh_stm32_setup_ethaddr(struct eeprom_id_page *eip)
{
unsigned char enetaddr[6];
@@ -129,13 +152,22 @@ static int dh_stm32_setup_ethaddr(void)
if (dh_get_mac_is_enabled("ethernet0"))
return 0;
if (!dh_stm32_get_mac_from_fuse(enetaddr, 0))
goto out;
if (!dh_get_value_from_eeprom_buffer(DH_MAC0, enetaddr, sizeof(enetaddr), eip))
goto out;
if (!dh_get_mac_from_eeprom(enetaddr, "eeprom0"))
return eth_env_set_enetaddr("ethaddr", enetaddr);
goto out;
return -ENXIO;
out:
return eth_env_set_enetaddr("ethaddr", enetaddr);
}
static int dh_stm32_setup_eth1addr(void)
static int dh_stm32_setup_eth1addr(struct eeprom_id_page *eip)
{
unsigned char enetaddr[6];
@@ -148,20 +180,50 @@ static int dh_stm32_setup_eth1addr(void)
if (dh_stm32_mac_is_in_ks8851())
return 0;
if (!dh_get_mac_from_eeprom(enetaddr, "eeprom0")) {
enetaddr[5]++;
return eth_env_set_enetaddr("eth1addr", enetaddr);
}
if (!dh_stm32_get_mac_from_fuse(enetaddr, 1))
goto out;
if (!dh_get_value_from_eeprom_buffer(DH_MAC1, enetaddr, sizeof(enetaddr), eip))
goto out;
if (!dh_get_mac_from_eeprom(enetaddr, "eeprom0"))
goto increment_out;
return -ENXIO;
increment_out:
enetaddr[5]++;
out:
return eth_env_set_enetaddr("eth1addr", enetaddr);
}
int setup_mac_address(void)
{
if (dh_stm32_setup_ethaddr())
u8 eeprom_buffer[DH_EEPROM_ID_PAGE_MAX_SIZE] = { 0 };
struct eeprom_id_page *eip = (struct eeprom_id_page *)eeprom_buffer;
int ret;
ret = dh_read_eeprom_id_page(eeprom_buffer, "eeprom0wl");
if (ret) {
/*
* The EEPROM ID page is available on SoM rev. 200 and greater.
* For SoM rev. 100 the return value will be -ENODEV. Suppress
* the error message for that, because the absence cannot be
* treated as an error.
*/
if (ret != -ENODEV)
printf("%s: Cannot read valid data from EEPROM ID page! ret = %d\n",
__func__, ret);
eip = NULL;
} else {
dh_add_item_number_and_serial_to_env(eip);
}
if (dh_stm32_setup_ethaddr(eip))
log_err("%s: Unable to setup ethaddr!\n", __func__);
if (dh_stm32_setup_eth1addr())
if (dh_stm32_setup_eth1addr(eip))
log_err("%s: Unable to setup eth1addr!\n", __func__);
return 0;
@@ -242,17 +304,29 @@ static void board_get_coding_straps(void)
int board_stm32mp1_ddr_config_name_match(struct udevice *dev,
const char *name)
{
if (ddr3code == 1 &&
!strcmp(name, "st,ddr3l-dhsom-1066-888-bin-g-2x1gb-533mhz"))
return 0;
if (IS_ENABLED(CONFIG_TARGET_DH_STM32MP13X)) {
if (ddr3code == 1 &&
!strcmp(name, "st,ddr3l-dhsom-1066-888-bin-g-1x2gb-533mhz"))
return 0;
if (ddr3code == 2 &&
!strcmp(name, "st,ddr3l-dhsom-1066-888-bin-g-2x2gb-533mhz"))
return 0;
if (ddr3code == 2 &&
!strcmp(name, "st,ddr3l-dhsom-1066-888-bin-g-1x4gb-533mhz"))
return 0;
}
if (ddr3code == 3 &&
!strcmp(name, "st,ddr3l-dhsom-1066-888-bin-g-2x4gb-533mhz"))
return 0;
if (IS_ENABLED(CONFIG_TARGET_DH_STM32MP15X)) {
if (ddr3code == 1 &&
!strcmp(name, "st,ddr3l-dhsom-1066-888-bin-g-2x1gb-533mhz"))
return 0;
if (ddr3code == 2 &&
!strcmp(name, "st,ddr3l-dhsom-1066-888-bin-g-2x2gb-533mhz"))
return 0;
if (ddr3code == 3 &&
!strcmp(name, "st,ddr3l-dhsom-1066-888-bin-g-2x4gb-533mhz"))
return 0;
}
return -EINVAL;
}
@@ -692,6 +766,34 @@ void board_quiesce_devices(void)
#endif
}
#ifdef CONFIG_TARGET_DH_STM32MP13X
enum env_location env_get_location(enum env_operation op, int prio)
{
u32 bootmode = get_bootmode();
if (prio)
return ENVL_UNKNOWN;
switch (bootmode & TAMP_BOOT_DEVICE_MASK) {
case BOOT_FLASH_SD:
case BOOT_FLASH_EMMC:
if (CONFIG_IS_ENABLED(ENV_IS_IN_MMC))
return ENVL_MMC;
else
return ENVL_NOWHERE;
case BOOT_FLASH_NOR:
if (CONFIG_IS_ENABLED(ENV_IS_IN_SPI_FLASH))
return ENVL_SPI_FLASH;
else
return ENVL_NOWHERE;
default:
return ENVL_NOWHERE;
}
}
#endif
static void dh_stm32_ks8851_fixup(void *blob)
{
struct gpio_desc ks8851intrn;

View File

@@ -9,4 +9,9 @@ config SYS_VENDOR
config SYS_CONFIG_NAME
default "rock5b-rk3588"
config BOARD_SPECIFIC_OPTIONS # dummy
def_bool y
select ADC
select SPL_ADC
endif

View File

@@ -5,5 +5,4 @@ S: Maintained
F: board/radxa/rock5b-rk3588
F: include/configs/rock5b-rk3588.h
F: configs/rock5b-rk3588_defconfig
F: arch/arm/dts/rk3588-rock-5b.dts
F: arch/arm/dts/rk3588-rock-5b-u-boot.dtsi
F: arch/arm/dts/rk3588-rock-5b*

View File

@@ -3,8 +3,72 @@
* Copyright (c) 2023-2024 Collabora Ltd.
*/
#include <adc.h>
#include <env.h>
#include <fdtdec.h>
#include <fdt_support.h>
#include <asm/arch-rockchip/sdram.h>
#include <linux/errno.h>
#define PMU1GRF_BASE 0xfd58a000
#define OS_REG2_REG 0x208
#define HW_ID_CHANNEL 5
struct board_model {
unsigned int dram;
unsigned int low;
unsigned int high;
const char *fdtfile;
};
static const struct board_model board_models[] = {
{ LPDDR5, 926, 1106, "rockchip/rk3588-rock-5t.dtb" },
{ LPDDR5, 4005, 4185, "rockchip/rk3588-rock-5b-plus.dtb" },
};
static const struct board_model *get_board_model(void)
{
unsigned int val, dram_type;
int i, ret;
dram_type = rockchip_sdram_type(PMU1GRF_BASE + OS_REG2_REG);
ret = adc_channel_single_shot("adc@fec10000", HW_ID_CHANNEL, &val);
if (ret)
return NULL;
for (i = 0; i < ARRAY_SIZE(board_models); i++) {
unsigned int dram = board_models[i].dram;
unsigned int min = board_models[i].low;
unsigned int max = board_models[i].high;
if (dram == dram_type && min <= val && val <= max)
return &board_models[i];
}
return NULL;
}
int rk_board_late_init(void)
{
const struct board_model *model = get_board_model();
if (model)
env_set("fdtfile", model->fdtfile);
return 0;
}
int board_fit_config_name_match(const char *name)
{
const struct board_model *model = get_board_model();
if (model && !strcmp(name, model->fdtfile))
return 0;
return -EINVAL;
}
#ifdef CONFIG_OF_BOARD_SETUP
int ft_board_setup(void *blob, struct bd_info *bd)

View File

@@ -16,7 +16,8 @@ save_boot_params:
/* The firmware provided ATAG/FDT address can be found in r2/x0 */
#ifdef CONFIG_ARM64
adr x8, fw_dtb_pointer
adrp x8, fw_dtb_pointer
add x8, x8, #:lo12:fw_dtb_pointer
str x0, [x8]
#else
ldr r8, =fw_dtb_pointer

View File

@@ -3,6 +3,8 @@
* (C) Copyright 2012-2016 Stephen Warren
*/
#define LOG_CATEGORY LOGC_BOARD
#include <config.h>
#include <dm.h>
#include <env.h>
@@ -332,13 +334,27 @@ int dram_init(void)
#ifdef CONFIG_OF_BOARD
int dram_init_banksize(void)
{
phys_addr_t total_size = 0;
int i;
int ret;
ret = fdtdec_setup_memory_banksize();
if (ret)
return ret;
return fdtdec_setup_mem_size_base();
ret = fdtdec_setup_mem_size_base();
if (ret)
return ret;
/* Update gd->ram_size to reflect total RAM across all banks */
for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) {
if (gd->bd->bi_dram[i].size == 0)
break;
total_size += gd->bd->bi_dram[i].size;
}
gd->ram_size = total_size;
return 0;
}
#endif
@@ -354,15 +370,13 @@ static void set_fdtfile(void)
}
/*
* If the firmware provided a valid FDT at boot time, let's expose it in
* ${fdt_addr} so it may be passed unmodified to the kernel.
* Allow U-Boot to use its control FDT with extlinux if one is not provided.
* This will then go through the usual fixups that U-Boot does, before being
* handed off to Linux
*/
static void set_fdt_addr(void)
{
if (fdt_magic(fw_dtb_pointer) != FDT_MAGIC)
return;
env_set_hex("fdt_addr", fw_dtb_pointer);
env_set_hex("fdt_addr", (ulong)gd->fdt_blob);
}
/*
@@ -608,7 +622,10 @@ int ft_board_setup(void *blob, struct bd_info *bd)
{
int node;
update_fdt_from_fw(blob, (void *)fw_dtb_pointer);
if (blob == gd->fdt_blob)
log_debug("Same FDT: nothing to do\n");
else
update_fdt_from_fw(blob, (void *)gd->fdt_blob);
if (CONFIG_IS_ENABLED(FDT_SIMPLEFB)) {
node = fdt_node_offset_by_compatible(blob, -1, "simple-framebuffer");

View File

@@ -6,7 +6,7 @@ N: grpeach
N: r2dplus
N: r7s72100
N: r8a66597
N: r8a77
N: r8a7[78]
N: r9a0[0-9]g
N: rcar
N: renesas

View File

@@ -43,6 +43,10 @@ else
obj-y += gen4-common.o
endif
endif
ifdef CONFIG_RCAR_GEN5
obj-y += gen5-common.o
endif
endif
endif

View File

@@ -0,0 +1,75 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (C) 2025 Renesas Electronics Corp.
*/
#include <asm/arch/renesas.h>
#include <asm/arch/sys_proto.h>
#include <asm/global_data.h>
#include <asm/io.h>
#include <asm/mach-types.h>
#include <asm/processor.h>
#include <asm/system.h>
#include <linux/errno.h>
DECLARE_GLOBAL_DATA_PTR;
static void init_generic_timer(void)
{
const u32 freq = CONFIG_SYS_CLK_FREQ;
/* Update memory mapped and register based freqency */
asm volatile ("msr cntfrq_el0, %0" :: "r" (freq));
writel(freq, CNTFID0);
/* Enable counter */
setbits_le32(CNTCR_BASE, CNTCR_EN);
}
static void init_gic_v3(void)
{
/* GIC v3 power on */
writel(BIT(1), GICR_LPI_PWRR);
/* Wait till the WAKER_CA_BIT changes to 0 */
clrbits_le32(GICR_LPI_WAKER, BIT(1));
while (readl(GICR_LPI_WAKER) & BIT(2))
;
writel(0xffffffff, GICR_SGI_BASE + GICR_IGROUPR0);
}
void s_init(void)
{
if (current_el() == 3)
init_generic_timer();
}
int board_early_init_f(void)
{
return 0;
}
int board_init(void)
{
/* Allow WDT reset */
writel(RST_KCPROT_DIS, RST_RESKCPROT0);
clrbits_le32(RST_WDTRSTCR, RST_WWDT_RSTMSK | RST_RWDT_RSTMSK);
if (current_el() != 3)
return 0;
init_gic_v3();
return 0;
}
void __weak reset_cpu(void)
{
writel(RST_KCPROT_DIS, RST_RESKCPROT0);
writel(0x1, RST_SWSRES1A);
}
int ft_board_setup(void *blob, struct bd_info *bd)
{
return 0;
}

View File

@@ -0,0 +1,15 @@
if TARGET_IRONHIDE
config SYS_SOC
default "renesas"
config SYS_BOARD
default "ironhide"
config SYS_VENDOR
default "renesas"
config SYS_CONFIG_NAME
default "ironhide"
endif

View File

@@ -0,0 +1 @@
CONFIG_ROCKCHIP_MASKROM_IMAGE=y

View File

@@ -3,4 +3,4 @@
# Copyright (C) 2024, Linaro Limited
# Sam Protsenko <semen.protsenko@linaro.org>
obj-y := e850-96.o fw.o acpm.o pmic.o
obj-y := e850-96.o fw.o acpm.o pmic.o bootdev.o

View File

@@ -0,0 +1,99 @@
// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright (c) 2025 Linaro Ltd.
* Author: Sam Protsenko <semen.protsenko@linaro.org>
*
* Routines for checking current boot device.
*/
#include <linux/arm-smccc.h>
#include <vsprintf.h>
#include "bootdev.h"
/* Flag from BL2 bootloader in RAM */
#define BL2_TAG_ADDR 0x80000000 /* DRAM base */
#define BL2_TAG 0xabcdef
/* Boot device info location in iRAM (only accessible from EL3) */
#define IRAM_BASE 0x02020000
#define BOOTDEVICE_INFO_ADDR (IRAM_BASE + 0x64)
/* SMC call for getting boot device information from EL3 monitor */
#define SMC_CMD_CHECK_SECOND_BOOT -233
/* Boot device constants for the encoded boot device info value */
#define BD_NO_DEVICE 0x0
#define BD_UFS 0x1
#define BD_EMMC 0x2
#define BD_ERROR 0x3
#define BD_USB 0x4
#define BD_SDMMC 0x5
#define BD_UFS_CARD 0x6
#define BD_SPI 0x7
/* If BL2 bootloader wasn't executed, it means U-Boot is running via JTAG */
static bool bootdev_is_jtag_session(void)
{
u32 bl2_tag_val = *(u32 *)BL2_TAG_ADDR;
return bl2_tag_val != BL2_TAG;
}
/* Obtain boot device information encoded in 32-bit value */
static u32 bootdev_get_info(void)
{
u32 info;
/*
* On regular boot U-Boot is executed by BL2 bootloader, and is running
* in EL1 mode, so the boot device information has to be obtained via
* SMC call from EL3 software (EL3 monitor), which can read that info
* from the protected iRAM memory. If U-Boot is running via TRACE32 JTAG
* (in EL3 mode), read the boot device info directly from iRAM, as EL3
* software might not be available.
*/
if (bootdev_is_jtag_session()) {
info = *(u32 *)BOOTDEVICE_INFO_ADDR;
} else {
struct arm_smccc_res res;
arm_smccc_smc(SMC_CMD_CHECK_SECOND_BOOT, 0, 0, 0, 0, 0, 0, 0,
&res);
info = (u32)res.a2;
}
return info;
}
enum bootdev bootdev_get_current(void)
{
u32 info, magic, order, dev;
info = bootdev_get_info();
magic = info >> 24;
order = info & 0xf;
dev = (info >> (4 * order)) & 0xf;
if (magic != 0xcb)
panic("Abnormal boot");
switch (dev) {
case BD_UFS:
return BOOTDEV_UFS;
case BD_EMMC:
return BOOTDEV_EMMC;
case BD_USB:
return BOOTDEV_USB;
case BD_SDMMC:
return BOOTDEV_SD;
default:
return BOOTDEV_ERROR;
}
return BOOTDEV_ERROR;
}
bool bootdev_is_usb(void)
{
return bootdev_get_current() == BOOTDEV_USB;
}

View File

@@ -0,0 +1,23 @@
/* SPDX-License-Identifier: GPL-2.0+ */
/*
* Copyright (c) 2025 Linaro Ltd.
* Sam Protsenko <semen.protsenko@linaro.org>
*/
#ifndef __E850_96_BOOTDEV_H
#define __E850_96_BOOTDEV_H
#include <stdbool.h>
enum bootdev {
BOOTDEV_ERROR,
BOOTDEV_SD,
BOOTDEV_EMMC,
BOOTDEV_USB,
BOOTDEV_UFS,
};
enum bootdev bootdev_get_current(void);
bool bootdev_is_usb(void);
#endif /* __E850_96_BOOTDEV_H */

View File

@@ -11,6 +11,7 @@
#include <net.h>
#include <usb.h>
#include <asm/io.h>
#include "bootdev.h"
#include "fw.h"
#include "pmic.h"
@@ -31,6 +32,10 @@
#define EMMC_DEV_NUM 0
#define EMMC_ESP_PART 1
/* Firmware size */
#define LDFW_MAX_SIZE SZ_4M
#define SP_MAX_SIZE SZ_1M
struct efi_fw_image fw_images[] = {
{
.image_type_id = E850_96_FWBL1_IMAGE_GUID,
@@ -77,16 +82,6 @@ static struct acpm acpm = {
.ipc_ch = EXYNOS850_IPC_AP_I3C,
};
int dram_init(void)
{
return fdtdec_setup_mem_size_base();
}
int dram_init_banksize(void)
{
return fdtdec_setup_memory_banksize();
}
/* Read the unique SoC ID from OTP registers */
static u64 get_chip_id(void)
{
@@ -137,11 +132,34 @@ static void setup_ethaddr(void)
eth_env_set_enetaddr("ethaddr", mac_addr);
}
static void load_firmware_usb(void)
{
int err;
printf("Loading LDFW firmware (over USB)...\n");
err = load_image_usb(USB_DN_IMAGE_LDFW, LDFW_NWD_ADDR, LDFW_MAX_SIZE);
if (err) {
printf("ERROR: LDFW loading failed (%d)\n", err);
return;
}
err = init_ldfw(LDFW_NWD_ADDR);
if (err) {
printf("ERROR: LDFW init failed (%d)\n", err);
/* Do not return, still need to download SP */
}
printf("Loading SP firmware (over USB)...\n");
err = load_image_usb(USB_DN_IMAGE_SP, LDFW_NWD_ADDR, SP_MAX_SIZE);
if (err)
printf("ERROR: SP loading failed (%d)\n", err);
}
/*
* Call this in board_late_init() to avoid probing block devices before
* efi_init_early().
*/
void load_firmware(void)
static void load_firmware_blk(void)
{
const char *ifname;
ulong dev, part;
@@ -161,16 +179,41 @@ void load_firmware(void)
}
printf("Loading LDFW firmware (from %s %ld)...\n", ifname, dev);
err = load_ldfw(ifname, dev, part, LDFW_NWD_ADDR);
if (err)
err = load_ldfw_from_blk(ifname, dev, part, LDFW_NWD_ADDR);
if (err) {
printf("ERROR: LDFW loading failed (%d)\n", err);
return;
}
err = init_ldfw(LDFW_NWD_ADDR);
if (err)
printf("ERROR: LDFW init failed (%d)\n", err);
}
int dram_init(void)
{
return fdtdec_setup_mem_size_base();
}
int dram_init_banksize(void)
{
return fdtdec_setup_memory_banksize();
}
int board_late_init(void)
{
setup_serial();
setup_ethaddr();
load_firmware();
if (bootdev_is_usb())
load_firmware_usb();
else
load_firmware_blk();
if (bootdev_is_usb()) {
env_set("bootcmd", "echo \"Entering DFU mode...\"; "
"dfu 0 mmc 0");
env_set("bootdelay", "0");
}
return 0;
}

View File

@@ -11,14 +11,19 @@
#include <linux/arm-smccc.h>
#include "fw.h"
#define LDFW_RAW_PART "ldfw"
#define LDFW_FAT_PATH "/EFI/firmware/ldfw.bin"
#define LDFW_RAW_PART "ldfw"
#define LDFW_FAT_PATH "/EFI/firmware/ldfw.bin"
#define LDFW_MAGIC 0x10adab1e
#define LDFW_MAGIC 0x10adab1e
#define SMC_CMD_LOAD_LDFW -0x500
#define SDM_HW_RESET_STATUS 0x1230
#define SDM_SW_RESET_STATUS 0x1231
#define SB_ERROR_PREFIX 0xfdaa0000
/* SMC command for providing LDFW to EL3 monitor */
#define SMC_CMD_LOAD_LDFW -0x500
/* SMC command for loading some binary over USB */
#define SMC_CMD_LOAD_IMAGE_BY_USB -0x512
/* Error codes for SMC_CMD_LOAD_LDFW */
#define SDM_HW_RESET_STATUS 0x1230
#define SDM_SW_RESET_STATUS 0x1231
#define SB_ERROR_PREFIX 0xfdaa0000
struct ldfw_header {
u32 magic;
@@ -94,7 +99,27 @@ static int read_fw_from_raw(const char *ifname, int dev, const char *part_name,
}
/**
* load_ldfw - Load the loadable firmware (LDFW)
* load_image_usb - Load some binary over USB during USB boot
* @type: Image type
* @addr: Memory address where the image should be downloaded to
* @size: Image size
*
* Return: 0 on success or a negative value on error.
*/
int load_image_usb(enum usb_dn_image type, phys_addr_t addr, phys_size_t size)
{
struct arm_smccc_res res;
arm_smccc_smc(SMC_CMD_LOAD_IMAGE_BY_USB, (u64)type, addr, size,
0, 0, 0, 0, &res);
if (res.a0)
return -EIO;
return 0;
}
/**
* load_ldfw_from_blk - Load the loadable firmware (LDFW) from block device
* @ifname: Interface name of the block device to load the firmware from
* @dev: Device number
* @part: Partition number
@@ -102,24 +127,37 @@ static int read_fw_from_raw(const char *ifname, int dev, const char *part_name,
*
* Return: 0 on success or a negative value on error.
*/
int load_ldfw(const char *ifname, int dev, int part, phys_addr_t addr)
int load_ldfw_from_blk(const char *ifname, int dev, int part, phys_addr_t addr)
{
struct ldfw_header *hdr;
struct arm_smccc_res res;
void *buf = (void *)addr;
u64 size = 0;
int err, i;
int err;
/* First try to read LDFW from EFI partition, then from the raw one */
err = read_fw_from_fat(ifname, dev, part, LDFW_FAT_PATH, buf);
if (err) {
err = read_fw_from_raw(ifname, dev, LDFW_RAW_PART, buf);
if (err)
return err;
}
if (err)
return read_fw_from_raw(ifname, dev, LDFW_RAW_PART, buf);
return 0;
}
/**
* init_ldfw - Provide the LDFW (loaded to RAM) to EL3 monitor to make use of it
* @addr: Memory address where LDFW resides
*
* EL3 monitor will copy the LDFW from the provided Normal World memory @addr to
* Secure World location, and start using it.
*
* Return: 0 on success or a negative value on error.
*/
int init_ldfw(phys_addr_t addr)
{
struct ldfw_header *hdr;
struct arm_smccc_res res;
u64 size = 0;
int err, i;
/* Validate LDFW by magic number in its header */
hdr = buf;
hdr = (struct ldfw_header *)addr;
if (hdr->magic != LDFW_MAGIC) {
debug("%s: Wrong LDFW magic; is LDFW flashed?\n", __func__);
return -EINVAL;

View File

@@ -9,6 +9,14 @@
#include <asm/types.h>
int load_ldfw(const char *ifname, int dev, int part, phys_addr_t addr);
/* Image types for downloading over USB */
enum usb_dn_image {
USB_DN_IMAGE_LDFW = 1, /* Loadable Firmware */
USB_DN_IMAGE_SP = 2, /* Secure Payload (tzsw.img) */
};
int load_image_usb(enum usb_dn_image type, phys_addr_t addr, phys_size_t size);
int load_ldfw_from_blk(const char *ifname, int dev, int part, phys_addr_t addr);
int init_ldfw(phys_addr_t addr);
#endif /* __E850_96_FW_H */

View File

@@ -0,0 +1,18 @@
if TARGET_EXYNOS_MOBILE
config ENV_SOURCE_FILE
default "exynos-mobile"
config LNX_KRNL_IMG_TEXT_OFFSET_BASE
default TEXT_BASE
config SYS_BOARD
default "exynos-mobile"
config SYS_CONFIG_NAME
default "exynos-mobile"
config SYS_VENDOR
default "samsung"
endif # TARGET_EXYNOS_MOBILE

Some files were not shown because too many files have changed in this diff Show More