u-boot.git
5 years agoMLK-19308 mx7d_lpddr3_arm2: Fix plugin boot failed issue
Ye Li [Thu, 23 Aug 2018 05:04:22 +0000 (22:04 -0700)]
MLK-19308 mx7d_lpddr3_arm2: Fix plugin boot failed issue

The QOS relevant registers are not defined in register header file.
When building plugin, these addresses are set to 0 and cause plugin
failed.

Move the QOS registers definitions from set_epdc_qos to register
header file to fix the issue.

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

5 years agoMLK-18460-6 configs: mx7d_19x19_arm2: Add defconfigs for LPDDR2, LPDDR3 and DDR3...
Ye Li [Wed, 30 May 2018 09:16:33 +0000 (02:16 -0700)]
MLK-18460-6 configs: mx7d_19x19_arm2: Add defconfigs for LPDDR2, LPDDR3 and DDR3 ARM2

Add defconfigs for iMX7D 19x19 LPDDR2, LPDDR3 and DDR3 ARM2 boards to
support SD boot, EIMNOR boot, NAND boot and TO 1.1 DDR settings.

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

5 years agoMLK-18460-5 mx7d_19x19_arm2: Add LPDDR3, LPDDR2 and DDR3 ARM2 support
Ye Li [Wed, 30 May 2018 08:50:30 +0000 (01:50 -0700)]
MLK-18460-5 mx7d_19x19_arm2: Add LPDDR3, LPDDR2 and DDR3 ARM2 support

Porting the iMX7D 19x19 LPDDR2, LPDDR3 and DDR3 ARM2 board codes from v2018.03.

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

5 years agoMLK-18460-4 DTS: mx7d_19x19_arm2: Add board DTS files for DDR3/LPDDR3/LPDDR2 ARM2
Ye Li [Wed, 30 May 2018 08:46:00 +0000 (01:46 -0700)]
MLK-18460-4 DTS: mx7d_19x19_arm2: Add board DTS files for DDR3/LPDDR3/LPDDR2 ARM2

Add DTS files to support iMX7D 19x19 LPDDR3, DDR3 and LPDDR2 ARM2 boards.

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

5 years agoMLK-18460-3 configs: mx7d_12x12_arm2: Add defconfigs for LPDDR3 and DDR3 ARM2
Ye Li [Wed, 30 May 2018 07:21:10 +0000 (00:21 -0700)]
MLK-18460-3 configs: mx7d_12x12_arm2: Add defconfigs for LPDDR3 and DDR3 ARM2

Add defconfigs for iMX7D 12x12 LPDDR3 and DDR3 ARM2 boards to support
SD boot, SPINOR boot, EPDC, QSPI, optee and TO 1.1 DDR settings.
By default the plugin is enabled for 12x12 LPDDR3 board for LPSR.

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

5 years agoMLK-18460-2 mx7d_12x12_arm2: Add LPDDR3 and DDR3 ARM2 support
Ye Li [Wed, 30 May 2018 07:18:54 +0000 (00:18 -0700)]
MLK-18460-2 mx7d_12x12_arm2: Add LPDDR3 and DDR3 ARM2 support

Porting the iMX7D 12x12 LPDDR3 and DDR3 ARM2 board codes from v2017.03.

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

5 years agoMLK-18460-1 DTS: mx7d_12x12_arm2: Add board DTS files for DDR3/LPDDR3 ARM2
Ye Li [Wed, 30 May 2018 07:14:12 +0000 (00:14 -0700)]
MLK-18460-1 DTS: mx7d_12x12_arm2: Add board DTS files for DDR3/LPDDR3 ARM2

Add DTS files to support iMX7D 12x12 LPDDR3 and DDR3 ARM2 boards.
Due to pin conflicts, need specified DTS for SPINOR, QSPI on LPDDR3
ARM2.

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

5 years agoMLK-18459-3 configs: mx6sll_arm2: Add defconfigs for LPDDR2/LPDDR3 ARM2
Ye Li [Mon, 28 May 2018 07:40:45 +0000 (00:40 -0700)]
MLK-18459-3 configs: mx6sll_arm2: Add defconfigs for LPDDR2/LPDDR3 ARM2

Add defconfigs for iMX6SLL LPDDR2/LPDDR3 ARM2 boards to support SD boot,
SPINOR boot, EPDC, and plugin.

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

5 years agoMLK-18459-2 mx6sll_arm2: Add LPDDR2/LPDDR3 ARM2 support
Ye Li [Mon, 28 May 2018 07:38:50 +0000 (00:38 -0700)]
MLK-18459-2 mx6sll_arm2: Add LPDDR2/LPDDR3 ARM2 support

Porting the iMX6SLL LPDDR2/LPPDR3 ARM2 board codes from v2017.03.

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

5 years agoMLK-18459-1 DTS: mx6sll_arm2: Add board DTS files for LPDDR2/3 ARM2
Ye Li [Mon, 28 May 2018 07:30:47 +0000 (00:30 -0700)]
MLK-18459-1 DTS: mx6sll_arm2: Add board DTS files for LPDDR2/3 ARM2

Add DTS files to support iMX6SLL 14x14 LPDDR3/LPDDR2 ARM2.
Due to pin conflicts, need specified DTS for SPINOR enabled.

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

