summaryrefslogtreecommitdiff
path: root/arch/arm
AgeCommit message (Collapse)Author
2019-05-29MLK-21889-1 imx8mn: Add new SoC iMX8M NanoYe Li
Introduce a new SoC kconfig CONFIG_IMX8MN. Since the chip is derived from iMX8MM, we reuse the clocks and registers mapping files of iMX8MM. The iomux header file is the latest v0.03 generated by tool and add SION for i2c and usdhc3. Signed-off-by: Ye Li <ye.li@nxp.com> Signed-off-by: Jacky Bai <ping.bai@nxp.com>
2019-05-21MLK-21745-02 board: imx8mm_val: change the ddr init to the common driverJacky Bai
change the ddr init to use the common driver init driver as we used on EVK board. Signed-off-by: Jacky Bai <ping.bai@nxp.com> Reviewed-by: Ye Li <ye.li@nxp.com>
2019-05-17MLK-21759-2 mx6ull: Fix mispelling aaips in fuse_entry_desc pathLeonard Crestez
This is not intentional. Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com> Reviewed-by: Ye Li <ye.li@nxp.com>
2019-05-17MLK-21759-1 mx6ul: Fix module fuse paths for upstream namingLeonard Crestez
According to upstream linux naming conventions node names must have no leading zeros after the @ sign. Recent imx_4.19.y changes to conform with this convention on 6ull broke 6ulz boot however looking at the code 6ul fuse checks were already broken by upstream commit efb9adb27475 ("ARM: dts: imx6ul: Remove leading zeroes from unit addresses") Instead of reverting make uboot fuse check follow upstream standards. Keep old paths for compatibility with imx_4.14.y Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com> Reviewed-by: Ye Li <ye.li@nxp.com>
2019-05-08MLK-21354-1 imx: define ARCH_MXC for i.MX8/8m/7ulpPeng Fan
Need define ARCH_MXC to avoid access wrong registers in fsl_esdhc Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Ye Li <ye.li@nxp.com>
2019-05-07MLK-21654 mx6sl: hab: Fix pu_irom_mmu_enabled addressBreno Lima
According to hab.c code we have to notify the ROM code if the MMU is enabled or not. This is achieved by setting the "pu_irom_mmu_enabled" to 0x1. The current address in hab.c code is wrong for i.MX6SL, according to ROM map file the correct address is 0x00901c60. As we are writing in the wrong address the ROM code is not flushing the caches when needed, and the following HAB event is observed in certain scenarios: --------- HAB Event 1 ----------------- event data: 0xdb 0x00 0x14 0x41 0x33 0x18 0xc0 0x00 0xca 0x00 0x0c 0x00 0x01 0xc5 0x00 0x00 0x00 0x00 0x07 0xe4 STS = HAB_FAILURE (0x33) RSN = HAB_INV_SIGNATURE (0x18) CTX = HAB_CTX_COMMAND (0xC0) ENG = HAB_ENG_ANY (0x00) Update MX6SL_PU_IROM_MMU_EN_VAR to address this issue. Reported-by: Frank Zhang <frank.zhang@nxp.com> Signed-off-by: Breno Lima <breno.lima@nxp.com> Reviewed-by: Ye Li <ye.li@nxp.com>
2019-05-07MLK-21485 imx8qm/qxp: Extend image size for bootaux M4Ye Li
iMX8 has consective address for TCML and TCMU, so the M4 image size could exceed the TCML boundary and put its data section in TCMU. So change the size limitation in bootaux to 256KB to include TCMU. Signed-off-by: Ye Li <ye.li@nxp.com> Reviewed-by: Peng Fan <peng.fan@nxp.com>
2019-04-22MLK-21000 imx8: Ignore upstream power-domains of len != 4Leonard Crestez
In upstream the power-domains for imx8 have different bindings and when uboot attempts to parse them it ends up disabling everything. This fix allows running upstream linux on imx8qxp without custom boot binaries. Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com> Acked-by: Ye Li <ye.li@nxp.com>
2019-04-11MA-14518 AIY: Enable i2c2 and i2c3 in u-boot.Leonid Lobachev
Enable i2c2 and i2c3 for AIY. Change-Id: I984e2e76e7c8929cc62088b6838c81f5dc838568
2019-04-09MLK-21389 imx: hab: Check if IVT header is HABv4Breno Lima
The HABv4 implementation in ROM checks if HAB major version in IVT header is 4.x. The current implementation in hab.c code is only validating HAB v4.0 and HAB v4.1 and may be incompatible with newer HABv4 versions. Modify verify_ivt_header() function to align with HABv4 implementation in ROM code. Signed-off-by: Breno Lima <breno.lima@nxp.com> Reviewed-by: Ye Li <ye.li@nxp.com>
2019-04-07MLK-21392 imx8: Update SCFW API to v1.7Ye Li
Sync the SCFW API to with latest commit: commit 252281d48647caad9a00ff1dd0f1a666c4067653 Author: Chuck Cannon <chuck.cannon@nxp.com> Date: Fri Apr 5 18:03:13 2019 -0500 SCF-105: Update wiki. Signed-off-by: Chuck Cannon <chuck.cannon@nxp.com> Major changes in the update: 1. sc_seco_patch and sc_seco_start_rng are added. 2. sc_misc_get_boot_container is added 3. New resource SC_R_USB_1_PHY 4. Type for 16Mhz frequency Signed-off-by: Ye Li <ye.li@nxp.com> Acked-by: Peng Fan <peng.fan@nxp.com>
2019-04-02MA-14501[Android] change BOOTAUX_RESERVED_MEM macro to defconfigZhang Bo
As the M4 use different DDR memory size in normal android/car2 and car image, use different defconfig for car2 to decrease DDR memory reservation. So memory reserved for each M4 core is 8MB in car2 and normal android image. it's 32MB for car image. Change-Id: Idf608f539cd614a154c78e3a1af28eff1da5c1f2 Signed-off-by: Zhang Bo <bo.zhang@nxp.com>
2019-03-27MLK-21251-1 imx: hab: Fix build warnings in 32-bit targetsBreno Lima
When building 32-bit targets with CONFIG_SECURE_BOOT and DEBUG enabled the following warnings are displayed: arch/arm/mach-imx/hab.c:840:41: warning: format '%lx' expects argument \ of type 'long unsigned int', but argument 3 has type 'uint32_t \ {aka unsigned int}' [-Wformat=] printf("HAB check target 0x%08x-0x%08lx fail\n", ~~~~^ %08x ddr_start, ddr_start + bytes); arch/arm/mach-imx/hab.c:845:45: warning: format '%x' expects argument \ of type 'unsigned int', but argument 3 has type 'ulong \ {aka long unsigned int}' [-Wformat=] printf("\nivt_offset = 0x%x, ivt addr = 0x%x\n", ivt_offset, ivt_addr); ~^ %lx Fix warnings by providing the correct data type. Reviewed-by: Ye Li <ye.li@nxp.com> Signed-off-by: Breno Lima <breno.lima@nxp.com>
2019-03-27MLK-21174 mx7ulp: hab: Add hab_status command for HABv4 M4 bootBreno Lima
When booting in low power or dual boot modes the M4 binary is authenticated by the M4 ROM code. Add an option in hab_status command so users can retrieve M4 HAB failure and warning events. => hab_status m4 Secure boot disabled HAB Configuration: 0xf0, HAB State: 0x66 No HAB Events Found! Add command documentation in mx6_mx7_secure_boot.txt guide. As HAB M4 API cannot be called from A7 core the code is parsing the M4 HAB persistent memory region. The HAB persistent memory stores HAB events, public keys and others HAB related information. The HAB persistent memory region addresses and sizes can be found in AN12263 "HABv4 RVT Guidelines and Recommendations". Reviewed-by: Utkarsh Gupta <utkarsh.gupta@nxp.com> Reviewed-by: Ye Li <ye.li@nxp.com> Signed-off-by: Breno Lima <breno.lima@nxp.com>
2019-03-18MLK-21168 imx: Set timeout of virtual driver service connection to 2sYe Li
The normal ready time of M4 side is less than 1s, so we can use 2s as the timeout of connection. The current value is 10s, which seems a little long if M4 SRTM service does not run. Signed-off-by: Ye Li <ye.li@nxp.com> Acked-by: Peng Fan <peng.fan@nxp.com>
2019-03-18MLK-21165 imx8: Workaround LPCG HW issueYe Li
There are two LPCG HW issues reported in TKT322331. Add workaround for them in u-boot. 1. Back to back LPCG write access must have 4x DSC cycle interval. 2. When DSC clock is gated, LPCG write access may be missed due to the edge detect is not see by DSC. Two writes shall be performed to re-enable the clock if DSC clock is gated Signed-off-by: Ye Li <ye.li@nxp.com> Reviewed-by: Peng Fan <peng.fan@nxp.com>
2019-03-15MLK-21158 imx8mm: Add workaround for arm timer stopped issueYe Li
When switching ARM root clock source from ARM PLL to 24M OSC, found the ARM timer may stop on few chips during stress reboot test. The system counter is still increasing, but ARM timer is stopped. Add a workaround that switch ARM clock source from ARM PLL to Sys PLL2 500M clock instead of 24M OSC. Stress reboot test is passed on all failed chips. Signed-off-by: Ye Li <ye.li@nxp.com>
2019-03-12MLK-21103 imx8: Fix build break on ARM2 SPLYe Li
Meet the build error below with ARM2 SPL defconfig arch/arm/mach-imx/imx8/image.c: In function ‘spl_nor_get_uboot_base’: arch/arm/mach-imx/imx8/image.c:224:13: error: ‘CONFIG_SYS_UBOOT_BASE’ undeclared (first use in this function) if (end <= CONFIG_SYS_UBOOT_BASE) The root cause is we did not add SPL NOR support for ARM2 SPL, but the codes still use the CONFIG_SYS_UBOOT_BASE. Fix the issue by adding SPL device support config for each device relevant function. Signed-off-by: Ye Li <ye.li@nxp.com> Reviewed-by: Peng Fan <peng.fan@nxp.com>
2019-03-12MA-14283 [coverity] Fix uninitialized scalar variableLuo Ji
Fix coverity issue: CID 5433686: Uninitialized scalar variable (UNINIT) uninit_use_in_call: Using uninitialized value value when calling call_imx_sip_ret2. Test: coverity scan pass. Change-Id: Id89f8f6f69fb944179b34dca4146fd7636505681 Signed-off-by: Luo Ji <ji.luo@nxp.com>
2019-03-12MA-14293 [coverity] imx8: Fix double free issueLuo Ji
Fix coverity issue CID 3298992: Double free (USE_AFTER_FREE) double_free: Calling free frees pointer rsrc_data which has already been freed. Check the rsrc_data buffer before free to avoid free NULL pointer. Change-Id: I781e87667a5d3bbe25ec12fbae8e3958d9b29244 Signed-off-by: Luo Ji <ji.luo@nxp.com>
2019-03-11MLK-20958-2 imx8: Replace SC_R_LAST with SC_R_NONE in DTBLeonard Crestez
We are currently using SC_R_LAST as a marker for imx8 power domain tree nodes without a resource attached. This value is compiled into dtb as part of the linux build and used by uboot. The SC_R_LAST constant changes frequently as SCFW resources are added (by design) and every time we need to update linux and uboot headers together or boot can fail. Fix this by replacing SC_R_LAST usage with a new constant SC_R_NONE defined to be 0xFFF0. Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com> Reviewed-by: Peng Fan <peng.fan@nxp.com>
2019-03-11MLK-20958-1 imx8: Sync SCFW API to commit ef4a5057Leonard Crestez
Also fixes MLK-21051: Replace manually added pads with defines from SCFW export package. Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com> Acked-by: Fugang Duan <fugang.duan@nxp.com>
2019-03-05MLK-21053 imx8: Enable SPL authentication only when set CONFIG_AHAB_BOOTYe Li
Currently when SPL load 3rd container, it will do the authentication unconditionally. But when running SPL on Xen, the seco authentication is not supported, and cause failure in loading. Change the parser codes to depend on CONFIG_AHAB_BOOT to do the authentication. Signed-off-by: Ye Li <ye.li@nxp.com> Acked-by: Peng Fan <peng.fan@nxp.com>
2019-03-05MA-14147-1 Trusty: change the dram attribute to inner shareableJi Luo
Trusty OS will check and require the memory passed from non-secure world is inner shareable. Change the memory attribute as PTE_BLOCK_INNER_SHARE in u-boot to meet the requirement. Test: build and boot on imx8qm/imx8qxp. Change-Id: I1aac9b430ecc0fa94f9a1f6dd519b34ce6fef7bd Signed-off-by: Ji Luo <ji.luo@nxp.com>
2019-03-04MA-14239 Check return values for SCFW APIsJi Luo
Check the return values for SCFW APIs and print error logs if the return value is not "SC_ERR_NONE". Test: boot on imx8qm. Change-Id: Ic7008bd2656375875e77dd3c922dafb1be145357 Signed-off-by: Ji Luo <ji.luo@nxp.com>
2019-02-27MLK-20997 imx8: Sync SCFW API to v1.3Ye Li
Update SCFW API to v1.3 at below commit. A new API sc_pm_set_boot_parm is added. commit c5ef21f894de0ac8329f0fe540331a272fcd1461 Author: Chuck Cannon <chuck.cannon@nxp.com> Date: Tue Feb 26 15:36:53 2019 -0600 SCF-352: Add more to SECO test. Signed-off-by: Chuck Cannon <chuck.cannon@nxp.com> Signed-off-by: Ye Li <ye.li@nxp.com> Acked-by: Peng Fan <peng.fan@nxp.com>
2019-02-26MLK-20976-2 imx8: cpu: check resource before set sidPeng Fan
If resource is not owned, we ignore sid settings. When support CM41 + android auto on xen, some resources are owned by CM41, when CM41 releases those resources, CM41 will program SID for those resources. Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Flynn xu <flynn.xu@nxp.com>
2019-02-26MA-14129 Update ddr training code for imx8mq_aiyJi Luo
Update the ddr training code to work with the atf 2.0. Test: Build and boot on imx8mq aiy 3G board. Change-Id: I8546c34cfa4aeeed819f7797f8362676e420b41f Signed-off-by: Ji Luo <ji.luo@nxp.com>
2019-02-25MLK-20980 imx8qm/qxp_mek: Set kernel fdt according to M4 bootYe Li
When M4 is booted by ROM, we have to enable RPMSG in kernel, so need to select the -rpmsg.dtb. If M4 is not enabled, use default kernel dtb. Signed-off-by: Ye Li <ye.li@nxp.com> Reviewed-by: Peng Fan <peng.fan@nxp.com>
2019-02-25MLK-20978 imx8: Fix uninitialized variable in kernel DTB updatingYe Li
When using fdt_next_node, the depth variable needs being initialized first, otherwise we many get undefined depth. Signed-off-by: Ye Li <ye.li@nxp.com>
2019-02-23MLK-20971 imx8mq: Not disable DCSS for 8MQLite new partYe Li
The iMX8MQLite new part will not disable DCSS in fuse. So change the codes to check the DCSS fuse before disable relevant FDT nodes and u-boot HDMI splash screen. Signed-off-by: Ye Li <ye.li@nxp.com>
2019-02-21MLK-15286 arm: arm64: only use general regsPeng Fan
When compiling with android toolchain, there is an instruction "str q0, [x8],#16", but x8 is not 16bytes aligned, this instruction will trigger sync abort. So, following Linux kernel, only use general regs for arm64. If not, compiler may use simd registers Q[x]. We need to avoid using simd registers in U-Boot, because load/store Q[x] has restriction that 128bits aligned when str/ldr. Signed-off-by: Peng Fan <peng.fan@nxp.com> (cherry picked from commit 186ccd8de53f986c5913432638dfaca9bdc97e89)
2019-02-21MLK-20955 imx8qm: delete power-domains for lpuart0 on xenPeng Fan
To U-Boot on DomU, the lpuart0 is replaced with a xen paravirtual consol driver, but reused the previous lpuart node. However there is an power-domains entry in lpuart0 which will call power_domain_on and failed to probe xen paravirtual driver, because of recent change: commit 8524ca764d8f("MLK-20945-2 dm: device: Check the power up result in probe ") So remove the power-domains entry in lpuart0 to let DomU U-Boot could output again. Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Flynn xu <flynn.xu@nxp.com>
2019-02-20MLK-20952 imx8mm: clock: Fix DRAM PLL settings issueYe Li
According to iMX8MM DRAM PLL spec, the Fvco range is from 1600Mhz to 3200Mhz, and (Fin / P) range is from 6Mhz to 25Mhz. However, our current PLL settings violates the spec. This patch changes the dividers to meet the spec requirement. Signed-off-by: Ye Li <ye.li@nxp.com> Reviewed-by: Bai Ping <ping.bai@nxp.com>
2019-02-19MLK-20945-5 imx8: Select boot device dynamicallyYe Li
For fspi build, we will enable both SPL NOR support and SPL SPI support. SPL will dynamically check the resource owner then select corresponding boot device. Signed-off-by: Ye Li <ye.li@nxp.com>
2019-02-19MLK-20945-4 imx8: Update container parser for RAW NOR SPLYe Li
Since FSPI is assigned to M4 partition, A core only can read it from its memory-map address. So we have to enable SPL NOR which won't access flexspi driver. Update SPL container parser for the RAW NOR support. Signed-off-by: Ye Li <ye.li@nxp.com>
2019-02-17MLK-20933 imx8: ahab: Check image address before using itYe Li
Check the OS container image address is belonged to valiad DRAM memory before accessing it to avoid u-boot crash on invalid address. Also refine the error print. Signed-off-by: Ye Li <ye.li@nxp.com> Reviewed-by: Peng Fan <peng.fan@nxp.com>
2019-02-14MLK-20928 imx8: Update SCFW API to latestYe Li
Update to latest SCFW API with below commit. Add version API and remove some resource ids. commit 004247e14afc74a21d65569415c4b2e35bfaabc3 Author: Ranjani Vaidyanathan <ranjani.vaidyanathan@nxp.com> Date: Thu Feb 14 14:55:12 2019 -0800 SCF-341 Fix bug in setting large slice clock divider Incorrect mask was applied when clearing out the bits in the DSC large slice divider. Signed-off-by: Ranjani Vaidyanathan <ranjani.vaidyanathan@nxp.com> Signed-off-by: Ye Li <ye.li@nxp.com>
2019-02-13MLK-20915: imx8: ahab: Add verify image response tagBreno Lima
The current U-Boot implementation is not decoding the verify image message response. => ahab_status Lifecycle: 0x0020, NXP closed SECO Event[0] = 0x0088F100 Starting in SECO FW v0.2.0 engineering release an invalid image integrity is logged as an event in open mode. Update U-Boot ahab_status command to decode this event. Signed-off-by: Breno Lima <breno.lima@nxp.com> Reviewed-by: Ye Li <ye.li@nxp.com>
2019-02-13MLK-20919 imx8: ahab: Add command to close the chipYe Li
Add a new command "ahab_close" to close the chip from NXP closed lifecycle state to OEM closed state. If the sample is not NXP closed, the command will fail. Signed-off-by: Ye Li <ye.li@nxp.com> Reviewed-by: Peng Fan <peng.fan@nxp.com>
2019-02-11MLK-20886-8 DTS: imx8qxp_mek: Update for virtual i2c and i2c mux driverYe Li
Add compatible strings and properties to i2c1 node for using virtual i2c and i2c mux drivers Signed-off-by: Ye Li <ye.li@nxp.com>
2019-02-11MLK-20886-7 DTS: imx8qm/qxp: Add MU8 and MU9 nodesYe Li
We use MU8 and MU9 to communicate with M4_0 and M4_1 in u-boot. Add relevant nodes for the MU driver. Signed-off-by: Ye Li <ye.li@nxp.com>
2019-02-11MLK-20886-6 imx8qm/qxp: Implement runtime i2c driver bindingYe Li
When a i2c device is binding with drivers, we check whether current partition ownes the resource. If not owned, the binding to local lpi2c driver will fail, otherwise binding to virtual i2c driver will fail. Signed-off-by: Ye Li <ye.li@nxp.com>
2019-02-11MLK-20886-5 imx8qm/qxp: Implement VService function and buffer pagetableYe Li
Override the board_imx_vservice_find_mu for finding MU device for virtual devices. The matching logic is if the M4_0 partition ownes the resource of the device, we select MU8 for this Vservice channel. Otherwise, if the M4_1 partition ownes the resource, we select MU9. We reuse the kernel RPMSG Vring buffer for VService buffer, because it is shared between OS partition and M4 partition. The pagetable is needed for this region, since it is not in memregs of OS partition. board_imx_vservice_get_buffer is also overriden is this patch to divide VService buffer for MU8 and MU9. Signed-off-by: Ye Li <ye.li@nxp.com>
2019-02-11MLK-20886-2 imx: Add Virtual service glue layerYe Li
We use a glue layer to link the low level MU driver and virtual drivers. This glue layer is named to virtual service (iMX VService). Virtual service provides unified interfaces for setup connection with M4, get message buffer and send/receive message, etc. Multiple virtual drivers (i2c, gpio, etc) | iMX Vservice | imx_mu_m4 driver For each virtual device, by default, the Vservice uses the device node property "fsl,vservice-mu" to specify the MU node handler. A override function is also provided, so te ARCH level can define its rule. We will use the override function for dynamically select MU on 8QM/QXP. Signed-off-by: Ye Li <ye.li@nxp.com>
2019-02-10MLK-20901 imx8: Sync SCFW API to latestYe Li
Sync the SCFW API to latest commit below: commit 0721a2af721fca45e9d7e9b673b669ffab9aca7f Author: Glen Wienecke <glen.wienecke@nxp.com> Date: Sun Feb 10 19:16:56 2019 -0600 SCF-296: Partition reboot should not reset FSPI/OCRAM if in use - Update ss_rsrc_reset to return BUSY error if FSPI/OCRAM in use - Update pm_update_ridx to skip power transition if FSPI/OCRAM in use - For user_mode update requests, reflect mode achieved after pm_update_ridx - Add PM SVC call to get active mode (user_mode not accurate during transitions) - Undo some MISRA updates that changed ss_rsrc_reset to void function Signed-off-by: Glen Wienecke <glen.wienecke@nxp.com> Signed-off-by: Ye Li <ye.li@nxp.com> Acked-by: Peng Fan <peng.fan@nxp.com>
2019-02-05MLK-20787: imx: hab: Display All HAB events via hab_status commandUtkarsh Gupta
Add ability for hab_status command to show All HAB events and not just HAB failure events Signed-off-by: Utkarsh Gupta <utkarsh.gupta@nxp.com> Reviewed-by: Ye Li <ye.li@nxp.com>
2019-01-31MA-14051 Enable trusty for imx8q xenJi Luo
Open configs to add trusty os support for imx8q xen build. The rpmb keyslot package must be checked and copied to secure memory before trusty os boot. Change-Id: I66201783fa8439f2685377c10f257f064057dcfa Signed-off-by: Ji Luo <ji.luo@nxp.com>
2019-01-30MLK-20884-2 imx8qm/qxp: Use new SCFW APIs for SECOYe Li
Since misc_seco APIs are deprecated in SCFW, need switch to new APIs. Signed-off-by: Ye Li <ye.li@nxp.com> Acked-by: Peng Fan <peng.fan@nxp.com>
2019-01-30MLK-20884-1 imx8qm/qxp: Update SCFW API to latest commitYe Li
Update SCFW API to below commit which has deprecated APIs with misc_seco prefix. commit 30b8f67097d65c6e22f218b106aeafdc636aece3 Author: Chuck Cannon <chuck.cannon@nxp.com> Date: Fri Jan 25 15:24:55 2019 -0600 SCF-60: MISRA fixes. Signed-off-by: Chuck Cannon <chuck.cannon@nxp.com> Signed-off-by: Ye Li <ye.li@nxp.com>