u-boot.git
4 years agoMLK-18153-1 dts: mx6slevk: Update DTS and DTSi to align with v2020.04
Ye Li [Tue, 3 Apr 2018 08:49:54 +0000 (01:49 -0700)]
MLK-18153-1 dts: mx6slevk: Update DTS and DTSi to align with v2020.04

Copy the DTS and DTSi from 4.14 kernel.

Changes in DTS specified for u-boot:
1. Add alias for mmc and usb
2. Add pin settings for i2c bus force idle
3. Change PMIC node name
4. Update model name to remove freescale

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit e669373fc5f861750b2b7b59cde6c31c43cf61fb)
(cherry picked from commit 877d09b0d104db8e377aa6e213b7cee46217fbbd)
(cherry picked from commit 1c0c39e41ac9e4caea0452a242d6f9245231e09f)

4 years agoMLK-18152-6 configs: mx6sxsabreauto: Update and add build configs
Ye Li [Tue, 3 Apr 2018 07:31:00 +0000 (00:31 -0700)]
MLK-18152-6 configs: mx6sxsabreauto: Update and add build configs

Update mx6sxsabreauto defconfig to align with v2018.03.

Add other configs to support QSPI1 boot, NAND boot and plugin.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 779b3bd0ede4050689b12982bfa2abe1d07b566e)
(cherry picked from commit 7a83cf87562f1214b87ff99bb13bf01ed04e9581)
(cherry picked from commit d019d257c9605852007b94c53233dbdba2c50e55)

4 years agoMLK-18152-5 mx6sxsabreauto: Update board codes to align with v2019.04
Ye Li [Tue, 3 Apr 2018 07:27:48 +0000 (00:27 -0700)]
MLK-18152-5 mx6sxsabreauto: Update board codes to align with v2019.04

Update DM PMIC settings and LDO bypass support.
Add BMODE support.
Add LVDS and LCD splash screen support
Add two ethernet controller support
Update environment settings
Add plugin support

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

4 years agoMLK-18152-4 dts: mx6sxsabreauto: Update DTS to align with v2020.04
Ye Li [Tue, 3 Apr 2018 07:21:44 +0000 (00:21 -0700)]
MLK-18152-4 dts: mx6sxsabreauto: Update DTS to align with v2020.04

Copy the DTS from 4.14 kernel

Compared with kernel DTS, the changes in DTS for u-boot:
1. Add pin settings for supporting i2c bus force idle.
2. Change pfuze name
3. Change board model name, remove freescale

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 67d0c3427562a81713ac8d00f5a976ac2942cb1a)
(cherry picked from commit 5f99b0252b570d490c06269bd565da58d45f2dca)

4 years agoMLK-18152-3 configs: mx6sxsabresd: Update and add build configs
Ye Li [Tue, 3 Apr 2018 04:00:43 +0000 (21:00 -0700)]
MLK-18152-3 configs: mx6sxsabresd: Update and add build configs

Update mx6sxsabresd defconfig to align with v2018.03 with DM
ethernet enabled.

Add other configs to support QSPI2 boot, reworked eMMC, M4 fastboot and
plugin.

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

4 years agoMLK-18152-2 mx6sxsabresd: Update board codes to align with v2020.04
Ye Li [Tue, 3 Apr 2018 03:52:12 +0000 (20:52 -0700)]
MLK-18152-2 mx6sxsabresd: Update board codes to align with v2020.04

Add emmc support which needs board rework.
Add I2C2.
Update DM PMIC settings and LDO bypass support.
Add BMODE support.
Add LVDS and LCD splash screen support
Add PCI power and reset GPIO and disable PCI at default.
Update QSPI settings for QSPI boot and M4 fastup.
Update environment settings

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit e74716b6e78f016226dc9f800b04574f545d9367)
(cherry picked from commit f3dd07286dc39d3028deaedf5dc1668929cbfd29)
(cherry picked from commit 462883d1a88e59fd2b854c3f751e75a329fad500)

4 years agoMLK-18152-1 dts: mx6sxsabresd: Update and add mx6sxsabresd DTS files
Ye Li [Tue, 3 Apr 2018 03:45:16 +0000 (20:45 -0700)]
MLK-18152-1 dts: mx6sxsabresd: Update and add mx6sxsabresd DTS files

Update i.MX6SX dtsi file and relevant DTS header files.
Add the imx6sx-sdb-emmc DTS file for reworked eMMC board.

Changes in DTS and DTSi:
1. Add spi0 and spi1 alias for qspi1 and qspi2.
2. Add USB alias for usb0 and usb1

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 9d8838cb1409c265db3dd0b64219e1286202c10d)
(cherry picked from commit deed82bb1d09d6163b3e69e04d723dc91563225b)
(cherry picked from commit 6891e8b4a31a18e561a29362bbb8b3a17594fe17)

4 years agoMLK-14418-8 imx: mx7dsabresd: add epdc support
Peng Fan [Tue, 7 Feb 2017 02:22:02 +0000 (10:22 +0800)]
MLK-14418-8 imx: mx7dsabresd: add epdc support

Add epdc support from v2019.04.
Add a epdc specified DTS file for using epdc

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit ab2f9e136f5da034a8335dc8ca276a54367132e8)
(cherry picked from commit ccfa28aec4093ac30a9b76d973f0288ab9c8f92c)
(cherry picked from commit 86f7a2c50aeb4d5c12f7159356ea782f48905b19)
(cherry picked from commit 77e171129baef32ec836f51afc18be89421d5512)

4 years agoMLK-18151-3 config: mx7dsabresd: Update defconfig to align with v2019.04
Ye Li [Wed, 31 Mar 2021 13:35:39 +0000 (06:35 -0700)]
MLK-18151-3 config: mx7dsabresd: Update defconfig to align with v2019.04

Update mx7dsabresd and qspi defconfigs, remove distro, and correct ENV device.
Add config files to support NAND boot.
Add config file for plugin.
Add config files for RevA board and RevB boards.
Remove the SYS_TEXT_BASE
Rename mx7dsabresd_qspi_defconfig to mx7dsabresd_qspi1_defconfig

Signed-off-by: Ye Li <ye.li@nxp.com>
4 years agoMLK-18151-2 mx7dsabresd: Update codes to align with v2020.04
Ye Li [Mon, 2 Apr 2018 08:33:43 +0000 (01:33 -0700)]
MLK-18151-2 mx7dsabresd: Update codes to align with v2020.04

1. Add plugin support
2. Update to latest ddr3 script v2.0 version
   refer commit (b4db09bc0fc96e7c7461afade6346e0700ad582f)
3. Add ddr3 script for TO1.1
5. Update header file for NAND boot settings.
6. Remove the wdog WCR bit 4 clear. Since we have implemented reset_cpu for mx7d.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 16e51b5b59700a49c48cdfd8b308aa8793eeb44a)
(cherry picked from commit 5a13c049e92536ba56924c934b1815e09a5fef59)
(cherry picked from commit 29fb4a6315dbc676c3dfca0e684301f85a679f34)

4 years agoMLK-18151-1 dts: mx7d: Update imx7d dts and binding files
Ye Li [Tue, 7 May 2019 05:35:22 +0000 (22:35 -0700)]
MLK-18151-1 dts: mx7d: Update imx7d dts and binding files

Porting the the imx7d dtsi, dts files and binding files from 5.4.y kernel
(359d8f37b464afea3718796fdd6eb27b0d2df8b1)

New dts files are added to support GPMI-WEIM, RevA boards.

Changes in DTS and DTSi:
1. Add USB alias
2. Modify the SPI alias for qspi
3. Disable USDHC2 since it is for SDIO
4. Add i2c force idle support pins
5. Add back mmc alias by comparing with 2019.04.
6. Update clock, pin and reset binding files
7. Update QSPI only support 1 bit mode, remove RX/TX 4 bit mode

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

4 years agoMLK-14418-12 imx: mx7dsabresd: Update LCD splash screen codes
Ye Li [Tue, 14 Apr 2020 03:29:46 +0000 (20:29 -0700)]
MLK-14418-12 imx: mx7dsabresd: Update LCD splash screen codes

Update LCD setup codes to use the parameters structure used for all
i.mx platforms, discard to use videmode environment variable.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 3b0609ca267baaf6a78bebaccc6896e6508d1844)
(cherry picked from commit e97965bbd8f9346d909cda433cafd04a750d9867)
(cherry picked from commit d8bcdcb95df9ed6661be589726bba66da26a1cdf)
(cherry picked from commit 07795520e74cfb85ab9112a5a6347290e0082d07)

4 years agoMLK-23574-30 mx7dsabresd: Support two ethernet ports
Ye Li [Fri, 10 Apr 2020 13:37:08 +0000 (06:37 -0700)]
MLK-23574-30 mx7dsabresd: Support two ethernet ports

Enable the fec2 port by enabling its DTS node and clocks.

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

4 years agoMLK-10647 armv7: Fix Dcache disable issue on i.MX7
Ye.Li [Mon, 13 Apr 2015 09:18:14 +0000 (17:18 +0800)]
MLK-10647 armv7: Fix Dcache disable issue on i.MX7

The issue on the i.MX7D is that, there is one cache-able memory access
between the L1 and L2 cache flush by calling the flush_dache_all->
v7_maint_dcache_all() [Flush L1 and L2 cache) which written in the C code.

L1-cache-flush            -> This will flush L1 cache to L2 cache in the end.
Cache-able memory access  -> This will have the chance cause the L1 line-fill
                             with dirty data from L2 cache(L1 cache-line dirty,
                             L2 clean)
L2-cache-flush            -> This will only flush L2 cache to L3, but still
                             some dirty data on the L1 cacheline.

After C & M bit clean,    -> The dirty data on the L1 cache line lost, which will
                             cause memory coherent issue if that dirty cache line
                             has some useful data

This patch should works fine on the i.MX6 and i.MX7.

The second cache flush have zero impact on the i.MX6, but this is really need for
the i.MX7D platform due to the L1 line-fill during the first dcache_flush.

And the second flush will not bring in the L1 dirty cache line due to the C bit is
clear now, which means the dcache is disabled.

