summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
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 <ye.li@nxp.com> Reviewed-by: Peng Fan <peng.fan@nxp.com>
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 <ye.li@nxp.com>
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 <ye.li@nxp.com>
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 <ye.li@nxp.com>
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 <ping.bai@nxp.com> Reviewed-by: Peng Fan <peng.fan@nxp.com>
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 <ye.li@nxp.com> Reviewed-by: Peng Fan <peng.fan@nxp.com>
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 <ye.li@nxp.com> Tested-by: Anson Huang <Anson.Huang@nxp.com> Reviewed-by: Peng Fan <peng.fan@nxp.com>
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 <ye.li@nxp.com> Reviewed-by: Peng Fan <peng.fan@nxp.com>
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 <ye.li@nxp.com>
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 <yibin.gong@nxp.com> Signed-off-by: Ye Li <ye.li@nxp.com>
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 <ye.li@nxp.com>
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 <ye.li@nxp.com> Reviewed-by: Peng Fan <peng.fan@nxp.com>
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 <Frank.Li@nxp.com>
2019-10-09MLK-22711-1 show RevC instead of Rev? at boot logFrank Li2-0/+3
Add REVC informaiton. Signed-off-by: Frank Li <Frank.Li@nxp.com>
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 <ji.luo@nxp.com>
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 <ye.li@nxp.com> Reviewed-by: Peng Fan <peng.fan@nxp.com>
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 <peng.fan@nxp.com> (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 <ye.li@nxp.com> Reviewed-by: Peng Fan <peng.fan@nxp.com>
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 <faqiang.zhu@nxp.com>
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 <faqiang.zhu@nxp.com>
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 <ye.li@nxp.com> Reviewed-by: Anson Huang <Anson.Huang@nxp.com>
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 <ye.li@nxp.com> Reviewed-by: Peng Fan <peng.fan@nxp.com>
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 <ye.li@nxp.com>
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 <ji.luo@nxp.com>
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 <ji.luo@nxp.com>
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 <ji.luo@nxp.com>
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 <ji.luo@nxp.com>
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 <ye.li@nxp.com>
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 <faqiang.zhu@nxp.com>
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 <ye.li@nxp.com>
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 <ye.li@nxp.com>
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 <ye.li@nxp.com>
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 <ye.li@nxp.com>
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 <ye.li@nxp.com>
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 <ye.li@nxp.com>
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: https://lists.denx.de/pipermail/u-boot/2018-February/319565.html 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 <rajesh.bhagat@nxp.com> Reviewed-by: York Sun <york.sun@nxp.com>
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 <ji.luo@nxp.com>
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 <ji.luo@nxp.com>
2019-07-17MA-15015 Add sha256_hmac supportJi Luo2-0/+43
Add sha256 hmac support in u-boot. Test: hmac calculation. Change-Id: I0f1438fed8290620a1bb0663d19c21e20098eb5a Signed-off-by: Ji Luo <ji.luo@nxp.com>
2019-07-16MA-15142 Support secure attestation provisionHaoran.Wang4-0/+61
In host end, need encrypt the attestation keys and certs by manufacture protection public key though AES-128-ECB. Then use below 4 set of commands to provision encrypted RSA attestation and EC attestation: * $fastboot stage atte_rsa_key.bin * $fastboot oem set-rsa-atte-key-enc * $fastboot stage atte_rsa_cert.bin * $fastboot oem append-rsa-atte-cert-enc * $fastboot stage atte_ec_key.bin * $fastboot oem set-ec-atte-key-enc * $fastboot stage atte_ec_cert.bin * $fastboot oem append-ec-atte-cert-enc Change-Id: I8a7c64004a17f7dde89f28c3123a2e2b1a6d3346 Signed-off-by: Haoran.Wang <elven.wang@nxp.com>
2019-07-16MA-15019-1 Support Manufacture Protection public key generationJi Luo8-2/+118
Add new keymaster commands to get Manufacure Production key (mppubk). Since the mppubk can only be generated in OEM CLOSED imx8q board, so we can only this command when the board is HAB/AHAB closed. Commands to extract the mppubk: * $fastboot oem get-mppubk * $fastboot get_staged mppubk.bin Test: Generate and dump the mppubk.bin Change-Id: Idc59e78ca6345497e744162664b8293f50d1eda4 Signed-off-by: Ji Luo <ji.luo@nxp.com>
2019-07-14MLK-22258 imx8mn: Update speed gradeYe Li1-0/+6
imx8mn speed grade fuse uses new definitions as below. So have to update get_cpu_speed_grade_hz function to match it. SPEED_GRADING[5:0]: SPEED_GRADE[5:4] SPEED_GRADE[3:0] MHz xx 0000 2300 xx 0001 2200 xx 0010 2100 xx 0011 2000 xx 0100 1900 xx 0101 1800 xx 0110 1700 xx 0111 1600 xx 1000 1500 xx 1001 1400 xx 1010 1300 xx 1011 1200 xx 1100 1100 xx 1101 1000 xx 1110 900 xx 1111 800 Signed-off-by: Ye Li <ye.li@nxp.com>
2019-07-12MA-15087-4 Support mmc loader for imx8mn_evkHaoran.Wang2-2/+16
Align using emmc loader when there is no Trusty OS for Android standard boot in SD/EMMC. Add hook for getting correct offset when load uboot. Change-Id: I5898cf196e734ffaca1a513918a049ce504b14e9 Signed-off-by: Haoran.Wang <elven.wang@nxp.com>
2019-07-12MA-15087-1 Enable Trusty OS on imx8mnHaoran.Wang1-6/+4
This patch removed the SDP support in imx8mn due it will cause the memory resource limitation when run SPL. This patch also removed ROMAPI loader. Due Trusty OS need SPL support mmc related features. So fall back to use mmc loader instead of ROMAPI. To fix mmc loader, correct the uboot raw loader offset. Change-Id: If13f6c9133226efd0831a1867377b8ab0abb6327 Signed-off-by: Haoran.Wang <elven.wang@nxp.com>
2019-07-12MA-15087 Duplicate imx8mn defconfig to trusty oneHaoran.Wang1-0/+73
Duplicate imx8mn_ddr4_evk_android_defconfig to imx8mn_ddr4_evk_android_trusty_defconfig to for the one who support Trusty OS. Change-Id: I0577324a913abc1a118d2e58bea2534b8873ae88 Signed-off-by: Haoran.Wang <elven.wang@nxp.com>
2019-07-09MLK-22245 mx6qp: Fix issue caused by moving pre_misc_setting()Ye Li2-41/+46
The commit "MLK-22219 mx6: Place pre_misc_setting() into a common location" causes iMX6QP boot hang. Because QoS settings in pre_misc_setting depends on IPU and PRG clocks enabled. So still calling pre_misc_setting in enable_ipu_clock, and move enable_ipu_clock to arch_cpu_init Signed-off-by: Ye Li <ye.li@nxp.com>
2019-07-10MA-15062-4 support flashing mcu firmware on uboot used by uuufaqiang.zhu1-0/+1
"mcu_os" parition is hard-coded in uboot, the uboot used by uuu also need to have mcu firmware flash support to flash Cortex-M core images when used uuu. Change-Id: Iaf2a0061f2407941aececd3d1a909d5fcd721ace Signed-off-by: faqiang.zhu <faqiang.zhu@nxp.com>
2019-07-09MLK-22240 imx8m: Fix GPR setting issue for ENET TX CLK selectYe Li7-8/+8
Should use IOMUXC_GPR_GPR1_GPR_ENET1_TX_CLK_SEL_MASK not the IOMUXC_GPR_GPR1_GPR_ENET1_TX_CLK_SEL_SHIFT for clrsetbits_le32. This cause to clean other bits. Because the GPR1 is 0 by default, so this typo does not cause any issue but should be fixed. Signed-off-by: Ye Li <ye.li@nxp.com> Reviewed-by: Peng Fan <peng.fan@nxp.com>
2019-07-08MA-14981-1 Add evk_imx8mm 4GB DDR supportJi Luo8-0/+2082
Add configs to support evk_imx8mm 4GB DDR board. The 4GB DDR will be split into two banks, one is 3GB (0x4000_0000~0xffff_0000) and another is 1GB(0x1_0000_0000~0x1_4000_0000). Test: build and boot with or without trusty. Change-Id: I02f6465fc5709b15fd76820edb846452d011dd56 Signed-off-by: Ji Luo <ji.luo@nxp.com>
2019-07-08MA-14948 Append lock status by Android PropertyHaoran.Wang1-2/+2
Follow Bootloader requirement spec in https://source.android.com/devices/bootloader/unlock-trusty. Need to pass the flash lock status by androidboot.flash.locked. This patch fixed the GTS failure com.google.android.gts.persistentdata.PersistentDataHostTest#testTestGetFlashLockState. Change-Id: I9a3508f7546b02c998e7668df2a33f864a58db75 Signed-off-by: Haoran.Wang <elven.wang@nxp.com>