5 years agoMLK-18458-3 configs: mx6ull_arm2: Add defconfigs for 14x14 DDR3 ARM2
Ye Li [Mon, 28 May 2018 06:07:29 +0000 (23:07 -0700)]
MLK-18458-3 configs: mx6ull_arm2: Add defconfigs for 14x14 DDR3 ARM2

Add defconfigs for iMX6ULL 14x14 DDR3 ARM2 boards to support SD boot,
eMMC boot, NAND boot, QSPI boot, SPINOR boot, EPDC, Touch sensor rework
and plugin.

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

5 years agoMLK-18458-2 mx6ull_arm2: Add 14x14 DDR3 ARM2 support
Ye Li [Mon, 28 May 2018 06:06:21 +0000 (23:06 -0700)]
MLK-18458-2 mx6ull_arm2: Add 14x14 DDR3 ARM2 support

Porting the iMX6ULL 14x14 DDR3 ARM2 board codes from v2017.03.

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

5 years agoMLK-18458-1 DTS: mx6ull_arm2: Add board DTS files for DDR3 ARM2
Ye Li [Mon, 28 May 2018 06:04:26 +0000 (23:04 -0700)]
MLK-18458-1 DTS: mx6ull_arm2: Add board DTS files for DDR3 ARM2

Add DTS files to support iMX6ULL 14x14 DDR3 ARM2.
Due to pin conflicts, need specified DTS for eMMC, EPDC, NAND/EIMNOR and tsc enabled.

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

5 years agoMLK-18457-3 configs: mx6ul_arm2: Add defconfigs for 14x14 DDR3/LPDDR2 ARM2
Ye Li [Mon, 28 May 2018 03:29:44 +0000 (20:29 -0700)]
MLK-18457-3 configs: mx6ul_arm2: Add defconfigs for 14x14 DDR3/LPDDR2 ARM2

Add defconfigs for iMX6UL 14x14 DDR3/LPDDR2 ARM2 boards to support
SD boot, eMMC boot, NAND boot, QSPI boot, SPINOR boot, EIMNOR boot
and plugin.

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

5 years agoMLK-18457-2 mx6ul_arm2: Add 14x14 DDR3/LPDDR2 ARM2 support
Ye Li [Mon, 28 May 2018 03:10:26 +0000 (20:10 -0700)]
MLK-18457-2 mx6ul_arm2: Add 14x14 DDR3/LPDDR2 ARM2 support

Porting the iMX6UL 14x14 ARM2 board codes from v2017.03, support DDR3 board
and LPDDR2 board.

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

5 years agoMLK-18457-1 DTS: mx6ul_arm2: Add board DTS files for DDR3/LPDDR2 ARM2
Ye Li [Mon, 28 May 2018 02:53:30 +0000 (19:53 -0700)]
MLK-18457-1 DTS: mx6ul_arm2: Add board DTS files for DDR3/LPDDR2 ARM2

Add DTS files to support iMX6UL 14x14 DDR3 ARM2 and 14x14 LPDDR2 ARM2.
Due to pin conflicts, need specified DTS for eMMC and NAND/EIMNOR enabled.

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

5 years agoMLK-18456-8 configs: mx6sx_arm2: Add defconfigs for 19x19 ARM2
Ye Li [Thu, 24 May 2018 07:44:53 +0000 (00:44 -0700)]
MLK-18456-8 configs: mx6sx_arm2: Add defconfigs for 19x19 ARM2

Add defconfigs for iMX6SX 19x19 DDR3/LPDDR2 ARM2 boards to support
SD boot, NAND boot, QSPI boot, SPINOR boot, EIMNOR boot and plugin.

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

5 years agoMLK-18456-7 mx6sx_arm2: Add 19x19 ARM2 support
Ye Li [Thu, 24 May 2018 07:42:14 +0000 (00:42 -0700)]
MLK-18456-7 mx6sx_arm2: Add 19x19 ARM2 support

Porting the 19x19 ARM2 board codes from v2017.03, support DDR3 board
and LPDDR2 board.

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

5 years agoMLK-18456-6 DTS: mx6sx_arm2: Add board DTS files for 19x19 ARM2
Ye Li [Thu, 24 May 2018 07:38:42 +0000 (00:38 -0700)]
MLK-18456-6 DTS: mx6sx_arm2: Add board DTS files for 19x19 ARM2

Add DTS files to support iMX6SX 19x19 ARM2. Due to pin conflicts,
need specified DTS for NAND/EIMNOR enabled.

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

5 years agoMLK-18456-5 configs: mx6sx_arm2: Add defconfigs for 14x14 ARM2
Ye Li [Thu, 24 May 2018 07:06:48 +0000 (00:06 -0700)]
MLK-18456-5 configs: mx6sx_arm2: Add defconfigs for 14x14 ARM2

Add defconfigs for iMX6SX 14x14 ARM2 boards to support SD boot,
NAND boot, plugin.

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

5 years agoMLK-18456-4 configs: mx6sx_arm2: Add defconfigs for 17x17 ARM2
Ye Li [Thu, 24 May 2018 06:50:36 +0000 (23:50 -0700)]
MLK-18456-4 configs: mx6sx_arm2: Add defconfigs for 17x17 ARM2

