]> git.ipfire.org Git - thirdparty/u-boot.git/log
thirdparty/u-boot.git
18 months agotest_fs: Rename mount dir to scratch
Richard Weinberger [Thu, 21 Nov 2024 22:32:08 +0000 (15:32 -0700)] 
test_fs: Rename mount dir to scratch

Since no mounting happens anymore, rename the "mnt"
directory to "scratch" and the related variables.

Signed-off-by: Richard Weinberger <richard@nod.at>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
18 months agotest_fs: Allow running unprivileged
Richard Weinberger [Thu, 21 Nov 2024 22:32:07 +0000 (15:32 -0700)] 
test_fs: Allow running unprivileged

There is no need to mount the filesystem on the host side.
All filesystem tools offer some way to fill the fs without mounting.

So, create the content on the host side, create and fill the fs
without mounting.
No more sudo or guestmount needed.

This new approach works because the tests don't care about user IDs
and no device files are needed.
If user IDs start to matter it's still possible to use wrapper
tools like fakeroot in future while filling the fs.

Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
18 months agotest/cmd/wget.c: move net_test_wget() to the cmd test suite
Jerome Forissier [Fri, 15 Nov 2024 16:45:14 +0000 (17:45 +0100)] 
test/cmd/wget.c: move net_test_wget() to the cmd test suite

Since net_test_wget() is testing a command and is in test/cmd it should
be in the 'cmd' test suite, not 'lib'.

Saving and restoring the values of the environment variables that the
test manipulates is necessary to avoid a regression when running the
whole ut test suite. A minimal reproducer is:

 $ ./u-boot -T -c "ut cmd net_test_wget; ut dm dm_test_eth_act" | \
     grep -E "(Test:|Failures:)"

Reported-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
18 months agoRevert "arm64: dts: ti: k3-j7200: Fix OSPI boot"
Tom Rini [Fri, 29 Nov 2024 13:50:33 +0000 (07:50 -0600)] 
Revert "arm64: dts: ti: k3-j7200: Fix OSPI boot"

While I had thought this commit was a cherry-pick from upstream, it is
not. And so, this is not allowed here.

This reverts commit dfe5f16a33453b742a66cabc8ea9a52a33279810.

Signed-off-by: Tom Rini <trini@konsulko.com>
18 months agoMerge tag 'u-boot-at91-2025.04-a' of https://source.denx.de/u-boot/custodians/u-boot...
Tom Rini [Fri, 29 Nov 2024 13:47:02 +0000 (07:47 -0600)] 
Merge tag 'u-boot-at91-2025.04-a' of https://source.denx.de/u-boot/custodians/u-boot-at91 into next

- at91 gpio driver function alternate mode for pins
- assorted fixes.

18 months agoarm64: zynqmp: Update the usb5744 hub node as per binding
Venkatesh Yadav Abbarapu [Fri, 29 Nov 2024 11:06:31 +0000 (16:36 +0530)] 
arm64: zynqmp: Update the usb5744 hub node as per binding

Updating the usb5744 hub node as per the latest upstream DT binding
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
tree/Documentation/devicetree/bindings/usb/microchip,usb5744.yaml?h=v6.8.8

Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
Acked-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/20241129110631.672637-1-venkatesh.abbarapu@amd.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
18 months agoarm64: zynqmp: Sync with v6.12 kernel
Michal Simek [Thu, 28 Nov 2024 14:49:14 +0000 (15:49 +0100)] 
arm64: zynqmp: Sync with v6.12 kernel

Sync zynqmp* DTS files with v6.12 Linux kernel.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/cf37760117765c4cece94736dc2a7b583d5987de.1732805351.git.michal.simek@amd.com
18 months agotest/py: zynqmp_rpu: Fix tcminit mode value
Love Kumar [Fri, 15 Nov 2024 12:02:02 +0000 (17:32 +0530)] 
test/py: zynqmp_rpu: Fix tcminit mode value

Update the tcminit value to string and number both as per commit
342ccba5586a ("arm64: zynqmp: Fix tcminit mode value based on argv") and
also adds negative cases based on invalid command sequences.

Signed-off-by: Love Kumar <love.kumar@amd.com>
Link: https://lore.kernel.org/r/48f75577f6735a0d14105658e89b625d45537bb1.1731672024.git.love.kumar@amd.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
18 months agocadence_qspi: Refactor the flash reset functionality
Venkatesh Yadav Abbarapu [Fri, 8 Nov 2024 06:35:37 +0000 (12:05 +0530)] 
cadence_qspi: Refactor the flash reset functionality

As the flash reset is handled in spi nor core, removing the
flash reset functionality. As the configuration like tristate
and hysterisis need to be enabled by the cdo. Handle the flash
reset only for mini u-boot case.

Rename the "cadence_qspi_versal_flash_reset" to generic name
"cadence_qspi_flash_reset" as this can be used by other platforms
as well.

Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
Link: https://lore.kernel.org/r/20241108063537.13180-1-venkatesh.abbarapu@amd.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
18 months agoconfigs: versal2: Enable OPTEE support
Venkatesh Yadav Abbarapu [Wed, 27 Nov 2024 04:37:45 +0000 (10:07 +0530)] 
configs: versal2: Enable OPTEE support

Add OPTEE support for versal2 platform.

Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
Link: https://lore.kernel.org/r/20241127043745.249580-1-venkatesh.abbarapu@amd.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
18 months agoconfigs: zynqmp_kria: Enable the USB onboard hub
Venkatesh Yadav Abbarapu [Tue, 26 Nov 2024 04:12:38 +0000 (09:42 +0530)] 
configs: zynqmp_kria: Enable the USB onboard hub

USB host support on ZYNQMP KRIA SOM needs onboard USB
hub driver for handling reset GPIO and for i2c initialization
sequence.

Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
Acked-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/20241126041238.1969723-1-venkatesh.abbarapu@amd.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
18 months agoARM: dts: imx: Enable PCIe and NVMe on Data Modul i.MX8M Mini eDM SBC
Marek Vasut [Fri, 29 Nov 2024 00:35:43 +0000 (01:35 +0100)] 
ARM: dts: imx: Enable PCIe and NVMe on Data Modul i.MX8M Mini eDM SBC

Enable PCIe/NVMe support on Data Modul i.MX8M Mini eDM SBC. Except for
the configuration options which are enabled, add slight adjustment
to board u-boot.dtsi, which is necessary as there is currently no
driver for the I2C PCIe clock generator. Since the generator is
strapped to be always on, it is possible to supplant the generator
functionality by fixed-clock.

Signed-off-by: Marek Vasut <marex@denx.de>
18 months agoARM: imx: Replace YModem with SDP on Data Modul i.MX8M Mini eDM SBC SPL
Marek Vasut [Fri, 29 Nov 2024 02:41:47 +0000 (03:41 +0100)] 
ARM: imx: Replace YModem with SDP on Data Modul i.MX8M Mini eDM SBC SPL

The YModem support in SPL was never really used on this device,
the SDP support is much more convenient on i.MX8M Mini based
hardware. Replace the YModem support with SDP support.