Acked-by: Jason Liu<r64343@freescale.com>
Reviewed-by: Jason Liu<r64343@freescale.com>
Signed-off-by: Ye.Li <B37916@freescale.com>
(cherry picked from commit f5d5f07fba936c4bb05c887de9d72fb75b3dc0f2)
(cherry picked from commit 86c784cf4c4b633d37a76de7d47155c08f75dc82)
(cherry picked from commit d85cd484e6825631aa1ab572e5e0539f2191d795)
(cherry picked from commit 2b29c1873c2293abe1c4b361392521223b9c9ecf)
(cherry picked from commit 3eaf56494f3000f841531e8c219cf3dd9ca024f7)
(cherry picked from commit fd1ecbfba9ba0fb52a757a70a2fcbeb325508be2)
(cherry picked from commit 742cd01a7bbe3e355569be2d1d454f4f268390a9)
(cherry picked from commit 1d7765da8a8ae03fa36022c567cc03bf1eaa23f8)

4 years agoMLK-12425-6: mx7: add epdc qos settings
Peng Fan [Tue, 23 Feb 2016 02:12:20 +0000 (10:12 +0800)]
MLK-12425-6: mx7: add epdc qos settings

This EPDC/EPXP QoS setting is needed for EPDC stress test to pass.

Signed-off-by: Robby Cai <r63905@freescale.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 1b32518d1c27f05eb84a4cb93594710354b2e343)
(cherry picked from commit 8fd2dbe9097b09715f84e1c0c17dcd6a6351fb35)
(cherry picked from commit a92a02f984aa7871aa5bb1a83e0e3f444796fedd)
(cherry picked from commit 682b705b402827f6041839d92a717887a2a9649d)
(cherry picked from commit 4c50797b34115c2f40552329fb4901d588e6bef9)

4 years agoMLK-10774-2 HDMI: splash screen function enhancement
Peng Fan [Thu, 19 Mar 2015 02:10:07 +0000 (10:10 +0800)]
MLK-10774-2 HDMI: splash screen function enhancement

-Change HDMI video mode to VGA.
-Add pixel clock fraction part setting in IPU driver,
 fix video mode timing issue.
-Add overflow state clear workaround,
 fix kernel hang in HDMI driver issue.
-Correct IPU clock to 264MHz.

Signed-off-by: Sandor Yu <R01008@freescale.com>
Signed-off-by: Nitin Garg <nitin.garg@freescale.com>
Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 5028519b434d5dfbe53c48ac4b115ff8b69bbac7)
(cherry picked from commit 8dcbd43b971616fb67dc3b2af32e2d33f68ed0ce)
(cherry picked from commit 46b20bec72b53f10c1edf0bd8add5b356fbd7c42)
(cherry picked from commit 116691b2fbc7a1f579c1a384739c15aa59e3fa69)
(cherry picked from commit dee071872ea2681a1e824ad78fd7cbe04965febe)

4 years agoMLK-12527-1 mxc_keyb: Add MXC keyboard driver
Ye Li [Wed, 9 Mar 2016 12:59:43 +0000 (20:59 +0800)]
MLK-12527-1 mxc_keyb: Add MXC keyboard driver

The i.MX6SL EVK needs this driver in android fastboot support. Add
this driver to u-boot.

To use the driver, user must define:

CONFIG_MXC_KPD          Enable the driver
CONFIG_MXC_KEYMAPPING   Key mapping matrix
CONFIG_MXC_KPD_COLMAX   The column size of key mapping matrix
CONFIG_MXC_KPD_ROWMAX   The row size of the key mapping matrix

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 5096e572667ff41217deb4ba9b1bd15e93fa6b59)
(cherry picked from commit e84160eaf5c057da45a227039c6f8a7911f43a82)
(cherry picked from commit 7f8757016e97adeacba256bd0cb6ad8882f6a51e)
(cherry picked from commit 79f5e8a3cc9bb1460dd06fa4909ff200d147377c)
(cherry picked from commit d62830ee536b70d2ac75a6ac692c67ee151d65e2)

4 years agoMLK-14930-1 cmd: sata: Fix sata init and stop issue
Ye Li [Tue, 27 Mar 2018 07:56:19 +0000 (00:56 -0700)]
MLK-14930-1 cmd: sata: Fix sata init and stop issue

When sata stop is executed, the sata_curr_device is not reset to -1, so
any following sata commands will not initialize the sata again and cause
problem.

Additional, in sata init implementation, the sata_curr_device should be updated,
otherwise sata will be initialized again when doing other sata commands like
read/write/info/part/device.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 9bccfd01c618a5d059f332c000c42e5bf39880d9)
(cherry picked from commit f162bbb14b5c9b0c4073eee5ceeea6a9d1780394)
(cherry picked from commit 1707f011d5c79ae0f32b50ecf87f8aaed94944d0)

4 years agoENGR00315894-60 GPIO: Modify driver mxc_gpio to support RDC Semaphores
Ye.Li [Wed, 11 Jun 2014 08:21:29 +0000 (16:21 +0800)]
ENGR00315894-60 GPIO: Modify driver mxc_gpio to support RDC Semaphores

For GPIO group which shared by multiple masters, it may set in RDC
to shared and semaphore required. Before access the GPIO register,
the GPIO driver must get the RDC semaphore, and release the semaphore
after the GPIO register access.

When CONFIG_MXC_RDC is set, the features related to RDC semaphores
is enabled in mxc_gpio driver.

Signed-off-by: Ye.Li <B37916@freescale.com>
(cherry picked from commit 84d63e2e2ce12f714e88baad8b2325684614a7c1)
Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Conflicts:
drivers/gpio/mxc_gpio.c

(cherry picked from commit c9943b9c8a78bb2c9886bfe582e82978387d8dee)
Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
(cherry picked from commit faf94726cac8316c4342e19936f1e03ef283ace3)
(cherry picked from commit 6c0474fe0e4fc543c62b22c05c2702a881f56418)
(cherry picked from commit 7cd5fec7ce6a9ecfdaa1a9c1aaaa0d0ac18a4f86)
(cherry picked from commit 74d68c1b9f098c44992d591616372f0ec5ff13dd)
(cherry picked from commit 208c009aa15453349ee9272d62e2c1cebe14ecab)
(cherry picked from commit 59777a11b1e923f3222a34d243884efaf9cd59d6)

4 years agoMLK-12434-1: imx: dynamic setting mmcdev and mmcroot
Peng Fan [Tue, 23 Feb 2016 04:43:10 +0000 (12:43 +0800)]
MLK-12434-1: imx: dynamic setting mmcdev and mmcroot

Align to imx_v2015.04, dynamic setting mmcdev and mmcroot.
Then when boot linux, we can have correct "root=/dev/mmcblk[x]p2"

Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit b46b99a901eb194e81fc4836ee2259ad8857f4d3)
(cherry picked from commit 6f6a828fbe7478efd5932c302e6368877107bbca)
(cherry picked from commit bb628be4e993e98fb2fe8fc6af7b16e706d0f32d)
(cherry picked from commit 8e56914b4f536094bdf2301e347be02e0ccfee42)
(cherry picked from commit 3352f12289b3979a329486620711ecc2c2fb9fbd)

4 years agoENGR00315894-55 iMX6SX: add debug monitor support
Ye.Li [Wed, 11 Jun 2014 07:34:49 +0000 (15:34 +0800)]
ENGR00315894-55 iMX6SX: add debug monitor support

Debug monitor will print out last failed AXI access info when
system reboot is caused by AXI access failure, only works when
debug monitor is enabled.

Enable this module on i.MX6SX.

Signed-off-by: Anson Huang <b20788@freescale.com>
Signed-off-by: Ye.Li <B37916@freescale.com>
(cherry picked from commit df6ac8531d498021ed379c74fc1847bd2cec7179)
Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
(cherry picked from commit 4f4ecdbf6fe2673b8ad117df1a4974bdb7e6aa4a)
(cherry picked from commit e1c98a672e50fd0405686b74dad50680a75a8a9f)
(cherry picked from commit 5265a3052505fae2a212af292412a62b20a16f97)
(cherry picked from commit 9939631045b77617572a74283dd637d5c476cd53)
(cherry picked from commit f778852e518e2819470e7903ec10af9462b99f40)

4 years agoENGR00315894-81 gis: Add gis module
Ye.Li [Thu, 12 Jun 2014 11:47:27 +0000 (19:47 +0800)]
ENGR00315894-81 gis: Add gis module

Add gis module, current gis is support vadc input.
Add power down function to lcdif driver.

Signed-off-by: Sandor Yu <R01008@freescale.com>
Signed-off-by: Ye.Li <B37916@freescale.com>
(cherry picked from commit a007b00dd8ef9f773dfdebef0b1deb0990281793)
(cherry picked from commit a31dcdafb0963381e7213c59f79a340ef27ec2e2)
(cherry picked from commit 02dfe2e4af5f51d39a51542fb0e81f93faf505bc)
(cherry picked from commit a8e94954d8ccc44c41d77a5e356d6a99b3d45649)
(cherry picked from commit 0864a17afbc93fed72273c7d7d3be0fc8681e794)
(cherry picked from commit 20918f8e062111ca11bc9e3b82732145792c87c2)
(cherry picked from commit eb335355b9563c74ef0f54259439e6f2b57a3167)

4 years agoENGR00315894-80 pxp: Add pxp module
Ye.Li [Thu, 12 Jun 2014 11:40:53 +0000 (19:40 +0800)]
ENGR00315894-80 pxp: Add pxp module

Add pxp module.
Support csc between YUV444 and RGB888 and scaling.

Signed-off-by: Sandor Yu <R01008@freescale.com>
Signed-off-by: Ye.Li <B37916@freescale.com>
(cherry picked from commit 4c6e1f9ed1b2f5c98a34502b44b6414593fdd290)
Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
(cherry picked from commit 92295fafcdbaa3a3fe0a63ede15f896dfc9ce0b0)
(cherry picked from commit 096a63e81a8c78b3f8bbc65a9d418aa032d62231)
(cherry picked from commit b24cce0ad3ec9f386ca7aa231d8a2db33462f092)
(cherry picked from commit 40c2e2c2160ac23f89a682c965ebea6488b8bffc)
(cherry picked from commit 89bf4fac9052bf5d140a53670535285a8ca0a422)
(cherry picked from commit 6e12809eefe0e0ae0ff0b62d827b8c0dbae025f1)

4 years agoENGR00315894-79 csi: Add csi module
Ye.Li [Thu, 12 Jun 2014 11:39:16 +0000 (19:39 +0800)]
ENGR00315894-79 csi: Add csi module

Add csi module.

