u-boot.git
4 years agoMLK-23574-34 imx8mn_evk: Update board codes for iMX8MN DDR4 EVK
Ye Li [Fri, 9 Apr 2021 10:39:35 +0000 (03:39 -0700)]
MLK-23574-34 imx8mn_evk: Update board codes for iMX8MN DDR4 EVK

Update below codes for DDR4 EVK:
1. Add PMIC BD71837 support
2. Add DM FEC ENET support
3. Enable Flexspi NOR support
4. Add USB typec host and device mode support
5. SPL stack top moves to 0x960000 to avoid conflict with ATF address

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 35dd5274f7940a200924838cdcd7ab2e9beeef01)

4 years agoMLK-22047 imx8mn: pins: add SION for I2C
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)
(cherry picked from commit 192016dc33d2ab3a8e1e7c8348ce02d69416e290)
(cherry picked from commit 09232bc102fe55abab5a0ffd1395c31ef4bb723b)

4 years agoMLK-23574-32 DTS: imx8mn: Update DDR4 EVK DTS and binding files
Ye Li [Sat, 18 Apr 2020 14:13:41 +0000 (07:13 -0700)]
MLK-23574-32 DTS: imx8mn: Update DDR4 EVK DTS and binding files

Sync the DTS and binding files with v5.10.y kernel.
Some updates in u-boot:
1. Add alias for flexspi, usbotg1 and usbotg2.
2. Add usbotg2 nodes
3. Add i2c force idle pins
4. Update usbotg nodes to use excon
5. Add pmic and i2c to -u-boot.dtsi for SPL DM

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 32cdd89a0e06bf40f8240cb7063c142321a16200)

4 years agoMLK-22092 Enable GPT command
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>
(cherry picked from commit 85a14ccf76ace1ada4732b9d225af8313031f5e0)
(cherry picked from commit a1998761639d74576274b6ed5a02eeab7feaad90)

4 years agoMLK-22103 doc: ahab: Update imx-mkimage SPL build target
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)
(cherry picked from commit 6b86e3f2f9dd7a29ee817119340ef61efb010cf6)
(cherry picked from commit 48cbb77f540b49ec89256f49c9c68657af036b60)

4 years agoMLK-21956-3 mx6qdlsabreauto: Enable i2c gpio mux to fix io expander issue
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>
(cherry picked from commit 39183dc231e12c3072ffd9a37ac6a6616178e263)
(cherry picked from commit 2ffef32eb15ec17294d885550837f565146b9fca)

4 years agoMLK-22035-1 lmb: Add lmb_reserve_overlap for fdt reserved memory
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>
(cherry picked from commit 2109dc2a4da592003ec62820f5bdfb6bd0899805)
(cherry picked from commit 40173acfb0f3d1b4630059e16c5c7364c2815886)

4 years agoMLK-21885 lmb: Handle the overlap case for lmb reserve
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>
(cherry picked from commit 37d86c68816dffde3dc8dcda5b9d67a195b2f9c2)
(cherry picked from commit e82c6616d5bf03c16195333fa1e93bd713e68ed9)

4 years agoMLK-21905 mx7ulp_evk: Change kernel DTB to EVKB board
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>
(cherry picked from commit 297a924ddaf456a5a175d9056c0bc45116cc49ce)
(cherry picked from commit 648c269cfb325f578d5e3b6c106ad4530637795b)

4 years agoMLK-20935-4 doc: imx: ahab: Fix typo in mx8_mx8x_secure_boot.txt guide
Breno Lima [Fri, 15 Feb 2019 18:51:36 +0000 (16:51 -0200)]
MLK-20935-4 doc: imx: ahab: Fix typo in mx8_mx8x_secure_boot.txt guide

Fix a typo in path provided for imx-mkimage iMX8QM and iMX8QXP directories.

Reported-by: Marius Grigoras <marius.grigoras@nxp.com>
Signed-off-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit c75243c1a87a10f003377d9c144bcf412ba80440)
(cherry picked from commit ee024325a0a32b248c4ddb4bb04768bcfb933694)
(cherry picked from commit 8a0fb27ed289639384d365726e7c6f1f90e45951)

4 years agoMLK-20935-3 doc: imx: ahab: Add a note in SRK Hash fuses sanity check
Breno Lima [Fri, 15 Feb 2019 18:43:54 +0000 (16:43 -0200)]
MLK-20935-3 doc: imx: ahab: Add a note in SRK Hash fuses sanity check

The commands included in introduction guide should not be used as
reference for programming the SRK Hash fuses as they are in big
endian.

Add a note to avoid a possible mistake.

Reported-by: Clement Le Marquis <clement.lemarquis@nxp.com>
Signed-off-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 137319826cc32d98a9b6890f35dd6670e104c2a5)
(cherry picked from commit 03d49480f73ce62de4f759fe02dfcf82726b8b79)
(cherry picked from commit 892bafd2a9cd843662c194e7c44a06c44df9fb38)

4 years agoMLK-20935-2 doc: imx: ahab: Include ahab_close command
Breno Lima [Fri, 15 Feb 2019 18:37:56 +0000 (16:37 -0200)]
MLK-20935-2 doc: imx: ahab: Include ahab_close command

Since commit 771b824728ca ("MLK-20919 imx8: ahab: Add command to
close the chip") the U-Boot is able to move the lifecycle from
NXP closed to OEM closed.

Update AHAB guides to use U-Boot ahab_close command instead of SCFW CLI.

As the procedure is now independent of SCFW terminal we can remove
this condition from documentation.

Signed-off-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 6f93d877e1454024f666a4810d24148cf595429e)
(cherry picked from commit 4f6bc59ff94de150611d82b45365d24d356f30ef)
(cherry picked from commit c03b9b2f33b19fe5f47673592a362a4ff78cebba)

4 years agoMLK-20935-1 doc: imx: habv4: Add section to avoid crash when OP-TEE is enabled
Breno Lima [Fri, 15 Feb 2019 18:09:08 +0000 (16:09 -0200)]
MLK-20935-1 doc: imx: habv4: Add section to avoid crash when OP-TEE is enabled

Starting in L4.14.78 release, the OP-TEE CAAM driver does not set the
JROWN_NS field in case LMID is locked.

We need to include the Unlock MID command in CSF file otherwise device
will fail to boot in HAB closed mode.

Add section to avoid crash when OP-TEE is enabled.

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>
(cherry picked from commit af03284ad38bd03ef1f0d4942842629db93d2c11)
(cherry picked from commit 66f05532d587e50631eef066c4190936e0d33583)
(cherry picked from commit c2ffee032e21bbd9fa9e43cc60b60dd039a61133)

4 years agoMLK-20916-2: doc: imx: ahab: Update AHAB document to include ahab_status command
Breno Lima [Tue, 12 Feb 2019 16:51:12 +0000 (14:51 -0200)]
MLK-20916-2: doc: imx: ahab: Update AHAB document to include ahab_status command

Since commit cf2acc5b7cde ("MLK-18942-2 imx8: ahab: Add ahab_status
 command") the U-Boot is able to display and parse the SECO events.

Update AHAB guides to use U-Boot ahab_status command instead of
SCFW CLI.

Starting in SECO FW v0.2.0 engineering release an invalid image
integrity is logged as an event in open mode. As ahab_status
is able to return this event the note can be removed.

Signed-off-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 385ed19051a47f5858e8d326e5ee97f8a08a679d)
(cherry picked from commit 4a88ca0aecec31d0877d7a620fa796a83387a195)
(cherry picked from commit d28e60d27186fef3dd9da2de7780e3ac62855ee1)

4 years agoMLK-20916-1: doc: imx: habv4: Fix typo in iMX6 and iMX7 encrypted boot guide
Breno Lima [Tue, 12 Feb 2019 16:30:17 +0000 (14:30 -0200)]
MLK-20916-1: doc: imx: habv4: Fix typo in iMX6 and iMX7 encrypted boot guide

The set_priblob_bitfield command is enabled by selecting
CONFIG_CMD_PRIBLOB.

Fix typo in mx6_mx7_encrypted_boot.txt guide.

Signed-off-by: Breno Lima <breno.lima@nxp.com>
(cherry picked from commit 99f9696ef5f7d1c0f93b7d910e884890fca6c973)
(cherry picked from commit e3fbcaa744db8d4f0556c67c788ada939404a892)
(cherry picked from commit 636e69cbd2694c3c26f866799c60c0908a50069b)

4 years agoMLK-20758 mx7: Add new command for tamper pin
Ye Li [Mon, 14 Jan 2019 06:05:22 +0000 (22:05 -0800)]
MLK-20758 mx7: Add new command for tamper pin

Add new u-boot command "imx_tamper" to configure and check the tamper pins.
The codes are used for reference and test. So command is disabled at default,
user can enable it by adding CONFIG_IMX_TAMPER=y to defconfig

The iMX7D has 10 tamper pins those can be used for SNVS tamper detection.

Tamper 9 pin is NVCC_DRAM power switch for LPSR by default.
It must be fused to tamper function by command
=> fuse prog -y 1 3 0x80000000
Otherwise, SNVS power consumption would be high

When tamper is detected, CPU can't enter/stay in SNVS mode,
the tamper must be cleared and disabled before enter SNVS.

Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Shaojun Wang <shaojun.wang@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit d520e1c6067c08103a020b0bc19feb620473e543)
(cherry picked from commit 4333529337a554352e1f9fb7486287dea31aeb79)
(cherry picked from commit c8ca53e9891371c292d4e88a92dd52498ba1c1a2)

4 years agoMLK-20668-2 fat: Fix issue in rootdir table flush for FAT16/12
Ye Li [Wed, 2 Jan 2019 09:41:23 +0000 (01:41 -0800)]
MLK-20668-2 fat: Fix issue in rootdir table flush for FAT16/12

The FAT16/12 has rootdir area before data area, and the clusters for
rootdir are not mantained by FAT table. So we don't need to find empty
cluster for next rootdir space, just use next dir cluster. And the FAT
table don't need to update for this new dir cluster.