The SDP can be utilized by forcing the board into SDP boot mode
by grounding test point right next to silkscreen label U30, and
then by using mfgtools 'uuu -brun spl flash.bin' once the device
enumerates on host system USB bus. The SDP capable USB port is
available on the USB micro-B port on the base board.

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
18 months agoARM: imx: Deduplicate Data Modul i.MX8M eDM SBC defconfigs
Marek Vasut [Fri, 29 Nov 2024 00:13:56 +0000 (01:13 +0100)] 
ARM: imx: Deduplicate Data Modul i.MX8M eDM SBC defconfigs

Deduplicate defconfigs for all Data Modul i.MX8M eDM SBC systems by factoring
out the common parts into generic imx8m_data_modul.config and including
those using the #include <configs/...> preprocessor macro in the current
set of board specific defconfigs. The preprocessor macro is applicable
to defconfigs as well.

This introduces no functional change, the resulting .config is almost
identical for all Data Modul i.MX8M eDM SBC systems, except for slight
alignment in DEBUG_UART and SYS_PBSIZE.

Signed-off-by: Marek Vasut <marex@denx.de>
18 months agoARM: imx: Perform plain boot in altbootcmd on Data Modul i.MX8M Mini/Plus eDM SBC
Marek Vasut [Fri, 29 Nov 2024 00:13:55 +0000 (01:13 +0100)] 
ARM: imx: Perform plain boot in altbootcmd on Data Modul i.MX8M Mini/Plus eDM SBC

The current A/B switching preparatory altbootcmd is confusing
to users, replace it with plain 'run bootcmd' which can be
replaced by proper A/B switching altbootcmd when the matching
updater is added on top of the platform. By default, keep the
boot counter incrementing, but do not do any A/B partition
switching.

Signed-off-by: Marek Vasut <marex@denx.de>
18 months agoARM: dts: imx: Pick safe DRAM size on failure on Data Modul i.MX8M Mini/Plus eDM SBC
Marek Vasut [Fri, 29 Nov 2024 00:13:54 +0000 (01:13 +0100)] 
ARM: dts: imx: Pick safe DRAM size on failure on Data Modul i.MX8M Mini/Plus eDM SBC

In case gpio_request_list_by_name_nodev() in board dmo_get_memcfg()
returns error code, pick a safe default DRAM configuration instead
of bailing out with some sort of hang() or panic(). The BIT(2)|BIT(0)
strap option is the lowest known option of 2 GiB , use that.

Signed-off-by: Marek Vasut <marex@denx.de>
18 months agoARM: dts: imx: Make DRAM coding GPIOs available before relocation on Data Modul i...
Marek Vasut [Fri, 29 Nov 2024 00:13:53 +0000 (01:13 +0100)] 
ARM: dts: imx: Make DRAM coding GPIOs available before relocation on Data Modul i.MX8M Mini/Plus eDM SBC

The DRAM configuration GPIO straps must be accessible in SPL and before
relocation because the GPIOs are sampled both in U-Boot SPL as well as early
on in U-Boot proper. The already present bootph-pre-ram DT property made the
GPIO controllers available in SPL, but not early on in U-Boot proper, which
made gpio_request_list_by_name_nodev() in board dmo_get_memcfg() fail. Add
missing bootph-some-ram DT property to all GPIO controllers which are
referenced in dmo,ram-coding-gpios DT property to make those GPIO
controllers available early in U-Boot proper as well.

Fixes: 8c103c33fb14 ("dm: dts: Convert driver model tags to use new schema")
Signed-off-by: Marek Vasut <marex@denx.de>
18 months agomtd: nand: raw: atmel: Remove redundant PMECC probe
Alexander Dahl [Mon, 11 Mar 2024 15:23:06 +0000 (16:23 +0100)] 
mtd: nand: raw: atmel: Remove redundant PMECC probe

Always probing pmecc in the generic nand controller probe function and
bailing out if pmecc is missing, prevents the driver to be usable for
SoCs which do not have a pmecc hardware ecc engine like older sam9 SoCs,
for example at91sam9g20.  Tested on sam9x60 that the call, which the
comment was moved to, is sufficient to probe the pmecc.

Signed-off-by: Alexander Dahl <ada@thorsis.com>
18 months agogpio: at91: Implement ops get_flags
Zixun LI [Wed, 13 Nov 2024 10:11:09 +0000 (11:11 +0100)] 
gpio: at91: Implement ops get_flags

Add ops get_dir_flags() to read status from GPIO registers.

Signed-off-by: Zixun LI <admin@hifiphile.com>
18 months agogpio: at91: Implement ops set_flags
Zixun LI [Wed, 13 Nov 2024 10:10:54 +0000 (11:10 +0100)] 
gpio: at91: Implement ops set_flags

Support GPIO configuration with following flags:
- in, out, out_active
- open_drain, pull_up

Signed-off-by: Zixun LI <admin@hifiphile.com>
18 months agogpio: at91: Implement GPIOF_FUNC in get_function()
Zixun LI [Wed, 13 Nov 2024 10:10:22 +0000 (11:10 +0100)] 
gpio: at91: Implement GPIOF_FUNC in get_function()

This patch adds support for determining whether a gpio pin is mapped as
peripheral function.

Signed-off-by: Zixun LI <admin@hifiphile.com>
18 months agodrivers/mtd/ubispl/ubispl.c: Fix error message
Benedikt Spranger [Fri, 18 Oct 2024 08:30:03 +0000 (10:30 +0200)] 
drivers/mtd/ubispl/ubispl.c: Fix error message

The bad CRC error message has transposed characters, which render the
output useless:

"bad CRC at record 213: #08x, not #08x" instead of
"bad CRC at record 213: #00000000, not #4be31f4d"

Fix the error message.

Signed-off-by: Benedikt Spranger <b.spranger@linutronix.de>
Reviewed-by: John Ogness <john.ogness@linutronix.de>
18 months agotiny-printf: Handle NULL pointer argument to %s
Benedikt Spranger [Fri, 18 Oct 2024 08:30:02 +0000 (10:30 +0200)] 
tiny-printf: Handle NULL pointer argument to %s

A NULL pointer argument to %s causes a NULL pointer dereference in the
fixed width numerical printout code, since p is overwritten with NULL.
In case of %s width is 0. Check width before dereferencing the pointer.

Signed-off-by: Benedikt Spranger <b.spranger@linutronix.de>
Reviewed-by: John Ogness <john.ogness@linutronix.de>
18 months agoMerge https://source.denx.de/u-boot/custodians/u-boot-riscv
Tom Rini [Wed, 27 Nov 2024 13:34:17 +0000 (07:34 -0600)] 
Merge https://source.denx.de/u-boot/custodians/u-boot-riscv

CI: https://source.denx.de/u-boot/custodians/u-boot-riscv/-/pipelines/23592

- some configs modification