Signed-off-by: Sandor Yu <R01008@freescale.com>
Signed-off-by: Ye.Li <B37916@freescale.com>
(cherry picked from commit 854ae26758ec8132ef749b98645dd2f43b84e5e2)
Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
(cherry picked from commit 5f133bd9420109951fd03bd5168801327e929c3b)
(cherry picked from commit 16960e59fa3334162d2e2212ee4bc1e7f0c420a3)
(cherry picked from commit bc0639ed8f5069f198067916caf088908492329d)
(cherry picked from commit c7232ae1c27ef561d2235bb4db837ef9805f86d2)
(cherry picked from commit 039bb76082a16b0e43e818a4d9df68ab4320ede5)
(cherry picked from commit 4048b2cc1932a51f7f8c32ddf21bcf5ebd885a4f)
(cherry picked from commit 15b0a54151915acfd780b8ec3d3aba9f25b7408e)

4 years agoENGR00315894-78 vadc: Add vadc module
Ye.Li [Thu, 12 Jun 2014 11:37:19 +0000 (19:37 +0800)]
ENGR00315894-78 vadc: Add vadc module

Add vadc module.
Both PAL and NTSC mode can work.

Signed-off-by: Sandor Yu <R01008@freescale.com>
Signed-off-by: Ye.Li <B37916@freescale.com>
(cherry picked from commit 03c31ae30c1e81c99f6824221e4801433445e04a)
Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
(cherry picked from commit b5d776ffc1519c16091736445b3217ffb7fcd7db)
(cherry picked from commit 2377eb9fd299b76888f11faf76383b68e77bcc8a)
(cherry picked from commit 808d447235bd0f9134c7d00fa480cd55b4e0426e)
(cherry picked from commit 99977a1152981247a84252dba1d1cf55c0406b08)
(cherry picked from commit ed0e7a8081c1a0447c0df72d36937a0a0c5c8a49)
(cherry picked from commit 1133ea58a5460b4464c3bbf7f6fdc3086867e3e6)

4 years agoENGR00315894-77 mx6: soc: Add vadc power up/down function
Ye Li [Mon, 26 Mar 2018 08:56:39 +0000 (01:56 -0700)]
ENGR00315894-77 mx6: soc: Add vadc power up/down function

Add vadc power up/down function.
When gis enable in uboot, the CSI0 input mux select setting
to vadc module, clean the bit when gis disabled

Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Sandor Yu <R01008@freescale.com>
Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
(cherry picked from commit e0cfa889531d0a2587fb1fc607fffcc9599a2f4e)
(cherry picked from commit 4b8609acf781dab90c6916dea4e74d5ffcd017b3)
(cherry picked from commit 9df6744d8104651801778a023455d0fae939c786)

4 years agoENGR00315894-76 mx6 clock: Add vadc clock enable function
Ye.Li [Thu, 12 Jun 2014 11:33:05 +0000 (19:33 +0800)]
ENGR00315894-76 mx6 clock: Add vadc clock enable function

Add vadc clock enable function.

Signed-off-by: Sandor Yu <R01008@freescale.com>
Signed-off-by: Ye.Li <B37916@freescale.com>
(cherry picked from commit 721c7a1448c5b7265b597b83d18f8338a27ea213)
Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
(cherry picked from commit 903a59ef941f39b6d7f693dd7c60528e166de079)
(cherry picked from commit dc767fb7d5c155f2a6ef01c4dee808b9c1944fc2)
(cherry picked from commit 0a48932f375a969e6f7e72d171522146981b2135)
(cherry picked from commit b6f962db57c988c31d35e204f638ba3b0c53eb4a)
(cherry picked from commit b28c20cc8d9032a0521274f6bc21d4da414a8a37)
(cherry picked from commit 909929b5b8a6ae7d7f8d8b12e60e0882634550c8)

4 years agoMLK-18147-3 mx6sabreauto/sabresd: Port defconfigs from v2020.04
Ye Li [Mon, 26 Mar 2018 05:23:41 +0000 (22:23 -0700)]
MLK-18147-3 mx6sabreauto/sabresd: Port defconfigs from v2020.04

Add defconfigs to support various boot devices and platforms
for MX6DQ/DQP/DL/S sabreauto and sabresd boards.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit d88863b467d2aebc802d634dcc96060f5af45414)
(cherry picked from commit 1a3fe19c2cf1b2147813c14b177f3d99d39f4b70)
(cherry picked from commit 68dfe74093ffc25e5e042796f3e54af9d4dacc0f)

4 years agoMLK-12425-2 video: epdc: introduce epdc support
Peng Fan [Tue, 23 Feb 2016 02:14:34 +0000 (10:14 +0800)]
MLK-12425-2 video: epdc: introduce epdc support

Support EPDC.
E-Ink feature is supported by i.MX6DL/SL/SLL/ULL and i.MX7D.

This driver supports user defined logo file, if there is no logo file, it will
draw a black border around a white screen.

If need to enable EPDC, a waveform file is required to let all
work.

Since we need LCD_MONOCHROME mode for EPDC, we introduce LCD_MONOCHROME
support.

Please refer to Linux Reference Manual for how to flash WAVEFORM file.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Robby Cai <R63905@freescale.com>
Signed-off-by: Nitin Garg <nitin.garg@freescale.com>
Signed-off-by: Ye.Li <B37916@freescale.com>
(cherry picked from commit a7244f279cc3c3994bcd103f5e9a183b1075ae71)
(cherry picked from commit 21bf1c38b7d75c31875fb02a972c458f25d9c33a)
(cherry picked from commit 237742f73998b35dd896592e19f1e119e72baa71)
(cherry picked from commit 3e788604343274e806510261aea407a9d916755b)

4 years agoMLK-18147-2 mx6sabreauto/sabresd: Update mx6dq/dqp/dl/s sabre boards codes
Ye Li [Mon, 26 Mar 2018 03:42:07 +0000 (20:42 -0700)]
MLK-18147-2 mx6sabreauto/sabresd: Update mx6dq/dqp/dl/s sabre boards codes

Porting the mx6dq/dqp/dl/s sabresd and sabreauto codes from v2018.03
The major change is moving back to non-SPL mode for sabre boards.
which means all old things like DCD, plugin are added back for each
platform. This inherits the way used in v2018.03

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 3a3a0f07c85b0ae86b18709445206db0310c3b63)
(cherry picked from commit 90b86014f70f44db3b18e96b2643a57a0a6f92a3)
(cherry picked from commit 2660660f213e117c3445ba6f18e78d44df1683bc)

4 years agoMLK-18147-1 arm: dts: mx6dq/dqp/dl/s: Porting DTS and binding files from v2019.04
Ye Li [Fri, 23 Mar 2018 09:43:06 +0000 (02:43 -0700)]
MLK-18147-1 arm: dts: mx6dq/dqp/dl/s: Porting DTS and binding files from v2019.04

Port the DTS and relevent binding files from v2019.04 for i.MX6DQ/DQP/DL/S
Sabreauto and SabreSD boards.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit bedc2a2223746a8059b80518ec094077c0d4c44d)
(cherry picked from commit 800a1c47f135321f4063e1efccdf244f6edb0500)
(cherry picked from commit e89adf4a3810c0c513cc9040d18380b9f6b6a915)

4 years agoMLK-18143 mx6: Add CONFIG_MX6QP kconfig
Ye Li [Fri, 23 Mar 2018 08:59:21 +0000 (01:59 -0700)]
MLK-18143 mx6: Add CONFIG_MX6QP kconfig

Since i.MX6QP is a variant of i.MX6Q, have to add CONFIG_MX6QP
with CONFIG_MX6Q in the soc codes for ddr/pin/clock/plugin

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit a56c1d98d8d56a34ca1226e15fe05b75cd9b3686)
(cherry picked from commit 1fa581642ec8def3fd378b29f8d9b6527358dfe9)
(cherry picked from commit cad8787ee3a37a644e6c981e6b8c9d9748a212de)

4 years agoMLK-18146-4 mx6: Update mx6 common head file
Ye Li [Fri, 23 Mar 2018 09:46:41 +0000 (02:46 -0700)]
MLK-18146-4 mx6: Update mx6 common head file

Align the common head file with v2020.04, since some configurations
have been moved to Kconfig, so don't need them in mx6_common.h now.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 183c12aeec8faae933f3222c40d333f1fc6ef89a)
(cherry picked from commit 6fdf38a42f3dd3e623d46cb8a5f750ad83fd2720)
(cherry picked from commit e37ed29ece6593f032d0333b229ca5f70bb2269f)

4 years agoMLK-18146-3 mx6: Update pads definition files
Ye Li [Mon, 26 Mar 2018 07:53:34 +0000 (00:53 -0700)]
MLK-18146-3 mx6: Update pads definition files

Update the pins.h for i.MX6SL/UL/ULL to align with v2017.03

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 86c6ba24e56e32ad9942b14fe8565651f9a4c3c6)
(cherry picked from commit c3f9a3036f5e2ddebf2fdd3a1b423bf09dfa1a26)
(cherry picked from commit 3bea36bb5b570847ba065fb2da1d53a62d35a31c)

4 years agoMLK-18146-2 mx6: Update registers mapping file
Ye Li [Mon, 26 Mar 2018 07:52:17 +0000 (00:52 -0700)]
MLK-18146-2 mx6: Update registers mapping file

Update the CCM and AIPS registers mapping files to align with v2017.03

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 4479d29d344c89fe3f0ba73934e72bc6099b6eaf)
(cherry picked from commit 079cfb35c0a898d0cb3f6441c5dc41e06edb6525)
(cherry picked from commit 170a48574588ddcf475811182dc697938da63454)

4 years agoMLK-18146-1 mx6: Align SOC level codes with v2020.04
Ye Li [Fri, 23 Mar 2018 09:37:28 +0000 (02:37 -0700)]
MLK-18146-1 mx6: Align SOC level codes with v2020.04

Update codes for i.MX6 soc and clock settings to align with v2020.04

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 82ecba47271848a339a53eef7e770526bc3b3967)
(cherry picked from commit fa452a1fa374f5a26ed8c178c8c1fb3e383962e5)
(cherry picked from commit d745866a43c0a69e4132c23a29106bfba6a32c9a)

4 years agoENGR00325255 pcie:enable pcie support on imx6sx sd
Ye Li [Fri, 11 Mar 2016 09:28:00 +0000 (17:28 +0800)]
ENGR00325255 pcie:enable pcie support on imx6sx sd

