AgeCommit message (Collapse)AuthorFilesLines
2019-12-05MLK-23088 imx8mn: Fix u-boot hang when ENV_IS_NOWHERE is enabledcaf/imx_4.14.98_8qxpc0_erYe Li1-1/+1
By default we enable two env storage devices: SD/emmc or Flexspi. And u-boot will select it according to boot device. Some customer does not save env, so he removes these storage devices and enable ENV_IS_NOWHERE. But current env_get_location does not process the ENV_IS_NOWHERE, returns ENVL_UNKNOWN and causes u-boot hang. Signed-off-by: Ye Li <> Reviewed-by: Peng Fan <> (cherry picked from commit 8ca25fba643e4cdbd71f8c7a41d0991e57388fc8)
2019-12-05MLK-23081 imx8mn: Change SPL malloc and BSS addressYe Li1-5/+5
Android's build has large size of SPL which overlays with malloc pool, and causes DDR FW image destroyed by the malloc. Adjust some SPL addresses to align with iMX8MQ and allow SPL + DDRFW using the 312 KB OCRAM from 0x912000 to 0x960000. Since the max DDR FW size is 96KB, we set max SPL size to be 216KB. Signed-off-by: Ye Li <> Reviewed-by: Peng Fan <> (cherry picked from commit e3df1f1cf9972ce8ed84de09d183599bd52a5c47)
2019-12-05MLK-23037 board: imx8mm_evk: update ddr4 timing for dll-on modeJacky Bai1-673/+474
Update the ddr4 timing file for 2400mts & 1066mts for dll-on mode only. Signed-off-by: Jacky Bai <> Acked-by: Peng Fan <> (cherry picked from commit f7ed1fd1416f15764cca13993a054963996f6c50)
2019-12-05MLK-23027 imx8mm/imx8mn: Adjust MMC bus width in SPLYe Li3-6/+6
The SPL codes for both EVK and validation board set the MMC bus width to 1 bit for both emmc and SD ports. This causes slow image loading. Change to 8 bits for emmc and 4 bits for SD. Signed-off-by: Ye Li <> Reviewed-by: Peng Fan <> (cherry picked from commit 0859140a862ad1cc16f4e49247868595a6e62b38)
2019-12-05MLK-22998-1 iimx8qm/imx8qxp: Update to latest SCFW APIRanjani Vaidyanathan3-1/+21
Sync SCFW API to commit b3c575a62b0e2 SCFW API version 16 Signed-off-by: Ranjani Vaidyanathan <> (cherry picked from commit 83014c2cdab9aeef0e1cbeb97820369b21995ea9)
2019-12-05SSI-87: imx8: Configure SNVSFranck LENORMAND11-0/+984
Add a module to configure the tamper and secure violation of the SNVS using the SCU API. The module also adds some commands: - snvs_cfg: Configure the SNVS HP and LP registers - snvs_dgo_cfg: Configure the SNVS DGO bloc if present (8QXP) - tamper_pin_cfg: Change the configuration of the tamper pins - snvs_clear_status: Allow to write to LPSR and LPTDSR to clear status bits Signed-off-by: Franck LENORMAND <> (cherry picked from commit 75aa7f2254f0883aa14568ac32702b1ca15367e4)
2019-12-04MA-16001-2 Enable android imx8mn lpddr4 boardJi Luo2-34/+24
Change configs to make imx8mn lpddr4 works on Android. Test: build and boot. Change-Id: Ibd27d73a973660a7d80bf85ba285f5f7619ecbb8 Signed-off-by: Ji Luo <>
2019-12-04MA-16001-1 Add configs for imx8mn lpddr4 boardJi Luo2-0/+154
Add build target for imx8mn lpddr4 board based on config imx8mn_evk_defconfig. Change-Id: Iceca7cb65c6417fc3da1878323f8a65ffc31e1ef Signed-off-by: Ji Luo <>
2019-11-20MLK-22998 iimx8qm/imx8qxp: Update to latest SCFW APIRanjani Vaidyanathan31-1478/+1716
Sync SCFW API to commit 6dcd0242ae Signed-off-by: Ranjani Vaidyanathan <>
2019-11-05MA-15813-2 [Android] imx8q: Enable reset in spl stageJi Luo1-2/+2
The psci driver is not available at spl stage, calling reset_misc() will lead to panic. Guard the reset_misc() with "CONFIG_SPL_BUILD" config, leave the reset_cpu() to trigger board reset. Test: reset om imx8qm_mek. Change-Id: Icf95eb4505ba444f9930aa0320d34456fa22733f Signed-off-by: Ji Luo <>
2019-11-05MA-15814 Check 'successful_boot' flag before marking unbootableJi Luo1-31/+63
Slot will be marked as "unbootable" state if error happens during image load/verify process, this may cause the board never boot up if some random failures happen (like eMMC/DRAM access error at some critical temperature). Check the "successful_boot" flag before marking the slot as "unbootable", this will help ease the "no bootable slot" issue. Test: slot switch on imx8qm_mek. Change-Id: Idfcc5723aa233e9019365b792c48bf8a5dc99b96 Signed-off-by: Ji Luo <>
2019-11-01MLK-22881 board: imx8mn: Update the DDR4 timing script on imx8mn ddr4 evkJacky Bai1-1171/+1013
On i.MX8MN, we can only support DLL-ON mode only, so update the timing to support 2400mts & 1066mts setpoint. Signed-off-by: Jacky Bai <> Reviewed-by: Ye Li <>
2019-10-28MLK-22851-4 imx8mm/imx8mn: Enable eMMC HS400ES and SD UHS mode on EVKYe Li10-9/+33
Both imx8mn/imx8mm EVK boards have eMMC 5.1 chip and support SD3.0 So we enable the HS400ES and UHS configs to enhance eMMC/SD access. The change also needs to set usdhc clock to 400Mhz and update compatible string to fsl,imx8mm-usdhc Signed-off-by: Ye Li <> Reviewed-by: Peng Fan <>
2019-10-27MLK-22851-3 imx8mq: Enable eMMC HS400 and SD UHS mode on EVKYe Li3-4/+6
iMX8MQ EVK board has a eMMC5.0 chip and supports SD3.0, so enable the UHS and HS400 configs to enhance the eMMC/SD access. The change also needs to set usdhc clock to 400Mhz, and add the off-on-delay-us to SD reset pin, otherwise some SD cards will fail to select UHS mode in re-initialization. Signed-off-by: Ye Li <>
2019-10-27MLK-22851-2 mmc: fsl_esdhc: Update compatible string for imx8mYe Li1-2/+4
To enable HS400 and UHS for imx8m platforms, update the driver data to share with imx8x platforms and add relevant compatible string. Signed-off-by: Ye Li <>
2019-10-27MLK-22851-1 mmc: fsl_esdhc: reduce unnecessary clock changeYe Li1-5/+7
In mmc initial state, the mmc framework sets clock to 0, so the fsl_esdhc driver converts to use min clock 400Khz. But the priv->clock is logged 400Khz not 0, and cause following calls to set_ios to set clock again. Each set to clock has 10ms delay for stable, then the problem accumulates some unnecessary delay. Signed-off-by: Ye Li <>
2019-10-24MLK-22832 board: imx8mn_evk: Fix the retention hang on imx8mn lpddr4 evkJacky Bai1-3/+0
The '0x20060' register is used for phy memory reset, should not be put in the ddrphy config section, so remove it from the timing script, otherwise, ddr retention can NOT work. Additionally, the'0xd0000' register config in phy section is redundant, remove it too. Signed-off-by: Jacky Bai <> Reviewed-by: Peng Fan <>
2019-10-23MLK-22830 mx7ulp: Fix build break of mx7ulp_evk_m4boot_defconfigYe Li1-2/+0
Get build error when using mx7ulp_evk_m4boot_defconfig arch/arm/lib/built-in.o: In function `setup_serial_tag': /home/leyoen/Workspace/uboot-imx/arch/arm/lib/bootm.c:191: undefined reference to `get_board_serial' The boot cause is CONFIG_SERIAL_TAG is defined in header file without depending on fastboot, but the function definition uses CONFIG_FSL_FASTBOOT. So remove the wrong macro from function definition to fix the issue Signed-off-by: Ye Li <> Reviewed-by: Peng Fan <>
2019-10-16MLK-22762 imx8mn_ddr4_evk: Set VDD_SOC to 0.85v in suspend modeYe Li1-0/+3
According to datasheet, the VDD_SOC should be 0.85v in suspend mode. But current voltage is default 0.80v because we don't configure BD71837 BUCK1_VOLT_SUSP register. Signed-off-by: Ye Li <> Tested-by: Anson Huang <> Reviewed-by: Peng Fan <>
2019-10-16MLK-22759-4 DTS: imx8mn: Update DDR4 EVK DTSYe Li1-1/+1
Add the "DDR4" to board name to distinguish with LPDDR4 board. Signed-off-by: Ye Li <> Reviewed-by: Peng Fan <>
2019-10-15MLK-22759-3 imx8mn: Add LPDDR4 EVK board supportYe Li9-2/+2212
Add support for iMX8MN LPDDR4 EVK board which uses 2GB LPDDR4 and PCA9450B PMIC. Signed-off-by: Ye Li <>
2019-10-15MLK-22759-2 power: Add new PMIC PCA9450 driverYe Li5-0/+214
PCA9450 PMIC series is used to support iMX8MM (PCA9450A) and iMX8MN (PCA9450B). Add the PMIC driver for both PCA9450A and PCA9450B. Signed-off-by: Robin Gong <> Signed-off-by: Ye Li <>
2019-10-15MLK-22759-1 imx8mn: Use CONFIG_TARGET_IMX8MN_DDR4_EVK for DDR4 EVK boardYe Li9-9/+9
To align with other iMX8M platforms, use CONFIG_TARGET_IMX8MN_DDR4_EVK for DDR4 EVK board and will use CONFIG_TARGET_IMX8MN_EVK for LPDDR4 EVK. Signed-off-by: Ye Li <>
2019-10-11MLK-22748 imx8mn: Fix flexspi flash SCLK violationYe Li1-8/+1
Current flexspi driver enables the Quad DTR read, so the measured 100Mhz SCLK is actually for DTR mode not SDR. However, according to MT25QU256ABA datasheet, this flash only supports max DTR at 90Mhz and max SDR at 166Mhz. It means current clock setting violate the flash spec. So change back the flexspi clock to align with imx8mm. Signed-off-by: Ye Li <> Reviewed-by: Peng Fan <>
2019-10-09MLK-22711-2: fastboot: emmc: update bootloader to offset 0 for RevC QXP chipFrank Li1-1/+1
ROM update emmc offset to 0. previous B0 is 32K. Signed-off-by: Frank Li <>
2019-10-09MLK-22711-1 show RevC instead of Rev? at boot logFrank Li2-0/+3
Add REVC informaiton. Signed-off-by: Frank Li <>
2019-10-09MA-15582 Fix imx8mn u-boot hangJi Luo5-8/+13
The u-boot-spl.bin is getting larger and it will break the ddr firmware which will cause ddr training fail. Disable unnecessary configs for imx8mn to reduce the spl image size. Test: boot on imx8mn_evk. Change-Id: Id105b0adf8669e471752495f78012314efad24c0 Signed-off-by: Ji Luo <>
2019-09-27MLK-22622 imx8m: Add Workaround for ROM SError issueYe Li2-0/+46
ROM SError happens on two cases: 1. ERR050342, on iMX8MQ HDCP enabled parts ROM writes to GPV1 register, but when ROM patch lock is fused, this write will cause SError. 2. ERR050350, on iMX8MQ/MM/MN, when the field return fuse is burned, HAB is field return mode, but the last 4K of ROM is still protected and cause SError. Since ROM mask SError until ATF unmask it, so then ATF always meets the exception. This patch works around the issue in SPL by enabling the SError exception and take it to eret immediately to clear the SError. Signed-off-by: Ye Li <> Reviewed-by: Peng Fan <>
2019-09-17imx: add lowlevel init for ARM64Peng Fan2-1/+23
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 <> (cherry picked from commit 7a0c9b08886e5dc7d50e640ed56eed0fe612161f)
2019-09-10MLK-22576 imx8: video: Set clock parent for DC0 display channelYe Li1-0/+12
When enable u-boot splash screen and set kernel dtb with -hdmi.dtb on imx8qm, the kernel reboot (partition reboot) will hang in u-boot if HDMI cable is plugged in. The root cause is kernel set the clock source of DC0 display0 channel to bypass clock, when doing reboot this clock setting may not be cleared. So u-boot has wrong clock source and cause lpcg stop bit always set. Fix the issue by adding the clock parent setting and not depend on default parent value. Signed-off-by: Ye Li <> Reviewed-by: Peng Fan <>
2019-08-26MA-15334-2 enable trusty for imx8q standard Android ubootfaqiang.zhu4-2/+48
"CONFIG_IMX_TRUSTY_OS=y" is added to the corresponding defconfig files to include trusty related code. "CONFIG_SPL_ENV_SUPPORT=y" and "CONFIG_SPL_LIBDISK_SUPPORT=y" are added because "mmc_get_env_dev()" and "blk_get_dev()" are invoked in SPL stage with trusty related code. "CONFIG_SHA256=y" is added since SPL will access RPMB now. MACROs are added in corresponding header files. standard android uboot has more content than android auto uboot, the uboot malloc pool size is changed from 76MB to 86MB to make the boot process can be handed over to kernel without malloc problem. Change-Id: I7505adeb2e30ddaecc8217cee991e6d7b0785af0 Signed-off-by: faqiang.zhu <>
2019-08-26MA-15334-1 add two defconfig files for trusty supported ubootfaqiang.zhu2-0/+196
add below two defconfig files: configs/imx8qm_mek_android_trusty_defconfig configs/imx8qxp_mek_android_trusty_defconfig they are directly copied from below two files for the ease of tracking the modifications: configs/imx8qm_mek_android_defconfig configs/imx8qxp_mek_android_defconfig Change-Id: I84ca6ce62698b48bceb651df95ad61cf3e565e99 Signed-off-by: faqiang.zhu <>
2019-08-11MLK-22425 TMU: iMX8MN: Enable loading TASR and TCALIV from fuseYe Li1-1/+1
Like iMX8MM, iMX8MN also needs SW to load TMU TASR and TCALIV registers value from fuse before enabling TMU calibration. Otherwise the calibration is not exact. Signed-off-by: Ye Li <> Reviewed-by: Anson Huang <>
2019-07-30MLK-22179-2 imx8mn_evk: Enable FSPI DQS loopback for high freqYe Li4-2/+11
There is an divider on imx8mn will always divide 2 to flexspi root clock. So actual SCLK output to device is 50Mhz on imx8mn not 100Mhz. After changing the root clock setting to configure SCLK to 100Mhz, found the read data is not correct. Must enable the internal DQS pad loopback to fix the problem. Signed-off-by: Ye Li <> Reviewed-by: Peng Fan <>
2019-07-30MLK-22179-1 fsl_fspi: Add a config to enable dummy DQS loopback from padYe Li2-0/+11
Set MCR0 RXCLKSRC to 1 to enable DQS loopback from pad to support higher frequency. Signed-off-by: Ye Li <>
2019-07-30MA-15217-2 Enable dual bootloader for imx8mJi Luo14-14/+69
Open configs to enable dual bootloader feature for imx8m platforms. Test: A/B slot switch and spl recovery mode test. Change-Id: I3fe0217c858b4cb1e06bd76f829a4f8977370cde Signed-off-by: Ji Luo <>
2019-07-26MA-15217-1 Enable dual bootloader for imx8mJi Luo10-0/+696
Duplicate configs to enable dual bootloader for imx8m. Change-Id: I4e03b73dc42f036e0c8d477ce5d2a6892ac2938c Signed-off-by: Ji Luo <>
2019-07-25MA-15180 Refine dual bootloader flow for imx8mJi Luo3-18/+28
We may need to enable the dual bootloader feature on non-trusty platforms, skip the bootloader rollback index check in spl if trusty is not enabled. Don't generate rpmb key in spl, it should be generated in u-boot proper with u-boot commands. Test: dual bootloader on imx8mm. Change-Id: Iac455e0140cd6f4472a66d267d9ba0d40df7102c Signed-off-by: Ji Luo <>
2019-07-19MA-15158 Set spl recovery mode for dual bootloaderJi Luo6-10/+160
The A/B slot selection is moved to spl, it may lead to hang if no bootable slots found. The only way to recover the board is re-flash images with uuu tool, which is quite inconvenient for some customers who can't enter serial download mode. This patch will set "spl recovery mode" which will give us a chance to re-flash images with fastboot commands. Test: Enter spl recovery mode and flash images when no bootable slots found. Change-Id: I31278f5212bde7609fe2f49e77b3849e92c0c516 Signed-off-by: Ji Luo <>
2019-07-18MLK-22287 imx8mn: enable CONFIG_ENV_DEFAULT_NOWHERE at defaultYe Li2-1/+1
This CONFIG_ENV_DEFAULT_NOWHERE config must be enabled for USB download when we implemented the override function to select env storage medium. To avoid adding it to every imx8mn defconfig, enable the config as default on imx8mn. Signed-off-by: Ye Li <>
2019-07-18MA-15152 erase user data before setting lock/unlock statusfaqiang.zhu1-8/+2
when conduct fastboot lock/unlock operations, erase the userdata first and then set lock/unlock status to improve security level. Change-Id: I74c571c35b88afd6fdd4c287463f7209da8c15ff Signed-off-by: faqiang.zhu <>
2019-07-17MLK-22283 env: fix NAND ENV build issue introduced by env offset changeYe Li1-18/+10
Get below build error in nand env, because we should not call function in array initialization. env/nand.c: In function ‘env_nand_save’: env/nand.c:196:15: error: initializer element is not constant .offset = env_get_offset(CONFIG_ENV_OFFSET), Signed-off-by: Ye Li <>
2019-07-17MLK-22279-5 imx8mn_evk: Remove flexspi defconfigYe Li1-73/+0
Remove the defconfig for flexspi boot, we can use one defconfig for both SD and flexspi. Signed-off-by: Ye Li <>
2019-07-17MLK-22279-4 imx8mn_evk: Enable multiple env storagesYe Li2-6/+6
Enable multiple environment storage devices on iMX8MN DDR4 EVK board. Remove duplicated CONFIG_ENV_OFFSET since we use env_get_offset to override it. Signed-off-by: Ye Li <>
2019-07-17MLK-22279-3 imx8mn: override env_get_offset and env_get_locationYe Li1-0/+58
To use one defconfig for all boot device, we have to runtime set env offset and return env medium according to the boot device. This patch overrides the env_get_offset and env_get_location to implement the feature. Signed-off-by: Ye Li <>
2019-07-17MLK-22279-2 env: Add a config to enable nowhere as default locationYe Li4-2/+10
When booting from USB there is no place to store the environment and should use default env. However CONFIG_ENV_IS_NOWHERE has dependence with other env storage config. If we enable multiple storages, NOWHERE can't be enabled. And saveenv won't be built if NOWHERE is set. This patch introduces a new CONFIG_ENV_DEFAULT_NOWHERE, that can enable NOWHERE as a default env location when other storage are not avaliable. And allow to build saveenv. Signed-off-by: Ye Li <>
2019-07-17MLK-22279-1 env: Add env_get_offset to override static env offsetYe Li7-22/+35
Add env_get_offset interface to override static CONFIG_ENV_OFFSET, and update env location driver to use env_get_offset. So for different storage medium, we are able to store the env at different offset. We don't support this feature when CONFIG_ENV_IS_EMBEDDED is set. Signed-off-by: Ye Li <>
2019-07-17env: fix allow to build multiple environmentsRajesh Bhagat2-9/+3
Patch fixes build error when enabling CONFIG_ENV_IS_IN_SPI_FLAS and CONFIG_ENV_IS_IN_MMC at the same time mentioned issue in below link: Refer: build error when enabling CONFIG_ENV_IS_IN_SPI_FLASH and CONFIG_ENV_IS_IN_MMC at the same time. Signed-off-by: Rajesh Bhagat <> Reviewed-by: York Sun <>
2019-07-17MA-15151 Limit some hwcrypto commands within bootloaderJi Luo4-0/+15
It can be dangerous to export some hwcrypto commands to Linux, add commands to limit some commands within bootloader. Test: hwcrypto commands can't be used after locking boot state. Change-Id: Ib0a96a87f661778c133178840d8dccf49f151c22 Signed-off-by: Ji Luo <>
2019-07-17MA-15017 Add new command to generate bkek from trustyJi Luo3-0/+40
Add new command to generate bkek from trusty. Test: generate and dump bkek. Change-Id: I6b2a30b87c755eecd00ced7c53cfb86e432040de Signed-off-by: Ji Luo <>