18 months agoMerge branch 'u-boot-nand-20241126' of https://source.denx.de/u-boot/custodians/u...
Tom Rini [Wed, 27 Nov 2024 13:33:06 +0000 (07:33 -0600)] 
Merge branch 'u-boot-nand-20241126' 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/23584

Remove device specific nand driver files as they are now replaced by a
common driver bcmbca_nand.c

Make use of OF_UPSTREAM which uses Linux dts.

Implement a minimal set of defconfig options to enable basic NAND
functionality. Tested on:
47622
63146
63158
63178
6813

Set parameter_page_big_endian to zero for bcmbca.

Update log level messages so that more critical messages can be logged
to console and help the troubleshooting with field devices.

18 months agoconfigs: enable CONFIG_PCI_REGION_MULTI_ENTRY=y in sifive_unmatched_defconfig
Yuri Zaporozhets [Tue, 19 Nov 2024 20:59:59 +0000 (21:59 +0100)] 
configs: enable CONFIG_PCI_REGION_MULTI_ENTRY=y in sifive_unmatched_defconfig

Currently, the PCI subsystem selects the small "region 2" (which starts at 0x7000000)
as bus_addr/phys_addr. As a consequence, the BAR0 on PCIe video card cannot be initialized,
because it simply doesn't fit into 0x1000000 bytes size of "region 2".

U-Boot should use "region 1" instead (the one which starts at 0x60090000), because
it has much bigger size (0xFF70000), and easily accomodates BAR0 of the video card.
Linux kernel also uses 0x60090000 as bus_start/phys_start.

Signed-off-by: Yuri Zaporozhets <yuriz@vodafonemail.de>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
18 months agoconfigs: visionfive2: re-enable SPL_SYS_MMCSD_RAW_MODE
Andreas Schwab [Tue, 12 Nov 2024 16:27:22 +0000 (17:27 +0100)] 
configs: visionfive2: re-enable SPL_SYS_MMCSD_RAW_MODE

To restore MMC boot, enable SPL_SYS_MMCSD_RAW_MODE and recover
SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION and
SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION.

Fixes: 2a00d73d081 ("spl: mmc: Try to clean up raw-mode options")
Signed-off-by: Andreas Schwab <schwab@suse.de>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
18 months agoconfigs: SiFive Unmatched: enable 'env erase' sub-command
Heinrich Schuchardt [Tue, 12 Nov 2024 10:42:23 +0000 (11:42 +0100)] 
configs: SiFive Unmatched: enable 'env erase' sub-command

With the move from script based booting to using bootmeth a lot of
environment variables have changed. To always use the default environment
it is recommendable to erase the environment stored in the SPI flash.
This can be done with the 'env erase' sub-command.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
18 months agospl: increase SPL_SYS_MALLOC_SIZE when using BIOSEMU on RISC-V
Yuri Zaporozhets [Mon, 11 Nov 2024 19:24:04 +0000 (20:24 +0100)] 
spl: increase SPL_SYS_MALLOC_SIZE when using BIOSEMU on RISC-V

If BIOSEMU is compiled for RISC-V (SiFive Unmatched board) and the function
dm_pci_run_vga_bios() is executed, U-Boot stops with error message saying
that the SPL malloc pool is too small. So increase the default pool size
when both BIOSEMU and RISCV parameters are set.

Signed-off-by: Yuri Zaporozhets <yuriz@qrv-systems.net>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
18 months agoarm64: zynqmp: Also generate images with single DT
Michal Simek [Wed, 20 Nov 2024 08:05:27 +0000 (09:05 +0100)] 
arm64: zynqmp: Also generate images with single DT

Create u-boot-single.itb where only actual DTB is used not really multiple
of DTS from OF_LIST. This results in small files without option to change
DT.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/9362da506c13382da0c0d41ad8a111d9c1150f08.1732089924.git.michal.simek@amd.com
18 months agobinman: Add option for pointing to separate description
Michal Simek [Fri, 1 Nov 2024 09:17:54 +0000 (10:17 +0100)] 
binman: Add option for pointing to separate description

Adding binman node with target images description can be unwanted feature
but as of today there is no way to disable it.
Also on size constrained systems it is not useful to add binman description
to DTB.
Introduce BINMAN_DTB Kconfig symbol which allows separate DTB for target
from DTB for binman itself.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/f1379d2587f9bf279a7a75c318aabbc1b35ee0c6.1730452668.git.michal.simek@amd.com
18 months agoarm64: zynqmp: Describe empty binman node
Michal Simek [Fri, 1 Nov 2024 09:17:56 +0000 (10:17 +0100)] 
arm64: zynqmp: Describe empty binman node

For enabling binman by default there is a need to have at least empty node
present that's why create -u-boot.dtsi with empty node to cover all ZynqMP
platforms.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/14d874ad4568fa8e3178e893224fecc5c676f04c.1730452668.git.michal.simek@amd.com
18 months agoMakefile: Drop SPL_FIT_GENERATOR support
Marek Vasut [Fri, 1 Nov 2024 09:18:00 +0000 (10:18 +0100)] 
Makefile: Drop SPL_FIT_GENERATOR support

The SPL_FIT_GENERATOR is long superseded by binman, drop SPL_FIT_GENERATOR
support as there are no more users.

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Peter Robinson <pbrobinson@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/22109373594b6a5d1110be9420ccd8fbb93a61d3.1730452668.git.michal.simek@amd.com
18 months agocommon: binman: Calling initr_binman() when BINMAN_FDT
Michal Simek [Fri, 1 Nov 2024 09:17:55 +0000 (10:17 +0100)] 
common: binman: Calling initr_binman() when BINMAN_FDT

Calling empty function when BINMAN_FDT is adding +64B for nothing which is
not helping on size sensitive configurations as Xilinx mini configurations.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/f79dc1fbf796dd5ad290f6080608ee68d7652cfc.1730452668.git.michal.simek@amd.com
18 months agoarm64: zynqmp: Remove mkimage fit script
Michal Simek [Fri, 1 Nov 2024 09:17:59 +0000 (10:17 +0100)] 
arm64: zynqmp: Remove mkimage fit script

Platform has been switched to binman that's why there is no need for this
script and also Kconfig symbols.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/cf438091e43c4c9d535a9cfa2886673aa42a4370.1730452668.git.michal.simek@amd.com
18 months agoarm64: zynqmp: Generate u-boot.itb and QSPI image via binman
Michal Simek [Fri, 1 Nov 2024 09:17:58 +0000 (10:17 +0100)] 
arm64: zynqmp: Generate u-boot.itb and QSPI image via binman

u-boot.itb has been generated via mkimage_fit_atf.sh but it is on the way
out that's why convert it's description to binman.
Compare to script binman description is not able to configure BL31 and BL32
load/entry addresses which should be done separately.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/90b613796aee38158252c8bb1dfc3da0420f089d.1730452668.git.michal.simek@amd.com
18 months agoarm64: zynqmp: Add binman description for SOM
Michal Simek [Fri, 1 Nov 2024 09:17:57 +0000 (10:17 +0100)] 
arm64: zynqmp: Add binman description for SOM