Enable pcie support in uboot on imx6sx sd boards
- enable_pcie_clock should be call before ssp_en is set,
  since that ssp_en control the phy_ref clk gate, turn on
  it after the source of the pcie clks are stable.
- add debug info
- add rx_eq of gpr12 on imx6sx
- there are random link down issue on imx6sx. It's
  pcie ep reset issue.
  solution:reset ep, then retry link can fix it.

(cherry picked from commit ec78595a24b5ff1020baa97b6d6e79a3a3326307)
Signed-off-by: Richard Zhu <r65037@freescale.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 81fd30250110d72992758f08b66c07306126892b)
(cherry picked from commit 4226ce46f24e176dcfc20aea1af0713b4b425655)
(cherry picked from commit 3e1a0a7f37d749d5e36e27ad46e8c8db12a865be)
(cherry picked from commit fa4b46f0f55a19c3cab762e2fdbb01e359c9040b)

4 years agoENGR00319415 pcie: random link down issue after warm-rst
Richard Zhu [Tue, 24 Jun 2014 01:59:47 +0000 (09:59 +0800)]
ENGR00319415 pcie: random link down issue after warm-rst

There are about 0.02% percentage on some imx6q/dl/solo
hw boards, random pcie link down when warm-reset is used.
Make sure to clear the ref_ssp_en bit16 of gpr1 before
warm-rst, and set ref_ssp_en after the pcie clks are
stable to workaround it.

imx6sl doesn't have the pcie module, mask the pcie
related codes from imx6sl.

rootcause:
* gpr regisers wouldn't be reset by warm-rst, while the
ref_ssp_en is required to be reset by pcie.
(work-around in u-boot)
* ref_ssp_en should be set after pcie clks are stable.
(work-around in kernel)

Signed-off-by: Richard Zhu <r65037@freescale.com>
(cherry picked from commit 5cc825b12c6b86a22f1a6a0535b52cf3ee142e77)
Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
(cherry picked from commit 6193cf4e3384a59e29546d13a67657f7faeafc9e)
(cherry picked from commit 7b4aabeddffabca46d7d6e7ef2611de468a6b4f7)
(cherry picked from commit a117fc7b2b8d930fd7a47b168c4638365cb3a475)
(cherry picked from commit d94a5b283afd2786428f514b0db4a6eaa5bcccff)
(cherry picked from commit 9ee86b956916432e0a27afc31d29933705d4a675)

4 years agoMLK-12534 mx6: shutdown vddpu and PCIE phy to save power
Ye Li [Fri, 11 Mar 2016 07:44:01 +0000 (15:44 +0800)]
MLK-12534 mx6: shutdown vddpu and PCIE phy to save power

Shutdown VDDPU and PCIE phy to save power.

For PCIE, the i.MX6SL and i.MX6UL does not have this module,
so don't need it.

For VDDPU, the i.MX6UL does not have GPU, does not need it. And on
i.MX6QP there is narrow window that PRE driver is ready but GPU driver probe later,
and the later GPU driver turn on PU may cause 'PRE hang' issue. To simplify
thing, do not turn off PU in u-boot.

Reference:
commit: 6b0787b726e2ff32210d742d93ecd3f4bb2ae402
commit: 4bd0032c0eba50fa0caf43f50f735a3cfbe36a8d

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 5c96ea91fe89c67991c929c9b39ffaa940d28391)
(cherry picked from commit 6a5442b41ef400edd0b332962a3450e909b85df5)
(cherry picked from commit 2d7e33530f9bea23c7d09e5b6ae27b0e17f0aa94)
(cherry picked from commit 9043e88a78d303091788952c2e1d35fe9544625e)
(cherry picked from commit 20b75bb074792d55f4fa556425d30871ef5095aa)

4 years agoMLK-18145 imx: Fix wrong pad name prefix
Ye Li [Fri, 23 Mar 2018 09:24:09 +0000 (02:24 -0700)]
MLK-18145 imx: Fix wrong pad name prefix

The pads name bind with CONFIG_MX6Q and CONFIG_6DL should start with MX6_PAD
not MX6Q_PAD and MX6DL_PAD. Otherwise we will get build break.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit be7aa84842d9cb4e94f50ff798b6e54712ece89a)
(cherry picked from commit fb8149b20d51381c34877c951cc38a1cc185b5da)
(cherry picked from commit 1e86d97adcab78622c95bdbdef06dcc30dd09d7c)

4 years agoMLK-10958 imx: mx6ul support Bus Encryption Engine
Ye Li [Fri, 23 Mar 2018 08:14:13 +0000 (01:14 -0700)]
MLK-10958 imx: mx6ul support Bus Encryption Engine

This patch is to support Bus Encryption Engine(BEE) for i.MX 6UL.
Supported feature:
1. SNVS key and soft key
2. CTR and ECB mode
3. Specify address region to bee.

Two commands are included:
bee init [key] [mode] [start] [end] - BEE block initial
    "Example: bee init 1 1 0x80000000 0x80010000\n"
bee test [region]
    "Example: bee test 1\n"

Mapping:
[0x10000000 - (0x10000000 + size - 1)] : [start - (start + size - 1)]
[0x30000000 - (0x30000000 + IRAM_SIZE - 1)] : [IRAM_BASE_ADDR -
(IRAM_BASE_ADDR + IRAM_SIZE - 1)]

Whatever start is, start - (start + size -1) will be fixed mapping to
0x10000000 - (0x10000000 + size - 1)

Since default AES region's protected size is SZ_512M, so
on mx6ul evk board, you can not simply run 'bee init', it will
overlap with uboot execution environment, you can use
'bee init 0 0 0x80000000 0x81000000'.

If want to use bee, Need to define CONFIG_CMD_BEE in board configuration
header file, since CONFIG_CMD_BEE default is not enabled.

This patch also checks fuse bit 25 of bank 0 word 4 before initialize bee.
The bit: 0 means bee enabled, 1 means bee disabled.

Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 9d592121bebbdb9ded0009a2703c7cab01edfa70)
(cherry picked from commit cd03ba8327d46178900a63310d5ef3edd8034350)
(cherry picked from commit 6c8ed4a65e73747f38d2e16e8a2b8cb0c7cce4af)

4 years agoMLK-12495 mx6: Add LDO bypass support to i.MX6 SOC
Ye Li [Fri, 23 Mar 2018 07:53:44 +0000 (00:53 -0700)]
MLK-12495 mx6: Add LDO bypass support to i.MX6 SOC

Port LDO bypass SOC codes from v2017 to support the features:

1. Add check for 1.2GHz core speed. If Speed grading fuse is for 1.2GHz,
   enable LDO bypass and setup PMIC voltages. LDO bypass is dependent
   on the flatten device tree file.

2. We set WDOG_B in set_anatop_bypass() before, because it is the only case, but now
   on i.mx6sabreauto board, we didn't use ldo-bypass mode, but have to use WDOG_B to
   reboot whole board, so split these code to independent function so that board file
   can call it freely.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 6bceaf009718cec856e11106d26e13601631fa4f)
(cherry picked from commit 0e2de4c2d5d2c79e485d164394f03065743ba2c4)
(cherry picked from commit 4160d7362893873d04b8a2d618ad6ff84c411da4)

4 years agoMLK-18142 imx: timer: Modify GPT timer driver for mx7
Ye Li [Fri, 23 Mar 2018 06:45:26 +0000 (23:45 -0700)]
MLK-18142 imx: timer: Modify GPT timer driver for mx7

Modify the GPT common platform driver for mx7 which only use 24Mhz
OSC as clock source.

Note: at default, the mx7d will use system counter as timer. The GPT
is disabled.

Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
(cherry picked from commit ff8902ab14705935a30f318db8d1c71ce3cc40dc)
(cherry picked from commit c3fa80efdb8680b4b35bc5b3607c148c3c48732b)
(cherry picked from commit 62625f0c8a2e90259488166ee8d8ddcf0ca4e9ae)

4 years agoMLK-18141-2 env: Kconfig: Add ENV_IS_IN_SATA config
Ye Li [Fri, 23 Mar 2018 06:23:44 +0000 (23:23 -0700)]
MLK-18141-2 env: Kconfig: Add ENV_IS_IN_SATA config

The ENV_IS_IN_SATA config is missed, add it into env/Kconfig, that
we can enable it for SATA boot.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 75b6d78fbb2ed29039852f9e652f9acd80bf7eaa)
(cherry picked from commit 338f20a1804a21ae11b70b83bd820e0e7e399a1d)
(cherry picked from commit 051d3f53a92f89cc09884ead8cbb1454512bf464)

4 years agoMLK-18141-1 env: sata: Fix build warning and break
Ye Li [Fri, 23 Mar 2018 06:21:48 +0000 (23:21 -0700)]
MLK-18141-1 env: sata: Fix build warning and break

Fix below build warning and errors:
env/sata.c: In function â€˜env_sata_save’:
env/sata.c:59:9: warning: implicit declaration of function â€˜sata_get_dev’ [-Wimplicit-function-declaration]
  sata = sata_get_dev(env_sata);
         ^~~~~~~~~~~~
env/sata.c:59:7: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
  sata = sata_get_dev(env_sata);
       ^
env/sata.c: In function â€˜env_sata_load’:
env/sata.c:101:10: warning: â€˜return’ with a value, in function returning void
   return -EIO;
          ^
env/sata.c:94:13: note: declared here
 static void env_sata_load(void)
             ^~~~~~~~~~~~~
env/sata.c:105:7: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
  sata = sata_get_dev(env_sata);
       ^
env/sata.c:108:10: warning: â€˜return’ with a value, in function returning void
   return -EIO;
          ^
env/sata.c:94:13: note: declared here
 static void env_sata_load(void)
             ^~~~~~~~~~~~~
env/sata.c:113:10: warning: â€˜return’ with a value, in function returning void
   return -EIO;
          ^
env/sata.c:94:13: note: declared here
 static void env_sata_load(void)
             ^~~~~~~~~~~~~
env/sata.c:116:9: warning: â€˜return’ with a value, in function returning void
  return env_import(buf, 1);
         ^~~~~~~~~~~~~~~~~~
env/sata.c:94:13: note: declared here
 static void env_sata_load(void)
             ^~~~~~~~~~~~~
env/sata.c: At top level:
env/sata.c:120:14: error: â€˜ENVL_ESATA’ undeclared here (not in a function)
  .location = ENVL_ESATA,
              ^~~~~~~~~~