To support various boot devices on iMX6SX 17x17 ARM2, add the
relevant defconfigs.

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

5 years agoMLK-18456-3 mx6sx_arm2: Add 17x17 ARM2 and 14x14 ARM2 support
Ye Li [Thu, 24 May 2018 06:30:00 +0000 (23:30 -0700)]
MLK-18456-3 mx6sx_arm2: Add 17x17 ARM2 and 14x14 ARM2 support

Porting the 17x17 ARM2 and 14x14 ARM2 board codes from v2017.03. The
14x14 ARM2 shares similar board design with 17x17 ARM2, but uses LPDDR2
memory. So share the codes for them.

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

5 years agoMLK-18456-2 DTS: mx6sx_arm2: Add board DTS for iMX6SX 14x14 ARM2
Ye Li [Thu, 24 May 2018 06:33:10 +0000 (23:33 -0700)]
MLK-18456-2 DTS: mx6sx_arm2: Add board DTS for iMX6SX 14x14 ARM2

Add DTS file for the iMX6SX 14x14 ARM2 from v2017.03

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

5 years agoMLK-18456-1 DTS: mx6sx_arm2: Add board DTS files for 17x17 ARM2
Ye Li [Thu, 24 May 2018 06:21:00 +0000 (23:21 -0700)]
MLK-18456-1 DTS: mx6sx_arm2: Add board DTS files for 17x17 ARM2

Add DTS files to support iMX6SX 17x17 ARM2. Due to pin conflicts,
need specified DTS for SPI nor enabled and NAND/EIMNOR enabled.

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

5 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)

5 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)

5 years agoMLK-19645 mx6ulz_evk: Fix fdt_file variable issue
Ye Li [Thu, 20 Sep 2018 09:20:51 +0000 (02:20 -0700)]
MLK-19645 mx6ulz_evk: Fix fdt_file variable issue

Since we set the fdt_file value when running on iMX6ULZ. This
cause the saved fdt_file change be overwritten. So users can't
set to their own fdt_file.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 389161ef31bed9dad5a502fb24e445402e1465eb)
(cherry picked from commit 40ca6115b88597c27df3d4a27c0caa50a5b0a63a)

5 years agoMLK-19625 mx6ulz_evk: Disable the FEC driver and support USB2NET dongle
Ye Li [Thu, 20 Sep 2018 01:39:30 +0000 (18:39 -0700)]
MLK-19625 mx6ulz_evk: Disable the FEC driver and support USB2NET dongle

Since the mx6ulz don't have FEC, it needs to use USB2NET dongle
to connect network. We decouple the CONFIG_FEC_MXC with CONFIG_CMD_NET.
For 6ull, all defconfigs need to enable the CONFIG_FEC_MXC explicitly.

Another change is adding ${usb_net_cmd} environment for usb start command
in netboot scripts on 6ulz.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 9018cc2ba39d079625c6856347c787bb8642c270)
(cherry picked from commit 70c014c5b78504e0a1eb8d74687e4ed08cba3d7a)

5 years agoMLK-19595 imx6ulz: add emmc, nand, and qspi boot support
Robby Cai [Sun, 16 Sep 2018 08:44:56 +0000 (16:44 +0800)]
MLK-19595 imx6ulz: add emmc, nand, and qspi boot support

add config for emmc, nand and qspi boot

Signed-off-by: Robby Cai <robby.cai@nxp.com>
(cherry picked from commit 82d61c0fd30ae6d131b155e2b7840e5a26411ca9)
(cherry picked from commit e0b4764f6b361d2158b082c4d30aa5c7993e52b8)

5 years agoMLK-19589 imx6ulz: add imx6ulz support
Bai Ping [Fri, 14 Sep 2018 10:23:08 +0000 (18:23 +0800)]
MLK-19589 imx6ulz: add imx6ulz support

Add i.MX6ULZ support. the i.MX6ULZ is SW compatible
with i.MX6ULL. so most code of i.MX6ULL can be reused
by i.MX6ULZ.

Signed-off-by: Bai Ping <ping.bai@nxp.com>
(cherry picked from commit 99a6bc0ccc69e1517316056e23772d7743f3ae1e)
(cherry picked from commit 7b58ff50dddec98ba6f5acae208eaf9cd99f7a6c)

5 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)

5 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)

5 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)

5 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)

5 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)

5 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)

5 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)

5 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)

5 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)

5 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)

5 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)

5 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)

5 years agoMLK-21251-1 imx: hab: Fix build warnings in 32-bit targets
Breno Lima [Thu, 21 Mar 2019 20:33:02 +0000 (17:33 -0300)]
MLK-21251-1 imx: hab: Fix build warnings in 32-bit targets

When building 32-bit targets with CONFIG_SECURE_BOOT and DEBUG enabled
the following warnings are displayed:

arch/arm/mach-imx/hab.c:840:41: warning: format '%lx' expects argument \
of type 'long unsigned int', but argument 3 has type 'uint32_t \
{aka unsigned int}' [-Wformat=]
   printf("HAB check target 0x%08x-0x%08lx fail\n",
                                     ~~~~^
                                     %08x
          ddr_start, ddr_start + bytes);