There is necessary to do some steps to compose boot images. These steps
were in scripts in layers for a while. That's why introduce description via
binman to simplify wiring and remove all scripting around.
This should make sure that everybody is up2date with the latest versions.

The first step is to create fit image with DTBs with descriptions in
configuration node which is written as regular expression to match all SOM
versions.
Description is there for k24 and k26 in spite of low level psu_init
configuration is different. The reason is that it goes to u-boot.itb image
which is the same for k24 and k26.
u-boot.itb is another image which is generated. It is normally generated
via arch/arm/mach-zynqmp/mkimage_fit_atf.sh but this script is supposed to
be deprecated.
FIT image by purpose is using 64bit addresses to have default option to
move images to high DDR (above 4GB). TF-A and TEE are optional components
but in the most cases TF-A is present all the time and TEE(OP-TEE) is used
by some configurations too.

3rd generated image is boot.bin with updated user field which contains
version number. This image can be used with updated Image Selector
which supports A/B update mechanisms with rollback protection.

4th image is image.bin which binary file which contains boot.bin and
u-boot.itb together and can be programmed via origin Image Selector.
This image can be also used for creating one capsule which contains both
boot images (in SPL boot flow).

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/35bc47a4a4799c5f5dbea56a45340a2810538330.1730452668.git.michal.simek@amd.com
18 months agomtd: rawnand: brcmnand: update log level messages
david regan [Wed, 13 Nov 2024 06:27:15 +0000 (22:27 -0800)] 
mtd: rawnand: brcmnand: update log level messages

Update log level messages so that more critical messages can be logged
to console and help the troubleshooting with field devices.

This is a port of the upstream Linux patch to U-Boot.

https://lore.kernel.org/linux-mtd/20240223034758.13753-4-william.zhang@broadcom.com/

Signed-off-by: david regan <dregan@broadcom.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: William Zhang <william.zhang@broadcom.com>
Reviewed-by: Anand Gore <anand.gore@broadcom.com>
18 months agomtd: rawnand: brcmnand: Default bcmbca parameter_page_big_endian to zero
david regan [Wed, 13 Nov 2024 06:27:14 +0000 (22:27 -0800)] 
mtd: rawnand: brcmnand: Default bcmbca parameter_page_big_endian to zero

Set parameter_page_big_endian to zero for bcmbca

Signed-off-by: david regan <dregan@broadcom.com>
Reviewed-by: William Zhang <william.zhang@broadcom.com>
Reviewed-by: Anand Gore <anand.gore@broadcom.com>
18 months agoarm: dts: Use upstream dts
david regan [Wed, 13 Nov 2024 06:27:13 +0000 (22:27 -0800)] 
arm: dts: Use upstream dts

Make use of OF_UPSTREAM which uses Linux dts.

Signed-off-by: david regan <dregan@broadcom.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
Reviewed-by: William Zhang <william.zhang@broadcom.com>
Reviewed-by: Anand Gore <anand.gore@broadcom.com>
18 months agomtd: nand: brcmnand: remove device specific nand driver files
david regan [Wed, 13 Nov 2024 06:27:12 +0000 (22:27 -0800)] 
mtd: nand: brcmnand: remove device specific nand driver files

These device specific nand driver files can be removed because
they are now replaced by a common driver bcmbca_nand.c

Signed-off-by: david regan <dregan@broadcom.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: William Zhang <william.zhang@broadcom.com>
Reviewed-by: Anand Gore <anand.gore@broadcom.com>
18 months agobootstd: Remove prepared images
Simon Glass [Thu, 21 Nov 2024 22:32:14 +0000 (15:32 -0700)] 
bootstd: Remove prepared images

These are no-longer used. Drop them.

Signed-off-by: Simon Glass <sjg@chromium.org>
18 months agotest_ut: Drop support for fallback files
Simon Glass [Thu, 21 Nov 2024 22:32:13 +0000 (15:32 -0700)] 
test_ut: Drop support for fallback files

We don't need the fallback anymore. Remove the code which uses these
files.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Richard Weinberger <richard@nod.at>
18 months agotest_ut: Use the built mkimage
Simon Glass [Thu, 21 Nov 2024 22:32:12 +0000 (15:32 -0700)] 
test_ut: Use the built mkimage

The mkimage tool is not present in the docker image. Use the one in the
build directory.

Signed-off-by: Simon Glass <sjg@chromium.org>
18 months agotest_ut: Drop exeception handling
Simon Glass [Thu, 21 Nov 2024 22:32:11 +0000 (15:32 -0700)] 
test_ut: Drop exeception handling

We don't need the fallback anymore. As a first step to removing it,
drop the try...except clauses and unindent the code.

This produces a large diff but there are no other code changes.

Signed-off-by: Simon Glass <sjg@chromium.org>
18 months agotest_ut: Allow running unprivileged
Richard Weinberger [Thu, 21 Nov 2024 22:32:10 +0000 (15:32 -0700)] 
test_ut: Allow running unprivileged

Like for test_fs, no need to mess with loop mounts.

Signed-off-by: Richard Weinberger <richard@nod.at>
Tweaks to reduce diff (keep mnt variable):
Signed-off-by: Simon Glass <sjg@chromium.org>
18 months agotest_ut: Add an image size to setup_image()
Simon Glass [Thu, 21 Nov 2024 22:32:09 +0000 (15:32 -0700)] 
test_ut: Add an image size to setup_image()

Add a parameter to indicate the size of the image to build.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Richard Weinberger <richard@nod.at>
18 months agotest_fs: Rename mount dir to scratch
Richard Weinberger [Thu, 21 Nov 2024 22:32:08 +0000 (15:32 -0700)] 
test_fs: Rename mount dir to scratch

Since no mounting happens anymore, rename the "mnt"
directory to "scratch" and the related variables.

Signed-off-by: Richard Weinberger <richard@nod.at>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
18 months agotest_fs: Allow running unprivileged
Richard Weinberger [Thu, 21 Nov 2024 22:32:07 +0000 (15:32 -0700)] 
test_fs: Allow running unprivileged

There is no need to mount the filesystem on the host side.
All filesystem tools offer some way to fill the fs without mounting.

So, create the content on the host side, create and fill the fs
without mounting.
No more sudo or guestmount needed.

This new approach works because the tests don't care about user IDs
and no device files are needed.
If user IDs start to matter it's still possible to use wrapper
tools like fakeroot in future while filling the fs.

Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
18 months agoMerge tag 'u-boot-dfu-next-20241126' of https://source.denx.de/u-boot/custodians...
Tom Rini [Tue, 26 Nov 2024 16:50:05 +0000 (10:50 -0600)] 
Merge tag 'u-boot-dfu-next-20241126' of https://source.denx.de/u-boot/custodians/u-boot-dfu into next

CI: https://source.denx.de/u-boot/custodians/u-boot-dfu/-/pipelines/23573

Android:
- bootstd: Implement bootimage v2 support
- bootstd: Support non-A/B in bootmeth_android
- Migrate VIM3 and VIM3L to use bootmeth_android
- bootstd: Additional test for bootimage v2
- bootstd: Optimize load time when reading partitions