Signed-off-by: Ye Li <ye.li@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 9e0a33cacc0a7926d46c0ca184498ae88278816e)
(cherry picked from commit da50714d2f758bea31f223e7ccec56be54c00f18)
(cherry picked from commit 9ea40537b52ce9022eb5f8e4295114f6a139b4a0)

4 years agoMLK-20594-2 enable fat write for all configuration with uuu
Ye Li [Fri, 24 May 2019 04:48:36 +0000 (21:48 -0700)]
MLK-20594-2 enable fat write for all configuration with uuu

Enable the FAT write when UUU support is enabled

Signed-off-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 3d8b43c897cdb686322eeeb875494ed561bbbbed)
(cherry picked from commit bf42b93f3f163655674864ab86f6a0d088f468b1)

4 years agoMLK-20553-3 doc: imx: ahab: Add Secure Boot documentation for i.MX8 and i.MX8x SPL...
Breno Lima [Fri, 30 Nov 2018 20:48:06 +0000 (18:48 -0200)]
MLK-20553-3 doc: imx: ahab: Add Secure Boot documentation for i.MX8 and i.MX8x SPL targets

The current U-Boot implementation includes SPL targets for i.MX8QM and
i.MXQXP MEK boards:

- imx8qxp_mek_spl_defconfig
- imx8qxp_mek_spl_fspi_defconfig
- imx8qm_mek_spl_defconfig
- imx8qm_mek_spl_fspi_defconfig

The U-Boot proper and ATF are included in an additional container being
necessary a different procedure for signing the flash.bin image.

Add a step-by-step guide covering the signing procedure.
Add a CSF example for the 3rd container.

Signed-off-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Frank Zhang <frank.zhang@nxp.com>
Reviewed-by: Marius Grigoras <marius.grigoras@nxp.com>
Reviewed-by: Utkarsh Gupta <utkarsh.gupta@nxp.com>
(cherry picked from commit 04505024d38eebbb5f39133b502c8e450ca40215)
(cherry picked from commit b139f10ccec5c57164f7e07e33984c845ce58b60)
(cherry picked from commit 82c70d0fc7cf8dcd0eafb48722ea978fffb414d8)

4 years agoMLK-20553-2 doc: imx: ahab: Add AHAB secure boot documentation for i.MX 8 and 8X...
Clement Le Marquis [Wed, 28 Nov 2018 12:10:22 +0000 (13:10 +0100)]
MLK-20553-2 doc: imx: ahab: Add AHAB secure boot documentation for i.MX 8 and 8X families

Add AHAB secure boot step-by-step guide for i.MX8 and i.MX8x families
devices.

Add 3 CSF example files:
- Example to sign flash.bin only using SRK keys.
- Example to sign flash.bin using a subordinate SGK key.
- Example to sign Linux image only using SRK keys.

Signed-off-by: Clement Le Marquis <clement.lemarquis@nxp.com>
Reviewed-by: Frank Zhang <frank.zhang@nxp.com>
Reviewed-by: Marius Grigoras <marius.grigoras@nxp.com>
Reviewed-by: Utkarsh Gupta <utkarsh.gupta@nxp.com>
(cherry picked from commit 7c46caba3b528b0399242f99612e5b094b1a4703)
(cherry picked from commit 20016c156f4f4e618de9eff6f5b1fc6a1c871e2a)
(cherry picked from commit 3c0fc7380132900628fe975643e7106032c861a6)

4 years agoMLK-20553-1 doc: imx: ahab: Add AHAB introduction
Breno Lima [Mon, 26 Nov 2018 16:32:43 +0000 (14:32 -0200)]
MLK-20553-1 doc: imx: ahab: Add AHAB introduction

The AHAB is currently supported in i.MX8QXP and i.MX8QM devices.

Add an introductory document containing the following topics:

- AHAB Secure Boot Architecture
- System Control Unit (SCU) introduction
- Security Controller (SECO) introduction
- i.MX8/8x secure boot flow
- AHAB PKI tree generation
- SRK Table and SRK Hash generation

Signed-off-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Frank Zhang <frank.zhang@nxp.com>
Reviewed-by: Marius Grigoras <marius.grigoras@nxp.com>
Reviewed-by: Utkarsh Gupta <utkarsh.gupta@nxp.com>
(cherry picked from commit 6e9ceb2526bd4a45c6ff669afb086cc3a0627e6b)
(cherry picked from commit d3534f1d0e9a0f777160a4a6732a30a2bb545733)
(cherry picked from commit 3cf95909fec8e0f6a367633fc0d52223fd456eae)

4 years agoMLK-20270-1 doc: imx: habv4: Add Secure Boot documentation for i.MX8M and i.MX8MM...
Breno Lima [Wed, 17 Oct 2018 21:45:22 +0000 (18:45 -0300)]
MLK-20270-1 doc: imx: habv4: Add Secure Boot documentation for i.MX8M and i.MX8MM devices

Add HABv4 documentation for i.MX8M and i.MX8MM targets covering the
following topics:

- How to sign an securely boot an flash.bin image.
- How to extend the root of trust for additional boot images.
- Add 2 CSF examples.

Reviewed-by: Utkarsh Gupta <utkarsh.gupta@nxp.com>
Signed-off-by: Breno Lima <breno.lima@nxp.com>
(cherry picked from commit cc63be298a3e5f44e417f4098c124715917d09e1)
(cherry picked from commit ca9c6f091095d3bf09cac42c3eb4493490ac8912)
(cherry picked from commit 03865f7279b6f66625ecad83bf8364989e5da4c1)

4 years agoMLK-20061-1: doc: imx: habv4: Add Encrypted Boot documentation for i.MX 6 and i.MX...
Clement Le Marquis [Fri, 12 Oct 2018 16:44:45 +0000 (18:44 +0200)]
MLK-20061-1: doc: imx: habv4: Add Encrypted Boot documentation for i.MX 6 and i.MX 7 family devices

Add useful documentation for encrypted boot:
- Add 2 CSF examples for encrypt and sign
- How to encrypt and sign a U-Boot binary on closed device
- Why and how increase the PRIBLOB bitfield from CAAM SCFGR

Signed-off-by: Clement Le Marquis <clement.lemarquis@nxp.com>
(cherry picked from commit 3732dddfeddd989ca1fb930972f19303e3b67756)
(cherry picked from commit 9e7ccdd51a0754e728f2e27d282aaa3dbc8eec38)
(cherry picked from commit 570267bf173304655674bfa6f1640f310900f8f7)

4 years agoMLK-19194 PCI: imx: disable the ltssm when link is down in uboot
Richard Zhu [Fri, 10 Aug 2018 08:51:20 +0000 (16:51 +0800)]
MLK-19194 PCI: imx: disable the ltssm when link is down in uboot

Disable the LTSSM when link is down in uboot.
Otherwise, the pcie ep/rc validation system in kernel
would be impacted by the enabled ltssm stat in the uboot.

Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit cdedbb42e052d4bb3ff6b45044dd0d6023f3cb20)
(cherry picked from commit dcad2189b3d4f405a4675c1cc4f9ce38b524a947)
(cherry picked from commit 01007b8695df5c9f25d37a2f8d87037de5f14d3b)

4 years agoMLK-14831 mx6: Fix wrong bmode value used for usb boot
Ye Li [Mon, 8 May 2017 06:25:19 +0000 (01:25 -0500)]
MLK-14831 mx6: Fix wrong bmode value used for usb boot

Wrong bmode value is used in community u-boot for usb reboot. And cause
it failed. Fix this by using a reserved bootcfg value.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit eacd50f370203218a8e96c28c8a7adc0b638fc6d)
(cherry picked from commit aed4820fa81c1da9206f946a61ff851a255c9288)
(cherry picked from commit 1a944ae01addda559d1bf9869288424c00043406)
(cherry picked from commit 50b976a3b69f0de32e323ab95b28454c563916b9)

4 years agoMLK-19699: imx6ulz: configs: add fastboot to defconfigs
Ye Li [Thu, 23 May 2019 15:06:01 +0000 (08:06 -0700)]
MLK-19699: imx6ulz: configs: add fastboot to defconfigs

Add fastboot to iMX6ULZ EVK defconfig files to support UUU

Signed-off-by: Han Xu <han.xu@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 6a32a6bf6415633e1d22d8f0ddcc7e72d5742298)

4 years agoMLK-19150 fastboot: enable fastboot in mx7dsabresd
Ye Li [Thu, 23 May 2019 14:46:10 +0000 (07:46 -0700)]
MLK-19150 fastboot: enable fastboot in mx7dsabresd

Modify defconfig files to enable fastboot in mx7dsabresd board

Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit b7a2347cc382c8d0c80762c12664a7287a2f3d65)
(cherry picked from commit 614dc04b62283a90735f967b97eb46c92ac4f1f7)

4 years agoMLK-19062-1 fastboot: enable fastboot in mx6ul
Ye Li [Thu, 23 May 2019 14:39:49 +0000 (07:39 -0700)]
MLK-19062-1 fastboot: enable fastboot in mx6ul

Modify mx6ul defconfig files to enable fastboot in
mx6ul_14x14 and mx6ul_9x9 EVK boards

Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit a9a7715eb2471cdf01c160ac269f822abbd80cdc)
(cherry picked from commit 8192d0446e91933e30bbf87a7b7c9e4679e3450c)

4 years agoMLK-19062-2 fastboot: enable fastboot in mx6ull
Ye Li [Thu, 23 May 2019 14:33:02 +0000 (07:33 -0700)]
MLK-19062-2 fastboot: enable fastboot in mx6ull

Modify deconfig files to enable fastboot in
mx6ull_14x14 and mx6ull_9x9 EVK boards

Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 41d3fd64b8791847d58a89cbb05b7135c012f323)
(cherry picked from commit 8c55ae15006eebf48a50653cb63e6a8e9ed3d5a8)

