summaryrefslogtreecommitdiff
path: root/arch/arm/mach-imx/Makefile
AgeCommit message (Collapse)Author
2023-01-31arm: imx: Drop custom lowlevel_initMarek Vasut
The custom lowlevel_init implementation is no longer necessary, since it is responsible for routing and trapping SErrors in U-Boot in EL2, which is implemented in common code since commit: 6c7691edd55 ("armv8: Always unmask SErrors") Signed-off-by: Marek Vasut <marex@denx.de>
2022-10-31Rename CONFIG_SYS_TEXT_BASE to CONFIG_TEXT_BASESimon Glass
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-26imx: add basic i.MX9 supportPeng Fan
Add i.MX9 Kconfig and basic files for the new SoC Signed-off-by: Peng Fan <peng.fan@nxp.com>
2022-07-26imx: move get_boot_device to common filePeng Fan
i.MX8MN/P/ULP supports ROM API, they have almost same get_boot_device implementation, so move to a common file. And when support i.MX9, no need to include the other function copy. Since sys_proto.h is included in imx_romapi.c, there will be build warning for i.MX8M because wdog_regs not defined, so include imx-regs.h in i.MX8M sys_proro.h Signed-off-by: Peng Fan <peng.fan@nxp.com>
2022-07-25imx8: add rom api wrappersRasmus Villemoes
The ROM API is thoroughly undocumented, but apparently passing the xor of the real arguments as an extra argument is required [1]. Also, we need to do the "save gd/restore gd" dance. These are both error-prone, and lead to a lot of code duplication. Since both imx8m[np] and imx8ulp SOCs have this, add a separate translation unit which is included precisely when the new CONFIG_IMX8_ROMAPI symbol is set, which provide convenience wrappers that take care of computing the xor value as well as doing the gd dance, and that thus have a more intuitive API. Subsequent patches will make use of these to reduce boilerplate. [1] One wonders, for example, if the check is only applied to the lower 32 bits, or if we're implicitly relying on all 64-bit pointer values we're passing effectively have 0 in the upper 32 bits. Reviewed-by: Peng Fan <peng.fan@nxp.com> Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
2022-04-21imx: Update FSL_MFGPROT config for iMX8MYe Li
Update the Kconfig and Makefile to allow build for iMX8M and restrict the build only in u-boot. Signed-off-by: Ye Li <ye.li@nxp.com> Reviewed-by: Gaurav Jain <gaurav.jain@nxp.com>
2022-02-08imx: Don't define __ASSEMBLY__ in source filesSimon Glass
This is supposed to be a build-system flag. Move it there so we can define it before linux/kconfig.h is included. Signed-off-by: Simon Glass <sjg@chromium.org>
2021-10-21arm: mach-imx: Allow to build mac.c for EQoS driverYe Li
i.MX8MP has one DWC EQoS controller, so allow to build mac.c when only this driver is enabled. Signed-off-by: Ye Li <ye.li@nxp.com>
2021-10-07imx: makefile: drop the use of imx8mimage.shPeng Fan
After switch to use binman, no need to use the bash script to check file exsiting or not. And there is bug that the script will be executed everytime Makefile is used which is confusing people. Signed-off-by: Peng Fan <peng.fan@nxp.com> Tested-by: Frieder Schrempf <frieder.schrempf@kontron.de>
2021-09-30WS cleanup: remove SPACE(s) followed by TABWolfgang Denk
Signed-off-by: Wolfgang Denk <wd@denx.de>
2021-08-09arm: imx8: Move container parser and image to mach-imx common folderYe Li
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-09arm: imx: basic i.MX8ULP supportPeng Fan
Add basic i.MX8ULP support For the MMU part, Using a simple way the calculate the MMU size to avoid default heavy calcaulation. And align address and size in the table settings to 2MB or 4GB as much as possible. So we can reduce the 4K page allocations in MMU table which will spends much time in create the page table Signed-off-by: Ye Li <ye.li@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
2021-04-08imx: caam: new u-boot command to set PRIBLOB bitfield from CAAM SCFGR ↵Clement Le Marquis
register to 0x3 It is highly recommended to set the PRIBLOB bitfield to 0x3 once your encrypted boot image has booted up, this prevents the generation of new blobs that can be used to decrypt an encrypted boot image. The PRIBLOB is a sticky type bit and cannot be changed until the next power on reset. Add the set_priblob_bitfield U-Boot command to prevent the generation of new blobs. Signed-off-by: Clement Le Marquis <clement.lemarquis@nxp.com> Acked-by: Ye Li <Ye.Li@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
2021-04-08iMX8M: Add support to enable CONFIG_IMX_HABYe Li
Add some SOC level codes and build configurations to use HAB lib for CONFIG_IMX_HAB (secure boot), like adding the SEC_CONFIG fuse, enable fuse driver, CAAM clock function, and add CAAM secure RAM to MMU table. The FSL_CAAM is temporally not enabled for iMX8M when CONFIG_IMX_HAB is set, because we don't need the CAAM driver for SPL. Signed-off-by: Ye Li <ye.li@nxp.com> Reviewed-by: Peng Fan <peng.fan@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
2021-04-08imx: imx7 Support for Manufacturing ProtectionBreno Lima
This code was originally developed by Raul Cardenas <raul.casas@nxp.com> and modified to be applied in U-Boot imx_v2017.03. More information about the initial submission can be seen in the link below: https://lists.denx.de/pipermail/u-boot/2016-February/245273.html i.MX7D has an a protection feature for Manufacturing process. This feature uses asymmetric encryption to sign and verify authenticated software handled between parties. This command enables the use of such feature. The private key is unique and generated once per device. And it is stored in secure memory and only accessible by CAAM. Therefore, the public key generation and signature functions are the only functions available for the user. The manufacturing-protection authentication process can be used to authenticate the chip to the OEM's server. Command usage: Print the public key for the device. - mfgprot pubk Generates Signature over given data. - mfgprot sign <data_address> <data_size> Signed-off-by: Raul Ulises Cardenas <raul.casas@nxp.com> Signed-off-by: Breno Lima <breno.lima@nxp.com> Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com> Reviewed-by: Ye Li <ye.li@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
2021-03-01ARM: imx: Include u-boot.img in u-boot-with-spl.imx if OF_SEPARATE=yMarek Vasut
The u-boot-with-spl.imx is a concatenation of SPL and u-boot.uim. The u-boot.uim is u-boot.bin wrapped in uImage. In case OF_SEPARATE is enabled, the u-boot.bin does not contain control DT for U-Boot, and so u-boot.uim does not contain the DT, and so u-boot-with-spl.imx does not contain the DT, and a system where u-boot-with-spl.imx is written to offset 1024B to the start of storage no longer boots, as it is missing DT. In case OF_SEPARATE is enabled, u-boot.img contains both u-boot.bin and the necessary DTs. Therefore, use u-boot.img instead of u-boot.uim to generate u-boot-with-spl.imx when OF_SEPARATE is enabled. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Christoph Niedermaier <cniedermaier@dh-electronics.de> Cc: Fabio Estevam <festevam@gmail.com> Cc: Peng Fan <peng.fan@nxp.com> Cc: Simon Glass <sjg@chromium.org> Cc: Stefano Babic <sbabic@denx.de> Cc: Ye Li <ye.li@nxp.com> Cc: uboot-imx <uboot-imx@nxp.com>
2020-07-14imx: remove imx sip filePeng Fan
We have switch to use arm_smccc_smc, no need to keep i.MX specific sip wrapper. Signed-off-by: Peng Fan <peng.fan@nxp.com>
2020-01-14imx: Add basic support for the NXP IMXRT10xx SoC familyGiulio Benetti
Add i.IMXRT family basic support. Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
2019-11-05imx: add rom api supportPeng Fan
i.MX8MN support loading images with rom api, so we implement reuse board_return_to_bootrom to let ROM loading images. Signed-off-by: Peng Fan <peng.fan@nxp.com>
2019-11-03imx: support i.MX8QM ROM 7720 a1 boardOliver Graute
Add i.MX8QM ROM 7720a1 board support Boot log as below: U-Boot 2019.10-rc3-00004-gd073e0242f (Sep 20 2019 - 08:24:13 +0200) CPU: NXP i.MX8QM RevB A53 at 1200 MHz Model: Advantech iMX8QM Qseven series Board: ROM-7720-A1 4GB Build: SCFW 65afe5f6 Boot: SD2 DRAM: 4 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 Net: eth0: ethernet@5b040000Could not get PHY for FEC1: addr 1 , eth-1: ethernet@5b050000 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>
2019-10-14imx: mmdc_size: Allow building it for i.MX7ULPFabio Estevam
i.MX7ULP uses the same MMDC controller IP as found on i.MX53 and i.MX6, so build mmdc_size.c for i.MX7ULP as well. Signed-off-by: Fabio Estevam <festevam@gmail.com>
2019-10-14imx: Place imx_ddr_size() into a separate fileFabio Estevam
Place imx_ddr_size() into a separate file. The motivation for doing this is to be able to easily reuse imx_ddr_size() on i.MX7ULP. Currently imx_ddr_size() is inside arch/arm/mach-imx/cpu.c, which is not built for i.MX7ULP. Changing the logic to allow building cpu.c for i.MX7UP would require adding several ifdef's, leading to a not a very elegant solution. To allow better reuse, just place imx_ddr_size() into a common mmdc_size.c file. Signed-off-by: Fabio Estevam <festevam@gmail.com> Signed-off-by: Stefano Babic <sbabic@denx.de>
2019-10-08imx: replace CONFIG_SECURE_BOOT with CONFIG_IMX_HABStefano Babic
CONFIG_SECURE_BOOT is too generic and forbids to use it for cross architecture purposes. If Secure Boot is required for imx, this means to enable and use the HAB processor in the soc. Signed-off-by: Stefano Babic <sbabic@denx.de>
2019-10-08imx8: Add support to get container image set sizePeng Fan
To avoid hardcoded offset when adding u-boot.cnt to flash.bin, we use flexible offset which is calculated based on the size of the container image generated int the first stage. And pad u-boot.cnt at 1KB alignment. So add code to get the offset when SPL loading u-boot.cnt. Signed-off-by: Ye Li <ye.li@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
2019-10-08imx: add container targetPeng Fan
To support SPL loading container file, add a new Makefile target, and introduce a new Kconfig file to source the cfg file which will be parsed by mkimage. Signed-off-by: Peng Fan <peng.fan@nxp.com>
2019-07-19i.MX6: nand: add nandbcb command for imxShyam Saini
Writing/updating boot image in nand device is not straight forward in i.MX6 platform and it requires boot control block(BCB) to be configured. It becomes difficult to use uboot 'nand' command to write BCB since it requires platform specific attributes need to be taken care of. It is even difficult to use existing msx-nand.c driver by incorporating BCB attributes like mxs_dma_desc does because it requires change in mtd and nand command. So, cmd_nandbcb implemented in arch/arm/mach-imx BCB contains two data structures, Firmware Configuration Block(FCB) and Discovered Bad Block Table(DBBT). FCB has nand timings, DBBT search area, page address of firmware. On summary, nandbcb update will - erase the entire partition - create BCB by creating 2 FCB/DBBT block followed by 1 FW block based on partition size and erasesize. - fill FCB/DBBT structures - write FW/SPL on FW1 - write FCB/DBBT in first 2 blocks for nand boot, up on reset bootrom look for FCB structure in first block's if FCB found the nand timings are loaded for further reads. once FCB read done, DTTB will load and finally firmware will be loaded which is boot image. Refer section "NAND Boot" from doc/imx/common/imx6.txt for more usage information. Reviewed-by: Stefano Babic <sbabic@denx.de> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> Signed-off-by: Sergey Kubushyn <ksi@koi8.net> Signed-off-by: Shyam Saini <shyam.saini@amarulasolutions.com>
2019-06-11arm, imx, Makefile: fix u-boot-dtb.imx build in CONFIG_MULTI_DTB_FIT caseHeiko Schocher
in case CONFIG_MULTI_DTB_FIT is set and u-boot-dtb.imx image is build, currently u-boot-dtb.bin is used for generating the u-boot-dtb.imx binary, which is wrong, as it contains only a dtb blob not the fit.blob Use instead the u-boot-fit-dtb.bin for generating u-boot-dtb.imx which contains the fit.blob. Signed-off-by: Heiko Schocher <hs@denx.de>
2019-06-11imx: fix building for i.mx8 without splMarcel Ziswiler
Building with Travis CI complained and stopped with the following error: +cc1: fatal error: opening output file spl/u-boot-spl.cfgout: No such file or directory +compilation terminated. This fixes commit caceb739ea07 ("imx: build flash.bin for i.MX8") which took SPL being enabled on i.MX8 for granted. Reported-by: Stefano Babic <sbabic@denx.de> Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Reviewed-by: Peng Fan <peng.fan@nxp.com>
2019-06-07imx: move BOARD_SIZE_CHECK to main MakefileHeinrich Schuchardt
We currently have duplicate definitions for BOARD_SIZE_CHECK in Makefile and arch/arm/mach-imx/Makefile. Move the board size check from arch/arm/mach-imx/Makefile to Makefile. Depending on the value of CONFIG_BOARD_SIZE_LIMIT an error like an error like the following is thrown: u-boot-dtb.imx exceeds file size limit: limit: 503696 bytes actual: 509720 bytes excess: 6024 bytes make: *** [Makefile:1051: u-boot-dtb.imx] Error 1 Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Fabio Estevam <festevam@gmail.com>
2019-04-25imx: add lowlevel init for ARM64Peng Fan
Sometimes we met SERROR, but only to catch it when Linux boots up. Let's enable catching in U-Boot to catch it ealier and ease debug. Signed-off-by: Peng Fan <peng.fan@nxp.com>
2019-02-15ddr: vybrid: Provide code to perform on-boot calibrationLukasz Majewski
This patch provides the code to calibrate the DDR's DQS to DQ signals (RDLVL). It is based on: VFxxx Controller Reference Manual, Rev. 0, 10/2016, page 1600 10.1.6.16.4.1 "Software Read Leveling in MC Evaluation Mode" and NXP's community thread: "Vybrid: About DDR leveling feature on DDRMC." https://community.nxp.com/thread/395323 Signed-off-by: Lukasz Majewski <lukma@denx.de>
2019-01-28imx: build flash.bin for i.MX8Peng Fan
Build flash.bin for i.MX8 when SPL enabled. Signed-off-by: Peng Fan <peng.fan@nxp.com>
2019-01-28arm: imx: build mach-imx for i.MX8Peng Fan
To enable SPL for i.MX8, we could reuse code in arch/arm/mach-imx. Signed-off-by: Peng Fan <peng.fan@nxp.com>
2019-01-01imx: imx8m: not build bootaux when building SPLPeng Fan
No need to build bootaux in SPL stage Signed-off-by: Peng Fan <peng.fan@nxp.com>
2019-01-01imx: imx8mq: build flash.binPeng Fan
Build flash.bin for i.MX8MQ, it will include signed hdmi firmware, spl, ddr firmware, fit image(bl31.bin, u-boot-nodtb.bin, dtb). Burn it to 33KB offset of SD card. Signed-off-by: Peng Fan <peng.fan@nxp.com>
2019-01-01imx: rename mx8m,MX8M to imx8m,IMX8MPeng Fan
Rename mx8m,MX8M to imx8m,IMX8M Signed-off-by: Peng Fan <peng.fan@nxp.com> Signed-off-by: Jon Nettleton <jon@solid-run.com>
2019-01-01arm: imx8qxp: build u-boot-dtb.cfgout before checking filesPeng Fan
Build u-boot-dtb.cfgout before checking files, otherwise u-boot-dtb.cfgout is generated at late stage and cause final image not generated. Signed-off-by: Peng Fan <peng.fan@nxp.com>
2018-11-12imx: mkimage: add size check to the u-boot.imx make targetMarcel Ziswiler
The make macro to check if the binary exceeds the board size limit is taken straight from the root Makefile. Without this and e.g. enabled EFI Vybrid fails booting as the regular size limit check does not take the final u-boot.imx binary size into account which is bigger due to alignment as well as IMX header stuff. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Reviewed-by: Fabio Estevam <festevam@gmail.com>
2018-10-25imx: mkimage: avoid stop CI when required files not existsPeng Fan
Introduce a new script to check whether file exists and use that check in Makefile to avoid break CI system. The script return 1 when the required files not exists, return 0 when files exists. The script will ignore check to u-boot-dtb.bin, because if there is something wrong to generate u-boot-dtb.bin, there must be some code error. Signed-off-by: Peng Fan <peng.fan@nxp.com>
2018-10-22arm: imx: include imx8image supportPeng Fan
When building i.MX8/8X board, use imx8image type. `-e $(CONFIG_SYS_TEXT_BASE)` is not needed, but no harm to keep it for i.MX8/8X Signed-off-by: Peng Fan <peng.fan@nxp.com>
2018-10-22imx: add Kconfig entry for i.MX8QXPPeng Fan
Add Kconfig entry for i.MX8QXP Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Anatolij Gustschin <agust@denx.de> Cc: Stefano Babic <sbabic@denx.de>
2018-10-16arm: imx: mx5: Make videoskip available on MX5Marek Vasut
The board_video_skip() implementation in imx-common/video.c works on i.MX5x as well, so loosen the SoC filter in Makefile to make it available. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Stefano Babic <sbabic@denx.de>
2018-05-07SPDX: Convert all of our single license tags to Linux Kernel styleTom Rini
When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: Tom Rini <trini@konsulko.com>
2018-04-15imx: Create distinct pre-processed mkimage config filesTrent Piepho
Each imx image is created by a separate sub-make and during this process the mkimage config file is run though cpp. The cpp output is to the same file no matter what imx image is being created. This means if two imx images are generated in parallel they will attempt to independently produce the same pre-processed mkimage config file at the same time. Avoid the problem by making the pre-processed config file name unique based on the imx image it will be used in. This way each image will create a unique config file and they won't clobber each other when run in parallel. This should fixed the build bug referenced in b5b0e4e3 ("imximage: Remove failure when no IVT offset is found"). Cc: Breno Lima <breno.lima@nxp.com> Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Cc: Fabio Estevam <fabio.estevam@nxp.com> Signed-off-by: Trent Piepho <tpiepho@impinj.com> Tested-by: Fabio Estevam <fabio.estevam@nxp.com>
2018-02-04imx: makefile: compile files for i.MX8MPeng Fan
Compile files for i.MX8M Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com> Cc: Stefano Babic <sbabic@denx.de>
2018-02-04imx: mx8m: add soc related settings and filesPeng Fan
Add SoC level initialization code - arch_cpu_init - mmu table - detect cpu revision - reset cpu and wdog settings - timer init - wdog settings - lowlevel init to save/restore registers - a few dummy header file to avoid build failure - ft_system_setup Signed-off-by: Peng Fan <peng.fan@nxp.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Fabio Estevam <fabio.estevam@nxp.com>
2018-02-04imx: mx7: move mmc env code to mmc_env.cPeng Fan
The mx7 mmc env code is shared by i.MX8M, so move it to mmc_env.c. Signed-off-by: Peng Fan <peng.fan@nxp.com>
2018-02-04imx: refactor imx_get_mac_from_fusePeng Fan
Move imx_get_mac_from_fuse to a new mac.c for i.MX6/7. Since fuse regs structure are different for i.MX6/7, use mac address offset in code and define a new local struture imx_mac_fuse. Also sort the config order. Signed-off-by: Peng Fan <peng.fan@nxp.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Fabio Estevam <fabio.estevam@nxp.com> Reviewed-by: Stefano Babic <sbabic@denx.de>
2018-02-04imx: add sip functionPeng Fan
Add SiP (Silicon Provider) services function to issue SMC call to Arm Trusted Firmware. More SiP information could be found in https://github.com/ARM-software/arm-trusted-firmware/blob/master/ docs/arm-sip-service.rst Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com> Cc: Stefano Babic <sbabic@denx.de>
2018-01-12arm: imx: Rework i.MX specific commands to be excluded from SPLTom Rini
The "clocks" and "bootaux" commands are only usable in full U-Boot, not SPL, so do not link them inside of SPL. Rework a little of the bootaux related code to make use of __weak and declare parts of it static as it's local to the file. Cc: Stefano Babic <sbabic@denx.de> Cc: Fabio Estevam <fabio.estevam@nxp.com> Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>