18 months agoMerge tag 'u-boot-imx-next-20241126' of https://gitlab.denx.de/u-boot/custodians...
Tom Rini [Tue, 26 Nov 2024 16:49:44 +0000 (10:49 -0600)] 
Merge tag 'u-boot-imx-next-20241126' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx into next

CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/23563

- Make Siemens i.MX8 Capricorn board to boot U-Boot mainline again.
- Add support for phycore-imx93 2GB LPDDR4X variant.
- Add phycore-imx8mm EEPROM detection initialisation.

18 months agoconfigs: Resync with savedefconfig
Tom Rini [Tue, 26 Nov 2024 14:10:18 +0000 (08:10 -0600)] 
configs: Resync with savedefconfig

Rsync all defconfig files using qconfig.py

Signed-off-by: Tom Rini <trini@konsulko.com>
18 months agoMerge tag 'u-boot-dfu-20241126' of https://source.denx.de/u-boot/custodians/u-boot-dfu
Tom Rini [Tue, 26 Nov 2024 14:05:11 +0000 (08:05 -0600)] 
Merge tag 'u-boot-dfu-20241126' of https://source.denx.de/u-boot/custodians/u-boot-dfu

CI: https://source.denx.de/u-boot/custodians/u-boot-dfu/-/pipelines/23572

- Fastboot:
  - handle unknown partition type as "raw"
- USB gadget:
  - Fix ci_udc gadget driver for Tegra 2 devices by not using USBADRA

18 months agoMerge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-marvell
Tom Rini [Tue, 26 Nov 2024 14:04:44 +0000 (08:04 -0600)] 
Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-marvell

CI: https://dev.azure.com/sr0718/u-boot/_build/results?buildId=379&view=results

- mvebu: Disable JFFS2 support for Kirkwood and Armada XP boards (Tony)
- kirkwood: Enable bootstd for Sheevaplug board (Tony)
- mvebu: Add Allied Telesis x250 board (Chris)
- mvebu: Updates for Allied Telesis boards (Chris)

18 months agoarm: mvebu: Add Allied Telesis x250 board
Chris Packham [Mon, 25 Nov 2024 19:55:53 +0000 (08:55 +1300)] 
arm: mvebu: Add Allied Telesis x250 board

The x250 and SE250 are series of 10G L2+ switches from Allied Telesis.
There are a number of them in the range but as far as U-Boot is
concerned all the CPU block components are the same so there's only one
board defined.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
18 months agoarm: mvebu: x530: Enable IPV6 support
Chris Packham [Fri, 22 Nov 2024 00:30:21 +0000 (13:30 +1300)] 
arm: mvebu: x530: Enable IPV6 support

Enable IPV6 support for the x530 board.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
18 months agoarm: mvebu: x530: Don't build mkeficapsule
Chris Packham [Fri, 22 Nov 2024 00:30:20 +0000 (13:30 +1300)] 
arm: mvebu: x530: Don't build mkeficapsule

The x530 board doesn't use EFI and our toolchains don't include gnutls
so disable the tool in the defconfig.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
18 months agoarm: mvebu: x530: Remove dead comments
Chris Packham [Fri, 22 Nov 2024 00:30:19 +0000 (13:30 +1300)] 
arm: mvebu: x530: Remove dead comments

As things have been moved to Kconfig there are a number of dead comments
left over in x530.h. Remove them.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
18 months agoarm: mvebu: x240: Enable IPV6 support
Chris Packham [Fri, 22 Nov 2024 00:30:18 +0000 (13:30 +1300)] 
arm: mvebu: x240: Enable IPV6 support

Enable IPV6 support for the x240 board.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
18 months agoarm: mvebu: x240: Don't build mkeficapsule
Chris Packham [Fri, 22 Nov 2024 00:30:17 +0000 (13:30 +1300)] 
arm: mvebu: x240: Don't build mkeficapsule

The x240 board doesn't use EFI and our toolchains don't include gnutls
so disable the tool in the defconfig.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
18 months agoarm: mvebu: x240: Switch to standard boot
Chris Packham [Fri, 22 Nov 2024 00:30:16 +0000 (13:30 +1300)] 
arm: mvebu: x240: Switch to standard boot

Use standard boot instead of the distro boot scripts. Regenerate the
board defconfig now that some options are selected automatically.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
18 months agoarm: mvebu: x240: Use default baudrate table
Chris Packham [Fri, 22 Nov 2024 00:30:15 +0000 (13:30 +1300)] 
arm: mvebu: x240: Use default baudrate table

Remove CFG_SYS_BAUDRATE_TABLE as there's no reason not to use the
defaults defined via config_fallbacks.h.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
18 months agoarm: kirkwood: Enable bootstd for Sheevaplug board
Tony Dinh [Thu, 21 Nov 2024 19:02:27 +0000 (11:02 -0800)] 
arm: kirkwood: Enable bootstd for Sheevaplug board

Enable bootstd for Sheevaplug board.
Remove JFFS2 support. See JFFS2 Vulnerability[1].
Enable LTO to keep board size within limit.
Move default envs to text-base environment

[1] https://lore.kernel.org/u-boot/20241114233005.GN3600562@bill-the-cat/T/#m2fc25da1d2c019bc3cd8676991fdd64b8a21aa9b

Signed-off-by: Tony Dinh <mibodhi@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
18 months agoarm: mvebu: Disable JFFS2 support for Kirkwood and Armada XP boards
Tony Dinh [Mon, 18 Nov 2024 19:34:59 +0000 (11:34 -0800)] 
arm: mvebu: Disable JFFS2 support for Kirkwood and Armada XP boards

These boards don't use JFFS2 file system for booting so remove it.

Ref: https://lore.kernel.org/u-boot/20241114233005.GN3600562@bill-the-cat/T/#t
Signed-off-by: Tony Dinh <mibodhi@gmail.com>
Acked-by: Phil Sutter <phil@nwl.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
18 months agobootstd: android: don't read whole partition sizes
Julien Masson [Thu, 21 Nov 2024 10:59:55 +0000 (11:59 +0100)] 
bootstd: android: don't read whole partition sizes

The current implementation is reading the whole partition for boot and
vendor_boot image which can be long following the size of the
partition or the time to read blocks (driver/SoC specific).

For example with mediatek mt8365 EVK board, we have a 64MiB boot
partition and the boot image flashed in this partition is only 42MiB.
It takes ~8-9 secs to read the boot partition.

Instead we can retrieved the boot image and vendor boot image size
with these new functions:
- android_image_get_bootimg_size
- android_image_get_vendor_bootimg_size
Use these information and read only the necessary.

By doing this with mt8365 EVK board, we read boot image in ~5 secs.

Signed-off-by: Julien Masson <jmasson@baylibre.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20241121-bootmeth-android-part-sizes-v1-1-25760bbd0f08@baylibre.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
18 months agobootstd: Add test for Android boot image v2
Guillaume La Roque [Tue, 26 Nov 2024 08:06:13 +0000 (09:06 +0100)] 
bootstd: Add test for Android boot image v2