4 years agoMLK-19104 imx7ulp: Enable uuu support for mx7ulp.
Shenwei Wang [Wed, 1 Aug 2018 14:13:12 +0000 (09:13 -0500)]
MLK-19104 imx7ulp: Enable uuu support for mx7ulp.

iMX7ULP EVK boards enable fastboot as default to support uuu.

Signed-off-by: Shenwei Wang <shenwei.wang@nxp.com>
Acked-by : Frank Li <frank.li@nxp.com>

(cherry picked from commit 035506e86e4f054ec6e75a52e5d7fdbb0f18f8cd)
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 610f6b43c47ac963744442ec9801abf3ec0af784)
(cherry picked from commit 1c02ef7ba55ec35cd18645595af322f67eaac793)

4 years agoMLK-19059-5 Enable uuu for i.MX6SL EVK board
Ye Li [Thu, 23 May 2019 14:51:06 +0000 (07:51 -0700)]
MLK-19059-5 Enable uuu for i.MX6SL EVK board

i.MX6SL boards enable fastboot as default.
uuu will use fastboot command to write eMMC/SD/SPINOR.

Signed-off-by: Xiaoning Wang <xiaoning.wang@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit d26e641870ff45c4cb48177603f46d566eb0cc4a)
(cherry picked from commit 488e399b3bdb4cc7e4361f629b3dadac858149f9)

4 years agoMLK-19059-4 Enable uuu for i.MX6SoloX SABRESD and SABREAUTO
Ye Li [Thu, 23 May 2019 14:13:56 +0000 (07:13 -0700)]
MLK-19059-4 Enable uuu for i.MX6SoloX SABRESD and SABREAUTO

i.MX6SoloX SABRE boards enable fastboot as default.
uuu will use fastboot command to write eMMC/SD/QSPI/NAND

Signed-off-by: Xiaoning Wang <xiaoning.wang@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 231ccd13a0c2f18b2fe7fec7d23fc22df06e0324)
(cherry picked from commit e099746b62bbdd22f1b9e59cb7791ed4e8111ee4)

4 years agoMLK-19059-3 Enable uuu for i.MX6SLL EVK
Ye Li [Thu, 23 May 2019 14:04:48 +0000 (07:04 -0700)]
MLK-19059-3 Enable uuu for i.MX6SLL EVK

i.MX6SLL boards enable fastboot as default.
Support: mx6sllevk_defconfig
         mx6sllevk_epdc_defconfig
         mx6sllevk_optee_defconfig
         mx6sllevk_plugin_defconfig
uuu will use fastboot command to write emmc.

Signed-off-by: Xiaoning Wang <xiaoning.wang@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit f3879673fa179a9c93a7f58de264b4ab463181db)
(cherry picked from commit 21b7edfd1c4ca0c1a2671d38fc10f079c0cb0d44)

4 years agoMLK-19483: i.MX6/7: pack qspi header with u-boot for i.MX6/7 qspi u-boot
Han Xu [Fri, 7 Sep 2018 03:42:15 +0000 (22:42 -0500)]
MLK-19483: i.MX6/7: pack qspi header with u-boot for i.MX6/7 qspi u-boot

To support the uuu, pack the common qspi header with u-boot binary for
i.MX6/7 qspi u-boot.

1. The qspi-header file need to be copied out of source tree.
2. In mkimage flags, we need to add $(QSPI-HEADER) and %$(PLUGIN).bin.
   Otherwise it will fails to filter out $(QSPI-HEADER) and $(PLUGIN).bin because the $(PLUGIN) is
   extend to full path.
3. u-boot-dtb.imx and u-boot.imx are updated to add qspi-header.

Signed-off-by: Han Xu <han.xu@nxp.com>
(cherry picked from commit 2804e4248bf638165c54c450528a14fe27cc58cd)
(cherry picked from commit 23b270202916fe32450590c4e9330916e97c18f6)
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 140a11362920a70e209b21894c6c48a0e989ac8d)

4 years agoMLK-19123-4 fastboot: Enable uuu for i.MX6DL sabre
Ye Li [Thu, 23 May 2019 13:32:50 +0000 (06:32 -0700)]
MLK-19123-4 fastboot: Enable uuu for i.MX6DL sabre

i.MX6DL boards enable fastboot as default, support both sabresd and
sabreauto.
uuu will use fastboot command to write emmc.

Signed-off-by: Xiaoning Wang <xiaoning.wang@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 248dfa629aaef0ed72b8d3a86f4df2fed737eeb9)
(cherry picked from commit 303808f75374c76cd8af18d150d5bfe3f7fedf13)

4 years agoMLK-19123-3 fastboot: enable fastboot in mx6qsabre
Ye Li [Thu, 23 May 2019 13:32:05 +0000 (06:32 -0700)]
MLK-19123-3 fastboot: enable fastboot in mx6qsabre

Modify defconfig files to enable fastboot in mx6qsabre SDB/ARD boards

Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit f4c7c993f6df4c8be69a0283c8b02c5df4aaf291)
(cherry picked from commit cca77ebe386aa7d76742fbea36341d099a408e76)

4 years agoMLK-19123-2 fastboot: enable fastboot in mx6qpsabre
Ye Li [Thu, 23 May 2019 13:31:10 +0000 (06:31 -0700)]
MLK-19123-2 fastboot: enable fastboot in mx6qpsabre

Modify defconfig files to enable fastboot in mx6qpsabre SDB/ARD boards

Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 2de4c0110145b07009bb19ca5dfd809bb554369b)
(cherry picked from commit e1cb6dc1cf2eef282fd5e1cda1b6ce6c40fc22ef)

4 years agoMLK-21400 mx6solosabre: Enable fastboot for UUU support
Ye Li [Thu, 23 May 2019 13:30:37 +0000 (06:30 -0700)]
MLK-21400 mx6solosabre: Enable fastboot for UUU support

Enable fastboot configurations in mx6solo sabresd and sabreauto
defconfigs to support UUU. Since the DDR size on mx6solo sabre
boards is smaller, also change the fastboot buffer to 256MB.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 8435fc2e868e7cdd82a36081a97ab73a894b4531)
(cherry picked from commit a992dcb1f907601f188103e68981cb4bfc2d945a)

4 years agoMLK-21055 usb: dwc3: gadget: disable U1 and U2
Li Jun [Wed, 6 Mar 2019 08:15:01 +0000 (16:15 +0800)]
MLK-21055 usb: dwc3: gadget: disable U1 and U2

Currenlty U1 and U2 low power modes are allowed in device mode.
Allowing U1 and U2 low power modes during data transfers in
device mode is causing U1 exit failure on some USB3 host: which
will transite to SS.inactive instead of U0, then host will send
warm reset and ultimately result in reenumeration. This is observed
on UUU tool with some PC host. Hence disable U1 and U2 low power
modes for now.

USB3 spec 7.5.10.4.2 Exit from Recovery.Configuration
The port shall transition to eSS.Inactive when the following
conditions are met:
1. Either the Ux_EXIT_TIMER or the 6-ms timer
   (tRecoveryConfigurationTimeout) times out.
2. For a downstream port, the transition to Recovery is not to
   attempt a Hot Reset.

Signed-off-by: Li Jun <jun.li@nxp.com>
(cherry picked from commit ae0cdc741f7313398539f7b576ced73871f6cd71)
(cherry picked from commit ac852ce99326e75806e007587fb695c48107d602)
(cherry picked from commit 0753f44c8168193c87000e1a72e517f88186d149)

4 years agoMLK-20909 usb: dwc3: gadget: use usb_endpoint_maxp for req length
Li Jun [Wed, 13 Feb 2019 06:26:13 +0000 (14:26 +0800)]
MLK-20909 usb: dwc3: gadget: use usb_endpoint_maxp for req length

As endpoint.maxpackt is set at init for super speed, we can't use it
for USB2 connection, we need use the right max packet length according
to connection speed.

Signed-off-by: Li Jun <jun.li@nxp.com>
(cherry picked from commit 9c6bb3684649b4ae6f0275b5ad3799ea5c8f32df)
(cherry picked from commit be0f3cddac9fc393c1868b9b28e9291cf4746638)
(cherry picked from commit ef3a09e036b19312f5206da7fecd799e246d822a)

4 years agoMLK-20493-5 usb: dwc3: change the dwc3 to be USB3 capable
Li Jun [Thu, 13 Dec 2018 02:56:29 +0000 (10:56 +0800)]
MLK-20493-5 usb: dwc3: change the dwc3 to be USB3 capable

Change the dwc3 device mode to be super speed capable.

Reviewed-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peter Chen <peter.chen@nxp.com>
Tested-by: faqiang.zhu <faqiang.zhu@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
(cherry picked from commit a9dac41fea56c0f41c5d15acd53a232bb1785841)
(cherry picked from commit 5b506ed4ca952429e819d2765ade20c0178e5a1b)
(cherry picked from commit 7801b72b7f4bb6b15409b36b1569adb88d1a2adf)

4 years agoMLK-20467 imx8m: Fix issue for booting signed image through uuu
Ye Li [Tue, 27 Nov 2018 02:21:15 +0000 (18:21 -0800)]
MLK-20467 imx8m: Fix issue for booting signed image through uuu

The SPL loads the FIT image FDT part to an address related with the device
block length. This length is 512 for SD/MMC and is 1 for other devices
like SDP, NOR, NAND, SPI, etc.
When signing FIT image, we use fixed address caculated by SD/MMC block length
to sign FDT part. Thus, when booting through uuu, this causes mismatch and
gets authentication failed.

Fix the issue by providing a override function for this FIT buffer address.
When secure boot is enabled, adjust the addresses of other devices to be same
with SD/MMC.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 710efd3ccb99e144bd30af8e1ee46459b4a54dd6)
(cherry picked from commit f48835f0b6b801cb267b4c27a50136c93dfd3bcf)
(cherry picked from commit 2c25ddb57a4f591f32e64d8d857bb7a67da8aa98)