env/sata.c:122:11: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
  .load  = env_sata_load,

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

4 years agoENGR00328312 i2c: imx: Optimize the i2c device recovery solution
Ye Li [Fri, 23 Mar 2018 03:59:35 +0000 (20:59 -0700)]
ENGR00328312 i2c: imx: Optimize the i2c device recovery solution

From i2c spec, if device pull down the SDA line that causes
i2c bus dead, host can send out 9 clock to let device release
SDA.

But for some special device like pfuze100, it pull down SDA line
and the solution cannot take effort.

The patch just add NACK and STOP signal after 8 dummy clock, and pmic
can release SDA line after the recovery. Test case catch 375 times of
i2c hang, and all are recovered.

Signed-off-by: Fugang Duan <B38611@freescale.com>
Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 6220bb6fb43aa485a10f96fb6ade864b3371e4ca)
(cherry picked from commit 8353e27b8e9022623618afc77919c74b606f0ccb)
(cherry picked from commit 8c14a4352d2b75b5ea2fdd3e504789eeea0acd51)

4 years agoMLK-19790 imx: caam: new u-boot command to set PRIBLOB bitfield from CAAM SCFGR regis...
Clement Le Marquis [Thu, 20 Sep 2018 01:07:10 +0000 (03:07 +0200)]
MLK-19790 imx: caam: new u-boot command to set PRIBLOB bitfield from CAAM SCFGR register to 0x3

It is highly recommended to set the PRIBLOB bitfield to 0x3 once your
encrypted boot image has booted up, this prevents the generation of new
blobs that can be used to decrypt an encrypted boot image. The PRIBLOB is
a sticky type bit and cannot be changed until the next power on reset.

Add the set_priblob_bitfield U-Boot command to prevent the generation of
new blobs.

Signed-off-by: Clement Le Marquis <clement.lemarquis@nxp.com>
Acked-by: Ye Li <Ye.Li@nxp.com>
(cherry picked from commit 69cca568b85f36a77ef6ef31538f69366d238845)
(cherry picked from commit e8f813a6b66961759916e65b8c18ec43fd36a7c3)
(cherry picked from commit 55552a26af9a3d94cd19d30c12efcdc1f373d88b)

4 years agoMLK-21420 crypto: fsl: blob: Flush dcache range for destination address
Breno Lima [Tue, 9 Apr 2019 02:48:11 +0000 (23:48 -0300)]
MLK-21420 crypto: fsl: blob: Flush dcache range for destination address

The blob command is not working on i.MX7D, i.MX8MQ and i.MX8MM
devices.

Due to different cache management it's necessary to flush dcache
range for destination address so data can be available in memory.

Add necessary operations in blob_encap() and blob_decap() functions.

Signed-off-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 639e5c15816c3eea0d4904a72ad175627be043d8)
(cherry picked from commit ec828953801ee64c4def8133fd5b3d199a65bc92)
(cherry picked from commit 92c0340211b3723dbe3bf7450be7ccb996005358)

4 years agoMLK-21291 imx8mm: evk: not restrict uart4 when enabling jailhouse
Peng Fan [Fri, 29 Mar 2019 08:55:39 +0000 (16:55 +0800)]
MLK-21291 imx8mm: evk: not restrict uart4 when enabling jailhouse

When booting dual linux with jailhouse, inmate linux will use
the 2nd uart, so not restrict access the uart for jailhouse case.

The best solution would be using SIP call to ATF, for simplicity,
directly modify the RDC register.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit b22b70ff0b5bbacea7383bde9e8893bb504199c3)
(cherry picked from commit e5768d04b57599ef8d5fcb4664d87b7c3ba50feb)
(cherry picked from commit 0a7bb85d05f567274d54b4aaf6d061b0b1c03b33)
(cherry picked from commit fb97a542a5c74cb57ca9dcc10c960fde4f4bc209)

4 years agoMLK-20893: imx: in_le32 out_le32 preprocessor casting issue with addresses involving...
Utkarsh Gupta [Mon, 25 Feb 2019 18:00:23 +0000 (12:00 -0600)]
MLK-20893: imx: in_le32 out_le32 preprocessor casting issue with addresses involving math

The sec_in32 preprocessor is defined as follows in include/fsl_sec.h file:
When address "a" is calculated using math for ex: addition of base address and an offset, then casting is applied only to the first address which in this example is base address.

caam_ccbvid_reg = sec_in32(CONFIG_SYS_FSL_SEC_ADDR + CAAM_CCBVID_OFFSET)
resolves to:
caam_ccbvid_reg = in_le32((ulong *)(ulong)CONFIG_SYS_FSL_SEC_ADDR + CAAM_CCBVID_OFFSET)
instead it should resolve to:
caam_ccbvid_reg = in_le32((ulong *)(ulong)(CONFIG_SYS_FSL_SEC_ADDR + CAAM_CCBVID_OFFSET))

Thus add parenthesis around the address "a" so that however the address is calculated, the casting is applied to the final calculated address.

Bug introduced by commit 79e90af14af3 ("MLK-18044-2: crypto: caam: Fix build warnings pointer casting").

Signed-off-by: Utkarsh Gupta <utkarsh.gupta@nxp.com>
Reviewed-by: Horia Geanta <horia.geanta@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 5d10d1cab052f8af4fd00640e09642aa0a596922)
(cherry picked from commit 0dfa4efe7ce53042c48fb21ba1060045238b5ccb)

4 years agoMLK-15286 arm: arm64: only use general regs
Peng Fan [Mon, 26 Jun 2017 12:18:10 +0000 (20:18 +0800)]
MLK-15286 arm: arm64: only use general regs

When compiling with android toolchain, there is an instruction
"str     q0, [x8],#16", but x8 is not 16bytes aligned,
this instruction will trigger sync abort.

So, following Linux kernel, only use general regs option to IMX8 and
IMX8M aarch64 only.
If not, compiler may use simd registers Q[x]. We need to avoid
using simd registers in U-Boot, because load/store Q[x] has
restriction that 128bits aligned when str/ldr.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 186ccd8de53f986c5913432638dfaca9bdc97e89)
(cherry picked from commit 8f3f0d339783e066f7815408949677b62e465b62)
(cherry picked from commit 3002af0ff57e9db40baeefbc14a336ad206e8fea)
(cherry picked from commit ad1f02f687e208a32d89d6f7b16802da115cf27e)

4 years agoMLK-21848-5 fsl_esdhc: fix problem when using clk driver
Ye Li [Fri, 26 Apr 2019 01:39:12 +0000 (18:39 -0700)]
MLK-21848-5 fsl_esdhc: fix problem when using clk driver

Should use CONFIG_IS_ENABLED not IS_ENABLED for CLK driver, so it will
check the CONFIG_SPL_CLK when building SPL

Move init_clk_usdhc to non-clk driver case, since assigned-clocks properties
will initialize the clocks by clk driver.

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

4 years agoRevert "sdp: call board_usb_init at spl_sdp_load_image"
Ye Li [Thu, 11 Mar 2021 06:12:15 +0000 (22:12 -0800)]
Revert "sdp: call board_usb_init at spl_sdp_load_image"

This reverts commit 0ced2faba08a9faf0ac1cbeb2a320faa635651d9.
It is already applied from history, and re-apply causes problem
after switching to DM

Signed-off-by: Ye Li <ye.li@nxp.com>
4 years agoMLK-20414 imx8m: jailhouse: loadimage before mmcboot
Peng Fan [Tue, 20 Nov 2018 02:04:16 +0000 (10:04 +0800)]
MLK-20414 imx8m: jailhouse: loadimage before mmcboot

Need loadimage before execute mmcboot.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 016bb84267ff3882228ffbde64c2c670be7a8f16)
(cherry picked from commit b3b1b44f6eea2d811f6bbb2d398997513c43775a)
(cherry picked from commit 8272cbb15eec2401b7292afc07f2952574ff8467)

4 years agoMLK-19053: crypto: caam: RNG4 TRNG errata
Aymen Sghaier [Thu, 13 Sep 2018 16:19:13 +0000 (18:19 +0200)]
MLK-19053: crypto: caam: RNG4 TRNG errata

  The TRNG as used in RNG4, used in CAAM has a documentation issue. The
 effect is that it is possible that the entropy used to instantiate the
 DRBG may be old entropy, rather than newly generated entropy. There is
 proper programming guidance, but it is not in the documentation.

Signed-off-by: Aymen Sghaier <aymen.sghaier@nxp.com>
(cherry picked from commit 2aff5ffb2c4bb19106f3faa76415b51591cbc2b2)
(cherry picked from commit 051a93febddac7e6fac557b0409203cfefb45b65)
(cherry picked from commit 68cea9fd1df97f2dd48dae0c891325a444458f94)

4 years agoMLK-19131 configs: imx8mm_evk: add jailhouse boot command
Peng Fan [Mon, 6 Aug 2018 09:47:22 +0000 (17:47 +0800)]
MLK-19131 configs: imx8mm_evk: add jailhouse boot command

Add jailhouse env. Currently need to pass clk_ignore_unused to bootargs
to avoid linux root cell shutdown clocks used by inmates.

If only want a minimal clk being on in inmates, the clks could
be added in clk_inits_on in linux kernel drivers/clk/imx/clk-imx8mm.c
or use init-on-array under clk node.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 7732b3b87423069c1c31d25ec07201098062b717)
(cherry picked from commit 718b0792dfedcf68b6c2e93d3eefe499ec463433)
(cherry picked from commit d18597669c701aebbf0a29c22f68a2347ea4eaf2)
(cherry picked from commit db588bf76ba47ebf872c36efa46dc64443eb657a)

4 years agoMLK-18793 imx8mq: config: add jailhouse env
Peng Fan [Fri, 6 Jul 2018 06:07:02 +0000 (14:07 +0800)]
MLK-18793 imx8mq: config: add jailhouse env

Add jailhouse env. Currently need to pass clk_ignore_unused to bootargs
to avoid linux root cell shutdown clocks used by inmates.

If only want a minimal clk being on in inmates, the clks could
be added in clk_inits_on in linux kernel drivers/clk/imx/clk-imx8mq.c

Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 0d33db00e96e7addb6910a7097a62222ff75480f)
(cherry picked from commit 56ea0d9280b22ce3e260851e88782cb877fad6ec)
(cherry picked from commit a0371a771d102b3f90e043056ecdf477cd31ec20)
(cherry picked from commit b0790eaf28814d484c12c1b971a1518179fbb83a)

