Heinrich Schuchardt [Thu, 16 Jan 2025 11:39:09 +0000 (12:39 +0100)]
efi_loader: use include in ARM EFI linker script
Use the same include as arm64 for the linker script.
Adjust the 32-bit ARM PE-COFF header accordingly and harmonize it with the
64-bit ARM header.
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Heinrich Schuchardt [Thu, 16 Jan 2025 11:39:08 +0000 (12:39 +0100)]
efi_loader: correct SizeOfCode, SizeOfInitializedData
The fields SizeOfCode, SizeOfInitializedData, and SizeOfUninitializedData
are define in the PE-COFF specification [1].
* SizeOfCode must match the size of all .text sections.
* SizeOfInitializedData must match the size of all .data sections.
* SizeOfUninitializedData must match the size of all .bss sections.
We only have one .text and one .data section. SizeOfCode and
SizeOfInitializedData have to be calculated as the difference between
the end and the start of the respective section.
As we don't have any .bss sections in the generated EFI binaries.
SizeOfUninitializedData must remain 0.
[1] https://learn.microsoft.com/en-us/windows/win32/debug/pe-format
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Heinrich Schuchardt [Thu, 16 Jan 2025 11:39:07 +0000 (12:39 +0100)]
efi_loader: use INCLUDE in EFI linker scripts
Except for the architecture specific lines ARM and RISC-V can use the same
linker script. Move the common lines to an include.
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Heinrich Schuchardt [Thu, 16 Jan 2025 11:39:06 +0000 (12:39 +0100)]
scripts/Makefile.lib: add -L option to LD command for EFI binaries
The linker uses the path specified with -L to search for linker scripts
and for linker script includes.
For out-of-tree builds specify the build directory with -L instead of
the absolute path of the linker script. This allows using an INCLUDE
statement.
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Ilias Apalodimas [Thu, 16 Jan 2025 11:39:05 +0000 (12:39 +0100)]
efi_loader: Fix section alignment on EFI binaries
When creating EFI binaries, the alignment of the text section isn't
correctly factored in. As a result trying to load signed EFI binaries
throws an error with:
efi_image_region_add() efi_image_region_add: new region already part of another
Image not authenticated
Running the binary through sbverify has a similar warning
sbverify ./lib/efi_loader/helloworld.efi
warning: gap in section table:
.text : 0x00001000 - 0x00001c00,
.data : 0x00002000 - 0x00002200,
gaps in the section table may result in different checksums
warning: data remaining[7680 vs 12720]: gaps between PE/COFF sections?
.....
If we include the alignment in the text section, the signed binary boots
fine, and the relevant sbverify warning goes away
sbverify ./lib/efi_loader/helloworld.efi
warning: data remaining[8704 vs 12720]: gaps between PE/COFF sections?
.....
We should look into the remaining warning at some point as well
regarding the gaps between PE/COFF sections.
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Andy Yan [Mon, 13 Jan 2025 10:56:13 +0000 (18:56 +0800)]
doc: coolpi: Fix the defconfig name
The defconfig name should be: coolpi-cm5-genbook-rk3588_defconfig
Signed-off-by: Andy Yan <andyshrk@163.com>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Tom Rini [Fri, 17 Jan 2025 14:27:40 +0000 (08:27 -0600)]
Merge https://source.denx.de/u-boot/custodians/u-boot-riscv
CI: https://source.denx.de/u-boot/custodians/u-boot-riscv/-/pipelines/24215
- RISC-V: Add "riscv,isa-extensions" and multi-letter extension parsing
support
- RISC-V: Add default cache line size
- Board: Canaan: Add K230-CanMV support
- Board: VisionFive2: Split out target specific configuration
Tom Rini [Thu, 16 Jan 2025 15:59:54 +0000 (09:59 -0600)]
Merge tag 'u-boot-imx-master-
20250116' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx
CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/24221
- Enable watchdog command on Capricorn board.
- Convert imx8m evk boards to BOOTSTD.
- Enable dynamic mmcdev setting on imx8m evk boards.
- Fix i.MX FDT cooling-device property corruption.
- Add OP-TEE support on Phycore i.MX8M boards.
Sébastien Szymanski [Wed, 15 Jan 2025 15:41:13 +0000 (16:41 +0100)]
imx: fdt: fix cooling-device property corruption
The function disable_thermal_cpu_nodes() corrupts the cooling-device
property.
For example, booting an i.MX93 devices with only one A55 core (IMX93x1)
with the cooling-device property set to:
$ dtc -I dtb foo.dtb | grep cooling-device
cooling-device = <0x08 0xffffffff 0xffffffff 0x09 0xffffffff 0xffffffff>;
Linux shows the following error at boot:
[ 1.715189] OF: /thermal-zones/cpu-thermal/cooling-maps/map0: could not find phandle
1083699869
[ 1.723977] thermal_sys: Add a cooling_device property with at least one device
[ 1.731285] thermal thermal_zone0: binding zone cpu-thermal with cdev thermal-devfreq-0 failed:-2
because the cooling-device property in the device tree passed to the
kernel is
$ dtc -I dtb /sys/firmware/fdt | grep cooling-device
cooling-device = <0x4097f29d 0x00 0xb05aef9d>;
The issue is because the wrong variable type is passed to the function
fdt_setprop() called in the function disable_thermal_cpu_nodes(). With
the variable type fixed, the error at boot is gone and the property is
properly set:
$ dtc -I dtb /sys/firmware/fdt | grep cooling-device
cooling-device = <0x08 0xffffffff 0xffffffff>;
Signed-off-by: Sébastien Szymanski <sebastien.szymanski@armadeus.com>
Alexander Sverdlin [Mon, 13 Jan 2025 21:15:15 +0000 (22:15 +0100)]
configs: capricorn_cxg3: Enable CMD_WDT
Capricorn boards have WDT (WDT_SIEMENS_PMIC) and U-Boot is not configured
to trigger the WDT. Enable the "wdt" command to be able to stop the WDT
from the command line.
Signed-off-by: Alexander Sverdlin <alexander.sverdlin@siemens.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
Yannic Moog [Fri, 10 Jan 2025 12:35:38 +0000 (13:35 +0100)]
doc: phytec: imx8mm: add OP-TEE documentation
Add instructions on how to build and package OP-TEE for the
phycore-imx8mm based boards. The build instructions are identical for
phyGATE-Tauri-L and phyBOARD-Polis.
Also fix missig '-' for TF-A build instructions.
Signed-off-by: Yannic Moog <y.moog@phytec.de>
Yannic Moog [Fri, 10 Jan 2025 12:35:37 +0000 (13:35 +0100)]
doc: phytec: imx8mp: add OP-TEE documentation
Add documentation for the phyBOARD-Pollux i.MX 8M Plus on OP-TEE
integration.
Also add missing '-' to TF-A build instruction while at it.
Signed-off-by: Yannic Moog <y.moog@phytec.de>
Yannic Moog [Fri, 10 Jan 2025 12:35:36 +0000 (13:35 +0100)]
phycore-imx8mm_defconfig: add optee load address
The phyCORE i.MX 8M Mini expects 0x56000000 address to load optee.
Signed-off-by: Yannic Moog <y.moog@phytec.de>
Yannic Moog [Fri, 10 Jan 2025 12:35:35 +0000 (13:35 +0100)]
imx8mm-phygate-tauri-l_defconfig: add optee load address
The phyGATE-Tauri-L expects 0x56000000 address to load optee.
Signed-off-by: Yannic Moog <y.moog@phytec.de>
Yannic Moog [Fri, 10 Jan 2025 12:35:34 +0000 (13:35 +0100)]
phycore-imx8mp_defconfig: add optee load address
The phyBOARD-Pollux expects 0x56000000 address to load optee.
Signed-off-by: Yannic Moog <y.moog@phytec.de>
Yannic Moog [Fri, 10 Jan 2025 12:35:33 +0000 (13:35 +0100)]
arm: imx8m: add OP-TEE node
Add tee node in SoC u-boot device trees. Use a kconfig entry to specify
load and entry addresses for the op-tee image in the respective
defconfig.
Default IMX8M_OPTEE_LOAD_ADDR is supplied. To keep it simple, the same
addresses are used for each SoC as are defined in upstream tf-a
(BL32_BASE) [1].
[1] https://github.com/ARM-software/arm-trusted-firmware/tree/master/plat/imx/imx8m
Signed-off-by: Yannic Moog <y.moog@phytec.de>
Peng Fan [Thu, 9 Jan 2025 03:29:18 +0000 (11:29 +0800)]
gpio: adp5585: Update compatible string
i.MX93-11x11-EVK has switched to use upstream device tree, and use
"adi,adp5585". Since i.MX93-11x11-EVK is the only user of this driver,
so it is safe to drop "adp5585".
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Peng Fan [Thu, 9 Jan 2025 03:29:17 +0000 (11:29 +0800)]
imx: imx93-11x11-evk: drop duplicated nodes
The upstream dts already has the lpi2c2 subnodes, so drop the duplicated
ones in u-boot dtsi.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Peng Fan [Thu, 9 Jan 2025 03:29:16 +0000 (11:29 +0800)]
imx: imx8mq_evk: Switch to BOOTSTD
Move env to imx8mq_evk.env
Switch to support BOOTSTD with a bsp bootcmd as fallback.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Peng Fan [Thu, 9 Jan 2025 03:29:15 +0000 (11:29 +0800)]
imx: imx8mq_evk: Enable dynamic settings to mmcdev and mmcroot
Enable dynamic settings to mmcdev and mmcroot for i.MX8MQ-EVK
Since we are here, clean up the including headers
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Peng Fan [Thu, 9 Jan 2025 03:29:14 +0000 (11:29 +0800)]
imx: imx8mq_evk: Drop DECLARE_GLOBAL_DATA_PTR
There is no gd used in the board file, so drop DECLARE_GLOBAL_DATA_PTR.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Peng Fan [Thu, 9 Jan 2025 03:29:13 +0000 (11:29 +0800)]
imx: imx8mq_evk: Cleanup headers
Drop unused headers and sort the order.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Peng Fan [Thu, 9 Jan 2025 03:29:12 +0000 (11:29 +0800)]
imx: imx8mm_evk: Switch to BOOTSTD
Move env to imx8mm_evk.env
Switch to support BOOTSTD with a bsp bootcmd as fallback.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Peng Fan [Thu, 9 Jan 2025 03:29:11 +0000 (11:29 +0800)]
imx: imx8mm_evk: Enable dynamic settings to mmcdev and mmcroot
Enable dynamic settings to mmcdev and mmcroot for i.MX8MM-EVK
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Peng Fan [Thu, 9 Jan 2025 03:29:10 +0000 (11:29 +0800)]
imx: imx8mn_evk: Switch to BOOTSTD
Move env to imx8mn_evk.env
Switch to support BOOTSTD with a bsp bootcmd as fallback.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Peng Fan [Thu, 9 Jan 2025 03:29:09 +0000 (11:29 +0800)]
imx: imx8mn_evk: Enable dynamic settings to mmcdev and mmcroot
Enable dynamic settings to mmcdev and mmcroot for i.MX8MN-EVK
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Peng Fan [Thu, 9 Jan 2025 03:29:08 +0000 (11:29 +0800)]
imx: imx8mn_evk: Drop DECLARE_GLOBAL_DATA_PTR
There is no users of global data in imx8mn_evk.c, drop it.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Peng Fan [Thu, 9 Jan 2025 03:29:07 +0000 (11:29 +0800)]
imx: imx8mn_evk: Cleanup headers
Drop unused headers and sort them
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Peng Fan [Thu, 9 Jan 2025 03:29:06 +0000 (11:29 +0800)]
imx: imx8mp_evk: Switch to BOOTSTD
Move env to imx8mp_evk.env.
Switch to support BOOTSTD with a bsp bootcmd as fallback.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Peng Fan [Thu, 9 Jan 2025 03:29:05 +0000 (11:29 +0800)]
imx: imx8mp_evk: Enable dynamic settings to mmcdev and mmcroot
Enable dynamic settings to mmcdev and mmcroot for i.MX8MP-EVK
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Peng Fan [Thu, 9 Jan 2025 03:29:04 +0000 (11:29 +0800)]
imx: imx91_evk: switch to BOOTSTD
Switch to support BOOTSTD with a bsp bootcmd as fallback.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Peng Fan [Thu, 9 Jan 2025 03:29:03 +0000 (11:29 +0800)]
imx: imx93_qsb: switch to BOOTSTD
Switch to support BOOTSTD with a bsp bootcmd as fallback.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Peng Fan [Thu, 9 Jan 2025 03:29:02 +0000 (11:29 +0800)]
imx: imx93_evk: switch to BOOTSTD
Switch to support BOOTSTD with a bsp bootcmd as fallback.
Move the env to imx93_evk.env
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Junhui Liu [Tue, 14 Jan 2025 16:46:41 +0000 (00:46 +0800)]
doc: canaan: Add K230 CanMV board
Add description of compiling u-boot for K230 CanMV.
Since the vendor's u-boot-spl verifies u-boot header [1], it is
necessary to use the Python script from vendor to add the header to the
u-boot image.
[1] https://github.com/kendryte/k230_sdk/blob/v1.8/src/little/uboot/board/canaan/common/k230_board_common.h#L52
Signed-off-by: Junhui Liu <junhui.liu@pigmoral.tech>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Junhui Liu [Tue, 14 Jan 2025 16:46:40 +0000 (00:46 +0800)]
riscv: canaan: k230_canmv: Add initial support
Add support for K230 CanMV board with serial console and usb otg
support. It can boot via vendor's u-boot-spl and boot into Linux
via tftp through the onboard RTL8152.
Signed-off-by: Junhui Liu <junhui.liu@pigmoral.tech>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Junhui Liu [Tue, 14 Jan 2025 16:46:39 +0000 (00:46 +0800)]
riscv: cpu: k230: Add support for Canaan Kendryte K230 SoC
Add Canaan K230 SoC with sysreset support, running without cache
enabled.
Signed-off-by: Junhui Liu <junhui.liu@pigmoral.tech>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Junhui Liu [Tue, 14 Jan 2025 16:46:38 +0000 (00:46 +0800)]
riscv: dts: canaan: Add basic device tree for K230 CanMV board
Add initial dts for K230-CanMV powered by Canaan Kendryte K230 SoC,
which has two RISC-V C908 cores, a big core with vector 1.0 extension
and a small core without vector extension.
This patch is basically comes from Linux Kernel [1] and it assumes
u-boot is running on the big core. Additionally, bootctl and reboot nodes
are added to support sysreset [2] and an clk_dummy node is added to
satisfy dependencies for usb [3].
Currently, u-boot is booted by the vendor's u-boot-spl. To meet the
requirements [4][5] of vendor's u-boot-spl for u-boot, a binman node with
mkimage child node is added here, which will compress u-boot.bin with
gzip and generate an image named "uboot" in the file u-boot-gz.img.
[1] https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux.git/log/?h=k230-basic
[2] https://github.com/kendryte/k230_sdk/blob/v1.8/src/big/rt-smart/kernel/bsp/maix3/board/interdrv/sysctl/sysctl_boot/sysctl_boot.c#L67
[3] https://lore.kernel.org/linux-riscv/tencent_AD84B436C2F31108B66B4739D6E306C5E80A@qq.com/
[4] https://github.com/kendryte/k230_sdk/blob/v1.8/src/little/uboot/board/canaan/common/k230_img.c#L306
[5] https://github.com/kendryte/k230_sdk/blob/v1.8/src/little/uboot/board/canaan/common/k230_img.c#L125
Signed-off-by: Junhui Liu <junhui.liu@pigmoral.tech>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Junhui Liu [Tue, 14 Jan 2025 16:46:37 +0000 (00:46 +0800)]
usb: dwc2: Add support for Canaan K230
Canaan Kendryte K230 SoC instantiates a dwc2 v4.30a core. This patch
adds the compatible for it.
Signed-off-by: Junhui Liu <junhui.liu@pigmoral.tech>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Yu-Chien Peter Lin [Fri, 10 Jan 2025 08:53:08 +0000 (16:53 +0800)]
Kconfig: Add a default cache line size for RISC-V
The RISC-V ISA profile RVA23U64 requires extension Zic64b (Cache blocks
must be 64 bytes in size, naturally aligned in the address space).
Some RISC-V platforms do not define the d-cache line size through SYS_CACHE_SHIFT_n.
Set a default value of 64 bytes for such cases.
Signed-off-by: Yu-Chien Peter Lin <peter.lin@sifive.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Mayuresh Chitale [Mon, 6 Jan 2025 13:04:05 +0000 (13:04 +0000)]
riscv: Fallback to riscv,isa
Update the cpu probing to fallback to "riscv,isa" property if
"riscv,isa-extensions" is not available and modify the riscv CMO code
to use the block size that was probed during cpu setup.
Signed-off-by: Mayuresh Chitale <mchitale@ventanamicro.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Mayuresh Chitale [Mon, 6 Jan 2025 13:04:04 +0000 (13:04 +0000)]
riscv: Enhance extension probing
Enhance the existing extension probing mechanism by adding support for
more extensions and probing using the "riscv,isa" property. This patch
is ported from the latest upstream linux.
Signed-off-by: Mayuresh Chitale <mchitale@ventanamicro.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
E Shattow [Wed, 1 Jan 2025 06:35:57 +0000 (22:35 -0800)]
riscv: dts: starfive: split out visionfive2 target specific configuration
Split out StarFive VisionFive2 multi-board target specific configuration
into starfive-visionfive2-binman.dtsi in preparation for removal of
jh7110-u-boot and jh7110-common-u-boot in part or whole as sent upstream.
Signed-off-by: E Shattow <e@freeshell.de>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Tom Rini [Wed, 15 Jan 2025 23:34:26 +0000 (17:34 -0600)]
Merge patch series "bootstd: Support recording images"
Simon Glass <sjg@chromium.org> says:
This series provides a way to keep track of the images used in bootstd,
including the type of each image.
At present this is sort-of handled by struct bootflow but in quite an
ad-hoc way. The structure has become quite large and is hard to query.
Future work will be able to reduce its size.
Ultimately the 'bootflow info' command may change to also show images as
a list, but that is left for later, as this series is already fairly
long. So for now, just introduce the concept and adjust bootstd to use
it, with a simple command to list the images.
This series includes various alist enhancements, to make use of this new
data structure a little easier.
[trini: Drop patch 18 and 19 for now due to size considerations]
Link: https://lore.kernel.org/r/20241115231926.211999-1-sjg@chromium.org
Simon Glass [Fri, 15 Nov 2024 23:19:24 +0000 (16:19 -0700)]
bootstd: Export bootdev_get_from_blk()
Export this function so it can be used from other files.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Fri, 15 Nov 2024 23:19:23 +0000 (16:19 -0700)]
bootstd: Add a simple command to list images
Add a new 'bootstd images' command, which lists the images which have
been loaded.
Update some existing tests to use it. Provide some documentation about
images in general and this command in particular.
Use a more realistic kernel command-line to make the test easier to
follow.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Fri, 15 Nov 2024 23:19:22 +0000 (16:19 -0700)]
bootstd: Update cros bootmeth to record images
Record images loaded by this bootmeth.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Fri, 15 Nov 2024 23:19:21 +0000 (16:19 -0700)]
Update bootmeth_alloc_other() to record images
Update this function to add the image to the list.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Fri, 15 Nov 2024 23:19:20 +0000 (16:19 -0700)]
boot: Update pxe bootmeth to record images
Record images loaded by this bootmeth.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Fri, 15 Nov 2024 23:19:19 +0000 (16:19 -0700)]
boot: Update extlinux pxe_getfile_func() to include type
Add a file-type parameter to this function and update all users. Add a
proper comment to the function which we are here.
This will allow tracking of the file types loaded by the extlinux
bootmeth.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Fri, 15 Nov 2024 23:19:18 +0000 (16:19 -0700)]
bootmeth_efi: Check the filename-allocation in the network path
If the filename cannot be set we should give up. Add the missing error
check.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Fri, 15 Nov 2024 23:19:17 +0000 (16:19 -0700)]
bootmeth: Update the read_file() method to include a type
We want to record the type of each file which is loaded. Add an new
parameter for this, to the read_file() method. Update all users.
Make bootmeth_common_read_file() store information about the image that
is read.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Simon Glass [Fri, 15 Nov 2024 23:19:16 +0000 (16:19 -0700)]
bootmeth_efi: Simplify reading files by using the common function
The efiload_read_file() does similar things to a common function, so
update it to use that instead.
Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Simon Glass [Fri, 15 Nov 2024 23:19:15 +0000 (16:19 -0700)]
boot: pxe: Drop the duplicate comment on get_pxe_file()
This function is exported, so document it in the header file. Drop the
duplicate comment in the C file.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Fri, 15 Nov 2024 23:19:14 +0000 (16:19 -0700)]
bootstd: Update bootmeth_alloc_file() to record images
As a first step to recording images and where they came from, update
this function to do so, since it is used by two bootmeths
Create a helper function in the bootflow system, since recorded
images are always associated with bootflows.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Fri, 15 Nov 2024 23:19:13 +0000 (16:19 -0700)]
bootstd: Maintain a list of images
We want to keep track of images which are loaded, or those which could
perhaps be loaded. This will make it easier to manage memory allocation,
as well as permit removal of the EFI set_efi_bootdev() feature.
Add a list of these, attached to the bootflow. For now the list is
empty.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Fri, 15 Nov 2024 23:19:12 +0000 (16:19 -0700)]
bootstd: Move the bootflow list into an alist
Use an alist for this data structure as it is somewhat simpler to
manage. This means that bootstd holds a simple list of bootflow structs
and can drop it at will, without chasing down lists.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Fri, 15 Nov 2024 23:19:11 +0000 (16:19 -0700)]
bootstd: Drop the bootdev-specific list of bootflows
This list is only used by two functions, which can be updated to iterate
through the global list. Take this approach, which allows the bootdev
list to be dropped.
Overall this makes the code slightly more complicated, but will allow
moving the bootflow list into an alist
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Fri, 15 Nov 2024 23:19:10 +0000 (16:19 -0700)]
bootstd: Add a function to get bootstd only if available
Provide a function which is safe to call in the 'unbind' path, which
returns the bootstd priv data if available.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Fri, 15 Nov 2024 23:19:09 +0000 (16:19 -0700)]
bootstd: Move bootflow-clearing to bootstd
This relates to more than just the bootdev, since there is a global list
of bootflows. Move the function to the bootstd file and rename it.
Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Simon Glass [Fri, 15 Nov 2024 23:19:08 +0000 (16:19 -0700)]
bootstd: Move bootflow-adding to bootstd
This relates to more than just the bootdev, since there is a global list
of bootflows. Move the function to the bootstd file and rename it.
Signed-off-by: Simon Glass <sjg@chromium.org>
Tom Rini [Tue, 14 Jan 2025 21:51:47 +0000 (15:51 -0600)]
Merge patch series "Add fdt-fixups for AM62P variants"
Aparna Patra <a-patra@ti.com> says:
This series implements fdt fixups, by reading hardware
information from registers and accordingly delete/modify
the DT nodes, at run-time.
Logs for AM62P boot:
https://gist.github.com/itsme-aparna/
b889fe59882c1acf0ef25a644bd325c4
Link: https://lore.kernel.org/r/20250108044939.392785-1-a-patra@ti.com
Aparna Patra [Wed, 8 Jan 2025 04:49:39 +0000 (10:19 +0530)]
arm: mach-k3: am62p: Set a53 cpu freq based on speed-grade
The maximum frequency of the A53 CPU on the AM62P depends on the speed
grade of the SoC. This value is hardcoded in the DT for all AM62P
variants, potentially causing specifications to be exceeded. Moreover,
setting a common lower frequency for all variants increases boot time.
To prevent these issues, modify the DT at runtime from the R5 core to
adjust the A53 CPU frequency.
Signed-off-by: Aparna Patra <a-patra@ti.com>
Reviewed-by: Bryan Brattlof <bb@ti.com>
Aparna Patra [Wed, 8 Jan 2025 04:49:38 +0000 (10:19 +0530)]
arm: mach-k3: am62p: Fixup a53 max cpu frequency by speed-grade
AM62P SoC has multiple speed grades. Add function to delete
non-relevant CPU frequency nodes, based on the information
retrieved from hardware registers. Fastest grade's maximum
frequency also depends on PMIC voltage, hence to simplify
implementation use the smaller value.
Signed-off-by: Aparna Patra <a-patra@ti.com>
Reviewed-by: Bryan Brattlof <bb@ti.com>
Aparna Patra [Wed, 8 Jan 2025 04:49:37 +0000 (10:19 +0530)]
arm: mach-k3: am62p: Fixup thermal zone critical points
Read the max temperature for the SoC temperature grade from the hardware
and modify the critical trip nodes on each thermal zone of FDT at
runtime so they are correct with the hardware value for its grade.
Signed-off-by: Aparna Patra <a-patra@ti.com>
Reviewed-by: Bryan Brattlof <bb@ti.com>
Aparna Patra [Wed, 8 Jan 2025 04:49:36 +0000 (10:19 +0530)]
arm: mach-k3: am62p: Fixup CPU core, CAN-FD and Video-codec nodes in fdt
AM62P SOC is available in multiple variants:
-CPU cores (Cortex-A) AM62Px1 (1 core),
AM62Px2 (2 cores), AM62Px4 (4 cores)
-With and without CAN-FD & Video-codec support
Remove the relevant FDT nodes by reading the actual configuration
from the SoC registers, with that change it is possible to have a single
dts/dtb file handling the different variant at runtime.
Signed-off-by: Aparna Patra <a-patra@ti.com>
Reviewed-by: Bryan Brattlof <bb@ti.com>
Tom Rini [Tue, 14 Jan 2025 21:49:41 +0000 (15:49 -0600)]
Merge patch series "Inline ECC Series"
Santhosh Kumar K <s-k6@ti.com> says:
Hello,
This series adds support for Inline ECC in DDR for AM64X, AM62X,
AM62AX, AM62PX, J721E, J721S2, J722S and J784S4 devices.
Test Results: https://gist.github.com/santhosh21/
88de920771ed2efa0463a5a367cb8d7b
Link: https://lore.kernel.org/r/20250106090708.1541212-1-s-k6@ti.com
Santhosh Kumar K [Mon, 6 Jan 2025 09:07:08 +0000 (14:37 +0530)]
board: ti: Pull redundant DDR functions to a common location and Fixup DDR size when ECC is enabled
As there are few redundant functions in board/ti/*/evm.c files, pull
them to a common location of access to reuse and include the common file
to access the functions.
Call k3-ddrss driver through fixup_ddr_driver_for_ecc() to fixup the
device tree and resize the available amount of DDR, if ECC is enabled.
Otherwise, fixup the device tree using the regular
fdt_fixup_memory_banks().
Also call dram_init_banksize() after every call to
fixup_ddr_driver_for_ecc() is made so that gd->bd is populated
correctly.
Ensure that fixup_ddr_driver_for_ecc() is agnostic to the number of DDR
controllers present.
Signed-off-by: Santhosh Kumar K <s-k6@ti.com>
Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
Reviewed-by: Wadim Egorov <w.egorov@phytec.de>
Neha Malcom Francis [Mon, 6 Jan 2025 09:07:07 +0000 (14:37 +0530)]
arm: mach-k3: Set NR_DRAM_BANKS to 2
Set CONFIG_NR_DRAM_BANKS to 2 as we have two banks described in the
memory/ node for lower and higher addressible DDR regions.
This allows use of FDT functions from fdt_support.c to set up and fix up
the memory/ node correctly.
Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
Signed-off-by: Santhosh Kumar K <s-k6@ti.com>
Santhosh Kumar K [Mon, 6 Jan 2025 09:07:06 +0000 (14:37 +0530)]
ram: k3-ddrss: Remove 'ti,ecc-enable' support
The functionality of enabling Inline ECC is now controlled by
CONFIG_K3_INLINE_ECC. So, remove the support for 'ti,ecc-enable'
property to avoid redundancy and to ensure the Inline ECC feature is
mananged through build-time config.
Signed-off-by: Santhosh Kumar K <s-k6@ti.com>
Reviewed-by: Wadim Egorov <w.egorov@phytec.de>
Neha Malcom Francis [Mon, 6 Jan 2025 09:07:05 +0000 (14:37 +0530)]
drivers: ram: Kconfig: Add CONFIG_K3_INLINE_ECC
Add CONFIG_K3_INLINE_ECC so that ECC functions can be compiled into R5 SPL
only when the config has been enabled.
Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
Signed-off-by: Santhosh Kumar K <s-k6@ti.com>
Reviewed-by: Wadim Egorov <w.egorov@phytec.de>
Santhosh Kumar K [Mon, 6 Jan 2025 09:07:04 +0000 (14:37 +0530)]
ram: k3-ddrss: Enable ECC interrupts
Enable ECC 1-bit error, 2-bit error, multiple 1-bit error interrupts
by setting the respective bits in the DDRSS_V2A_INT_SET_REG register.
Signed-off-by: Santhosh Kumar K <s-k6@ti.com>
Santhosh Kumar K [Mon, 6 Jan 2025 09:07:03 +0000 (14:37 +0530)]
ram: k3-ddrss: Setup ECC region start and range
Setup the ECC region's start and range using the device private data,
ddrss->ddr_bank_base[0] and ddrss->ddr_ram_size. Also, move start and
range of ECC regions from 32 bits to 64 bits to accommodate for
DDR greater than or equal to 4GB.
Signed-off-by: Santhosh Kumar K <s-k6@ti.com>
Santhosh Kumar K [Mon, 6 Jan 2025 09:07:02 +0000 (14:37 +0530)]
ram: k3-ddrss: Add k3_ddrss_ddr_bank_base_size_calc() to solve 'calculations restricted to 32 bits' issue
As R5 is a 32 bit processor, the RAM banks' base and size calculation
is restricted to 32 bits, which results in wrong values if bank's base
is greater than 32 bits or bank's size is greater than or equal to 4GB.
So, add k3_ddrss_ddr_bank_base_size_calc() to get the base address and
size of RAM's banks from the device tree memory node, and store in a
64 bit device private data which can be used for ECC reserved memory
calculation, Setting ECC range and Fixing up bank size in device tree
when ECC is enabled.
Signed-off-by: Santhosh Kumar K <s-k6@ti.com>
Reviewed-by: Wadim Egorov <w.egorov@phytec.de>
Georgi Vlaev [Mon, 6 Jan 2025 09:07:01 +0000 (14:37 +0530)]
ram: k3-ddrss: Use the DDR controller BIST engine for ECC priming
The 1-bit inline ECC support in TI's DDRSS bridge requires
the configured memory regions to be preloaded with a pattern
before use. This is done by the k3-ddrss driver from the
R5 SPL in a 'for' loop. It takes around 10 seconds to fill
2GB of memory, for example. Memset can cut the time in half
and using DMA currently yields a similar result.
The BIST engine of DDR controller provides support for
initializing any memory region with a pattern. This
bypasses the DDRSS bridge, so the required inline ECC
data is not computed and populated in the memory. For
some values like zero, the computed ECC syndrome is also
zero and we can use these values to preload the memory
from the DDR controller, without the assistance of the
bridge.
The registers involved in the process are described in the
'DDR controller registers' topic in [1] AM62 and [2] J721E
reference manuals.
The patch replaces the 'for' loop memory fill function with
the BIST memory initialization procedure. This cuts the time
to preload the 2GB memory from 10 seconds down to 1 second.
The bist preload function uses the lpddr4 APIs in the k3-ddrss,
so this is compatible with devices with both 16-bit LPDDR4 and
32-bit LPDDR4 interfaces (e.g J721E).
[1] AM62x: https://www.ti.com/lit/pdf/spruiv7
[2] DRA829/TDA4VM: https://www.ti.com/lit/zip/spruil1
Signed-off-by: Georgi Vlaev <g-vlaev@ti.com>
Signed-off-by: Santhosh Kumar K <s-k6@ti.com>
Santhosh Kumar K [Mon, 6 Jan 2025 09:07:00 +0000 (14:37 +0530)]
arm: dts: k3-*-ddr: Add ss_cfg reg entry
Add ss_cfg memory region which maps the DDRSS configuration region
for the memory controller node.
Signed-off-by: Santhosh Kumar K <s-k6@ti.com>
Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
Tested-by: Neha Malcom Francis <n-francis@ti.com>
Tom Rini [Tue, 14 Jan 2025 21:43:07 +0000 (15:43 -0600)]
Merge patch series "fdt_support: improve board_fdt_chosen_bootargs() for flexibility"
Dmitry Rokosov <ddrokosov@salutedevices.com> says:
This series consists of three patches.
The first patch modifies the function documentation style in the
include/fdt_support.h file to comply with kernel-doc requirements.
The second patch modifies the board_fdt_chosen_bootargs() function to
return a const char* type. This change clarifies to the caller that the
returned string should neither be freed nor modified. It aligns with the
existing fdt_setprop() function, which already utilizes a const char*
parameter. This promotes consistency within the codebase and enhances
code safety by preventing unintended modifications to the returned
string.
The third patch addresses the need for flexibility in providing kernel
command line arguments (bootargs) for different kernel images within the
same U-Boot environment. It introduces a read-only (RO) fdt_property
argument to the board_fdt_chosen_bootargs() function, allowing access to
the original chosen/bootargs data. This is crucial for scenarios where
different kernel versions require distinct console setups (e.g., ttyS0
for vendor kernels and ttyAML0 for upstream kernels). By enabling board
developers to either merge or replace the original bootargs, this
patch enhances the configurability of U-Boot for various kernel
images without relying on outdated configurations like CMDLINE_EXTEND.
CI/CD results: https://github.com/u-boot/u-boot/pull/716/checks
Link: https://lore.kernel.org/r/20241220-board_fdt_chosen_bootargs_improvements-v1-0-f6a7181787c5@salutedevices.com
Dmitry Rokosov [Thu, 19 Dec 2024 21:42:10 +0000 (00:42 +0300)]
common: fdt: hand over original fdt bootargs into board chosen handler
Sometimes, it is necessary to provide an additional bootargs string to
the kernel command line.
We have a real scenario where one U-Boot blob needs to boot several
kernel images: the vendor-patched kernel image and the latest upstream
kernel image. The Amlogic (Meson architecture) tty driver has different
tty suffixes in these kernels: the vendor uses 'ttySx', while the
upstream implementation uses 'ttyAMLx'. The initial console setup is
provided to the kernel using the kernel command line (bootargs). For the
vendor kernel, we should use 'console=ttyS0,115200', while for the
upstream kernel, it must be 'console=ttyAML0,115200'. This means we have
to use different command line strings depending on the kernel version.
To resolve this issue, we cannot use the CMDLINE_EXTEND kernel
configuration because it is considered legacy and is not supported for
the arm64 architecture. CMDLINE_EXTEND is outdated primarily because we
can provide additional command line strings through the
'chosen/bootargs' FDT node. However, U-Boot uses this node to inject the
U-Boot bootargs environment variable content, which results in U-Boot
silently overriding all data in the 'chosen/bootargs' node. While we do
have the board_fdt_chosen_bootargs() board hook to address such issues,
this function lacks any FDT context, such as the original value of the
'chosen/bootargs' node.
This patch introduces a read-only (RO) fdt_property argument to
board_fdt_chosen_bootargs() to share the original 'chosen/bootargs' data
with the board code. Consequently, the board developer can decide how to
handle this information for their board setup: whether to drop it or
merge it with the bootargs environment.
Signed-off-by: Dmitry Rokosov <ddrokosov@salutedevices.com>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Dmitry Rokosov [Thu, 19 Dec 2024 21:42:09 +0000 (00:42 +0300)]
fdt_support: board_fdt_chosen_bootargs() should return const char*
It should be structured this way to demonstrate to the caller that
freeing the return value is unnecessary and that the caller cannot
modify it.
The function fdt_setprop() includes a parameter with a const char*
prototype, so it is better to use the const qualifier.
Signed-off-by: Dmitry Rokosov <ddrokosov@salutedevices.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Dmitry Rokosov [Thu, 19 Dec 2024 21:42:08 +0000 (00:42 +0300)]
include/fdt_support: fix docstyle to comply with kernel-doc requirements
No errors from kernel-doc with this patch applied:
$ ./scripts/kernel-doc -v -none include/fdt_support.h
include/fdt_support.h:17: info: Scanning doc for arch_fixup_fdt
include/fdt_support.h:37: info: Scanning doc for fdt_root
include/fdt_support.h:48: info: Scanning doc for fdt_chosen
include/fdt_support.h:59: info: Scanning doc for fdt_initrd
include/fdt_support.h:100: info: Scanning doc for fdt_fixup_memory
include/fdt_support.h:115: info: Scanning doc for fdt_fixup_memory_banks
include/fdt_support.h:148: info: Scanning doc for fdt_fixup_display
include/fdt_support.h:176: info: Scanning doc for fdt_record_loadable
include/fdt_support.h:205: info: Scanning doc for ft_board_setup
include/fdt_support.h:218: info: Scanning doc for board_rng_seed
include/fdt_support.h:231: info: Scanning doc for board_fdt_chosen_bootargs
include/fdt_support.h:251: info: Scanning doc for ft_system_setup
include/fdt_support.h:266: info: Scanning doc for fdt_shrink_to_minimum
include/fdt_support.h:301: info: Scanning doc for fdt_copy_fixed_partitions
include/fdt_support.h:314: info: Scanning doc for fdt_translate_address
include/fdt_support.h:327: info: Scanning doc for fdt_translate_dma_address
include/fdt_support.h:342: info: Scanning doc for fdt_get_dma_range
include/fdt_support.h:464: info: Scanning doc for fdt_get_cells_len
include/fdt_support.h:480: info: Scanning doc for fdtdec_get_child_count
include/fdt_support.h:500: info: Scanning doc for fdt_kaslrseed
Signed-off-by: Dmitry Rokosov <ddrokosov@salutedevices.com>
Acked-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Tom Rini [Tue, 17 Dec 2024 16:22:15 +0000 (10:22 -0600)]
chromebook_coral: Move CONFIG_BLOBLIST_ADDR to CAR
Reading doc/board/google/chromebook_coral.rst we can see that at some
point it was intended to put the bloblist in CAR, rather than DRAM, at
some point during development. This is fine for TPL/SPL stages where we
have very minimal information stored in the bloblist and so we can set
the limit there to 4KiB and then expand it to 196KiB in U-Boot proper so
there's room for ACPI tables and so forth. We also update the
documentation to use the same location for CONFIG_BLOBLIST_ADDR in both
references.
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Tue, 14 Jan 2025 20:29:49 +0000 (14:29 -0600)]
Merge patch series "SMBIOS improvements"
Raymond Mao <raymond.mao@linaro.org> says:
Motivations for changes:
Current SMBIOS library and command-line tool is not fully matching with
the requirements:
1. Missing support for other mandatory types (#7, #9, #16, #17, #19).
2. Only a few platforms support SMBIOS node from the device tree.
3. Values of some fields are hardcoded in the library other than fetching
from the device hardware.
4. Embedded data with dynamic length is not supported (E.g. Contained
Object Handles in Type #2 and Contained Elements in Type #3)
Changes:
1. Refactor the SMBIOS library and command-line tool to better align with
the SMBIOS spec.
2. Create an arch-specific driver for all aarch64-based platforms to fetch
SMBIOS private data from the device hardware (processor and cache).
3. Create a sysinfo driver to poppulate platform SMBIOS private data.
4. Add generic SMBIOS DTS file for arm64 platforms for those common strings
and values which cannot be retrieved from the system registers.
Vendors can create their own SMBIOS node using this as an example.
For those boards without SMBIOS nodes, this DTS file can be included to
have a generic SMBIOS information of the system.
5. Add support for Type #7 (Cache Information) and link its handles to
Type #4.
6. To minimize size-growth for those platforms which have not sufficient
ROM spaces or the platforms which don't need detailed SMBIOS
information, new added fields are only being built when kconfig
GENERATE_SMBIOS_TABLE_VERBOSE is selected.
Once this patch is acceptted, subsequent patch sets will add other missing
types (#9, #16, #17, #19).
Tests:
To test this with QEMU arm64, please follow the guide on dt_qemu.rst to
get a merged DT to run with.
```
qemu-system-aarch64 -machine virt -machine dumpdtb=qemu.dtb
cat <(dtc -I dtb qemu.dtb) <(dtc -I dtb ./dts/dt.dtb | grep -v /dts-v1/) \
| dtc - -o merged.dtb
qemu-system-aarch64 -machine virt -nographic -bios u-boot.bin \
-dtb merged.dtb
```
Link: https://lore.kernel.org/r/20241206225438.13866-1-raymond.mao@linaro.org
Raymond Mao [Fri, 6 Dec 2024 22:54:27 +0000 (14:54 -0800)]
configs: Enable sysinfo for QEMU Arm64
Enable sysinfo smbios by default for arm64.
When SYSINFO_SMBIOS is enabled, disable QFW_SMBIOS.
Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Raymond Mao [Fri, 6 Dec 2024 22:54:26 +0000 (14:54 -0800)]
cmd: update smbios cmd
Update the cmd according to the changes of the smbios library:
1. Refactor smbios cmd print functions to match the content defined
by the specification.
2. Add new print functions for Type 3, 4 and 7.
3. Remove the fallback string "Not specified" from smbios_get_string,
as the spec requires a NULL output for those undefined strings.
4. Update the test_cmd_smbios_sandbox pytest expected result to
align with the smbios library changes and add new pytest
test_cmd_smbios_sysinfo_verbose to test the verbose smbios
output.
Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
Raymond Mao [Fri, 6 Dec 2024 22:54:25 +0000 (14:54 -0800)]
armv8: Add generic smbios information into the device tree
Add common smbios information that can be used by all armv8
platforms and set it as default for qemu-arm64.
>From now smbios library can load values from here for those fields
doesn't exist in the sysinfo driver.
To run this with QEMU arm64, we need to dump the generated DTB
from QEMU first, merge it with the one we build and then re-run
QEMU with the merged DTB.
```
qemu-system-aarch64 -machine virt -machine dumpdtb=qemu.dtb
cat <(dtc -I dtb qemu.dtb) <(dtc -I dtb ./dts/dt.dtb | \
grep -v /dts-v1/) | dtc - -o merged.dtb
qemu-system-aarch64 -machine virt -nographic -bios u-boot.bin \
-dtb merged.dtb
```
For details please take reference on dt_qemu.rst
Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
Raymond Mao [Fri, 6 Dec 2024 22:54:24 +0000 (14:54 -0800)]
armv8: Add arch-specific sysinfo platform driver
Add sysinfo platform driver for all armv8 platforms to retrieve
hardware information on processor and cache.
Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Raymond Mao [Fri, 6 Dec 2024 22:54:23 +0000 (14:54 -0800)]
smbios: add detailed smbios information
Add detailed SMBIOS information as following:
1. Missing fields in Type #3 and #4
2. Type #7
Add support to dynamic length of contained object handles and
elements.
As SMBIOS is a fundamental feature which is enabled for all
boards, in order to avoid increasing rom size, all detailed SMBIOS
information is under kconfig GENERATE_SMBIOS_TABLE_VERBOSE.
Board maintainers can determine whether to select this feature.
Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
Raymond Mao [Fri, 6 Dec 2024 22:54:22 +0000 (14:54 -0800)]
smbios: Refactor smbios library
Current smbios library does not fully match to the specification.
It hardcodes values instead of exposing values from the device.
It does not reserve the space to support dynamic length for
contained object handles or elements and misses the handling of
a few of fields.
The refactoring of this patch includes:
1. Expose values from device via sysinfo interface.
2. Replace smbios_add_prop with smbios_add_prop_si to allow getting
string values from sysinfo.
3. Add smbios_get_val_si to get values from sysinfo or device tree.
4. Use sysinfo_get_data to get data area.
5. Reserve the space of contained object handles and elements.
6. Miscellaneous fixes in smbios.
Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
Raymond Mao [Fri, 6 Dec 2024 22:54:21 +0000 (14:54 -0800)]
sysinfo: Add sysinfo driver and data structure for smbios
Add sysinfo driver to retrieve smbios information (Type 4 and 7).
So that the smbios library can use it for getting values from the
hardware platform instead of device tree.
Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
Raymond Mao [Fri, 6 Dec 2024 22:54:20 +0000 (14:54 -0800)]
test/dm: add sandbox test for sysinfo_get_data
Adding sysinfo_get_data into sandbox ut test dm_test_sysinfo.
Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
Raymond Mao [Fri, 6 Dec 2024 22:54:19 +0000 (14:54 -0800)]
sysinfo: Add sysinfo API for accessing data area
Add interface for sysinfo to access a data area from the platform.
This is useful to save/read a memory region of platform-specific
data.
Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
Raymond Mao [Fri, 6 Dec 2024 22:54:18 +0000 (14:54 -0800)]
smbios: Refactor the smbios headfile
Move the smbios field definitions to a separated simple headfile,
which is a prerequisite to be included by dts files.
Add new definitions for cache information.
This patch also includes a few of code optimizations in smbios.
Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
Acked-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Tom Rini [Tue, 14 Jan 2025 17:43:01 +0000 (11:43 -0600)]
Merge patch series "Adjust how autoprobe is implemented"
Simon Glass <sjg@chromium.org> says:
This little series makes a minor change to how autoprobe is
implemented, as discussed on the list.
Link: https://lore.kernel.org/r/20240626235717.272219-1-marex@denx.de
Link: https://lore.kernel.org/r/20241120153642.861633-1-sjg@chromium.org
Simon Glass [Wed, 20 Nov 2024 15:36:41 +0000 (08:36 -0700)]
common: Move autoprobe out to board init
Rather than doing autoprobe within the driver model code, move it out to
the board-init code. This makes it clear that it is a separate step from
binding devices.
For now this is always done twice, before and after relocation, but we
should discuss whether it might be possible to drop the post-relocation
probe.
For boards with SPL, the autoprobe is still done there as well.
Note that with this change, autoprobe happens after the
EVT_DM_POST_INIT_R/F events are sent, rather than before.
Link: https://lore.kernel.org/u-boot/20240626235717.272219-1-marex@denx.de/
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Wed, 20 Nov 2024 15:36:40 +0000 (08:36 -0700)]
dm: core: Simplify dm_probe_devices()
There is no point in checking the pre_reloc flag, since devices not
marked as pre-reloc will not have been bound, so won't exist yet.
There doesn't seem to be any point in checking if the device has a
valid devicetree node either, so drop that too.
Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass [Wed, 20 Nov 2024 15:36:39 +0000 (08:36 -0700)]
common: Drop check for DM in initf_dm()
This is enabled by all boards, so drop the condition.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Tom Rini [Tue, 14 Jan 2025 15:36:06 +0000 (09:36 -0600)]
Merge tag 'xilinx-for-v2025.04-rc1-v2' of https://source.denx.de/u-boot/custodians/u-boot-microblaze
AMD/Xilinx changes for v2025.04-rc1 v2
Versal:
- Enable dfu support for SPI with multiboot
ZynqMP:
- Align multiboot reg description
- DT syncups
- Wire missing DTs in defconfig
- Kria: Remove usb hub initialization via commands
- Kria: Update DP reset in psu_init
AMD/Xilinx:
- Enable SPI_STACKED_PARALLEL configs
SPI/ZYNQMP_GQSPI:
- Update debug message to use log_debug()
RTC:
- Enable ZYNQMP_RTC for Versal SOCs
Tom Rini [Tue, 14 Jan 2025 15:35:43 +0000 (09:35 -0600)]
Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-pmic
Vincent Fazio [Tue, 14 Jan 2025 13:58:12 +0000 (07:58 -0600)]
rtc: zynqmp: allow on Versal architectures
Allow the ZyncMP RTC driver to be enabled on Versal architectures.
Also, require DM_RTC since the driver uses the RTC driver model.
Signed-off-by: Vincent Fazio <vfazio@xes-inc.com>
Link: https://lore.kernel.org/r/20250114135812.2605618-1-vfazio@xes-inc.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
Ibai Erkiaga [Tue, 7 Jan 2025 14:51:08 +0000 (14:51 +0000)]
zynqmp_gqspi: update to log_debug
Update recent parallel memory support code to move to log_debug instead
of debug as per logging in U-Boot documentation
Signed-off-by: Ibai Erkiaga <ibai.erkiaga-elorza@amd.com>
Link: https://lore.kernel.org/r/20250107145110.2855213-1-ibai.erkiaga-elorza@amd.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
Venkatesh Yadav Abbarapu [Mon, 6 Jan 2025 09:06:30 +0000 (14:36 +0530)]
board: xilinx: Add missing prototype for set_dfu_alt_info
Add missing prototype to fix the sparse warning,
warning: no previous prototype for 'set_dfu_alt_info'
[-Wmissing-prototypes].
Signed-off-by: Venkatesh Yadav Abbarapu <venkatesh.abbarapu@amd.com>
Link: https://lore.kernel.org/r/20250106090630.209938-1-venkatesh.abbarapu@amd.com
Signed-off-by: Michal Simek <michal.simek@amd.com>