99586 Commits

Author SHA1 Message Date
Marek Vasut
01a8121b7d fs: exfat: Rework exfat_fs_readdir() to behave like exfat_fs_ls()
The exfat_fs_readdir() depends on state created in exfat_fs_opendir(),
but that state may be disrupted by fs_close() called by the FS layer
in fs_opendir(), because exfat porting layer unmounts the filesystem
in ->close() callback.

To avoid this disruption, avoid creating state in exfat_fs_opendir(),
cache only the directory name to list there, and rework exfat_fs_readdir()
to work in a similar way to exfat_fs_ls(). That is, make exfat_fs_readdir()
open the directory, look up specific entry, extract its properties to be
reported to FS layer, and close the directory. This is slow, but avoids
the disruption. The slowness does not affect regular 'ls' command, which
uses exfat_fs_ls() fast path.

Fixes: b86a651b646c ("fs: exfat: Add U-Boot porting layer")
Signed-off-by: Marek Vasut <marex@denx.de>
2025-04-21 11:07:04 -06:00
Marek Vasut
21b04b3d72 fs: exfat: Inhibit "impossible" print on write to bogus file
Write into a bogus file, like '/.', triggers an "impossible"
print from the exfat core code. That should not be printed
in U-Boot, because U-Boot prints its own error message sooner.
Inhibit this error message.

The following command triggers the bogus print:
"
=> save host 0:0 1000008 /. 0x10
"

Fixes: b86a651b646c ("fs: exfat: Add U-Boot porting layer")
Signed-off-by: Marek Vasut <marex@denx.de>
2025-04-21 11:07:04 -06:00
Marek Vasut
aeed137372 fs: exfat: Flush node before put in read() callback
Make sure the node is never dirty before being released, flush
the node first using exfat_flush_node() and only then release
the node using exfat_put_node(). This now matches the behavior
of exfat_fs_write() too.

Fixes: b86a651b646c ("fs: exfat: Add U-Boot porting layer")
Signed-off-by: Marek Vasut <marex@denx.de>
2025-04-21 11:07:04 -06:00
Tom Rini
d36aa5057e Revert "net: phy: Add the Airoha EN8811H PHY driver"
This was applied prematurely by me as I missed the feedback provided at
the time.

This reverts commit c9c8df2c377e512553f2e9ad5d19c4b85efbf07d.

Signed-off-by: Tom Rini <trini@konsulko.com>
2025-04-21 11:05:05 -06:00
Tom Rini
cde0050618 Second set of u-boot-at91 features for the 2025.07 cycle
-----BEGIN PGP SIGNATURE-----
 
 iQFNBAABCgA3FiEEqxhEmNJ6d7ZdeFLIHrMeAg6sL8gFAmgF7EUZHGV1Z2VuLmhy
 aXN0ZXZAbGluYXJvLm9yZwAKCRAesx4CDqwvyEUYB/sFVmoELCerP0Dwonec1C2V
 oV9qqiwEpaGC47O79aaRCeR5mWvPA3Zddr5lVSpRVTKmF75/+hqTN/DbjoSqVYIh
 DcW4A//dxejnpIo6p9yS4860N/mMQPK7n/VHRX6mY/iN0CrmtGD/gKWpaQKyZNHS
 tq+K5vOf9vdKe/sbEWIDKnTodQQkecl8Z1Fl3lbaoxqPKuYtnD1o8YXPSx++qu6Q
 7UFd4X03sFI4P6tV960IMQCAr9jW7qGckF2EHGwPme6YHnjgPfBGmE7uK3N12PJ2
 PnMFapTPpdydUPjRZcE+x9TdYYUiwGCPlJFpwuTQpomb6D7gbCQzC2gP82T1KBUt
 =5oSx
 -----END PGP SIGNATURE-----

Merge tag 'u-boot-at91-2025.07-b' of https://source.denx.de/u-boot/custodians/u-boot-at91

Second set of u-boot-at91 features for the 2025.07 cycle:

This feature set includes the addition of sam9x60 usb gadget, and a fix
for sama5d2 SPL.
2025-04-21 08:24:54 -06:00
Tom Rini
f620b318f7 Merge tag 'rpi-2025.07-rc1' of https://source.denx.de/u-boot/custodians/u-boot-raspberrypi
Updates for RPi for 2025.07:

