Ye Li [Thu, 18 Jul 2019 06:14:59 +0000 (23:14 -0700)]
MLK-22283 env: fix NAND ENV build issue introduced by env offset change
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>
(cherry picked from commit
da33243320c9ebbde3f343aee7623028a440a024)
Ye Li [Wed, 17 Jul 2019 06:19:11 +0000 (23:19 -0700)]
MLK-22279-5 imx8mn_evk: Remove flexspi defconfig
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>
Ye Li [Tue, 16 Jul 2019 09:11:04 +0000 (02:11 -0700)]
MLK-22279-4 imx8mn_evk: Enable multiple env storages
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>
(cherry picked from commit
5c93b1e7f58a0280f7dda71865361c62d3ba6270)
Ye Li [Mon, 15 Jul 2019 08:16:46 +0000 (01:16 -0700)]
MLK-22279-3 imx8mn: override env_get_offset and env_get_location
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>
(cherry picked from commit
c25239a695feaad68051bab3ef098eef31d07f09)
Ye Li [Tue, 16 Jul 2019 09:06:10 +0000 (02:06 -0700)]
MLK-22279-2 env: Add a config to enable nowhere as default location
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>
(cherry picked from commit
64c02d26555491eb7cb758f58511620c1590c378)
Ye Li [Tue, 16 Jul 2019 08:39:40 +0000 (01:39 -0700)]
MLK-22279-1 env: Add env_get_offset to override static env offset
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>
(cherry picked from commit
5b12d7cabb14bab9a95af7460b36c6c85db1b328)
Ji Luo [Thu, 30 May 2019 02:23:10 +0000 (10:23 +0800)]
MA-14898 Fix build warnings
Include correct header files to avoid build warning:
common/image-android.c:151:68: warning: implicit declaration
of function ‘mmc_get_env_dev’ [-Wimplicit-function-declaration]
" androidboot.boot_device_root=mmcblk%d", mmc_map_to_kernel_blk(mmc_get_env_dev()));
Change-Id: I932a178500e7397f72d717efae0dd2d954a909d8
Signed-off-by: Ji Luo <ji.luo@nxp.com>
Han Xu [Fri, 12 Jul 2019 21:19:56 +0000 (16:19 -0500)]
MLK-22259-4: mx6dlsabreauto: configs: add default mtdids and mtdparts configs
set the i.MX6DL default mtdids value as
"nor0=
8000000.nor,nand0=gpmi-nand", nandbcb can directly write to the
nandboot partition after u-boot brings up.
=> nandbcb update $loadaddr nandboot 912384
Device nor0 not found!
current device is invalid, skip it and check the next one
device 0 offset 0x0, size 0x912384
Erasing at 0x3f00000 -- 100% complete.
NAND fw write: 0x200000 offset, 0x916000 bytes written: OK
Signed-off-by: Han Xu <han.xu@nxp.com>
Han Xu [Fri, 12 Jul 2019 20:53:12 +0000 (15:53 -0500)]
MLK-22259-3: mx6sabre: config: remove space from mtdparts definition
there should no extra space in mtdparts definition
Signed-off-by: Han Xu <han.xu@nxp.com>
Han Xu [Fri, 12 Jul 2019 20:52:58 +0000 (15:52 -0500)]
MLK-22259-2: cmd: mtdparts: skip invalid devices rather than quit
mtdparts quit when invalid mtd devices found. Add thes patches to skip
the invalid devices, so NAND partitions can be alway found to burn boot
images.
For instance,
On i.MX6DL Sabreauto, nand config u-boot didn't enable the weim nor, so
parsing
8000000.nor leads to error:
Device nor0 not found!
With the patches, we can skip this invalid device and still get nand
boot partition table:
Device nor0 not found!
current device is invalid, skip it and check the next one
device nand0 <gpmi-nand>, # parts = 5
0: nandboot 0x04000000 0x00000000 0
1: nandkernel 0x01000000 0x04000000 0
2: nanddtb 0x01000000 0x05000000 0
3: nandtee 0x01000000 0x06000000 0
4: nandrootfs 0xf9000000 0x07000000 0
active partition: nand0,0 - (nandboot) 0x04000000 @ 0x00000000
Signed-off-by: Han Xu <han.xu@nxp.com>
Han Xu [Fri, 12 Jul 2019 20:52:46 +0000 (15:52 -0500)]
MLK-22259-1: cmd: Kconfig: add new option CONFIG_MTDPARTS_SKIP_INVALID
add a new option in mtdparts to skip the invalid devices rather than
just quit
Signed-off-by: Han Xu <han.xu@nxp.com>
Shyam Saini [Wed, 10 Jul 2019 19:19:45 +0000 (14:19 -0500)]
i.MX6: nand: add nandbcb command for imx
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.
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>
Signed-off-by: Han Xu <han.xu@nxp.com>
Shyam Saini [Wed, 10 Jul 2019 19:15:49 +0000 (14:15 -0500)]
arm: i.MX: Add CMD_NANDBCB Kconfig entry
Add Kconfig entry for CMD_NANDBCB, and default y on i.MX6
platform with NAND_MXS defined.
Reviewed-by: Stefano Babic <sbabic@denx.de>
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Signed-off-by: Shyam Saini <shyam.saini@amarulasolutions.com>
Signed-off-by: Han Xu <han.xu@nxp.com>
faqiang.zhu [Tue, 9 Jul 2019 10:52:12 +0000 (18:52 +0800)]
MA-14916-10 fix fastboot reboot bootloader issue
In Android, the reboot bootloader flag is written to misc partition, in
the boot flow, u-boot will check that message to decide whether enter
fastboot mode or not. To be compatible with the common implemention,
keep the fastboot_set_reboot_flag there and redefine it to avoid the
error return value which block the reboot process.
Change-Id: Ifb55236d5a5daf3edd124d3ed01851ff6e916e1a
Signed-off-by: faqiang.zhu <faqiang.zhu@nxp.com>
Jindong [Mon, 13 May 2019 10:10:25 +0000 (18:10 +0800)]
MA-14712 change androidboot.storage_type to androidboot.boot_device_root
storage_type is emmc or sd, which is not friendly
for user space, for example android health HAL need access
/sys/block/mmcblkX/stat.
Replace it with mmcblkX named as boot_device_root.
(Keep storage_type for compatibility now)
Change-Id: I7486d522696e9fe3dde8bdc8834ac11d25df7d79
Signed-off-by: Jindong <jindong.yue@nxp.com>
Ji Luo [Fri, 5 Jul 2019 04:41:43 +0000 (12:41 +0800)]
MA-13453-1 Add new board target imx8mq_aiy
Add support for new target imx8mq_aiy.
Test: build and boot ok on imx8mq_aiy.
Change-Id: Ie616c3ae5fc5273036e975acd88fccfa8c5c95ee
Signed-off-by: Ji Luo <ji.luo@nxp.com>
Leonid Lobachev [Mon, 16 Jul 2018 19:30:01 +0000 (12:30 -0700)]
Fix P0/EVT boards boot without serial cable connection.
Change-Id: I5969217e400ab494f9a74662d1d228fcf2e2d465
Ji Luo [Sun, 30 Sep 2018 07:24:09 +0000 (15:24 +0800)]
MA-12973 [AUTO] Skip serial init in board_init_f
Serial init in board_init_f will cost much time, skip it here
because the serial will be initialized again in board_init_r
and it's more faster (after cache is enabled). We will miss
some logs before the serial is ready but it's ok for Android Auto.
This commit will save about 190ms on imx8qm.
Test: boot ok for both imx8qm and imx8qxp.
Change-Id: If6efdc19794aecda862f22b6fec7f7aba2005766
Signed-off-by: Ji Luo <ji.luo@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
Ji Luo [Fri, 5 Jul 2019 01:18:36 +0000 (09:18 +0800)]
MA-12421 Fix CAAM not work on Android Things
Blob buffer size is 48 bytes larger than the plain text buffer,
set correct range when flush the dcache. Also use cache aligned
buffer for the blob/plain_text to avoid failure in CAAM.
Change-Id: I8f311b9d21fc7d26d60e9ba23dfb239d2582cedf
Signed-off-by: Ji Luo <ji.luo@nxp.com>
Ye Li [Thu, 7 Jun 2018 14:19:57 +0000 (07:19 -0700)]
MLK-18591-8 android: Add imx8/imx8m reference boards support
Add board level support for android and android auto. Each board has
android/andriod_auto specified header file for defining relevant configuraitons.
And add build targets for their android uboot images building.
Change-Id: Ib7c10404dbca9237ab074427d3cb10d98bfc0ed9
Signed-off-by: Ye Li <ye.li@nxp.com>
Ji Luo [Fri, 21 Jun 2019 07:53:50 +0000 (15:53 +0800)]
MA-14916-4 support dual bootloader for imx8m, imx8q
this commit is a merge of three patches from imx_v2018.03 as below:
1.
commit
dbcf1e3cc079d2f1b3df6c4c9ec3a34d0c05eb4c
Author: Luo Ji <ji.luo@nxp.com>
Date: Fri Jun 8 10:31:11 2018 +0800
[iot] Support dual bootloader in SPL
Move the A/B slot check to SPL, the A/B slot switch
workflow is just like what we have in libavb_ab.
Test: A/B select works fine on imx8m.
2.
commit
71562aae3b8123ccd7503e596e478951568fcd24
Author: Ji Luo <ji.luo@nxp.com>
Date: Mon Jan 14 18:28:08 2019 +0800
MA-13938 [Android] imx8q: Support dual bootloader feature
Support dual bootloader feature for imx8q which uses the
container format. Move the A/B slot select and verify to
SPL stage, the bootloader rollback index will be stored
at the last 8K bytes of eMMC rpmb storage.
Test: Boot and rbindex verify pass on imx8q.
Change-Id: Ic9410a48092cc05de599dd897fc912177e2a1fe1
Signed-off-by: faqiang.zhu <faqiang.zhu@nxp.com>
Ye Li [Fri, 12 Jul 2019 06:20:02 +0000 (23:20 -0700)]
MLK-22258 imx8mn: Update speed grade
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>
(cherry picked from commit
e4e9ba2e868ea1b55581bdc1b7096cfb9cc15009)
Clement Faure [Tue, 28 May 2019 15:01:07 +0000 (17:01 +0200)]
MLK-21297 imx8: Add DEK blob encapsulation
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>
Peng Fan [Thu, 15 Nov 2018 05:13:14 +0000 (13:13 +0800)]
MLK-20373-2 dm: serial: introduce puts hook
Introduce puts hook for dm serial driver.
Change-Id: I75423998c7d8db20949bae6ac46a094dc62c9612
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Flynn xu <flynn.xu@nxp.com>
Luo Ji [Wed, 3 Jul 2019 06:38:16 +0000 (14:38 +0800)]
MA-14916-8 [iot] Set power-on write protection for boot1 partition
The RPMB keyslot is stored in last block of boot1 partition which
is easily erased or tampered, set power-on write protection for this
partition to prevent corruption.
Test: Power-on write protection works as expected on imx8m.
Change-Id: Ib7e1094b979f7d94c0a2817391c5b3b5f3205d76
Signed-off-by: Luo Ji <ji.luo@nxp.com>
faqiang.zhu [Wed, 3 Jul 2019 06:23:06 +0000 (14:23 +0800)]
MA-14916-7 comply with mmc struct definition in avb library
Driver Module may be used in SPL, with CONFIG_BLK enabled for U-Boot,
CONFIG_SPL_BLK will be enabled, struct mmc definition will be different.
comply with that mmc struct definition in fsl_avbkey.c file to handle
conditions when DM is used in SPL.
Change-Id: I632600556e764b25228ba467a5e5141cf3fc3dfe
Signed-off-by: faqiang.zhu <faqiang.zhu@nxp.com>
Ji Luo [Fri, 11 Jan 2019 01:46:53 +0000 (09:46 +0800)]
MA-13937 Enable CAAM for imx8q
The CAAM driver in u-boot will use JR0 by default, but for
imx8q, both JR0 and JR1 are assigned to SECO and A core
should never access them.
Power on the JR3 in this patchset and use it to complete
the CAAM operations for imx8q.
Test: CAAM self test cases pass for imx8q.
below patches are merged to this commit:
MA-13964 imx8q: Kick the CAAM JR before kicking the SMMU
MA-13969 Fix CAAM build warnings
Change-Id: Ie3d77d1f2910e7f4c257c797c12b5c8a30ad936a
Signed-off-by: Ji Luo <ji.luo@nxp.com>
Ji Luo [Fri, 11 Jan 2019 01:01:37 +0000 (09:01 +0800)]
MA-13936 Add CAAM self test
Add CAAM RNG generating and BLOB encap/decap
self test cases.
Test: Test cases pass on imx8qm_mek/imx6qp_sabresd.
Change-Id: I538f7b1581b36df83a3006ac133ca9e7b57ab4f0
Signed-off-by: Ji Luo <ji.luo@nxp.com>
Ye Li [Mon, 21 May 2018 09:32:08 +0000 (02:32 -0700)]
MA-14916-3: Add mx6/7 reference board support to enable android fastboot
this commit is based on the cherrypick of a patch from imx_v2018.03 with
below commit info:
"
commit
f15e20eeb42d421d694e75d6f159d908b5606e1f
Author: Ye Li <ye.li@nxp.com>
Date: Mon May 21 02:32:08 2018 -0700
MLK-18591-7 android: Add mx6/7 reference board support to enable android
fastboot
Add board level support for android fastboot feature. Each board has
a android specified header file for defining android related configuraitons.
And add build targets for their android uboot images building.
"
and then some modification is made to make the compilation pass.
the defconfig files modification is based on corresponding files from
BSP team, ucmd/acmd function is disabled for Android U-Boot.
with defconfig files for 6ul chips, the compilation will terminate with
failure on imx_v2018.03, so no modification was made on them.
Change-Id: Ibe5979239e5e6a78b06f332c9041d1f1de2566fc
Signed-off-by: Ye Li <ye.li@nxp.com>
faqiang.zhu [Tue, 11 Jun 2019 03:02:32 +0000 (11:02 +0800)]
MA-14916-1 adapt to the directory change of libavb
libavb is now under the directory of lib/, not lib/avb/ as before, to
adapt to this change, some modifications are made:
1. header file inclusion change, including parameter of -I option in
Makefile
2. remove avb_sysdeps_posix.o in Makefile since the functions in
avb_sysdeps_posix.c has beed redefined in fsl_avb_sysdeps_uboot.c
Change-Id: I4216e3ddb4e3e810783e4f46b953eda510c2627b
Signed-off-by: faqiang.zhu <faqiang.zhu@nxp.com>
Ye Li [Wed, 10 Jul 2019 05:28:40 +0000 (22:28 -0700)]
MLK-22245 mx6qp: Fix issue caused by moving pre_misc_setting()
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>
Clement Faure [Thu, 23 May 2019 14:00:11 +0000 (16:00 +0200)]
TEE-346 Add DEK blob encapsulation for imx8m
Add DEK blob encapsulation support for IMX8M through "dek_blob" command.
On ARMv8, u-boot runs in non-secure, thus cannot encapsulate a DEK blob
for encrypted boot.
The DEK blob is encapsulated by OP-TEE through a trusted application call.
U-boot sends and receives the DEK and the DEK blob binaries through OP-TEE
dynamic shared memory.
To enable the DEK blob encapsulation, add to the defconfig:
CONFIG_SECURE_BOOT=y
CONFIG_FAT_WRITE=y
CONFIG_CMD_DEKBLOB=y
Signed-off-by: Clement Faure <clement.faure@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
Ye Li [Thu, 4 Jul 2019 09:20:23 +0000 (02:20 -0700)]
MLK-22192 imx8mn: Add variant parts support
According to datasheet, there are totally 6 variant parts for imx8mn:
Quad, Dual, Solo with core number changed.
QuadLite, DualLite, SoloLite with core number changed and GPU disabled.
Add the support for these variant parts
1. Recognize the variant parts according to fuse
2. Power down disabled cores
3. Remove the cores node and disable GPU node from kernel DTB before
entering kernel.
4. Since the mscale dummy id has been used out, increase one more bit
(bit 8) for cpu id.
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit
144bd9ce223ead71e1726bea510242a3166f66ce)
Peng Fan [Tue, 25 Jun 2019 01:42:02 +0000 (09:42 +0800)]
MLK-22101 configs: imx8mn: add jailhouse env
Add jailhouse env for booting linux to support jailhouse
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
90969cad72e279429fb580a9ac10bd91a032d024)
Ye Li [Fri, 21 Jun 2019 03:49:56 +0000 (20:49 -0700)]
MLK-22080 imx8mn_evk: add SPL and u-boot build for nominal mode
Add imx8mn_ddr4_evk_nom_defconfig to generate SPL and u-boot to force SOC
to nominal mode. So the VDD_SOC will be 0.85V and ARM will be fixed to 0.85V
with DVFS disabled in kernel.
Signed-off-by: Ye Li <ye.li@nxp.com>
Acked-by: Anson Huang <Anson.Huang@nxp.com>
(cherry picked from commit
0dca81742f51141ce0fb2117cbc1e99b84945009)
Ye Li [Fri, 21 Jun 2019 03:09:07 +0000 (20:09 -0700)]
MLK-22078 romapi: Fix issue for stream mode with secure boot enabled
When download image through ROM API for stream mode (USB, eMMC fastboot).
We uses tricky way to get the total image size:
The spl_load_simple_fit is called but the data reading is invalid, so the image
data is not really downloaded.
We should not call HAB authenticate in this tricky way. Otherwise it
will alway fail.
This patch add a new flag SPL_FIT_BYPASS_POST_LOAD to skip the authentication
only for this tricky using.
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit
47b0cf6de06ff9b3e2b2755d5c8203210378b26a)
Peng Fan [Wed, 19 Jun 2019 09:34:52 +0000 (17:34 +0800)]
MLK-22047 imx8mn: pins: add SION for I2C
SION bit needs to be set when the pin are used for I2C.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
e74561bcaa67e11ed5889959ab22afb5a9885c82)
Jian Li [Mon, 10 Jun 2019 06:43:12 +0000 (14:43 +0800)]
MLK-22001 imx8mn_evk: tune DDR4 QoS to improve performance
DDR efficiency improved to 78% while runing LCDIF,GPU,CPU
Signed-off-by: Jian Li <jian.li@nxp.com>
Reviewed-by: Jacky Bai <ping.bai@nxp.com>
(cherry picked from commit
cb91ff49c461974f1b2e1aa2e41e802cbbe4a087)
Ye Li [Tue, 11 Jun 2019 03:58:58 +0000 (20:58 -0700)]
MLK-21992-2 imx8mn_evk: add defconfig for flexspi nor boot
Add imx8mn_ddr4_evk_fspi_defconfig used for flexspi nor boot. Move
the u-boot environments to flexspi nor.
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit
892a92fe264bcb2ed1c9f72f97bbf5ba4742a8a5)
Ye Li [Tue, 11 Jun 2019 02:41:24 +0000 (19:41 -0700)]
MLK-21992-1 imx8mn_evk: Remove SPL MMC and SPL USB SDP configs
Since we are using ROM API to load image, then drivers like
SPL MMC and SPL USB SDP are not needed. Remove them from defconfig
file to reduce SPL size.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
e76e8e8c2447ca692412789350a81601020cb615)
Ye Li [Mon, 10 Jun 2019 11:02:00 +0000 (04:02 -0700)]
MLK-21988 imx8mn: rom_api: Change to support secondary boot on SD/eMMC
ROM supports secondary boot which can boot from a new offset specified
by fuse. So adjust the offset calculation by counting the ROM's image_offset
parameter for SD/eMMC.
The secondary boot on flexspi is different like SD/eMMC. ROM will map the
space of secondary boot to the start of flexspi AHB memory. So it is same
as primary boot for SPL.
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit
c33881aa8a7e5a545b156ea2c452c5f7578f1ebd)
Jacky Bai [Wed, 5 Jun 2019 05:37:44 +0000 (13:37 +0800)]
MLK-21950-02 board: imx8mn_evk: update the ddr performance setting
Update the ddr performance setting on i.MX8MN DDR4 EVK board.
Signed-off-by: Jacky Bai <ping.bai@nxp.com>
(cherry picked from commit
745f7a4e916d84bc61f2b131cffd50f53c6c1394)
Jacky Bai [Wed, 5 Jun 2019 03:26:12 +0000 (11:26 +0800)]
MLK-21950-01 driver: ddr: skip ddr_ss_gpr config on imx8mn
There is no DDR_SS_GPR0 exits on i.MX8MN, so skip setting
this register on i.MX8MN.
Signed-off-by: Jacky Bai <ping.bai@nxp.com>
(cherry picked from commit
a8040bc4524687ca026b9960fda18eb19606dade)
Ye Li [Wed, 8 May 2019 07:23:21 +0000 (00:23 -0700)]
MLK-21889-11 imx8mn_evk: Add board codes and defconfig for iMX8M Nano EVK
Add board level codes, header file, and defconfig for iMX8M Nano EVK
board. The board has similar design as iMX8MM EVK.
Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Jacky Bai <ping.bai@nxp.com>
(cherry picked from commit
01aa313aeb8df58a58bd1c7481e25fa89b42da2a)
Ye Li [Wed, 8 May 2019 07:12:28 +0000 (00:12 -0700)]
MLK-21889-10 DTS: imx8mn: Add DTS file for iMX8M Nano EVK board
Add the board DTS file for iMX8MN EVK. The base board re-use base board
of iMX8MM EVK. The CPU board has most of same design with iMX8MM CPU
board, except DDR4 and some PMIC power rails.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
11a3e15db979f2c0ae6768153a6776af51b4347b)
Ye Li [Wed, 21 Nov 2018 07:42:04 +0000 (23:42 -0800)]
MLK-21889-9 DTS: imx8mn: Add binding files and imx8mn.dtsi
Add soc DTSi and clock/pinctrl binding files. The pinctrl binding
file is v0.03 generated by tool
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
1e5548d6a7f17e7fe67d67325ee1882dd1b6190c)
Ye Li [Wed, 22 May 2019 12:40:50 +0000 (05:40 -0700)]
MLK-21889-8 fastboot: Set bootloader offset for imx8mn
The bootloader offset of SD and eMMC user area on imx8mn is 32KB.
When booting from eMMC boot0 or boot1 partition, no matter normal boot
or fastboot, the image offset is 0.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
ab8b408407f55ce55214312c1f5726382d337bd2)
Ye Li [Wed, 8 May 2019 07:10:57 +0000 (00:10 -0700)]
MLK-21889-7 EHCI: Enable iMX EHCI driver for iMX8M Nano
Add the IMX8MN to the EHCI-MX7 kconfig dependency.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
9e232b26b99790aa8f7717ed7f9bdf2a7422caac)
Ye Li [Wed, 8 May 2019 07:09:54 +0000 (00:09 -0700)]
MLK-21889-6 video: Add iMX8M Nano support to MIPI DSI
Add the IMX8MN to the SEC MIPI DSI kconfig dependency, and
update display GPR registers for iMX8MN changes.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
6d6b0c810cdc7f5b60d2959d9b5cd891bc5b8296)
Ye Li [Wed, 22 May 2019 11:03:09 +0000 (04:03 -0700)]
MLK-21889-5 imx8mn: Update get_boot_device
There is no ROM INFO structure on iMX8MN, we should Use new ROM API
to get boot device from ROM
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
d74caad677814a0366cb1220d1b998de3cb01588)
Ye Li [Mon, 26 Nov 2018 10:55:56 +0000 (02:55 -0800)]
MLK-21889-4 imx8mn: Add ROMAPI calls for SPL FIT loading
i.MX8MNano ROM exports APIs to load images from boot device. We use this way
for SPL loading FIT image. Users need enable CONFIG_SPL_IMX_ROMAPI_SUPPORT
and set a buffer address via CONFIG_SPL_IMX_ROMAPI_LOADADDR
Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Frank Li <Frank.Li@nxp.com>
(cherry picked from commit
4783e96fa88a7f279a3efee2cc7646bb53c7c1a7)
Ye Li [Wed, 21 Nov 2018 08:10:42 +0000 (00:10 -0800)]
MLK-21889-3 imx: Update SPL boot device for iMX8MN
We use same boot device logic with iMX8MM
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
9aa68144ab0e4e7330f6735bc5099e82da73260a)
Ye Li [Tue, 25 Dec 2018 06:53:40 +0000 (22:53 -0800)]
MLK-21889-2 imx8mn: Add runtime soc type check
Add is_imx8mn for runtime soc type checking, and update drivers to use it.
Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit
e8ec22ef74a9d98e621fe1ac6418b06d5586ab12)
Ye Li [Fri, 16 Nov 2018 03:07:46 +0000 (19:07 -0800)]
MLK-21889-1 imx8mn: Add new SoC iMX8M Nano
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>
(cherry picked from commit
3981af0da5ce4640fb1281526ae4b58108572e80)
faqiang.zhu [Mon, 8 Jul 2019 12:30:04 +0000 (20:30 +0800)]
MA-14916-9 fix build warnings with BSP defconfig
the warning info is as below:
drivers/fastboot/fb_fsl/fb_fsl_command.c:66:13: warning: 'process_erase_mmc' defined but not used [-Wunused-function]
static void process_erase_mmc(const char *cmdbuf, char *response)
^
move this process_erase_mmc function to fb_fsl_dev.c and make remove the
static attribute.
Change-Id: Ifc30348e53693e26119c760406b4c650e591aef4
Signed-off-by: faqiang.zhu <faqiang.zhu@nxp.com>
faqiang.zhu [Thu, 13 Jun 2019 02:27:11 +0000 (10:27 +0800)]
MA-14916-2 fix fastboot getvar issue in 32bit device
in imx_v2018.03, fastboot response buffer is an array defined in the
handle function for "fastboot getvar", sizeof(response) will get the
length of this array, which is FASTBOOT_RESPONSE_LEN.
but in imx_v2019.04, "response" in "fastboot getvar" function is a
pointer parameter transmitted to it, so sizeof(response) will only get
the length of the pointer, not the buffer length. in 32bit device, the
pointer length is 4, so the header info of fastboot can't be fully
stored in the buffer in this case, cause the response info can't be
parsed by host fastboot.
this commit replace "sizeof(response)" to be FASTBOOT_RESPONSE_LEN
directly.
Change-Id: I9d3893406c0361b7aba9cba74b2d751bc311d142
Signed-off-by: faqiang.zhu <faqiang.zhu@nxp.com>
Fabio Estevam [Thu, 4 Jul 2019 17:12:24 +0000 (14:12 -0300)]
MLK-22219 mx6: Place pre_misc_setting() into a common location
Currently the NoC settings are only done if the splash screen
support is enabled.
However, this can cause IPU issues on i.MX6QP in the kernel, when
splash screen is not enabled in U-Boot.
To avoid such problems, place the pre_misc_setting() function
into a common location that will always run on i.MX6QP/DP.
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Ye Li [Wed, 3 Jul 2019 10:05:29 +0000 (03:05 -0700)]
MLK-22180 clk-imx8: Fix wrong name for iMX8QM ENET clock
Fix the issue that using imx8qxp ENET clock name in iMX8QM table.
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Luo Ji [Thu, 21 Jun 2018 01:34:41 +0000 (09:34 +0800)]
MA-14916-4 [iot] Update size format for write_counter
This commit is cherry-picked from community:
commit
343749c42554b058e53086aefe21d47b383326d5
author Kever Yang <kever.yang@rock-chips.com>
date Wed, 19 Jul 2017 18:13:59 +0800 (19:13 +0900)
mmc: rpmb: update size format for write_counter
According to MMC spec, the write_counter is 4-byte length,
use 'int' instead of 'long' type for the 'long' is not 4-byte
in 64 bit CPU.
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Test: Access RPMB successfully on imx8m.
Change-Id: I402b53c990856c2cdf7c3686eabf259f5581464d
Signed-off-by: Luo Ji <ji.luo@nxp.com>
faqiang.zhu [Wed, 5 Jun 2019 11:52:48 +0000 (19:52 +0800)]
MA-14916 fix build and function issues of fastboot for Android
to fix build issues, add two header files, "fastboot_lock_unlock.h" is
copied from imx_v2018.03 branch, "fb_fsl_common.h" contains some
varialbes and a function used in more than one files.
the places where "fastboot_lock_unlock.h" is included is modified to
adapt to this change.
"fsl_fastboot.h" is renamed to "fb_fsl.h", the places where
"fsl_fastboot.h" is included is modified to adapt to this change.
to fix function issues, command handle function in "fb_fsl_command.c" is
modified.
build based on imx8mm_ddr4_evk, the board can boot and basic fastboot
function can work.
Change-Id: I34961ef70351a1ee4c84b6721dba5ac7b261a0d3
Signed-off-by: faqiang.zhu <faqiang.zhu@nxp.com>
Sherry Sun [Wed, 19 Jun 2019 19:47:04 +0000 (15:47 -0400)]
MLK-22045-7 defconfig: Add CONFIG_DM_USB_GADGET and CONFIG_SPL_DM_USB_GADGET flag
Add CONFIG_DM_USB_GADGET and CONFIG_SPL_DM_USB_GADGET flag on i.MX8QM
and QXP to support DM USB gadget driver.
Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
Sherry Sun [Wed, 19 Jun 2019 20:11:08 +0000 (16:11 -0400)]
MLK-22045-6 imx8qm/qxp: Delete the Non-DM USB board level codes
Since now we use DM USB gadget driver, Some parts of the Non-DM USB
gadget driver codes are not needed, so delete the Non-DM USB board
level codes on imx8 platform.
Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
Sherry Sun [Thu, 27 Jun 2019 18:33:36 +0000 (14:33 -0400)]
MLK-22045-5 cdns3: Change the usb3 host driver to match the new usb3 node
In order to enable both DM usb3 gadget driver and host driver, a new usb3
host node was added. The DM usb3 host driver should also be changed to
match the new usb3 node in dts on imx8qm/qxp.
Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
Sherry Sun [Thu, 27 Jun 2019 18:10:31 +0000 (14:10 -0400)]
MLK-22045-4 dts: Add a new usb3 host node on imx8qm/qxp
Since one node in dts only can bind with one driver in u-boot,
now both DM usb gadget and host drivers are enabled in imx8qm/qxp,
but there only one usb3 node in dts, so the DM usb gadget driver
and host driver can not both work.
So add a new usb3 host node on imx8qm/qxp to fix this issue, and add
a new alias for the usb3 host node which is used as seq number in DM
USB host driver.
Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
Sherry Sun [Wed, 19 Jun 2019 20:44:15 +0000 (16:44 -0400)]
MLK-22045-3 cdns3: Add cdns3_generic_peripheral DM gadget driver
Add cdns3_generic_peripheral DM gadget driver for i.MX8QM and QXP.
The driver flag is set to CONFIG_DM_USB_GADGET and
CONFIG_SPL_DM_USB_GADGET while using SPL, and the driver is belong to
UCLASS_USB_GADGET_GENERIC uclass.
For the DM gadget driver, it will parse the reg, clocks and usbphy
properties from node in DTS. So the power and clks of cdns3 controller
and cdns3 phy will be both enabled in DM gadget driver.
Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
Sherry Sun [Wed, 19 Jun 2019 20:30:26 +0000 (16:30 -0400)]
MLK-22045-2 sdp: Add DM gadget support for sdp
When enable CONFG_SPL_DM_USB_GADGET, sdp should use
usb_gadget_initialize() and usb_gadget_release() to
support DM gadget driver.
Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
Sherry Sun [Wed, 19 Jun 2019 19:59:03 +0000 (15:59 -0400)]
MLK-22045-1 dts: Add "u-boot,dm-spl" property to the usbotg3 node
To support run DM gadget usb3 driver at early stage, add
"u-boot,dm-spl" property to the usbotg3 node and the related nodes.
Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
Ye Li [Tue, 25 Jun 2019 09:51:42 +0000 (02:51 -0700)]
MLK-22105-3 imx8/imx8m: spl: Move bss clean up before arch_cpu_init
Since rng_init is used arch_cpu_init, we have to clean up BSS section
before it.
Also remove the unnecessary memset to global data, because
board_init_f_init_reserve already memset it. If we memset it in board_init_f,
the gd->malloc_base is reset to 0 and will cause early malloc problem
when CONFIG_MALLOC_F_ADDR is not set.
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit
c36ae6a623b075192b20d93f9e3fe966961d86f4)
Ye Li [Tue, 25 Jun 2019 09:21:36 +0000 (02:21 -0700)]
MLK-22105-2 caam: Move g_jrdata to bss section for SPL
We set SPL bss section on OCRAM. So move the g_jrdata to bss section
only on SPL. In normal u-boot, it is still in data section to avoid
overlay with relocation entries and DTB.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
53cc1a63d672882cb8c71af61321051f4dcbe091)
Ye Li [Tue, 25 Jun 2019 09:14:00 +0000 (02:14 -0700)]
MLK-22105-1 Revert "MLK-20026 caam: Fix CAAM RNG init hang on imx8mq RevA"
This reverts commit
b12e170792c918efc7c371f86989d34fc397fe06.
The original patch has issue due to the early malloc pool is not ready
at this phase. So malloc always return NULL.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
35a24430c2da7c687bc729fa7f0b4b45749aba34)
Frank Li [Fri, 21 Jun 2019 15:09:26 +0000 (10:09 -0500)]
MLK-22092 Enable GPT command
Enable GPT command to allow create gpt partitoin in uboot
Signed-off-by: Frank Li <Frank.Li@nxp.com>
Ye Li [Tue, 25 Jun 2019 02:11:57 +0000 (19:11 -0700)]
MLK-22103 doc: ahab: Update imx-mkimage SPL build target
Since we have changed imx-mkimage flash_spl_container target
to flash_spl, also update it in u-boot ahab document.
Signed-off-by: Ye Li <ye.li@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit
f850d467db9cf3b9b58688b96f1b4d9d8632b07d)
Breno Lima [Mon, 24 Jun 2019 13:39:04 +0000 (10:39 -0300)]
MLK-22100 doc: Remove duplicated documentation directory
Commit
ad7061ed742e ("doc: Move device tree bindings documentation to
doc/device-tree-bindings") moved all device tree binding documentation
to doc/device-tree-bindings directory.
The current U-Boot project still have two documentation directories:
- doc/
- Documentation/
Move all documentation and sphinx files to doc directory so all content
can be in a common place.
Adapted to U-Boot v2019.04
Signed-off-by: Breno Lima <breno.lima@nxp.com>
Acked-by: Ye Li <ye.li@nxp.com>
Ye Li [Wed, 19 Jun 2019 03:09:27 +0000 (20:09 -0700)]
MLK-22036 DTS: imx7ulp-evk: Enable QSPI in eMMC dedicated DTS
The imx7ulp-evk-emmc.dts is used by imx7ulp_evk_emmc_defconfig, but
this dts does not enable QSPI. Since the 2019.04 u-boot has removed
non-DM driver for QSPI, so we have to enable the QSPI in DTS,
otherwise QSPI can't work on this build
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Tue, 18 Jun 2019 08:31:02 +0000 (01:31 -0700)]
MLK-22035-2 imx8qm/qxp: Change some firmware and image loading addresses
To avoid the conflict with FDT reserved-memory, adjust the loading addresses
for hdmitxfw, hdmirxfw and xenlinux_addr
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Tue, 18 Jun 2019 08:24:10 +0000 (01:24 -0700)]
MLK-22035-1 lmb: Add lmb_reserve_overlap for fdt reserved memory
Previous patch "MLK-21885 lmb: Handle the overlap case for lmb reserve" adds
the overlap support to lmb reserve. However, u-boot has some places to use the
lmb_reserve when allocating memory in loading images. If we allowed overlap
in this function, it means images loading address can overlap each other and
cause the address check mechanism not work.
So add another function to allow overlap and only use it for fdt reserved-memory
nodes. The FDT reserved-memory is ok to merge with other reserved memory, since
this won't break image loading address check.
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Wed, 12 Jun 2019 06:30:04 +0000 (23:30 -0700)]
MLK-22003 fec_mxc: Fix fec_get_clk_rate failure issue
If only FEC2 is enabled, fec_get_clk_rate will fail due to uclass_get_device
fails to get the device by using idx 1. Should use uclass_get_device_by_seq
instead, because the idx is from the udev seq which is specified by alias.
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Han Xu [Wed, 12 Jun 2019 18:51:02 +0000 (13:51 -0500)]
MLK-21970: mtd: nand: mxs_nand: add i.MX6QP compatible string
add the dedicate compatible string for i.MX6QP
Signed-off-by: Han Xu <han.xu@nxp.com>
Ye Li [Tue, 11 Jun 2019 07:21:42 +0000 (00:21 -0700)]
MLK-21994 imx8qm/qxp: Enlarge SPL MAX size to 192KB
2019 uboot has enabled DM in SPL on imx8qm/qxp builds. The DM needs
larger size than non-DM version. When enable both SPL DM USB host
and gadget drivers, we meets problem that SPL size exceeds the max.
This patch moves SPL runtime malloc to DDR memory. So we can have more
64KB OCRAM for SPL and its max size reaches to 192KB.
Signed-off-by: Ye Li <ye.li@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
Ye Li [Sat, 8 Jun 2019 06:09:55 +0000 (23:09 -0700)]
MLK-21904 epdc: Fix EPDC waveform and logo file loading failure
Since new u-boot will prohibit loading image into memory which is used
by u-boot, like (SP, malloc, relocate). When we allocate waveform buffer
and logo buffer from malloc, loading to them will fail.
Fix the issue by using system load address as a trampoline. Load the image
to system load address first, then copy the data to buffers
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Ye Li [Wed, 5 Jun 2019 10:10:36 +0000 (03:10 -0700)]
MLK-21942 DTS: imx8mq: Fix USB alias issue
Since we set the driver's compatible string to dwc3 nodes, should
use the dwc3 nodes as the USB alias, otherwise the alias won't work.
If first usb controller is probed failed, the second controller still
use 0 as seq and cause issue to the driver.
Because alias requires different names on the nodes, in the patch we have
to change the nodes name to dwc3_0 and dwc3_1
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Ye Li [Thu, 6 Jun 2019 08:44:42 +0000 (01:44 -0700)]
MLK-21956-3 mx6qdlsabreauto: Enable i2c gpio mux to fix io expander issue
The i2c gpio mux is not enabled, this causes i2c3 not work and all
io expander devices on i2c3 not work. So we will meet such as
"usb start" fail due to the VBUS is not power up.
The patch add the i2c mux and i2c gpio mux configs. And remove codes of
controlling i2c steering from board, since i2c gpio mux does same thing.
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Ye Li [Thu, 6 Jun 2019 08:29:03 +0000 (01:29 -0700)]
MLK-21956-2 mxc_i2c: Remove i2c_idle_bus from probe
i2c_idle_bus is already used in i2c_init_transfer. So before each tranfer
if the bus is not ready, the i2c_idle_bus will be used to force idle.
It is unnecessary to call it again in probe.
We found a issue when enabling i2c mux with the mxc_i2c. The mxc_i2c is probed
after mux probing. However, at this moment the mux is still in idle state,
won't select port. So if we call i2c_idle_bus in probe, it will fail and cause
mxc_i2c probe failed.
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Thu, 6 Jun 2019 08:25:54 +0000 (01:25 -0700)]
MLK-21956-1 i2c-mux-gpio: Fix GPIO request flag issue
When requesting GPIO, the GPIOD_IS_OUT is missed in flag, so the GPIO
is set the input mode not output and cause mux not work.
Signed-off-by: Ye Li <ye.li@nxp.com>
Peng Fan [Thu, 6 Jun 2019 03:10:43 +0000 (11:10 +0800)]
MLK-21961 imx: fix tee_addr for nand boot
teeaddr is not set. Align with sd/emmc, use tee_addr and set tee_addr.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reported-by: Jessie Lee <jessie.lee@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
Ye Li [Wed, 5 Jun 2019 06:33:38 +0000 (23:33 -0700)]
MLK-21885 lmb: Handle the overlap case for lmb reserve
lmb reserve is used to reserve some memory so that when loading images
(like kernel, dtb, initrd), images won't be loaded into the reserved memory.
The problem in current lmb is it does not handle the overlap case. When adding
a new reserved memory, if the memory region is overlap with regions already been
added in lmb, it will fail. One example is reserved memory in DTB may overlap with
u-boot relocate address. lmb reserves the u-boot relocate address firstly, so when
adding reserved memory from DTB, we will meet failure.
Actually if we handle the overlap case, we can resolve the overlap by using a max
common region for the overlap regions. So that this case won't fail.
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Ye Li [Wed, 5 Jun 2019 02:14:42 +0000 (19:14 -0700)]
MLK-21905 mx7ulp_evk: Change kernel DTB to EVKB board
The latest mx7ulp evk board is renamed to EVKB board and has dedicated
DTB files. Modify the kernel DTB names in u-boot to use the new DTB.
Signed-off-by: Ye Li <ye.li@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
Ye Li [Fri, 31 May 2019 03:49:44 +0000 (20:49 -0700)]
MLK-21899 imx8: sci: Add SCFW API sc_seco_gen_key_blob
Porting the sc_seco_gen_key_blob to sci_api.c which is used to
generate key blob
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Ye Li [Mon, 3 Jun 2019 09:05:04 +0000 (02:05 -0700)]
MLK-21898 fastboot: Enable fastboot on mx6qpsabresd
Missed fastboot and uuu relevant configurations in mx6qpsabresd_defconfig.
This patch adds them.
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Ye Li [Wed, 29 May 2019 08:43:44 +0000 (01:43 -0700)]
MLK-21891-2 fastboot: fix issue in enabling FAT_WRITE
Wrong config name is used in kconfig for selecting FAT_WRITE,
introduced by patch
(MLK-20594-2 enable fat write for all configuration with uuu)
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Wed, 29 May 2019 08:40:26 +0000 (01:40 -0700)]
MLK-21891-1 FAT: fix build error caused by cherry-pick
Fix issue introduced by cherry-pick patch below, the conflict
is not resolved correctly
(MLK-20668-2 fat: Fix issue in rootdir table flush for FAT16/12)
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Tue, 28 May 2019 13:41:51 +0000 (06:41 -0700)]
MLK-21879-3 fsl_qspi: Fix flash write issue on mx7ulp
The page write sequence in spi-mem is changed with orignal spi-flash. When
the max_write_size is set by driver, the orignal sequence is
1. WREN
2. write max_write_size data to flash
3. wait for WIP clean
4. back to #1 if having data remained in a page.
The new sequence is:
1. WREN
2. write (max_write_size - command length) data to flash
3. back to #2 if having data remained in a page
4. wait for WIP clean
Since mx7ulp has 64 bytes TX buffer (max_write_size), while other iMX chips
have 512 bytes (page size is 256). So when adapt qspi with the new sequence,
we have to check the WIP before each write on mx7ulp. Otherwise the WIP may set
due to previous write is not completed by flash device, then cause current
write failed.
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Tue, 28 May 2019 07:47:17 +0000 (00:47 -0700)]
MLK-21879-2 spi-mem: Fix read data size issue
When slave drivers not set the max_read_size, the spi-mem should directly
use data.nbytes and not limit to any size. But current logic will limit to
the max_write_size.
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Tue, 28 May 2019 07:42:25 +0000 (00:42 -0700)]
MLK-21879-1 fsl_qspi: increase timeout of is_controller_busy
The original codes uses 100ms timeout, but the new is_controller_busy only
try 5 times with each only 1us delay.
When the qspi clock is slower, the controller may need longer time in busy.
On mx7ulp, we meet problem that timeout always happen. So change the codes
to 100ms timeout
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Mon, 27 May 2019 11:29:22 +0000 (04:29 -0700)]
MLK-21877 imx_lpi2c: Fix IPG clock issue
There are two clocks for lpi2c, PER and IPG. But the clk driver
only enables PER clock without IPG, this will cause problem if IPG clock
is disabled during partition reboot.
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Sun, 26 May 2019 01:44:28 +0000 (18:44 -0700)]
MLK-21864 mx7ulp_evk: Fix build break in eMMC defconfig
Since the non-DM QSPI support is removed in 2019.04 u-boot, we have
to enable DM QSPI driver, otherwise will get build fail.
Also add missed CONFIG_CMD_BOOTZ to plugin defconfig.
Signed-off-by: Ye Li <ye.li@nxp.com>
Peng Fan [Thu, 17 May 2018 07:15:59 +0000 (15:15 +0800)]
MLK-18333-2 imx8m: add QSPI boot dev
When boot type could not be detected from rom sw info,
read sbmr1 to detect, here we only use it to detect FLEXSPI
boot, because ROM not update it in rom sw info.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit
3735aedbf6dbebfac830089618ca334c419f43bd)
(cherry picked from commit
8324d0f37a3dc8c2516dad439aa6b91d77eebcbc)
Ye Li [Sat, 25 May 2019 15:41:41 +0000 (08:41 -0700)]
MLK-21863 mx6sabreauto: Fix SD index issue
The imx6qdl-sabreauto-u-boot.dtsi re-alias the usdhc3 to mmc0, and
cause boot issue on mx6sabreauto boards. Remove the re-alias, so
usdhc3 will map to mmc2.
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Sat, 25 May 2019 09:36:39 +0000 (02:36 -0700)]
MLK-21862 mx7: Enable CONFIG_CMD_BOOTD for all iMX7 boards
When CONFIG_CMD_BOOTD is disabled, we can't use "boot" or "bootd"
command. It causes problem for users to boot kernel.
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Sat, 25 May 2019 09:11:17 +0000 (02:11 -0700)]
MLK-21861 mx7dsabresd: Fix wrong gpio name for io expander
Since the io expander node in DTS is using name gpio-expander not gpio_spi,
must update the codes for the name, otherwise fec initialization will hang.
Signed-off-by: Ye Li <ye.li@nxp.com>