4 years agoMLK-19995 imx8mq: disconnect usb from host for uuu
Li Jun [Tue, 23 Oct 2018 02:31:21 +0000 (10:31 +0800)]
MLK-19995 imx8mq: disconnect usb from host for uuu

Stop the usb device controller before enter kernel, this is required
to make kernel can properly init usb controller with it's in stopped
state.

Suggested-by: Ye.Li <ye.li@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
(cherry picked from commit 27d6b4cf3d8d6701aeb800b307ef52afd18540ba)
(cherry picked from commit dfcd809622bd994937724dc8c3252c16a2131056)
(cherry picked from commit c08b3c7621b63d023563d5d5bdb21813568e2c0b)

4 years agoMLK-18707-2 iMX8MM enable fastboot as default
Ye Li [Mon, 20 May 2019 06:03:37 +0000 (23:03 -0700)]
MLK-18707-2 iMX8MM enable fastboot as default

uuu will use fastboot command to write emmc, enable it as
default for iMX8MM EVK board

Signed-off-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit ed6898da1c1a78dbf59ac4d6d291bc25e14c636e)
(cherry picked from commit 45601e1200162576aee8d764d2ebdb7623b9bd6b)

4 years agoMLK-19181-5 imx8mq_evk: Force USB to be high speed for uuu
Li Jun [Fri, 10 Aug 2018 09:22:38 +0000 (17:22 +0800)]
MLK-19181-5 imx8mq_evk: Force USB to be high speed for uuu

As there is problem with super speed with SDP, we force the dwc3
usb speed to be high speed.

Signed-off-by: Li Jun <jun.li@nxp.com>
(cherry picked from commit eeb6a8d545e4810df6e3ce2125fa69a1781ea605)
(cherry picked from commit 6f2cb1d190acebd5e55260c1eaeb3b7666c1f70c)
(cherry picked from commit eca93dd1c6070e809d24aa40d7d719ad2aa2d880)

4 years agoMLK-19181-3: defconfig: iMX850D enable USB SDP
Frank Li [Thu, 9 Aug 2018 15:32:38 +0000 (10:32 -0500)]
MLK-19181-3: defconfig: iMX850D enable USB SDP

uuu can download whole uboot and run it
fastboot also enabled.

Signed-off-by: Frank Li <Frank.Li@nxp.com>
(cherry picked from commit 21ce8ab67d0a8eae3df91b074ffad9fb4b987961)
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 95a805fe1fb46b0a49e89bfb99ebe0dd70705927)
(cherry picked from commit d97932a567f7333d00a9d70fdaabeb3175e54fcf)

4 years agoMLK-19181-2: i.MX850: SPL enable usb support
Frank Li [Thu, 9 Aug 2018 15:30:02 +0000 (10:30 -0500)]
MLK-19181-2: i.MX850: SPL enable usb support

Enable DWC3 USB support at i.MX850D platform

Signed-off-by: Li Jun <jun.li@nxp.com>
Signed-off-by: Frank Li <Frank.Li@nxp.com>
(cherry picked from commit 7c3d2a17bf85e97a486d01e231480baaa7e7a167)
(cherry picked from commit 1dd830df85ef684d8b6acd4655204ce7bd6be997)
(cherry picked from commit 830584d72ad856fa71e37bfc61f3f590fbaea7e2)

4 years agoMLK-21854-2 imx: uuu: Update autoboot to run uuu or fastboot
Ye Li [Fri, 17 May 2019 08:52:27 +0000 (01:52 -0700)]
MLK-21854-2 imx: uuu: Update autoboot to run uuu or fastboot

When booting from USB device, change u-boot autoboot to default
run UUU bootcmd or enter fastboot directly for android.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit eba8710106348a283940b851080b049bc7fbe466)
(cherry picked from commit 0539983695e4cef88080ec3fd083c68c8c662a35)

4 years agoMLK-21854-1 imx: Add uuu relevant environment
Ye Li [Fri, 17 May 2019 08:49:27 +0000 (01:49 -0700)]
MLK-21854-1 imx: Add uuu relevant environment

Add the uuu environment to each board, when booting from USB, the
u-boot will use them by default

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit e36e653ca2f5b0e879d84925219455790acaf2d2)
(cherry picked from commit c5b1c86f07f4e99e4df9ce7b65e01f31aefc770a)

4 years agoMLK-19250 imx: uuu: Decouple mmc_get_env_dev with CONFIG_ENV_IS_IN_MMC
Ye Li [Tue, 21 May 2019 03:35:26 +0000 (20:35 -0700)]
MLK-19250 imx: uuu: Decouple mmc_get_env_dev with CONFIG_ENV_IS_IN_MMC

For flash devices, like spi nor, weim nor and qspi/flexspi,
we don't define the ENV in MMC, but UUU fastboot always use the
mmc_get_env_dev. So we have to decouple the function with
CONFIG_ENV_IS_IN_MMC

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit ef480647da5686403c7fed09aaf47ca1ace54731)
(cherry picked from commit 368e256abf1950a590c8b28badd6a1997a6ea454)

4 years agoMLK-19059-1 fastboot support all partiton for mx6
Xiaoning Wang [Fri, 27 Jul 2018 01:19:44 +0000 (09:19 +0800)]
MLK-19059-1 fastboot support all partiton for mx6

Base on MLK-18406: uuu write to any positionn of mmc
Support i.MX6 boards.

Signed-off-by: Xiaoning Wang <xiaoning.wang@nxp.com>
(cherry picked from commit 808ccb44593b58552d3356d52f9ae23b7b77fd0a)
(cherry picked from commit ae4b9669cc6e2054fbf32e2e38aec3e43488cbb1)
(cherry picked from commit 6480d90bf0f709bdf30863b56de96d4bbeb97825)

4 years agoMLK-18406 imx8: fastboot support all partition
Frank Li [Fri, 25 May 2018 21:56:25 +0000 (16:56 -0500)]
MLK-18406 imx8: fastboot support all partition

uuu can write to any position of mmc
sdps: boot -f ../mkimage_imx8dv/imx-mkimage/iMX8QX/flash.bin

FB: ucmd setenv fastboot_dev mmc
FB: ucmd setenv mmcdev ${emmc_dev}
FB: ucmd mmc dev ${emmc_dev}
FB: flash -raw2sparse all xx.sdcard

Signed-off-by: Frank Li <Frank.Li@nxp.com>
(cherry picked from commit ca96e0bd1aea1996904b0a71fb1d74c3f5176929)
(cherry picked from commit 482d31e412f5b373d143dbdf363667b066762711)
(cherry picked from commit 0604ac76de5cb0be76573527a5a25defd9dcab6b)

4 years agoMLK-18906-3: imx8mm can choose emmc device by uuu
Frank Li [Fri, 13 Jul 2018 20:22:24 +0000 (15:22 -0500)]
MLK-18906-3: imx8mm can choose emmc device by uuu

uuu can change emmc device number for fastboot

Signed-off-by: Frank Li <Frank.Li@nxp.com>
(cherry picked from commit 4da1ab91f864b804ad561e04f44b618ec86b99b7)
(cherry picked from commit 922533b57d134d68817dbadc62314e3345438606)
(cherry picked from commit eb5edae29d75395ce72a3e6dc39b2b004b3ec8d8)

4 years agoMLK-20356-1 common: Fix resource leak in sparse image writting
Ye Li [Wed, 14 Nov 2018 09:10:53 +0000 (01:10 -0800)]
MLK-20356-1 common: Fix resource leak in sparse image writting

Fix coverity issue CID 18031: Resource leak (RESOURCE_LEAK)
leaked_storage: Variable fill_buf going out of scope leaks the storage it points to

Should free the fill_buf before function return.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit bc23ae569c7aaea338648c000b7b733b09eb735a)
(cherry picked from commit 0a496da0851e981b0ab19338145fcb622762af94)
(cherry picked from commit 8386299ae2ab18d02c8d5abc9a82cf4b6deb5e92)

4 years agoMLK-19969 fastboot: write to wrong position when size bigger than 4GB
Frank Li [Wed, 17 Oct 2018 18:58:23 +0000 (13:58 -0500)]
MLK-19969 fastboot: write to wrong position when size bigger than 4GB

chunk_data_sz = sparse_header->blk_sz * chunk_header->chunk_sz;
All is uint32. chunk_data_sz may be bigger than 4G.

Change chunk_data_sz to 64bit.
force chunk_header->chunk_sz and sparse_header->blk_sz to 64bit.

Signed-off-by: Frank Li <Frank.Li@nxp.com>
Acked-by: Ye Li <Ye.Li@nxp.com>
(cherry picked from commit 08090670625c4ccf86dbc9157dad4799f3669fb7)
(cherry picked from commit af09befee9c55525a6bc9844904048c324db7261)
(cherry picked from commit b3e9569163f2c05597c37bf125147a3c11c155e1)

4 years agoMLK-20510-3 mx7ulp: Change is_boot_from_usb to use get_boot_device
Ye Li [Fri, 17 May 2019 09:42:33 +0000 (02:42 -0700)]
MLK-20510-3 mx7ulp: Change is_boot_from_usb to use get_boot_device

The get_boot_device will return USB type from ROM info if booting from
serial download, so change the is_boot_from_usb to use this function.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 306fca12fb21829be552a6262e310a90664a8cc2)
(cherry picked from commit 4880a6a4c93fd7141d4cc1de5b987c8efdf2cc2a)

4 years agoMLK-20510-2 mx7d: Align implementation of is_boot_from_usb with mx6
Ye Li [Fri, 17 May 2019 09:41:50 +0000 (02:41 -0700)]
MLK-20510-2 mx7d: Align implementation of is_boot_from_usb with mx6

