Tom Rini [Mon, 10 Mar 2025 23:31:52 +0000 (17:31 -0600)]
Prepare v2025.04-rc4
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Mon, 10 Mar 2025 23:30:32 +0000 (17:30 -0600)]
configs: Resync with savedefconfig
Resync all defconfig files using qconfig.py
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Mon, 10 Mar 2025 13:48:25 +0000 (07:48 -0600)]
Merge tag 'u-boot-stm32-
20250310' of https://source.denx.de/u-boot/custodians/u-boot-stm
ARM: stm32mp: Fix boot hang on STM32MP15xx with 1 GiB of DRAM.
Marek Vasut [Sun, 9 Mar 2025 02:05:54 +0000 (03:05 +0100)]
ARM: stm32mp: Fix dram_bank_mmu_setup() for ram_top=0
On STM32MP15xx with 1 GiB of DRAM, the gd->ram_top becomes 0,
because DRAM base 0xc0000000 + DRAM size 0x40000000 leads to
gd->ram_top overflow which resets it to 0. Handle this special
case simply by checking for gd->ram_top being zero, and if it
is, assume there is no addr >= gd->ram_top .
This fixes boot hang on STM32MP15xx with 1 GiB of DRAM.
Fixes:
25fb58e88aba ("ARM: stm32mp: Fix dram_bank_mmu_setup() for LMB located above ram_top")
Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Tom Rini [Wed, 26 Feb 2025 15:33:45 +0000 (09:33 -0600)]
scripts/checkpatch.pl: Upgrade IS_ENABLED_CONFIG to error for U-Boot
A problem we have today is that some instances of IS_ENABLED(FOO) have
crept in to the code. This is in turn because with checkpatch.pl this is
only a warning and not an error, so they were overlooked. And looking
deeper, in the Linux kernel this pattern is allowed because
IS_ENABLED(DEFINED_FLAG) is allowed if discouraged and a quick skim of
the instances I saw in the current kernel follow this pattern. In U-Boot
however, this is not allowed, so bump to an error.
Signed-off-by: Tom Rini <trini@konsulko.com>
Andrea della Porta [Sun, 2 Mar 2025 18:29:31 +0000 (19:29 +0100)]
fs/squashfs: Fix memory leak in sqfs_size_nest()
In case MAX_SYMLINK_NEST is reached while determining the size
on a symlink node, the function returns immediately.
This would not free the resources after the free_strings: label
causing a memory leak.
Set the ret value and just break out of the switch to fix this.
Signed-off-by: Andrea della Porta <andrea.porta@suse.com>
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
Diederik de Haas [Sat, 1 Mar 2025 10:14:12 +0000 (11:14 +0100)]
mcheck: Fix SPDX License Identifier to LGPL-2.1-or-later
The GPL-2.1+ SPDX License Identifier doesn't exist, but luckily the full
license text was available which shows that GPL-2.1+ was a typo and it
should have been LGPL-2.1-or-later.
As the '+' in LGPL-2.1+ is deprecated in SPDX 3.0, use the preferred
identifier, which is '-or-later'.
Normally the full license header is removed when switching to SPDX
License Identifiers, so do that now.
Signed-off-by: Diederik de Haas <didi.debian@cknow.org>
Sumit Garg [Thu, 27 Feb 2025 12:09:04 +0000 (17:39 +0530)]
MAINTAINERS: .mailmap: Update Sumit Garg's email address
Update Sumit Garg's email address to @kernel.org.
Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Tom Rini [Wed, 5 Mar 2025 18:11:18 +0000 (12:11 -0600)]
Merge tag 'xilinx-for-v2025.04-rc4' of https://source.denx.de/u-boot/custodians/u-boot-microblaze
AMD/Xilinx changes for v2025.04-rc4
Zynq:
- Guard code around SPL_FS_LOAD_PAYLOAD_NAME
Versal*:
- Remove tftp block size 4096
Versal:
- Use clocks per DT binding
- Store driver data in data section
Versal Gen 2:
- Fix major/minor version decoding
Padmarao Begari [Tue, 4 Mar 2025 04:30:30 +0000 (10:00 +0530)]
xilinx: Remove tftp block size 4096
The zynqmp gem driver support max MTU size 1536, so remove tftp
block size 4096 from defconfig and use default tftp block size.
Fixes:
a33b4b96b3cf ("xilinx: Enable MBEDTLS/LWIP/WGET and WGET_HTTPS")
Signed-off-by: Padmarao Begari <padmarao.begari@amd.com>
Link: https://lore.kernel.org/r/20250304043030.2344536-1-padmarao.begari@amd.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
Heiko Schocher [Wed, 26 Feb 2025 09:18:58 +0000 (10:18 +0100)]
led: Fix next Coverity scan error
The following was reported by Coverity scan:
*** CID 542488: Control flow issues (NO_EFFECT)
/drivers/led/led-uclass.c: 277 in led_get_function_name()
271 return uc_plat->label;
272
273 /* Now try to detect function label name */
274 func = dev_read_string(dev, "function");
275 cp = dev_read_u32(dev, "color", &color);
276 // prevent coverity scan error CID 541279: (TAINTED_SCALAR)
>>> CID 542488: Control flow issues (NO_EFFECT)
>>> This less-than-zero comparison of an unsigned value is never true. "color < 0U".
277 if (color < LED_COLOR_ID_WHITE || color >= LED_COLOR_ID_MAX)
278 cp = -EINVAL;
279
Fix it.
Addresses-Coverity-ID: 542488
Link: https://lists.denx.de/pipermail/u-boot/2025-February/581567.html
Signed-off-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
J. Neuschäfer [Mon, 17 Feb 2025 11:18:03 +0000 (12:18 +0100)]
gpio: 74x146: depend on DM_SPI
Currently, Kconfig allows building CONFIG_DM_74X164 without
CONFIG_DM_SPI, which results in linker errors because this driver
actually uses dm_spi_* functions:
drivers/gpio/74x164_gpio.o: in function `gen_74x164_write_conf':
undefined reference to `dm_spi_claim_bus'
undefined reference to `dm_spi_xfer'
undefined reference to `dm_spi_release_bus'
Signed-off-by: J. Neuschäfer <j.ne@posteo.net>
Tom Rini [Tue, 4 Mar 2025 14:22:19 +0000 (08:22 -0600)]
Merge patch series "Syncing up on skip-at-start"
Simon Glass <sjg@chromium.org> says:
This series has the skip-at-start change and a few fixes.
Sadly it also includes a revert for the dm_probe_devices() patch, since
it breaks jerry (RK3288). I will need to investigate way.
It is based on -next and I can send a PR if desired.
https://source.denx.de/u-boot/custodians/u-boot-dm/-/pipelines/24835
Link: https://lore.kernel.org/r/20250226162621.2681677-1-sjg@chromium.org
Simon Glass [Wed, 26 Feb 2025 16:26:18 +0000 (09:26 -0700)]
x86: Stop working around skip-at-start
With a recent Binman change, the skip-at-start property is now honoured,
meaning that all image-pos values in the affected section start from
the skip-at-start value.
The x86 code works around the old behaviour at present, so update it.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Wed, 26 Feb 2025 16:26:17 +0000 (09:26 -0700)]
binman: Honour the skip-at-start property more faithfully
A discussion on the mailing list about dealing with block offsets and
binman symbols made me think that something is wrong with how Binman
deals with the skip-at-start property.
The feature was originally designed to handle x86 ROMs, which are mapped
at the top of the address space. That seemed too specific, whereas
skipping some space at the start seemed more generally useful.
It has proved useful. For example, rockchip images start at block 64,
so a skip-at-start of 0x8000 deals with this.
But it doesn't actually work correctly, since the image_pos value does
not give the actual position on the media.
Fix this and update the documentation, moving it into the 'section'
section.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Wed, 26 Feb 2025 16:26:16 +0000 (09:26 -0700)]
binman: Rename Entry.end_4gb
The property is named end_at_4gb so name the variable the same, to avoid
confusion.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Wed, 26 Feb 2025 16:26:15 +0000 (09:26 -0700)]
samsung: snow: Use BLOBLIST_FIXED
Snow requires a fixed bloblist to operate, so re-enable this option.
Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes:
864106f3c47 ("bloblist: Make BLOBLIST_ALLOC the default")
Simon Glass [Wed, 26 Feb 2025 16:26:14 +0000 (09:26 -0700)]
Revert "dm: core: Simplify dm_probe_devices()"
Unfortunately this change was not safe as some devices are bound before
relocation, but we don't want to probe them.
It causes 'raise: Signal # 8 caught' on jerry.
Move the bootstage timer to after autoprobe in initf_dm() since the
trace test does not tolerate any variance.
This reverts commit
21dd873572a01d74bfdfceb7a30b056f8ccba187.
Signed-off-by: Simon Glass <sjg@chromium.org>
Stefan Eichenberger [Mon, 3 Mar 2025 18:16:03 +0000 (19:16 +0100)]
board: verdin-am62: fix missing memory fixup call
The commit
bc07851897bd ("board: ti: Pull redundant DDR functions to a
common location and Fixup DDR size when ECC is enabled") broke DRAM
support for the Verdin AM62. This was partially fixed with commit
3f866c47b582 ("board: verdin-am62: add dram_init_banksize"). However,
because fixup_memory_node was not called, the Linux kernel was started
with the wrong memory size on modules with less memory available. This
resulted in boot failures. Fix this issue by calling fixup_memory_node
in the board file.
spl_perform_fixups will be called in the SPL and now sets the correct
memory size in the device tree of U-Boot by calling fixup_memory_node.
U-Boot will then adjust the memory sizes of Linux during bootm/booti in
fdt_fixup_memory_banks. This chain ensures that U-Boot and Linux only
use RAM that is actually available.
Fixes:
3f866c47b582 ("board: verdin-am62: add dram_init_banksize")
Fixes:
bc07851897bd ("board: ti: Pull redundant DDR functions to a common location and Fixup DDR size when ECC is enabled")
Signed-off-by: Stefan Eichenberger <stefan.eichenberger@toradex.com>
Acked-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Weijie Gao [Sat, 25 Jan 2025 15:26:32 +0000 (23:26 +0800)]
miiphy: define mii_devs with LIST_HEAD()
When enabling net console and console multiplexing, a boot crash was
observed using mtk_eth driver with stdin/stdout set to "serial,nc"
in persistent environment:
> CPU: MediaTek MT7981
> Model: OpenWrt One
> DRAM: 1 GiB
> Core: 35 devices, 15 uclasses, devicetree: separate
> spi-nand: spi_nand spi_nand@0: Winbond SPI NAND was found.
> spi-nand: spi_nand spi_nand@0: 128 MiB, block size: 128 KiB, page size: 2048, OOB size: 64
> Loading Environment from UBI... SF: Detected w25q128 with page size 256 Bytes, erase size 4 KiB, total 16 MiB
> mtd: partition "ubi" extends beyond the end of device "spi-nand0" -- size truncated to 0x7f00000
> Read 126976 bytes from volume ubootenv to
000000007f7bf0c0
> Read 126976 bytes from volume ubootenv2 to
000000007f7de100
> OK
> "Synchronous Abort" handler, esr 0x96000004, far 0xeafffffeea000018
> elr:
0000000041e63cd4 lr :
0000000041e1b844 (reloc)
> elr:
000000007ff9ecd4 lr :
000000007ff56844
> x0 :
eafffffeea000018 x1 :
000000007fb552e0
> x2 :
00000000000000fe x3 :
0000000000000000
The cause is that "serial,nc" forced the console subsystem to
initialize the ethernet driver before ethernet subsystem
initialization (console_init_r() is called before initr_net()).
During the mtk_eth driver initialization, mdio_register() will be
called, and miiphy_get_dev_by_name() will then be called.
The miiphy_get_dev_by_name() will check the list "mii_devs" to see
if the passed device name exists. However the mii_devs is defined
without initialization:
> static struct list_head mii_devs;
and the actual initialization is done in the following chain:
initr_net -> eth_initialize -> eth_common_init -> miiphy_init
Since initr_net() hasn't be called, iterating over the mii_devs
will access to physical address 0 (mii_devs.next == NULL) and will
cause the crash.
The fix is to define mii_devs using:
> static LIST_HEAD(mii_devs);
As the "current_mii" is defined as a static variable, it will
always be NULL in board_r stage and initializing it will NULL is
unnecessary. So the entire miiphy_init() can be remove.
Signed-off-by: Weijie Gao <hackpascal@gmail.com>
Greg Malysa [Fri, 28 Feb 2025 19:28:27 +0000 (14:28 -0500)]
MAINTAINERS: Update contact information for Greg Malysa
My previous address is no longer accessible, but I will continue to be
involved in maintaining the ADI sc5xx platforms. This updates my contact
information and hopefully avoids bouncing emails from other developers.
Signed-off-by: Greg Malysa <malysagreg@gmail.com>
Michal Simek [Tue, 18 Feb 2025 12:43:07 +0000 (13:43 +0100)]
arm64: versal2: Show major and minor silicon version
ES1 silicon is 0x10 (16) and production is 0x20 (32) but correct number to
see are v1.0 or v2.0 instead of v16 or v32.
Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/20095339334fe07f373ffae3bdbfec51f5a00dc7.1739882585.git.michal.simek@amd.com
Padmarao Begari [Tue, 18 Feb 2025 05:24:19 +0000 (10:54 +0530)]
clk: versal: Store driver data in data section
Line 171 in README is describing that before relocation
no code should use global variable because global variables
are placed to BSS section which is initialized to 0 after
relocation.
On Versal platforms clock driver is initialized before
relocation (via using dm,bootph-all flag in DT) and global
variables are initialized which works if this is used only
before relocation. But the variables are used after
relocation too but values are zeroed which is ending up
incorrect behavior.
That's why place variables to data section to ensure that
values are not cleared which is for now the quickest
temporary solution. The correct way to do it is to move
all global variables to private data to avoid it.
Signed-off-by: Padmarao Begari <padmarao.begari@amd.com>
Link: https://lore.kernel.org/r/20250218052419.1141139-1-padmarao.begari@amd.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
Michal Simek [Fri, 7 Feb 2025 06:43:23 +0000 (07:43 +0100)]
xilinx: zynq: Guard code around SPL_FS_LOAD_PAYLOAD_NAME
Guard code around CONFIG_SPL_FS_LOAD_PAYLOAD_NAME usage to avoid
compilation failure.
Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/f15a9762494945814b06a71db90ee4db59dd17ed.1738910601.git.michal.simek@amd.com
Tom Rini [Mon, 3 Mar 2025 13:49:07 +0000 (07:49 -0600)]
Merge tag 'fsl-qoriq-2025-3-3' 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/24933
Fixes:
- Re-arm packet buffer in error case in tsec driver
- Fix LS1021a build
- Fix flush dcache alignment in caam_hash
Tom Rini [Mon, 3 Mar 2025 13:47:13 +0000 (07:47 -0600)]
Merge tag 'efi-2025-04-rc4' of https://source.denx.de/u-boot/custodians/u-boot-efi
CI:
* https://source.denx.de/u-boot/custodians/u-boot-efi/-/pipelines/24904
UEFI:
* Let efi_net_set_dp properly update the device path
Network:
* Avoid buffer overflows in wget_info with legacy TCP stack
Venkatesh Yadav Abbarapu [Thu, 6 Feb 2025 09:15:33 +0000 (14:45 +0530)]
clk: versal: Update the reference clocks as per bindings
As per the bindings the reference clocks naming has changed
from "pl_alt_ref_clk" to "pl_alt_ref" and "ref_clk" to "ref".
Update the same in the clock driver. Also add the fallback option
for older DT bindings.
Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
Link: https://lore.kernel.org/r/20250206091533.1447234-1-venkatesh.abbarapu@amd.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
Benjamin Lemouzy [Fri, 21 Feb 2025 07:05:01 +0000 (08:05 +0100)]
crypto: fsl_hash: fix flush dcache alignment in caam_hash()
Loading a FIT kernel image with hash hardware acceleration enabled
(CONFIG_SHA_HW_ACCEL=y) displays the following CACHE warning:
[...]
Trying 'kernel-1' kernel subimage
[...]
Verifying Hash Integrity ... sha256CACHE: Misaligned operation at
range [
16000128,
1673fae8]
[...]
Trying 'ramdisk-1' ramdisk subimage
[...]
Verifying Hash Integrity ... sha256CACHE: Misaligned operation at
range [
1676d6d4,
1737a5d4]
[...]
Trying 'fdt-imx6q-xxx.dtb' fdt subimage
[...]
Verifying Hash Integrity ... sha256CACHE: Misaligned operation at
range [
1673fbdc,
1674b0dc]
[...]
This patch fixes it.
Tested on:
- i.MX 6 custom board
- LS1021A custom board
Signed-off-by: Benjamin Lemouzy <blemouzy@centralp.fr>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Benjamin Lemouzy [Mon, 17 Feb 2025 15:36:03 +0000 (16:36 +0100)]
board: freescale: fix LS1021a build
Fix build error "undefined reference to `is_warm_boot'" when
ls1021atsn and ls1021atwr boards are built with CONFIG_SPL=y and
CONFIG_DEEP_SLEEP=n.
Signed-off-by: Benjamin Lemouzy <blemouzy@centralp.fr>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
J. Neuschäfer [Sun, 16 Feb 2025 21:18:13 +0000 (22:18 +0100)]
net: tsec: Re-arm packet buffer in error case
When an error is detected in the TSEC receive path, the driver currently
prints an error message, but leaves the corresponding packet descriptor
in its old state (i.e. owned by the CPU side). As a result, the packet
queue can be starved of available buffers if enough errors happen.
To recover from errors, re-arm the packet buffer descriptor after an
error has been detected.
Errors can be provoked by changing a PHY with phy-mode = "rgmii-id" to
phy-mode = "rgmii".
Signed-off-by: J. Neuschäfer <j.ne@posteo.net>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
J. Neuschäfer [Sun, 16 Feb 2025 21:18:12 +0000 (22:18 +0100)]
net: tsec: Reorder tsec_recv and tsec_free_pkt
This is necessary for the following patch. No functional change.
Signed-off-by: J. Neuschäfer <j.ne@posteo.net>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Tom Rini [Sat, 1 Mar 2025 13:51:14 +0000 (07:51 -0600)]
Merge tag 'u-boot-rockchip-
20250301' of https://source.denx.de/u-boot/custodians/u-boot-rockchip
CI: https://source.denx.de/u-boot/custodians/u-boot-rockchip/-/pipelines/2489
- Fix SD-Card boot on rk3308-rock-s0 v1.1;
- Fix crash on nanopi-r4s seconde usb port;
- Disable undeeded PCI config for nanopi-r3s-rk3566
- Correct usage of IS_ENABLED()
Adriano Cordova [Thu, 6 Feb 2025 17:40:11 +0000 (14:40 -0300)]
legacy-net: wget: fix wget_info handling after new tcp legacy stack
Check wget_info->buffer_size for overflow and do not clean the wget_info struct
on failure, let the owner of the struct handle the error. The latter is necesary
, e.g., for when a request fails because the provided buffer was too small.
Signed-off-by: Adriano Cordova <adriano.cordova@canonical.com>
Adriano Cordova [Mon, 27 Jan 2025 12:34:45 +0000 (09:34 -0300)]
efi_loader: efi_net: let efi_net_set_dp properly update the device path
This commit fixes an use after free introduced in Commit
e55a4acb54
(" efi_loader: net: set EFI bootdevice device path to HTTP when loaded
from wget"). The logic in efi_net_set_dp is reworked so that when the
function is invoked it not only changes the value of the static variable
net_dp (this is how the function was implemented in
e55a4acb54) but also
updates the protocol interface of the device path protocol in case efi
has started.
Fixes:
e55a4acb54e8 ("efi_loader: net: set EFI bootdevice device path to HTTP when loaded from wget")
Signed-off-by: Adriano Cordova <adriano.cordova@canonical.com>
Tianling Shen [Wed, 15 Jan 2025 05:37:05 +0000 (13:37 +0800)]
rockchip: nanopi-r3s-rk3566: disable unneeded CONFIG_NVME_PCI
This board does not have any NVMe slot, so disable unneeded
CONFIG_NVME_PCI option.
Fixes:
bf4a33e725ae ("board: rockchip: add FriendlyElec NanoPi R3S")
Signed-off-by: Tianling Shen <cnsztl@gmail.com>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Justin Klaassen [Fri, 31 Jan 2025 17:06:13 +0000 (17:06 +0000)]
rockchip: nanopi-r4s: Enable second usb port and fix crash
The patch enables the second USB3.0 Type-A USB port on the NanoPi R4S
board, which prevents a crash when initializing the usb system in U-Boot
and allows both Type-A USB ports to be used for booting.
=> usb start
starting USB...
Bus usb@
fe380000: USB EHCI 1.00
Bus usb@
fe3c0000: "Synchronous Abort" handler, esr 0x96000010, far 0x0
Signed-off-by: Justin Klaassen <justin@tidylabs.net>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Tom Rini [Wed, 26 Feb 2025 20:31:23 +0000 (14:31 -0600)]
clk: rockchip: Correct usage of IS_ENABLED() macro
These two files were using IS_ENABLED() to test for CONFIG flags but omitted
the CONFIG_ prefix and so did not work as expected.
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Jonas Karlman [Thu, 20 Feb 2025 18:31:28 +0000 (18:31 +0000)]
rockchip: rk3308-rock-s0: Fix SD-card boot on v1.1 hw revision
BootROM leave GPIO4_D6 configured as SDMMC_PWREN function and DW MMC
driver set PWREN high in dwmci_init().
However, HW revision prior to v1.2 must pull GPIO4_D6 low to access
sdmmc. For HW revision v1.2 the state of GPIO4_D6 has no impact.
Upstream Linux commit
26c100232b09 "arm64: dts: rockchip: Fix sdmmc
access on rk3308-rock-s0 v1.1 boards" fixed this issue by adding a
vcc_sd regulator.
Include the new vcc_sd regulator in SPL and enable required Kconfig
options to set GPIO4_D6 low to fix reading sdmmc on v1.1 hw revision.
Fixes:
25438c40a007 ("board: rockchip: Add Radxa ROCK S0")
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Tom Rini [Thu, 27 Feb 2025 18:11:07 +0000 (12:11 -0600)]
Merge patch series "mbedtls: fix incorrect kconfig dependencies on mbedtls"
This series from Raymond Mao <raymond.mao@linaro.org> fixes assorted
problems with how dependencies were expressed in Kconfig for mbedtls and
assorted algorithms.
Link: https://lore.kernel.org/r/20250203220825.707590-1-raymond.mao@linaro.org
Raymond Mao [Mon, 3 Feb 2025 22:08:14 +0000 (14:08 -0800)]
mbedtls: refactor mbedtls build for XPL
Refactor the entire kconfig page for mbedtls, adapt mbedtls makefile
and default config file using 'XPL_', in order to have independent
mbedtls kconfig options in U-Boot Proper, SPL, TPL and VPL.
User can choose legacy or mbedtls libraries for them independently.
Set mbedtls native hashing libraries as default when MBEDTLS_LIB,
SPL_MBEDTLS_LIB, TPL_MBEDTLS_LIB or VPL_MBEDTLS_LIB is selected.
If users prefer using U-Boot legacy hashing libraries, please select
MBEDTLS_LIB_HASHING_ALT, SPL_MBEDTLS_LIB_HASHING_ALT,
TPL_MBEDTLS_LIB_HASHING_ALT or VPL_MBEDTLS_LIB_HASHING_ALT for U-Boot
Proper, SPL, TPL and VPL respectively.
Moreover, rename a few kconfig options and update their descriptions to
improve the consistency of terminology.
Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Raymond Mao [Mon, 3 Feb 2025 22:08:13 +0000 (14:08 -0800)]
mbedtls: access mbedtls private members in mscode and pkcs7 parser
U-Boot requires to access x509_internal.h, mbedtls_sha256_context and
mbedtls_sha1_context in the porting layer, and this requires to
enable MBEDTLS_ALLOW_PRIVATE_ACCESS.
Enable it to mscode and pkcs7_parser to fix a mbedtls internal building
error when X509 is selected.
Moreover, Move it to a separate file to avoid enabling it in multiple
places.
Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Raymond Mao [Mon, 3 Feb 2025 22:08:12 +0000 (14:08 -0800)]
mbedtls: fix incorrect kconfig dependencies on mbedtls
Fixed the building failures when WGET_HTTPS,NET_LWIP and MBEDTLS_LIB
are selected due to a few incorrect kconfig dependencies.
Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Daniel Schultz [Tue, 11 Feb 2025 06:42:05 +0000 (22:42 -0800)]
arch: arm: dts: k3-am642-phycore-som-binman: Add custMpk to overlays
There are some device-tree overlays with missing entries for the
keyfile. Add them to sign all images in the U-Boot FIT image.
Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
Reviewed-by: Wadim Egorov <w.egorov@phytec.de>
Daniel Schultz [Tue, 11 Feb 2025 06:42:04 +0000 (22:42 -0800)]
arch: arm: dts: k3-am625-phycore-som-binman: Add custMpk to overlays
There are some device-tree overlays with missing entries for the
keyfile. Add them to sign all images in the U-Boot FIT image.
Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
Reviewed-by: Wadim Egorov <w.egorov@phytec.de>
Tom Rini [Thu, 27 Feb 2025 14:00:30 +0000 (08:00 -0600)]
Merge tag 'u-boot-imx-master-
20250227' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx
CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/24872
- Fix bootstd booting on imx8mm_evk, imx8mq_evk, imx8mp_evk and
imx93_evk
Fabio Estevam [Thu, 27 Feb 2025 10:29:16 +0000 (07:29 -0300)]
imx8mp_evk: Pass kernel_addr_r
Currently, booting via bootstd fails because the kernel cannot be retrieved.
The reason for this is the lack of 'kernel_addr_r'.
Pass 'kernel_addr_r' to fix booting via bootstd.
Signed-off-by: Fabio Estevam <festevam@denx.de>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Fabio Estevam [Thu, 27 Feb 2025 10:29:15 +0000 (07:29 -0300)]
imx93_evk: Pass kernel_addr_r
Currently, booting via bootstd fails because the kernel cannot be retrieved.
The reason for this is the lack of 'kernel_addr_r'.
Pass 'kernel_addr_r' to fix booting via bootstd.
Signed-off-by: Fabio Estevam <festevam@denx.de>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Peng Fan [Sat, 22 Feb 2025 12:17:11 +0000 (20:17 +0800)]
imx8mm: imx8mm_evk: fix BOOTSTD boot
Select BOOTSTD_FULL and BOOTSTD_BOOTCOMMAND
Correct DEFAULT_FDT_FILE
Correct env file for imx8mm_evk_fspi_defconfig
Fixes:
364ba68ed1a ("imx: imx8mm_evk: Switch to BOOTSTD")
Reported-by: Ludwig Nussel <ludwig.nussel@siemens.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Peng Fan [Sat, 22 Feb 2025 12:17:10 +0000 (20:17 +0800)]
imx8mq: imx8mq_evk: fix DEFAULT_FDT_FILE
The CONFIG_DEFAULT_FDT_FILE should be imx8mq_evk.dtb for this board
Fixes:
7050bd925f7 ("imx: imx8mq_evk: Switch to BOOTSTD")
Reported-by: Ludwig Nussel <ludwig.nussel@siemens.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Tom Rini [Wed, 26 Feb 2025 14:55:32 +0000 (08:55 -0600)]
Merge tag 'qcom-fixes-2025.04-rc4' of https://source.denx.de/u-boot/custodians/u-boot-snapdragon
CI: https://source.denx.de/u-boot/custodians/u-boot-snapdragon/-/pipelines/24841
The clk_stub, regulator, and pinctrl fixes enable the sdcard on the RB5
dev board (and sm8250 devices broadly). clk_stub is only enabled in
qcom_defconfig and the others are qcom specific so these shouldn't
affect other platforms.
Lastly, a small ufetch fix from Sam which gets color rendering correctly
on U-Boots framebuffer video device.
Sam Day [Mon, 3 Feb 2025 16:42:20 +0000 (16:42 +0000)]
cmd: ufetch: use 3-bit colour ANSI codes
Currently, the 8-bit escapes are being used, which aren't supported by
vidconsole_escape_char. Since the current usage maps directly to the
3-bit equivalents anyway, let's use those instead.
With this change, the fetch output looks as fetching in the vidconsole
as it does over serial!
Signed-off-by: Sam Day <me@samcday.com>
Tested-by: Alexey Minnekhanov <alexeymin@postmarketos.org>
Tested-by: Ferass El Hafidi <funderscore@postmarketos.org>
Caleb Connolly [Mon, 10 Feb 2025 16:30:24 +0000 (16:30 +0000)]
pinctrl: qcom: sm8250: fix pin count
The pin count wasn't updated when the special pins were added, as a
result it was never possible to configure the special pins on SM8250
boards.
Fix the pin count and allow the special pins to be configured. This
fixes sdcard support on the RB5.
Fixes:
58fa52042471 ("pinctr: qcom: sm8250: add special pins pins configuration data")
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Tested-by: Amit Pundir <amit.pundir@linaro.org>
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Caleb Connolly [Mon, 10 Feb 2025 16:30:23 +0000 (16:30 +0000)]
power: regulator: add additional supported LDOs for pm8150l
Add the other LDOs that our rpmh driver can currently support. Some of
these are used on the RB5 to power the sdcard.
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Tested-by: Amit Pundir <amit.pundir@linaro.org>
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Julius Lehmann [Mon, 10 Feb 2025 16:27:27 +0000 (16:27 +0000)]
clk: stub: add sm8150 compatible id
Add support for sm8150 clock controller to clk stub driver.
Signed-off-by: Julius Lehmann <lehmanju@devpi.de>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Caleb Connolly [Mon, 10 Feb 2025 16:27:26 +0000 (16:27 +0000)]
qcom_defconfig: enable stub clock
Enable the stub clock driver for rpmcc
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Caleb Connolly [Mon, 10 Feb 2025 16:27:25 +0000 (16:27 +0000)]
clk: add stub clock driver
Add a stub clock driver which can be used to bind clock controllers
which aren't required for the platform to boot, but which are needed for
U-Boot drivers to work.
In addition, add a NOP parent driver to allow for binding the parent
nodes of the clock.
Initially this driver supports a Qualcomm platform where the MMC driver
tries to fetch the RPM clock controller, which is not actually required
for the device to work.
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Tom Rini [Mon, 24 Feb 2025 22:53:59 +0000 (16:53 -0600)]
Prepare v2025.04-rc3
Signed-off-by: Tom Rini <trini@konsulko.com>
Marek Vasut [Wed, 29 Jan 2025 11:15:54 +0000 (12:15 +0100)]
mmc: Fix size calculation for sector addressed MMC version 4
For eMMC v4 and newer that is smaller than 2 GiB, the JEDEC JESD84-B51
section 6.2.4 Configure partitions indicates that EXT_CSD SEC_COUNT
should not be used to determine device size, and instead device size
should be calculated from C_SIZE and C_SIZE_MULT.
This is not exactly accurate, the 2 GiB limit is not a hard line,
there are eMMC devices which are smaller than 2 GiB and still
require device size to be determined from EXT_CSD SEC_COUNT. The
hard line is instead OCR HCS bit, which indicates whether the device
is byte or sector addressed, the former applies to most devices
below 2 GiB, and the later applies mostly to devices above 2 GiB.
However, there are a couple of devices which are smaller than 2 GiB
and still set the OCR HCS bit to indicate they are sector addressed,
and therefore the size calculation for those devices should also
use EXT_CSD SEC_COUNT . Use mmc->high_capacity flag to discern the
devices instead of arbitrary 2 GiB limit. The mmc->high_capacity flag
reflects the OCR HCS bit state.
Fixes:
639b7827d1ca ("mmc: fix the condition for MMC version 4")
Signed-off-by: Marek Vasut <marex@denx.de>
Joao Marcos Costa [Wed, 19 Feb 2025 10:16:33 +0000 (11:16 +0100)]
fs/squashfs: fix potential integer overflows
The length of buffers used to read inode tables, directory tables, and
reading a file are calculated as: number of blocks * block size, and
such plain multiplication is prone to overflowing (thus unsafe).
Replace it by __builtin_mul_overflow, i.e. safe math.
Signed-off-by: Joao Marcos Costa <joaomarcos.costa@bootlin.com>
Tom Rini [Sat, 22 Feb 2025 14:42:01 +0000 (08:42 -0600)]
Merge branch 'picasso' of https://source.denx.de/u-boot/custodians/u-boot-tegra
Branch contains bringup of Acer Iconia Tab A500 (codename picasso), a
Tegra 2 Android device with decent Linux kernel support. Ondevice tests
and U-Boot test suit all passed.
Tom Rini [Thu, 20 Feb 2025 17:21:41 +0000 (11:21 -0600)]
Merge tag 'efi-2025-04-rc3' of https://source.denx.de/u-boot/custodians/u-boot-efi
CI:
* https://source.denx.de/u-boot/custodians/u-boot-efi/-/pipelines/24709
UEFI:
* create a parent device for all EFI block devices
* move lmb_map_update_notify() to EFI
* make efi_add_memory_map_pg() static
* remove comparisons to string literals from runtime
* ix potential deref-after-null
Other:
* avoid superfluous value check in lmb_map_update_notify()
* support more efi protocols in uuid_guid_get_str()
Tom Rini [Thu, 20 Feb 2025 14:34:52 +0000 (08:34 -0600)]
Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-riscv
CI: https://source.denx.de/u-boot/custodians/u-boot-riscv/-/pipelines/24692
- board: VisionFive 2: Update maintainer file
- configs: starfive: Add LwIP network and wget command
- configs: microchip: set DEFAULT_FDT_FILE
Tom Rini [Thu, 20 Feb 2025 14:32:53 +0000 (08:32 -0600)]
Merge tag 'u-boot-rockchip-
20250220' of https://source.denx.de/u-boot/custodians/u-boot-rockchip
CI: https://source.denx.de/u-boot/custodians/u-boot-rockchip/-/pipelines/24690
Please pull the fixes for rockchip platform:
- Fix for rk3399 bob and kevin
- Fix for sdram more than 4GB
- Fix for dwc_eth on rk356x/rk3588
- Fix for sdmmc access on rk33080rock-s9
Heinrich Schuchardt [Sun, 16 Feb 2025 11:12:41 +0000 (12:12 +0100)]
efi_loader: make efi_add_memory_map_pg() static
The function is only used in the efi_memory.c module.
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Heinrich Schuchardt [Sun, 16 Feb 2025 11:12:40 +0000 (12:12 +0100)]
lmb: move lmb_map_update_notify() to EFI
When building with qemu_arm64_defconfig with CONFIG_CC_OPTIMIZE_FOR_DEBUG=y
and CONFIG_EFI_LOADER=n an error undefined reference to efi_add_memory_map_pg
occurs.
Move the EFI dependent part of lmb_map_update_notify() to the EFI
sub-system.
Reported-by: Liya Huang <1425075683@qq.com>
Acked-by: Liya Huang <1425075683@qq.com>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Heinrich Schuchardt [Sun, 16 Feb 2025 11:12:39 +0000 (12:12 +0100)]
lmb: avoid superfluous value check in lmb_map_update_notify()
Instead of testing the value of parameter op at runtime use an enum to
ensure that only valid values are used.
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Heinrich Schuchardt [Sat, 15 Feb 2025 15:22:06 +0000 (16:22 +0100)]
efi_driver: create a parent device for all EFI block devices
Up to now root has been the parent device for all block devices created via
calling ConnectController(). This does not work well together with the
implementation of bootstd.
Add a dummy parent device for all EFI block devices.
With this change EFI block devices are also accessible via commands like
'cat', 'load', and 'ls'.
=> dm tree
Class Seq Probed Driver Name
-----------------------------------------------------------
efi 0 [ + ] EFI block driver `-- efi
blk 3 [ + ] efi_blk `-- efi.efiblk#0
partition 0 [ + ] blk_partition `-- efi.efiblk#0:1
=> ls efiloader 0:1
13 hello.txt
7 u-boot.txt
2 file(s), 0 dir(s)
=> cat efiloader 0:1 hello.txt
Hello world!
=> efidebug dh
0000000018df1700 (efi.efiblk#0:1)
/VenHw(
dbca4c98-6cb0-694d-0872-
819c650cb7b8)/HD(1,MBR,0xd1535d21,0x1,0x7f)
Block IO
Simple File System
Adjust the event dump unit test to consider the new event spy.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Ilias Apalodimas [Fri, 14 Feb 2025 13:46:45 +0000 (15:46 +0200)]
efi_loader: remove comparisons to string literals from runtime
For EFI runtime services, we manage to preserve string literals
by placing the .efi_runtime section just before .data and preserving
it when marking the runtime memory by marking surrounding boottime
code as runtime. This is ok for now but will break if we update any
linker scripts and decouple .text and .runtime sections.
So let's define the strings we used to compare in the appropriate
section for runtime services
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
Maks Mishin [Sun, 2 Feb 2025 17:59:40 +0000 (20:59 +0300)]
efi_loader: Fix potential deref-after-null
After having been compared to a NULL value at efi_disk.c:426,
pointer 'part_info' is dereferenced at efi_disk.c:534.
Signed-off-by: Maks Mishin <maks.mishinFZ@gmail.com>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Vincent Stehlé [Fri, 17 Jan 2025 17:13:26 +0000 (18:13 +0100)]
lib: uuid: support more efi protocols in uuid_guid_get_str()
Add more EFI protocols GUIDs to the translation table used by
uuid_guid_get_str().
Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com>
Cc: Tom Rini <trini@konsulko.com>
E Shattow [Mon, 10 Feb 2025 20:22:08 +0000 (12:22 -0800)]
configs: starfive: use LwIP network stack and enable wget command
Use LwIP network stack and enable wget HTTP command. The tftpput command
is not currently supported by LwIP network stack so remove it.
Signed-off-by: E Shattow <e@freeshell.de>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Hal Feng [Mon, 10 Feb 2025 02:57:43 +0000 (10:57 +0800)]
board: starfive: Update the maintainer file for VisionFive 2 board
Update the maintainer file and mark jh7110 / visionfive2 related files
with N: patterns.
Signed-off-by: Hal Feng <hal.feng@starfivetech.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Heinrich Schuchardt [Thu, 6 Feb 2025 13:05:03 +0000 (14:05 +0100)]
configs: microchip_mpfs_icicle: set DEFAULT_FDT_FILE
Variable $fdtfile needs to be set for automatically loading a device-tree
from the ESP or boot partition.
* Set CONFIG_DEFAULT_FDT_FILE in the defconfig.
* Add $fdtfile to the default environment.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Jonas Karlman [Tue, 4 Feb 2025 21:38:43 +0000 (21:38 +0000)]
arm64: dts: rockchip: Fix sdmmc access on rk3308-rock-s0 v1.1 boards
BootROM leave GPIO4_D6 configured as SDMMC_PWREN function and DW MCI
driver set PRWEN high on MMC_POWER_UP and low on MMC_POWER_OFF.
Similarly U-Boot also set PRWEN high before accessing mmc.
However, HW revision prior to v1.2 must pull GPIO4_D6 low to access
sdmmc. For HW revision v1.2 the state of GPIO4_D6 has no impact.
Model an always-on active low fixed regulator using GPIO4_D6 to fix
use of sdmmc on older HW revisions of the board.
Fixes:
adeb5d2a4ba4 ("arm64: dts: rockchip: Add Radxa ROCK S0")
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Link: https://lore.kernel.org/r/20241119230838.4137130-1-jonas@kwiboo.se
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
[ upstream commit:
26c100232b09ced0857306ac9831a4fa9c9aa231 ]
(cherry picked from commit
ca8e0bedbc790b19b11efc223677d178b8eeb74e)
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Jonas Karlman [Sun, 9 Feb 2025 23:27:56 +0000 (23:27 +0000)]
net: dwc_eth_qos_rockchip: Fix disable of RX/TX delay for RK3588
When rgmii-rxid/txid/id phy-mode is used the MAC should not add RX
and/or TX delay. Currently RX/TX delay is configured as enabled using
zero as delay value for the rgmii-rxid/txid/id modes.
Change to disable RX and/or TX delay and using zero as delay value.
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Jonas Karlman [Sun, 9 Feb 2025 23:27:55 +0000 (23:27 +0000)]
net: dwc_eth_qos_rockchip: Fix disable of RX/TX delay for RK356x
When rgmii-rxid/txid/id phy-mode is used the MAC should not add RX
and/or TX delay. Currently RX/TX delay is configured as enabled using
zero as delay value for the rgmii-rxid/txid/id modes.
Change to disable RX and/or TX delay and using zero as delay value.
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Jonas Karlman [Mon, 6 Jan 2025 21:39:42 +0000 (21:39 +0000)]
pinctrl: rockchip: rk3328: Fix pinmux for GPIO2-B and GPIO3-B pins
The pinmux bits for GPIO2-B0 to GPIO2-B6 actually have 2 bits width,
correct the bank flag for GPIO2-B. The pinmux bits for GPIO2-B7 is
recalculated so it remain unchanged. Add missing GPIO3-B1 to GPIO3-B7
pinmux data to rk3328_mux_recalced_data as mux register offset for these
pins does not follow rockchip convention.
This matches changes in following Linux commits:
-
e8448a6c817c ("pinctrl: rockchip: fix pinmux bits for RK3328 GPIO2-B pins")
-
5ef6914e0bf5 ("pinctrl: rockchip: fix pinmux bits for RK3328 GPIO3-B pins")
-
128f71fe014f ("pinctrl: rockchip: correct RK3328 iomux width flag for GPIO2-B pins")
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Jonas Karlman [Sun, 12 Jan 2025 22:27:29 +0000 (22:27 +0000)]
rockchip: rk3288: Use rk3288-cru.h from dts/upstream
clock/rk3288-cru.h in include/dt-bindings is almost identical to the
version in dts/upstream, remove the copy from include/dt-bindings to
only use the version from dts/upstream.
One clk, SCLK_MAC_PLL, is not part of the upstream bindings, this clk is
not used by upstream, in-tree or vendor DTs and can safely be dropped.
No functional change to board DTs is intended with this removal.
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Johan Jonker [Tue, 7 Jan 2025 21:36:01 +0000 (22:36 +0100)]
rockchip: use OF_UPSTREAM for rk3036
The device tree for rk3036 combined is now
available in the /dts/upstream directory.
Use imply OF_UPSTREAM to migrate all rk3036 boards.
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Signed-off-by: Johan Jonker <jbx6244@gmail.com>
Jonas Karlman [Thu, 30 Jan 2025 22:07:13 +0000 (22:07 +0000)]
rockchip: sdram: Ensure ram_base is correct in SPL
Most Rockchip SoCs use 0x0 as DRAM base address, however some SoCs use
0x60000000 and RK3576 use 0x40000000 as DRAM base address.
CFG_SYS_SDRAM_BASE is defined with correct address for each SoC and
U-Boot proper use this to set correct gd->ram_base in setup_dest_addr().
SPL never assign any value to gd->ram_base and instead use the default,
0x0. Set correct gd->ram_base in dram_init() to ensure its correctness
in SPL.
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Jonas Karlman [Thu, 30 Jan 2025 22:07:12 +0000 (22:07 +0000)]
rockchip: sdram: Limit usable ram_top to max 4G
U-Boot only works correctly when it uses RAM below the 4G address
boundary on Rockchip SoCs. Limit usable gd->ram_top to max 4G.
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Jonas Karlman [Thu, 30 Jan 2025 22:07:11 +0000 (22:07 +0000)]
rockchip: sdram: Allow the first bank to extend beyond 4 GiB
Allow the first bank to extend beyond 4 GiB when the blob of space for
peripheral is located before start of DRAM, e.g. when start of DRAM
is 0x40000000 and continue beyond the 4 GiB mark.
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Chen-Yu Tsai [Tue, 4 Feb 2025 17:29:53 +0000 (01:29 +0800)]
rockchip: rk3399: grf: Fix enum typos for UART2
In the GRF header file, some instances of UART2 pinmux are prefixed with
"GRF_UART2DBG" while others have "GRF_UART2DGB".
Since UART2 is the default console UART and used for debugging, it is
more likely the name should be UART2DBG.
Fix the ones that are wrong.
Fixes:
a2c08df3813b ("pinctrl: add driver for rk3399")
Fixes:
fa72de10452c ("rockchip: arm64: rk3399: move grf register definitions to grf_rk3399.h")
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Paul Kocialkowski <paulk@sys-base.io>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Jonas Karlman [Sat, 8 Feb 2025 22:49:40 +0000 (22:49 +0000)]
Revert "rockchip: rk3399: Fix TPL build of bob and kevin"
These power rails must be on very early for the U-Boos TPL banner to be
show over debug UART.
This reverts commit
4576e65a5d6b10fd207c3a44061676ce0220d794.
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Jonas Karlman [Sat, 8 Feb 2025 22:49:39 +0000 (22:49 +0000)]
rockchip: rk3399-gru: Enable TPL_GPIO for bob and kevin
The PP1500 and PP3000 power rails must be on very early for the U-Boot
TPL banner to be shown on debug UART.
Enable TPL_GPIO Kconfig option for bob and kevin to allow use of
spl_gpio.h functions in TPL.
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Jonas Karlman [Sat, 8 Feb 2025 22:49:38 +0000 (22:49 +0000)]
Revert "rockchip: rk3399: Drop unneeded bob and kevin board specific code"
These power rails must be on very early for the U-Boos SPL banner to be
show over debug UART.
This reverts commit
af518a1dfe637cb4dc486d7a832585e4a48bc970.
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Stefan Eichenberger [Mon, 10 Feb 2025 07:27:47 +0000 (08:27 +0100)]
board: verdin-am62: add dram_init_banksize
Add the dram_init_banksize function to the board file to properly set
DRAM memory sizes during boot.
The commit
bc07851897bd ("board: ti: Pull redundant DDR functions to a
common location and Fixup DDR size when ECC is enabled") relocated the
dram_init_banksize function from architecture specific initialization to
the TI board initialization code. As a result, boards relying on the
previous setup now require this function to be defined within their
board file to handle DRAM sizing correctly.
Without this function defined the following error appears during boot:
ERROR: Failed to allocate 0x1000 bytes below 0x0.
Fixes:
bc07851897bd ("board: ti: Pull redundant DDR functions to a common location and Fixup DDR size when ECC is enabled")
Signed-off-by: Stefan Eichenberger <stefan.eichenberger@toradex.com>
Acked-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Gao Xiang [Thu, 13 Feb 2025 11:28:47 +0000 (19:28 +0800)]
fs/erofs: fix an integer overflow in symlink resolution
See the original report [1], otherwise len + 1 will be overflowed.
Note that EROFS archive can record arbitary symlink sizes in principle,
so we don't assume a short number like 4096.
[1] https://lore.kernel.org/r/
20250210164151.GN1233568@bill-the-cat
Fixes:
830613f8f5bb ("fs/erofs: add erofs filesystem support")
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Heiko Schocher [Wed, 12 Feb 2025 09:10:55 +0000 (10:10 +0100)]
led: fix coverity scan error
The following was reported by Covervity scan:
*** CID 541279: (TAINTED_SCALAR)
/drivers/led/led-uclass.c: 284 in led_get_function_name()
278 if (!ret) {
279 snprintf(uc_plat->name, LED_MAX_NAME_SIZE,
280 "%s:%s-%d",
281 cp ? "" : led_colors[color],
282 func ? func : "", enumerator);
283 } else {
>>> CID 541279: (TAINTED_SCALAR)
>>> Using tainted variable "color" as an index into an array "led_colors".
Fix it.
Addresses-Coverity-ID: 541279 (TAINTED_SCALAR)
Link: https://lists.denx.de/pipermail/u-boot/2025-February/580250.html
Signed-off-by: Heiko Schocher <hs@denx.de>
Heinrich Schuchardt [Tue, 11 Feb 2025 13:55:22 +0000 (14:55 +0100)]
tools: use cryptographically safe RNG
The PRNG implementing the random() function only has 2^31 states and
therefore is unsafe to use for cryptography. Use arc4random() instead.
Fixes:
cc34f04efd63 ("tools: image-host.c: use random instead of rand")
Addresses-Coverity-ID: 312953 Calling risky function
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Udit Kumar [Tue, 11 Feb 2025 17:51:58 +0000 (23:21 +0530)]
power: regulator: tps65941: Fix voltage calculation for ldo
As per TRM[0] Section 8.7.1 "TPS6594-Q1 Registers", LDOx_Vout
bit 6-1, define the NVM voltage settings.
Along side table 8-4 of above TRM, shows voltage to value mapping.
Driver wrongly using bits 5-1 to calculate voltage, and to convert
voltage to value driver was using buck's calculation.
So fix those calculation.
[0]: https://www.ti.com/lit/ds/symlink/tps6594-q1.pdf
Fixes:
5d7dbd22cf7d ("power: regulator: tps65941: use function callbacks for conversion ops")
Signed-off-by: Udit Kumar <u-kumar1@ti.com>
Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
Ilias Apalodimas [Thu, 6 Feb 2025 09:28:56 +0000 (11:28 +0200)]
tpm: unconstify tpm_tis_chip_data
The struct contains an iomem pointer that we later remap and update.
Remove const from the struct definition.
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Tom Rini [Sun, 16 Feb 2025 16:29:03 +0000 (10:29 -0600)]
Gitlab: Add missing symlink for qemu_arm64_lwip boardenv file
When adding the symlink for the conf file so qemu_arm64_lwip uses
qemu_arm64 configuration information, the symlink for the boardenv file
was missed in Gitlab (but not Azure). Add that in now.
Fixes:
fd10d156db3f ("CI: add qemu_arm64_lwip to the test matrix")
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
Svyatoslav Ryhel [Sun, 21 Jan 2024 13:37:57 +0000 (15:37 +0200)]
board: acer: picasso: add Acer Iconia Tab A500 support
The Acer Iconia A500 is a tablet computer designed, developed and
marketed by Acer Inc. It is powered by 1 GHz Nvidia Tegra 2 processor
and 1GB DDR2 RAM. The A500 is sold with 64 GB, although both 16 GB
and 32 GB models are available.
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
Tom Rini [Sat, 15 Feb 2025 21:29:20 +0000 (15:29 -0600)]
Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sh
Add empty weak assembler function armv8_switch_to_el2_prep() which is
jumped to just before U-Boot determines which EL it is running in and
decides which path to take to boot the Linux kernel. Add
IH_TYPE_TFA_BL31 into supported images type, to allow implementation of
board specific U_BOOT_FIT_LOADABLE_HANDLER(IH_TYPE_TFA_BL31, ...) TFA
BL31 loadable handler for fitImages.
This PR contains common hooks which are noop, R-Car Gen4 board specific
implementation using these hooks is coming in next PR.
Marek Vasut [Wed, 29 Jan 2025 21:59:19 +0000 (22:59 +0100)]
image: Add support for starting TFA BL31 as fitImage loadables
Add support for starting TFA from U-Boot running in EL3 as part of
fitImage boot, so the user can start U-Boot in the highest privilege
level on the platform, bundle TFA, Linux, DT into a single fitImage
and boot such a bundle as a whole.
There are two main benefits of this approach. First is the ability
to run U-Boot in EL3, where it has unrestricted access to the entire
system and can act as a useful debug tool, as it was always intended
to be used. Second is the ability to easily and safely update of any
component in the fitImage, be it TFA, Linux or DT.
The boot process is similar to regular Linux with DT fitImage boot
process, except the TFA has to be bundled into the fitImage. For the
bundling instructions, see below. The TFA is started as a 'loadables'
with custom U_BOOT_FIT_LOADABLE_HANDLER and armv8_switch_to_el2_prep()
handling implemented in board code, and performing the handoff and
boot in case the TFA was loaded.
The loadables handler is optional and meant to set up any sort of
handoff structures used by the TFA BL31 or perform any other setup
that is needed by the blob. The custom armv8_switch_to_el2_prep()
has to implement the jump to TFA BL31 with return to U-Boot just
before booting the Linux kernel.
Example fitImage image and configuration section:
/dts-v1/;
/ {
description = "Linux kernel with FDT blob and TFA BL31";
images {
kernel-1 { ... };
fdt-1 { ... };
atf-1 { /* This is the TFA BL31 image */
description = "TFA BL31";
data = /incbin/("../build/plat/release/bl31.bin");
type = "tfa-bl31";
arch = "arm64";
os = "arm-trusted-firmware";
compression = "none";
load = <0x46400000>;
entry = <0x46400000>;
};
};
configurations {
default = "conf-1";
conf-1 {
description = "Boot Linux";
kernel = "kernel-1";
fdt = "fdt-1";
loadables = "atf-1"; /* This is the TFA BL31 loadable */
};
};
};
Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Marek Vasut [Wed, 29 Jan 2025 21:59:18 +0000 (22:59 +0100)]
arm64: Add late jump to kernel board hook
Add empty weak assembler function armv8_switch_to_el2_prep() which is
jumped to just before U-Boot determines which EL it is running in and
decides which path to take to boot the Linux kernel.
This weak function is meant to be used by architecture specific code
to implement jump to a firmware blob, which then returns right past
this weak function and continues execution of U-Boot code which then
boots the Linux kernel. One example of such use case is when U-Boot
jump tp TFA BL31, which switches from EL3 to EL2 and then returns to
U-Boot code newly running in EL2 and starts the Linux kernel.
The weak function is called with caches already disabled and DM shut
down. Any preparatory work or even loading of more data must be done
in board_prep_linux(), this hook is meant only for the final jump to
the firmware and return to U-Boot before booting Linux.
Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Tom Rini [Thu, 13 Feb 2025 18:37:26 +0000 (12:37 -0600)]
Merge branch 'misc' of https://source.denx.de/u-boot/custodians/u-boot-tegra
Improvements for PMIC GPIO children, tegra20 pinmux driver fix, tegra
dts updates, various small adjustments and tweaks.
ZHANG Yuntian [Tue, 11 Feb 2025 07:30:27 +0000 (15:30 +0800)]
mbedtls/external: remove broken git submodule
When we squash imported mbedtls, the git submodule "framework" was
preserved in the commit. However, U-Boot itself does not use git
submodule, and provides no .gitmodules file to specify the submodule
repository.
This is normally not an issue when cloning U-Boot repository. However,
when U-Boot is imported as a submodule, this will break git option
`--recurse-submodules` as it fails to resolve "framework".
As we do not use the submodule, remove it to unbreak existing workflows.
Fixes:
12f1212e95fe ("Merge commit '
0344c602eadc0802776b65ff90f0a02c856cf53c' as 'lib/mbedtls/external/mbedtls'")
Signed-off-by: ZHANG Yuntian <yt@radxa.com>
Svyatoslav Ryhel [Sat, 28 Dec 2024 13:21:03 +0000 (15:21 +0200)]
board: transformer-t30: fix model detection
PCBID1 seems to be high not only on TF600T, but on TF700T as well,
that caused boot failure for TF700T. Switching PCBID1 to PCBID7
should fix this issue.
Co-developed-by: Ion Agorria <ion@agorria.com>
Signed-off-by: Ion Agorria <ion@agorria.com>
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>