summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)Author
2021-07-27spl: Introduce spl_board_prepare_for_optee() hookAlexandru Gagniuc
OP-TEE requires some particular setup, which is not needed for linux or other payloads. Add a hook for platform-specific code to perform any OP-TEE related configuration and initialization. A weak function is used because it is symmetrical to other spl_board_prepare_for_*() implementations. A solution to avoid the use of weak functions would trivially apply to all these implementations. However, re-designing this is beyond the scope of this patch. Signed-off-by: Alexandru Gagniuc <[email protected]> Reviewed-by: Tom Rini <[email protected]> Reviewed-by: Simon Glass <[email protected]> Reviewed-by: Patrick Delaunay <[email protected]>
2021-07-27arm: mach-k3: j721e: Cleanup MAIN R5 boot code from R5 SPLSuman Anna
The common J7 specific start_non_linux_remote_cores() override function implements the logic to load and boot the Main R5FSS Core0 from R5 SPL. This won't be supported any more for either J721E or J7200 after the R5 SPL rearchitecture for the System Firmware split into TI Foundation Security (TIFS) and Device Management (DM) firmwares. So, cleanup the corresponding code and the related SPL env variables. Signed-off-by: Suman Anna <[email protected]> Signed-off-by: Lokesh Vutla <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-07-27arm: mach-k3: j721e: Move booting of Main R5FSS Core0 to A72 U-BootSuman Anna
The Main R5FSS Core0 on J721E SoCs is originally booted from R5 SPL itself to achieve certain product-level early-boot metrics. This is no longer supported after the R5 SPL re-architecture (support merged for v2021.10-rc1). Move the booting of this core altogether from R5 SPL to A72 U-Boot. The env variables are left as is for now, and will be cleaned up in a subsequent patch. Signed-off-by: Suman Anna <[email protected]> Signed-off-by: Lokesh Vutla <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-07-27configs: am64x_evm: Move CONFIG_SYS_MMC_ENV_DEV and CONFIG_SYS_MMC_ENV_PART ↵Aswath Govindraju
to defconfig files and enable configs to save env in eMMC and FAT write. Kconfig symbols for SYS_MMC_ENV_DEV and SYS_MMC_ENV_PART have been added by commit 7d080773347c1f6e0e896d9284134a2a411155d6. Therefore, move the definitions of configs to corresponding board defconfig files and enable configs to save env in eMMC. Also enable config for FAT write in U-Boot. Fixes: 33b7258947f4 ("board: ti: am64x: Add board support for am64x evm") Signed-off-by: Aswath Govindraju <[email protected]> Signed-off-by: Lokesh Vutla <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-07-27env: ti: j721e-evm: Add env variable to power on & reset QSGMII PHY in J7200 EVMKishon Vijay Abraham I
MAIN CPSW0 requires the PHY to be powered on and reset for QSGMII operation. Add a env variable to configure driving "0" on ENET_EXP_PWRDN controlled by GPIO EXPANDER2 (I2C Addr: 0x22), PIN: 17 and driving "1" on ENET_EXP_RESETZ controlled by GPIO EXPANDER2 (I2C Addr: 0x22), PIN: 18. Signed-off-by: Kishon Vijay Abraham I <[email protected]> Signed-off-by: Lokesh Vutla <[email protected]> Reviewed-by: Suman Anna <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-07-27dt-bindings: ti-serdes-mux: Add defines for AM64 SoCKishon Vijay Abraham I
AM64 has a single lane SERDES which can be configured to be used with either PCIe or USB. Define the possilbe values for the SERDES function in AM64 SoC here. Signed-off-by: Kishon Vijay Abraham I <[email protected]> Signed-off-by: Lokesh Vutla <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-07-27dt-bindings: phy: cadence-torrent: Add defines for refclk driverKishon Vijay Abraham I
Add defines for refclk driver used to route the refclk out of torrent SERDES. Signed-off-by: Kishon Vijay Abraham I <[email protected]> Signed-off-by: Lokesh Vutla <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-07-27dt-bindings: phy: Add defines for AM64 SERDES WrapperKishon Vijay Abraham I
Add defines for AM64 SERDES Wrapper. Signed-off-by: Kishon Vijay Abraham I <[email protected]> Signed-off-by: Lokesh Vutla <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-07-27dt-bindings: phy: Add definitions for additional phy typesAswath Govindraju
Add definitions for additional phy types that's used specifically for Torrent SERDES. Signed-off-by: Aswath Govindraju <[email protected]> Signed-off-by: Kishon Vijay Abraham I <[email protected]> Signed-off-by: Lokesh Vutla <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-07-27dm: core: Add helper to compare node namesKishon Vijay Abraham I
Add helper to compare node names. Signed-off-by: Kishon Vijay Abraham I <[email protected]> Signed-off-by: Lokesh Vutla <[email protected]> Reviewed-by: Simon Glass <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-07-27dt-bindings: Resync omap & am33xx pinctrl bindingsPaul Barker
These headers are updated to match the versions in Linux 5.13.1. Signed-off-by: Paul Barker <[email protected]>
2021-07-27samsung: exynos: Convert SROMC interface to a driverSimon Glass
Add a bus driver for this and use it to configure the bus parameters for the Ethernet interface. Drop the old pre-driver-model code. Switch over to use driver model for Ethernet. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Jaehoon Chung <[email protected]> Signed-off-by: Minkyu Kang <[email protected]>
2021-07-26xilinx: Define kernel_comp_addr_r,kernel_comp_size env variablesRaju Kumar Pothuraju
Add kernel_comp_addr_r, kernel_comp_size env variables for zynqmp and versal to be able to use the compressed kernel Image(.gz,.bz2,.lzma,.lzo) using booti command. Signed-off-by: Raju Kumar Pothuraju <[email protected]> Signed-off-by: Michal Simek <[email protected]>
2021-07-26arm64: versal: Drop default definitions of CONFIG_SYS_PBSIZEMichal Simek
It is default value which had been converted by commit 432e39806805 ("include/configs: drop default definitions of CONFIG_SYS_PBSIZE"). That's why also remove it. Signed-off-by: Michal Simek <[email protected]>
2021-07-26net: ethtool: Add ethernet speed macros for higher speedsAshok Reddy Soma
Add speed macro's for higher ethernet speeds to be used in u-boot networking drivers. Added Macros for speeds 14G, 20G, 25G, 40G, 50G, 56G, 100G and 200G inline with linux. Signed-off-by: Ashok Reddy Soma <[email protected]> Reviewed-by: Simon Glass <[email protected]> Acked-by: Ramon Fried <[email protected]> Signed-off-by: Michal Simek <[email protected]>
2021-07-26mmc: zynq_sdhci: Split set_tapdelay function to in and outAshok Reddy Soma
Split arasan_zynqmp_set_tapdelay() to handle input and output tapdelays separately. This is required to handle zero values for ITAP and OTAP values. If we dont split, we will have to remove the if() in the function, which makes ITAP values to be overwritten when OTAP values are called to set and vice-versa. Restrict tap_delay value calculated to max allowed 8 bits for ITAP and 6 bits for OTAP for ZynqMP. Signed-off-by: Ashok Reddy Soma <[email protected]> Reviewed-by: Jaehoon Chung <[email protected]> Signed-off-by: Michal Simek <[email protected]>
2021-07-26xilinx: zynqmp: increase CONFIG_SYS_SPL_MALLOC_SIZE to 16MBRicardo Salveti
commit 03f1f78a9b44 ("spl: fit: Prefer a malloc()'d buffer for loading images")' changed the way buffer allocation worked for SPL to a more flexible method. For xilinx zynqmp the 1MB buffer is not necessarily enough when dealing with complex fit images (e.g. containing FPGA/TF-A/OP-TEE/U-Boot proper), which can easily reach up to 10MB, so increase the default CONFIG_SYS_SPL_MALLOC_SIZE size to 16MB to cover more advanced scenarios. Signed-off-by: Ricardo Salveti <[email protected]> Signed-off-by: Michal Simek <[email protected]>
2021-07-24Merge tag 'efi-2021-10-rc1-3' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-efi Pull request for efi-2021-10-rc1-3 Documentation: provide Makefile documentation SMBIOS: generate BIOS release date based on UEFI version improve error handling in SMBIOS table generation UEFI: correct handling of signed capsule if authentication if off
2021-07-24efi_loader: remove asm/setjmp.h from efi_api.hAKASHI Takahiro
In the commit c982874e930d ("efi_loader: refactor efi_setup_loaded_image()"), setjmp-related definitions were moved to efi_loaded_image_obj in efi_loader.h. So setjmp.h is no longer refererenced in efi_api.h. This also fixes some error when efi_api.h will be included in mkeficapsule.c. Fixes: c982874e930d ("efi_loader: refactor efi_setup_loaded_image()") Signed-off-by: AKASHI Takahiro <[email protected]> Reviewed-by: Heinrich Schuchardt <[email protected]>
2021-07-24smbios: error handling for invalid addressesHeinrich Schuchardt
SMBIOS tables only support 32bit addresses. If we don't have memory here handle the error gracefully: * on x86_64 fail to start U-Boot * during UEFI booting ignore the missing table Signed-off-by: Heinrich Schuchardt <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2021-07-23board: dragonboard410c: Fix PHYS_SDRAM_1_SIZEStephan Gerhold
The DragonBoard 410c has proprietary firmware from Qualcomm that reserves 8 MiB of memory for tz/smem/hyp/rmtfs/rfsa from 0x86000000 to 0x86800000. I'm not aware of any ATF (ARM Trusted Firmware) port for DB410c that would reserve 30 MiB of memory at the end of RAM. I suspect the comment might have been copied from hikey.h which has a very similar comment (and which actually does have an ATF port). Reducing the memory size just prevents U-Boot from using the end of the RAM, not the reserved region inbetween. Therefore we might as well display the correct DRAM size (1 GiB) instead of strange 986 MiB. Fixes: 626f048bbc14 ("board: Add Qualcomm Dragonboard 410C support") Signed-off-by: Stephan Gerhold <[email protected]> Reviewed-by: Ramon Fried <[email protected]>
2021-07-23board: dragonboard410c: Load U-Boot directly without LKStephan Gerhold
At the moment the U-Boot port for the DragonBoard 410c is designed to be loaded as an Android boot image after Qualcomm's Little Kernel (LK) bootloader. This is simple to set up but LK is redundant in this case, since everything done by LK can be also done directly by U-Boot. Dropping LK entirely has at least the following advantages: - Easier installation/board code (no need for Android boot images) - (Slightly) faster boot - Boot directly in 64-bit without a round trip to 32-bit for LK So far this was not possible yet because of unsolved problems: 1. Signing tool: The firmware expects a "signed" ELF image with extra (Qualcomm-specific) ELF headers, usually used for secure boot. The DragonBoard 410c does not have secure boot by default but the extra ELF headers are still required. 2. PSCI bug: There seems to be a bug in the PSCI implementation (part of the TrustZone/tz firmware) that causes all other CPU cores to be started in 32-bit mode if LK is missing in the boot chain. This causes Linux to hang early during boot. There is a solution for both problems now: 1. qtestsign (https://github.com/msm8916-mainline/qtestsign) can be used as a "signing" tool for U-Boot and other firmware. 2. A workaround for the "PSCI bug" is to execute the TZ syscall when entering U-Boot. That way PSCI is made aware of the 64-bit switch and starts all other CPU cores in 64-bit mode as well. Simplify the dragonboard410c board by removing all the extra code that is only used to build an Android boot image that can be loaded by LK. This allows dropping the custom linker script, special image magic, as well as most of the special build/installation instructions. CONFIG_REMAKE_ELF is used to build a new ELF image that has both U-Boot and the appended DTB combined. The resulting u-boot.elf can then be passed to the "signing" tool (e.g. qtestsign). The PSCI workaround is placed in the "boot0" hook that is enabled with CONFIG_ENABLE_ARM_SOC_BOOT0_HOOK. The extra check for EL1 allows compatibility with custom firmware that enters U-Boot in EL2 or EL3, e.g. qhypstub (https://github.com/msm8916-mainline/qhypstub). As a first step these changes apply only to DragonBoard410c. Similar changes could likely also work for the DragonBoard 820c. Note that removing LK wouldn't be possible that easily without a lot of work already done three years ago by Ramon Fried. A lot of missing initialization, pinctrl etc was already added back then even though it was not strictly needed yet. Cc: Ramon Fried <[email protected]> Signed-off-by: Stephan Gerhold <[email protected]>
2021-07-23configs: synquacer: Remove mtdparts settings and update DFU settingMasami Hiramatsu
Since MTD partitions are based on the devicetree name, remove unneeded mtdparts settings and update DFU setting. Signed-off-by: Masami Hiramatsu <[email protected]>
2021-07-23test: add first autoboot unit testsSteffen Jaeckel
This adds tests for the crypt-based and plain SHA256-based password hashing algorithms in the autoboot flow. Signed-off-by: Steffen Jaeckel <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2021-07-23lib: wrap crypt API to hide errno usageSteffen Jaeckel
In order to prevent using the global errno, replace it with a static version and create a wrapper function which returns the error value. Signed-off-by: Steffen Jaeckel <[email protected]> Reviewed-by: Simon Glass <[email protected]> Reviewed-by: Heiko Schocher <[email protected]>
2021-07-23lib: add crypt subsystemSteffen Jaeckel
Add the basic functionality required to support the standard crypt format. The files crypt-sha256.c and crypt-sha512.c originate from libxcrypt and their formatting is therefor retained. The integration is done via a crypt_compare() function in crypt.c. ``` libxcrypt $ git describe --long --always --all tags/v4.4.17-0-g6b110bc ``` Signed-off-by: Steffen Jaeckel <[email protected]> Reviewed-by: Simon Glass <[email protected]> Reviewed-by: Heiko Schocher <[email protected]>
2021-07-23reboot-mode: read the boot mode from RTC memoryNandor Han
RTC devices could provide battery-backed memory that can be used for storing the reboot mode magic value. Add a new reboot-mode back-end that uses RTC to store the reboot-mode magic value. The driver also supports both endianness modes. Signed-off-by: Nandor Han <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2021-07-23reboot-mode: read the boot mode from GPIOs statusNandor Han
A use case for controlling the boot mode is when the user wants to control the device boot by pushing a button without needing to go in user-space. Add a new backed for reboot mode where GPIOs are used to control the reboot-mode. The driver is able to scan a predefined list of GPIOs and return the magic value. Having the modes associated with the magic value generated based on the GPIO values, allows the reboot mode uclass to select the proper mode. Signed-off-by: Nandor Han <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2021-07-23reboot-mode: add support for reboot mode controlNandor Han
A new driver uclass is created to handle the reboot mode control. The new uclass driver is updating an environment variable with the configured reboot mode. The mode is extracted from a map provided at initialization time. The map contains a list of modes and associated ids. Signed-off-by: Nandor Han <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2021-07-23net: remove CONFIG_NET_MULTI (again)Michal Simek
CONFIG_NET_MULTI has been removed long time ago by commit 795428fc679f ("net: remove CONFIG_NET_MULTI") but 4 boards were added later which wasn't found. The patch is removing this reference from 4 boards. Signed-off-by: Michal Simek <[email protected]> Reviewed-by: Chris Packham <[email protected]>
2021-07-23mux: correct prototype for mux_control_try_select()Patrick Wildt
The macro should be passed a state, which should be passed to the actual function. Otherwise using that macro would yield a build error. Signed-off-by: Patrick Wildt <[email protected]> Reviewed-by: Pratyush Yadav <[email protected]>
2021-07-23arm: vexpress64: juno: Enable distro_bootcmd functionalityAndre Przywara
The ARM Juno boards can be used as somewhat decent machines to run off-the-shelf distributions, with USB, SATA, GBit Ethernet and 8GB of DRAM. With stable DTs in the board's NOR flash this would work really nicely, however the default boot command is to fetch a kernel and an initrd from the on-board NOR flash, which sounds somewhat embedded. Include the config_distro_bootcmd.h header and define the available devices (starting with USB, to catch USB installer sticks) to make distributions and UEFI work out of the box. The NOR flash kernel functionality is still preserved as the last resort, should all other methods fail. Signed-off-by: Andre Przywara <[email protected]> Reviewed-by: Simon Glass <[email protected]> Reviewed-by: Linus Walleij <[email protected]>
2021-07-23distro_boot: Fix block device after DHCP boot sequenceAndre Przywara
The generic distro boot sequence iterates over several types of devices, trying one after another. In doing do, it starts with setting the "devtype" variable, then uses this later in more generic commands. Now most (block) device types use a local variable for that, but DHCP puts the type into the environment, where it shadows any local variables. As a consequence any boot attempt after bootcmd_dhcp has been run fails: =========================== VExpress64# run bootcmd_dhcp ... VExpress64# run bootcmd_sata0 SATA#0: (3.0 Gbps) SATA#1: (No RDY) Device 0: Model: 16GB SATA Flash Drive .... ... is now current device Couldn't find partition dhcp 0:1 =========================== This problem typically doesn't show, because DHCP is mostly the last command to try, but is a problem when this order is different, or when distro_bootcmd or bootcmd_xxx are run separately or multiple times. Let bootcmd_dhcp use a local variable, as the other kids do, to make the order of boot commands irrelevant, and allow repeated calls. Signed-off-by: Andre Przywara <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2021-07-23cmd: pinmux: update result of do_statusPatrick Delaunay
Update the result of do_status and always returns a CMD_RET_ value (-ENOSYS was a possible result of show_pinmux). This patch also adds pincontrol name in error messages (dev->name) and treats correctly the status sub command when pin-controller device is not selected. Signed-off-by: Patrick Delaunay <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2021-07-23tee: optee: sync cache on pre-reloc OP-TEE invocationEtienne Carriere
This change ensures both U-Boot and OP-TEE see the same content from shared memory when OP-TEE is invoked prior U-Boot relocation. This change is required since U-Boot may execute with data cache off while OP-TEE always enables cache on memory shared with U-Boot. Signed-off-by: Etienne Carriere <[email protected]> Reviewed-by: Jens Wiklander <[email protected]> Acked-by: Ilias Apalodimas <[email protected]>
2021-07-22Merge branch 'network_master' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-net
2021-07-22net: Use phys_addr_t for SMC net device addressesPeter Hoyes
Use same type as eth_device->iobase and support addresses greater than INT_MAX. Signed-off-by: Peter Hoyes <[email protected]> Reviewed-by: Ramon Fried <[email protected]> Reviewed-by: Andre Przywara <[email protected]>
2021-07-22Merge tag 'dm-pull-21jul21' of ↵Tom Rini
https://gitlab.denx.de/u-boot/custodians/u-boot-dm dtoc improvements to show better warnings minor test build fixes sandbox fixes for SDL2 and running TPL bloblist resize feature binman multithreading
2021-07-21blk: Support iterationSimon Glass
It is useful to be able to iterate over block devices. Typically there are fixed and removable devices. For security reasons it is sometimes useful to ignore removable devices since they are under user control. Add iterators which support selecting the block-device type. Signed-off-by: Simon Glass <[email protected]>
2021-07-21spl: Provide more information on boot failureSimon Glass
If SPL fails to boot, try to provide an error code to indicate what is wrong. For example, if a uclass is missing, this can return -EPFNOSUPPORT (-96) which provides useful information. Add a helper for accessing the image-loader name so we can drop the use of #ifdefs in this code. Put this feature behind a CONFIG_SHOW_ERRORS option to avoid increasing the code size. Signed-off-by: Simon Glass <[email protected]>
2021-07-21bloblist: Tidy up a few API commentsSimon Glass
Some comments for struct bloblist_hdr are a bit ambiguous. Update them to clarify the meaning more precisely. Also document bloblist_get_stats() properly. Signed-off-by: Simon Glass <[email protected]>
2021-07-21bloblist: Support resizing a blobSimon Glass
Sometimes a blob needs to expand, e.g. because it needs to hold more log data. Add support for this. Note that the bloblist must have sufficient spare space for this to work. Signed-off-by: Simon Glass <[email protected]>
2021-07-21cros_ec: Drop cros_ec_entering_mode()Simon Glass
This function is not needed anymore. Drop it. Signed-off-by: Simon Glass <[email protected]>
2021-07-21cros_ec: Allow reading the battery-charge stateSimon Glass
Add a function to read this information from the EC. It is useful for determining whether the battery has enough charge to boot. Signed-off-by: Simon Glass <[email protected]>
2021-07-21sandbox: Support executables for more phasesSimon Glass
The SPL header has a function for obtaining the phase in capital letters, e.g. 'SPL'. Add one for lower-case also, as used by sandbox. Use this to generalise the sandbox logic for determining the filename of the next sandbox executable. This can provide support for VPL. Signed-off-by: Simon Glass <[email protected]>
2021-07-20configs: ls2080ardb.h: Update mc size in envPriyanka Jain
Set MC Firmware size in read commands in env to 2MB. Update DDR Memory read address for MC firmware to 0x80a00000 and MC DPC address to 0x80e00000. Signed-off-by: Priyanka Jain <[email protected]>
2021-07-20configs: ls2080aqds.h: Update mc size in envPriyanka Jain
Set MC Firmware size in read commands in env to 2MB. Update DDR Memory read address for MC firmware to 0x80a00000 and MC DPC address to 0x80e00000. Signed-off-by: Priyanka Jain <[email protected]>
2021-07-20configs: ls1088ardb.h: Update mc size in envPriyanka Jain
Set MC Firmware size in read commands in env to 2MB. Update DDR Memory read address for MC firmware to 0x80a00000 and MC DPC address to 0x80e00000. Signed-off-by: Priyanka Jain <[email protected]>
2021-07-20configs: ls1088aqds.h: Update mc size in envPriyanka Jain
Set MC Firmware size in read commands in env to 2MB. Update DDR Memory read address for MC firmware to 0x80a00000 and MC DPC address to 0x80e00000. Signed-off-by: Priyanka Jain <[email protected]>
2021-07-19Merge https://source.denx.de/u-boot/custodians/u-boot-marvellTom Rini
- Marvell SheevaPlug: Convert Ethernet and SATA to Driver Model (Tony) - Zyxel NSA310S NAS: Convert to Driver Model (Tony) - Turris_omnia: Add `u-boot-env` NOR partition (Marek) - Turris_omnia: Fixup MTD partitions in Linux' DTB (Marek) - Espressobin: Enable 'mtd' command and define SPI NOR partitions (Pali)