Rename actual android bootmethod test to specify it's for boot image
version 4.
Add a unit test for testing the Android bootmethod with boot image
version 2.

This requires another mmc image (mmc8) to contain the following
partitions:
- misc: contains the Bootloader Control Block (BCB)
- boot_a: contains a fake generic kernel image

we can test this with:

$ ./test/py/test.py --bd sandbox --build -k test_ut # build the mmc8.img
$ ./test/py/test.py --bd sandbox --build -k bootflow_android

Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Signed-off-by: Guillaume La Roque <glaroque@baylibre.com>
Link: https://lore.kernel.org/r/20241126-adnroidv2-v4-5-11636106dc69@baylibre.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
18 months agoconfigs: khadas-vim3_android{_ab}: move on bootmeth android
Guillaume La Roque [Tue, 26 Nov 2024 08:06:12 +0000 (09:06 +0100)] 
configs: khadas-vim3_android{_ab}: move on bootmeth android

Actually khadas vim3 use distro command to boot android image.
Move on new bootmeth android for A/B and non-A/B vim3 android.

Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Acked-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Guillaume La Roque <glaroque@baylibre.com>
Link: https://lore.kernel.org/r/20241126-adnroidv2-v4-4-11636106dc69@baylibre.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
18 months agoconfigs: khadas-vim3l_android{_ab}: move on bootmeth android
Guillaume La Roque [Tue, 26 Nov 2024 08:06:11 +0000 (09:06 +0100)] 
configs: khadas-vim3l_android{_ab}: move on bootmeth android

Actually khadas vim3l use distro command to boot android image.
Move on new bootmeth android for A/B and non-A/B vim3l android.

Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Acked-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Guillaume La Roque <glaroque@baylibre.com>
Link: https://lore.kernel.org/r/20241126-adnroidv2-v4-3-11636106dc69@baylibre.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
18 months agobootstd: android: add non-A/B image support
Guillaume La Roque [Tue, 26 Nov 2024 08:06:10 +0000 (09:06 +0100)] 
bootstd: android: add non-A/B image support

Update android bootmeth to support non-A/B image.
Enable AB support only when ANDROID_AB is enabled.

Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Signed-off-by: Guillaume La Roque <glaroque@baylibre.com>
Link: https://lore.kernel.org/r/20241126-adnroidv2-v4-2-11636106dc69@baylibre.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
18 months agobootstd: android: add support of bootimage v2
Guillaume La Roque [Tue, 26 Nov 2024 08:06:09 +0000 (09:06 +0100)] 
bootstd: android: add support of bootimage v2

Android bootmeth only support boot image v3/4.

Add support of Android Boot Image version 2 [1].
Vendor boot image is only supported in version 3 and 4 so don't try to
read it when header version is less than 3.

[1] https://source.android.com/docs/core/architecture/bootloader/boot-image-header#header-v2

Tested-by: Julien Masson <jmasson@baylibre.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Signed-off-by: Guillaume La Roque <glaroque@baylibre.com>
Link: https://lore.kernel.org/r/20241126-adnroidv2-v4-1-11636106dc69@baylibre.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
18 months agousb: ci_udc: don't use "advance" feature when setting address
Ion Agorria [Tue, 26 Nov 2024 07:29:56 +0000 (09:29 +0200)] 
usb: ci_udc: don't use "advance" feature when setting address

In the older USB controllers like for example in ChipIdea controller
used by the Tegra 2 the "USBADRA: Device Address Advance" bitflag
does not exist, so the new device address set during SET_ADDRESS
can't be deferred by hardware, which causes the host to not recognize
the device and give an error.

Instead store it until ep completes to apply the change into the hw
register as Linux kernel does. This should fix regression on old and
and be compatible with newer controllers.

Inspired by: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ef15e5490edc7edf808d3477ab32e0e320792f65

Signed-off-by: Ion Agorria <ion@agorria.com>
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20241126072956.64778-2-clamor95@gmail.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
18 months agoboard: phytec: phycore-imx8mm: Add EEPROM detection initialisation
Yunus Bas [Fri, 22 Nov 2024 10:29:38 +0000 (11:29 +0100)] 
board: phytec: phycore-imx8mm: Add EEPROM detection initialisation

Add EEPROM detection initialisation for phyCORE-i.MX8MM.

Signed-off-by: Yunus Bas <y.bas@phytec.de>
18 months agoboard: phytec: imx93: Add phyCORE-i.MX 93 support for all SOM variants
Christoph Stoidner [Wed, 20 Nov 2024 16:31:43 +0000 (17:31 +0100)] 
board: phytec: imx93: Add phyCORE-i.MX 93 support for all SOM variants

The phyCORE-i.MX 93 is available in various variants (e.g. different ram
sizes, eMMC HS400 yes/no). Enable hardware introspection for the
imx93-phyboard-segin_defconfig, so that during startup the SOM module
variant can be detected, and the hardware can be configured accordingly.
The resulting SPL and u-boot binary shall able to boot each
phyCORE-i.MX 93 module variant on each carrier board. Finally rename
imx93-phyboard-segin_defconfig to imx93-phycore_defconfig, to highlight
its SOM scope.

Signed-off-by: Christoph Stoidner <c.stoidner@phytec.de>
Reviewed-by: Wadim Egorov <w.egorov@phytec.de>
Reviewed-by: Yannic Moog <y.moog@phytec.de>
18 months agoboard: phytec: imx93: Add eeprom-based hardware introspection
Christoph Stoidner [Wed, 20 Nov 2024 16:31:42 +0000 (17:31 +0100)] 
board: phytec: imx93: Add eeprom-based hardware introspection

The phyCORE-i.MX 93 is available in various variants. Relevant variant
options for the spl/u-boot are:
- with or without HS400 support for the eMMC
- with 1GB ram chip, or 2GB ram chip

The phyCORE's eeprom contains all information about the existing variant
options. Add evaluation of the eeprom data to the spl/u-boot to
enable/disable HS400 and to select the appropriate ram configuration at
startup.

Signed-off-by: Christoph Stoidner <c.stoidner@phytec.de>
Reviewed-by: Wadim Egorov <w.egorov@phytec.de>
Reviewed-by: Yannic Moog <y.moog@phytec.de>
Tested-by: Primoz Fiser <primoz.fiser@norik.com>
18 months agoboard: phytec: phycore-imx93: Add 2GB LPDDR4X RAM timings
Christoph Stoidner [Wed, 20 Nov 2024 16:31:41 +0000 (17:31 +0100)] 
board: phytec: phycore-imx93: Add 2GB LPDDR4X RAM timings

The phyCORE-i.MX 93 is available with a 1GB ram chip or a 2GB ram chip.
Add the ram timings for the 2GB chip, in form of a diff compared
to the existing LPDDR4X 1GB timings. With that, the SPL can select the
appropriate timings at startup.
Update also the 1GB ram timings with new version of the DDR Tool.