arch/arm/mach-imx/hab.c:845:45: warning: format '%x' expects argument \
of type 'unsigned int', but argument 3 has type 'ulong \
{aka long unsigned int}' [-Wformat=]
  printf("\nivt_offset = 0x%x, ivt addr = 0x%x\n", ivt_offset, ivt_addr);
                                            ~^
                                            %lx

Fix warnings by providing the correct data type.

Reviewed-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Breno Lima <breno.lima@nxp.com>
(cherry picked from commit 050beb8ee3fc4c690c9ce7c4f47adfc6f48dccdf)
(cherry picked from commit e66c03a45b563b53485b8d662d29f2e9a143e433)

5 years agoMLK-21174 mx7ulp: hab: Add hab_status command for HABv4 M4 boot
Breno Lima [Fri, 15 Mar 2019 21:42:47 +0000 (18:42 -0300)]
MLK-21174 mx7ulp: hab: Add hab_status command for HABv4 M4 boot

When booting in low power or dual boot modes the M4 binary is
authenticated by the M4 ROM code.

Add an option in hab_status command so users can retrieve M4 HAB
failure and warning events.

=> hab_status m4

   Secure boot disabled

   HAB Configuration: 0xf0, HAB State: 0x66
   No HAB Events Found!

Add command documentation in mx6_mx7_secure_boot.txt guide.

As HAB M4 API cannot be called from A7 core the code is parsing
the M4 HAB persistent memory region. The HAB persistent memory
stores HAB events, public keys and others HAB related information.

The HAB persistent memory region addresses and sizes can be found
in AN12263 "HABv4 RVT Guidelines and Recommendations".

Reviewed-by: Utkarsh Gupta <utkarsh.gupta@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Breno Lima <breno.lima@nxp.com>
(cherry picked from commit 0efff16579fabcf57acb9c8857afac8fb58de355)
(cherry picked from commit 4815444f293d8021f8bd62079bd576e88cdef639)

5 years agoMLK-20781-4 mx7ulp_evk: Enable new mipi panel RM68200_WXGA
Ye Li [Mon, 26 Nov 2018 08:15:07 +0000 (00:15 -0800)]
MLK-20781-4 mx7ulp_evk: Enable new mipi panel RM68200_WXGA

Enable the new mipi panel driver and add parameters to board codes.
We enable the RM68200_WXGA as default panel, users can set "panel"
environment variable to switch to different panel.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Fancy Fang <chen.fang@nxp.com>
(cherry picked from commit adb2db588c5b6401d6769b7766a5ed726d669b2b)
(cherry picked from commit 901947a9c75b602f21f0f7eee65ee80c8c9b02dd)

5 years agoMLK-20781-3 mx7ulp: clock: adjust LCDIF pixclock algorithm
Ye Li [Mon, 21 Jan 2019 03:48:08 +0000 (19:48 -0800)]
MLK-20781-3 mx7ulp: clock: adjust LCDIF pixclock algorithm

Since LCDIF does not have a dedicated PLL as its source, we have to
find a best frequency closed to the target frequency. The previous
method is finding a closed clock with actual frequency higher than target.
But this causes problem to DSI PHY clock which uses target frequency to
calculate its clock parameters.  When the actaul pixclock is higher,
it may violates the requirement between DSI PHY clock and LCDIF pixclock clock.
clk_byte_freq >= dpi_pclk_freq * DPI_pixel_size / ( 8 * (cfg_num_lanes + 1))

So we'd better selecting a LCDIF clock not exceed the target frequency.

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

5 years agoMLK-20781-2 video: dsi_northwest: Change the DSI PHY clock settings
Ye Li [Mon, 21 Jan 2019 03:54:19 +0000 (19:54 -0800)]
MLK-20781-2 video: dsi_northwest: Change the DSI PHY clock settings

The previous driver uses a hard coded value which generates the DSI
PHY clock can fit HX8363 WVGA screen. But when switching to new WXGA
screen which needs higher pixclock and higher DSI PHY clock, the
hard coded parameters can't work.
Change to follow kernel codes to find the best value of CM, CN, CO
parameters for DSI PHY clock to meet pixclock requirement.

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

5 years agoMLK-20781-1 video: Add new mipi DSI panel RM68200_WXGA driver
Ye Li [Mon, 26 Nov 2018 08:10:47 +0000 (00:10 -0800)]
MLK-20781-1 video: Add new mipi DSI panel RM68200_WXGA driver

mx7ulp EVK B will use two mipi dsi panels, the new panel RM68200_WXGA
supports WXGA resolution.

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

5 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)

5 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)

5 years agoMLK-20116-2 dts: imx7ulp: Update EVK board DTS files
Ye Li [Tue, 30 Oct 2018 04:44:32 +0000 (21:44 -0700)]
MLK-20116-2 dts: imx7ulp: Update EVK board DTS files

Align the new pinfunc names with header file for all iMX7ULP EVK DTS files.
Also update the EVK DTS files to align with kernel for Rev A3
board. Removed the extcon node for USB ID, since A3 board uses USB ID pin
not GPIO.

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

5 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)

5 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)

5 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)

5 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)

5 years agoMLK-19157 imx8mm_evk: Disable dsi panel before booting kernel
Ye Li [Mon, 13 Aug 2018 08:49:19 +0000 (01:49 -0700)]
MLK-19157 imx8mm_evk: Disable dsi panel before booting kernel

