aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2024-04-18board: cssi: Add support for SPI bus on MCR3000 boardChristophe Leroy
MCR3000 board has some components tied to the SPI bus, like the Texas Instruments LM74 temperature sensor. Add support for SPI bus. The SPI chipselects are a bit special in the way that they are driven by 3 bits in a register of the board's CPLD where the value writen in those bits exclusively activates one of the 7 possible chipselects and value 0 sets all chipselets to inactive. So add a special GPIO driver that simulates GPIOs for those chipselect. Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2024-04-18thermal: Add support for TI LM74Christophe Leroy
LM74 is a SPI temperature sensor. Implement a driver to read temperature from it. Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2024-04-18spi: mpc8xx: Fix transfert when input or output buffer is NULLChristophe Leroy
xfer ops can be passed a NULL input or output buffer. At the time being the driver ignores it and overwrites memory at 0. Define a dummy buffer and use it when either input or output buffer is NULL. Bail out when both are NULL as it shouldn't. Also increase MAX_BUFFER len to 32k as the current is pretty low. Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2024-04-18spi: mpc8xx: Add GPIO dependencyChristophe Leroy
Since commit 773ad4ebb1d6 ("spi, mpc8xx: Add support for chipselect via GPIO and fixups"), DM_GPIO is required for 8xx SPI. Add the missing dependency to avoid build failures. Fixes: 773ad4ebb1d6 ("spi, mpc8xx: Add support for chipselect via GPIO and fixups") Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2024-04-18board: cssi: Properly initialise MAC address for fibre on CMPC885 boardHugo Dubois
CMPC885 board can be pluged on a mother board with fibre interface, so fibre interface MAC address must be initialised for that case. Signed-off-by: Hugo Dubois <hugo.dubois.ext@csgroup.eu> Reviewed-by: CASAUBON Jean Michel <jean-michel.casaubon@csgroup.eu> Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2024-04-18board: cssi: Initialise port F on MIAEHugo Dubois
When equipped with the SRSA audio board, MIAE equipment has an additional port called port F. Initialise that port just like other ports of the board, so that it is already configured when starting Linux kernel. Signed-off-by: Hugo Dubois <hugo.dubois.ext@csgroup.eu> Reviewed-by: CASAUBON Jean Michel <jean-michel.casaubon@csgroup.eu> Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2024-04-18board: cssi: Allow use without HUSH shellJean-Michel CASAUBON
HUSH shell is not always wanted/desirable. Add missing braces in environment in order to allow use without HUSH shell. Signed-off-by: Jean-Michel CASAUBON <jean-michel.casaubon@csgroup.eu> Cc: DUBOIS Hugo <hugo.dubois.ext@csgroup.eu> Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2024-04-18board: cssi: Fix SPI nodes in DTSChristophe Leroy
When adding additional SPI peripherals, the reg property needs to be added, and this leads to the following error: arch/powerpc/dts/cmpc885.dtb: Warning (reg_format): /immr@ff000000/spi@aa0/temp@1:reg: property has invalid length (4 bytes) (#address-cells == 1, #size-cells == 1) arch/powerpc/dts/cmpc885.dtb: Warning (reg_format): /immr@ff000000/spi@aa0/temp@2:reg: property has invalid length (4 bytes) (#address-cells == 1, #size-cells == 1) Fix it by removing cell-index and cell-size which is unused and add reg property. Also fix node name to be in line with reg value. Also add missing compatible for eeprom node. Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2024-04-18board: cssi: Fix MCR3000 board environmentJean-Michel CASAUBON
Remove a stray semicolon in MCR3000 board environment. Signed-off-by: Jean-Michel CASAUBON <jean-michel.casaubon@csgroup.eu> Reviewed-by: DUBOIS Hugo <hugo.dubois.ext@csgroup.eu> Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2024-04-18tee: remove common.h inclusionIgor Opaniuk
The usage of the common.h include file is deprecated [1], and has already been removed from several files. Get rid of all inclusions in the "drivers/tee" directory, and replace it with required include files directly where needed. [1] doc/develop/codingstyle.rst Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Signed-off-by: Igor Opaniuk <igor.opaniuk@gmail.com> Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org> Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2024-04-18test: py: add optee_rpmb testsIgor Opaniuk
Add read/write tests for optee_rpmb cmd. Signed-off-by: Igor Opaniuk <igor.opaniuk@gmail.com> Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2024-04-18cmd: optee_rpmb: build cmd for sandboxIgor Opaniuk
Support CMD_OPTEE_RPMB for SANDBOX configurations. Test: $ ./u-boot -d arch/sandbox/dts/test.dtb ... => optee_rpmb write_pvalue test_variable test_value Wrote 11 bytes => optee_rpmb read_pvalue test_variable 11 Read 11 bytes, value = test_value Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Signed-off-by: Igor Opaniuk <igor.opaniuk@gmail.com> Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2024-04-18cmd: optee_rpmb: close tee sessionIgor Opaniuk
Close tee session after each optee_rpmb invocation, as there is no reason to keep it open, considering the absence of any available mechanism to clean up all open sessions automatically before handing over control to the Linux kernel. Without proper clean-up we might end up with orphaned sessions registered in OP-TEE OS core (obvious resource leak). Signed-off-by: Igor Opaniuk <igor.opaniuk@gmail.com> Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2024-04-18tee: optee: fix description in KconfigIgor Opaniuk
Fix OPTEE_TA_AVB symbol description in Kconfig: s/"write"rb"/"write_rb"/g Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Signed-off-by: Igor Opaniuk <igor.opaniuk@gmail.com> Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2024-04-18ARM: dts: renesas: Switch to using upstream DTMarek Vasut
Enable OF_UPSTREAM to use upstream DT and add renesas/ prefix to the DEFAULT_DEVICE_TREE and OF_LIST. And thereby directly build DTB from dts/upstream/src/ including *-u-boot.dtsi files from arch/$(ARCH)/dts/ directory. The configuration update has been done using the following script: ``` sed -i '/^CONFIG_DEFAULT_DEVICE_TREE/ s@="@&renesas/@' `git grep -li renesas configs` sed -i '/^CONFIG_OF_LIST/ s@r8a@renesas/&@g' `git grep -li renesas configs` ``` The RZN1 Snarc board does not seem to have a matching Linux kernel DT counterpart, this is currently not switched to OF upstream. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
2024-04-18ARM: dts: renesas: Switch to using upstream DT on 64bit Renesas SoCsMarek Vasut
Enable OF_UPSTREAM to use upstream DT and add renesas/ prefix to the DEFAULT_DEVICE_TREE and OF_LIST. And thereby directly build DTB from dts/upstream/src/ including *-u-boot.dtsi files from arch/$(ARCH)/dts/ directory. The configuration update has been done using the following script: ``` sed -i '/^CONFIG_DEFAULT_DEVICE_TREE/ s@="@&renesas/@' `git grep -li renesas configs` sed -i '/^CONFIG_OF_LIST/ s@r8a@renesas/&@g' `git grep -li renesas configs` ``` There are SoCs which are not included in this patch. The 32bit SoCs require further infrastructure work. R8A779H0 is coming during the next upstream DT synchronization cycle as it is not included in current upstream DTs yet. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Adam Ford <aford173@gmail.com> # Beacon boards Reviewed-by: Paul Barker <paul.barker.ct@bp.renesas.com> Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
2024-04-18ARM: dts: renesas: Replace R8A77950 with R8A77951Marek Vasut
R-Car R8A77950 H3 ES1.* was only available to an internal development group and needed a lot of quirks and workarounds. Public users only have R-Car R8A77950 H3 ES2 and newer. Switch existing systems to use R8A77951 device trees. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2024-04-18ARM: dts: renesas: Stop using the -u-boot DTs for buildMarek Vasut
The U-Boot build system can automatically paste -u-boot.dtsi at the end of matching .dts during build. Stop emulating this behavior and rename the -u-boot.dts files to -u-boot.dtsi, drop "#include...dts" from those new u-boot.dtsi files, and update board configuration accordingly. The rename, '#include...dts` scrubbing and configuration update has been done using the following script: ``` $ find . -name r[78]\*-u-boot.dts | sort -u | while read line ; do \ git mv ${line%-u-boot.dts}-u-boot.dts ${line%-u-boot.dts}-u-boot.dtsi ; \ done $ sed -i '/^#include.*dts"/ d' `find . -name r[78]\*-u-boot.dtsi` $ sed -i 's@-u-boot@@g' `git grep -li renesas configs` ``` The Salvator-X and ULCB board files have been updated manually. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Acked-by: Adam Ford <aford173@gmail.com>
2024-04-17sandbox: don't call os_close with invalid file descriptorHeinrich Schuchardt
If open() fails it returns -1. Calling close() with this value makes no sense. Return -EIO instead. Addresses-Coverity-ID: 185828 Improper use of negative value Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Fixes: 566bf3a8698 ("sandbox: Add a function to read a host file") Reviewed-by: Sean Anderson <seanga2@gmail.com>
2024-04-17arm: mach-k3: security: Lower verbosity of cert message for GPAndrew Davis
When we find a certificate on an image to be booted on a GP device we print out a message explaining that the certificate is being skipped. This message is rather long and is printed for every image. Shorten the message and make the long version into a debug message. Signed-off-by: Andrew Davis <afd@ti.com> Tested-by: Jonathan Humphreys <j-humphreys@ti.com>
2024-04-17configs: am64x_evm_*_defconfig: Increase offsets for eMMC raw bootJudith Mendez
EMMC boot can fail due to the size of R5 SPL image growing beyond the 500KB of memory allocated in eMMC. Update offsets for eMMMC raw boot to load each binary from the correct address in eMMC according to the following eMMC layout: boot0/1 partition 0x0+----------------------------------+ | tiboot3.bin (1 MB) | 0x800+----------------------------------+ | tispl.bin (2 MB) | 0x1800+-----------------------------------+ | u-boot.img (4 MB) | 0x3800+-----------------------------------+ | environment (128 KB) | 0x3900+-----------------------------------+ Signed-off-by: Judith Mendez <jm@ti.com>
2024-04-17configs: arbel: Use generic timer and npcm reset driverJim Liu
Modify defconfig to use generic timer and npcm reset driver Signed-off-by: Jim Liu <JJLIU0@nuvoton.com>
2024-04-17fs: fat: fill creation and change dateHeinrich Schuchardt
The FAT specification requires that the change date is set. If a DM RTC device exists, set the creation and change date to the current date when updating the directory entry. Otherwise use the date 2020-01-01. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2024-04-17fs: fat: convert change month correctlyHeinrich Schuchardt
The month is stored in 5 - 8. We need to shift it by 5 bits. Cf. Microsoft FAT Specification, 2005-08-30 Fixes: 13c11c665320 ("fs: fat: add file attributes to struct fs_dirent") Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Alexander Dahl <ada@thorsis.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2024-04-17tools: copyfile: use 64k instead of 512 bufferAhelenia Ziemiańska
This is a trivial but significant optimization: mkimage took >200ms (and 49489 writes (of which 49456 512)), now it takes 110ms (and 419 writes (of which 386 64k)). sendfile is much more appropriate for this and is done in one syscall, but doesn't bring any significant speedups over 64k r/w at the 13M size ranges, so there's no need to introduce #if __linux__ while((size = sendfile(fd_dst, fd_src, NULL, 128 * 1024 * 1024)) > 0) ; if(size != -1) { ret = 0; goto out; } #endif Also extract the buffer size to a macro. Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Reviewed-by: Dragan Simic <dsimic@manjaro.org>
2024-04-17test: typo currenHeinrich Schuchardt
Fix typos in test_eficonfig.py: %s/curren/current/ Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Igor Opaniuk <igor.opaniuk@gmail.com>
2024-04-17Makefile.lib: find capsule ESL dtsi file with CONFIG_OF_UPSTREAMJonathan Humphreys
When CONFIG_OF_UPSTREAM is enabled, DTS files are in SOC subdirectories (vs the top level dts directory), but when CONFIG_EFI_CAPSULE_AUTHENTICATE is enabled, the dynamically created dtsi file containing the capsule ESL DT node is in the parent directory. This results in a build failure because the #include inserted in the DTS file is local to the current directory. Update Makefile to have the DT preprocessing of #includes search in the parent (dts top level) directory too. Signed-off-by: Jonathan Humphreys <j-humphreys@ti.com>
2024-04-17Merge patch series "configs: ti: Enable basic settings for SystemReady ACS"Tom Rini
Jonathan Humphreys <j-humphreys@ti.com> says: Set basic settings needed for System Ready IR ACS testing, for several TI SoC based platforms: AM64, AM62, AM62p, BeaglePlay, J7, and BeagleboneAI. For AM64, AM62, and AM62p, also includes some config cleanup. Should be no functional change.
2024-04-17configs: beagleboneai64: Enable RTC emulationJonathan Humphreys
Signed-off-by: Jonathan Humphreys <j-humphreys@ti.com>
2024-04-17configs: beagleboneai64: Enable basic EFI CMD supportJonathan Humphreys
Signed-off-by: Jonathan Humphreys <j-humphreys@ti.com>
2024-04-17configs: am62x: Enable RTC emulationJonathan Humphreys
This is required to pass SystemReadyIR tests. Signed-off-by: Jonathan Humphreys <j-humphreys@ti.com>
2024-04-17configs: am62x: Enable basic EFI CMD supportJonathan Humphreys
This is required to pass SystemReadyIR tests. Signed-off-by: Jonathan Humphreys <j-humphreys@ti.com>
2024-04-17configs: am62x: cosmetic config cleanupJonathan Humphreys
Signed-off-by: Jonathan Humphreys <j-humphreys@ti.com>
2024-04-17configs: am62px: Enable RTC emulationJonathan Humphreys
This is required to pass SystemReadyIR tests. Signed-off-by: Jonathan Humphreys <j-humphreys@ti.com>
2024-04-17configs: am62px: Enable basic EFI CMD supportJonathan Humphreys
This is required to pass SystemReadyIR tests. Signed-off-by: Jonathan Humphreys <j-humphreys@ti.com>
2024-04-17configs: am62px: cosmetic config cleanupJonathan Humphreys
Signed-off-by: Jonathan Humphreys <j-humphreys@ti.com>
2024-04-17configs: beagleplay: Enable RTC emulationJonathan Humphreys
Signed-off-by: Jonathan Humphreys <j-humphreys@ti.com>
2024-04-17configs: beagleplay: Enable basic EFI CMD supportJonathan Humphreys
Signed-off-by: Jonathan Humphreys <j-humphreys@ti.com>
2024-04-17configs: j721e: Enable RTC emulationJonathan Humphreys
Signed-off-by: Jonathan Humphreys <j-humphreys@ti.com>
2024-04-17configs: j721e: Enable basic EFI CMD supportJonathan Humphreys
Signed-off-by: Jonathan Humphreys <j-humphreys@ti.com>
2024-04-17configs: am64x: Enable RTC emulationJonathan Humphreys
This is required to pass SystemReadyIR tests. Signed-off-by: Jonathan Humphreys <j-humphreys@ti.com>
2024-04-17configs: am64x: Enable basic EFI CMD supportJonathan Humphreys
This is required to pass SystemReadyIR tests. Signed-off-by: Jonathan Humphreys <j-humphreys@ti.com>
2024-04-17configs: am64x: cosmetic config cleanupJonathan Humphreys
Signed-off-by: Jonathan Humphreys <j-humphreys@ti.com>
2024-04-17Merge patch series "zfs: Fix zfs support on aarch64"Tom Rini
mwleeds@mailtundra.com <mwleeds@mailtundra.com> says: This patch series is needed to get U-Boot to boot from a ZFS filesystem on an aarch64 computer. Some of the patches are not architecture specific and would be needed to boot ZFS on other platforms as well. The ZFS support in U-Boot hasn't been substantively touched in several years and to me it seems like it must have been broken for a long time on all platforms, but I have only tested on aarch64. Since there doesn't seem to be a mantainer for this area who I can cc, I'm hoping these patches get seen and pulled in by a general U-Boot maintainer. [trini: Per Igor's comment and Phaedrus agreement, dropped his Tested-by on the patches themselves]
2024-04-17zfs: Fix zfs_read() to actually workmwleeds@mailtundra.com
Without this patch, the while loop being modified goes on infinitely, but with the patch I am able to boot linux on zfs on a jetson tx2 nx. It seems like this code was never tested because the logic is clearly wrong. The function do_div(a,b) does a division that modifies the first parameter to have a = a / b, and returns the remainder of the division. So clearly in the usual case when file->offset = 0, the line "blkid = do_div(blkid, blksz);" just results in blkid being set to zero on every iteration of the loop, rather than being incremented as blocks are read. Hence the zeroth block is read over and over and this becomes an infinite loop. So instead capture the remainder of the division in a "blkoff" variable, and use that to properly calculate the memory address to move from in memmove() below. For example, if file->offset were 1337, on the first iteration of the loop blkid would be 0 and blkoff would be 1337. If the blksz is 131072 (as it was for me), that amount of data would be copied into data->file_buf. movesize would be 131072 - 1337 = 129735 so 129735 bytes would be moved into buf. On the second iteration of the loop (assuming there is one), red would be 129735, blkid would be 1, blkoff would be 0, and 131072 bytes would be copied into buf. And so on... Signed-off-by: Phaedrus Leeds <mwleeds@mailtundra.com>
2024-04-17zfs: Fix return value of fs_devread()mwleeds@mailtundra.com
As evidenced by how other filesystems handle it, a return value of 0 from fs_devread() means failure; nonzero means success. The opposite assumption was being made in zfs.c for the use of zfs_devread() so fix the confusion by making zfs_devread() return 0 on success. It probably doesn't make sense to change the handling of zfs_devread() in zfs.c instead, because as it is it matches the semantics of the other functions there. Signed-off-by: Phaedrus Leeds <mwleeds@mailtundra.com>
2024-04-17zfs: Fix unaligned read of uint64mwleeds@mailtundra.com
Without this patch, when trying to boot zfs using U-Boot on a Jetson TX2 NX (which is aarch64), I get a CPU reset error like so: "Synchronous Abort" handler, esr 0x96000021 elr: 00000000800c9000 lr : 00000000800c8ffc (reloc) elr: 00000000fff77000 lr : 00000000fff76ffc x0 : 00000000ffb40f04 x1 : 0000000000000000 x2 : 000000000000000a x3 : 0000000003100000 x4 : 0000000003100000 x5 : 0000000000000034 x6 : 00000000fff9cc6e x7 : 000000000000000f x8 : 00000000ff7f84a0 x9 : 0000000000000008 x10: 00000000ffb40f04 x11: 0000000000000006 x12: 000000000001869f x13: 0000000000000001 x14: 00000000ff7f84bc x15: 0000000000000010 x16: 0000000000002080 x17: 00000000001fffff x18: 00000000ff7fbdd8 x19: 00000000ffb405f8 x20: 00000000ffb40dd0 x21: 00000000fffabe5e x22: 000000ea77940000 x23: 00000000ffb42090 x24: 0000000000000000 x25: 0000000000000000 x26: 0000000000000000 x27: 0000000000000000 x28: 0000000000bab10c x29: 00000000ff7f85f0 Code: d00001a0 9103a000 94006ac6 f9401ba0 (f9400000) Resetting CPU ... This happens when be64_to_cpu() is called on a value that exists at a memory address that's 4 byte aligned but not 8 byte aligned (e.g. an address ending in 04). The call stack where that happens is: check_pool_label() -> zfs_nvlist_lookup_uint64(vdevnvlist, ZPOOL_CONFIG_ASHIFT,...) -> be64_to_cpu() Signed-off-by: Phaedrus Leeds <mwleeds@mailtundra.com> Fixes: 4d3c95f5ea7c ("zfs: Add ZFS filesystem support")
2024-04-17zfs: Add a comment to clarify nvlist memory layoutmwleeds@mailtundra.com
Signed-off-by: Phaedrus Leeds <mwleeds@mailtundra.com>
2024-04-17zfs: Fix malloc() success checkmwleeds@mailtundra.com
This code was hitting the error code path whenever malloc() succeeded rather than when it failed, so presumably this part of the code hasn't been tested. I had to apply this fix (and others) to get U-Boot to boot from ZFS on an Nvidia Jetson TX2 NX SoM (an aarch64 computer). Signed-off-by: Phaedrus Leeds <mwleeds@mailtundra.com>
2024-04-16net: wget: fix TCP sequence number wrap around issueYasuharu Shibata
If tcp_seq_num is wrap around, tcp_seq_num >= initial_data_seq_num isn't satisfied and store_block() isn't called. The condition has a wrap around issue, so it is fixed in this patch. Signed-off-by: Yasuharu Shibata <yasuharu.shibata@gmail.com> Reviewed-by: Michael Trimarchi <michael@amarulasolutions.com> Suggested-by: Michael Trimarchi <michael@amarulasolutions.com> Reported-by: Tim Harvey <tharvey@gateworks.com> Tested-by: Fabio Estevam <festevam@denx.de>