aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2021-08-24ls1046ardb_qspi*: Enable RAMBOOT_PBLWIP/migrate-RAMBOOTTom Rini3-0/+9
Based on include/configs/ls1046ardb.h it seems that CONFIG_RAMBOOT_PBL should have been enabled, but was not. Enable and migrate the values to Kconfig. Cc: Mingkai Hu <mingkai.hu@nxp.com> Cc: Rajesh Bhagat <rajesh.bhagat@nxp.com> Signed-off-by: Tom Rini <trini@konsulko.com>
2021-08-24Convert CONFIG_RAMBOOT_PBL et al to KconfigTom Rini66-274/+201
This converts the following to Kconfig: CONFIG_RAMBOOT_PBL CONFIG_SYS_FSL_PBL_PBI CONFIG_SYS_FSL_PBL_RCW Signed-off-by: Tom Rini <trini@konsulko.com>
2021-08-23Merge tag 'efi-2021-10-rc3' of ↵WIP/23Aug2021Tom Rini27-53/+100
https://source.denx.de/u-boot/custodians/u-boot-efi Pull request for efi-2021-10-rc3 Documentation: * Rename Freescale to NXP * Document structures used for the UEFI TCG2 protocol UEFI: * Device paths must use EfiBootServicesData
2021-08-23Merge https://gitlab.denx.de/u-boot/custodians/u-boot-fsl-qoriqTom Rini41-103/+237
fsl-qoriq: Fixes related to env, spi, usb, crypto, configs, distro-boot for Layerscape Boards like lx2, sl28, ls2088ardb. powerpc: Fixes for t208xrdb revd board and cortina related configs update for T208xRDB, T4240RDB.
2021-08-23Merge tag 'for-v2021.10-rc3' of ↵Tom Rini14-3/+569
https://source.denx.de/u-boot/custodians/u-boot-i2c i2c changes for for-v2021.10-rc3 new driver: - Introduce mcp230xx support from Sebastian Reichel new feature: - i2c-gpio: add support for "sda-gpios" + "scl-gpios" i2c-gpio bindings. from Samuel Holland - bootcount: add a new driver with syscon as backend from Nandor Han
2021-08-22Merge branch '2021-08-21-assorted-changes'WIP/22Aug2021Tom Rini6-23/+1146
2021-08-22bootcount: add a new driver with syscon as backendNandor Han7-3/+256
The driver will use a syscon regmap as backend and supports both 16 and 32 size value. The value will be stored in the CPU's endianness. Signed-off-by: Nandor Han <nandor.han@vaisala.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2021-08-22i2c: i2c-gpio: Support the named GPIO bindingSamuel Holland1-0/+9
To avoid confusion about the order of the GPIOs, the i2c-gpio binding was updated to use a separate property for each GPIO instead of an array. However, the driver only supports the old binding. Add support for the new binding as well, so the driver continues to work as device trees are updated. Signed-off-by: Samuel Holland <samuel@sholland.org> Reviewed-by: Heiko Schocher <hs@denx.de>
2021-08-22gpio: mcp230xx: Introduce new driverSebastian Reichel3-0/+246
Introduce driver for I2C based MCP230xx GPIO chips, which are quite common and already well supported by the Linux kernel. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2021-08-22i2c: add dm_i2c_reg_clrsetSebastian Reichel3-0/+58
Add function to apply a bitmask to an i2c register, so that specific bits can be cleared and/or set. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2021-08-21display_options: Do not use %llu in print_sizeWIP/2021-08-21-assorted-changesMatwey V. Kornilov1-1/+6
tiny-printf variant doesn't know how to handle %llu format string, but both tiny-printf and print_size can meet in SPL when TFTP is used to obtain main u-boot image. This is known to lead to critical boot issue at AM335x platform when printf is catched in infinite loop. To avoid such issues and make print_size function tiny-printf friendly, use %u instead of %luu. Note, that the size value is guaranteed to be less than 1024 in this conditional branch, so the cast to unsigned int is safe. Signed-off-by: Matwey V. Kornilov <matwey.kornilov@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2021-08-21tiny-printf: Handle %pM format when CONFIG_SPL_NET_SUPPORT is enabledMatwey V. Kornilov1-13/+13
%pM format string is used to print MAC-address and this is required while SPL network boot. This patch fixes the SPL boot issues like the following: Trying to boot from USB eth ## Error: flags type check failure for "ethaddr" <= "40309614M" (type: m) ## Error inserting "ethaddr" variable, errno=1 eth0: eth_cpsw## Error: flags type check failure for "eth1addr" <= "81f01114M" (type: m) ## Error inserting "eth1addr" variable, errno=1 , eth1: usb_ether eth_cpsw Waiting for PHY auto negotiation to complete......... TIMEOUT ! Problem booting with BOOTP SPL: failed to boot from all boot devices ### ERROR ### Please RESET the board ### Signed-off-by: Matwey V. Kornilov <matwey.kornilov@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2021-08-21Fix flashing of eMMC user area with FastbootOleh Kravchenko1-7/+15
'gpt' and 'mmc0' fastboot partitions have been treated as the same device, but it is wrong. Fill disk_partition structure with eMMC user partition info to properly flash data. Signed-off-by: Oleh Kravchenko <oleg@kaa.org.ua> Cc: Pantelis Antoniou <panto@antoniou-consulting.com> Cc: Marek Vasut <marex@denx.de> Cc: Sean Anderson <sean.anderson@seco.com> Cc: Tom Rini <trini@konsulko.com> Reviewed-by: Sean Anderson <sean.anderson@seco.com>
2021-08-21Fix flash and erase of eMMC Boot2 with FastbootOleh Kravchenko1-2/+2
The current U-Boot version has the next matches for boot partitions: > mmc0boot0 to EMMC_BOOT1 > mmc0boot1 to EMMC_BOOT1 (should be EMMC_BOOT2) This patch fixes a typo for the boot partition number. Signed-off-by: Oleh Kravchenko <oleg@kaa.org.ua> Cc: Pantelis Antoniou <panto@antoniou-consulting.com> Cc: Marek Vasut <marex@denx.de> Reviewed-by: Sean Anderson <sean.anderson@seco.com>
2021-08-21clk: clk_versaclock: Add support for versaclock driverAdam Ford3-0/+1110
The driver is based on the Versaclock driver from the Linux code, but due differences in the clock API between them, some pieces had to be changed. This driver creates a mux, pfd, pll, and a series of fod ouputs. Rate Usecnt Name ------------------------------------------ 25000000 0 `-- x304-clock 25000000 0 `-- clock-controller@6a.mux 25000000 0 |-- clock-controller@6a.pfd 2800000000 0 | `-- clock-controller@6a.pll 33333333 0 | |-- clock-controller@6a.fod0 33333333 0 | | `-- clock-controller@6a.out1 33333333 0 | |-- clock-controller@6a.fod1 33333333 0 | | `-- clock-controller@6a.out2 50000000 0 | |-- clock-controller@6a.fod2 50000000 0 | | `-- clock-controller@6a.out3 125000000 0 | `-- clock-controller@6a.fod3 125000000 0 | `-- clock-controller@6a.out4 25000000 0 `-- clock-controller@6a.out0_sel_i2cb A translation function is added so the references to <&versaclock X> get routed to the corresponding clock-controller@6a.outX. Signed-off-by: Adam Ford <aford173@gmail.com> Reviewed-by: Sean Anderson <sean.anderson@seco.com>
2021-08-20configs: lx2160a: load device-tree in RAM for distro bootPriyanka Jain1-0/+3
Update boot-commands to load device-tree from boot-device at 'fdt_addr_r' address in DDR during distro-boot. Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com>
2021-08-19Merge https://source.denx.de/u-boot/custodians/u-boot-riscvWIP/19Aug2021Tom Rini6-4/+29
2021-08-18crypto/fsl: fix missed dma_addr_t -> caam_dma_addr_t conversionHoria Geantă1-1/+1
One of the "dma_addr_t" instances was left out when converting to "caam_dma_addr_t". Fixes: 2ff17d2f74c5 ("crypto: fsl: refactor for 32 bit version CAAM support on ARM64") Signed-off-by: Horia Geantă <horia.geanta@nxp.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2021-08-18board: T4240rdb: Extend cs4340_get_fw_addr() functionalityKuldeep Singh2-0/+22
T4240RDB supports booting from 2 nor banks(default and altbank). The corresponding defconfig can only have one entry defined and therefore, extend cs4340_get_fw_addr() function to overwrite firmware address which will be later used in cortina firmware. Signed-off-by: Kuldeep Singh <kuldeep.singh@nxp.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2021-08-18board: t208x: Extend cs4340_get_fw_addr() functionalityKuldeep Singh2-0/+23
T2080RDB supports booting from 2 nor banks(default and altbank). The corresponding defconfig can only have one entry defined and therefore, extend cs4340_get_fw_addr() function to overwrite firmware address which will be later used in cortina firmware. Signed-off-by: Kuldeep Singh <kuldeep.singh@nxp.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2021-08-18board: ls2088ardb: Extend cs4340_get_fw_addr() functionalityKuldeep Singh1-0/+38
LS2088A-RDB supports TFA boot source and has 2 nor banks(default and altbank) and QSPI as boot source. The corresponding defconfig can only have one entry defined and therefore, extend cs4340_get_fw_addr() function to overwrite firmware address which will be later used in cortina firmware. Signed-off-by: Kuldeep Singh <kuldeep.singh@nxp.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2021-08-18net: cortina: Add support for tfa boot in cortina firmwareKuldeep Singh1-10/+69
Add support for boards supporting TFA boot separately in cortina firmware. Please note, a weak function is defined to retrieve firmware address values as CONFIG_CORTINA_FW_ADDR is now defined in defconfig and can only have one possible value defined. This weak function will help in overwrting the values to get proper addresses as per boot source. Signed-off-by: Kuldeep Singh <kuldeep.singh@nxp.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2021-08-18configs: Migrate CORTINA_FW_ADDR and CORTINA_FW_LENGTH to KconfigKuldeep Singh21-20/+26
Use moveconfig.py script to convert below defines to Kconfig and move these entries to defconfigs. CONFIG_CORTINA_FW_ADDR CONFIG_CORTINA_FW_LENGTH Signed-off-by: Kuldeep Singh <kuldeep.singh@nxp.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2021-08-18env: Kconfig: Add default option for PHY_CORTINAKuldeep Singh1-1/+1
Add PHY_CORTINA as default option in SYS_MMC_ENV_DEV Kconfig entry as PHY_CORTINA require SYS_MMC_ENV_DEV value similar to FMAN_ENET or QE. This helps in resolving compilation failure. Signed-off-by: Kuldeep Singh <kuldeep.singh@nxp.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2021-08-18armv8: fsl : create bootcmd and mcinitcmd as per boot sourceWasim Khan1-3/+6
NXP platforms expect custom bootcmd and mcinitcmd to be updated as per boot source with default environment. Check env variable fsl_bootcmd_mcinitcmd_set to prepare bootcmd and mcinitcmd Fixes: cbf77d201870 (armv8: fsl-layerscape: Fix automatic setting of bootmcd with TF-A) Signed-off-by: Wasim Khan <wasim.khan@nxp.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2021-08-18board: fsl_validate: Fix resource leak issueKshitiz Varshney1-9/+27
Free dynamically allocated memory before every return statement in calc_img_key_hash() and calc_esbchdr_esbc_hash() function. Verified the secure boot changes using ls1046afrwy board. Signed-off-by: Kshitiz Varshney <kshitiz.varshney@nxp.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2021-08-18board: freescale: t208xrdb: enable Power-On Reset for rev D boardsCamelia Groza2-0/+11
Starting with board revision D, the MISCCSR CPLD register needs to be configured to enable Power-on Reset for software reset commands. Signed-off-by: Camelia Groza <camelia.groza@nxp.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2021-08-18lx2160a: Enable CONFIG_SPI_FLASH_MT35XU for lx2160a-rdb/qdsKuldeep Singh5-0/+5
LX2160A-RDB/QDS has micron mt35xu512aba flash which requires flag CONFIG_SPI_FLASH_MT35XU on to probe flash successfully. Signed-off-by: Kuldeep Singh <kuldeep.singh@nxp.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2021-08-18board: sl28: drop unneeded and outdated flash partitionsMichael Walle1-55/+0
This board doesn't use the MTD subsystem in u-boot, thus there is no need to specify the partitions. They are outdated anyway. Just drop them. Signed-off-by: Michael Walle <michael@walle.cc> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2021-08-18arm: Finish migration of HAS_FSL_XHCI_USBTom Rini2-3/+4
This symbol was largely migrated, except for one case. Update it. Cc: Priyanka Jain <priyanka.jain@nxp.com> Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2021-08-18spi: nxp_fspi: Ensure width is respected in spi-mem operationsMichael Walle1-1/+1
Import linux commit 007773e16a6f ("spi: nxp-fspi: Ensure width is respected in spi-mem operations") to fix SPI access on boards which don't have all SPI I/O lines connected to the flash. Since commit 71025f013ccb ("mtd: spi-nor-core: Rework hwcaps selection") u-boot figures out the capabilities by looking at spi_mem_supports_op(). The FlexSPI driver doesn't take the board layout into account. Fix that. Fixes: 383fded70c4f ("spi: nxp_fspi: new driver for the FlexSPI controller") Signed-off-by: Michael Walle <michael@walle.cc> Reviewed-by: Pratyush Yadav <p.yadav@ti.com> Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
2021-08-17efi_loader: use EfiBootServicesData for DP to textHeinrich Schuchardt1-1/+1
Memory allocated in the implementation of the EFI_DEVICE_PATH_TO_TEXT_PROTOCOL must be of type EfiBootServicesData. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2021-08-17efi_loader: use EfiBootServicesData for device pathHeinrich Schuchardt1-1/+1
dp_alloc() was using a constant from the wrong enum resulting in creating device paths in EfiReservedMemory. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2021-08-17efi_loader: use correct type for AllocatePages, AllocatePoolHeinrich Schuchardt2-6/+8
Use enum efi_memory_type and enum_allocate_type in the definitions of the efi_allocate_pages(), efi_allocate_pool(). In the external UEFI API leave the type as int as the UEFI specification explicitely requires that enums use a 32bit type. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2021-08-17efi_loader rename enum efi_mem_type to efi_memory_typeHeinrich Schuchardt3-3/+3
Use the same name as in the UEFI specification to avoid confusion. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2021-08-17efi_loader: use an enum for the memory allocation typesHeinrich Schuchardt1-6/+28
For type checking we need an enum. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2021-08-17efi_loader: add comment for efi_tcg2.hMasahisa Kojima1-3/+54
This commit adds the comment of the TCG Specification efi_tcg2.h file refers, and comment for the structure. Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2021-08-17doc: move doc/board/st/st.rstHeinrich Schuchardt2-1/+1
'make htmldocs' does not use file doc/board/st/st.rst because the name matches the directory name. Let's rename it to st-dt.rst. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2021-08-17doc: rename Freescale to NXPHeinrich Schuchardt14-3/+3
Freescale Semiconductor, Inc. was merged into NXP Semiconductors in 2015. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2021-08-17doc: move i.MX7D/i.MX8MM A/B booting to board specificHeinrich Schuchardt5-29/+1
Having "i.MX7D/i.MX8MM SRC_GPR10 PERSIST_SECONDARY_BOOT for bootloader A/B switching" at the top level of the documentation tree does not make sense. Move it to board specific information. Fixes: 59e3d1bd4992 ("doc: imx: psb: Document usage of SRC_GPR10 PERSIST_SECONDARY_BOOT for A/B switching") Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2021-08-17Merge https://source.denx.de/u-boot/custodians/u-boot-tegraTom Rini1-2/+18
2021-08-17board: sifive: overwrite board_fdt_blob_setup in u-boot properZong Li2-0/+22
Add board_fdt_blob_setup to return the device tree location which is passed by prior stage in u-boot proper. The generic board_fdt_blob_setup always returns _end, it mignt be ok because u-boot SPL would currently put the dtb there, but it would be broken if we put the dtb to another place and assigned the location into a1 register for u-boot proper. Use the location passed by prior stage would make more sence, because we actually pass the location to u-boot proper and want to use that one, rather than the dtb which in _end. We can't use CONFIG_OF_PRIOR_STAGE because it doens't distinguish the implementation of u-boot SPL and u-boot proper, so u-boot SPL need to reply on the prior stage to pass device tree location as well, but we don't pass the DT from boot rom now. In addition, when CONFIG_OF_PRIOR_STAGE is enabled, the u-boot-spl.bin and u-boot.itb won't include the device tree. Signed-off-by: Zong Li <zong.li@sifive.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2021-08-17board: sifive: compile stuff only related to SPL in SPL buildZong Li2-3/+4
As (3581811dc26f "riscv: sifive/fu540: Move SPL related functions to spl.c"), we put the SPL stuff in spl.c, we don't need to compile unleashed.c and unmatched.c in SPL build. Signed-off-by: Zong Li <zong.li@sifive.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2021-08-17riscv: cpu: fu740: Fix typo of dateZong Li1-1/+1
Fixed the typo of date of copyright declaration. Signed-off-by: Zong Li <zong.li@sifive.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2021-08-17qemu-riscv64_smode: fix extlinux (define preboot)Dimitri John Ledkov1-0/+2
Commit 37304aaf60bf ("Convert CONFIG_USE_PREBOOT and CONFIG_PREBOOT to Kconfig") removed preboot commands in RISC-V targets and broke extlinux support as reported by Fu Wei <wefu@redhat.com>. The patch finishes migration of CONFIG_USE_PREBOOT and CONFIG_REBOOT to Kconfig. Fixes: 37304aaf60bf ("Convert CONFIG_USE_PREBOOT and CONFIG_PREBOOT to Kconfig") Reported-By: Fu Wei <wefu@redhat.com> Signed-off-by: David Abdurachmanov <david.abdurachmanov@sifive.com> Signed-off-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2021-08-16board: apalis-tk1: launch toradex easy installer in usb recoveryMarcel Ziswiler1-2/+18
The USB recovery mode is used by Toradex to load the Toradex Easy Installer image which supports further system images installation. Prepare for loading and launching the Toradex Easy Installer if the USB Recovery mode is activated. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com> Signed-off-by: Tom Warren <twarren@nvidia.com>
2021-08-16Prepare v2021.10-rc2v2021.10-rc2Tom Rini1-1/+1
Signed-off-by: Tom Rini <trini@konsulko.com>
2021-08-16configs: Resync with savedefconfigWIP/16Aug2021Tom Rini37-41/+6
Rsync all defconfig files using moveconfig.py Signed-off-by: Tom Rini <trini@konsulko.com>
2021-08-16Merge https://source.denx.de/u-boot/custodians/u-boot-stmTom Rini37-133/+887
Highlights: - Handle TF-A boot with FIP for STM32MP1 - Fix board_get_usable_ram_top(0) for STM32MP1 - DT alignement with kernel v5.14 for STM32MP1 - SPI-NOR DT update for DHSOM - Add UCLASS API for ECDSA singnature and implement it for STM32MP1
2021-08-16test: dm: Add test for ECDSA UCLASS supportAlexandru Gagniuc3-0/+41
This test verifies that ECDSA_UCLASS is implemented, and that ecdsa_verify() works as expected. The definition of "expected" is "does not find a device, and returns -ENODEV". The lack of a hardware-independent ECDSA implementation prevents us from having one in the sandbox, for now. Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>