Pull down the DSI_EN gpio to disable mipi dsi panel before booting kernel.
This avoids display full yellow screen before kernel mipi driver probes
the device.

For MIPI2HDMI card, this DSI_EN gpio is not used. So nothing impact to it.

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

5 years agoMLK-19045 imx8mm_evk: enable the dispmix & mipi phy power domain
Bai Ping [Wed, 25 Jul 2018 09:30:05 +0000 (17:30 +0800)]
MLK-19045 imx8mm_evk: enable the dispmix & mipi phy power domain

dispmix & mipi phy power domain must be enabled before doing any
config for lcfif and dsi.

Signed-off-by: Bai Ping <ping.bai@nxp.com>
(cherry picked from commit 240475ecb29aff22fb362ea39f3bf8e7045281db)
(cherry picked from commit 44d97952c66ef4d82302c871da9b91107a771ca7)

5 years agoMLK-18945-10 imx8mm_evk: Add splash screen support for MIPI DSI
Ye Li [Wed, 18 Jul 2018 06:22:54 +0000 (23:22 -0700)]
MLK-18945-10 imx8mm_evk: Add splash screen support for MIPI DSI

Add board level codes for enabling splash screen on imx8mm EVK. We
support two different display connecting to MIPI DSI miniSAS interfaces:

1. MIPI2HDMI daughter card (default)
2. RM67191 OLED panel

Users can set "panel" env vairable to "MIPI2HDMI" or "RM67191_OLED" to
switch them after reboot.

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

5 years agoMLK-18945-9 imx8mm: Update SOC codes to support LCDIF
Ye Li [Wed, 18 Jul 2018 06:13:59 +0000 (23:13 -0700)]
MLK-18945-9 imx8mm: Update SOC codes to support LCDIF

Enable the video PLL (594Mhz) and clocks in displaymix. Add the LCDIF clock
set interface to change its dot clock rate.
Update registers header file for LCDIF base address.

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

5 years agoMLK-18945-8 video: mxsfb: Update LCDIF driver for sec_mipi_dsi on iMX8MM
Ye Li [Wed, 18 Jul 2018 06:02:16 +0000 (23:02 -0700)]
MLK-18945-8 video: mxsfb: Update LCDIF driver for sec_mipi_dsi on iMX8MM

Update LCDIF driver for integrating with samsung mipi dsi controller on
iMX8MM platform.

The changes include:
1. Fix build warning for ARM64 platform.
2. Change max outstanding transactions req to 16 for better performance
   on system bus.
3. Set ENABLE signal to active low for valid data transfer.

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

5 years agoMLK-18945-7 video: Add mipi panel driver RM67191
Ye Li [Wed, 18 Jul 2018 05:56:19 +0000 (22:56 -0700)]
MLK-18945-7 video: Add mipi panel driver RM67191

Add a mipi dsi panel driver for RM67191 panel which is attached to mipi dsi
controller.

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

5 years agoMLK-18945-6 video: Add driver sec_mipi_dsim for mipi dsi on iMX8MM and iMX7D
Ye Li [Wed, 18 Jul 2018 03:35:11 +0000 (20:35 -0700)]
MLK-18945-6 video: Add driver sec_mipi_dsim for mipi dsi on iMX8MM and iMX7D

Add new mipi dsi driver sec_mipi_dsim to support the samsung mipi dsi used
on iMX8MM and iMX7D platforms. This driver implements the interfaces required
by mipi dsi bridge. Users can use mipi dsi bridge common APIs to access it.

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

5 years agoMLK-18945-5 mx7ulp_evk: Update board codes for mipi display
Ye Li [Wed, 18 Jul 2018 03:29:41 +0000 (20:29 -0700)]
MLK-18945-5 mx7ulp_evk: Update board codes for mipi display

Setup the mipi_dsi_northwest driver and register a the HX8363 panel
device to mipi dsi bridge in board codes.

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

5 years agoMLK-18945-4 video: mxsfb: Update LCDIF driver to use dsi bridge
Ye Li [Wed, 18 Jul 2018 03:25:11 +0000 (20:25 -0700)]
MLK-18945-4 video: mxsfb: Update LCDIF driver to use dsi bridge

Remove the functions for northwest driver and HX8363 driver, change
to use mipi dsi bridge interfaces.
The mipi_dsi_northwest driver setup and hx8363 init will move to
board level codes.

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

5 years agoMLK-18945-3 video: Update mipi panel driver HX8363
Ye Li [Wed, 18 Jul 2018 02:22:52 +0000 (19:22 -0700)]
MLK-18945-3 video: Update mipi panel driver HX8363

Update the HX8363 mipi panel to use new mipi dsi bridge interfaces
to register a panel device and send command packets. So this panel
driver can decouple with mipi_dsi_northwest driver.

A new header file mipi_dsi_panel.h is added for all panel init
functions declare.

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

5 years agoMLK-18945-2 video: Update mipi dsi northwest to implement bridge interface
Ye Li [Wed, 18 Jul 2018 02:13:13 +0000 (19:13 -0700)]
MLK-18945-2 video: Update mipi dsi northwest to implement bridge interface

Update the mipi_dsi_northwest driver to implement mipi dsi bridge interfaces
and register it as a bridge controller. Users can call bridge common interfaces
to access the northwest driver, don't need to call its private driver functions.

