]> git.dujemihanovic.xyz Git - u-boot.git/log
u-boot.git
3 days agoARM: renesas: Consistently enable ENV_OVERWRITE on Renesas R-Car
Marek Vasut [Sat, 21 Dec 2024 23:58:24 +0000 (00:58 +0100)]
ARM: renesas: Consistently enable ENV_OVERWRITE on Renesas R-Car

Move CONFIG_ENV_OVERWRITE=y into commont renesas_rcar.config to make sure
this configuration option is consistently enabled on all of Renesas R-Car
Gen2, Gen3, Gen4. Currently this option is not enabled on Gen4, this fix
corrects that omission.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
5 days agoMerge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sh
Tom Rini [Sat, 21 Dec 2024 15:45:30 +0000 (09:45 -0600)]
Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sh

- Two rswitch fixes and a clock fix

5 days agonet: rswitch: Add missing cache invalidate of TX descriptor
Marek Vasut [Thu, 19 Dec 2024 10:52:46 +0000 (11:52 +0100)]
net: rswitch: Add missing cache invalidate of TX descriptor

TFTP transfers of large files, for example 128 MiB, can sporadically
get stuck and the transfer slows down considerably.

This happens because the TX DMA descriptor in DRAM becomes out of sync
with the view of the TX DMA descriptor content from the CPU side, which
is viewed through the CPU caches. In order to guarantee these two views
are consistent, the cache over TX DMA descriptor that has possibly been
written by the rswitch hardware must first be invalidated, only then can
the descriptor be cleared and updated by the CPU, and finally the cache
over that area must be flushed back into DRAM to make sure the rswitch
hardware has consistent view of the updated descriptor content.

The very first invalidation operation was missing, which led to sporadic
corruption of the TX DMA descriptor. Fix it, add the missing invalidation
operation.

Reported-by: Enric Balletbo i Serra <eballetb@redhat.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Tested-by: Enric Balletbo i Serra <eballetb@redhat.com>
5 days agonet: renesas: Enable TFTP_TSIZE on all Renesas hardware
Marek Vasut [Wed, 18 Dec 2024 19:41:28 +0000 (20:41 +0100)]
net: renesas: Enable TFTP_TSIZE on all Renesas hardware

TFTP transfer size can be used to re-size the TFTP progress bar on
single line based on the server reported file size. Enable it by
default for Renesas hardware to avoid long scrolling walls of '#'
character during long TFTP transfers.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
5 days agoclk: renesas: r8a779h0: Drop CLK_PLL2_DIV2 to clarify ZCn clocks
Geert Uytterhoeven [Fri, 20 Dec 2024 00:04:08 +0000 (01:04 +0100)]
clk: renesas: r8a779h0: Drop CLK_PLL2_DIV2 to clarify ZCn clocks

Early revisions of the R-Car V4M Series Hardware User’s Manual
contained an incorrect formula for the CPU core clocks:

    ZCnφ = (PLL2VCO x 1/2) x mult/32

Dang-san fixed this by using CLK_PLL2_DIV2 instead of CLK_PLL2 as the
parent clock.

In Rev.0.70 of the documentation, the formula was corrected to:

    ZCnφ = (PLL2VCO x 1/4) x mult/32

As the CPG Block Diagram now shows a separate 1/4 post-divider for PLL2,
the use of CLK_PLL2_DIV2 is a recurring source of confusion.  Hence get
rid of CLK_PLL2_DIV2, and include the proper 1/4 post-divider in the
invocation of the DEF_GEN4_Z() macro, like is done on other R-Car Gen4
(and Gen3) SoCs.

Ported from Linux commit
92850bed9d4d ("clk: renesas: r8a779h0: Drop CLK_PLL2_DIV2 to clarify ZCn clocks")

Reported-by: Vinh Nguyen <vinh.nguyen.xz@renesas.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/0d2789cac2bf306145fe0bbf269c2da5942bb68f.1728377724.git.geert+renesas@glider.be
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
6 days agoMerge tag 'xilinx-for-v2025.01-rc5-v2' of https://source.denx.de/u-boot/custodians...
Tom Rini [Fri, 20 Dec 2024 14:26:16 +0000 (08:26 -0600)]
Merge tag 'xilinx-for-v2025.01-rc5-v2' of https://source.denx.de/u-boot/custodians/u-boot-microblaze

AMD/Xilinx changes for v2025.01-rc5 - second

- Fix find_ram_top() return to support configs > 4GB

6 days agocommon: memtop: Fix the return type for find_ram_top
Venkatesh Yadav Abbarapu [Fri, 20 Dec 2024 03:07:42 +0000 (08:37 +0530)]
common: memtop: Fix the return type for find_ram_top

As the return type is "int" for find_ram_top() function and
returning the "base" which is of phys_addr_t is breaking when the
"base" address is 64-bit. So fix this by updating the return type as
phys_addr_t.

Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
Reviewed-by: Michal Simek <michal.simek@amd.com>
Acked-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Link: https://lore.kernel.org/r/20241220030742.1745984-1-venkatesh.abbarapu@amd.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
7 days agoMakefile: Match the full path to ccache for filtering
Manorit Chawdhry [Tue, 10 Dec 2024 09:16:45 +0000 (14:46 +0530)]
Makefile: Match the full path to ccache for filtering

One can use ccache by keeping ccache in PATH or by providing the full
path to ccache as well. Providing the full path to ccache fails as the
current regex tries to look for ccache being the initial token during
filtering.

Do a greedy search to remove anything before ccache for regex matching.

Fixes: 04b1d84221d5 ("Makefile: fix empty MK_ARCH when using ccache")
Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
7 days agoimx: Fix usable memory ranges for imx8m SOCs
Ilias Apalodimas [Wed, 18 Dec 2024 09:00:06 +0000 (11:00 +0200)]
imx: Fix usable memory ranges for imx8m SOCs

commit e27bddff4b97 ("imx8m: Restrict usable memory to space below 4G boundary")
tried to adjust the usable memory limits on a 4GB boundary.

ram_top is described as 'top address of RAM used by U-Boot' and we want
to preserve that. This is defined as a phys_addr_t and unfortunately
its size differs across architectures. This has lead us to a weird
state where 32bit boards define it 'SZ_4GB - 1' and 64bit boards as
'SZ_4GB' unless it was otherwise defined.

With some recent LMB changes and specifically
commit 1a48b0be93d4 ("lmb: prohibit allocations above ram_top even from same bank")
the board fails to boot properly although the commit above is correct
since it's making sure that no memory above ram_top is usable -- but
added to our memory map so EFI can hand it over to the booted OS.

The reason for that is that during the LMB init we add all usable memory
in lmb_add_memory(). In that function any memory above ram_top gets added
as 'reserved' for LMB. With the current values tha's set to 0xFFFF_FFFF
for this board. Later LMB is trying to protect the memory area U-Boot lives
in with lmb_reserve_common(). The latter fails though since it tries to
add U-Boot top (which is 0xFFFF_FFFF as well) to U-Boot 'bottom'. This call
will fail since 1 byte of that memory range is already marked as 'reserved'.

Since we are close to the release, LMB seems to assume that the address
is rounded up and is the 'next address' and so does parsing and adding
memory ranges from DT files, bump the ram_top of the board by 1byte.

In the long run we should change all of the above and have 32b and 64b
platforms define ram_top identically.

Add a Fixes tag although the commit is correct, so people can figure out
the broken scenarios in the future.

Suggested-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Fixes: commit 1a48b0be93d4 ("lmb: prohibit allocations above ram_top even from same bank")
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Reported-by: João Paulo Gonçalves <jpaulo.silvagoncalves@gmail.com>
Closes: https://lore.kernel.org/all/20241216114231.qpfwug3zfqkxn3d5@joaog-nb.corp.toradex.com/
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Fixes: 74f88b72219e ("ARM: imx: imx8m: Fix board_get_usable_ram_top()")
7 days agoRevert "configs: JH7110: enable EFI_LOADER_BOUNCE_BUFFER"
E Shattow [Mon, 16 Dec 2024 06:32:12 +0000 (22:32 -0800)]
Revert "configs: JH7110: enable EFI_LOADER_BOUNCE_BUFFER"