- copy over uart clock-frequency in DT
- always set fdt_addr with firmware-provided FDT address
- Set bootm_size to 512MB
- Drop fdt_high and initrd_high
- Update environment to support booti and large initrd
2025-04-21 07:28:50 -06:00
Tom Rini
13248ae93b Pull request efi-2025-07-rc1-2
Documentation:
 
 * dt_qemu: correct dumpdtb description
 * release_cycle: Use variable substitution for next version
 
 UEFI:
 
 * cmd: simplify eficonfig_init()
 * efi_selftest: check executing in EL2
 * efi_selftest: use do_bootefi_exec()
 
 Others:
 
 * riscv: dts: jh7110: add bootph-pre-ram for &pllclk
 * mips: malta: set MIPS_RELOCATION_TABLE_SIZE=0xc000
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEK7wKXt3/btL6/yA+hO4vgnE3U0sFAmgDgYsACgkQhO4vgnE3
 U0s3gBAAisFsTETxbLc/zB4te+HMbVpqUUkzFAg/wrZlUOPVlGKvoWeB8IoMT54F
 HJKZSb+nEVG8Q1B+i1U10vo+Q34u54t0Xvl1jO5lvVC4mh6n8XsBv7VGQ6IJtNkp
 mKD/RTJpokH30UPLOkHHm6s2YQzCQOpj5uae76L2q3lN8+LOPX/91Nq7HJgA7HOo
 LOZPU0ESlDe+KVLp612WbmDG5AFNHY3wOcyaFtMBkjh3/CtZbR0BVW0xxYQtcSu2
 +jstqFztB2tX6uImtcN3kF1I4O9htAK6EPt9hQtyTcEWBgnWmqNmJRzVQy5qpp6/
 Ezp4XqpJoo70J6/xnFcZLBS1NCqQqTiaFnLO+FbixcXa+z3vVqGAaDTMQgWJBm3e
 8UenTWGKShQNtu2KA/6QWQZ2T0tTXdrfOrnX2dEwfBJX0iUzJdFICoj3w1SHdfYR
 wos6NPauIvFsOiuC4UrkZd5Nf1+GVYtCLyVplmWDlMrmLBv3x8DSJvNRhN5bL6z/
 TlkBE53KlZhkEkMYFm00OnReWhex4ZhoSjEgbT2i9yziJWxoW0m6ZgHvQu7Qm4DY
 e/77qmQzEzXDo/ULVuuBhb9YP05gG3v1UsQWHe2XpL2PlHNm3OtJh3A924xh65yh
 BzKgH4BN1oKuwdwjjkKc196G7oItBpeUd26XJGp/tEOWl/TFr1s=
 =h4A2
 -----END PGP SIGNATURE-----

Merge tag 'efi-2025-07-rc1-2' of https://source.denx.de/u-boot/custodians/u-boot-efi

Pull request efi-2025-07-rc1-2

Documentation:

* dt_qemu: correct dumpdtb description
* release_cycle: Use variable substitution for next version

UEFI:

* cmd: simplify eficonfig_init()
* efi_selftest: check executing in EL2
* efi_selftest: use do_bootefi_exec()

Others:

* riscv: dts: jh7110: add bootph-pre-ram for &pllclk
* mips: malta: set MIPS_RELOCATION_TABLE_SIZE=0xc000
2025-04-20 07:52:47 -06:00
Heinrich Schuchardt
ed16466966 mips: malta: set MIPS_RELOCATION_TABLE_SIZE=0xc000
MIPS_RELOCATION_TABLE_SIZE=0x8000 is too small to enable UNIT_TEST.
Increase it by 50 % (16 KiB).

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2025-04-19 12:50:04 +02:00
Heinrich Schuchardt
8b3f2eb7d8 riscv: dts: jh7110: add bootph-pre-ram for &pllclk
Since commit f98cd471f06b ("clk: clk-composite: Resolve parent clock by
name") the StarFive VisionFive 2 board fails to boot.

Before that patch the SPL debug UART showed warnings like:

    clk_register: failed to get pll0_out device (parent of perh_root)
    clk_register: failed to get pll0_out device (parent of qspi_ref_src)
    clk_register: failed to get pll0_out device (parent of usb_125m)
    clk_register: failed to get pll0_out device (parent of gmac_src)
    clk_register: failed to get pll0_out device (parent of gmac1_gtxclk)
    clk_register: failed to get pll0_out device (parent of gmac0_gtxclk)

The &pllclk clock needs to be enabled early.

Fixes: f98cd471f06b ("clk: clk-composite: Resolve parent clock by name")
Suggested-by: Marek Vasut <marex@denx.de>
Tested-by: Yao Zi <ziyao@disroot.org>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2025-04-19 12:48:45 +02:00
Heinrich Schuchardt
67d5b4a42b doc: dt_qemu: correct dumpdtb description
Use only a single -machine parameter.

Describe that the same invocation of qemu-system-<arch> has to be
used for dumping the device-tree as will be used when executing U-Boot.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2025-04-19 12:47:47 +02:00
Heinrich Schuchardt
26d13d4539 efi_selftest: use do_bootefi_exec()
The EFI selftest should match executing a real EFI binary
as closely as possible.

Use do_bootefi_exec() to enter the EFI selftest.

Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2025-04-19 12:47:33 +02:00
Heinrich Schuchardt
0be049083a efi_selftest: check executing in EL2
UEFI binaries should be executed in EL2 or EL1 even if U-Boot is started
in EL3. Provide a unit test.

Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2025-04-19 12:47:17 +02:00
Tom Rini
48dc564fc3 doc: release_cycle: Use variable substitution for next version
To avoid the problem fixed in commit 57a95d522ca8 ("doc: release_cycle:
fix next release version") moving forward, make use of the variable
substitution feature of rST. This adds a next_ver variable and
references it in all of the places where I had been listing the version
being worked on.

Suggested-by: Quentin Schulz <quentin.schulz@cherry.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Tested-by: Quentin Schulz <quentin.schulz@cherry.de>
2025-04-19 12:45:59 +02:00
Heinrich Schuchardt
6cabeaf2d8 cmd: simplify eficonfig_init()
As the system table already has pointers to the Simple Text Input and
Output Protocols we can directly use these instead of calling
OpenProtocol.

Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2025-04-19 12:45:48 +02:00
Wadim Egorov
71f497a6d3 Revert "power-domain: Add refcounting"
Unfortunately this change breaks boot on K3 platform.
U-Boot will hang after:

  U-Boot SPL 2025.04-01050-ga40fc5afaec0 (Apr 14 2025 - 07:31:32 +0000)
  SYSFW ABI: 3.1 (firmware rev 0x0009 '9.2.7--v09.02.07 (Kool Koala)')

This reverts commit 197376fbf300e92afa0a1583815d9c9eb52d613a as
suggested in [1].

[1] https://lists.denx.de/pipermail/u-boot/2025-April/587032.html

Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
Acked-by: Miquel Raynal <miquel.raynal@bootlin.com>
2025-04-18 09:35:39 -06:00
Fabio Estevam
5d33a80c96 ARM: dts: at91: sama5d2: Pass bootph-all to the PIT timer
The PIT timer needs to be available early in the SPL phase,
otherwise SPL fails to boot and only prints:

Could not initialize timer (err -96)

Fix this problem by passing 'bootph-all' to the sama5d2 PIT node.

Signed-off-by: Fabio Estevam <festevam@denx.de>
2025-04-18 13:41:25 +03:00
Zixun LI
50c145e752 ARM: dts: at91: sam9x60-curiosity: Enable USB gadget node
Enable USB gadget usb0 node support.

Signed-off-by: Zixun LI <admin@hifiphile.com>
Reviewed-by: Eugen Hristev <eugen.hristev@linaro.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
2025-04-18 13:41:25 +03:00
Zixun LI
7128ba2bc8 ARM: dts: sam9x60: Add USB gadget DT node
Add the USB gadget DT node for the sam9x60 SoC's.

Signed-off-by: Zixun LI <admin@hifiphile.com>
Reviewed-by: Eugen Hristev <eugen.hristev@linaro.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
2025-04-18 13:41:19 +03:00
Bryan Brattlof
ec43e63206 configs: am65x_evm_a53: convert to a standard boot flow
Rather than maintaining custom hush scripting to boot the SDK, migrate
to a 'standard boot' method which simplifies maintenance and enables
multiple distributions to use this evaluation module.

Signed-off-by: Bryan Brattlof <bb@ti.com>
2025-04-17 17:35:15 -06:00
Parth Pancholi
5e94661e46 arm: mach-k3: am62px: Fix MCU_CLKOUT0 parent clock mux
CU_CLKOUT0 can be driven by two input clocks: a 25 MHz and a 50 MHz source.
Currently, the 25 MHz option is not selectable due to an incorrect mux
configuration where the 50 MHz clock is duplicated in the parent list.

This patch fixes the mux setup, allowing proper selection of the 25 MHz
clock source for MCU_CLKOUT0.

Similar configuration is already correctly implemented in AM62 clock
data for 'hsdiv4_16fft_main_2_hsdivout1_clk10', where MCU_CLKOUT0
parent switching behaves as expected.

Link: http://downloads.ti.com/tisci/esd/latest/5_soc_doc/am62px/clocks.html#clocks-for-board0-device
Signed-off-by: Parth Pancholi <parth.pancholi@toradex.com>
Reviewed-by: Bryan Brattlof <bb@ti.com>
2025-04-17 17:35:11 -06:00
Tom Rini
278be62c05 AMD/Xilinx/FPGA changes for v2025.07-rc1
AMD/Xilinx:
 - Synchronize enums around tcm_mode
 - Access bootmode registers via firmware interface
 - Setup default values for DEBUG_UART
 - Fix dfu alt buffer clearing
 - Convert loadpdi command to fpga
 - Fix board detection code
 - Minor defconfig updates
 
 Versal:
 - Wire multi_boot register
 
 Versal Gen 2:
 - Enable missing drivers
 - Wire i2c FRU decoding at start
 - Wire saving variables to different locations
 - Disable default DEBUG_UART
 - Wire USB/UFS boot and fix access via firmware interface
 - Minor fixes
 
 ZynqMP/Kria:
 - Enable mkfwumdata
 - Topic board update
 - Enhance binman configurations
 - Kria usb update
 
 BuR:
 - Add multiple Zynq based boards
 
 cadence_ospi:
 - Enable device reset
 
 fpga:
 - Add support for loading bitstream for Altera SoCs
 -----BEGIN PGP SIGNATURE-----
 
 iF0EABECAB0WIQQbPNTMvXmYlBPRwx7KSWXLKUoMIQUCaADT3QAKCRDKSWXLKUoM
 IacxAKCQ8KNhtc2MS9zBmFJg6XEo8N0GygCeOZTgjbQe7T3orrkAMATjCBHw6vE=
 =dRFT
 -----END PGP SIGNATURE-----

Merge tag 'xilinx-for-v2025.07-rc1' of https://source.denx.de/u-boot/custodians/u-boot-microblaze

AMD/Xilinx/FPGA changes for v2025.07-rc1

AMD/Xilinx:
- Synchronize enums around tcm_mode
- Access bootmode registers via firmware interface
- Setup default values for DEBUG_UART
- Fix dfu alt buffer clearing
- Convert loadpdi command to fpga
- Fix board detection code
- Minor defconfig updates

Versal:
- Wire multi_boot register

Versal Gen 2:
- Enable missing drivers
- Wire i2c FRU decoding at start
- Wire saving variables to different locations
- Disable default DEBUG_UART
- Wire USB/UFS boot and fix access via firmware interface
- Minor fixes

ZynqMP/Kria:
- Enable mkfwumdata
- Topic board update
- Enhance binman configurations
- Kria usb update

BuR:
- Add multiple Zynq based boards

cadence_ospi:
- Enable device reset

fpga:
- Add support for loading bitstream for Altera SoCs
2025-04-17 07:52:02 -06:00
Tom Rini
0f7a4ac96b Merge patch series "airoha: add support spi/mmc/ethernet"
Christian Marangi <ansuelsmth@gmail.com> says:

This is continuation of the initial patchset for airoha
support.

Some are trivial fix for spi.
A new concept to setup SPI from detected NAND.

Sadly DTS node still need to be merged upstream so we
are currently adding them to u-boot dtsi and it's planned
to be dropped once they are accepted in upstream kernel.

Link: https://lore.kernel.org/r/20250407200208.25594-1-ansuelsmth@gmail.com
2025-04-17 07:51:37 -06:00
Christian Marangi
d74728d8ed configs: airoha: an7581_evb: Enable Airoha SNFI SPI config
Enable Airoha SNFI SPI config to enable support for SNAND flash.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-04-17 07:51:37 -06:00
Christian Marangi
96ee9dd53a arm: dts: an7581: Add SNAND node
Add SNAND node to Airoha AN7581 EVB DTS to enable support for attached
SNAND flash.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-04-17 07:51:37 -06:00
Christian Marangi
6134e4efd4 spi: airoha: Add Airoha SPI NAND driver
Add Airoha SPI NAND driver to permit usage of attached SNAND on the
Airoha AN7581 SoC. While SPI controller supports DMA transation, due to
U-Boot limitation we currently limit it to single command in Manual
mode.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-04-17 07:51:36 -06:00
Christian Marangi
5ff602a351 spinand: call SPI setup_for_spinand if supported
Call SPI setup_for_spinand() if supported and defined to configure the
SPI slave for the attached NAND. This is needed to configure the SPI
with the NAND page size and spare size for correct configuration of the
device.

Call it as soon as the NAND is detected to correctly handle SPI
controller with select_op_variant detection.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-04-16 19:57:35 -06:00
Christian Marangi
ef45b9c395 spi: Introduce setup_for_spinand()
A common device attached to SPI are SPI NAND and some device might
require to have info on the attached NAND to know the flash page size
and spare size.

To support this, introduce setup_for_spinand() that pass the attached
spinand info from manufacturer.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
[trini: Switch to forward declaration of struct spinand_info]
Signed-off-by: Tom Rini <trini@konsulko.com>
2025-04-16 19:57:19 -06:00
Christian Marangi
225d1ec702 spi: drop unneeded spi.h header include from spinand.h
Drop unneeded spi.h header include from spinand.h, nothing included by
spi.h is actually used in this header and .c should correctly included
spi.h if actually needed.

Replace spi.h with linux/bitops.h as this is what is actually required
for spinand.h

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-04-16 16:51:45 -06:00
Christian Marangi
53e83caa87 regmap: Add regmap_set/clear_bits shorthands
Port Linux kernel regmap_set/clear_bits shorthands to set and clear bits
in a regmap. These are handy if only specific bits needs to be applied
or cleared and makes it easier to port regmap based driver from kernel
upstream.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-04-16 16:51:45 -06:00
Christian Marangi
92c8047f24 airoha: Add eMMC config to defconfig
Enable Mediatek MMC driver in Airoha AN7581 EVB defconfig to add support
for it in default images.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-04-16 16:51:45 -06:00
Christian Marangi
132f80803e arch: arm: dts: an7581: Add eMMC nodes
Add eMMC nodes with the fixed regulator and fixed clock. It's also
needed to assign the clock and set it to 200MHz as it's set to 150Mhz by
default.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-04-16 16:51:45 -06:00
Christian Marangi
8b4253a85a mmc: mediatek: permit to also build for Airoha arch
Airoha new SoC implement the same Mediatek driver for MMC. Permit to
also build for Airoha arch.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-04-16 16:51:45 -06:00
Christian Marangi
28891f1214 arch: arm: dts: an7581: Add Ethernet nodes
Add Ethrnet nodes for Airoha AN7581 EVB board.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-04-16 16:51:45 -06:00
Christian Marangi
c6b0544a94 airoha: Add Ethernet config to defconfig
Add Ethrnet config to defconfig to enable Ethernet support.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-04-16 16:51:45 -06:00
Christian Marangi
74fcb6a7a7 net: airoha: Add Airoha Ethernet driver
Add airoha Ethernet driver for Airoha AN7581 SoC. This is a majorly
rewritten and simplified version of the Linux airoha_eth.c driver.

It's has been modified to support a single RX/TX ring to reflect U-Boot
implementation with recv and send API.

The struct and the define are kept as similar as possible to upstream
one to not diverge too much.

The AN7581 SoC include an Ethernet Switch based on the Mediatek MT753x
but doesn't require any modification aside from setting the CPU port and
applying the Flood configuration hence it can be handled entirely in the
Ethernet driver.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-04-16 16:51:45 -06:00
Christian Marangi
60cbbbb112 arch: arm: dts: an7581: add Chip SCU node
Add pending Chip SCU node for clock node.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-04-16 16:51:45 -06:00
Lucien.Jheng
c9c8df2c37 net: phy: Add the Airoha EN8811H PHY driver
Add the driver for the Airoha EN8811H 2.5 Gigabit PHY. The PHY supports
100/1000/2500 Mbps with auto negotiation only.

The driver uses two firmware files, for which updated versions are added to
linux-firmware already.

Based on the Linux upstream 8811 driver code(air_en8811h.c),
I have modified the relevant process to align with the U-Boot boot sequence.
and have validated this on Banana Pi BPI-R3 Mini.

The MD32 FW is currently stored in eMMC partition 1 on Banana Pi BPI-R3 Mini,
and it is loaded from there.

Signed-off-by: Lucien.Jheng <lucienzx159@gmail.com>
2025-04-16 16:48:13 -06:00
Tom Rini
da4dd9ed7a Merge tag 'u-boot-marvell-20250516' of https://source.denx.de/u-boot/custodians/u-boot-marvell
CI: https://dev.azure.com/sr0718/u-boot/_build/results?buildId=390&view=results

- mvebu_espressobin_ultra-88f3720_defconfig: disable SATA
- helios4: enable ddr odt0 on write for both chip-select
- clearfog,helios4: disable sdhci sdma
- mvebu/bubt: Correct usage of IS_ENABLED() macro
- mvebu: Correct SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR usage
2025-04-16 08:12:30 -06:00
Bernhard Messerklinger
8e25e76fff board/BuR/zynq: initial commit
This commit adds support for the brcp1, brsmarc2, brcp150 and brcp170
boards. This boards are based on the Xilinx Zynq SoC.

Signed-off-by: Bernhard Messerklinger <bernhard.messerklinger@br-automation.com>
Acked-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/20250404072819.69642-5-bernhard.messerklinger@br-automation.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
2025-04-16 15:39:48 +02:00
Bernhard Messerklinger
80e9b279a3 board/BuR/common: split br_resetc_bmode function
Split br_resetc_bmode function to add support for reading of reset
reason in board code with br_resetc_bmode_get.

Signed-off-by: Bernhard Messerklinger <bernhard.messerklinger@br-automation.com>
Link: https://lore.kernel.org/r/20250404072819.69642-4-bernhard.messerklinger@br-automation.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
2025-04-16 15:39:48 +02:00
Bernhard Messerklinger
d294e70eee board/BuR/common: add parameter for reset controller I2C bus selection
Normally B&R reset controllers are located at I2C bus 0. This patch adds
the possibility to change this bus number with the kconfig option
BR_RESETC_I2CBUS.

Signed-off-by: Bernhard Messerklinger <bernhard.messerklinger@br-automation.com>
Link: https://lore.kernel.org/r/20250404072819.69642-3-bernhard.messerklinger@br-automation.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
2025-04-16 15:39:48 +02:00
Bernhard Messerklinger
970152e4d1 board/BuR/common: use strlcpy instead of strncpy
Now strlcpy is used to copy the defip string to the corresponding
environment variable. This preserves memory for the NULL termination.

Signed-off-by: Bernhard Messerklinger <bernhard.messerklinger@br-automation.com>
Link: https://lore.kernel.org/r/20250404072819.69642-2-bernhard.messerklinger@br-automation.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
2025-04-16 15:39:48 +02:00
Padmarao Begari
672d081196 board: amd: Read an eeprom after relocation
Read an eeprom after relocation which also shows information from
eeprom wired via nvmem aliases.

When DTB reselection is enabled eeprom is read before relocation
too but information is not showed. The issue about two i2c reads
in this case will be address separately.

Signed-off-by: Padmarao Begari <padmarao.begari@amd.com>
Link: https://lore.kernel.org/r/20250409162639.588487-3-padmarao.begari@amd.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
2025-04-16 15:39:48 +02:00
Padmarao Begari
799eaf090c arm64: versal2: Remove dtb reselect and multi dtb
Presently the multi dtb's are not using on versal Gen 2
platform, so remove CONFIG_DTB_RESELECT and CONFIG_MULTI_DTB_FIT
from defconfig.

Signed-off-by: Padmarao Begari <padmarao.begari@amd.com>
Link: https://lore.kernel.org/r/20250409162639.588487-2-padmarao.begari@amd.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
2025-04-16 15:39:48 +02:00
Padmarao Begari
27d7d3cf43 board: xilinx: Store board info data in data section
Line 171 in README is describing that before relocation no code
should use global variable because global variables are placed
to BSS section which is initialized to 0 after relocation.

In the case of ZynqMP, where DTB reselection is enabled, the EEPROM
is read again after relocation. This prevents the issue from being
observed. However, in Versal Gen 2, where DTB reselection is also
enabled, the EEPROM is not read after relocation because it is not
yet wired in board_init(). This leads to a situation where the code
accesses an incorrect memory location, because none is really
checking the board_info is valid or not. To fix, move the board_info
into the data section and also check whether it is valid or not.

Signed-off-by: Padmarao Begari <padmarao.begari@amd.com>
Link: https://lore.kernel.org/r/20250409162553.588285-1-padmarao.begari@amd.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
2025-04-16 15:39:48 +02:00
Venkatesh Yadav Abbarapu
142a7c6cdf amd: versal2: Add support for saving env based on bootmode
Enable saving variables to MMC(FAT) and SPI based on primary
bootmode. If bootmode is JTAG, dont save env anywhere(NOWHERE).

Enable ENV_FAT_DEVICE_AND_PART="0:auto" for Versal Gen 2 platform.

Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
Link: https://lore.kernel.org/r/20250411154612.107136-1-venkatesh.abbarapu@amd.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
2025-04-16 15:39:48 +02:00
Venkatesh Yadav Abbarapu
b09a611016 arm64: versal2: Update the number of DRAM banks to 36
HBM stands for high bandwidth memory and is a type of memory interface used
in 3D-stacked DRAM (dynamic random access memory) in some AMD GPUs (aka
graphics cards), as well as the server, high-performance computing (HPC)
and networking and client space. High Bandwidth Memory(HBM) has total 16
channels, one channel is divided into two pseudo channels which makes its
32 banks each with some amount of memory.
And then we have DDR_LOW PS low, DDR_HIGH0 PS high, DDR_HIGH1 PS very high
and pretty much there should be also place for PL DDR. So maximum number of
memory banks will be 36, updating the CONFIG_NR_DRAM_BANKS to 36.

Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
Link: https://lore.kernel.org/r/20250410092528.3713904-1-venkatesh.abbarapu@amd.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
2025-04-16 13:44:44 +02:00
Venkatesh Yadav Abbarapu
b735c6c5f6 arm64: versal2: Add usb distro boot command
Adding support for the usb distro boot command.

Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/121b6879efde0b83d3933852442895631c4cb24f.1744273853.git.michal.simek@amd.com
2025-04-16 13:44:44 +02:00
Venkatesh Yadav Abbarapu
caf5775fdb arm64: versal2: Add ufs distro boot command
Adding support for the ufs distro boot command.

Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/c0e6737ae4119963afc8ea19b49b998a013d06c4.1744273853.git.michal.simek@amd.com
2025-04-16 13:44:44 +02:00
Venkatesh Yadav Abbarapu
fd08d4a441 arm64: zynqmp: Start usb automatically via preboot on Kria
U-Boot configures the USB config object which enables power for
the IP, without this the linux usb driver won't work.
So add "usb start" as part of preboot command.

Fixes: dd4a82201694 ("arm64: zynqmp: Introduce kria SOM defconfig")
Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/180c9776b03d57d8218d161924363906ef354394.1744272843.git.michal.simek@amd.com
2025-04-16 13:44:44 +02:00