We also add a kconfig entry for this driver, the name is changed to
CONFIG_IMX_NORTHWEST_MIPI_DSI

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

5 years agoMLK-18945-1 video: Add mipi dsi bridge driver
Ye Li [Tue, 17 Jul 2018 10:32:11 +0000 (03:32 -0700)]
MLK-18945-1 video: Add mipi dsi bridge driver

Add a mipi dsi bridge driver to abstract mipi dsi interfaces for
mipi panel and display controller drivers.
So for panel and display conntroller drivers, they can use same functions
to access mipi dsi controller.

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

5 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)

5 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)

5 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)

5 years agoMLK-17897: mx7ulp: Move CONFIG_SECURE_BOOT option to Kconfig
Breno Lima [Tue, 20 Mar 2018 13:09:47 +0000 (10:09 -0300)]
MLK-17897: mx7ulp: Move CONFIG_SECURE_BOOT option to Kconfig

Since commit 6e1f4d2652e79 ("arm: imx-common: add SECURE_BOOT option
to Kconfig") it's preferable to select CONFIG_SECURE_BOOT via Kconfig.

Add ARCH_MX7ULP as a CONFIG_SECURE_BOOT dependency, do not select
CONFIG_FSL_CAAM since CAAM is not implemented for i.MX7ULP yet.

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)

5 years agoMLK-17785 mx7ulp_evk: Update DDR freq to 352.8Mhz for ULP B0
Ye Li [Tue, 6 Mar 2018 08:19:13 +0000 (00:19 -0800)]
MLK-17785 mx7ulp_evk: Update DDR freq to 352.8Mhz for ULP B0

On i.MX7ULP B0, the DDR clock target is increased from 320Mhz to 380Mhz.
We update DDR clock relevant settings to approach the target. But since the
limitation on LCDIF pix clock for HDMI output
(refer commit dba948539edd4611610d9f1fc3711d1d922262ae), we set DDR clock to
352.8Mhz (25.2Mhz * 14) by using the clock path:

APLL PFD0 -> DDR CLK -> NIC0 -> NIC1 -> LCDIF clock

To reduce the impact to entire system, the NIC0_DIV and NIC1_DIV are kept,
so the divider 14 is calculated as:
14 = (NIC0_DIV + 1) * (NIC1_DIV + 1) * (LCDIF_PCC_DIV + 1)

NIC0_DIV:      1
NIC1_DIV:      0
LCDIF_PCC_DIV: 6

APLL and APLL PFD0 settings:

PFD0 FRAC:  27
APLL MULT:  22
APLL NUM:   1
APLL DENOM: 20

This patch applies the new settings for both DCD and plugin.
There is no DDR script change on this new frequency.
Overnight memtester is passed.

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

5 years agoMLK-17439 mx7ulp: Change clock rate calculation for NIC1 BUS and EXT
Ye Li [Mon, 22 Jan 2018 03:22:40 +0000 (19:22 -0800)]
MLK-17439 mx7ulp: Change clock rate calculation for NIC1 BUS and EXT

On i.MX7ULP B0, there is change in NIC clock dividers architecture.
On A0, the NIC1 BUS and EXT dividers were in a chain with NIC1 DIV, but
on B0 they are parallel with NIC1 DIV. So now the dividers are independent.
This patch modifies the scg_nic_get_rate function according to this change.

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

5 years agoMLK-17292 mx7ulp: Set A7 core frequency to 500Mhz for B0 chip
Ye Li [Fri, 15 Dec 2017 07:28:06 +0000 (01:28 -0600)]
MLK-17292 mx7ulp: Set A7 core frequency to 500Mhz for B0 chip

The normal target frequency for ULP A7 core is 500Mhz, but now ROM
set the core frequency to 413Mhz. So change it to 500Mhz in u-boot.

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

5 years agoMLK-17200-3 mx7ulp: Select the SCG1 APLL PFD as a system clock source
Ye Li [Wed, 13 Dec 2017 06:22:09 +0000 (00:22 -0600)]
MLK-17200-3 mx7ulp: Select the SCG1 APLL PFD as a system clock source

Due to the APLL out glitch issue TKT332232, the APLLCFG PLLS bit must be set
to select SCG1 APLL PFD for generating system clock to align with the design.

Signed-off-by: Ye Li <ye.li@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 242823400c5bd59960e1b40d941e177e8ebad57e)
(cherry picked from commit 3c8d8b0a95f8b1132e301e7e00955846b12aa4cc)

5 years agoMLK-17200-1 mx7ulp: Add CPU revision check for B0
Ye Li [Wed, 13 Dec 2017 06:16:31 +0000 (00:16 -0600)]
MLK-17200-1 mx7ulp: Add CPU revision check for B0

Since there is no register for CPU revision, we use ROM version to
check the A0 or B0 chip.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 9ad30c8439ece3a8b88040847155405fca40facf)
(cherry picked from commit 380791dc105256494d30fc1883978808cf83fc04)

5 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)

5 years agoMLK-14533 mx7ulp_evk: Change APLL and its PFD0 frequencies
Ye Li [Tue, 28 Mar 2017 08:52:12 +0000 (16:52 +0800)]
MLK-14533 mx7ulp_evk: Change APLL and its PFD0 frequencies