Because the ROM info on iMX7D does not set device type to USB when booting
from serial download mode, we have to use the mechanism on mx6 to implement
the is_boot_from_usb. The original implementation is checking USB controller
register, it can't work correctly after any USB functionality is run in u-boot.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 4934c765c6f1c9c997a28aa79f08c14fc4e91202)
(cherry picked from commit 4713c35ab51842524e4d53286dd2620c8dd9fdec)

4 years agoMLK-19869-2 imx6: fix mmc_get_boot_dev issue when booting from USB
Ye Li [Fri, 17 May 2019 09:41:03 +0000 (02:41 -0700)]
MLK-19869-2 imx6: fix mmc_get_boot_dev issue when booting from USB

The mmc_get_boot_dev reads from SRC SBMR register. When booting with USB
serial download, this function does not return correctly. Because SBMR won't
reflect the USB boot.

The patch adds USB boot checking to this function to fix the issue.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit f49acb763ec7165d634a119626620c596d74e419)
(cherry picked from commit f6706d17af5ce154e325b7f221ec3d74dfca2c56)

4 years agoMLK-19869-1 imx6: Checking serial download booting
Ye Li [Fri, 17 May 2019 09:36:57 +0000 (02:36 -0700)]
MLK-19869-1 imx6: Checking serial download booting

We introduce a new arch-specific flag GD_FLG_ARCH_IMX_USB_BOOT to indicate if it is
USB boot. We check the USB PHY PWD bit at early of boot stage then set that flag
in global variable. So any following calling of is_boot_from_usb will return
correct value.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 50b30746a9aac8785bfe6ea8077c8572b02065c2)
(cherry picked from commit 24906eac79b62e9993b3706d3fb9ee710103aa1d)

4 years agoMA-14916-4 [iot] Update size format for write_counter
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>
(cherry picked from commit ce8f2cccd99f54048b6fa9fb3b0d54ae09a9eb98)

4 years agoMLK-18591-6 android: iot: Add boot Trusty OS codes for i.MX SoCs
Ye Li [Tue, 5 Jun 2018 10:30:37 +0000 (03:30 -0700)]
MLK-18591-6 android: iot: Add boot Trusty OS codes for i.MX SoCs

Use trusty_os_init to load Trusty OS from CONFIG_TRUSTY_OS_ENTRY
before u-boot ready.

Add Trusty OS SOC level codes and u-boot/SPL common codes.

Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Haoran.Wang <elven.wang@nxp.com>
(cherry picked from commit 1ae9ecc73f5001b8bd743011c06a7d07861be64e)
(cherry picked from commit 6fa4f4a42fd90631f8dc8303b17f600c085d8595)
(cherry picked from commit d5046e6f021f3d55c58e8b46b13ac3e8e1761755)

4 years agoMLK-18591-5 android: iot: Export eMMC RPMB interface for Secure Storage proxy
Haoran.Wang [Mon, 28 Aug 2017 10:30:06 +0000 (18:30 +0800)]
MLK-18591-5 android: iot: Export eMMC RPMB interface for Secure Storage proxy

Secure Storage service in Trusty OS will compute
the encrypted mmc frame and the rpmb proxy inject the frame
to driver directly. So that need to export RPMB related
interface for Secure Storage proxy use.

Change-Id: I7f69831a20a440f597d323b610fa615fd4344d05
Signed-off-by: Haoran.Wang <elven.wang@nxp.com>
(cherry picked from commit 4d2c1873ce8221e35874265e41dc42a6df169659)
(cherry picked from commit ce4e9dc35ff89a2429224ae6d0ffb4109cb42e28)
(cherry picked from commit 412ece12209e2f916616053ad65b421e95c07955)
(cherry picked from commit 24d2c13f7e1f7ff5908cc9547abc8f781928f64f)

4 years agoMLK-18591-4 android: iot: Import ql-tipc lib for Trusty OS
Haoran.Wang [Mon, 28 Aug 2017 07:21:44 +0000 (15:21 +0800)]
MLK-18591-4 android: iot: Import ql-tipc lib for Trusty OS

The lib provided ql-tipc communication channel with
Trusty OS.
Also the AVB, Keymaster, hwcrypto and SecureStorage service
tipc client implement in this lib.

Change-Id: I0ab1ec9ee1b6f272b960c2e944008283c2c9249a
Signed-off-by: Haoran.Wang <elven.wang@nxp.com>
(cherry picked from commit 8fb370dd80fbb293b58115d2e7fc4970813773c7)
(cherry picked from commit 0ccdd527a794c2b450658980361a7857ce7495c9)
(cherry picked from commit ffca28682c5a9375c29b3036a156aff190341960)
(cherry picked from commit de2d7e7bff9fe8fd8e9d3cc9cb0022cc1f70ac70)

4 years agoMLK-18591-3 android: Add FSL android fastboot support
Ye Li [Wed, 15 May 2019 05:49:31 +0000 (22:49 -0700)]
MLK-18591-3 android: Add FSL android fastboot support

Porting the FSL android fastboot features from imx u-boot v2018.03 to
support all SoCs: imx6/imx7/imx7ulp/imx8/imx8m.

The UUU commands like UCmd and ACmd are also added. Users need set
CONFIG_FASTBOOT_UUU_SUPPORT=y to enable the feature.

Signed-off-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 65120b06a7f750b9b1a6e0db3d2082cc7088d5a8)
(cherry picked from commit 9b149c2a28829fe7017f83981d634157bc31cc94)
(cherry picked from commit 9f99e9de1d37e9f6c02c1b27348ea3dcdab94569)
(cherry picked from commit 6ae1c043431a4987f563026b179b33945a5880ee)

4 years agoMLK-18591-1 android: Add the AVB library
Ye Li [Tue, 5 Jun 2018 08:30:34 +0000 (01:30 -0700)]
MLK-18591-1 android: Add the AVB library

Porting the android AVB lib from imx u-boot v2018.03. Since 2019 u-boot
has added latest AVB library, try to reuse it.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 2105662ada738a271e12a81d775134a5821dc38f)
(cherry picked from commit f7291d86c4183ce2e299ad271aa5618c71507ffc)
(cherry picked from commit b871714c519e1bda3de6afbd354bee2cb246e4b7)
(cherry picked from commit 64520f3e5f495ecce79177fba11e3d41299529b2)
(cherry picked from commit 076fe5bc4d29deaf6d008e579b5cfe7408bc4525)

4 years agoMLK-21852 imx: Update runtime SD/MMC boot env device and env variables
Ye Li [Fri, 10 May 2019 06:48:16 +0000 (23:48 -0700)]
MLK-21852 imx: Update runtime SD/MMC boot env device and env variables

Since we enabled MMC alias, the USDHC index in u-boot is the usdhc port.
So we don't need to convert them for kernel and u-boot env device.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 8fd6e14f5c1598684bc08a7917f89cd94e988d8f)
(cherry picked from commit 96bc8f724159a3a9e2ba9f605b84f53534bc3e1f)
(cherry picked from commit 83a2f62405d0aa3b1fe7140e320a1b297d6b4883)
(cherry picked from commit 733b8ad42e057bd025cd97a570ecbcb2ebc4191c)

4 years agoMLK-19628: imx6ulz: configs: adding optee support
Silvano di Ninno [Thu, 27 Sep 2018 14:55:45 +0000 (16:55 +0200)]
MLK-19628: imx6ulz: configs: adding optee support

Adding new config file and uTee file name to enable OP-TEE support
on imx6ulz EVK.

Signed-off-by: Silvano di Ninno <silvano.dininno@nxp.com>
(cherry picked from commit e3c26a7b908a6a3591ab2e619735c44a85e23972)
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 6f6c9a9a838981eb9c6c0dd3558125039250c319)
(cherry picked from commit c11884b0f613afcb85800a0ef7a4176d05a5df67)
(cherry picked from commit c186d77f29b2116bcf7888bcac358887d2f5fc50)
(cherry picked from commit 19b49fc7dab7366714535477bb25ad90af69f2eb)

4 years agoMLK-23574-31 mx6ulz_evk: Update mx6ulz EVK board codes
Ye Li [Thu, 16 Apr 2020 11:06:20 +0000 (04:06 -0700)]
MLK-23574-31 mx6ulz_evk: Update mx6ulz EVK board codes

1. Add emmc, nand, and qspi boot support: defconfigs and DTS
2. Support USB2NET dongle
3. Fix is_mx6ull to include 6ulz
4. Update DTS model name
5. Modify ENV offset to 896KB for SD/eMMC

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 535e6e44ad7ef537a21a2bbdc9a6f414f679f23b)
(cherry picked from commit 2804c931d75f802d1793dab28822abec21a3deaf)

4 years agoMLK-18823 mx6ul/mx6ull: Add workaround for LCDIF display when optee enabled
Ye Li [Wed, 11 Jul 2018 10:17:14 +0000 (03:17 -0700)]
MLK-18823 mx6ul/mx6ull: Add workaround for LCDIF display when optee enabled

In optee enabled defconfig, the trust zone is enabled in DCD. On iMX6UL/ULL, there
is IC limitation that LCDIF master access can only be non-secure, because PL301
hard code the m_3/4/5 to non-secure masters. It causes LCDIF fails to fetch data
from memory.

This patch adds a workaround to change trust zone Region 0 attribute to allow both secure
and non-secure read/write. So it permits the LCDIF master access to memory.
Since optee will configure Region 0 by itself, this should not introduce problem to optee.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 85be73bb5bab319c096f0893729835b3ceddafde)
(cherry picked from commit a7ab49a0856caea6114b4f9d1f6cddb75c944c33)
(cherry picked from commit 5a54394012b76adbd7efe2aa2cea8a8dade860c0)
(cherry picked from commit f27090f07733d322108c0798bad3770adf527794)
(cherry picked from commit b40b9e0d3d102dc4c60c35a2df673f4800af37ae)
(cherry picked from commit 2e9054ad2f62444449b2b9e273c4cc779169979e)

4 years agoMLK-17086 bootm: Add authentication to optee image
Ye Li [Tue, 5 Dec 2017 07:16:08 +0000 (01:16 -0600)]
MLK-17086 bootm: Add authentication to optee image

