aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2023-01-12ARM: dts: stm32: Add timer interrupts on stm32mp15Patrick Delaunay1-0/+34
The timer units in the stm32mp15x CPUs have interrupts, depending on the timer flavour either one "global" or four dedicated ones. Add the irqs to the timer units on stm32mp15x. Sync the DT Files with linux kernel v6.1 and with commit a9b70102253ce ("ARM: dts: stm32: Add timer interrupts on stm32mp15") Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2023-01-12ARM: dts: stm32mp15: fix typo in stm32mp15xx-dkx.dtsiPatrick Delaunay1-5/+5
Remove unnecessary space in device tree stm32mp15xx-dkx.dtsi. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2023-01-12ARM: dts: stm32mp15: remove clksrc include in SCMI dtsi filePatrick Delaunay2-2/+0
The include file stm32mp1-clksrc.h is not necessary for the SCMI STM32MP15 dtsi files as the clock tree is not defined in the U-Boot SCMI device tree; these SCMI device tree only support TFABOOT with stm32mp15_defconfig, SPL with the basic boot defconfig is not supported. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2023-01-12adc: stm32mp15: add calibration supportOlivier Moysan1-18/+116
Add support of offset and linear calibration for STM32MP15. The calibration is performed once at probe. The ADC is set in power on state for calibration. It remains in this state after calibration, to give to the kernel the opportunity to retrieve calibration data, directly from the ADC. Signed-off-by: Olivier Moysan <olivier.moysan@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2023-01-12ARM: dts: stm32: add support for USB2514B onboard hub on stm32mp157c-ev1Fabrice Gasnier1-0/+8
Add support for USB2514B onboard hub on stm32mp157c EV1 board. The HUB is supplied by a 3v3 PMIC regulator. [backport from linux ad9591b01d24] Signed-off-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Tested-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2023-01-12configs: stm32: enable USB onboard HUB driverFabrice Gasnier3-0/+3
Activate the USB onboard HUB driver, that is used to enable the HUB supply on STM32MP15 EVAL, DK1 and DK2 boards. This avoids marking the 3v3 corresponding regulator as always-on. Signed-off-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2023-01-12usb: onboard-hub: add driver to manage onboard hub suppliesFabrice Gasnier4-6/+83
The main issue the driver addresses is that a USB hub needs to be powered before it can be discovered. This is often solved by using "regulator-always-on". This driver is inspired by the Linux v6.1 driver. It only enables (or disables) the hub vdd (3v3) supply, so it can be enumerated. Scanning of the device tree is done in a similar manner to the sandbox, by the usb-uclass. DT part looks like: &usbh_ehci { ... #address-cells = <1>; #size-cells = <0>; hub@1 { compatible = "usb424,2514"; reg = <1>; vdd-supply = <&v3v3>; }; }; When the bus gets probed, the driver is automatically probed/removed from the bus tree, as an example on stm32: STM32MP> usb start starting USB... STM32MP> dm tree Class Index Probed Driver Name ----------------------------------------------------------- usb 0 [ + ] ehci_generic | |-- usb@5800d000 usb_hub 0 [ + ] usb_onboard_hub | | `-- hub@1 usb_hub 1 [ + ] usb_hub | | `-- usb_hub STM32MP> usb tree USB device tree: 1 Hub (480 Mb/s, 0mA) | u-boot EHCI Host Controller | +-2 Hub (480 Mb/s, 2mA) Signed-off-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2023-01-12Merge branch '2023-01-11-assorted-general-updates'Tom Rini44-270/+586
- Assorted Kconfig cleanups, code clean ups, env+ubi updates, correct return value propagation out of environment scripts, and update CI to latest "jammy" tag.
2023-01-12ARM: dts: stm32: update vbus-supply of usbphyc_port0 on stm32mp157c-ev1Fabrice Gasnier1-0/+4
phy-stm32-usbphyc bindings uses a connector node with vbus-supply property. [backport from linux 43e55d778a6b] Signed-off-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2023-01-11CI/Docker: Update to jammy-20221130 tagTom Rini3-3/+4
Update to the latest "jammy" tag. This requires us to list libc6-i386 as a required package to install (for nokia_rx51 tests) that was previously implicit. Signed-off-by: Tom Rini <trini@konsulko.com>
2023-01-11Use `grep -E` or plain `grep` instead of `egrep`Ville Skyttä5-16/+16
`egrep` has been deprecated in GNU grep since 2007, and since 3.8 it emits obsolescence warnings: https://git.savannah.gnu.org/cgit/grep.git/commit/?id=a9515624709865d480e3142fd959bccd1c9372d1 Acked-by: Dhruva Gole <d-gole@ti.com>
2023-01-11Kconfig: move NXP specific stuff into a sub-menuHeinrich Schuchardt1-2/+4
Having NXP specific items in the main menu is confusing. Especially the comment line *** Other functionality shared between NXP SoCs *** is simply misleading. Move all NXP stuff into a separate sub-menu. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-01-11Kconfig: clean up skipping low-level initializationHeinrich Schuchardt1-8/+12
Put all entries for skipping low-level initialization into a sub-menu. Use different titles for main U-Boot, SPL, TPL. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2023-01-11Dockerfile: add package texinfoHeinrich Schuchardt1-0/+1
In preparation of adding the infodocs target to our CI install the prerequisite texinfo software package. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-01-11fs/btrfs: handle data extents, which crosss stripe boundaries, correctlyQu Wenruo1-22/+27
[BUG] Since btrfs supports single device RAID0 at mkfs time after btrfs-progs v5.14, if we create a single device raid0 btrfs, and created a file crossing stripe boundary: # mkfs.btrfs -m dup -d raid0 test.img # mount test.img mnt # xfs_io -f -c "pwrite 0 128K" mnt/file # umount mnt Since btrfs is using 64K as stripe length, above 128K data write is definitely going to cross at least one stripe boundary. Then u-boot would fail to read above 128K file: => host bind 0 /home/adam/test.img => ls host 0 < > 131072 Fri Dec 30 00:18:25 2022 file => load host 0 0 file BTRFS: An error occurred while reading file file Failed to load 'file' [CAUSE] Unlike tree blocks read, data extent reads doesn't consider cases in which one data extent can cross stripe boundary. In read_data_extent(), we just call btrfs_map_block() once and read the first mapped range. And if the first mapped range is smaller than the desired range, it would return error. But since even single device btrfs can utilize RAID0 profiles, the first mapped range can only be at most 64K for RAID0 profiles, and cause false error. [FIX] Just like read_whole_eb(), we should call btrfs_map_block() in a loop until we read all data. Since we're here, also add extra error messages for the following cases: - btrfs_map_block() failure We already have the error message for it. - Missing device This should not happen, as we only support single device for now. - __btrfs_devread() failure With this bug fixed, btrfs driver of u-boot can properly read the above 128K file, and have the correct content: => host bind 0 /home/adam/test.img => ls host 0 < > 131072 Fri Dec 30 00:18:25 2022 file => load host 0 0 file 131072 bytes read in 0 ms => md5sum 0 0x20000 md5 for 00000000 ... 0001ffff ==> d48858312a922db7eb86377f638dbc9f ^^^ Above md5sum also matches. Reported-by: Sam Winchenbach <swichenbach@tethers.com> Signed-off-by: Qu Wenruo <wqu@suse.com>
2023-01-11ata: Fix dependency for CONFIG_SATA_SILPali Rohár1-0/+1
sata_sil.c is PCI driver and without CONFIG_PCI is building of U-Boot failing: LD u-boot ld.bfd: drivers/ata/sata_sil.o: in function `sil_exec_cmd': drivers/ata/sata_sil.c:148: undefined reference to `dm_pci_phys_to_bus' ld.bfd: drivers/ata/sata_sil.o: in function `sil_pci_probe': drivers/ata/sata_sil.c:687: undefined reference to `dm_pci_get_bdf' ld.bfd: drivers/ata/sata_sil.c:691: undefined reference to `dm_pci_read_config16' ld.bfd: drivers/ata/sata_sil.c:701: undefined reference to `dm_pci_map_bar' ld.bfd: drivers/ata/sata_sil.c:704: undefined reference to `dm_pci_map_bar' ld.bfd: drivers/ata/sata_sil.c:713: undefined reference to `dm_pci_write_config16' ld.bfd: drivers/ata/sata_sil.c:717: undefined reference to `dm_pci_read_config16' ld.bfd: drivers/ata/sata_sil.o: in function `sil_cmd_identify_device': drivers/ata/sata_sil.c:256: undefined reference to `dm_pci_phys_to_bus' ld.bfd: drivers/ata/sata_sil.o: in function `sil_sata_rw_cmd': drivers/ata/sata_sil.c:330: undefined reference to `dm_pci_phys_to_bus' ld.bfd: drivers/ata/sata_sil.o: in function `sil_sata_rw_cmd_ext': drivers/ata/sata_sil.c:377: undefined reference to `dm_pci_phys_to_bus' make: *** [Makefile:1778: u-boot] Error 1 Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Stefan Roese <sr@denx.de>
2023-01-11test: compression: use ut_assert for errorsBrandon Maier1-31/+25
Use the ut_assert macros for more useful error messages. Signed-off-by: Brandon Maier <brandon.maier@collins.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-01-11test: compression: check with trailing garbage in inputBrandon Maier1-0/+9
The Linux kernel appends 4 bytes to the end of compressed kernel Images containing the uncompressed image size. They are used to make self-decompressing Images easier. However for archs that don't support self-decompression, like ARM64, U-Boot must be able to decompress the image with the garbage data. The existing decompressors already support this. This unit test was added while working on zstd support as upstream zstd will error if there is garbage data in the input buffer, and special care was needed to support this. Signed-off-by: Brandon Maier <brandon.maier@collins.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-01-11fs/squashfs: Only use export table if availableDavid Oberhollenzer1-5/+11
For a squashfs filesystem, the fragment table is followed by the following tables: NFS export table, ID table, xattr table. The export and xattr tables are both completely optional, but the ID table is mandatory. The Linux implementation refuses to mount the image if the ID table is missing. Tables that are no present have their location in the super block set to 0xFFFFFFFFFFFFFFFF. The u-boot implementation previously assumed that it can always rely on the export table location as an upper bound for the fragment table, trying (and failing) to read past filesystem bounds if it is not present. This patch changes the driver to use the ID table instead and only use the export table location if it lies between the two. Signed-off-by: David Oberhollenzer <goliath@infraroot.at> Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
2023-01-11test: cmd: exit: Add unit test for exit and partly run commandsMarek Vasut4-1/+138
Add a test which validates that exit from environment script works as expected, including return value propagation and clipping to positive integers. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Marek Vasut <marex@denx.de>
2023-01-11cmd: exit: Fix return value propagation out of environment scriptsMarek Vasut4-12/+27
Make sure the 'exit' command as well as 'exit $val' command exits from environment scripts immediately and propagates return value out of those scripts fully. That means the following behavior is expected: " => setenv foo 'echo bar ; exit 1' ; run foo ; echo $? bar 1 => setenv foo 'echo bar ; exit 0' ; run foo ; echo $? bar 0 => setenv foo 'echo bar ; exit -2' ; run foo ; echo $? bar 0 " As well as the followin behavior: " => setenv foo 'echo bar ; exit 3 ; echo fail'; run foo; echo $? bar 3 => setenv foo 'echo bar ; exit 1 ; echo fail'; run foo; echo $? bar 1 => setenv foo 'echo bar ; exit 0 ; echo fail'; run foo; echo $? bar 0 => setenv foo 'echo bar ; exit -1 ; echo fail'; run foo; echo $? bar 0 => setenv foo 'echo bar ; exit -2 ; echo fail'; run foo; echo $? bar 0 => setenv foo 'echo bar ; exit ; echo fail'; run foo; echo $? bar 0 " Fixes: 8c4e3b79bd0 ("cmd: exit: Fix return value") Reviewed-by: Hector Palacios <hector.palacios@digi.com> Signed-off-by: Marek Vasut <marex@denx.de>
2023-01-11fastboot: Add OEM run commandSean Anderson4-5/+37
This adds the UUU UCmd functionality as an OEM command. While the fastboot tool allows sending arbitrary commands as long as they are prefixed with "oem". This allows running generic U-Boot commands over fastboot without UUU, which is especially useful when not using USB. This is really the route we should have gone in the first place when adding these commands. While we're here, clean up the UUU Kconfig a bit. Signed-off-by: Sean Anderson <sean.anderson@seco.com> Reviewed-by: Heiko Schocher <hs@denx.de>
2023-01-11fastboot: remove #ifdef CONFIG when it is possiblePatrick Delaunay7-145/+82
Much of the fastboot code predates the introduction of Kconfig and has quite a few #ifdefs in it which is unnecessary now that we can use IS_ENABLED() et al. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> Reviewed-by: Sean Anderson <sean.anderson@seco.com> Tested-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> # on vim3l
2023-01-11optee: bind the TA drivers on OP-TEE nodePatrick Delaunay1-2/+4
In U-Boot driver model the devices can be referenced by phandle in the U-Boot configuration nodes. Without a valid node provided during the bind, the driver associated to OP-TEE TA can't be referenced. For example to force the sequence number with alias (.flags = DM_UC_FLAG_SEQ_ALIAS) aliases { rng0 = &optee; }; or other configuration: board-sysinfo { compatible = "vendor,sysinfo-board"; ramdom = <&optee>; } With this patch all drivers bound from OP-TEE service discovery are now associated are associated to OP-TEE node, allowing to identify by phandle the driver provided by the TA for one UCLASS without modifying device tree. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2023-01-11env: add failing trace in env_erasePatrick Delaunay1-2/+6
Add trace in env save to indicate any errors to end user and avoid silent output when the command 'env erase' is not executed as it is done in env_save with commit 8968288cb477 ("env: add failing trace in env_save") Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Heiko Schocher <hs@denx.de>
2023-01-11env: ubi: add support of command env erasePatrick Delaunay1-0/+40
Add support of opts erase for ubi env backend, this opts is used by command 'env erase'. This command only zero-fill the env UBI volume CONFIG_ENV_UBI_VOLUME and CONFIG_ENV_UBI_VOLUME_REDUND, so the saved environment becomes invalid. This patch introduces a local define ENV_UBI_VOLUME_REDUND only to avoid #if in the code, as CONFIG_ENV_UBI_VOLUME_REDUND is only defined when CONFIG_SYS_REDUNDAND_ENVIRONMENT is defined. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com> Reviewed-by: Heiko Schocher <hs@denx.de>
2023-01-11test: env: add test for u-boot-initial-env creationMax Krummenacher1-0/+24
Checks that `make u-boot-initial-env` creates the text file u-boot-initial-env and checks that it at least contains `board=<something>`. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-01-11cmd: change the return value when argc errorShenlin Liang1-1/+1
When the number of parameters is wrong, the return value should be processed in the same way as other cmds, return CMD_RET_USAGE so that it can print the information. Signed-off-by: Shenlin Liang <liangshenlin@eswincomputing.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-01-11cmd: mtdparts: add SYS_MTDPARTS_RUNTIME dependency on ↵Patrick Delaunay1-0/+2
CONFIG_MTDIDS/MTDPARTS_DEFAULT The two configuration CONFIG_MTDIDS_DEFAULT and CONFIG_MTDPARTS_DEFAULT are not needed with mtd configuration CONFIG_SYS_MTDPARTS_RUNTIME which allows the MTDIDS and MTDPARTS to be configured at runtime. This patch has no defconfig impacts because CONFIG_SYS_MTDPARTS_RUNTIME is only used by two platforms (stm32mp and igep00x0) which don't define CONFIG_MTDIDS_DEFAULT or CONFIG_MTDPARTS_DEFAULT. This patch solves an UBI environment load issue for NAND boot for stm32mp15 platform. In mtd_uboot.c, when GD_FLG_ENV_READY is not set, env_get_f() return a EMPTY string, define in default_environment[] because CONFIG_MTDIDS_DEFAULT="" and CONFIG_MTDPARTS_DEFAULT="", but a NULL pointer is expected to allow call of board_mtdparts_default. Without mtdparts, the env partition [CONFIG_ENV_UBI_PART="UBI"] is not found in env/ubi.c [CONFIG_ENV_IS_IN_UBI]. It is not a problem when env becomes ready, as these empty variables are removed form U-Boot environment in env_import() / himport_r(). Fixes: a331017c237c ("Complete migration of MTDPARTS_DEFAULT / MTDIDS_DEFAULT, include in environment") Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
2023-01-11lib: rsa: cosmetic: fix building warningHaijun Qin1-1/+1
add initialization of variable 'node',this can aviod the building warning: 'node' may be used uninitialized [-Wmaybe-uninitialized] Signed-off-by: Haijun Qin <qinhaijun@eswincomputing.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-01-11reboot-mode: Add NVMEM reboot modeSean Anderson4-0/+66
This adds an NVMEM reboot mode driver, similar to Linux's implementation. This allows using the same device tree binding for Linux and U-Boot in most cases. Signed-off-by: Sean Anderson <sean.anderson@seco.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-01-11rtc: abx8xx: Add support for reading RAMSean Anderson1-17/+51
This adds support for reading the battery-backed memory present on these RTCs. This modifies the read/write methods to access the RAM instead of raw register offsets. No one was using these in-tree, so we should be fine changing them. We use the "standard" address space window to access the RAM. The extension RAM address register has some reserved bits, but we write the whole thing for simplicity (as these bits default to 0). Signed-off-by: Sean Anderson <sean.anderson@seco.com>
2023-01-11common:autoboot:modify function parametersShenlin Liang1-2/+2
the blob parameter of the function process_fdt_options has not been invoked in the function body and should be changed to void type Signed-off-by: Shenlin Liang <liangshenlin@eswincomputing.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-01-10Merge branch '2023-01-10-platform-updates'Tom Rini51-83/+226
- Platform updates for TI, nuvoton pinctrl, starqltechn/sdm845 fixes, and assorted platform CONFIG_BUILD_TARGET corrections
2023-01-10ARM: omap3: evm: Name this directory omap3evmWIP/2023-01-10-platform-updatesAndrew Davis6-3/+3
Before this was named just evm, which doesn't match the naming of the other TI board file directory and makes it look like a common directory for evms. Name this omap3evm. Signed-off-by: Andrew Davis <afd@ti.com> Reviewed-by: Derald Woods <woods.technical@gmail.com>
2023-01-10powerpc/mpc85xx: Unset CONFIG_SPL_TARGET="u-boot-with-spl.bin"Pali Rohár27-27/+0
CONFIG_SPL_TARGET should specify additional SPL make target. But u-boot-with-spl.bin is final U-Boot binary, not SPL binary in some custom format. Moreover u-boot-with-spl.bin is already set in CONFIG_BUILD_TARGET, so make will build it by default. Signed-off-by: Pali Rohár <pali@kernel.org>
2023-01-10powerpc/mpc85xx: Set default CONFIG_BUILD_TARGETPali Rohár1-0/+1
Final U-Boot binary for mpc85xx boards which use SPL and are not PBL-based based is u-boot-with-spl.bin. PBL is not used only on boards with e500v1 and e500v2 cores. Apparently CONFIG_E500 is set not only for e500 cores, but also for all other mpc85xx cores e500mc, e5500 and e5600. So do not use CONFIG_E500 and instead filter new cores with PBL based bootrom. Signed-off-by: Pali Rohár <pali@kernel.org>
2023-01-10arm: mvebu: Fix default CONFIG_BUILD_TARGETPali Rohár1-2/+2
u-boot-with-spl.kwb is built only for SPL enabled 32-bit armada boards. u-boot.kwb is built for 32-bit armada and kirkwood boards but only for non-SPL targets. So replace CONFIG_ARCH_MVEBU by CONFIG_ARMADA_32BIT (it implies CONFIG_ARCH_MVEBU) for u-boot-with-spl.kwb. And add additional CONFIG_ARMADA_32BIT && !CONFIG_SPL for u-boot.kwb. Signed-off-by: Pali Rohár <pali@kernel.org>
2023-01-10SoC: sdm845: find and save KASLR to env variablesDzmitry Sankouski1-0/+18
KASLR address is needed to boot fully functional Android. KASLR is set by primary bootloader, and since u-boot is used as a secondary bootloader(replacing kernel) on sdm845 platform, KASLR may be found by comparing memory chunks at relocaddr over supposed KASLR range. Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
2023-01-10board: starqltechn: enable serial consoleDzmitry Sankouski2-4/+5
It was temporary disabled due to problem with boot. Issue was fixed in commit f5ed6c9ccf3e ("uart: sdm845: Fix debug UART pinmux") Signed-off-by: Dzmitry Sankouski <dsankouski@gmail.com>
2023-01-10configs: am62a: use kernel fitImage when using secure bootflowBryan Brattlof1-3/+8
In order to maintain the chain of trust, each stage of the boot process will first authenticate each binary it loads before continuing. To extend this to the kernal and its dtbs we can package the kernal and its dtbs into another fitImage for Uboot to authenticate and extend the chain of trust all the way to the kernel. When 'boot_fit' is set, indicating we're using the secure bootflow, look for and authenticate the kernel's fitImage. Signed-off-by: Judith Mendez <jm@ti.com> Signed-off-by: Bryan Brattlof <bb@ti.com>
2023-01-10configs: am62a: convert bootcmd to distro_bootcmdBryan Brattlof2-4/+26
We're currently using CONFIG_BOOTCOMMAND to run custom boot scripts to jump into linux. While this works, let's begin the transition to more distribution friendly jumps to linux by enabling distro_bootcmd. Convert the custom bootcmd to a distro_bootcmd Signed-off-by: Judith Mendez <jm@ti.com> Signed-off-by: Bryan Brattlof <bb@ti.com>
2023-01-10arm: mach-k3: copy bootindex to OCRAM for main domain SPLBryan Brattlof3-4/+33
Texas Instruments has begun enabling security settings on the SoCs it produces to instruct ROM and TIFS to begin protecting the Security Management Subsystem (SMS) from other binaries we load into the chip by default. One way ROM and TIFS do this is by enabling firewalls to protect the OCSRAM and HSM RAM regions they're using during bootup. The HSM RAM the wakeup SPL is in is firewalled by TIFS to protect itself from the main domain applications. This means the 'bootindex' value in HSM RAM, left by ROM to indicate if we're using the primary or secondary boot-method, must be moved to OCSRAM (that TIFS has open for us) before we make the jump to the main domain so the main domain's bootloaders can keep access to this information. Signed-off-by: Bryan Brattlof <bb@ti.com>
2023-01-10configs: am62a: move stack and heap to HSM RAMBryan Brattlof1-1/+1
Texas Instruments has begun enabling security setting on the SoCs they produce to instruct ROM and TIFS to begin protecting the Security Management Subsystem (SMS) from other binaries we load into the chip by default. One way ROM does this is by enabling firewalls to protect the OCSRAM region it's using during bootup. Only after TIFS has started (and had time to disable the OCSRAM firewall region) will we have write access to the region. This means we will need to move the stack & heap from OCSRAM to HSM RAM and reduce the size of BSS and the SPL to allow it to fit properly. Signed-off-by: Bryan Brattlof <bb@ti.com>
2023-01-10configs: restrict am62ax wakup SPL sizeBryan Brattlof1-4/+9
In its current form, the am62a's wakeup SPL is fairly small, however this will not remain as more boot modes are eventually added. To protect us from overflowing our ~256k of HSM SRAM, add limits and check during the wakeup SPL build. Signed-off-by: Bryan Brattlof <bb@ti.com>
2023-01-10configs: Enable distroboot on am625Martyn Welch2-2/+26
TI boards use a custom (though faily common to TI boards) mechanism for booting Linux. We would like to use the "distroboot" approach. Enable distroboot as a further option to use for booting on am625 should the existing options fail. Signed-off-by: Martyn Welch <martyn.welch@collabora.com>
2023-01-10arm64:mach-k3 am625_init: Correct boot mode detectionMartyn Welch1-10/+9
The boot mode detection assumes that BOOT_DEVICE_MMC2 should always result in MMCSD_MODE_FS, but MMCSD_MODE_RAW is also a valid option for this port. The current logic also avoids looking at the bootmode pin strapping, which should be the primary means of determining whether a device is being booted in MMCSD_MODE_EMMCBOOT mode. Switch around the logic to check the boot mode to determine whether the eMMC boot mode is expected or MMC/SD boot mode. From there we can look at the boot mode config if in MMC/SD boot mode to determine whether to attempt RAW or FS based booting. This change allows U-Boot to also be successfully booted from RAW offsets in addition to from a filesystem. Signed-off-by: Martyn Welch <martyn.welch@collabora.com>
2023-01-10configs: am62x_evm_a53: Enable ethernetSjoerd Simons1-0/+6
Enable ethernet support for u-boot on am62x evm Signed-off-by: Sjoerd Simons <sjoerd@collabora.com>
2023-01-10arm: dts: k3-am625-sk: Enable first ethernet portSjoerd Simons1-0/+22
The K3 am625 sk EVM has two ethernet ports; Enable the first one for usage in u-boot. Signed-off-by: Sjoerd Simons <sjoerd@collabora.com>
2023-01-10configs: am62x_evm_*: Run savedefconfigSjoerd Simons2-19/+17
Clean configuration for am62x_evm using savedefconfig Signed-off-by: Sjoerd Simons <sjoerd@collabora.com> Tested-by: Dhruva Gole <d-gole@ti.com>