To support HDMI display on EVK board, the LCDIF pix clock must be 25.2Mhz. Since
the its PCC divider range is from 1-8, the max rate of LCDIF PCC source clock is
201.6Mhz. This limits the source clock must from NIC1 bus clock or NIC1 clock, other sources
from APLL PFDs are higher than this max rate.

The NIC1 bus clock and NIC1 clock are from DDRCLK whose parent source is APLL PFD0, so we must
change the APLL PFD0 and have impact to DDRCLK, NIC1 and NIC1 bus.

Eventually, this requests to set the APLL PFD0 frequency to 302.4Mhz (25.2 * 12),
with settings:

PFD0 FRAC:  32
APLL MULT:  22
APLL NUM:   2
APLL DENOM: 5

Signed-off-by: Ye Li <ye.li@nxp.com>
Tested-by: Fancy Fang <chen.fang@nxp.com>
(cherry picked from commit 91be2789a93288cc087cd9e8db522c8308ef007c)
(cherry picked from commit dba948539edd4611610d9f1fc3711d1d922262ae)
(cherry picked from commit b2842f99262f10ac6595d1350e2a97c2e92118c9)

5 years agoMLK-14689 mx7ulp: Workaround APLL PFD2 to 345.6Mhz
Ye Li [Thu, 13 Apr 2017 03:40:46 +0000 (11:40 +0800)]
MLK-14689 mx7ulp: Workaround APLL PFD2 to 345.6Mhz

The GPU uses APLL PFD2 as its clock parent (483.84Mhz) with divider set to 1.
This frequecy is out of ULP A0 spec. The MAX rate for GPU is 350Mhz.
So we simply configure the APLL PFD2 to 345.6Mhz (FRAC=28) to workaround the problem.
The correct fix should let GPU handle the clock rate in kernel.

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

5 years agoMLK-14483 mx7ulp: Fix SPLL/APLL clock rate calculation issue
Ye Li [Fri, 17 Mar 2017 07:38:43 +0000 (15:38 +0800)]
MLK-14483 mx7ulp: Fix SPLL/APLL clock rate calculation issue

The num/denom is a float value, but in the calculation it is convert
to integer 0, and cause the result wrong.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 4a8f51499ca098637e9ee2036066374d34458865)
(cherry picked from commit 65e74eb0b354cb01c8422f30f9e14dead42201b9)
(cherry picked from commit a84ceb62b8c7e45353cccecf527e3471dada5b7a)

5 years agoMLK-14445-10 mx7ulp_evk: Enable OCOTP fuse
Ye Li [Fri, 17 Mar 2017 09:52:42 +0000 (17:52 +0800)]
MLK-14445-10 mx7ulp_evk: Enable OCOTP fuse

Add the OCOTP driver and fuse command configurations.

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

5 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)

5 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)

5 years agoMLK-14445-7 DTS: mx7ulp: Add PTA and PTB two GPIO banks
Ye Li [Fri, 17 Mar 2017 08:14:46 +0000 (16:14 +0800)]
MLK-14445-7 DTS: mx7ulp: Add PTA and PTB two GPIO banks

PTA and PTB banks are at M4 domain, but some boards like ARM2 use
them for controlling A7 domain modules. So we may need to support
them in GPIO driver.

In the imx_rgpio2p driver, the non-DM driver supports full 6 GPIO
banks, with PTA from index 0. But the DM driver which uses DTB only
have 4 GPIO banks, with PTC from index 0.

This will cause problem when using GPIO. So this patch add PTA and PTB
banks to DTB, and reorder the sequence for gpio with PTA from index 0.
So the non-DM driver and DM driver are aligned.

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

5 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)

5 years agoMLK-13929-6 mx7ulp_evk: Enable the MIPI DSI splashscreen
Ye Li [Wed, 15 Feb 2017 09:45:17 +0000 (17:45 +0800)]
MLK-13929-6 mx7ulp_evk: Enable the MIPI DSI splashscreen

Enable and setup board level codes for MIPI DSI splashscreen on EVK board.
User needs set env variable"panel=HX8363_WVGA" for displaying.

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

5 years agoMLK-13929-5 mx7ulp: Update clock and SoC functions for video
Ye Li [Wed, 15 Feb 2017 09:38:55 +0000 (17:38 +0800)]
MLK-13929-5 mx7ulp: Update clock and SoC functions for video

Add the clocks functions for enabling LCDIF and DSI clocks.
Also add the arch_preboot_os to disable the video before enter into
the kernel.

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

5 years agoMLK-13929-4 mx7ulp: Update registers and memory map for DSI and LCDIF
Ye Li [Wed, 15 Feb 2017 09:34:10 +0000 (17:34 +0800)]
MLK-13929-4 mx7ulp: Update registers and memory map for DSI and LCDIF

Update the registers base address and LCDIF registers structure for
mx7ulp.

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

5 years agoMLK-13929-3 video: Update LCDIF driver to support MIPI-DSI
Ye Li [Wed, 15 Feb 2017 09:27:31 +0000 (17:27 +0800)]
MLK-13929-3 video: Update LCDIF driver to support MIPI-DSI

The LCDIF provides video source for MIPI DSI host at DPI-2 interface.
When the LCDIF Framebuffer driver is enabled, it uses the panel
parameters setup by environments to create a panel device and register
it to DSI host driver and then enable the DSI host.

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

