aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/mach-imx/imx8
AgeCommit message (Collapse)AuthorFilesLines
2024-03-30imx8: Add a default reset_cpu() implementationFabio Estevam1-0/+4
Add a weak default reset_cpu() implementation just like it is done on arch/arm/mach-imx/cpu.c. This allows the removal of the empty reset_cpu() in several board files. Signed-off-by: Fabio Estevam <festevam@denx.de> Tested-by: Hiago De Franco <hiago.franco@toradex.com> # Toradex Colibri iMX8X
2024-02-08imx: imx8: print reset causeIgor Opaniuk1-0/+41
Add support for printing reset cause during boot. Signed-off-by: Igor Opaniuk <igor.opaniuk@foundries.io>
2023-12-13imx: imx8: ahab: refactor do_ahab_close commandIgor Opaniuk1-16/+29
Move an OEM closing logic to ahab_close() function to be able to use it directly without calling a u-boot command. Signed-off-by: Igor Opaniuk <igor.opaniuk@foundries.io> Co-developed-by: Oleksandr Suvorov <oleksandr.suvorov@foundries.io> Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@foundries.io>
2023-10-17arm: imx: Check header before calling spl_load_imx_containerSean Anderson1-1/+1
Make sure we have an IMX header before calling spl_load_imx_container, since if we don't it will fail with -ENOENT. This allows us to fall back to legacy/raw images if they are also enabled. This is a functional change, one which likely should have been in place from the start, but a functional change nonetheless. Previously, all non-IMX8 images (except FITs without FIT_FULL) would be optimized out if the only image load method enabled supported IMX8 images. With this change, support for other image types now has an effect. There are seven boards with SPL_LOAD_IMX_CONTAINER enabled: three with SPL_BOOTROM_SUPPORT: imx93_11x11_evk_ld imx93_11x11_evk imx8ulp_evk and four with SPL_MMC: deneb imx8qxp_mek giedi imx8qm_mek All of these boards also have SPL_RAW_IMAGE_SUPPORT and SPL_LEGACY_IMAGE_FORMAT enabled as well. However, none have FIT support enabled. Of the six load methods affected by this patch, only SPL_MMC and SPL_BOOTROM_SUPPORT are enabled with SPL_LOAD_IMX_CONTAINER. spl_romapi_load_image_seekable does not support legacy or raw images, so there is no growth. However, mmc_load_image_raw_sector does support loading legacy/raw images. Since these images could not have been booted before, I have disabled support for legacy/raw images on these four boards. This reduces bloat from around 800 bytes to around 200. There are no in-tree boards with SPL_LOAD_IMX_CONTAINER and AHAB_BOOT both enabled, so we do not need to worry about potentially falling back to legacy images in a secure boot scenario. Future work could include merging imx_container.h with imx8image.h, since they appear to define mostly the same structures. Signed-off-by: Sean Anderson <seanga2@gmail.com>
2023-10-17arm: imx: Add function to validate i.MX8 containersSean Anderson1-1/+1
Add a function to abstract the common task of validating i.MX8 container image headers. Signed-off-by: Sean Anderson <seanga2@gmail.com>
2023-09-24common: Drop linux/printk.h from common headerSimon Glass1-0/+1
This old patch was marked as deferred. Bring it back to life, to continue towards the removal of common.h Move this out of the common header and include it only where needed. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-08-31event: Convert existing spy records to simpleSimon Glass1-2/+2
Very few of the existing event-spy records use the arguments they are passed. Update them to use a simple spy instead, to simplify the code. Where an adaptor function is currently used, remove it where possible. Signed-off-by: Simon Glass <sjg@chromium.org>
2023-08-09Kconfigs: Correct default of "0" on hex type entriesTom Rini1-2/+2
It is not a parse error to have a default value of "0" for a "hex" type entry, instead of "0x0". However, "0" and "0x0" are not treated the same even by the tools themselves. Correct this by changing the default value from "0" to "0x0" for all hex type questions that had the incorrect default. Fix one instance (in two configs) of a default of "0" being used on a hex question to be "0x0". Remove the cases where a defconfig had set a value of "0x0" to be used as the default had been "0". Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-07-13imx: imx8: ahab: sha256: enable image verification using ARMv8 crypto extensionGaurav Jain1-4/+24
add support for SHA-256 secure hash algorithm using the ARM v8 SHA-256 instructions for verifying image hash. Signed-off-by: Gaurav Jain <gaurav.jain@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
2023-07-13imx: ahab: Update AHAB for iMX8 and iMX8ULPYe Li1-47/+82
Abstract common interfaces for AHAB authentication operations. Then share some common codes for AHAB and SPL container authentication Signed-off-by: Ye Li <ye.li@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
2023-07-13imx: imx8: bootaux: Add i.MX8 M4 boot supportYe Li1-0/+174
1. Implement bootaux for the M4 boot on i.MX8QM and QXP. Users need to download M4 image to any DDR address first. Then use the "bootaux <M4 download DDR address> [M4 core id]" to boot CM4_0 or CM4_1, the default core id is 0 for CM4_0. Since current M4 only supports running in TCM. The bootaux will copy the M4 image from DDR to its TCML. 2. Implment bootaux for HIFI on QXP command: bootaux 0x81000000 1 Signed-off-by: Ye Li <ye.li@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
2023-07-13imx: mach: correct SCU API usagePeng Fan4-100/+93
The return value is int type, not sc_err_t(u8), correct the usage. Signed-off-by: Peng Fan <peng.fan@nxp.com>
2023-05-21imx: move imx8 sci header file to include/firmware/imxPeng Fan6-6/+6
Move imx8 sci header file to include/firmware/imx, then we could use build macro to reuse some i.MX8 drivers for i.MX9, such as drivers/cpu/imx8_cpu.c. Signed-off-by: Peng Fan <peng.fan@nxp.com> Signed-off-by: Stefano Babic <sbabic@denx.de>
2023-05-11dm: Emit the arch_cpu_init_dm() even only before relocationSimon Glass1-1/+1
The original function was only called once, before relocation. The new one is called again after relocation. This was not the intent of the original call. Fix this by renaming and updating the calling logic. With this, chromebook_link64 makes it through SPL. Fixes: 7fe32b3442f0 ("event: Convert arch_cpu_init_dm() to use events") Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2023-05-02imx: support i.MX8QM DMSSE20 a1 boardOliver Graute1-0/+8
Add i.MX8QM DMSSE20 a1 board support U-Boot 2023.04-00030-g7be2f547b2 (Apr 21 2023 - 11:11:43 +0200) Model: Advantech iMX8QM DMSSE20 Board: DMS-SE20A1 8GB Build: SCFW 549b1e18, SECO-FW c9de51c0, ATF 5782363 Boot: USB DRAM: 8 GiB Core: 100 devices, 19 uclasses, devicetree: separate MMC: FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2 Loading Environment from MMC... OK In: serial@5a060000 Out: serial@5a060000 Err: serial@5a060000 Net: eth0: ethernet@5b040000 Warning: ethernet@5b050000 (eth1) using random MAC address - 32:05:0c:f9:5e:10 , eth1: ethernet@5b050000 Hit any key to stop autoboot: 0 Signed-off-by: Oliver Graute <oliver.graute@kococonnector.com>
2023-03-30Revert "imx: imx8x: colibri: switch to binman"Andrejs Cainikovs1-1/+0
This reverts commit bdadc140a127b14a666d2007eddc3f65c8de7d5a. We do not want this, see [1]. [1] https://lore.kernel.org/all/56cf058164f331ce99ce75b0751b825ee2e07fc0.camel@toradex.com/ Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs@toradex.com>
2022-11-21Revert "imx: imx8: apalis: switch to binman"Stefano Babic1-1/+0
This reverts commit b8072ae848b73e89a73ba5b535324e4dc2793f37. Signed-off-by: Stefano Babic <sbabic@denx.de> Reported-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2022-11-09imx: imx8: apalis: switch to binmanOliver Graute1-0/+1
Switch to use binman to pack images Signed-off-by: Oliver Graute <oliver.graute@kococonnector.com>
2022-11-09imx: imx8x: colibri: switch to binmanOliver Graute1-0/+1
Switch to use binman to pack images Signed-off-by: Oliver Graute <oliver.graute@kococonnector.com>
2022-11-09imx: imx8qxp: deneb switch to binmanOliver Graute1-0/+1
Signed-off-by: Oliver Graute <oliver.graute@kococonnector.com> Reviewed-by: Peng Fan <peng.fan@nxp.com>
2022-11-09imx: imx8qxp: giedi switch to binmanOliver Graute1-0/+1
Switch to use binman to pack images Signed-off-by: Oliver Graute <oliver.graute@kococonnector.com>
2022-11-09imx: imx8qm: imx8qm_mek switch to binmanOliver Graute1-0/+1
Switch to use binman to pack images Signed-off-by: Oliver Graute <oliver.graute@kococonnector.com>
2022-11-09imx: imx8qxp: imx8qxp_mek switch to binmanOliver Graute1-0/+1
Switch to use binman pack images Signed-off-by: Oliver Graute <oliver.graute@kococonnector.com> Reviewed-by: Peng Fan <peng.fan@nxp.com>
2022-11-09imx: imx8qm: cgtqmx8: switch to binmanOliver Graute1-0/+1
Switch to use binman to pack images Signed-off-by: Oliver Graute <oliver.graute@kococonnector.com> Reviewed-by: Fabio Estevam <festevam@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Peng Fan <peng.fan@nxp.com>
2022-11-09imx: imx8qm-rom7720: switch to binmanOliver Graute1-0/+1
Switch to use binman to pack images Signed-off-by: Oliver Graute <oliver.graute@kococonnector.com>
2022-10-31Rename CONFIG_SYS_TEXT_BASE to CONFIG_TEXT_BASESimon Glass1-2/+2
The current name is inconsistent with SPL which uses CONFIG_SPL_TEXT_BASE and this makes it imposible to use CONFIG_VAL(). Rename it to resolve this problem. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-07-07spl: Ensure all SPL symbols in Kconfig have some SPL dependencyTom Rini1-2/+2
Tighten up symbol dependencies in a number of places. Ensure that a SPL specific option has at least a direct dependency on SPL. In places where it's clear that we depend on something more specific, use that dependency instead. This means in a very small number of places we can drop redundant dependencies. Reported-by: Pali Rohár <pali@kernel.org> Signed-off-by: Tom Rini <trini@konsulko.com>
2022-06-28siemens: Move CONFIG_FACTORYSET to KconfigTom Rini1-0/+2
Introduce board/siemens/common/Kconfig and have it hold FACTORYSET to start with. Use select for this on the boards that need it. Cc: Anatolij Gustschin <agust@denx.de> Cc: Samuel Egli <samuel.egli@siemens.com> Signed-off-by: Tom Rini <trini@konsulko.com>
2022-05-20caam: Fix crash in case caam_jr_probe failedYe Li1-1/+1
If probing caam_jr returns failure, the variable "dev" will not be initialized, so we can't use dev->name for the error print. Otherwise it will cause crash. Signed-off-by: Ye Li <ye.li@nxp.com> Reviewed-by: Gaurav Jain <gaurav.jain@nxp.com>
2022-04-21toradex: apalis-imx8x: drop support for apalis imx8xDenys Drozdov1-6/+0
Drop Apalis iMX8X platform as it never left sample state and is no longer supported. Signed-off-by: Denys Drozdov <denys.drozdov@toradex.com> Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2022-04-12crypto/fsl: i.MX8: Enable Job ring driver model.Gaurav Jain2-1/+24
i.MX8(QM/QXP) - added support for JR driver model. sec is initialized based on job ring information processed from device tree. Signed-off-by: Gaurav Jain <gaurav.jain@nxp.com> Signed-off-by: Horia Geantă <horia.geanta@nxp.com> Reviewed-by: Ye Li <ye.li@nxp.com>
2022-03-10event: Convert arch_cpu_init_dm() to use eventsSimon Glass1-1/+3
Instead of a special function, send an event after driver model is inited and adjust the boards which use this function. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-09-07imx: Convert SERIAL_TAG support to ENV_VARS_UBOOT_RUNTIME_CONFIGTom Rini1-2/+2
No iMX platforms have supported ATAG-based booting. They have however re-used the CONFIG_SERIAL_TAG option as a way to enable support of reading the OTP fuses and setting the serial# environment variable in some cases. Change the warp7 support to use this symbol, use this for updating the rest of the imx7 code, and update the imx8 conditionals. Cc: Stefano Babic <sbabic@denx.de> Cc: Fabio Estevam <festevam@gmail.com> Cc: NXP i.MX U-Boot Team <uboot-imx@nxp.com> Signed-off-by: Tom Rini <trini@konsulko.com>
2021-08-09arm: imx: move container Kconfig under mach-imxPeng Fan1-13/+0
Since i.MX8 and i.MX8ULP reuse common container, so move the Kconfig public to both. Signed-off-by: Peng Fan <peng.fan@nxp.com>
2021-08-09arm: imx8: Move container image header file to mach-imxYe Li1-1/+1
Since the container is shared among i.MX platforms, move its header file to mach-imx Signed-off-by: Ye Li <ye.li@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
2021-08-09arm: imx8: Move container parser and image to mach-imx common folderYe Li3-460/+0
Since we will re-use the container parser on imx8ulp, move the codes to mach-imx Signed-off-by: Ye Li <ye.li@nxp.com>
2021-08-02global: Convert simple_strtoul() with decimal to dectoul()Simon Glass1-1/+1
It is a pain to have to specify the value 10 in each call. Add a new dectoul() function and update the code to use it. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-08-02global: Convert simple_strtoul() with hex to hextoul()Simon Glass2-28/+28
It is a pain to have to specify the value 16 in each call. Add a new hextoul() function and update the code to use it. Add a proper comment to simple_strtoul() while we are here. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-06-09imx: support for conga-QMX8 boardOliver Graute1-0/+7
Add i.MX8QM qmx8 congatec board support U-Boot 2021.07-rc3-00528-gc9a966d9dd (May 31 2021 - 15:21:25 +0200) CPU: NXP i.MX8QM RevB A53 at 1200 MHz Model: Congatec QMX8 Qseven series Board: conga-QMX8 Build: SCFW 494c97f3, SECO-FW d63fdb21, ATF 09c5cc9 Boot: SD2 DRAM: 6 GiB MMC: FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2 Loading Environment from MMC... OK In: serial@5a060000 Out: serial@5a060000 Err: serial@5a060000 switch to partitions #0, OK mmc2 is current device Net: Error: ethernet@5b040000 address not set. No ethernet found. Hit any key to stop autoboot: 0 Signed-off-by: Oliver Graute <oliver.graute@kococonnector.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Fabio Estevam <festevam@gmail.com> Cc: Peng Fan <peng.fan@nxp.com> Cc: Simon Glass <sjg@chromium.org> Cc: Ye Li <ye.li@nxp.com> Cc: uboot-imx <uboot-imx@nxp.com>
2021-04-08imx8: Add DEK blob encapsulationClement Faure1-0/+1
Add DEK encapsulation support for imx8. The DEK blob is generated by the SECO through the SCFW API. Signed-off-by: Clement Faure <clement.faure@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
2021-02-02common: Drop asm/global_data.h from common headerSimon Glass6-0/+6
Move this out of the common header and include it only where needed. In a number of cases this requires adding "struct udevice;" to avoid adding another large header or in other cases replacing / adding missing header files that had been pulled in, very indirectly. Finally, we have a few cases where we did not need to include <asm/global_data.h> at all, so remove that include. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com>
2020-12-26imx: ahab: allow to bypass confirmation for ahab_close cmdClément Péron1-1/+2
Calling ahab_close cmd force the user to interact for confirmation. This is not user-friendly when using this cmd during factory process. Allow the user to pass '-y' option to bypass this confirmation. Signed-off-by: Clément Péron <peron.clem@gmail.com> Reviewed-by: Peng Fan <peng.fan@nxp.com> Acked-by: Oliver Graute <oliver.graute@kococonnector.com>
2020-12-06imx8: allow overriding memory layoutMarcel Ziswiler1-29/+67
Introduce weak function board_mem_get_layout() which allows overriding the memory layout from board code in runtime, useful for handling different SKU versions. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com> Reviewed-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
2020-12-06board: toradex: add apalis-imx8x 2gb wb it v1.1a module supportIgor Opaniuk1-0/+6
This commit adds initial support for the Toradex Apalis iMX8X 2GB WB IT V1.1A System on Module support [1]. Boot log: U-Boot 2020.10-02940-g894aebb7e8-dirty (Oct 22 2020 - 09:43:57 +0300) CPU: NXP i.MX8QXP RevB A35 at 1200 MHz at 30C DRAM: 2 GiB MMC: FSL_SDHC: 0, FSL_SDHC: 1 Loading Environment from MMC... OK In: serial@5a070000 Out: serial@5a070000 Err: serial@5a070000 Model: Toradex Apalis iMX8 QuadXPlus 2GB Wi-Fi / BT IT V1.1A, Serial# 06617018 Net: eth0: ethernet@5b040000 [PRIME] Hit any key to stop autoboot: 0 Functionality wise the following is known to be working: - eMMC and MMC/SD card - Ethernet (*) - GPIOs - I2C Unfortunately, there is no USB functionality for the i.MX 8QXP as of yet. * With the SCU FW from the latest Toradex BSP 5.0.0 (SCU FW 1.5.1) ETH PHY encounters bring up problems after reset, this will be fixed soon on SCU FW side. [1] https://www.toradex.com/computer-on-modules/apalis-arm-family/nxp-imx-8x Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com> Acked-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
2020-12-06imx: ahab: fix implicit declaration warningOliver Graute1-0/+1
Fix the following warning: arch/arm/mach-imx/imx8/ahab.c:105:3: warning: implicit declaration of function ‘flush_dcache_range’ [-Wimplicit-function-declaration] flush_dcache_range(s, e); ^~~~~~~~~~~~~~~~~~ Include cpu_func.h header which declares the flush_dcache_range() function. Signed-off-by: Oliver Graute <oliver.graute@kococonnector.com> Cc: Stefano Babic <sbabic@denx.de> Cc: uboot-imx <uboot-imx@nxp.com>
2020-12-06imx: ahab: fix compiler warnings in debugOliver Graute1-1/+1
arch/arm/mach-imx/imx8/ahab.c: In function ‘authenticate_os_container’: arch/arm/mach-imx/imx8/ahab.c:96:9: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 9 has type ‘ulong {aka long unsigned int}’ [-Wformat=] debug("img %d, dst 0x%x, src 0x%x, size 0x%x\n", Fix those by using "%lu" specified. Signed-off-by: Oliver Graute <oliver.graute@kococonnector.com> Cc: Stefano Babic <sbabic@denx.de> Cc: uboot-imx <uboot-imx@nxp.com>
2020-12-06imx: ahab: Fix compiler warnings in printfOliver Graute1-1/+1
arch/arm/mach-imx/imx8/ahab.c:110:63: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 2 has type ‘u64 {aka long long unsigned int}’ [-Wformat=] Fix those by using %llx Signed-off-by: Oliver Graute <oliver.graute@kococonnector.com> Cc: Stefano Babic <sbabic@denx.de> Cc: uboot-imx <uboot-imx@nxp.com>
2020-07-17treewide: convert bd_t to struct bd_info by coccinelleMasahiro Yamada2-3/+3
The Linux coding style guide (Documentation/process/coding-style.rst) clearly says: It's a **mistake** to use typedef for structures and pointers. Besides, using typedef for structures is annoying when you try to make headers self-contained. Let's say you have the following function declaration in a header: void foo(bd_t *bd); This is not self-contained since bd_t is not defined. To tell the compiler what 'bd_t' is, you need to include <asm/u-boot.h> #include <asm/u-boot.h> void foo(bd_t *bd); Then, the include direcective pulls in more bloat needlessly. If you use 'struct bd_info' instead, it is enough to put a forward declaration as follows: struct bd_info; void foo(struct bd_info *bd); Right, typedef'ing bd_t is a mistake. I used coccinelle to generate this commit. The semantic patch that makes this change is as follows: <smpl> @@ typedef bd_t; @@ -bd_t +struct bd_info </smpl> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2020-07-14imx8: misc: use arm_smccc_smcPeng Fan1-2/+5
Use arm_smccc_smc to replace call_imx_sip Signed-off-by: Peng Fan <peng.fan@nxp.com>
2020-05-18common: Drop log.h from common headerSimon Glass7-0/+7
Move this header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>