When IMX_OPTEE is enabled for secure boot, update bootm to authenticate the optee
image and the kernel zImage before booting into optee.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit d3bee08f12f1d41c83c47773aec6cfa28056694a)
(cherry picked from commit 3825c3fedbbe59fdf8c4f59f10221823a5fc6f03)
(cherry picked from commit a09dca5eff735ef8ef46313de09cfa0f3b4cf189)
(cherry picked from commit c83877f5ad9385279c5db3d6ab78ed103d45d1d5)
(cherry picked from commit 0e492bffc2b4cc804e8db6c035bf9dd08fae6a95)
(cherry picked from commit 77f0447b4fa51ff2807f4b4508bcbfe72982e802)

4 years agoMLK-17082-02 imx: add optee support for imx6sl
Bai Ping [Mon, 4 Dec 2017 04:49:13 +0000 (12:49 +0800)]
MLK-17082-02 imx: add optee support for imx6sl

  Add defconfig for tee support;
  Enable the TZASC support;
  Add env config for tee support.

Signed-off-by: Bai Ping <ping.bai@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 3535868b89df84d3e6554114f7867f9ef908ff01)
(cherry picked from commit 82a0b53092cdc0b025749f4d8f1cdfcc66e07db7)
(cherry picked from commit dc1602c2d7f9d1ff021e46a9187bbcb10f172a71)
(cherry picked from commit 181ae93e7b804db6dca4a0d2c3aaf547413428bb)
(cherry picked from commit 8d86ec747f3fed803ff523fc92ce64e0273db675)
(cherry picked from commit 389ac3ed2dc96cf50394f8f858f6e4ff941517f3)

4 years agoMLK-17082-01 imx: add optee support for imx6sll
Bai Ping [Mon, 4 Dec 2017 02:50:33 +0000 (10:50 +0800)]
MLK-17082-01 imx: add optee support for imx6sll

Add different defconfig for optee;
Enable the TZASC support;
Add env config for tee support.

Signed-off-by: Bai Ping <ping.bai@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 1f86ee60e72bb56af69a4128e8234e08c9bb1f59)
(cherry picked from commit 819b988f3f1a8a207a380b09b4c71374b4b3ae0b)
(cherry picked from commit 7d816e96f304a2a899efb675fda153ebe84775d2)
(cherry picked from commit 53889189eca457cc915d2270c0034f225d9719ed)
(cherry picked from commit 2300844b9ce5992fc835605752fbbcee5be98a6b)
(cherry picked from commit 18fdda30a9da0f3f679bd4417d62bc0c6bd86d9f)

4 years agoMLK-16753-9 imx: mx7: add optee support
Peng Fan [Fri, 10 Nov 2017 05:31:43 +0000 (13:31 +0800)]
MLK-16753-9 imx: mx7: add optee support

Add different defconfigs.
Enable Trustzone.
Update env to runtime boot OP-TEE.
mx7d arm2 board not supported now.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 435807b41ae99bb9f4e0b2c7b9e5287c2bd520c0)
(cherry picked from commit b78124c2f68b9aa4ec2f160d99364bfab72ab5e3)
(cherry picked from commit 641b195a5633cfc3960a42bbb332dd8fead9f939)
(cherry picked from commit 4ca1af73ade293f135ccf44686f87e39b1f494ec)
(cherry picked from commit eaff76c0f64ca756952c91a923a7bbeeffa36107)
(cherry picked from commit 44b2dafa6b97cc6b4ac0fe6a16010212f6dc9a81)

4 years agoMLK-16753-8 imx: mx6ul/ull: add optee support
Peng Fan [Fri, 10 Nov 2017 05:29:49 +0000 (13:29 +0800)]
MLK-16753-8 imx: mx6ul/ull: add optee support

Add different defconfigs.
Enable Trustzone.
Update env to runtime boot OP-TEE.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit af4e26c34e091994615ec721bc357b45e43c89e9)
(cherry picked from commit cd8397e9c973ac31766adf9565b2af18db9f9606)
(cherry picked from commit 79e2e2fbe7ddf376619efb43c4b4e6c4285a6f5c)
(cherry picked from commit 65fd479c23fa3d36d54c1853e3e2645ebcc56e96)
(cherry picked from commit df85fa7f7517b61852a9441db361015e4bf86cb6)
(cherry picked from commit 7b33b260cf77d37a906dcf1ca974c2f9ac7077fb)

4 years agoMLK-16753-7 imx: mx6sx: add optee support
Peng Fan [Thu, 9 Nov 2017 01:14:12 +0000 (09:14 +0800)]
MLK-16753-7 imx: mx6sx: add optee support

Add different defconfigs.
Enable Trustzone.
Update env to runtime boot OP-TEE.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 7c93e616d69f57668fb7e5ac24d8f7fa98dbe1f2)
(cherry picked from commit eb9063ee64bc30f51a20eec9da0750b0e82f3799)
(cherry picked from commit 580e0b29ca6501f706af6140357019e7f83692dd)
(cherry picked from commit c86df3e535c9528e43f36bfb8d362ca24f71098a)
(cherry picked from commit 306ccb6547769e79d2ee81a66fb993e467d87f02)
(cherry picked from commit 3443579fc35dca74c6ee295aacde911c901f6566)

4 years agoMLK-16753-6 imx: mx6sabresd: add optee support
Peng Fan [Thu, 9 Nov 2017 01:10:52 +0000 (09:10 +0800)]
MLK-16753-6 imx: mx6sabresd: add optee support

Add different defconfigs
Enable Trustzone.
Update env to runtime boot OP-TEE.
To 6QP SDB, TZASC enabled, need board rework and new ddr script.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 2db3156d89ad13133fb1444186e906a5db178913)
(cherry picked from commit a1370b6768c0ce71555ac056bca94102e8a7228e)
(cherry picked from commit 9d483ef0ef1c44f5067405092b738863d5e07489)
(cherry picked from commit 0f79d0ae9d22406b7b1189b9d26e5b26e6c09b4b)
(cherry picked from commit 94af854f2ba1cf8bdae8717218f23f3abd6de5b0)

4 years agoMLK-16753-5 imx: mx6qsabreauto: add optee support
Peng Fan [Thu, 9 Nov 2017 01:04:01 +0000 (09:04 +0800)]
MLK-16753-5 imx: mx6qsabreauto: add optee support

Add defconfigs.
Enable Trustzone.
Update env to runtime boot OP-TEE.
To 6QP AUTO, TZASC not enabled now.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 62277d7e521894b079911fd8e8b26507ff03c018)
(cherry picked from commit b7be942860a15feb0bd660b1922d4ed9306f1184)
(cherry picked from commit 56d2100c6b3c483d063ce70ad7ce9d6da378ada6)
(cherry picked from commit 44242fe2c59c99936552cefd42b576feb51a25d7)
(cherry picked from commit 3a0b8a0a7a1b9286a3a4f5247970d15234b0632f)
(cherry picked from commit a8cdc36c02bb0b61257c0384e02acb0fed9399d7)

4 years agoMLK-17123 imx: add tee environment variable
Ye Li [Thu, 9 May 2019 08:53:50 +0000 (01:53 -0700)]
MLK-17123 imx: add tee environment variable

Add tee environment variable to fix mfgtool/uuu bootcmd error

Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 2604fd8bdcd0c36d17899b01f370fd4507cea33e)

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit e8f86c28bdb867a2d020a02140722661ebbae467)
(cherry picked from commit 0b4e421e230ae478150c893f93daa6836e60ffd2)
(cherry picked from commit 32a6fd10d774908ed89ee4c9023737784092e5db)
(cherry picked from commit ecbb26148d931187a506207c47bd153c5ac4f644)

4 years agoMLK-16753-2 imx-common: add IMX_OPTEE entry
Peng Fan [Thu, 2 Nov 2017 08:01:19 +0000 (16:01 +0800)]
MLK-16753-2 imx-common: add IMX_OPTEE entry

Add IMX_OPTEE Kconfig entry

Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 28b0bcbef4dadd33a273dd18a2274f3c679efb2d)
(cherry picked from commit bda0f36309e7752bf6c78d71473cc5cf7f8f58c1)
(cherry picked from commit d3188f62b659dda60128a67f8cdf2920108e004d)
(cherry picked from commit 8c1260dcd7adbd1225bd0b8e2bb9ee3971c76e36)
(cherry picked from commit e22dfade8c40e9d2b57e26d9624d6dfeb9995da8)
(cherry picked from commit ce842d6517da7ecf77da5fde6f2b9384c159d594)

4 years agoMLK-21251-2 doc: imx: habv4: Fix typo in csf_additional_images.txt CSF example
Breno Lima [Thu, 21 Mar 2019 20:52:02 +0000 (17:52 -0300)]
MLK-21251-2 doc: imx: habv4: Fix typo in csf_additional_images.txt CSF example

The csf_additional_images.txt example should match with
mx6_mx7_secure_boot.txt guide.

Fix addresses provided in csf_additional_images.txt CSF
example.

Reviewed-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Breno Lima <breno.lima@nxp.com>
(cherry picked from commit 17c3af7a1935a40057c01459766d41ff0a19723b)
(cherry picked from commit 270185b4c78f1139e965587ea2f0f290f9c4348c)
(cherry picked from commit c37d3b4b1f8ac0da5c09b5c2123bf7ec129b5849)
(cherry picked from commit 427b66764e3d9e93d1ba7a5592d2872633884d29)
(cherry picked from commit f2b974eca7a444739a4d661d902ae279fe5d5aa1)

4 years agoMLK-20228 mx7ulp: Read chip ID from SIM register
Ye Li [Wed, 7 Nov 2018 05:12:39 +0000 (21:12 -0800)]
MLK-20228 mx7ulp: Read chip ID from SIM register