5 years agoMLK-13929-2 video: Add mipi panel driver for hx8363
Ye Li [Wed, 15 Feb 2017 09:04:08 +0000 (17:04 +0800)]
MLK-13929-2 video: Add mipi panel driver for hx8363

Add the mipi dsi panel driver for device HX8363 from kernel. The panel
driver needs work with mipi_dsi_northwest driver.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 0c6d0f4202bae7f61d38ecff1c9d255261f022f2)
(cherry picked from commit d65bbb0585a906072f01a2d72169be0b13b1d9b8)
(cherry picked from commit 86264cba4b623e8b5bf57049f3e424e1537b7cdd)

5 years agoMLK-13929-1 video: Add MIPI DSI host controller driver for i.MX7ULP
Ye Li [Wed, 15 Feb 2017 08:34:50 +0000 (16:34 +0800)]
MLK-13929-1 video: Add MIPI DSI host controller driver for i.MX7ULP

Add the host driver base from kernel for MIPI DSI controller on i.MX7ULP.
The controller provides a DPI-2 interface for LCDIF video stream, and a APB interface
for packet transmission.

The driver provides APIs to register a MIPI panel device and its driver. The panel
driver can use the write packet function provided by the host driver to send control
packets to panel device via APB interface.

MIPI DSI has its PHY and dedicated PLL. The driver will setup them when enabling the DSI
host.

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

5 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)

5 years agoMLK-14445-4 mx7ulp: Fix wrong i2c configuration name
Ye Li [Thu, 16 Mar 2017 07:59:26 +0000 (15:59 +0800)]
MLK-14445-4 mx7ulp: Fix wrong i2c configuration name

Wrong I2c driver configuration name is used in codes, so I2c driver is
not built. Correct it.

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

5 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)

5 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)

5 years agoMLK-14445-1 mx7ulp: select CONFIG_MX7ULP for EVK board
Ye Li [Thu, 16 Mar 2017 05:31:38 +0000 (13:31 +0800)]
MLK-14445-1 mx7ulp: select CONFIG_MX7ULP for EVK board

Since many drivers need this CONFIG_MX7ULP to distiguish the settings
for i.MX7ULP only. So have to select this kconfig for EVK board.

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

5 years agoMLK-13925-1 mx7ulp_evk: Update LPDDR3 script to V1.4
Ye Li [Tue, 14 Feb 2017 05:39:10 +0000 (13:39 +0800)]
MLK-13925-1 mx7ulp_evk: Update LPDDR3 script to V1.4

Update LPDDR3 script from v1.2 to v1.4 EVK_IMX7ULP1_LPDDR3_320MHz_1GB_32bit_V1.4.inc
with the changes below:

  Version 1.3
    -Update the precharge command to CMD=01 at the DDR initialization phase
  Version 1.4
    -remove unimplemented registers
     Write data bit delay --refer to the DDR_TRIM bits in IOMUXC1_DDR_SW_PAD_CTL_PAD_DDRn

File:
  http://compass.freescale.net/livelink/livelink?func=ll&objid=235761218&objAction=browse&sort=name&viewType=1

Test:
  One EVK board passes overnight stress test.

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

5 years agoMLK-13924 mx7ulp: Fix APLL num and denom setting issue
Ye Li [Tue, 14 Feb 2017 03:39:12 +0000 (11:39 +0800)]
MLK-13924 mx7ulp: Fix APLL num and denom setting issue

For the current APLL setting, as we want the APLL PFD0 to meet DDR clock 320Mhz requirement.
We set MULT to 20, NUM to 4 and DENOM to 2, to get final 22 multiplier. But according to the RM,
the NUM should always be less than the DENOM. So our setting violates the rule.

Actually the ROM has already set the MULT to 22 and leave NUM/DENOM in default value. The calculated APLL PFD0 clock
is 318.9888Mhz, which also meet the DDR requirement.
To fix the issue, we remove the PLL settings in DCD to use default value from ROM, and only set the PFD0 FRAC.

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

5 years agoMLK-13923 mx7ulp: Fix PCC register bits mask and offset issue
Ye Li [Tue, 14 Feb 2017 02:30:18 +0000 (10:30 +0800)]
MLK-13923 mx7ulp: Fix PCC register bits mask and offset issue

The offset for FRAC and the mask for PCD are not correct. If we set FRAC, we
can't get the right frequency. Fix them to correct value.

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

5 years agoMLK-13899 ARM: mx7ulp: Correct the clock index on imx7ulp
Bai Ping [Thu, 9 Feb 2017 05:50:32 +0000 (13:50 +0800)]
MLK-13899 ARM: mx7ulp: Correct the clock index on imx7ulp

On i.MX7ULP, value zero is reserved in SCG1 RCCR register,
so the val should be decreased by 1 to get the correct clock
source index.

Signed-off-by: Bai Ping <ping.bai@nxp.com>
(cherry picked from commit 7c9a3573ec0191f1e0bea12956346a5eab2db43a)
(cherry picked from commit de38b748fcd138ddcae4dda2bcfbf04466c33d21)
(cherry picked from commit 36dded26c8bbbdf57a5588604a14439e10fbdd8b)