Signed-off-by: Christoph Stoidner <c.stoidner@phytec.de>
Tested-by: Primoz Fiser <primoz.fiser@norik.com>
18 months agosiemens: capricorn: update maintainers
Enrico Leto [Sat, 23 Nov 2024 16:53:04 +0000 (17:53 +0100)] 
siemens: capricorn: update maintainers

update MAINTAINERS file, add some more board maintainers.

Signed-off-by: Enrico Leto <enrico.leto@siemens.com>
Signed-off-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Alexander Sverdlin <alexander.sverdlin@siemens.com>
18 months agosiemens: add ddr signal integrity test
Enrico Leto [Sat, 23 Nov 2024 16:53:03 +0000 (17:53 +0100)] 
siemens: add ddr signal integrity test

The signal integrity test generates pattern on DDR lines
for certification. The signals must be as fast as possible
and unidirectional.

The test is required from our HW team. The available
u-boot memory test doesn't full fill the our requirements.

The test is planed to be used in all new siemens boards.

Signed-off-by: Enrico Leto <enrico.leto@siemens.com>
Signed-off-by: Heiko Schocher <hs@denx.de>
18 months agosiemens: add ddr full memory test
Enrico Leto [Sat, 23 Nov 2024 16:53:02 +0000 (17:53 +0100)] 
siemens: add ddr full memory test

Add siemens specific memory test. Enable it through Kconfig option
SPL_CMT. The test is required from our HW team. It runs over
temperature during many days:
* must run indefinitively through the *whole* DDR area,
  so we cannot use linux memtest for example.
* must write/read/check all values

Signed-off-by: Enrico Leto <enrico.leto@siemens.com>
Signed-off-by: Heiko Schocher <hs@denx.de>
18 months agosiemens: capricorn: get module name from eeprom
Enrico Leto [Sat, 23 Nov 2024 16:53:01 +0000 (17:53 +0100)] 
siemens: capricorn: get module name from eeprom

The eeprom contains the information on which module
we are running, so read it from the eeprom and print
it on the console.

Signed-off-by: Enrico Leto <enrico.leto@siemens.com>
Signed-off-by: Heiko Schocher <hs@denx.de>
18 months agosiemens: capricorn: get ram size from system controller
Enrico Leto [Sat, 23 Nov 2024 16:53:00 +0000 (17:53 +0100)] 
siemens: capricorn: get ram size from system controller

Get the memory region information from system controller to reduce the
number of platform specific headers. We were aligned on NXP mek board
implementation. This need at least 1 header per memory configuration.

Signed-off-by: Enrico Leto <enrico.leto@siemens.com>
Signed-off-by: Heiko Schocher <hs@denx.de>
18 months agosiemens: capricorn: add HW version information to boot log
Alessandro Zini [Sat, 23 Nov 2024 16:52:59 +0000 (17:52 +0100)] 
siemens: capricorn: add HW version information to boot log

Add the HW version read directly from EEPROM.

EEPROM chip data structure is now in a .h file common to draco
and capricorn.

Therefore move out the definitions in draco board to siemens
common place.

From: Alessandro Zini <alessandro.zini@siemens.com>
Signed-off-by: Alessandro Zini <alessandro.zini@siemens.com>
Signed-off-by: Heiko Schocher <hs@denx.de>
18 months agosiemens: capricorn: small board updates
Heiko Schocher [Sat, 23 Nov 2024 16:52:58 +0000 (17:52 +0100)] 
siemens: capricorn: small board updates

with newest SCFW build_info() works now, so call it
from checkboard() now.

As we only use uart2 as console, do not init uart0.

Signed-off-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Alexander Sverdlin <alexander.sverdlin@siemens.com>
18 months agosiemens: imx8-capricorn.dtsi: add wdt device
Heiko Schocher [Sat, 23 Nov 2024 16:52:57 +0000 (17:52 +0100)] 
siemens: imx8-capricorn.dtsi: add wdt device

add wdt device

Signed-off-by: Heiko Schocher <hs@denx.de>
18 months agosiemens: capricorn: sync spl code with 8qxp-mek
Heiko Schocher [Sat, 23 Nov 2024 16:52:56 +0000 (17:52 +0100)] 
siemens: capricorn: sync spl code with 8qxp-mek

sync spl code with 8qxp-mek board.

Signed-off-by: Heiko Schocher <hs@denx.de>
18 months agosiemens: configs/capricorn_cxg3_defconfig: updates
Heiko Schocher [Sat, 23 Nov 2024 16:52:55 +0000 (17:52 +0100)] 
siemens: configs/capricorn_cxg3_defconfig: updates

make savedefconfig and add SCU_WDT and fix environment
offsets, as since silicon c0 the boot container takes place
at offset 0 and so the u-boot-env must be moved outside of
the boot container area.

Signed-off-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Alexander Sverdlin <alexander.sverdlin@siemens.com>
18 months agosiemens: imximage.cfg: sync image names
Heiko Schocher [Sat, 23 Nov 2024 16:52:54 +0000 (17:52 +0100)] 
siemens: imximage.cfg: sync image names

sync the image names in imximage.cfg with
the ones used in arch/arm/dts/imx8qxp-u-boot.dtsi

Signed-off-by: Heiko Schocher <hs@denx.de>
18 months agosiemens: imximage.cfg: correct comment
Heiko Schocher [Sat, 23 Nov 2024 16:52:53 +0000 (17:52 +0100)] 
siemens: imximage.cfg: correct comment

fix wrong comment.

Signed-off-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Alexander Sverdlin <alexander.sverdlin@siemens.com>
18 months agosiemens: capricorn: use DCD_SKIP entry
Heiko Schocher [Sat, 23 Nov 2024 16:52:52 +0000 (17:52 +0100)] 
siemens: capricorn: use DCD_SKIP entry

Boards which use DCD data in SCFW can drop SPL.

We tried in our mainline rework to use this approach
too as other imx8qxp boards do in mainline. But we
failed ... it was a hard way to understand the
reason!

We cannot use DCD image in container as the SCFW
from siemens, does the RAM init on boot itself!

Siemens SCFW reads the RAM config from i2c eeprom and
dependent on this settings, initializes the RAM.

Adding DCD data to the bootcontainer will result in
hang of the SCFW, also DCD data in container image is
static which do not fit our needs.

So we must drop DCD data image, and this has the side
effect that we need SPL, as the task which loads the images
from the container only loads the images to addresses,
and if executed bit is set, starts them.

As now RAM is not initialized from it, and there is no
option to "wait until SCFW has setup RAM",  we can only
load SPL into internal RAM at this point, as than SPL
and SCFW boot parallel.

The SPL itself then uses the SCU API to communicate
with the SCFW and it seems that SCFW only responds to
this API requests when RAM setup is already done by the
SCFW, which has a side-effect of a "sync" for the RAM
setup is done by SCFW!

We checked if SPL is always save in accessing RAM for
loading images to it! For tests, we added in our RAM
init part in the SCFW long delays (10 seconds and more)
as we thought there is such a sync missing, and we can
break the board through delaying RAM setup... but we
did not managed to fail booting U-Boot from SPL!