Since from B0 TO, there is a Mirror of JTAG ID register added in
SIM. We can read the part revision from this register.
Update codes to use this register.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit de14e88698b9ae9b0a9ac674f16d65b3ceb4ccc2)
(cherry picked from commit 0d0d9acc04972792890776e3c066f05a349bb623)
(cherry picked from commit 00dfa82643b4e06c4c5e3830d35a82801e74ad81)
(cherry picked from commit 6617b9a8770b3df01df75dc6aaf6f5e75d1f5d72)
(cherry picked from commit 496020f0f0947e2762d8fb921baf3120b8520bec)

4 years agoMLK-20116-3 mx7ulp_evk: Remove GPIO codes for USB ID
Ye Li [Tue, 30 Oct 2018 04:48:38 +0000 (21:48 -0700)]
MLK-20116-3 mx7ulp_evk: Remove GPIO codes for USB ID

The iMX7ULP B0 chip has added more pins for muxing USB ID. The A3 board
follows it to exploit PTC13 for USB ID, so we don't need to use GPIO
any longer. The USB driver can recognize the USB mode from USB PHY.

After this change, old boards with design using GPIO for USB mode won't
be supported.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 706b1a41b73d9604d4a590173f86fb398a908406)
(cherry picked from commit 8302b13924a1e5c1ed356de6a9ce62198160c307)
(cherry picked from commit 362aaec61fc9baa0f701fcdafa95f40cb13b746d)
(cherry picked from commit aa167befc7f00d11adce75635c66d093e5f29307)
(cherry picked from commit bb8f35dd2c4e0a6b9ff9e340578be9bbda964455)

4 years agoMLK-20116-1 imx7ulp: Update iomux pins header file for Rev B0 chip
Ye Li [Tue, 30 Oct 2018 04:37:24 +0000 (21:37 -0700)]
MLK-20116-1 imx7ulp: Update iomux pins header file for Rev B0 chip

i.MX7ULP B0 silicon has below updates in iomux

  - GPIO function input buffer enable (IBE)/output buffer enable (OBE) is
    now controlled by RGPIO module. IOMUXC IBE/OBE is used as an override.
  - LPUART2_TX (I/O) to PTB12 (ALT4)
  - LPUART2_RX (I) to PTB13 (ALT4)
  - USB0_ID (I) to PTC13 (ALT11), PTC18 (ALT11) and PTC19 (ALT10)
  - VIU_DE (I) to PTC18 (ALT12), PTC19 (ALT12) and PTE5 (ALT12)
  - RTC_CLKOUT (O) to PTB5 (ALT11) and PTB14 (ALT11)
  - SEC_VIO_B (I) to PTB4 (ALT11)
  - Added new Input Selection Registers
      PSMI1_USB0_ID Address: 0x40ac_0338 To select USB_ID input pad/source
      PSMI1_VIU_DE Address: 0x40ac_033c To select VIU_DE input pad/source

Copy the imx7ulp-pinfunc.h from latest kernel dts
(commit 18cdeadfe1967ea33d3bdfc7ccead6d6d06a98a6), and update
the mx7ulp-pins.h accordingly.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 5e3da4cf8e217e7efe683bc63114e45927ebb28b)
(cherry picked from commit 459c2fe202175e7201b4b863eb6d98d15406d923)
(cherry picked from commit 20c7ae29346df608836df3efa4511af4a58b4f21)
(cherry picked from commit 69d1dab14fb791da23a084d844b097d9d842ca91)
(cherry picked from commit 591acc7880af3e151e2adff1f1e94c70a2dc8a42)

4 years agoMLK-19767-1: imx7ulp: configs: Enable DEFAULT_FDT_FILE
Shenwei Wang [Mon, 1 Oct 2018 13:50:49 +0000 (08:50 -0500)]
MLK-19767-1: imx7ulp: configs: Enable DEFAULT_FDT_FILE

Specify the default dtb file for kernel boot per i.MX7ULP
board config.

Signed-off-by: Shenwei Wang <shenwei.wang@nxp.com>
Reviewed-by: Frank Li <Frank.li@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 3fba1c1a76cadfe0177e61a85eac3da10ee086e0)
(cherry picked from commit 013eb1fdfdb33df19a0917fd554160a84ec45dd1)
(cherry picked from commit 6052c4d6059f7f545f2f6d73bf77dd4fc5687130)
(cherry picked from commit 25bc40364344a414282c16052d044f7000c94aa8)
(cherry picked from commit 734368dc183a9d8e3b9fb46d30dac5efe4639556)

4 years agoMA-12724 imx7ulp: Correct earlycon parameter
Luo Ji [Fri, 14 Sep 2018 08:02:55 +0000 (16:02 +0800)]
MA-12724 imx7ulp: Correct earlycon parameter

Default address of earlycon parameter is not correct,
use correct value for imx7ulp_evk.

Test: imx7ulp_evk boots ok.

Change-Id: I2cecb6bfacca573013313ba4ae3783784ccfd506
Signed-off-by: Luo Ji <ji.luo@nxp.com>
(cherry picked from commit 9dce3365b8ea0cbdaed06f0c9b98c98b2f150c5a)
(cherry picked from commit c727966e6688fd3de199de1b631a8fd57a8c7149)
(cherry picked from commit 9f27514d69a46d3d5e60e57feee47267d6977260)
(cherry picked from commit 1c3028b34e35a6ca3b9641d7122e8be4531d4d2f)

4 years agoMLK-18939 mx7ulp_evk: Fix mtest end address issue
Ye Li [Fri, 27 Jul 2018 14:03:47 +0000 (07:03 -0700)]
MLK-18939 mx7ulp_evk: Fix mtest end address issue

When TEE is enabled, the high 32MB memory is reserved to TEE. So the
mtest end address 0x9e000000 will overlay with u-boot runtime text and data.

Fix the issue by changing the mtest end to half of DDR size.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 9b56f22639703bd70bfdd1de0cbdcef2b80f0bff)
(cherry picked from commit e9c1c97f64df33eaded9f78268782a246010928f)
(cherry picked from commit 87e7df87b7818052a8c915a5eaeb468d22004383)
(cherry picked from commit 149c3d17879749fd43935893130ccdb3530bc025)
(cherry picked from commit 60aac7b7aed2d708c01c0fe2f41dc52daa587737)
(cherry picked from commit 4ae5fb7f3c5c862107d814e107142eb2c39a8e19)

4 years agoMLK-18318: mx7ulp: Enable QSPI interrupt as a wakeup source on MX7ULP
Fabio Estevam [Mon, 14 May 2018 16:46:58 +0000 (13:46 -0300)]
MLK-18318: mx7ulp: Enable QSPI interrupt as a wakeup source on MX7ULP

MX7ULP needs to have the QSPI interrupt configured as a wakeup source
in the SIM_WKPU_WAKEUP_ENABLE register, otherwise the QSPI interrupts
do not wakeup the CPU from idle mode leading to poor performance in
Linux.

The SIM_WKPU_WAKEUP_ENABLE register only exists in B0 silicon, so
make sure to only write to this register in the B0 version (or greater).

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
(cherry picked from commit 1ab33446d6843f560fb6d14c781f6417225f8f3d)
(cherry picked from commit 8116f34387f8164dd72656fb8278e6df9fdf4c05)
(cherry picked from commit 3d64768b1b1064aed71974842a781b69ee34f8c9)
(cherry picked from commit 25b73de874e3b66e79a9f6bcb01714aeab7568a6)
(cherry picked from commit a704c61c8ffa0f8a2ad26c1cc3cdc549dcdb7487)

4 years agoMLK-14606 mx7ulp: Modify ENV offset to 896K
Ye Li [Mon, 9 Apr 2018 09:06:16 +0000 (02:06 -0700)]
MLK-14606 mx7ulp: Modify ENV offset to 896K

Since the u-boot size increases after using OF_CONTROL to including DTB,
we have to adjust ENV_OFFSET to 896K for SD/eMMC/FLASH.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 9d2df7407c58cd8b29fcbf57144e8ad9d8795207)
(cherry picked from commit b2c8c63fe7eff0cd5aea875ddc94a2f70d42d6cd)
(cherry picked from commit 43c66ac2138ec3414d2300ec82f7e65f5081b668)
(cherry picked from commit fd53b1346dc1186ea6f4d28f14397e3303e4f8ff)

4 years agoMLK-17586-3 i.MX7ULP: change USDHC clock rate
Haibo Chen [Wed, 14 Mar 2018 09:15:23 +0000 (17:15 +0800)]
MLK-17586-3 i.MX7ULP: change USDHC clock rate

Change USDHC0 and USDHC1 per clock source from APLL_PFD1,
and set the APll_PFD1 clock rate to 352.8MHz.

Also gate off APll_PFD1/2/3 before boot OS, otherwise set
the clock rate of APll_PFD1/2/3 during OS boot up will triger
some warning message.

Reviewed-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
(cherry picked from commit 07ef0fab23204684d82f27baf721a72b247f30c5)
(cherry picked from commit 1c30a73542990afbe48bf7a398baba9c5efaf4fe)
(cherry picked from commit 0e4ce4b6b3f8d06f5b63850e04a1e4deb9b07624)
(cherry picked from commit 113a509e4d4ea84b55b296efa5f760b7192f9487)
(cherry picked from commit e01af8fc7daf0700c13f46e985e2e956f753feff)

4 years agoMLK-17897: mx7ulp: Add ARCH_MX7ULP to IMX_HAB dependency
Breno Lima [Tue, 20 Mar 2018 13:09:47 +0000 (10:09 -0300)]
MLK-17897: mx7ulp: Add ARCH_MX7ULP to IMX_HAB dependency

Add ARCH_MX7ULP as a CONFIG_IMX_HAB dependency, so we can enable
IMX_HAB on mx7ulp