("Enable EFI_LOADER_BOUNCE_BUFFER") is not the correct fix for the
problem it describes.

The change of memory addressing leading to side-effects in commit
22f2c9ed9f53 ("efi: memory: use the lmb API's for allocating and
freeing memory") is remedied by commit 1a48b0be93d4 ("lmb: prohibit
allocations above ram_top even from same bank").

This reverts commit 9c792ab336f7146e8d49bca6d9d093d2392ded5d.

7 days agonet: lwip: check if network device is available in do_dhcp
Heinrich Schuchardt [Thu, 5 Dec 2024 19:17:36 +0000 (20:17 +0100)]
net: lwip: check if network device is available in do_dhcp

eth_get_dev() returns NULL if no network device is available.
Not checking the return value leads to a crash when the device
pointer is dereferenced.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
7 days agonet: lwip: do not return CMD_RET_USAGE if no interface
Heinrich Schuchardt [Thu, 5 Dec 2024 19:32:53 +0000 (20:32 +0100)]
net: lwip: do not return CMD_RET_USAGE if no interface

If the dns command cannot find a network interface, we should return
CMD_RETFAIURE and not -1 (CMD_RET_USAGE).

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
7 days agobinman: Regenerate tools/binman/entries.rst
Tom Rini [Thu, 19 Dec 2024 16:19:57 +0000 (10:19 -0600)]
binman: Regenerate tools/binman/entries.rst

There have been a few changes to the areas that this file documents
without having regenerated the file. Do so now.

Signed-off-by: Tom Rini <trini@konsulko.com>
7 days agoMerge tag 'u-boot-dfu-20241219' of https://source.denx.de/u-boot/custodians/u-boot-dfu
Tom Rini [Thu, 19 Dec 2024 16:19:29 +0000 (10:19 -0600)]
Merge tag 'u-boot-dfu-20241219' of https://source.denx.de/u-boot/custodians/u-boot-dfu

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

Android:
- Fix kcmdline_extra support when parsing boot image
- Fix memory leak when after bootargs concatenation
- Fix length calculation when merging bootargs, cmdline and kcmdline

8 days agoMerge tag 'u-boot-stm32-20241218' of https://source.denx.de/u-boot/custodians/u-boot-stm master
Tom Rini [Wed, 18 Dec 2024 14:01:17 +0000 (08:01 -0600)]
Merge tag 'u-boot-stm32-20241218' of https://source.denx.de/u-boot/custodians/u-boot-stm

CI: https://source.denx.de/u-boot/custodians/u-boot-stm/-/pipelines/23931

- Restore SPL boot from sdcard for STM32MP1 platforms
- Fix STACK_SIZE for STM32 MCU's board

8 days agoboot: android: rework bootargs concatenation
Nicolas Belin [Tue, 17 Dec 2024 13:29:10 +0000 (14:29 +0100)]
boot: android: rework bootargs concatenation

Rework the bootargs concatenation allocating more accurately
the length that is needed.
Do not forget an extra byte for the null termination byte as,
in some cases, the allocation was 1 byte short.

Fixes: 86f4695b ("image: Fix Android boot image support")
Signed-off-by: Nicolas Belin <nbelin@baylibre.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Link: https://lore.kernel.org/r/20241217-fix-bootargs-concatenation-v2-3-b2fd7cf4e130@baylibre.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
8 days agoboot: android: free newbootargs when done
Nicolas Belin [Tue, 17 Dec 2024 13:29:09 +0000 (14:29 +0100)]
boot: android: free newbootargs when done

Free newbootargs when the concatenation is done and bootargs env
is set.

Fixes: 86f4695b ("image: Fix Android boot image support")
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Signed-off-by: Nicolas Belin <nbelin@baylibre.com>
Link: https://lore.kernel.org/r/20241217-fix-bootargs-concatenation-v2-2-b2fd7cf4e130@baylibre.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
8 days agoboot: android: fix extra command line support
Nicolas Belin [Tue, 17 Dec 2024 13:29:08 +0000 (14:29 +0100)]
boot: android: fix extra command line support

Check that the value at the address kcmdline_extra is not 0
instead of checking the address value itself keeping it
consistent with what is done for kcmdline.

Fixes: b36b227b ("android: boot: support extra command line")
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Signed-off-by: Nicolas Belin <nbelin@baylibre.com>
Link: https://lore.kernel.org/r/20241217-fix-bootargs-concatenation-v2-1-b2fd7cf4e130@baylibre.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
8 days agoconfigs: stm32mp1: Restore boot SPL from sdcard for Engicam i.Core STM32MP1 C.TOUCH 2.0
Patrice Chotard [Mon, 16 Dec 2024 10:22:19 +0000 (11:22 +0100)]
configs: stm32mp1: Restore boot SPL from sdcard for Engicam i.Core STM32MP1 C.TOUCH 2.0

Restore boot SPL from sdcard for Engicam i.Core STM32MP1 C.TOUCH 2.0.

Fixes: 2a00d73d081a ("spl: mmc: Try to clean up raw-mode options")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
8 days agoconfigs: stm32mp1: Restore boot SPL from sdcard for Engicam MicroGEA STM32MP1 MicroDe...
Patrice Chotard [Mon, 16 Dec 2024 10:22:18 +0000 (11:22 +0100)]
configs: stm32mp1: Restore boot SPL from sdcard for Engicam MicroGEA STM32MP1 MicroDev 2.0 7" OF

Restore boot SPL from sdcard for Engicam MicroGEA STM32MP1 MicroDev 2.0 7" OF

Fixes: 2a00d73d081a ("spl: mmc: Try to clean up raw-mode options")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
8 days agoconfigs: stm32mp1: Restore boot SPL from sdcard for Engicam i.Core STM32MP1 EDIMM2.2
Patrice Chotard [Mon, 16 Dec 2024 10:22:17 +0000 (11:22 +0100)]
configs: stm32mp1: Restore boot SPL from sdcard for Engicam i.Core STM32MP1 EDIMM2.2

Restore boot SPL from sdcard for Engicam i.Core STM32MP1 EDIMM2.2.

Fixes: 2a00d73d081a ("spl: mmc: Try to clean up raw-mode options")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
8 days agoconfigs: stm32mp1: Restore boot SPL from sdcard for Engicam i.Core STM32MP1 C.TOUCH 2.0
Patrice Chotard [Mon, 16 Dec 2024 10:22:16 +0000 (11:22 +0100)]
configs: stm32mp1: Restore boot SPL from sdcard for Engicam i.Core STM32MP1 C.TOUCH 2.0

Restore boot SPL from sdcard for Engicam i.Core STM32MP1 C.TOUCH 2.0.

Fixes: 2a00d73d081a ("spl: mmc: Try to clean up raw-mode options")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
8 days agoconfigs: stm32mp1: Restore boot SPL from sdcard for stm32mp15
Patrice Chotard [Mon, 16 Dec 2024 10:22:15 +0000 (11:22 +0100)]
configs: stm32mp1: Restore boot SPL from sdcard for stm32mp15

Restore boot SPL from sdcard for STM32MP1 platforms.

Fixes: 2a00d73d081a ("spl: mmc: Try to clean up raw-mode options")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
8 days agoARM: dts: stm32: Deduplicate CONFIG_OF_SPL_REMOVE_PROPS on DH STM32MP15xx DHSOM
Marek Vasut [Sun, 15 Dec 2024 23:29:15 +0000 (00:29 +0100)]
ARM: dts: stm32: Deduplicate CONFIG_OF_SPL_REMOVE_PROPS on DH STM32MP15xx DHSOM

The content of CONFIG_OF_SPL_REMOVE_PROPS is the same in both
STM32MP15xx DHCOM and DHCOR defconfigs, deduplicate the content
into stm32mp15_dhsom.config .

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
8 days agoARM: dts: stm32: Drop access-controllers from SPL DT on DH STM32MP15xx DHSOM
Marek Vasut [Sun, 15 Dec 2024 23:29:14 +0000 (00:29 +0100)]
ARM: dts: stm32: Drop access-controllers from SPL DT on DH STM32MP15xx DHSOM

The access-controllers DT property is not useful in STM32MP15xx SPL,
remove it to reduce SPL control DT size. No functional change.

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
8 days agoARM: dts: stm32: Reinstate SPL_SYS_MMCSD_RAW_MODE on DH STM32MP15xx DHSOM
Marek Vasut [Sun, 15 Dec 2024 23:29:13 +0000 (00:29 +0100)]
ARM: dts: stm32: Reinstate SPL_SYS_MMCSD_RAW_MODE on DH STM32MP15xx DHSOM

Commit 2a00d73d081a ("spl: mmc: Try to clean up raw-mode options")
broke booting from SD card on STM32MP15xx , reinstate raw mode SD
boot configuration options and select the correct raw mode partition
for STM32MP15xx to fix SD boot on STM32MP15xx DHSOM.

Fixes: 2a00d73d081a ("spl: mmc: Try to clean up raw-mode options")
Reported-by: Patrice Chotard <patrice.chotard@foss.st.com>
Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
8 days agoARM: dts: stm32: Reinstate missing root oscillators on DH STM32MP15xx DHCOR
Marek Vasut [Sun, 15 Dec 2024 23:29:12 +0000 (00:29 +0100)]
ARM: dts: stm32: Reinstate missing root oscillators on DH STM32MP15xx DHCOR

The root oscillators reference used to be in rcc node since
3d15245502c4 ("ARM: dts: stm32mp1: explicit clock reference needed by RCC clock driver")
however this is not part of upstream stm32mp151.dtsi . The
RCC driver does need this reference, reinstate it locally.

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
8 days agoARM: dts: stm32: Reinstate missing root oscillators on STM32MP15xx
Marek Vasut [Sun, 15 Dec 2024 23:31:38 +0000 (00:31 +0100)]
ARM: dts: stm32: Reinstate missing root oscillators on STM32MP15xx

The root oscillators reference used to be in rcc node since
3d15245502c4 ("ARM: dts: stm32mp1: explicit clock reference needed by RCC clock driver")
however this is not part of upstream stm32mp151.dtsi . The
RCC driver does need this reference, reinstate it globally.

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Tested-by: Patrice Chotard <patrice.chotard@foss.st.com>
8 days agoKconfig: Set STACK_SIZE to 16KB for STM32 MCUs
Patrice Chotard [Wed, 18 Dec 2024 07:58:33 +0000 (08:58 +0100)]
Kconfig: Set STACK_SIZE to 16KB for STM32 MCUs

Since commit 6534d26ee9a5 ("lmb: do away with arch_lmb_reserve()"),
STM32F746-disco hangs when loading device tree just before starting
kernel:

Retrieving file: /stm32f746-disco.dtb
Kernel image @ 0xc0008000 [ 0x000000 - 0x19ae00 ]
Flattened Device Tree blob at c0408000
   Booting using the fdt blob at 0xc0408000
Working FDT set to c0408000
   Loading Device Tree to c05f8000, end c05ff71c ...

Adjust STACK_SIZE to 16KB for STM32 MCUs (F4/F7 and H7) boards
to fix kernel boot process as some of these boards embeds a limited
amount of memory.

Fixes: 6534d26ee9a5 ("lmb: do away with arch_lmb_reserve()")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
9 days agoARM: stm32mp: Fix dram_bank_mmu_setup() for LMB located above ram_top
Patrice Chotard [Fri, 13 Dec 2024 13:26:55 +0000 (14:26 +0100)]
ARM: stm32mp: Fix dram_bank_mmu_setup() for LMB located above ram_top

Previously, all LMB marked with LMB_NOMAP (above and below ram_top)
are considered as invalid entry in TLB.

Since commit 1a48b0be93d4 ("lmb: prohibit allocations above ram_top
 even from same bank") all LMB located above ram_top are now marked
LMB_NOOVERWRITE and no more LMB_MAP.

This area above ram_top is reserved for OPTEE and must not be cacheable,
otherwise this leads to a Panic on some boards (Issue on STM32MP135F-DK).

Restore previous behavior by marking invalid entry all TLB above ram_top.

Fixes: 1a48b0be93d4 ("lmb: prohibit allocations above ram_top even from same bank")
Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
cc: Sughosh Ganu <sughosh.ganu@linaro.org>
Acked-by: Sughosh Ganu <sughosh.ganu@linaro.org>
9 days agogitlab: Add an rpi to the sjg lab
Simon Glass [Fri, 13 Dec 2024 00:59:03 +0000 (17:59 -0700)]
gitlab: Add an rpi to the sjg lab

I have an original rpi installed now, loaded with OS Lite (32-bit)
Add an entry for it so that it can be used for testing.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
9 days agoboot: Use correct PHASE_ variable for expo
Simon Glass [Sat, 7 Dec 2024 14:52:27 +0000 (07:52 -0700)]
boot: Use correct PHASE_ variable for expo

This patch was written before the XPL change-over. Update the Makefile
condition to the new way.

Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes: ae3b5928d61 ("x86: coreboot: Allow building an expo for...")
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
9 days agotest/py: Always use the current dir as the source tree
Simon Glass [Wed, 11 Dec 2024 13:18:58 +0000 (06:18 -0700)]
test/py: Always use the current dir as the source tree

The logic in get_details() retrieves the default source directory from
the Labgrid settings. This is convenient for interactive use, since it
allows pytests to be run from any directory and still find the source
tree.

However, it is not actually correct.

Gitlab sets the current directory to the source tree and expects that to
be used. At present it is ignored. The result is that Gitlab builds
whatever happens to be in the default source directory, ignoring the
tree it is supposed to be building.

Fix this by using the directory of the source tree, always. This is
obtained by looking at the grandparent of the conftest.py file.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reported-by: Tom Rini <trini@konsulko.com>
Fixes: bf89a8f1fc2 ("test: Introduce the concept of a role")
Tested-by: Tom Rini <trini@konsulko.com>
9 days agoMerge patch series "Tegra: fix clock init"
Tom Rini [Mon, 16 Dec 2024 23:07:42 +0000 (17:07 -0600)]
Merge patch series "Tegra: fix clock init"

Svyatoslav Ryhel <clamor95@gmail.com> says:

This should fix:
https://lore.kernel.org/all/20241201164810.GT3600562@bill-the-cat/T/#m2b62b471fd37e4c9725c98547e2a919cf11db5e5

Link: https://lore.kernel.org/r/20241213145319.10956-1-clamor95@gmail.com
9 days agodriver: clk: tegra: init basic clocks on probe
Svyatoslav Ryhel [Fri, 13 Dec 2024 14:53:19 +0000 (16:53 +0200)]
driver: clk: tegra: init basic clocks on probe

In case DM drivers probe earlier than board clock setup is done
init of basic clocks should be done in CAR driver probe as well.
Add it to avoid possible clock related problems.

Acked-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
9 days agodriver: clk: tegra: partially support PLL clocks
Svyatoslav Ryhel [Fri, 13 Dec 2024 14:53:18 +0000 (16:53 +0200)]
driver: clk: tegra: partially support PLL clocks

Return PLL id into struct clk if PLL is parsed from device
tree instead of throwing an error. Allow requesting PLL
clock rate via get_rate op.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
9 days agoMerge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-mmc
Tom Rini [Mon, 16 Dec 2024 22:17:13 +0000 (16:17 -0600)]
Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-mmc

CI: https://source.denx.de/u-boot/custodians/u-boot-mmc/-/pipelines/23871

- Fix potential timer value truncation

10 days agommc: Fix potential timer value truncation
Ronald Wahl [Wed, 11 Dec 2024 20:52:00 +0000 (21:52 +0100)]
mmc: Fix potential timer value truncation

On 64bit systems the timer value might be truncated to a 32bit value
causing malfunctions. For example on ARM the timer might start from 0
again only after a cold reset. The 32bit overflow occurs after a bit
more than 49 days (1000 Hz counter) so booting after that time may lead
to a surprise because the board might become stuck requiring a cold
reset.

Signed-off-by: Ronald Wahl <ronald.wahl@legrand.com>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
11 days agoMerge tag 'fsl-qoriq-2024-12-15' of https://source.denx.de/u-boot/custodians/u-boot...
Tom Rini [Sun, 15 Dec 2024 14:02:46 +0000 (08:02 -0600)]
Merge tag 'fsl-qoriq-2024-12-15' 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/23856

- Use strcat to replace sprintf for t208xqds
- Fix bootefi for board ls1028a
- Various fixes to sl28 board

11 days agoMerge tag 'doc-2025-01-rc5' of https://source.denx.de/u-boot/custodians/u-boot-efi
Tom Rini [Sun, 15 Dec 2024 14:02:22 +0000 (08:02 -0600)]
Merge tag 'doc-2025-01-rc5' of https://source.denx.de/u-boot/custodians/u-boot-efi

Pull request doc-2025-01-rc5

Documentation:

* sending_patches: Fix spelling of "its"
* environment: NET_LWIP dhcp sets ipaddrN, netmaskN and gatewayipN
* remove redundant Rockchip bindings
* fwu_updates: Fix formatting
* coolpi: Fix document style
* board: theobroma-systems: fix feature list in introductions

Fix typos in code comments:

* clk: mpc83xx: Fix typo in "Coherent System Bus"
* efi_loader: Fix typos in enum efi_allocate_type

11 days agoboard: freescale: Replace invalid usage of sprintf by strcat
Francois Berder [Wed, 10 Jul 2024 21:37:35 +0000 (23:37 +0200)]
board: freescale: Replace invalid usage of sprintf by strcat

buf was used as destination and as parameter to sprintf
which triggers an undefined behaviour.
This commit removes this usage of sprintf and uses strcat
to append strings to buf variable.

Signed-off-by: Francois Berder <fberder@outlook.fr>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
11 days agoconfigs: ls1028a: Fix bootefi issue on Layerscape ls1028ardb platform
Wei Ming Chen [Sun, 13 Oct 2024 07:24:35 +0000 (15:24 +0800)]
configs: ls1028a: Fix bootefi issue on Layerscape ls1028ardb platform

Without this patch, there will be error indicating that
"Cannot use 64 bit addresses with SDMA", and the booting
process will stuck.

please see full boot log below

U-Boot 2022.04-g18185931 (Sep 11 2024 - 13:15:30 +0800)

SoC:  LS1028AE Rev1.0 (0x870b0010)
Clock Configuration:
       CPU0(A72):1500 MHz  CPU1(A72):1500 MHz
       Bus:      400  MHz  DDR:      1600 MT/s
Reset Configuration Word (RCW):
       000000003c004010 00000030 00000000 00000000
       0000001000000000 018f0000 0030c000 00000000
       00000020020031a0 00002580 00000000 00003296
       0000003000000000 00000010 00000000 00000000
       0000004000000000 00000000 00000000 00000000
       0000005000000000 00000000 00000000 00000000
       0000006000000000 00000000 200e705a 00000000
       00000070bb580000 00000000
Model: LS1028A RDB Board
Board: LS1028AE Rev1.0-RDB, Version: C, boot from SD
FPGA: v8 (RDB)
SERDES1 Reference : Clock1 = 100.00MHz Clock2 = 100.00MHz
DRAM:  3.9 GiB
DDR    3.9 GiB (DDR4, 32-bit, CL=11, ECC on)
Using SERDES1 Protocol: 47960 (0xbb58)
PCIe1: pcie@3400000 Root Complex: no link
PCIe2: pcie@3500000 Root Complex: x1 gen2
Core:  45 devices, 22 uclasses, devicetree: separate
WDT:   Started watchdog@c000000 with servicing (60s timeout)
WDT:   Started watchdog@c010000 with servicing (60s timeout)
MMC:   FSL_SDHC: 0, FSL_SDHC: 1
Loading Environment from MMC... *** Warning - bad CRC, using default environment

EEPROM: Invalid ID (ff ff ff ff)
In:    serial
Out:   serial
Err:   serial
SEC0:  RNG instantiated
Net:
Warning: enetc-0 (eth0) using random MAC address - d2:9b:a5:37:7b:b5
eth0: enetc-0
Warning: enetc-2 (eth1) using random MAC address - ca:57:11:de:de:cb
, eth1: enetc-2, eth2: swp0, eth3: swp1, eth4: swp2, eth5: swp3
Hit any key to stop autoboot:  0
Trying load HDP firmware from SD..
switch to partitions #0, OK
mmc0 is current device
Device: FSL_SDHC
Manufacturer ID: 9f
OEM: 5449
Name: SD32G
Bus Speed: 50000000
Mode: SD High Speed (50MHz)
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 28.9 GiB
Bus Width: 4-bit
Erase Group Size: 512 Bytes

MMC read: dev # 0, block # 18944, count 512 ... 512 blocks read: OK
Loading hdp firmware from 0x00000000a0000000 offset 0x0000000000002000
Loading hdp firmware Complete
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
** Unable to read file / **
Failed to load '/'
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
Scanning disk mmc@2140000.blk...
Scanning disk mmc@2150000.blk...
Found 7 disks
ERROR: invalid device tree
Found EFI removable media binary efi/boot/bootaa64.efi
981992 bytes read in 44 ms (21.3 MiB/s)
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
WARNING could not find node vivante,gc: FDT_ERR_NOTFOUND.
Booting /efi\boot\bootaa64.efi
Cannot use 64 bit addresses with SDMA
Error reading cluster
** Unable to read file /efi/boot/grubaa64.efi **
Unexpected return from initial read: Device Error, buffersize 29D790
Failed to load image ぀¬ : Device Error
start_image() returned Device Error
EFI LOAD FAILED: continuing...
switch to partitions #0, OK
mmc1(part 0) is current device
Scanning mmc 1:1...
** Unable to read file / **
Failed to load '/'
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
BootOrder not defined
EFI boot manager: Cannot load any image
Scanning mmc 1:2...
** Unable to read file / **
Failed to load '/'
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
BootOrder not defined
EFI boot manager: Cannot load any image
starting USB...
Bus usb@3100000: Register 200017f NbrPorts 2
Starting the controller
USB XHCI 1.00
Bus usb@3110000: Register 200017f NbrPorts 2
Starting the controller
USB XHCI 1.00
scanning bus usb@3100000 for devices... 1 USB Device(s) found
scanning bus usb@3110000 for devices... 1 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found

Device 0: unknown device
Trying load from SD ...
switch to partitions #0, OK
mmc0 is current device
Device: FSL_SDHC
Manufacturer ID: 9f
OEM: 5449
Name: SD32G
Bus Speed: 50000000
Mode: SD High Speed (50MHz)
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 28.9 GiB
Bus Width: 4-bit
Erase Group Size: 512 Bytes

MMC read: dev # 0, block # 32768, count 81920 ... 81920 blocks read: OK
Wrong Image Format for bootm command
ERROR: can't get kernel image!

Signed-off-by: Wei Ming Chen <jj251510319013@gmail.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
11 days agodoc: cosmetic: fwu_updates: Fix formatting
Leonard Anderweit [Fri, 13 Dec 2024 10:20:24 +0000 (11:20 +0100)]
doc: cosmetic: fwu_updates: Fix formatting

Remove one of the double colon so ..code-block is used for formatting.

Signed-off-by: Leonard Anderweit <l.anderweit@phytec.de>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
11 days agodoc: environment: NET_LWIP dhcp sets ipaddrN, netmaskN and gatewayipN
Jerome Forissier [Tue, 3 Dec 2024 13:50:51 +0000 (14:50 +0100)]
doc: environment: NET_LWIP dhcp sets ipaddrN, netmaskN and gatewayipN

Document environment variables set by the dhcp command when the network
stack is lwIP.

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
11 days agodoc: board: theobroma-systems: fix feature list in introductions
Quentin Schulz [Mon, 2 Dec 2024 13:01:26 +0000 (14:01 +0100)]
doc: board: theobroma-systems: fix feature list in introductions

Board introductions have a feature list which isn't formatted properly
according to rST and is thus rendered incorrectly.

Fix this by adding the missing newlines in the appropriate places.

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
11 days agoefi_loader: Fix typos in enum efi_allocate_type
Simon Glass [Sun, 1 Dec 2024 15:24:21 +0000 (08:24 -0700)]
efi_loader: Fix typos in enum efi_allocate_type

Fix 'indicatged' and 'adress' typos.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
11 days agodoc: coolpi: Fix document style
Andy Yan [Mon, 2 Dec 2024 12:03:53 +0000 (20:03 +0800)]
doc: coolpi: Fix document style

Add a blank line after title "Specification:" to
make it render correctly html.

And also remove the useless > in bash code block.

Signed-off-by: Andy Yan <andyshrk@163.com>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
11 days agodoc: remove redundant Rockchip bindings
Johan Jonker [Sat, 30 Nov 2024 21:18:57 +0000 (22:18 +0100)]
doc: remove redundant Rockchip bindings

Most Rockchip device tree related bindings are converted to YAML
and available in the U-boot /dts/upstream/Bindings/ directory.
Remove all redundant U-boot entries.

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
11 days agodoc: sending_patches: Fix spelling of "its"
J. Neuschäfer [Fri, 29 Nov 2024 19:42:29 +0000 (20:42 +0100)]
doc: sending_patches: Fix spelling of "its"

Although it has historically been different, the current standard
spelling of the neutral singular possessive pronoun is "its".

Signed-off-by: J. Neuschäfer <j.ne@posteo.net>
11 days agoclk: mpc83xx: Fix typo in "Coherent System Bus"
J. Neuschäfer [Fri, 29 Nov 2024 19:42:28 +0000 (20:42 +0100)]
clk: mpc83xx: Fix typo in "Coherent System Bus"

Cosmetic change.

Signed-off-by: J. Neuschäfer <j.ne@posteo.net>
11 days agoboard: sl28: fix USB0
Michael Walle [Fri, 13 Dec 2024 10:23:21 +0000 (11:23 +0100)]
board: sl28: fix USB0

Since commit 61ff13283c3b ("board: sl28: move to OF_UPSTREAM") USB0 is
broken because the former u-boot soc dtsi was setting dr_mode to "host"
but the linux device tree isn't. That is because linux fully supports
OTG but u-boot doesn't. Therefore, u-boot only ever enabled host mode
and never OTG mode. Add it to our board "-u-boot.dtsi" to fix it.

Fixes: 61ff13283c3b ("board: sl28: move to OF_UPSTREAM")
Reported-by: Heiko Thiery <heiko.thiery@gmail.com>
Signed-off-by: Michael Walle <mwalle@kernel.org>
Tested-by: Heiko Thiery <heiko.thiery@gmail.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
11 days agodoc: board: sl28: fix table
Michael Walle [Fri, 13 Dec 2024 10:23:20 +0000 (11:23 +0100)]
doc: board: sl28: fix table

Convert the table to a correct reST table syntax.

Signed-off-by: Michael Walle <mwalle@kernel.org>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
11 days agoboard: sl28: fix network on variant 3
Michael Walle [Fri, 13 Dec 2024 10:23:19 +0000 (11:23 +0100)]
board: sl28: fix network on variant 3

Network is broken on variant 3 boards since commit 61ff13283c3b ("board:
sl28: move to OF_UPSTREAM") because it was removing the variant 3
handling. That is because at that time the var3 device tree was not
upstream. FWIW variant 3 is actually the same as the base variant, but
I've missed that the -u-boot.dtsi is not inlcuded in this case which
will set the ethernet alias.  Now that the var3 device tree is upstream,
just re-add it to the SPL handling again.

Fixes: 61ff13283c3b ("board: sl28: move to OF_UPSTREAM")
Signed-off-by: Michael Walle <mwalle@kernel.org>
Reviewed-by: Heiko Thiery <heiko.thiery@gmail.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
11 days agoboard: sl28: increase SPL_SYS_MALLOC_SIZE
Michael Walle [Fri, 13 Dec 2024 10:23:18 +0000 (11:23 +0100)]
board: sl28: increase SPL_SYS_MALLOC_SIZE

Increase the malloc size to 2MiB because our FIT image exceeds the 1MiB
limit either if BL31 mode is enabled or if another device tree is added
to the image.

Signed-off-by: Michael Walle <mwalle@kernel.org>
Tested-by: Heiko Thiery <heiko.thiery@gmail.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
11 days agoboard: sl28: fix linking with disabled watchdog
Michael Walle [Fri, 13 Dec 2024 10:23:17 +0000 (11:23 +0100)]
board: sl28: fix linking with disabled watchdog

We don't have a reference to the driver used by
uclass_get_device_by_driver() in stop_recovery_watchdog(). Fix it by not
calling that function if the watchdog driver isn't enabled.

Signed-off-by: Michael Walle <mwalle@kernel.org>
Reviewed-by: Heiko Thiery <heiko.thiery@gmail.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2 weeks agoMerge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-usb
Tom Rini [Thu, 12 Dec 2024 15:50:25 +0000 (09:50 -0600)]
Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-usb

- USB onboard-hub fix

2 weeks agoMerge tag 'xilinx-for-v2025.01-rc5' of https://source.denx.de/u-boot/custodians/u...
Tom Rini [Thu, 12 Dec 2024 15:20:52 +0000 (09:20 -0600)]
Merge tag 'xilinx-for-v2025.01-rc5' of https://source.denx.de/u-boot/custodians/u-boot-microblaze

AMD/Xilinx changes for v2025.01-rc5

- Fix reset issue for SOM

2 weeks agoboot: fdt: Handle already reserved memory in boot_fdt_reserve_region()
Sam Protsenko [Wed, 11 Dec 2024 02:17:02 +0000 (20:17 -0600)]
boot: fdt: Handle already reserved memory in boot_fdt_reserve_region()

The boot_fdt_add_mem_rsv_regions() function can be called twice, e.g.
first time during the board init (as a part of LMB init), and then when
booting the OS with 'booti' command:

    lmb_add_region_flags
    lmb_reserve_flags
    boot_fdt_reserve_region
    boot_fdt_add_mem_rsv_regions
               ^
               |
               +-----------------------+
               | (1)                   | (2)
    lmb_reserve_common        image_setup_linux
    lmb_init                  ...
    initr_lmb                 do_booti
    board_init_r              'booti'

That consequently leads to the attempt of reserving the same memory
areas (described in the 'reserved-memory' dts node) in LMB. The
lmb_add_region_flags() returns -EEXIST error code in such cases, but
boot_fdt_reserve_region() handles all negative error codes as a failure
to reserve fdt memory region, printing corresponding error messages,
which are essentially harmless, but misleading. For example, this is the
output of 'booti' command on E850-96 board:

    => booti $loadaddr - $fdtaddr
    ...
    ERROR: reserving fdt memory region failed
           (addr=bab00000 size=5500000 flags=2)
    ERROR: reserving fdt memory region failed
           (addr=f0000000 size=200000 flags=4)
    ...
    Starting kernel ...

The mentioned false positive error messages are observed starting with
commit 1d9aa4a283da ("lmb: Fix the allocation of overlapping memory
areas with !LMB_NONE"), which removes the check for the already added
memory regions in lmb_add_region_flags(), making it return -1 for
!LMB_NONE cases. Another commit 827dee587b75 ("fdt: lmb: add reserved
regions as no-overwrite") changes flags used for reserving memory in
boot_fdt_add_mem_rsv_regions() from LMB_NONE to LMB_NOOVERWRITE. So
together with the patch mentioned earlier, it makes
lmb_add_region_flags() return -1 when called from
boot_fdt_reserve_region().

Since then, the different patch was implemented, returning -EEXIST error
code in described cases, which is:

   lmb: Return -EEXIST in lmb_add_region_flags() if region already added

Handle -EEXIST error code as a normal (successful) case in
lmb_reserve_flags() and don't print any messages.

Fixes: 1d9aa4a283da ("lmb: Fix the allocation of overlapping memory areas with !LMB_NONE")
Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Tested-by: Michal Simek <michal.simek@amd.com>
2 weeks agolmb: Return -EEXIST in lmb_add_region_flags() if region already added
Sam Protsenko [Wed, 11 Dec 2024 02:17:01 +0000 (20:17 -0600)]
lmb: Return -EEXIST in lmb_add_region_flags() if region already added

An attempt to add the already added LMB region using
lmb_add_region_flags() ends up in lmb_addrs_overlap() check, which
eventually leads to either returning 0 if 'flags' is LMB_NONE, or -1
otherwise. It makes it impossible for the user of this function to catch
the case when the region is already added and differentiate it from
regular errors. That in turn may lead to incorrect error handling in the
caller code, like reporting misleading errors or interrupting the normal
code path where it could be treated as the normal case. An example is
boot_fdt_reserve_region() function, which might be called twice (e.g.
during board startup in initr_lmb(), and then during 'booti' command
booting the OS), thus trying to reserve exactly the same memory regions
described in the device tree twice, which produces an error message on
second call.

Return -EEXIST error code in case when the added region exists and it's
not LMB_NONE; for LMB_NONE return 0, to conform to unit tests
(specifically test_alloc_addr() in test/lib/lmb.c) and the preferred
behavior described in commit 1d9aa4a283da ("lmb: Fix the allocation of
overlapping memory areas with !LMB_NONE"). The change of
lmb_add_region_flags() return values is described in the table below:

    Return case                        Pre-1d9   1d9    New
    -----------------------------------------------------------
    Added successfully                    0      0      0
    Failed to add                         -1     -1     -1
    Already added, flags == LMB_NONE      0      0      0
    Already added, flags != LMB_NONE      0      -1     -EEXIST

Rework all affected functions and their documentation. Also fix the
corresponding unit test which checks reserving the same region with the
same flags to account for the changed return value.

No functional change is intended (by this patch itself).

Fixes: 1d9aa4a283da ("lmb: Fix the allocation of overlapping memory areas with !LMB_NONE")
Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Tested-by: Michal Simek <michal.simek@amd.com>
2 weeks agoconfigs: am62x_evm_*: Fix USB DFU configuration
Roger Quadros [Tue, 3 Dec 2024 20:40:29 +0000 (22:40 +0200)]
configs: am62x_evm_*: Fix USB DFU configuration

CONFIG_USB_XHCI_DWC3 is not required for AM62x as the XHCI
driver is registered through the dwc3-generic driver.

CONFIG_USB_XHCI_DWC3 causes problems by hijacking the
USB controller even if it is not set for Host mode in
device tree.

'dm tree' output after 'usb start' is fixed from

 simple_bus    5  [ + ]   dwc3-am62             |   |-- dwc3-usb@f900000
 usb_gadget    0  [   ]   dwc3-generic-periphe  |   |   |-- usb@31000000
 usb           0  [ + ]   xhci-dwc3             |   |   `-- usb@31000000
 usb_hub       0  [ + ]   usb_hub               |   |       `-- usb_hub
 simple_bus    6  [ + ]   dwc3-am62             |   |-- dwc3-usb@f910000
 usb           1  [ + ]   dwc3-generic-host     |   |   |-- usb@31100000
 usb_hub       1  [ + ]   usb_hub               |   |   |   `-- usb_hub
 usb           1  [ + ]   xhci-dwc3             |   |   `-- usb@31100000
 usb_hub       2  [ + ]   usb_hub               |   |       `-- usb_hub

[notice that 'xhci-dwc3' and 'usb_hub' drivers are probed
 for both USB instances although the first instance
 is supposed to be 'peripheral' only]

to

 simple_bus    5  [   ]   dwc3-am62             |   |-- dwc3-usb@f900000
 usb_gadget    0  [   ]   dwc3-generic-periphe  |   |   `-- usb@31000000
 simple_bus    6  [ + ]   dwc3-am62             |   |-- dwc3-usb@f910000
 usb           1  [ + ]   dwc3-generic-host     |   |   `-- usb@31100000
 usb_hub       0  [ + ]   usb_hub               |   |       `-- usb_hub

Fixes: dfc2dff5a844 ("configs: am62x_evm_*: Enable USB and DFU support")
Signed-off-by: Roger Quadros <rogerq@kernel.org>
Reviewed-by: Siddharth Vadapalli <s-vadapalli@ti.com>
2 weeks agoMerge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sh
Tom Rini [Wed, 11 Dec 2024 18:50:29 +0000 (12:50 -0600)]
Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sh

- Fix some spelling mistakes

2 weeks agoMerge tag 'rpi-2025.01-rc5' of https://source.denx.de/u-boot/custodians/u-boot-raspbe...
Tom Rini [Wed, 11 Dec 2024 16:17:59 +0000 (10:17 -0600)]
Merge tag 'rpi-2025.01-rc5' of https://source.denx.de/u-boot/custodians/u-boot-raspberrypi

Updates for RPi for 2025.01:

- Enable capsule updates
- Pass CMA through from firmware DT

2 weeks agoboard: rpi: Enable capsule updates
Ilias Apalodimas [Fri, 13 Sep 2024 09:53:15 +0000 (12:53 +0300)]
board: rpi: Enable capsule updates

Since RPI works well using EFI and has no size limitations with regards
to U-Boot, add the needed structures to support capsule updates.

While at it update the most commonly used defconfigs and include capsule
support and U-Boot commands needed by EFI

Tested-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2 weeks agovideo: zynqmp: Add support for reset
Michal Simek [Mon, 9 Dec 2024 11:11:50 +0000 (12:11 +0100)]
video: zynqmp: Add support for reset

In Kria SOM configuration DP is under reset and access to DP is causing
hang that's why call reset at probe to avoid this situation.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/0504474a91a9839828aecd37f8855fd154cdf2e1.1733742708.git.michal.simek@amd.com
2 weeks agoboard: rpi: Pass CMA through from firmware DT
Peter Robinson [Fri, 11 Oct 2024 17:09:11 +0000 (18:09 +0100)]
board: rpi: Pass CMA through from firmware DT

For a lot of usecases, such as display, camera, media
the Raspberry Pi needs a lot more CMA than distros
configure as default so we should pass this parameter
through so things work as expected. Fix a spelling
mistake while we're at it.

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Matthias Brugger <mbrugger@suse.com>
2 weeks agousb: renesas: Fix R-Car spelling
Marek Vasut [Wed, 11 Dec 2024 07:30:37 +0000 (08:30 +0100)]
usb: renesas: Fix R-Car spelling

The correct spelling is R-Car, including the dash, update the usage.
Kconfig strings and comment changes only, no functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2 weeks agospi: renesas: Fix R-Car spelling
Marek Vasut [Wed, 11 Dec 2024 07:30:36 +0000 (08:30 +0100)]
spi: renesas: Fix R-Car spelling

The correct spelling is R-Car, including the dash, update the usage.
Kconfig strings and comment changes only, no functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2 weeks agoserial: renesas: Fix R-Car spelling
Marek Vasut [Wed, 11 Dec 2024 07:30:35 +0000 (08:30 +0100)]
serial: renesas: Fix R-Car spelling

The correct spelling is R-Car, including the dash, update the usage.
Kconfig strings and comment changes only, no functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2 weeks agopinctrl: renesas: Fix R-Car spelling
Marek Vasut [Wed, 11 Dec 2024 07:30:34 +0000 (08:30 +0100)]
pinctrl: renesas: Fix R-Car spelling

The correct spelling is R-Car, including the dash, update the usage.
Kconfig strings and comment changes only, no functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2 weeks agophy: renesas: Fix R-Car spelling
Marek Vasut [Wed, 11 Dec 2024 07:30:33 +0000 (08:30 +0100)]
phy: renesas: Fix R-Car spelling

The correct spelling is R-Car, including the dash, update the usage.
Comment changes only, no functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2 weeks agopci: renesas: Fix R-Car spelling
Marek Vasut [Wed, 11 Dec 2024 07:30:32 +0000 (08:30 +0100)]
pci: renesas: Fix R-Car spelling

The correct spelling is R-Car, including the dash, update the usage.
Kconfig strings and comment changes only, no functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2 weeks agomtd: renesas: Fix R-Car spelling
Marek Vasut [Wed, 11 Dec 2024 07:30:31 +0000 (08:30 +0100)]
mtd: renesas: Fix R-Car spelling

The correct spelling is R-Car, including the dash, update the usage.
Kconfig strings and comment changes only, no functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2 weeks agommc: renesas: Fix R-Car spelling
Marek Vasut [Wed, 11 Dec 2024 07:30:30 +0000 (08:30 +0100)]
mmc: renesas: Fix R-Car spelling

The correct spelling is R-Car, including the dash, update the usage.
Comment changes only, no functional change.

Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2 weeks agoi2c: renesas: Fix R-Car spelling
Marek Vasut [Wed, 11 Dec 2024 07:30:29 +0000 (08:30 +0100)]
i2c: renesas: Fix R-Car spelling

The correct spelling is R-Car, including the dash, update the usage.
Kconfig strings and comment changes only, no functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2 weeks agogpio: renesas: Fix R-Car spelling
Marek Vasut [Wed, 11 Dec 2024 07:30:28 +0000 (08:30 +0100)]
gpio: renesas: Fix R-Car spelling

The correct spelling is R-Car, including the dash, update the usage.
Kconfig strings and comment changes only, no functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2 weeks agoclk: renesas: Fix R-Car spelling
Marek Vasut [Wed, 11 Dec 2024 07:30:27 +0000 (08:30 +0100)]
clk: renesas: Fix R-Car spelling

The correct spelling is R-Car, including the dash, update the usage.
Kconfig strings and comment changes only, no functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2 weeks agoARM: renesas: Fix R-Car spelling
Marek Vasut [Wed, 11 Dec 2024 07:30:26 +0000 (08:30 +0100)]
ARM: renesas: Fix R-Car spelling

The correct spelling is R-Car, including the dash, update the usage.
Kconfig strings and comment changes only, no functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2 weeks agoARM: dts: renesas: Fix R-Car spelling
Marek Vasut [Wed, 11 Dec 2024 07:30:25 +0000 (08:30 +0100)]
ARM: dts: renesas: Fix R-Car spelling

The correct spelling is R-Car, including the dash, update the usage.
Comment change only, no functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2 weeks agousb: onboard-hub: Update the bind function based on peer-hub property
Venkatesh Yadav Abbarapu [Wed, 4 Dec 2024 07:25:20 +0000 (12:55 +0530)]
usb: onboard-hub: Update the bind function based on peer-hub property

As the "peer-hub" property is optional, don't error out just
skip the bind function.

Fixes: 57e30b09fc ("usb: onboard-hub: Bail out if peer hub is already probed")
Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
Acked-by: Michal Simek <michal.simek@amd.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Tested-by: Patrice Chotard <patrice.chotard@foss.st.com>
2 weeks agoPrepare v2025.01-rc4
Tom Rini [Mon, 9 Dec 2024 22:09:28 +0000 (16:09 -0600)]
Prepare v2025.01-rc4

Signed-off-by: Tom Rini <trini@konsulko.com>
2 weeks agoMerge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sh
Tom Rini [Mon, 9 Dec 2024 14:46:33 +0000 (08:46 -0600)]
Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sh

2 weeks agoarm64: renesas: Disable AVB1 and AVB2 on R8A779G0 V4H White Hawk board
Marek Vasut [Thu, 28 Nov 2024 04:11:19 +0000 (05:11 +0100)]
arm64: renesas: Disable AVB1 and AVB2 on R8A779G0 V4H White Hawk board

The U-Boot is currently not capable of handling ethernet-phy-ieee802.3-c45
PHYs correctly, and also does not handle MDIO bus wide reset-gpios property.
Until proper C45 PHY support lands in U-Boot, disable AVB1/AVB2 interfaces.
This only disables the two MACs with 88Q2110/88Q2112 100/1000BASE-T1 PHYs
on ethenet sub-board, the main board AVB0 ethernet is unaffected.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2 weeks agopinctrl: rzg2l: Drop unnecessary scope
Paul Barker [Wed, 20 Nov 2024 09:48:30 +0000 (09:48 +0000)]
pinctrl: rzg2l: Drop unnecessary scope

In rzg2l_pinconf_set(), there are no new variables defined in the case
statement for PIN_CONFIG_INPUT_ENABLE so no additional scope is needed.

Signed-off-by: Paul Barker <paul.barker.ct@bp.renesas.com>
Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2 weeks agopinctrl: rzg2l: Support Ethernet TXC output enable
Paul Barker [Wed, 20 Nov 2024 09:48:29 +0000 (09:48 +0000)]
pinctrl: rzg2l: Support Ethernet TXC output enable

On the RZ/G2L SoC family, the direction of the Ethernet TXC/TX_CLK
signal is selectable to support an Ethernet PHY operating in either MII
or RGMII mode. By default, the signal is configured as an input and MII
mode is supported. The ETH_MODE register can be modified to configure
this signal as an output to support RGMII mode.

As this signal is be default an input, and can optionally be switched to
an output, it maps neatly onto an `output-enable` property in the device
tree.

Signed-off-by: Paul Barker <paul.barker.ct@bp.renesas.com>
Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2 weeks agopinctrl: rzg2l: Support 2.5V PVDD for Ethernet interfaces
Paul Barker [Wed, 20 Nov 2024 09:48:28 +0000 (09:48 +0000)]
pinctrl: rzg2l: Support 2.5V PVDD for Ethernet interfaces

The Ethenet interfaces on the Renesas RZ/G2L SoC family can operate at
multiple power supply voltages: 3.3V (default value), 2.5V and 1.8V.

rzg2l_pinconf_set() is extended to support the 2.5V setting, with a
check to ensure this is only used on Ethernet interfaces as it is not
supported on the SD & QSPI interfaces.

While we're modifying rzg2l_pinconf_set(), drop the unnecessary default
value for pwr_reg as it is set in every branch of the following if
condition.

Signed-off-by: Paul Barker <paul.barker.ct@bp.renesas.com>
Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2 weeks agonet: ravb: Simplify max-speed handling in ravb_of_to_plat
Paul Barker [Wed, 20 Nov 2024 09:49:39 +0000 (09:49 +0000)]
net: ravb: Simplify max-speed handling in ravb_of_to_plat

We can call dev_read_u32_default() instead of calling fdt_getprop() then
fdt32_to_cpu().

Signed-off-by: Paul Barker <paul.barker.ct@bp.renesas.com>
Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2 weeks agoclk: rzg2l: Ignore enable for core clocks
Paul Barker [Tue, 19 Nov 2024 19:36:26 +0000 (19:36 +0000)]
clk: rzg2l: Ignore enable for core clocks

In the RZ/G2L family, core clocks are always on and can't be disabled.
However, drivers which are shared with other SoCs may call clk_enable()
or clk_enable_bulk() for a clock referenced in the device tree which
happens to be a core clock on the RZ/G2L. To avoid the need for
conditionals in these drivers, simply ignore attempts to enable a core
clock.

Signed-off-by: Paul Barker <paul.barker.ct@bp.renesas.com>
Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2 weeks agombedtls: remove MBEDTLS_HAVE_TIME
Ilias Apalodimas [Fri, 6 Dec 2024 10:56:45 +0000 (12:56 +0200)]
mbedtls: remove MBEDTLS_HAVE_TIME

When MbedTLS TLS features were added MBEDTLS_HAVE_TIME was defined as part
of enabling https:// support. However that pointed to the wrong function
which could crash if it received a NULL pointer.

Looking closer that function is not really needed, as it only seems to
increase the RNG entropy by using 4b of the current time and date.
The reason that was enabled is that lwIP was unconditionally requiring it,
although it's configurable and can be turned off.

Since lwIP doesn't use that field anywhere else, make it conditional and
disable it from our config.

Fixes: commit a564f5094f62 ("mbedtls: Enable TLS 1.2 support")
Reported-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
2 weeks agoarm: qemu: fix update_info declaration
Vincent Stehlé [Fri, 6 Dec 2024 07:58:53 +0000 (08:58 +0100)]
arm: qemu: fix update_info declaration

Add a missing comma in the update_info structure declaration.

This fixes the following build error when building with
EFI_RUNTIME_UPDATE_CAPSULE or EFI_CAPSULE_ON_DISK:

  board/emulation/qemu-arm/qemu-arm.c:52:9: error: request for member ‘images’ in something not a structure or union

Fixes: cccea18813c4 ("efi_loader: add the number of image entries in efi_capsule_update_info")
Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com>
Cc: Masahisa Kojima <masahisa.kojima@linaro.org>
Cc: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
Cc: Tom Rini <trini@konsulko.com>
2 weeks agonet: disable MBEDTLS in SPL
Heinrich Schuchardt [Fri, 6 Dec 2024 11:37:09 +0000 (12:37 +0100)]
net: disable MBEDTLS in SPL

Building SPL fails with MBEDTLS enabled.
Currently we don't need it there.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
2 weeks agortc: CONFIGS_RTC_PL031 must depend on CONFIGS_DM_RTC
Heinrich Schuchardt [Thu, 5 Dec 2024 20:36:19 +0000 (21:36 +0100)]
rtc: CONFIGS_RTC_PL031 must depend on CONFIGS_DM_RTC

Building qemu_arm64_defconfig with CONFIGS_DM_RTC=n and CONFIGS_RTC_PL031=y
leads to a build failure.

Adjust the vexpress64 configuration to avoid circular dependency.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2 weeks agolmb: prohibit allocations above ram_top even from same bank
Sughosh Ganu [Mon, 2 Dec 2024 07:06:24 +0000 (12:36 +0530)]
lmb: prohibit allocations above ram_top even from same bank

There are platforms which set the value of ram_top based on certain
restrictions that the platform might have in accessing memory above
ram_top, even when the memory region is in the same DRAM bank. So,
even though the LMB allocator works as expected, when trying to
allocate memory above ram_top, prohibit this by marking all memory
above ram_top as reserved, even if the said memory region is from the
same bank.

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Tested-by: Andreas Schwab <schwab@suse.de>
2 weeks agoconfigs: Resync with savedefconfig
Tom Rini [Fri, 6 Dec 2024 23:40:50 +0000 (17:40 -0600)]
configs: Resync with savedefconfig

Resync all defconfig files using qconfig.py

Signed-off-by: Tom Rini <trini@konsulko.com>
3 weeks agoMerge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-pmic
Tom Rini [Thu, 5 Dec 2024 14:11:35 +0000 (08:11 -0600)]
Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-pmic

CI: https://source.denx.de/u-boot/custodians/u-boot-pmic/-/pipelines/23718

- Correct a few debug/error print calls

3 weeks agoMerge tag 'efi-master-05122024' of https://source.denx.de/u-boot/custodians/u-boot-tpm
Tom Rini [Thu, 5 Dec 2024 14:10:51 +0000 (08:10 -0600)]
Merge tag 'efi-master-05122024' of https://source.denx.de/u-boot/custodians/u-boot-tpm

CI: https://source.denx.de/u-boot/custodians/u-boot-tpm/-/pipelines/23719

Two fixes for the EFI subsystem coming via the TPM tree as agreed by Heinrich

The LMB patch fixes a failure in SystemReady testing. Nothing bad happens
without the patch in the device operation, but the return values are wrong
and SCT tests fail for MemoryAllocationServicesTest category.

The second is a shielding the device against mistakes in the definition of
struct fields needed by the capsule update mechanism. Instead of crashing,
print a humna readable message of what's wrong.

3 weeks agolmb: Fix the allocation of overlapping memory areas with !LMB_NONE
Ilias Apalodimas [Mon, 2 Dec 2024 14:42:45 +0000 (16:42 +0200)]
lmb: Fix the allocation of overlapping memory areas with !LMB_NONE

At the moment the LMB allocator will return 'success' immediately on two
consecutive allocations if the second one is smaller and the flags match
without resizing the reserved area.

This is problematic for two reasons, first of all the new updated
allocation won't update the size and we end up holding more memory than
needed, but most importantly it breaks the EFI SCT tests since EFI
now allocates via LMB.

More specifically when EFI requests a specific address twice with the
EFI_ALLOCATE_ADDRESS flag set, the first allocation will succeed and
update the EFI memory map. Due to the LMB behavior the second allocation
will also succeed but the address ranges are already in the EFI memory
map due the first allocation. EFI will then fail to update the memory map,
returning EFI_OUT_OF_RESOURCES instead of EFI_NOT_FOUND which break EFI
conformance.

So let's remove the fast check with is problematic anyway and leave LMB
resize and calculate address properly. LMB will now
- try to resize the reservations for LMB_NONE
- return -1 if the memory is not LMB_NONE and already reserved

The LMB code needs some cleanup in that part, but since we are close to
2025.01 do the easy fix and plan to refactor it later.
Also update the dm tests with the new behavior.

Fixes: commit 22f2c9ed9f53 ("efi: memory: use the lmb API's for allocating and freeing memory")
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
3 weeks agoefi_loader: Check for a valid fw_name before auto generating GUIDs
Ilias Apalodimas [Tue, 3 Dec 2024 16:13:37 +0000 (18:13 +0200)]
efi_loader: Check for a valid fw_name before auto generating GUIDs

The gen_v5_guid() is a void and does no error checking with pointers
being available etc. Instead it expects all things to be in place to
generate GUIDs. If a board capsule definition is buggy and does not
define the firmware names when enabling capsule updates, the board will
crash trying to bring up the EFI subsystem.

Check for a valid firmware name before generating GUIDs.

Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
3 weeks agopower: regulator: replace dev_dbg() by dev_err() in regulator_post_bind()
Patrice Chotard [Tue, 3 Dec 2024 10:06:11 +0000 (11:06 +0100)]
power: regulator: replace dev_dbg() by dev_err() in regulator_post_bind()

To ease debugging, use dev_err() instead of dev_dbg() for
alerting when regulator has nonunique value.

Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
3 weeks agopower: regulator: replace some debug() by dev_dbg()
Patrice Chotard [Tue, 3 Dec 2024 10:06:10 +0000 (11:06 +0100)]
power: regulator: replace some debug() by dev_dbg()

Replace some debug() by dev_dbg() when dev variable
is available/valid.

Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
3 weeks agoMerge branch 'master' of https://gitlab.denx.de/u-boot/custodians/u-boot-samsung
Tom Rini [Tue, 3 Dec 2024 18:37:20 +0000 (12:37 -0600)]
Merge branch 'master' of https://gitlab.denx.de/u-boot/custodians/u-boot-samsung