4 years agoMLK-18703: crypto: caam: Fix typo for caam blob commands
Aymen Sghaier [Wed, 11 Jul 2018 16:23:18 +0000 (18:23 +0200)]
MLK-18703: crypto: caam: Fix typo for caam blob commands

 This fix a wrong trace error while executing caam genlob command.

Signed-off-by: Aymen Sghaier <aymen.sghaier@nxp.com>
(cherry picked from commit 7b80598100baf38562bee10bb4a19c3c834b945b)
(cherry picked from commit 878d0d145482683bd7d3b89f3cbd74878b5d1064)
(cherry picked from commit 8877fda60d47cd1444f480a3486234ad76a547bb)

4 years agoMLK-18703: crypto: caam: Add TRNG init function call
Aymen Sghaier [Tue, 3 Jul 2018 08:14:37 +0000 (10:14 +0200)]
MLK-18703: crypto: caam: Add TRNG init function call

 Call the TRNG init function at the end of arch_cpu_init()
 Concerned SoCs are: i.MX6, i.MX7 and i.MX8M

Signed-off-by: Aymen Sghaier <aymen.sghaier@nxp.com>
(cherry picked from commit 996329904c0304a7bfbc6cda8287ab93de77870d)
(cherry picked from commit 5dd4441081f2af6f198a4d43eb1a3e543d986306)
(cherry picked from commit 6427f23dce038ddd995b41ef2300c6d6131ea9a2)

4 years agoMLK-18703: crypto: caam: Add init TRNG into SPL or U-Boot
Aymen Sghaier [Tue, 24 Apr 2018 16:36:02 +0000 (18:36 +0200)]
MLK-18703: crypto: caam: Add init TRNG into SPL or U-Boot

 The following reasons lead to instantiate the TRNG into U-Boot/SPL:

 - On some i.MX platforms Linux Kernel could not instantiate RNG
 - RNG could be used/needed by M4/M0 cores before Kernel stage
 - Having the RNG instantiation implemented only once for
   almost i.MX platforms

Signed-off-by: Aymen Sghaier <aymen.sghaier@nxp.com>
(cherry picked from commit 1f4134c85f6416cbdadaf5f4ff6321f6c685c74c)
(cherry picked from commit 20bd91de9f4b305adb15dda3a09fd9958557a82b)
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 1d7bbf924f59bb6e7401890b936c501b13222fdc)

4 years agoMLK-18591-2 crypto: caam: Add fsl caam driver
Ye Li [Wed, 6 Jun 2018 10:29:16 +0000 (03:29 -0700)]
MLK-18591-2 crypto: caam: Add fsl caam driver

Add the fsl CAAM driver and new commands to implement DEK blob operations,
like "caam genblob" to generate encrypted blob and "caam decap" to output
orignal plain data.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 4ec81a0b075d8d853ac696172660a7771064405d)
(cherry picked from commit fcd29e9dd2e13e4650741603ca1bfb40fe1a9ede)
(cherry picked from commit b5d2da34ea3bf377ae169378e56eb45480e80bdc)

4 years agoMLK-21846-2 imx8mq_evk: Enable USB SDP in SPL
Ye Li [Mon, 22 Apr 2019 04:06:13 +0000 (21:06 -0700)]
MLK-21846-2 imx8mq_evk: Enable USB SDP in SPL

Enable the SPL SDP driver and SPL gadget drivers on iMX8MQ EVK board.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 957fd8c849142802c4f0b9479be607c8c5ed1f7a)
(cherry picked from commit 69015a4b7fe719260929d4aca32da45addba0efe)

4 years agoMLK-18822 imx: Fix bootaux issue when running on ARM64
Ye Li [Wed, 11 Jul 2018 08:41:24 +0000 (01:41 -0700)]
MLK-18822 imx: Fix bootaux issue when running on ARM64

The bootaux from community uses ulong to read private data and write to M4 TCM,
this cause problem on ARM64 platform where the ulong is 8bytes.
Fix it by using u32 to replace ulong.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit f3d936c84759fcd47a2489cf31fe46cd84ba1f47)
(cherry picked from commit 2795cbf333997f2b723dff7d7585ece0257a0b3f)
(cherry picked from commit f22ccd7e79d7372f6c961bc876f16938e983291d)

4 years agoMLK-13486: imx: logos: use NXP logo
Peng Fan [Tue, 22 Nov 2016 02:57:13 +0000 (10:57 +0800)]
MLK-13486: imx: logos: use NXP logo

Use NXP logo.
The vendor and board dir not changed, only replace the contents
of freescale.bmp.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 0b381fdf1a45cb06a057724e708ce0bbeee67f4d)
(cherry picked from commit 836461a95ca8df0f41dacf1d390a966624190524)
(cherry picked from commit ffbeb365642907957a385fe970fc69adcf87d600)
(cherry picked from commit 18ec1e8b2be5c0952636960b39edd40f38ffcbc3)
(cherry picked from commit 03d27b84c6a44a1dafca775dfb748f75a5c1d834)

4 years agoMLK-18654-4 imx8mm_evk: Enable SPL SDP for iMX8MM EVK board
Ye Li [Fri, 19 Apr 2019 06:34:13 +0000 (23:34 -0700)]
MLK-18654-4 imx8mm_evk: Enable SPL SDP for iMX8MM EVK board

Enable the SPL SDP for iMX8MM EVK. So that when booting from USB serial
download mode, the SPL will enter SDP to download FIT image from USB host
(uuu tool) and boot into FIT image.

The SDP driver needs larger malloc pool size, so extend the SPL malloc pool
to 12KB and reduce the SPL BSS MAX to 4KB because BSS actual size is about 1KB.

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

4 years agoMLK-23574-27 imx8mm_evk: Update board codes and add DDR4 support
Ye Li [Thu, 2 Apr 2020 06:58:29 +0000 (23:58 -0700)]
MLK-23574-27 imx8mm_evk: Update board codes and add DDR4 support

Update the board codes to use latest DDR script and support flexspi boot,
USB host/gadget, etc.
Also add DDR4 EVK board support for RAW NAND boot.

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

4 years agoMA-15062 change MACRO name of mcu TCM base address
faqiang.zhu [Tue, 2 Jul 2019 04:36:34 +0000 (12:36 +0800)]
MA-15062 change MACRO name of mcu TCM base address

Change the MACRO name of mcu TCM base address from M4_BOOTROM_BASE_ADDR
to MCU_BOOTROM_BASE_ADDR.
since this MACRO will be used in common code for i.MX chips, the same
MACRO name in other files are also modified.

Change-Id: I433dd78d11c485d0f4cb82bab299f61cb29dce45
Signed-off-by: faqiang.zhu <faqiang.zhu@nxp.com>
(cherry picked from commit e2eb616fdbc4ce6475b084ab11b77cd5dcaa6fd2)
(cherry picked from commit 809d03482c951989769a82e317abbeab9b8e4d8b)

4 years agoMA-15062-1 change names of MACROs used to boot MCU on imx8m devices
faqiang.zhu [Tue, 2 Jul 2019 05:32:00 +0000 (13:32 +0800)]
MA-15062-1 change names of MACROs used to boot MCU on imx8m devices

new imx8mn chips have Cortex-M7 inside, not like other imx8m devices
of imx8mm and imx8mq which have Cortex-M4 inside. the names of MACROs
used to boot MCU on imx8m devices is modified to make them more common
to cover M4 and M7.
annotations are also modified based on the differences between M4 and
M7.

Change-Id: Ida272e6ecdf577eeaadb9f1242f4524bd1014cac
Signed-off-by: faqiang.zhu <faqiang.zhu@nxp.com>
(cherry picked from commit eb825f8d4fbc2289b9ccf8f457fcba04922c8259)
(cherry picked from commit bd7599d2d34e55395423b4627bfc97eeb3ad742e)

4 years agoLF-3483-2 nand: mxs_nand_spl: Implement the nand_spl_adjust_offset
Ye Li [Wed, 10 Mar 2021 09:15:15 +0000 (01:15 -0800)]
LF-3483-2 nand: mxs_nand_spl: Implement the nand_spl_adjust_offset

Since the mxs_nand_spl has implemented adjust read offset in
nand_spl_load_image, so we don't need to check the bad block in
nand_spl_adjust_offset. Directly return the offset to continue
read by nand_spl_load_image.

Signed-off-by: Ye Li <ye.li@nxp.com>
4 years agoMLK-20664-2 imx8/imx8m: Disable the SPL RAW image support
Ye Li [Thu, 27 Dec 2018 05:51:51 +0000 (21:51 -0800)]
MLK-20664-2 imx8/imx8m: Disable the SPL RAW image support

The RAW image support must be disabled, otherwise a RAW image can be used
to bypass FIT image.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit ca7ebfcf0737699d5f62f97be4b0015c88108ae7)
(cherry picked from commit 9e9524c86a08d5b16bb94c1a30eda378536c4860)
(cherry picked from commit 1759ef0b52f972cff6c2c23014c534c9c8d0d55f)

4 years agoMLK-23574-25 arm: dts: imx8mm: Update iMX8MM DTSi and DDR4/LPDDR4 EVK DTS
Ye Li [Thu, 2 Apr 2020 03:30:07 +0000 (20:30 -0700)]
MLK-23574-25 arm: dts: imx8mm: Update iMX8MM DTSi and DDR4/LPDDR4 EVK DTS

Sync the DTSi file and DDR4/LPDDR4 EVK DTS with latest v5.10.y kernel.
Add nodes in display, flexspi, TMU, etc.

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

4 years agoMLK-18654-3 spl: Un-define the DM USB for SPL
Ye Li [Fri, 22 Jun 2018 02:32:33 +0000 (19:32 -0700)]
MLK-18654-3 spl: Un-define the DM USB for SPL

Since we don't support DM in SPL, undefine the DM USB in SPL build,
so it can use non-DM USB driver.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 1e02825ab852f31111b875af9b84f82a974df64c)
(cherry picked from commit 62efea1e99a02fc282d0a22c36fddb1b14a09612)
(cherry picked from commit 8a44b2ce1cc80e9c28625b84a7db00c75880b70f)