Signed-off-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit d4c01cd3f6f5ba59ca17ebf52f610f629895ac7a)
(cherry picked from commit 4ba6e5aa05ec8872426aa68da3879e8fcd835710)
(cherry picked from commit 78e717c7e0897e759abdbe5bf28b46ae56d403ee)
(cherry picked from commit 80facaa8dfd9b199965c3c46a08f32f6dd1e646c)
(cherry picked from commit b34d12ec68f9345bade97cb0c0f96741933ea2f8)

4 years agoMLK-15087 mx7ulp_evk: Add m4 boot defconfig
Ye Li [Wed, 14 Jun 2017 13:19:06 +0000 (08:19 -0500)]
MLK-15087 mx7ulp_evk: Add m4 boot defconfig

Add back the defconfig to boot M4 in single mode, because some customers
are using the defconfig during development.

Signed-off-by: Ye Li <ye.li@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit ad2298d04fe2443e2b60114001523555d0cd5a50)
(cherry picked from commit 26697788474a1a38d84679a9a6b86a6b455cbd0b)
(cherry picked from commit 2d9ef1d76fa148cd6b0c40b33550e923e7ea8b2d)
(cherry picked from commit c9952714224712e06112b26adb2d5b9d14c48446)
(cherry picked from commit 60ad9ecdc48f273123ceabaf49b51cc674bd1a6d)

4 years agoMLK-14445-9 mx7ulp_evk: Add eMMC reworked board support
Ye Li [Fri, 17 Mar 2017 09:17:59 +0000 (17:17 +0800)]
MLK-14445-9 mx7ulp_evk: Add eMMC reworked board support

Add build configuration and DTS file to enable eMMC for eMMC reworked
EVK board.
Because the eMMC DTS file has QSPI node disabled, so we change to use
non-DM QSPI driver.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 9ae0e03eb829f694d26caec22f91d1f0fdba980d)
(cherry picked from commit 29a10734150e91d3b5596f11a7533cb52dc5a4d2)
(cherry picked from commit 6d8c9e8567eff4f5be860bc5f0e48a03e368c653)
(cherry picked from commit 495ca96505f1e4070cba4aac1891389e96f86ae8)
(cherry picked from commit c1ad2dcdf74ed7c811e10c6a0f413a7eed12723d)

4 years agoMLK-14445-8 mx7ulp_evk: Add dynamical MMC device detection
Ye Li [Fri, 17 Mar 2017 08:23:46 +0000 (16:23 +0800)]
MLK-14445-8 mx7ulp_evk: Add dynamical MMC device detection

Add board_late_mmc_env_init to support MMC device detection for environment
variables.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 6c2fe5b60692e7d0e86383c44792e5f2938bfa14)
(cherry picked from commit 74f5fffe9aee3e1434b63b95e33e7ecc7e5a2b08)
(cherry picked from commit 74b505dd70fc5ba5bb00ec0359ec6f79be757388)
(cherry picked from commit b3f5ed546092f557e0a68c78e181990e0a637af8)
(cherry picked from commit 1ae79a71818aec55613456b408e3e1fa4d0e7be3)

4 years agoMLK-13547 configs: mx7ulp_evk: enable ethernet boot support
Peter Chen [Wed, 16 Nov 2016 06:07:53 +0000 (14:07 +0800)]
MLK-13547 configs: mx7ulp_evk: enable ethernet boot support

Since we can use USB ethernet instead of local ethernet, add ethernet support
for it. To use USB ethernet function at u-boot, just plug in Micro-AB cable
at USBOTG1 port with USB2Ethernet adapter connected.

Signed-off-by: Peter Chen <peter.chen@nxp.com>
(cherry picked from commit 60ffddf87cf6b8502c5d5fc6540364adfd66ebb3)
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 63c2e1de37e1e24f35279f50efa5a330e2cb3d07)
(cherry picked from commit c82f3bef0aa0cba4937eb6c39501e446dca01746)
(cherry picked from commit b9d238f6e240e189299e49654ca3abf53e92cb28)
(cherry picked from commit a99fd1b215cf176377a8e0a35d9bbe7b080cae13)
(cherry picked from commit d261a139c946f3117aef9cdbbbe78b8f46d61952)

4 years agoMLK-14445-6 mx7ulp_evk: Add USB OTG0 support
Ye Li [Thu, 16 Mar 2017 09:02:56 +0000 (17:02 +0800)]
MLK-14445-6 mx7ulp_evk: Add USB OTG0 support

Porting codes to support USB OTG0 on the EVK board. Convert
to use DM USB driver.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit b4e01a67a0740c524e7522da7ace0488f86261db)
(cherry picked from commit 23144983d3347f8f91695cea73aab8558cc66629)
(cherry picked from commit a5d3e7a334689b5c7b4e99f10c1a6044e4775699)
(cherry picked from commit 4906e4b9ff0e75ad517fa3ed3d49430d3533d3f6)
(cherry picked from commit c315588cf84d2a4b61ad11827444891edf17a35a)

4 years agoMLK-14445-3 mx7ulp_evk: Enable wdog driver for reset cpu
Ye Li [Thu, 16 Mar 2017 05:40:01 +0000 (13:40 +0800)]
MLK-14445-3 mx7ulp_evk: Enable wdog driver for reset cpu

Enable the CONFIG_ULP_WATCHDOG in defconfig, so that reset command
can work.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit da1c290f0b890fafeb8ce29b53b764eaee53520b)
(cherry picked from commit 7a4ba3eb22732ba0d4cc47552413bad8c1d94dbe)
(cherry picked from commit 1a471f37b2ea74c1be5bde861576aa2bc4a679b6)
(cherry picked from commit 022a7297569555139c9170f52bbeb1378333e669)
(cherry picked from commit 8b32ba6819e181f3afe533ab41612700b19ce69d)

4 years agoMLK-14445-2 mx7ulp_evk: Add QSPI flash support
Ye Li [Thu, 16 Mar 2017 03:25:35 +0000 (11:25 +0800)]
MLK-14445-2 mx7ulp_evk: Add QSPI flash support

Porting the QSPI flash board support from v2016.03, and convert to use
DM QSPI driver.
Since we need to support QSPI at default in u-boot, change the default
DTS file to qspi enabled DTS.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 41895cd598be6c4a64fc4fec521120e4962abc28)
(cherry picked from commit b4698ce0e5b6952a88702075ce905a059da277d9)
(cherry picked from commit 2fa81543fa49924a92a470cce62fbca7544ecd56)
(cherry picked from commit e8795e4dc6eb5f3c9583e1d787368ff1e1ffb48f)
(cherry picked from commit 014ffa93579624d52571e0914af7f9166a73d5bb)

4 years agoMLK-13450-7 mx7ulp: Add M4 core boot support when using single boot mode
Ye Li [Mon, 14 Nov 2016 09:58:04 +0000 (17:58 +0800)]
MLK-13450-7 mx7ulp: Add M4 core boot support when using single boot mode

The single boot mode in MX7ULP will only boot up A7, the M4 is running in ROM
by checking entry from SIM0 GP register.

In this patch, We bind M4 image with u-boot.bin by allocating a section for m4 image.
So the whole image (included M4 image) will be loaded by A7 ROM into DDR. Then
when u-boot is up, it will try to load M4 image into TCML and boot it there.

Since M4 image will not be relocated in u-boot codes, we must load it during
board_f. Current implementation put it in arch_cpu_init to get M4 booted
as quick as possible.

We requires the M4 image with IVT head and padding embedded, not a RAW binary. The
image should be same as what is used for M4 QSPI boot in dual boot mode.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 04163dbd4f6190f310fff17b53b4bc7b8370ba89)
(cherry picked from commit 81b5ea14493ef25a6cca22bc5651ec3e93e941f3)
(cherry picked from commit 1e4414da2e9a671896af1af887ab710489a2007e)
(cherry picked from commit b3a50e57aafe2830388d1295a8583c4e2515594b)
(cherry picked from commit 2b9416b3dcd0eb85504aece94a603dc9aca6021e)
(cherry picked from commit aadc312ee92c6f6ab2c427ca5eec2a7a02281e50)

4 years agoMLK-13602-3 mx6ullevk: Enable module fuse checking for mx6ull boards
Ye Li [Tue, 13 Dec 2016 07:33:41 +0000 (15:33 +0800)]
MLK-13602-3 mx6ullevk: Enable module fuse checking for mx6ull boards

Enable the module disable fuse checking configurations, and ENET fuse checking during
ENET setup.

Signed-off-by: Ye Li <ye.li@nxp.com>
Tested-by: Bai Ping <ping.bai@nxp.com>
(cherry picked from commit d2192a3909be8ab9433082e7c04c917489b28e25)
(cherry picked from commit 5fa7d431db1c5eda903f211a99c426d8d57293bd)
(cherry picked from commit 5fc6fe6b0f85f61bc60712af5b8cd55e7b8b0789)
(cherry picked from commit 522748cbcfc2ddd5a3490fe74683926048ff099d)
(cherry picked from commit 176e91bcdc49025cf127b4226ec0e2476ebafdf0)
(cherry picked from commit 9c42a6b549b1f5bc84fff10f0590e94111771422)

4 years agoMLK-12483-5 mx6ul: Enable module fuse check EVK board
Ye Li [Tue, 15 Mar 2016 14:16:54 +0000 (22:16 +0800)]
MLK-12483-5 mx6ul: Enable module fuse check EVK board

Enable the configurations CONFIG_MODULE_FUSE and CONFIG_OF_SYSTEM_SETUP for
module fuse check. And modify board level codes for SD, FEC and EIM.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 9232e9f7637afa3b71b43ab2d1361582ec5a080a)
(cherry picked from commit 687b586bf7d3b0d2f796c8ea768e4fb450079adb)
(cherry picked from commit f1cdd3b004b15d950b35f3ef625af23c2f106f5a)
(cherry picked from commit e5ac66df336a1ce45f315ada5d8f1a73e8f22632)
(cherry picked from commit f43662fa184193d165973f0c50708f818b120708)
(cherry picked from commit 5a635cad834def6d5a624311e6db2666c6617276)