Signed-off-by: Heiko Schocher <hs@denx.de>
18 months agosiemens: imx8qxp-capricorn-u-boot.dtsi: fix boot
Heiko Schocher [Sat, 23 Nov 2024 16:52:51 +0000 (17:52 +0100)] 
siemens: imx8qxp-capricorn-u-boot.dtsi: fix boot

current generated flash.bin image does not longer
boot on cxg3 board.

Rename bootph-pre-ram to bootph-all so flash.bin
boots again!

Add u-boot specific change (add bootph-all property)
in A35_0 node to imx8qxp-capricorn-u-boot.dtsi

Signed-off-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Alexander Sverdlin <alexander.sverdlin@siemens.com>
18 months agosiemens: capricorn: move to cxg3 reference project with deneb board
Enrico Leto [Sat, 23 Nov 2024 16:52:50 +0000 (17:52 +0100)] 
siemens: capricorn: move to cxg3 reference project with deneb board

We have many HW with capricorn i.MX8X boards. The difference in u-boot is
at all by the display of the LEDs.

* put upstream a reference project & board for DT and defconfig
* use the capricorn prefix outside the board/siemens/capricorn folder

Signed-off-by: Enrico Leto <enrico.leto@siemens.com>
Signed-off-by: Heiko Schocher <hs@denx.de>
18 months agoimx8qxp: Fix build when using SPL
Heiko Schocher [Sat, 23 Nov 2024 16:52:49 +0000 (17:52 +0100)] 
imx8qxp: Fix build when using SPL

imx8qxp based boards which use SPL drop error when
calling make all:
"""
Writing image to './flash.bin'
   Node '/binman/imx-boot/spl': GetData: size 0x0
       Node '/binman/imx-boot': GetPaddedDataForEntry: size 0x0
       Node '/binman/imx-boot': GetData: 1 entries, total size 0x0
       Node '/binman/imx-boot': GetPaddedDataForEntry: size 0x0
Wrote 0x0 bytes
Image 'imx-boot' is missing external blobs and is non-functional: spl

/binman/imx-boot/spl (spl.bin):
   Missing blob

Some images are invalid
"""

Guard creation of flash.bin with CONFIG_XPL_BUILD option.

Signed-off-by: Heiko Schocher <hs@denx.de>
Fixes: c9713c155127 ("imx8-u-boot: Fix SPL guard option")
18 months agoimx: imx_cntr_image.sh: prevent warning for missing spl
Heiko Schocher [Sat, 23 Nov 2024 16:52:48 +0000 (17:52 +0100)] 
imx: imx_cntr_image.sh: prevent warning for missing spl

when building U-Boot on imx8qxp and the board port uses
SPL, U-boot build shows

WARNING '.../spl/u-boot-spl.bin' not found, resulting binary is not-functional

This is because U-Boot binary is build first and Makefile
calls script imx_cntr_image.sh which checks if files
exists... but of course as spl is not yet build the
file `spl/u-boot-spl.bin` does not exist yet, so prevent
this warning.

Signed-off-by: Heiko Schocher <hs@denx.de>
18 months agotools: imx8image: Improve error message
Heiko Schocher [Sat, 23 Nov 2024 16:52:47 +0000 (17:52 +0100)] 
tools: imx8image: Improve error message

Improve error message "header tag mismatched"
Add filename to error message to see, which file
is wrong.

Signed-off-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Alexander Sverdlin <alexander.sverdlin@siemens.com>
18 months agonet: fec_mxc: fix probing for imx8qxp
Heiko Schocher [Sat, 23 Nov 2024 16:52:46 +0000 (17:52 +0100)] 
net: fec_mxc: fix probing for imx8qxp

probing on capricorn board (imx8qxp based) brings:

Can't find FEC0 clk rate: -19

Cause is that when probing fec_mxc driver, fec_mii_setspeed()
is called which calls fec_get_clk_rate().

fec_mii_setspeed() calls fec_get_clk_rate with NULL pointer
for udev and so as in IMX8QXP case CLK_CCF is enabled
udev gets searched with:

uclass_get_device_by_seq(UCLASS_ETH, idx, &dev);

but we do not have yet a UCLASS_ETH ! as we just probing it!

Prevent this by passing udev to fec_get_clk_rate()

Signed-off-by: Heiko Schocher <hs@denx.de>
18 months agowdt: imx8qxp: add option to control external PMIC wdt via IMX8 SCU
Heiko Schocher [Sat, 23 Nov 2024 16:52:45 +0000 (17:52 +0100)] 
wdt: imx8qxp: add option to control external PMIC wdt via IMX8 SCU

Driver for a PMIC watchdog timer controlled via Siemens SCU firmware
extensions. Only useful on some Siemens i.MX8-based platforms as
special SCFW is needed which provides the needed SCU API.

Signed-off-by: Andrej Valek <andrej.valek@siemens.com>
Signed-off-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Alexander Sverdlin <alexander.sverdlin@siemens.com>
Reviewed-by: Stefan Roese <sr@denx.de>
18 months agoMerge tag 'v2025.01-rc3' into next
Tom Rini [Mon, 25 Nov 2024 23:23:49 +0000 (17:23 -0600)] 
Merge tag 'v2025.01-rc3' into next

Prepare v2025.01-rc3

18 months agoPrepare v2025.01-rc3 v2025.01-rc3
Tom Rini [Mon, 25 Nov 2024 22:58:57 +0000 (16:58 -0600)] 
Prepare v2025.01-rc3

Signed-off-by: Tom Rini <trini@konsulko.com>
18 months agoMerge branch 'master-asix' of https://source.denx.de/u-boot/custodians/u-boot-usb
Tom Rini [Mon, 25 Nov 2024 21:32:16 +0000 (15:32 -0600)] 
Merge branch 'master-asix' of https://source.denx.de/u-boot/custodians/u-boot-usb

- Fix two issues with the asix88179 driver

18 months agospi: Fix missed rename from SPI_ADVANCE to SPI_STACKED_PARALLEL
Dominik Wernberger [Mon, 25 Nov 2024 21:21:52 +0000 (22:21 +0100)] 
spi: Fix missed rename from SPI_ADVANCE to SPI_STACKED_PARALLEL

Fix missed rename from SPI_ADVANCE to SPI_STACKED_PARALLEL. This fixes
an issue encountered while testing the Zynq-7000 QSPI parallel Flash
implementation.

Fixes: f896aa656774 ("mtd: spi-nor: Rename SPI_ADVANCE to SPI_STACKED_PARALLEL")
Reviewed-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Signed-off-by: Dominik Wernberger <dominik.wernberger@gmx.de>
18 months agoMerge https://source.denx.de/u-boot/custodians/u-boot-usb
Tom Rini [Mon, 25 Nov 2024 18:37:46 +0000 (12:37 -0600)] 
Merge https://source.denx.de/u-boot/custodians/u-boot-usb

- Support for Microchip USB5744 hub