4 years agoMLK-18654-2 imx: Change USB boot device type
Ye Li [Fri, 22 Jun 2018 02:26:47 +0000 (19:26 -0700)]
MLK-18654-2 imx: Change USB boot device type

The SPL SDP is configured as BOOT_DEVICE_BOARD, so when booting from
USB, change its type to BOOT_DEVICE_BOARD, so we can use SDP.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 433032d7d672d4aa18d1399ffaa9449f00bc7d09)
(cherry picked from commit 4bb666f00b04ab416833ae5c5f17b27a646a07a5)
(cherry picked from commit 06e39d89e45e74c99c68854b1f690a84688b05a1)

4 years agoMLK-23574-23 imx8mm_evk: Change to use non-DM for SPL
Ye Li [Mon, 30 Mar 2020 08:57:59 +0000 (01:57 -0700)]
MLK-23574-23 imx8mm_evk: Change to use non-DM for SPL

The SPL size is huge when enabling DM:
108KB (DM) vs 63KB (Non-DM)

Since we have limited size of OCRAM and TCM, to support full features
we have to disable the DM in SPL and use legacy way as imx_v2019.04
u-boot

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

4 years agoMLK-23574-22 imx8m: clock: Sync clock settings with imx_v2020.04
Ye Li [Mon, 30 Mar 2020 08:56:03 +0000 (01:56 -0700)]
MLK-23574-22 imx8m: clock: Sync clock settings with imx_v2020.04

Sync the clock settings with imx_v2020.04 u-boot:
1. Set ARM clock directly from PLL, bypass CCM.
2. Add mapping between ROOT clock and MXC clock
3. Fix frac pll parameters issue in imx8mm, which violates spec.
4. Add all root clocks
5. Add clock settings for some peripherals:
   like enet/uart/i2c/display/nand/usb to allow not use CCF.

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

4 years agoMLK-18387 pmic: Add Non-DM pmic driver for BD71837
Ye Li [Mon, 30 Mar 2020 08:56:32 +0000 (01:56 -0700)]
MLK-18387 pmic: Add Non-DM pmic driver for BD71837

The iMX8MM EVK board uses BD71837MWV pmic. Add its Non-DM driver to u-boot.

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

4 years agoMLK-21845-4 imx8m: Add imximage for flexspi boot image
Ye Li [Fri, 19 Apr 2019 03:24:42 +0000 (20:24 -0700)]
MLK-21845-4 imx8m: Add imximage for flexspi boot image

Since flexspi has different IVT offset with SD/MMC, add a new imximage
for it.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 14a968bd8a1bbd580e607fa11afde0d66211a21a)
(cherry picked from commit 1f307fb3c8c2631720d4cdbeecb19ab9c92484bf)

4 years agoMLK-14422 imx7d: wdog: Overwrite the reset_cpu to turn off internal reset signal
Ye Li [Tue, 7 Feb 2017 14:48:01 +0000 (22:48 +0800)]
MLK-14422 imx7d: wdog: Overwrite the reset_cpu to turn off internal reset signal

Set wdog WCR register SRS bit to turn off internal reset signal WDOG_RESET_B_DEB
for mx7d. So that the warm reset is disabled.
The WDA is cleared to output WDOG_B immediately to reset the board.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 6d09863801695d975060fbc240147a9067dbafbf)
(cherry picked from commit cde504077e1ce94d9ad34ece0f3e882972404297)
(cherry picked from commit b0d49a10b23f0b9a7d8cc9299e6eac6b39ce1434)
(cherry picked from commit 2d7a9cf5873ba2e4523deb80ed62dd184e1fe3bc)

4 years agoMLK-19726-2 arm: Don't remove all devices when power domain driver is enabled
Ye Li [Wed, 26 Sep 2018 09:15:00 +0000 (02:15 -0700)]
MLK-19726-2 arm: Don't remove all devices when power domain driver is enabled

Because we power off all devices in board_quiesce_devices which is prior then
executing dm_remove_devices_flags. So any access to HW in dm_remove_devices_flags
will cause problem.
However, some drivers like ethernet which implements the pre_remove callback is always
called without any flags check, and this finally accesses FEC controller.

Since we don't need to remove all devices in u-boot before starting kernel, disable
this feature when power domain is enabled.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 741f2ea182bf293d8270bdc4a217a96db22c414c)
(cherry picked from commit b0eae27fce90f00f407961c5907e0e21cf47ef18)
(cherry picked from commit 30ba253de48f5c3c997d0a661910934f93fe44ad)

4 years agoMLK-21845-3 imx8m: Append HDMI Firmware only for imx8mq
Ye Li [Mon, 22 Apr 2019 08:32:21 +0000 (01:32 -0700)]
MLK-21845-3 imx8m: Append HDMI Firmware only for imx8mq

Since only i.MX8MQ needs HDMI firmware packing into boot image. Change
the imximage.cfg with CONFIG_IMX8MQ used.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 1000b92cee2afefd25a666466a466f8b7ba77626)
(cherry picked from commit 423984f60d004d603768239bbce688c2c427573c)

4 years agoMLK-18044-4: crypto: fsl: refactor for 32 bit version CAAM support on ARM64
Aymen Sghaier [Thu, 3 May 2018 10:17:53 +0000 (12:17 +0200)]
MLK-18044-4: crypto: fsl: refactor for 32 bit version CAAM support on ARM64

Since i.MX CAAM are all 32 bits no matter the ARM arch (32 or 64),
to adapt and not break 64 bits CAAM support,  add a new config
CONFIG_CAAM_64BIT and new relevant type "caam_dma_addr_t".

This config is default enabled when CONFIG_PHYS_64BIT is set except
for iMX8M.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Horia Geantă <horia.geanta@nxp.com>
(cherry picked from commit 043c4ff7524dcf9f8fea1b56eddb8d1a40505d6c)

4 years agoMLK-18044-5: crypto: caam: Add secure memory vid 3 support
Aymen Sghaier [Thu, 3 May 2018 12:19:57 +0000 (14:19 +0200)]
MLK-18044-5: crypto: caam: Add secure memory vid 3 support

  In i.MX8M platforms the secure memory block has a newer version
 than those used in i.MX6/7 platforms, this patch update the driver
 to use the correct registers offsets.

Signed-off-by: Aymen Sghaier <aymen.sghaier@nxp.com>
(cherry picked from commit 0daa9c142a1809b473d101f6db9700574ce3d522)
(cherry picked from commit 7184ec3307c4347a7a7765ba72415580cd65c341)
(cherry picked from commit 020649dd642899665dce8655c395f785f5d243e0)
(cherry picked from commit 9a0187946b470af23b2794eb476c860f3742969c)

4 years agoMLK-18044-3: crypto: Add blob command support for i.MX8M platforms
Aymen Sghaier [Wed, 2 May 2018 08:34:27 +0000 (10:34 +0200)]
MLK-18044-3: crypto: Add blob command support for i.MX8M platforms

 This patch enable blob command for mScale platforms.

Signed-off-by: Aymen Sghaier <aymen.sghaier@nxp.com>
(cherry picked from commit 895669394f6aae633abf6ea3f327d6093562edde)
(cherry picked from commit bac8ed98778c93ef43ce9093efa3b9999d650576)
(cherry picked from commit 2542f195b484dcd09bbf72406c7951bee06b52a5)
(cherry picked from commit 2f4da7efe84fbf60cc8e372077d9509cba341553)

4 years agoMLK-18044-2: crypto: caam: Fix build warnings pointer casting
Aymen Sghaier [Tue, 1 May 2018 16:42:21 +0000 (18:42 +0200)]
MLK-18044-2: crypto: caam: Fix build warnings pointer casting

  Enabling CAAM driver for i.MX8M platforms, a 64 bits architecture,
 lead to casting warnings: from/to pointer to/from integer with
 different size. This patch fix these warnings

Signed-off-by: Aymen Sghaier <aymen.sghaier@nxp.com>
(cherry picked from commit d02fbc7d2957f4788ced017ccf17fd35ab968121)
(cherry picked from commit 79e90af14af32e86fd7efd3c84e09a0bd572ab5b)
(cherry picked from commit 338786e6c79c2392dfe44c44e94c59fb18d684fd)
(cherry picked from commit e32039db956676619b143cb13aded37fbc0d36d5)

4 years agoMLK-18044-1: crypto: caam: Add CAAM support to i.MX8M platforms
Aymen Sghaier [Tue, 1 May 2018 09:37:22 +0000 (11:37 +0200)]
MLK-18044-1: crypto: caam: Add CAAM support to i.MX8M platforms

This patch enable CAAM support for i.MX8M platforms.

Signed-off-by: Aymen Sghaier <aymen.sghaier@nxp.com>
(cherry picked from commit 1fc92e6e34b06bdee81240ce06326aca1d9c02d8)
(cherry picked from commit b0f889b77b367b69aa0778b1d03a2ec30fdee243)
(cherry picked from commit f5c28e63f19ef99e0fe4d01b176789aacc507d79)
(cherry picked from commit cb43a643894445da481b265fdf63ac32749cfde1)

4 years agoMLK-18043 4/4: imx7ulp: Enable support for cmd blob
Franck LENORMAND [Wed, 2 May 2018 10:01:56 +0000 (12:01 +0200)]
MLK-18043 4/4: imx7ulp: Enable support for cmd blob

Signed-off-by: Franck LENORMAND <franck.lenormand@nxp.com>
(cherry picked from commit 03cb71cd22ff6ab1e2005a4bcb183c65f49b6e4e)
(cherry picked from commit 5d797db35da7fa3f7971df8811b6a1e800786ced)
(cherry picked from commit dd2e4b027122aa6724985f23319bebd89dfc1f39)
(cherry picked from commit f46d991731bcfbc6db95a4d0c87bf9188c2a636f)

4 years agoMLK-18043 2/4: caam: enable support for iMX7ULP
Franck LENORMAND [Wed, 2 May 2018 10:16:36 +0000 (12:16 +0200)]
MLK-18043 2/4: caam: enable support for iMX7ULP

Signed-off-by: Franck LENORMAND <franck.lenormand@nxp.com>
(cherry picked from commit 5f429339ab5a5f0d1f00a2880ce05cf479f11ba5)
(cherry picked from commit c26db25a130ef1f0abd43a3133877f74431eb217)
(cherry picked from commit 62ca8b07d4906ea11380f2638cc4b9d55beae9f6)
(cherry picked from commit 5f253097e98e1770a738027b72296907cdf3c825)

