Mark Tomlinson [Mon, 20 Jan 2025 01:59:41 +0000 (14:59 +1300)]
drivers: rtc: max313xx: Ensure correct date is read after setting
When setting the time on the MAX31343, the time is not updated
for one second, and reading the time in this interval will give
the old time. Wait one second after writing so that the date
command will show the correct time when setting the clock.
Signed-off-by: Mark Tomlinson <mark.tomlinson@alliedtelesis.co.nz>
Cc: Chris Packham <judge.packham@gmail.com>
Reviewed-by: Chris Packham <judge.packham@gmail.com>
Mark Tomlinson [Mon, 20 Jan 2025 01:59:40 +0000 (14:59 +1300)]
drivers: rtc: max313xx: Fix setting years 2100-2199
An invalid calculation made setting years 2100-2199 impossible.
Signed-off-by: Mark Tomlinson <mark.tomlinson@alliedtelesis.co.nz>
Cc: Chris Packham <judge.packham@gmail.com>
Reviewed-by: Chris Packham <judge.packham@gmail.com>
Udit Kumar [Mon, 13 Jan 2025 04:25:24 +0000 (09:55 +0530)]
arch: arm: mach-k3: Delete tifs node in DT fixup
Delete tifs DT node as part of fixup.
TISCI API reported msmc_size, does not include 64KB reserved size for
tifs aka MSMC comms memory, see documentation[0].
As part of fixup, original code uses TISCI API reported msmc_size as
size for SRAM DT node.
tifs node is similar to l3-cache, which should hold address above
msmc_size, and should be deleted before passing control to OS.
[0] https://software-dl.ti.com/tisci/esd/latest/2_tisci_msgs/general/core.html?highlight=msmc#tisci-msg-query-msmc
Reviewed-by: Neha Malcom Francis <n-francis@ti.com>
Signed-off-by: Udit Kumar <u-kumar1@ti.com>
Beleswar Padhi [Wed, 8 Jan 2025 10:25:16 +0000 (15:55 +0530)]
board: ti: j722s: j722s.env: Set remoteproc firmware names
Include k3_rproc.env to access rproc boot commands and specify rproc
firmware names for adding remoteproc support in J722S SoCs.
Signed-off-by: Beleswar Padhi <b-padhi@ti.com>
Reviewed-by: Bryan Brattlof <bb@ti.com>
Jayesh Choudhary [Mon, 6 Jan 2025 10:04:00 +0000 (15:34 +0530)]
arch: arm: mach-k3: j784s4_init: Set CTRL_MMR for AUDIO_REFCLK1 clk_sel
The default value for the mux to select the parent clock,
AUDIO_REFCLK1_CTRL_CLK_SEL is '11111' (31) but the mux input for 31
is marked as 'Reserved' so the ti-sci-clk call for get-parent fails.
Mark it to a valid value, '11100' (28) for MAIN_PLL4_HSDIV2_CLKOUT
to get rid of the linux failures during boot-time like:
"[ 1.573193] ti-sci-clk
44083000.system-controller:clock-controller:
get-parent failed for dev=157, clk=34, ret=-19"
Signed-off-by: Jayesh Choudhary <j-choudhary@ti.com>
Heinrich Schuchardt [Sat, 4 Jan 2025 00:34:02 +0000 (01:34 +0100)]
fs: eliminate YAFFS2 implementation
Upstream development stopped 2012.
Linux eliminated YAFFS2 in 2010.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Tom Rini [Sat, 18 Jan 2025 23:13:01 +0000 (17:13 -0600)]
Merge patch series "add the support of sha256_hmac and sha256_hkdf"
Philippe Reynes <philippe.reynes@softathome.com> says:
This serie adds the support of sha256_hmac and sha256_hkdf.
A first version was sent several months ago just before the
integration of mbedtls. This new version is based on mbedtls.
The first patch of this serie add the support of hkdf
using mbedtls.
Link: https://lore.kernel.org/r/20241219130554.49825-1-philippe.reynes@softathome.com
Philippe Reynes [Thu, 19 Dec 2024 13:05:54 +0000 (14:05 +0100)]
configs: sandbox: enable mbedtls
Enable mbedtls to have at least one config with
mbedtls enabled.
Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
Philippe Reynes [Thu, 19 Dec 2024 13:05:53 +0000 (14:05 +0100)]
test: lib: add test for key derivation
Adds a test for the function sha256_hkdf.
Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
Reviewed-by: Raymond Mao <raymond.mao@linaro.org>
Philippe Reynes [Thu, 19 Dec 2024 13:05:52 +0000 (14:05 +0100)]
lib: mbedtls: sha256: add support of key derivation
Adds the support of key derivation using the scheme hkdf.
This scheme is defined in rfc5869.
Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
Reviewed-by: Raymond Mao <raymond.mao@linaro.org>
Philippe Reynes [Thu, 19 Dec 2024 13:05:51 +0000 (14:05 +0100)]
test: lib: add test for sha256_hmac
Adds a test for the function sha256_hmac
Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
Reviewed-by: Raymond Mao <raymond.mao@linaro.org>
Philippe Reynes [Thu, 19 Dec 2024 13:05:50 +0000 (14:05 +0100)]
lib: sha256: add feature sha256_hmac
Adds the support of the hmac based on sha256.
This implementation is based on rfc2104.
Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
Reviewed-by: Raymond Mao <raymond.mao@linaro.org>
Philippe Reynes [Thu, 19 Dec 2024 13:05:49 +0000 (14:05 +0100)]
lib: sha256: move common function to sha256_common.c
The function sha256_csum_wd is defined in lib/sha256.c
and in lib/mbedtls/sha256.c. To avoid duplicating this
function (and future function), we move this function
to the file lib/sha256_common.c
Reviewed-by: Raymond Mao <raymond.mao@linaro.org>
Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
Philippe Reynes [Thu, 19 Dec 2024 13:05:48 +0000 (14:05 +0100)]
mbedtls: enable support of hkdf
Adds the support of key derivation using
the scheme hkdf.
Reviewed-by: Raymond Mao <raymond.mao@linaro.org>
Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
Philippe Reynes [Thu, 19 Dec 2024 13:05:47 +0000 (14:05 +0100)]
tools: renesas_spkgimage.h: use linux/compiler_attributes.h
The attribute __packed was defined in the file
tools/renesas_spkgimage.h but this attribute is
already defined in linux/compiler_attributes.h.
So we include <linux/compiler_attributes.h.h>
and do not define __packed.
Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
Philippe Reynes [Thu, 19 Dec 2024 13:05:46 +0000 (14:05 +0100)]
tools: kwbimage.h: use linux/compiler_attributes.h
The attribute __packed was defined in the file
tools/kwbimage.h but this attribute is already
defined in linux/compiler_attributes.h. So we
include <linux/compiler_attributes.h.h> and
do not define __packed.
Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
Tom Rini [Sat, 18 Jan 2025 16:46:23 +0000 (10:46 -0600)]
Merge tag 'efi-2025-04-rc1' of https://source.denx.de/u-boot/custodians/u-boot-efi
Pull request efi-2025-04-rc1
Documentation:
* Correct the defconfig name in the coolpi documentation
UEFI:
* Carve out the biggest part of the RISC-V and ARM linker scripts for EFI
binary into a common include.
* Correct the values of SizeOfCode and SizeOfInitializedData in generated
EFI binaries for RISC-V and ARM.
* Avoid gaps between sections in EFI binaries causing a failure in secure
boot.
* Makefile: let clean remove capsule_in.capsule*.efi-capsule
* Refactor some of the code used for launching EFI binaries.
Tom Rini [Sat, 21 Dec 2024 16:45:52 +0000 (10:45 -0600)]
Gitlab: Add DEFAULT_FAST_ARM64_TAG as well
Upon further consideration, we should have both DEFAULT_FAST_ARM64_TAG
and DEFAULT_ARM64_TAG values available. This will allow us to later run
a matrix of some jobs, such as sandbox, on any arm64 host and still keep
the world build to only fast arm64 hosts.
Signed-off-by: Tom Rini <trini@konsulko.com>
Norbert van Bolhuis [Tue, 24 Dec 2024 00:49:04 +0000 (01:49 +0100)]
squashfs: Fix sqfs_inode_size() for xattr related SQFS_LSYMLINK_TYPE
A squashfs filesystem with extended attributes (xattrs) may have
inodes of type SQFS_LSYMLINK_TYPE. This might cause u-boot to fail to
handle the filesystem since it assumes a SYMLINK_TYPE and LSYMLINK_TYPE
inode are the same size. This is wrong, see:
https://github.com/plougher/squashfs-tools/blob/master/squashfs-tools/read_fs.c#L421
Using the mksquashfs '-no-xattrs' argument is probably best, but the
mksquashfs '-xattrs' argument is the default.
This patch fixes squashfs image handling by making sure parsing the
uncompressed inode_table (with sqfs_find_inode) succeeeds. The only change
needed is correctly determining the size of a SQFS_LSYMLINK_TYPE inode.
Signed-off-by: Norbert van Bolhuis <nvbolhuis@gmail.com>
Tom Rini [Tue, 31 Dec 2024 23:54:12 +0000 (17:54 -0600)]
qconfig.py: Update resync message
When using qconfig.py to resync defconfig files and commit the result,
update it to say:
Resync all defconfig files using qconfig.py
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
Marek Vasut [Sun, 12 Jan 2025 22:32:38 +0000 (23:32 +0100)]
Makefile: Make sure all linker input objects exist
In case the build system builds a directory with empty Makefile,
one which does not contain any obj-y entries, the build fails to
link due to missing built-in.o .
This happens because of this part of scripts/Makefile.build
81 ifneq ($(strip $(obj-y) $(obj-m) $(obj-) $(subdir-m) $(lib-target)),)
82 builtin-target := $(obj)/built-in.o
83 endif
which does not assign builtin-target in case obj-y is empty. The
built-in target is then not built at all, and built-in.o is not
generated by this part of scripts/Makefile.build
325 ifdef builtin-target
326 quiet_cmd_link_o_target = AR $@
327 # If the list of objects to link is empty, just create an empty built-in.o
...
335 targets += $(builtin-target)
336 endif # builtin-target
This is the correct behavior.
The final link however expects the built-in.o to exist in every directory
included in the build, even in those where the aforementioned code skipped
generation of built-in.o . Make sure the built-in.o does exist for every
directory used in final link simply by doing touch on every built-in.o used
for the link, which will create empty built-in.o in case any built-in.o is
missing.
A possible alternative fix is the always define the builtin-target
and always generate built-in.o .
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Tested-by: Quentin Schulz <quentin.schulz@cherry.de>
Tom Rini [Sat, 18 Jan 2025 14:27:15 +0000 (08:27 -0600)]
Merge https://source.denx.de/u-boot/custodians/u-boot-sh
Marek Vasut [Sat, 18 Jan 2025 07:15:52 +0000 (08:15 +0100)]
arm64: dts: renesas: Deduplicate extalr_clk bootph-all
Most R-Car Gen3 and Gen4 systems require extalr_clk very early
in the boot process. Currently the extalr_clk { bootph-all } DT
property to indicate this clock should be available early is set
in each SoC U-Boot DT extras file. Deduplicate this assignment to
new common r8a779x-rcar64-u-boot.dtsi file.
Note that R-Car Gen3 R8A77990 E3 and R8A77995 D3 and RZ R8A774C0
do not require extalr_clk early, therefore these SoCs still include
plain r8a779x-u-boot.dtsi in their U-Boot DT extras .
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Marek Vasut [Sun, 12 Jan 2025 22:47:45 +0000 (23:47 +0100)]
arm64: renesas: Rewrite u-boot-elf.srec base address if PIE for R-Car Gen3
The flash_writer tool and previous recovery tools require the SREC load
address to be 0x5000_0000 . The PIE U-Boot build sets the address to 0x0
instead, so override the address back to make u-boot-elf.srec compatible
with the recovery tools.
Tested-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Simon Glass [Thu, 9 Jan 2025 15:02:39 +0000 (08:02 -0700)]
efi_loader: Make efi_run_image() static
This function is not called from outside this file and has no entry in
the header file, so mark it static.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Simon Glass [Thu, 9 Jan 2025 15:02:38 +0000 (08:02 -0700)]
efi_loader: Refactor device and image paths into a function
Move this code into a function so it can be called from elsewhere.
Note that the recently added network code uses the same
'global variable' approach. It could use a separate clean-up.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Heinrich Schuchardt [Thu, 16 Jan 2025 14:06:17 +0000 (15:06 +0100)]
Makefile: let clean remove capsule_in.capsule*.efi-capsule
Update the CLEAN_FILES list to remove capsule*.*.efi-capsule.
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: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>