4 years agoMLK-18043 1/4: caam: change JR running loop
Franck LENORMAND [Wed, 2 May 2018 10:16:25 +0000 (12:16 +0200)]
MLK-18043 1/4: caam: change JR running loop

Signed-off-by: Franck LENORMAND <franck.lenormand@nxp.com>
(cherry picked from commit 6503c1ed0264fc61945c2b3b5948b793f104fc32)
(cherry picked from commit d1d10af5a15473377fefbca56c1dac293fb06f3b)
(cherry picked from commit 7f2af44c22d2b84913f0f299497a607484b81785)
(cherry picked from commit 893c0652aa368de8660ce864a5ad6acb13254208)

4 years agoMLK-17919: imx: Avoid hardcoded Job Ring Max size
Breno Lima [Fri, 23 Mar 2018 20:25:15 +0000 (17:25 -0300)]
MLK-17919: imx: Avoid hardcoded Job Ring Max size

Prior instantiating RNG we have to ensure if the CAAM job rings are
available. Avoid hardcoded job ring max size and use the definition at
fsl_sec.h

Signed-off-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit b81379d3d2228760cc061a56c3c610b4e9fa9783)
(cherry picked from commit f2e2f48f64264f06ed0a20e23903852e0a0fd8f9)
(cherry picked from commit 6f1fa9dc3d8e815e60eb09f9aeb1fd0b442ff610)
(cherry picked from commit e649e17afa68e2112983c285608d18a45bb54920)

4 years agoMLK-17918: imx: Ensure CAAM clock is enabled prior getting out_jr_size
Breno Lima [Fri, 23 Mar 2018 20:21:38 +0000 (17:21 -0300)]
MLK-17918: imx: Ensure CAAM clock is enabled prior getting out_jr_size

Prior calling sec_in32() we have to ensure CAAM clock is enabled, the
function sec_in32() is reading CAAM registers and if CAAM clock is disabled
the system will hang.

Signed-off-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit c4da7540e7548f36c6ad90292db7057b828a7956)
(cherry picked from commit e7832c25579cedafe53b1973550664f654d38894)
(cherry picked from commit 037e0f80271fe7b39967a6972e9baf8dd6d2b8bc)
(cherry picked from commit 0ae5c37babdf5f137399039f38d11bba539c0182)

4 years agoMLK-17917: imx: Avoid hardcoded output ring size register offset (ORSR)
Breno Lima [Fri, 23 Mar 2018 20:17:04 +0000 (17:17 -0300)]
MLK-17917: imx: Avoid hardcoded output ring size register offset (ORSR)

The CAAM output ring size register offset is currently defined in fsl_sec.h
as FSL_CAAM_ORSR_JRa_OFFSET, use this definition to avoid hardcoded value in
i.MX common code.

Signed-off-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 9d381708210270a1cf9bf25924c8932c436967e8)
(cherry picked from commit 42db685ace092bedc569cd2c846b51b393630759)
(cherry picked from commit 1e51cd2a8e079c9cf06889ec55ab28c5d63bdba5)
(cherry picked from commit f7e7d08fb5144e3ce5f02df5d6f6262be883a683)

4 years agoMLK-17915: cmd: blob: Instantiate RNG before running CMD_BLOB
Breno Lima [Fri, 23 Mar 2018 20:05:47 +0000 (17:05 -0300)]
MLK-17915: cmd: blob: Instantiate RNG before running CMD_BLOB

U-Boot can instantiate CAAM RNG if needed by crypto operations.
Call sec_init() prior running a blob operation to ensure
RNG is correctly instantiated.

Make sure CAAM clock is enabled and check if a job ring is
available for that operation.

Signed-off-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit b2b745515d06f05ea288524e26cf2389d6924ff2)
(cherry picked from commit fe33f7296336b7364fb24ad21b0be32eb5810262)
(cherry picked from commit 1339300cba26dc32289633c3a8c2cc86a1180949)
(cherry picked from commit ff7b52faafa2f79a258600e9398b4282ae974718)

4 years agoMLK-17914: cmd: blob: Add IMX_HAB and CAAM supported SoCs as dependency
Breno Lima [Fri, 23 Mar 2018 19:25:33 +0000 (16:25 -0300)]
MLK-17914: cmd: blob: Add IMX_HAB and CAAM supported SoCs as dependency

In order to build CMD_BLOB on i.MX CAAM supported devices it's
necessary to select IMX_HAB. Add IMX_HAB and CAAM supported
SoCs as dependency.

Signed-off-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 4afb519038d190687cac6d410e9ad65d0655f1c0)
(cherry picked from commit acda6159eefbefaee15b19568fd1c4665c047432)
(cherry picked from commit c9de383878c5e248ae549182a9f2477f5bb2a5f5)
(cherry picked from commit 1ab55bfae6d40503420ddb8ffa435d7ba9bba968)

4 years agoMLK-18169 imx: imx7 Support for Manufacturing Protection
Breno Lima [Tue, 14 Nov 2017 22:10:45 +0000 (20:10 -0200)]
MLK-18169 imx: imx7 Support for Manufacturing Protection

This code was originally developed by Raul Cardenas <raul.casas@nxp.com>
and modified to be applied in U-Boot imx_v2017.03.

More information about the initial submission can be seen
in the link below:
https://lists.denx.de/pipermail/u-boot/2016-February/245273.html

i.MX7D has an a protection feature for Manufacturing process.
This feature uses asymmetric encryption to sign and verify
authenticated software handled between parties. This command
enables the use of such feature.

The private key is unique and generated once per device.
And it is stored in secure memory and only accessible by CAAM.
Therefore, the public key generation and signature functions
are the only functions available for the user.

The manufacturing-protection authentication process can be used to
authenticate the chip to the OEM's server.

Command usage:

Print the public key for the device.
- mfgprot pubk

Generates Signature over given data.
- mfgprot sign <data_address> <data_size>

Signed-off-by: Raul Ulises Cardenas <raul.casas@nxp.com>
Signed-off-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit db2dbf622d3c711b2fbd85e6814992e023479dad)
(cherry picked from commit 554b7cdcf47a49097cc5417cc6130e469d7ccc20)
(cherry picked from commit 2c8318fbe7a721faec2b2dd04a465dff00ebdde7)

4 years agoMLK-16753-1 imx8m: add optee node according to runtime status
Peng Fan [Thu, 2 Nov 2017 05:47:24 +0000 (13:47 +0800)]
MLK-16753-1 imx8m: add optee node according to runtime status

If TEE is enabled according to rom_pointer[0,1] passed to BL33
from ATF, uboot need to add the optee node in dts to let
Kernel could probe the TEE driver.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 4341d35cc99a6226f2671e15154d3148ebf49c47)
(cherry picked from commit 609e6607572225bfff9dcd84928fd061c1682669)
(cherry picked from commit dbdf9dd3b8bb6b8e0a87a07227bc22d6333f8081)

4 years agoLF-3483-1 imx8mp_evk: Allow to use BSS section in board_init_f
Ye Li [Tue, 9 Mar 2021 09:30:34 +0000 (01:30 -0800)]
LF-3483-1 imx8mp_evk: Allow to use BSS section in board_init_f

The SPL framework will clean up the BSS section after board_init_f,
since we have explicitily clean BSS in board_init_f, so directly
call to board_init_r to bypass framework

Signed-off-by: Ye Li <ye.li@nxp.com>
4 years agoMLK-22105-3 imx8m: spl: Move bss clean up before arch_cpu_init
Ye Li [Tue, 25 Jun 2019 09:51:42 +0000 (02:51 -0700)]
MLK-22105-3 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)
(cherry picked from commit f7e11efcb4689cd7e1068677454b2bd4480708f3)
(cherry picked from commit 692bb011e8b0302b9e96b54de7a8fc9a17e69b56)

4 years agoMLK-16034-01: change the maximum oob size
Han Xu [Wed, 19 Jul 2017 16:40:59 +0000 (11:40 -0500)]
MLK-16034-01: change the maximum oob size

change the maximum oob size to 1872 for the MT29F128G08CBCCB raw NAND
chip on i.MX8QXP

Signed-off-by: Han Xu <han.xu@nxp.com>
(cherry picked from commit 58dee6ac965000f93693c36c93fb3d453293c43f)
(cherry picked from commit d297f33f4719502aa415dc7c7002c437a6af6c28)
(cherry picked from commit c0911b66b697505a2d91bf0e468e47bd2b2c21e3)
(cherry picked from commit 52e6e8bae60329d16bf63a2632fd37097a5438ce)

4 years agoMLK-12214 NAND:apbh_dma: Fix logically dead code issue
Ye.Li [Wed, 13 Jan 2016 02:06:59 +0000 (10:06 +0800)]
MLK-12214 NAND:apbh_dma: Fix logically dead code issue

The list_first_entry always assumes the list is not empty, it won't return NULL pointer when
the list is empty. So the "if (pdesc == NULL)" becomes a dead code. Fix the issue by calling
the list_empty before the list_first_entry.

(Coverity CID 29934)

Signed-off-by: Ye.Li <ye.li@nxp.com>
(cherry picked from commit ff3923f294cc2e15f436d7520b4042736b1b48a6)
(cherry picked from commit 64c6a7b5d621080b8bd948c061a4f223a8c2d886)
(cherry picked from commit b9846931a2196fa2bf29a9cb0304d11e96c2c40a)
(cherry picked from commit d33e6de01f509d586f5b0673154b185601f5d869)
(cherry picked from commit 59b82a4dc20f4d2db1456e3bf2348645cb9e7b41)

4 years agoMLK-18322 HAB: Add suport for iMX8MM
Ye Li [Thu, 18 Apr 2019 07:20:40 +0000 (00:20 -0700)]
MLK-18322 HAB: Add suport for iMX8MM

The imx8mm has changed the address of rvt_hab, use new address for imx8mm.

The authentication procedure is same as imx8mq. In u-boot, the authentication
uses SIP call to trap ATF to run HAB authenticate.
Need to work with ATF commit:
(commit 7a4d6f90e999ed413d520310cc199901b52b7a04)

Users need to add CONFIG_IMX_HAB=y to defconfig to enable the feature.

Signed-off-by: Ye Li <ye.li@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit a4826f61e39456abb6d2e4f84178ae9ef582f7c3)
(cherry picked from commit 06784964a9cfc5110d7430e12d0055a5ad99ee76)