u-boot.git
4 years agoMLK-24900 imx8mp ddr4: Align ddr4 QoS to lpddr4
Jian Li [Mon, 19 Oct 2020 02:13:01 +0000 (10:13 +0800)]
MLK-24900 imx8mp ddr4: Align ddr4 QoS to lpddr4

1. align ddr4 Q0S settings to lpddr4
2. adjust PERFHPR1, PERFLPR1, PERFWR1 to reduce HPR,LPR, W
   starving time to avoid display underrun

Signed-off-by: Jian Li <jian.li@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit f0905916886bd45d1dc5d55b25839106457124f5)
(cherry picked from commit 318bc283cba3f71bcccc9839806a485abd07ba1b)

4 years agoLF-2519 video: imx: Update i.MX video drivers' folder
Ye Li [Fri, 16 Oct 2020 07:21:26 +0000 (00:21 -0700)]
LF-2519 video: imx: Update i.MX video drivers' folder

Use drivers/video/nxp as a root folder, move imx as its sub-folder.
Move out the hdp directory from imx into nxp folder, so that we can
share it with other NXP platforms like layerscape. Also update the
hdp codes to align with layerscape.

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

4 years agoMLK-24887 iMX8MM: Add new LPDDR4 EVK support
Ye Li [Mon, 12 Oct 2020 09:00:15 +0000 (02:00 -0700)]
MLK-24887 iMX8MM: Add new LPDDR4 EVK support

Rename old LPDDR4 EVK to EVK-QCA board which uses QCA wifi and BD71847
pmic, assign dedicated u-boot DTS and defconfig for this board, So we
can drop it easily in future.

Set default EVK configuration for new LPDDR4 EVK which uses NXP PCA9540A
PMIC and NXP AW-CM358SM WIFI module.

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

4 years agoMLK-24877-2: imx_env: i.MX8MP/8MN need nandfit partition
Han Xu [Sat, 10 Oct 2020 13:49:46 +0000 (08:49 -0500)]
MLK-24877-2: imx_env: i.MX8MP/8MN need nandfit partition

Add i.MX8MP/MN in imx_env to indicate it needs to burn boot image to fit
partition.

Signed-off-by: Han Xu <han.xu@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 66637530cdab04ffa1e5b771256c73dbcfee4494)
(cherry picked from commit 5c85c58804db365bcaafa6de3a93f2faef94cd3d)

4 years agoMLK-24860-2 imx8mp_evk: Add DDR4 EVK board support
Ye Li [Thu, 24 Sep 2020 05:25:27 +0000 (22:25 -0700)]
MLK-24860-2 imx8mp_evk: Add DDR4 EVK board support

This board uses 4GB DDR4 and replace emmc and flexspi to a raw NAND
socket. Add the support for this board, including SD boot, NAND boot,
and inline ECC (top 1/8 DDR used for ecc).

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

4 years agoMLK-24817 iMX8MN: Add iMX8MN 11x11 DDR3L EVK support
Ye Li [Wed, 16 Sep 2020 14:15:13 +0000 (07:15 -0700)]
MLK-24817 iMX8MN: Add iMX8MN 11x11 DDR3L EVK support

Add relevant configs and DTS for iMX8MN 11x11 DDR3L EVK in SPL/u-boot.
Compared with LPDDR4 EVK, the DDR3L EVK has below changes:
1. DDR is changed to 1GB DDR3L
2. WIFI chip is changed.
3. Power rails changed:
   a) VDD_ARM is combined to VDD_SOC, so disable buck2.
   b) NVCC_DRAM needs 1.35v for DDR3L.
   c) VDD_SOC sets to 0.85v since DDR runs at 1600MTS
4. NO GPU and MIPI display. Splash screen is disabled.

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

4 years agoMLK-24786 imx8dxl_ddr3_evk: Add UUU support to second USB port
Ye Li [Fri, 18 Sep 2020 06:28:57 +0000 (23:28 -0700)]
MLK-24786 imx8dxl_ddr3_evk: Add UUU support to second USB port

Add the second OTG port in "-u-boot" dtsi for SPL, and enable the
USB port auto detection.

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

4 years agoMLK-24788 imx8mp_evk: Update LPDDR4 timing for new FW 202006
Ye Li [Wed, 16 Sep 2020 03:29:34 +0000 (20:29 -0700)]
MLK-24788 imx8mp_evk: Update LPDDR4 timing for new FW 202006

After switching to new LPDDR4 firmware 202006 version, have to
update the LPDDR4 timing accordingly from RPA tool.

Signed-off-by: Ye Li <ye.li@nxp.com>
Tested-by: Sherry Sun <sherry.sun@nxp.com>
Tested-by: Jacky Bai <ping.bai@nxp.com>
Reviewed-by: Jacky Bai <ping.bai@nxp.com>
(cherry picked from commit 0a9cb2f3497a93c50b69c29962e306b4e4484251)
(cherry picked from commit b964bda3801697f3268c21caa2753d6d97ab911c)

4 years agoMLK-24766-10 mtd: spi_dataflash: fix the build warnings
Clark Wang [Mon, 14 Sep 2020 09:06:32 +0000 (17:06 +0800)]
MLK-24766-10 mtd: spi_dataflash: fix the build warnings

size_t used here are "long unsigned int", so use %lx when print it to
avoid the build warnings.

Signed-off-by: Clark Wang <xiaoning.wang@nxp.com>
Reviewed-by: Fugang Duan <fugang.duan@nxp.com>
(cherry picked from commit 1fecb7888699f9b7c9c750c65091b2fdef1da3ac)
(cherry picked from commit 2611572847b9237b1733cc449207f74bf5e20917)

4 years agoMLK-24766-9 configs: imx8qxp_val: enable LPSPI support
Clark Wang [Fri, 11 Sep 2020 07:38:07 +0000 (15:38 +0800)]
MLK-24766-9 configs: imx8qxp_val: enable LPSPI support

Enable LPSPI and DATAFLASH support for imx8qxp-lpddr4-val board.

Signed-off-by: Clark Wang <xiaoning.wang@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Fugang Duan <fugang.duan@nxp.com>
(cherry picked from commit 44c9f17f90081346133f69716b8d3bc5f6cee9f7)
(cherry picked from commit 866f4ed504cf98f511870c402ff691e3ccc8b13f)

4 years agoMLK-24766-8 configs: imx8dxl_evk: enable LPSPI support
Clark Wang [Fri, 11 Sep 2020 07:35:39 +0000 (15:35 +0800)]
MLK-24766-8 configs: imx8dxl_evk: enable LPSPI support

Enable LPSPI driver support for imx8dxl-evk board.

Signed-off-by: Clark Wang <xiaoning.wang@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit fe9e371b0f448a9d4861b22d4c96ab0f2ff7ebb3)
(cherry picked from commit 4e1deee974d3ef1377e8181c5163bdb0d302c623)

4 years agoMLK-24766-7 configs: mx7ulp_evk: enable LPSPI support
Clark Wang [Fri, 11 Sep 2020 07:33:32 +0000 (15:33 +0800)]
MLK-24766-7 configs: mx7ulp_evk: enable LPSPI support

Enable LPSPI driver support for imx7ulp-evk board.

Signed-off-by: Clark Wang <xiaoning.wang@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 765c2c1acf11f74e9927c62774ae890ba81f2a73)
(cherry picked from commit 551951b7c8ab069779fbd2d811a4b7221496e405)

4 years agoMLK-24766-6 arm64: dts: imx8qxp-val: enable lpspi0 support
Clark Wang [Fri, 11 Sep 2020 07:30:34 +0000 (15:30 +0800)]
MLK-24766-6 arm64: dts: imx8qxp-val: enable lpspi0 support

Enable imx8qxp-lpddr4-val lpspi0 with cs-gpios and flash enabled.

Signed-off-by: Clark Wang <xiaoning.wang@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 45a2bee23109ade147e4582a9df11b8bc26fa46b)
(cherry picked from commit 3bc8a257ae9bb5572feff0eecf04acb2df6eeeab)

4 years agoMLK-24766-5 arm64: dts: imx8dxl: enable lpspi3 support
Clark Wang [Fri, 11 Sep 2020 07:24:48 +0000 (15:24 +0800)]
MLK-24766-5 arm64: dts: imx8dxl: enable lpspi3 support

Enable imx8dxl lpspi3 with both cs-gpio and non-cs-gpio enabled.
Non-cs-gpio config is just a configuration example.

Signed-off-by: Clark Wang <xiaoning.wang@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 66429f49e5dac7052cb8fe5fd8853b7586b0ba3a)
(cherry picked from commit c718fa3d1dbc8638278626cf5294ebe360a04859)

4 years agoMLK-24766-4 arm: dts: imx7ulp: enable lpspi3 support
Clark Wang [Fri, 11 Sep 2020 07:20:05 +0000 (15:20 +0800)]
MLK-24766-4 arm: dts: imx7ulp: enable lpspi3 support

Enable imx7ulp lpspi3 with cs-gpios enabled.

Signed-off-by: Clark Wang <xiaoning.wang@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Fugang Duan <fugang.duan@nxp.com>
(cherry picked from commit 2421f9c7744b9dc4c8adb48a41b37c4248801f7a)
(cherry picked from commit afdd3f0bb5b337187e1ea4a5c0510f9c53d6fe91)

4 years agoMLK-24766-3 imx7ulp-clk: add lpspi clk enable function
Clark Wang [Fri, 11 Sep 2020 07:12:36 +0000 (15:12 +0800)]
MLK-24766-3 imx7ulp-clk: add lpspi clk enable function

Enable LPSPI2-3 clock enable and get functions.
Please note that the lpspi's alias should only be set as same as its
module number.

Signed-off-by: Clark Wang <xiaoning.wang@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 132ea95f15f3dcf3408d70eb7879533b412cd521)
(cherry picked from commit a0a365025d16694dcce4fc0a5980067bbd389803)

4 years agoMLK-24766-2 clk-imx8: add the lpspi clock for imx8qxp/8dxl
Clark Wang [Fri, 11 Sep 2020 07:09:52 +0000 (15:09 +0800)]
MLK-24766-2 clk-imx8: add the lpspi clock for imx8qxp/8dxl

Add LPSPI relevant clocks to clk-imx8qxp driver, so LPSPI IMX driver can
set the clocks through DTB.

Signed-off-by: Clark Wang <xiaoning.wang@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit dd6a4a23ac8a774f576bacd6a67ca4d56307df26)
(cherry picked from commit cd9c01bf8621ebf7255a8e89d1d30bf9bd623cbb)

4 years agoMLK-24766-1 spi: fsl_lpspi: add lpspi driver for uboot
Clark Wang [Fri, 11 Sep 2020 06:52:02 +0000 (14:52 +0800)]
MLK-24766-1 spi: fsl_lpspi: add lpspi driver for uboot

Add the LPSPI driver for imx7ulp/8qxp/8dxl/8qm.
Need to enable these two options to use this driver:
CONFIG_DM_SPI=y
CONFIG_FSL_LPSPI=y

Signed-off-by: Clark Wang <xiaoning.wang@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Fugang Duan <fugang.duan@nxp.com>
(cherry picked from commit 01a03144cf1f1cbefd4a829a1980759e1bf57b6a)
(cherry picked from commit 44253969cb8988e0eba4e5a35e2850cf96f7d57f)

4 years agoMLK-24750-2 iMX8DXL: Implement the spl_board_boot_device for EVK and VAL
Ye Li [Tue, 8 Sep 2020 07:45:38 +0000 (00:45 -0700)]
MLK-24750-2 iMX8DXL: Implement the spl_board_boot_device for EVK and VAL

Re-map the boot devices of iMX8DXL EVK and VAL with SPL devices.
DDR3 Validation board does not have eMMC, so SD2 should be the first mmc
device with index 0. Otherwise, mmc uclass will fail to get the device
with default index 1.

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

4 years agoMLK-24750-1 spl: Allow iMX7/8/8M to overwrite spl_board_boot_device
Ye Li [Tue, 8 Sep 2020 07:40:20 +0000 (00:40 -0700)]
MLK-24750-1 spl: Allow iMX7/8/8M to overwrite spl_board_boot_device

Move the default mapping of spl_boot_device to weak function of
spl_board_boot_device. So that every board of iMX7/8/8M can overwrite
this function to implement specific mapping.

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

4 years agoMLK-24720 imx8mq_ddr4_val: Change to use iMX8M DDR driver
Ye Li [Mon, 7 Sep 2020 10:26:58 +0000 (03:26 -0700)]
MLK-24720 imx8mq_ddr4_val: Change to use iMX8M DDR driver

Add the DDR4 timing file generated from RPA tool and update codes to
enable the DDR driver

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Jacky Bai <ping.bai@nxp.com>
(cherry picked from commit 99767e137a4a8fc4a6a3288b5d69779239415b91)
(cherry picked from commit 0e15243062186348e958795051c6f34bd732c6d4)

4 years agoMLK-24616 imx8: misc: Fix hardcoded LPUART0 for LPCG
Ye Li [Wed, 2 Sep 2020 03:34:39 +0000 (20:34 -0700)]
MLK-24616 imx8: misc: Fix hardcoded LPUART0 for LPCG

The LPCG enablement is hardcoded to LPUART0, it causes problem when
customers want to use other UART ports

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

4 years agoMLK-23089 crypto: fsl_caam: add rng prediction resistance support
Horia Geantă [Thu, 16 Apr 2020 17:24:47 +0000 (20:24 +0300)]
MLK-23089 crypto: fsl_caam: add rng prediction resistance support

Instantiate RNG state handles with Prediction Resistance (PR) support.
This way SW further downstream (e.g. REE / TEE OS etc.) is able
to use the "PR" bit in RNG generation descriptors (forcing TRNG
re-seeding before PRNG / DRBG outputs random data).

Note: current patch does not deal with RNG state handles that have
already been initialized, but without PR support.
In this case, RNG state handle would have to be deinstantiated first,
and then reinstantiated with PR support.

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

4 years agoLF-2228 crypto: fsl_caam: fix TRNG max freq. count value for i.MX8M
Horia Geantă [Sun, 13 Sep 2020 18:55:29 +0000 (21:55 +0300)]
LF-2228 crypto: fsl_caam: fix TRNG max freq. count value for i.MX8M

With current RNG usage model in Linux kernel (using PR for each request,
to get entropy), frequency count fails (RTMCTL[FCT_FAIL]=b'1)
are consistently met on i.MX8MQ.
(Note: in these cases, Linux kernel CAAM driver does not perform
TRNG configuration, relying on U-boot / OP-TEE to correctly do this.)

As it turns out, the rtfrqmax value of 0x19000 (3200 << 5)
is not a safe value for i.MX8MQ (M850).

According to TRNG characterization:
"
M815 has an oscillator frequency between 1500MHz and 2100MHz.
M845 has an oscillator frequency between 1400MHz and 2100MHz.
M850 has an oscillator frequency between 1300MHz and 1800MHz.
M865 has an oscillator frequency between  550MHz  and 900MHz.
"

Recommended margins (min,max) for freq. count from HW design:
  freq_mul = RO_freq / TRNG_clk_freq;
  rtfrqmin = (ent_delay x freq_mul) >> 1;
  rtfrqmax = (ent_delay x freq_mul) << 3; [1]

Given current deployments of CAAM in i.MX SoCs, and to simplify
the TRNG configuration, we consider [1,16] to be a safe interval
for the freq_mul and the limits of the interval are used to compute
rtfrqmin, rtfrqmax.
Accordingly, rtfrqmax = ent_delay << 7.

[1] HW design actually advised for:
rtfrqmax = (ent_delay x freq_mul) << 2;
however this doesn't seem enough, at least on i.MX8MQ.

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

4 years agoMLK-24578 usb: ehci-mx6: Fix USB QTD data buffer error
Ye Li [Thu, 27 Aug 2020 07:24:27 +0000 (00:24 -0700)]
MLK-24578 usb: ehci-mx6: Fix USB QTD data buffer error

Some iMX6 platforms will meet "EHCI timed out on TD" when reading
or writing data to USB disk. The root cause is last QTD reports
data buffer error.
Accroding to RM, this event indicates that an overrun of incoming
data or a underrun of outgoing data has occurred for this transaction.
This would generally be caused by the host controller not being able
to access required data buffers in memory within necessary latency
requirements.

Follow kernel's method to fix the issue by disabling stream mode

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peter Chen <peter.chen@nxp.com>
(cherry picked from commit fd4c93e806c902c4a6b6f62db972626eba498552)
(cherry picked from commit 2b2fb8df14ee4088dad489fc5a64658316cdff45)

4 years agoMLK-24504 DTS: imx8dxl: Fix GPIO seq ID issue
Ye Li [Fri, 14 Aug 2020 08:08:36 +0000 (01:08 -0700)]
MLK-24504 DTS: imx8dxl: Fix GPIO seq ID issue

When run "gpio status", found the seq id of GPIOs are not correct.

=> gpio status
Bank gpio@20_:
gpio@20_2: output: 1 [x] ethernet@5b050000.phy-reset-gpios
Device 'gpio@5d080000': seq 0 is in use by 'gpio@20'
Device 'gpio@5d090000': seq 1 is in use by 'gpio@21'
Device 'gpio@5d0a0000': seq 2 is in use by 'gpio@5d080000'
Device 'gpio@5d0b0000': seq 3 is in use by 'gpio@5d090000'

Fix the problem by adding alias to GPIO expander devices to avoid
expander devices occupy the seq of normal GPIO.
Also disable I2C3 bus, because it is assigned to M4 partition, and
u-boot never use it. So that we don't need to handle pca6416_c

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

4 years agoMLK-24492 mx7 Align IOMUX GRP offset with mx6
Silvano di Ninno [Fri, 14 Aug 2020 07:20:02 +0000 (09:20 +0200)]
MLK-24492 mx7 Align IOMUX GRP offset with mx6

i.MX 6 and i.MX 7 do not have the same offset from IOMUXC_BASE_ADDR
for the IOMUX GRP.
Try to align both structure.

Signed-off-by: Silvano di Ninno <silvano.dininno@nxp.com>
(cherry picked from commit 3d80f811dad882d8fe950dabee934bd3a1bf86b5)
(cherry picked from commit 19b2fbbba43d6f339f32a81d47659835f65ee4e6)

4 years agoMLK-24474: Add command to set SECO FIPS mode
Franck LENORMAND [Fri, 24 Jul 2020 12:10:01 +0000 (14:10 +0200)]
MLK-24474: Add command to set SECO FIPS mode

Add a user command to be able to program the FIPS mode.

This patchs adds the command to set it. Because the FIPS
configuration relies on fuse programming, this operation
must not be performed on any board so the command include
a check to validate the choice of the user.

The uboot is not allowed to perform the operation itself
because the SCFW API checks the caller has "SYSTEM" rights.
Instead we call the ATF which exposes a SIP call to set
the mode of the FIPS.

Signed-off-by: Franck LENORMAND <franck.lenormand@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 1fa41471f7745fe3a597b0d1a4eb2cc0aed97b7d)
(cherry picked from commit 89f8c362ec49fd04227a1cc3f65a824f9577d515)

4 years agoMLK-24482 imx8dxl: Update chip revision to recognize A1
Ye Li [Tue, 11 Aug 2020 03:32:39 +0000 (20:32 -0700)]
MLK-24482 imx8dxl: Update chip revision to recognize A1

8DXL A1 revision uses same id register value with revision B,
so A1 chip is recognized as RevB. Add new dummy chip revision for
8DXL A1 and A2 to distinguish with of RevB and RevC

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

4 years agoMLK-24479 DTS: imx8dxl-evk: Update and enable PCIE
Ye Li [Mon, 10 Aug 2020 09:57:45 +0000 (02:57 -0700)]
MLK-24479 DTS: imx8dxl-evk: Update and enable PCIE

Update PCIE and epdev nodes to enable PCIE on iMX8DXL EVK board,
use internal pcie refer clock by default.

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

4 years agoLF-1832 video: ipu_disp: Fix potential division by zero
Ye Li [Tue, 4 Aug 2020 08:46:37 +0000 (01:46 -0700)]
LF-1832 video: ipu_disp: Fix potential division by zero

Fix coverity issue 56278. In ipu_init_sync_panel, rounded_pixel_clk
is possible 0 returned from clk_round_rate. Then following codes to
get the div will have division by zero. Adding a check with 0 to fix
the issue.

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

4 years agoLF-1863 misc: scu_api: Remove the NULL checking
Ye Li [Tue, 4 Aug 2020 04:05:07 +0000 (21:05 -0700)]
LF-1863 misc: scu_api: Remove the NULL checking

Fix Coverity issue 9006652. In sc_seco_secvio_dgo_config, the data pointer
is dereferenced earlier than NULL checking. Following the SCFW API, remove
the NULL checking, always assume the data pointer is valid, because it is
also a TX parameter.

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

4 years agoLF-1873 imx8: snvs_security: Fix dead code in apply_tamper_pin_list_config
Ye Li [Mon, 3 Aug 2020 10:16:09 +0000 (03:16 -0700)]
LF-1873 imx8: snvs_security: Fix dead code in apply_tamper_pin_list_config

Fix Coverity Issue 10045167. In apply_tamper_pin_list_config, code
can never be reached because of a logical contradiction, because the
'sciErr' is not assigned to pad_write.

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

4 years agoLF-1876 imx8: snvs_security: Fix dead code in apply_snvs_dgo_config
Ye Li [Mon, 3 Aug 2020 10:06:22 +0000 (03:06 -0700)]
LF-1876 imx8: snvs_security: Fix dead code in apply_snvs_dgo_config

Fix Coverity Issue 10045175. In apply_snvs_dgo_config, code can never
be reached because of a logical contradiction. So assign the sciErr
to dgo_write return.

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

4 years agoMLK-24461 DXL: Enable second USB 8DXL
Frank Li [Tue, 4 Aug 2020 02:18:04 +0000 (21:18 -0500)]
MLK-24461 DXL: Enable second USB 8DXL

DXL A1 support boot from second USB port

Signed-off-by: Frank Li <Frank.Li@nxp.com>
(cherry picked from commit 5726315f05fce3dd91b3a5d4caf71f8a0b2445e4)
(cherry picked from commit 49c2efd0188c093fb8ea019b412d3d80d6714f2d)

4 years agoMLK-24434 imx8mn: Add low drive mode support for DDR4/LPDDR4 EVK
Ye Li [Tue, 14 Jul 2020 02:03:35 +0000 (19:03 -0700)]
MLK-24434 imx8mn: Add low drive mode support for DDR4/LPDDR4 EVK

Add dedicated defconfigs for iMX8MN low drive mode which set the VDD_SOC
and VDD_DRAM to 0.8v, DDR at 1600MTS (800Mhz clock) and GPU at 200Mhz.

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

4 years agoMLK-24426-3 imx8: Move build_info to board_late_init
Ye Li [Mon, 20 Jul 2020 08:58:22 +0000 (01:58 -0700)]
MLK-24426-3 imx8: Move build_info to board_late_init

Currently we call the build_info in checkboard which is a board_f
function. At this moment the u-boot env is not ready, so we can't
set any variable successfully in build_info. So moving the call to
board_late_init to fix the problem.

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

4 years agoMLK-24426-2 iMX8DXL: Print the V2X FW build info
Ye Li [Mon, 20 Jul 2020 08:55:43 +0000 (01:55 -0700)]
MLK-24426-2 iMX8DXL: Print the V2X FW build info

Print the version and commit of V2X firmware in u-boot log when
SCFW has supported this new API.

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

4 years agoMLK-24426-1 misc: imx8: Update SCFW API to get V2X build info
Ye Li [Mon, 20 Jul 2020 08:53:13 +0000 (01:53 -0700)]
MLK-24426-1 misc: imx8: Update SCFW API to get V2X build info

Update SCFW API to add sc_seco_v2x_build_info API which can
get the version and commit of V2X firmware on 8DXL

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

4 years agoMLK-24406 arm: dts: imx8dxl: limit the max frequency to 100MHz for SD card
Haibo Chen [Wed, 15 Jul 2020 10:52:31 +0000 (18:52 +0800)]
MLK-24406 arm: dts: imx8dxl: limit the max frequency to 100MHz for SD card

Due to imx8dxl evk/val board limitation, config the max clock rate to
100MHz for SD card, otherwise can't pass tuning.

Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
(cherry picked from commit 4452029c2c2bacc7e36c352e18f128e151597396)
(cherry picked from commit b23fc553bcc1dc92e6cb7af0fb50de62f4748d49)

4 years agoMLK-24380 imx6: Enlarge the console I/O buffer to 1024
Ye Li [Tue, 7 Jul 2020 07:55:40 +0000 (00:55 -0700)]
MLK-24380 imx6: Enlarge the console I/O buffer to 1024

Enlarge the CONFIG_SYS_CBSIZE to 1024 bytes, because we have some
env variables with long script string and exceed the 512. Then when
printing the env, the tail of the string is truncated.

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

4 years agoMLK-24379-2 imx8: Configure SNVS driver to u-boot only
Ye Li [Tue, 7 Jul 2020 06:12:43 +0000 (23:12 -0700)]
MLK-24379-2 imx8: Configure SNVS driver to u-boot only

Current makefile will include the SNVS driver to SPL. Since this
driver only works in u-boot, remove it from SPL and save the image
size.

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

4 years agoMLK-24379-1 imx8: Fix build warnings in SNVS tamper driver
Ye Li [Tue, 7 Jul 2020 06:09:25 +0000 (23:09 -0700)]
MLK-24379-1 imx8: Fix build warnings in SNVS tamper driver

Fix the "defined but not used" build warnings from functions and structures
defined in SNVS driver and its board file

Signed-off-by: Ye Li <ye.li@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 8255c1ac711b506e3a335295f74c6b186d8b5034)
(cherry picked from commit 29d164ac5bdc7aa9ebc49212ecd8d3eb8ff6d2a4)

4 years agoMLK-24377 imx8mq: Remove clearing mfg prot private key
Ye Li [Tue, 7 Jul 2020 03:31:56 +0000 (20:31 -0700)]
MLK-24377 imx8mq: Remove clearing mfg prot private key

In patch "MLK-22749 imx8mq: Add workaround to fix sticky bits lock up",
we clear the manufactory protection private key to workaround
the HAB issue. According to detail analysis in KBL-5961, this action
is not needed. HAB will clear the key according the unlock command in CSF.

- if the HDMI FW CSF signature does not include the Unlock command related
  to MFG feature, the MPPrivK is cleared.
- if the HDMI FW CSF signature contains this Unlock command, the MPPrivK
  clearing decision is postponed to the next CSF signature.

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

4 years agoMLK-24381 imx8mp_evk: Reserve Mcore vring/buffer memory
Ye Li [Tue, 7 Jul 2020 03:19:53 +0000 (20:19 -0700)]
MLK-24381 imx8mp_evk: Reserve Mcore vring/buffer memory

When running with OPTEE, reserve 16MB memory for Mcore vring/buffer.
After u-boot bootaux Mcore, Mcore image will set its resources table
at vring address. Without the reservation, the u-boot runtime memory
may conflict with it.

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

4 years agoMLK-24362-6 doc: imx: habv4: mx8m_secure_boot.txt: Remove fuse commands as list is...
Vanessa Maegima [Fri, 26 Jun 2020 19:08:09 +0000 (16:08 -0300)]
MLK-24362-6 doc: imx: habv4: mx8m_secure_boot.txt: Remove fuse commands as list is incomplete

The list of fuses to completely secure the device is incomplete and users
should refer to the latest version of AN4581 for this information.

This list is not enough to completely secure the device, so remove this.

Signed-off-by: Vanessa Maegima <vanessa.maegima@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 8526d8c3593f6fdaf79b809ddb932359f336c076)
(cherry picked from commit 8971f682ab18c032e796770283671e7f0d31823c)

4 years agoMLK-24362-5 doc: imx: ahab/habv4: Remove mentions to a specific CST version
Vanessa Maegima [Thu, 25 Jun 2020 18:45:37 +0000 (15:45 -0300)]
MLK-24362-5 doc: imx: ahab/habv4: Remove mentions to a specific CST version

The mentioned CST PKI tree generation commands are compatible with the
newer versions of the tool, so there is no need to hardcode the CST
version. Add this information in the documentation.

Signed-off-by: Vanessa Maegima <vanessa.maegima@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 8195a6614fcad1c763ba2d0037ec0a33a84546a8)
(cherry picked from commit b15f9f59226dbead608eebb3658752a883879711)

4 years agoMLK-24362-4 doc: imx: habv4: Add information for secure boot in SDP mode
Vanessa Maegima [Thu, 25 Jun 2020 14:58:44 +0000 (11:58 -0300)]
MLK-24362-4 doc: imx: habv4: Add information for secure boot in SDP mode

Add references to the UUU documentation on how to perform secure boot
in SDP mode.

Signed-off-by: Vanessa Maegima <vanessa.maegima@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 59942641eaef22cbd9993bbdb58f250006d5e15a)
(cherry picked from commit 06d607bc6940a784cafb7e9350fa4188872b3b92)

4 years agoMLK-24362-3 doc: imx: ahab: Fix app notes references
Vanessa Maegima [Thu, 25 Jun 2020 14:43:23 +0000 (11:43 -0300)]
MLK-24362-3 doc: imx: ahab: Fix app notes references

Remove AN revisions so it is not needed to update this when new versions are
released.

Signed-off-by: Vanessa Maegima <vanessa.maegima@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit f7bbe3459d6491bfba5390d5f9ec57b1baef0298)
(cherry picked from commit 129cb6c82379ce19f665ff18a5abb9aa63a94f93)

4 years agoMLK-24362-2 doc: imx: habv4: Fix app notes references
Vanessa Maegima [Thu, 25 Jun 2020 14:27:51 +0000 (11:27 -0300)]
MLK-24362-2 doc: imx: habv4: Fix app notes references

Remove AN revisions so it is not needed to update this when new versions are
released.
Fix AN4581 app note name.

Signed-off-by: Vanessa Maegima <vanessa.maegima@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit a9af7ba07c7aaf4892f1eba25963899506cec534)
(cherry picked from commit 22b7e87707fc830aeff4344208bce12b27522828)

4 years agoMLK-24362-1 doc: imx: ahab: csf_examples: Fix typo in file name
Vanessa Maegima [Thu, 25 Jun 2020 14:00:51 +0000 (11:00 -0300)]
MLK-24362-1 doc: imx: ahab: csf_examples: Fix typo in file name

Old file name referred to "cst" instead of "csf".
Fix this.

Signed-off-by: Vanessa Maegima <vanessa.maegima@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 45e06de429f65d1444989c8ed47d0ac209dc7f74)
(cherry picked from commit 1b6fb7426c82c89d6385123f4830b57ff3a19675)

4 years agoMLK-23834: Fix SNVS configuration of AT polynomials
Franck LENORMAND [Fri, 15 May 2020 10:35:06 +0000 (12:35 +0200)]
MLK-23834: Fix SNVS configuration of AT polynomials

Due to typo, some polynomials could not be configured as expected.

This patch fixed the typos.

Signed-off-by: Franck LENORMAND <franck.lenormand@nxp.com>
(cherry picked from commit f2bf01d99e8f65b98328e9b175cc32fbe4b88adc)
(cherry picked from commit c0fcd4bfeabd7406724199cd32f85bfe6db5f3b1)

4 years agoMLK-23834: Add gpio_conf command to configure GPIO
Franck LENORMAND [Thu, 14 May 2020 08:37:02 +0000 (10:37 +0200)]
MLK-23834: Add gpio_conf command to configure GPIO

This patch adds a command to configure the GPIO from uboot
shell in order to be able to configure the tampers by hand.

Signed-off-by: Franck LENORMAND <franck.lenormand@nxp.com>
(cherry picked from commit 6d9db1b243d5826f3f36e96dcbbc2b7d56569a5a)
(cherry picked from commit 6379d82d902ab950a622d800d45791ddeace4e41)

4 years agoMLK-23834: handle tampers which are not GPIO
Franck LENORMAND [Mon, 4 May 2020 09:15:09 +0000 (11:15 +0200)]
MLK-23834: handle tampers which are not GPIO

Some tampers are not controlled by GPIO, in this case there
is no assigned pins/pad so no need to configure it.

Signed-off-by: Franck LENORMAND <franck.lenormand@nxp.com>
(cherry picked from commit 388efa59f3367a1c521f75ee25009b6db83d5056)
(cherry picked from commit a643a5be00b8c16c5c08b6081074db2ff8a32c38)

4 years agoMLK-23834: Remove example functions to avoid compilation break
Franck LENORMAND [Fri, 19 Jun 2020 09:27:40 +0000 (11:27 +0200)]
MLK-23834: Remove example functions to avoid compilation break

The function example() in snvs_security_sc.c was using symbols
which are not necessarly defined for all boards.

This patch removes it.

Signed-off-by: Franck LENORMAND <franck.lenormand@nxp.com>
(cherry picked from commit 18f3805faea5949ab69ad39db27ee40fdcecebed)
(cherry picked from commit b01612309c0c1a85a4b44ae9202f90719e97a578)

4 years agoMLK-23834: Move SNVS board config to headers files
Franck LENORMAND [Fri, 24 Apr 2020 17:03:10 +0000 (19:03 +0200)]
MLK-23834: Move SNVS board config to headers files

Separate the different configuration of the SNVS and DGO for
the different platforms.

It allows to easily add or change the configuration for a
specific board.

In each configuration file, the following configuration are
predefined:
 - tamper connected to a ground line
 - tamper connected to a vcc line
 - tamper configured as active line

Signed-off-by: Franck LENORMAND <franck.lenormand@nxp.com>
(cherry picked from commit 8294483682787f0627c514ec5333c853b16ada10)
(cherry picked from commit fe44d894e488b8fda57f0c37f2fe2f2238097b71)

4 years agoMLK-24349 crypto: fsl: Disable CAAM_64BIT for iMX8/8x platforms
Ye Li [Mon, 22 Jun 2020 06:47:37 +0000 (23:47 -0700)]
MLK-24349 crypto: fsl: Disable CAAM_64BIT for iMX8/8x platforms

Android uses FSL_CAAM_KB driver on iMX8QM/QXP to generate and decap
key blob, however this driver also uses the header file from
driver/crypto/fsl. Since we don't disable CAAM_64BIT for imx8/8x
platforms, this cause android's FSL_CAAM_KB driver failed to work.

Fix this problem by adding ARCH_IMX8 to exclude the CAAM_64BIT.

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

4 years agoMLK-24270 mx6: Enable bmode command on iMX6 boards
Ye Li [Thu, 11 Jun 2020 08:23:06 +0000 (01:23 -0700)]
MLK-24270 mx6: Enable bmode command on iMX6 boards

CONFIG_CMD_BMODE is default enabled for iMX6, but some iMX reference
boards has disabled it in defconfig. Change to re-enable it.

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

4 years agoMLK-24254-3 imx8: spl: Support booting from secondary container set
Ye Li [Wed, 3 Jun 2020 09:57:49 +0000 (02:57 -0700)]
MLK-24254-3 imx8: spl: Support booting from secondary container set

Add the support for loading image from secondary container set on
iMX8QM B0, iMX8QXP C0, iMX8DXL A0.

Using the SCFW API to get container set index, if it is the secondary
boot, get the offset from fuse and apply to offset of current container
set beginning for loading.

Also override the emmc boot partition to check secondary boot and switch
to the other boot part.

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

4 years agoMLK-24254-2 spl: mmc: Move the eMMC boot part index to weak function
Ye Li [Wed, 3 Jun 2020 09:48:04 +0000 (02:48 -0700)]
MLK-24254-2 spl: mmc: Move the eMMC boot part index to weak function

Move the default eMMC boot partition index used for SPL load to a weak
function. So we can override it in iMX8 specified codes.
Because on iMX8 when the emmc regular boot is from boot part0/1, ROM
will switch to the other boot part for secondary boot. So we can't
directly use the boot part index in PARTITION_CONFIG register. But have
to check the secondary boot for using the other part.

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

4 years agoMLK-24149 arm: imx8mp: update i.MX8MP pin header
Peng Fan [Mon, 25 May 2020 10:04:37 +0000 (18:04 +0800)]
MLK-24149 arm: imx8mp: update i.MX8MP pin header

Update i.mx8mp pinfunc.h according to RM REV C.

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

4 years agoMLK-24192-3 pci: pcie_imx: Enable some LPCG clocks for iMX8
Ye Li [Thu, 28 May 2020 10:31:59 +0000 (03:31 -0700)]
MLK-24192-3 pci: pcie_imx: Enable some LPCG clocks for iMX8

Align the kernel's clocks enablement to enable the phy_per, misc_per
clocks for all iMX8, and enable pciex2_per and pcie_phy_pclk for
pcieb controller of iMX8QM.

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

4 years agoMLK-24192-2 DTS: imx8qm/qxp/dxl: Update PCIE clocks
Ye Li [Thu, 28 May 2020 10:29:17 +0000 (03:29 -0700)]
MLK-24192-2 DTS: imx8qm/qxp/dxl: Update PCIE clocks

Update PCIE clocks to align with latest v5.4 kernel, otherwise we
may miss some LPCG clocks in u-boot and have potential problem if
they have been disabled in kernel during partition reboot.

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

4 years agoMLK-24192-1 lpuart: Enable IPG clock
Ye Li [Thu, 28 May 2020 10:24:21 +0000 (03:24 -0700)]
MLK-24192-1 lpuart: Enable IPG clock

Current codes only ennable the PER clock. However on iMX8 the LPUART
also needs IPG clock which is an LPCG. Should not depend on the default
LPCG setting.

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

4 years agoMLK-23820 imx8mq/mm: Add config to support secondary image boot
Ye Li [Wed, 27 May 2020 10:33:38 +0000 (03:33 -0700)]
MLK-23820 imx8mq/mm: Add config to support secondary image boot

When primary image boot is failed, ROM will select secondary image to
boot if SIT (secondary image table) exists. However, SPL does not know
the secondary boot, still loads the FIT from the position of primary image.

Introduce a config to add secondary image sector offset to FIT sector
offset. This config is default set to 0. Secondary image should configure
it to the same value of firstSectorNumber field in SIT.

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

4 years agoMLK-24188-2 mmc: fsl_esdhc_imx: enable AHB/IPG clk
Peng Fan [Thu, 28 May 2020 07:20:02 +0000 (15:20 +0800)]
MLK-24188-2 mmc: fsl_esdhc_imx: enable AHB/IPG clk

Only enable PER clk is not enough, we also need to enable AHB/IPG clk.

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

4 years agoMLK-24188-1 imx8: add AHB clk for SDHC
Peng Fan [Thu, 28 May 2020 07:17:22 +0000 (15:17 +0800)]
MLK-24188-1 imx8: add AHB clk for SDHC

Add AHB clk for SDHC, without AHB clock, sdhc cmd will not finish.

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

4 years agoMLK-24185: dts: imx8qxp: include the u-boot dtsi in gpmi dts
Han Xu [Thu, 28 May 2020 02:25:08 +0000 (21:25 -0500)]
MLK-24185: dts: imx8qxp: include the u-boot dtsi in gpmi dts

include the fsl-imx8qxp-lpddr4-val-u-boot.dtsi explicitly in
imx8qxp-lpddr4-val-gpmi-nand.dts, otherwise boot image failed to boot
due to some power domains were not enabled.

Signed-off-by: Han Xu <han.xu@nxp.com>
(cherry picked from commit 35d24ccb1bc046821cd2d3f2934bc3866306c2b6)

4 years agoMLK-24179 imx8/8x: Enable u-boot EXT4/EXT2 relevant commands
Ye Li [Wed, 27 May 2020 08:31:18 +0000 (01:31 -0700)]
MLK-24179 imx8/8x: Enable u-boot EXT4/EXT2 relevant commands

Need these EXT filesystem commands for i.MX Debian/ubuntu distro
enablement. And have enabled them on other imx8m/mx6/mx7 platforms

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

4 years agoMLK-24079 imx8mp: Disable DWC3 gadget before UUU jumping to kernel
Ye Li [Thu, 21 May 2020 10:26:34 +0000 (03:26 -0700)]
MLK-24079 imx8mp: Disable DWC3 gadget before UUU jumping to kernel

When UUU runs acmd command to boot into kernel, the fastboot never
get chance to exit, so the usb gadget is not disconnected. This causes
kernel USB gadget failed to work.

Re-use iMX8MQ implementation to disconnect DWC3 gadget before jumping
to kernel.

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

4 years agoMLK-24062-5 DTS: imx8qm: Remove unused nodes from DTS
Ye Li [Tue, 19 May 2020 05:30:45 +0000 (22:30 -0700)]
MLK-24062-5 DTS: imx8qm: Remove unused nodes from DTS

Current iMX8QM DTSi is a version with full nodes, but this introduces
overhead in u-boot initf_dm phase because the initf_dm will search all
subnodes of the root. This is does not like SPL which has slimmed the
DTB.

During initf_dm the dcache is not enabled, so the overhead is large
if we have many unused nodes in the DTS. This patch removed iMX8QM
nodes those we won't ever used in SPL/u-boot, like VPU/GPU, Audio,
camera, M4 i2c, flexcan, pwm, etc.

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

4 years agoMLK-24062-4 usb: ehci-mx6: Improve the bind function
Ye Li [Tue, 19 May 2020 05:27:57 +0000 (22:27 -0700)]
MLK-24062-4 usb: ehci-mx6: Improve the bind function

To avoid calling devfdt_get_addr_index in bind, which introduces
much overhead, checks the req_seq and only call the devfdt_get_addr_index
when the req_seq (usb alias) is not set in DTS

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

4 years agoMLK-24062-1 misc: scu: Remove child dev bind
Ye Li [Tue, 19 May 2020 03:41:38 +0000 (20:41 -0700)]
MLK-24062-1 misc: scu: Remove child dev bind

Remove the child device binding codes for clk and iomux nodes, because
the misc uclass has added such operation in post-bind. If we keep the
codes in scu bind, child devices will be created twices. Find the
problem by "dm uclass" command.

uclass 24: clk
0   * clk @ fce22380, seq 0, (req -1)
1     clk @ fce23110

uclass 67: pinctrl
0   * iomuxc @ fce22470, seq 0, (req -1)
1     iomuxc @ fce231c0

After the fix:

uclass 24: clk
0   * clk @ fce22380, seq 0, (req -1)

uclass 67: pinctrl
0   * iomuxc @ fce22470, seq 0, (req -1)

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

4 years agoMLK-23871 imx: Increase ENET PHY negotiation timeout for all iMX
Ye Li [Fri, 15 May 2020 05:15:14 +0000 (22:15 -0700)]
MLK-23871 imx: Increase ENET PHY negotiation timeout for all iMX

Found the default negotiation timeout 4s is not enough in our test
environment. Increase it to 20s to avoid timeout.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Fugang Duan <fugang.duan@nxp.com>
(cherry picked from commit 60bb4d5a27b9444ad4e8ca1b948ac8c54e28d856)

4 years agoMLK-24001 video: imx8m: Fix DCSS shut down issue when HDMI FW is not loaded
Ye Li [Wed, 13 May 2020 09:27:41 +0000 (02:27 -0700)]
MLK-24001 video: imx8m: Fix DCSS shut down issue when HDMI FW is not loaded

When HDMI FW is not loaded by ROM, for example uuu download, or without FW
in boot image. The DCSS driver still disable HDMI and shut itself, this causes
hang before booting kernel.

Add a flag for indicating whether the display is enabled, and check it in
device remove.

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

4 years agoMLK-23813 imx8: fuse: Skip ECC fuses check according to env variable
Ye Li [Tue, 12 May 2020 06:33:37 +0000 (23:33 -0700)]
MLK-23813 imx8: fuse: Skip ECC fuses check according to env variable

Currently it's not possible to use UUU to program ECC words. U-Boot is
asking for a second confirmation when programming ECC covered words.
Introduce a environment variable "force_prog_ecc", if the env is set
to "y" or "1", then the ecc fuse checking is skipped.

In uuu usage, just set this variable in uuu script, then there is no
second confirmation needed.

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

4 years agoMLK-23964-27 mx6sabre: Enable the IPU video splash screen
Ye Li [Sun, 10 May 2020 16:39:19 +0000 (09:39 -0700)]
MLK-23964-27 mx6sabre: Enable the IPU video splash screen

The splash screen with DM video needs use bmp_display which needs
enables CONFIG_CMD_BMP. Also changes the splashimage address from
load address to a unused address 0x28000000.

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

4 years agoMLK-23964-26 mx7dsabresd: Convert to DM video and enable splash screen
Ye Li [Sun, 10 May 2020 15:01:17 +0000 (08:01 -0700)]
MLK-23964-26 mx7dsabresd: Convert to DM video and enable splash screen

Enable the splash screen basing on video link and DM video
Update the DTS to fix the bpp in lcdif node and add alias

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

4 years agoMLK-23964-25 imx6sll_evk: Enable splash screen
Ye Li [Sun, 10 May 2020 13:50:28 +0000 (06:50 -0700)]
MLK-23964-25 imx6sll_evk: Enable splash screen

Enable the splash screen basing on video link
Update the DTS to fix the bpp in lcdif node and add alias

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

4 years agoMLK-23964-24 imx6ul/imx6ull: Enable splash screen for EVK board
Ye Li [Sun, 10 May 2020 09:57:06 +0000 (02:57 -0700)]
MLK-23964-24 imx6ul/imx6ull: Enable splash screen for EVK board

Enable the splash screen basing on video link for all iMX6UL/iMX6ULL
9x9 EVK and 14x14 EVK boards.
Update the DTS to add lcd timing and fix the bpp

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

4 years agoMLK-23964-23 imx7ulp_evk: Enable the rm68200 mipi panel for splash screen
Ye Li [Wed, 20 Nov 2019 07:00:07 +0000 (23:00 -0800)]
MLK-23964-23 imx7ulp_evk: Enable the rm68200 mipi panel for splash screen

Update DTS for LCDIF, MIPI DSI and panel relevant nodes.
Enable the video drivers and splash screen in board codse

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

4 years agoMLK-24437-2 video: nw_dsi_imx: Fix to poll IRQ status register
Ye Li [Thu, 23 Jul 2020 03:19:04 +0000 (20:19 -0700)]
MLK-24437-2 video: nw_dsi_imx: Fix to poll IRQ status register

When polling the packet transfer done, should read the IRQ status
register not PKT status register. The IRQ status register is cleared
by read while PKT status register won't clear.
Also remove 10ms delay after changed to IRQ status register.

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

4 years agoMLK-24437-1 video: nw_dsi_imx: Fix initialization sequence
Ye Li [Thu, 23 Jul 2020 02:48:07 +0000 (19:48 -0700)]
MLK-24437-1 video: nw_dsi_imx: Fix initialization sequence

According to RM, doing initialization should assert the reset domain
signals first, then enable the DSI related clocks in SCG. However,
current implementation reverses the order and we found it will cause
the MIPI_DSI_HOST_APB_PKT_IF0_DSI_HOST_IRQ_STATUS not be cleared
completely after reset. Because the IRQ mask have been cleared during
reset, then a IRQ is rised and pend in GIC and finally cause kernel
panic issue.

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

4 years agoMLK-23964-22 video: Add imx7ulp mipi dsi driver support
Ye Li [Wed, 20 Nov 2019 06:59:03 +0000 (22:59 -0800)]
MLK-23964-22 video: Add imx7ulp mipi dsi driver support

Add driver the northwest MIPI DSI controller which is used on iMX7ULP.

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

4 years agoMLK-23964-21 imx8mp_evk: Enable video splash screen on LPDDR4 EVK
Ye Li [Sun, 10 May 2020 05:51:51 +0000 (22:51 -0700)]
MLK-23964-21 imx8mp_evk: Enable video splash screen on LPDDR4 EVK

Update board codes and DTS files to add display relevant nodes and
configurations.
Support two video links with MIPI DSI:
1. MIPI DSI to HDMI convertor, this is default
2. RM67191 panel

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

4 years agoMLK-23964-20 video: lcdifv3: Add video driver for iMX LCDIFv3
Ye Li [Sun, 10 May 2020 05:49:06 +0000 (22:49 -0700)]
MLK-23964-20 video: lcdifv3: Add video driver for iMX LCDIFv3

iMX8MP introduces a new LCDIF named LCDIFv3 as a video controller to
output data to mipi dsi

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

4 years agoMLK-23964-19 video: sec_dsim_imx: Update DSI driver to support imx8mp
Ye Li [Sun, 10 May 2020 02:56:40 +0000 (19:56 -0700)]
MLK-23964-19 video: sec_dsim_imx: Update DSI driver to support imx8mp

iMX8MP does not have dispmix resets, so allowing not have this
property.

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

4 years agoMLK-23964-18 imx8mn_evk: Enable video splash screen on DDR4 and LPDDR4 EVK
Ye Li [Sat, 9 May 2020 17:50:28 +0000 (10:50 -0700)]
MLK-23964-18 imx8mn_evk: Enable video splash screen on DDR4 and LPDDR4 EVK

Update board codes and DTS files to add display relevant nodes and
configurations.
Support two video links with MIPI DSI:
1. MIPI DSI to HDMI convertor, this is default
2. RM67191 panel

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

4 years agoMLK-23964-17 imx8mm_evk: Enable video splash screen on DDR4 and LPDDR4 EVK
Ye Li [Sat, 9 May 2020 13:55:37 +0000 (06:55 -0700)]
MLK-23964-17 imx8mm_evk: Enable video splash screen on DDR4 and LPDDR4 EVK

Update board codes and DTS files to add display relevant nodes and
configurations.
Support two video links with MIPI DSI:
1. MIPI DSI to HDMI convertor, this is default
2. RM67191 panel

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

4 years agoMLK-23964-16 video: Add video drivers for iMX8MM/iMX8MN display
Ye Li [Sat, 9 May 2020 10:20:22 +0000 (03:20 -0700)]
MLK-23964-16 video: Add video drivers for iMX8MM/iMX8MN display

Update mxsfb for LCD video driver, add mipi dsi driver,
ADV7535 and raydium-rm67191 panel drivers.

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

4 years agoMLK-23964-15 reset: Add reset driver for iMX8M display mix
Ye Li [Sat, 9 May 2020 10:17:26 +0000 (03:17 -0700)]
MLK-23964-15 reset: Add reset driver for iMX8M display mix

iMX8M dispmix uses GPR registers for display modules in
the mix. Implement a reset driver to use DTB

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

4 years agoMLK-23964-14 imx8mq_evk: Enable HDMI driver and splash screen
Ye Li [Sat, 9 May 2020 07:32:18 +0000 (00:32 -0700)]
MLK-23964-14 imx8mq_evk: Enable HDMI driver and splash screen

Update DTS to add DCSS and HDMI nodes and enable
HDMI splash screen on imx8mq evk

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

4 years agoMLK-23964-13 imx8mq: Add power and clock settings for HDMI splash screen
Ye Li [Tue, 3 Dec 2019 09:06:46 +0000 (01:06 -0800)]
MLK-23964-13 imx8mq: Add power and clock settings for HDMI splash screen

Implement the power on and clock settings for DCSS and HDMI drivers

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

4 years agoMLK-23964-12 video: Add iMX8MQ video drivers for HDMI display
Ye Li [Tue, 3 Dec 2019 09:05:42 +0000 (01:05 -0800)]
MLK-23964-12 video: Add iMX8MQ video drivers for HDMI display

Add DCSS video driver and HDMI display driver to adapt with HDP library

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

4 years agoMLK-23964-11 imx8qxp_mek: Enable the splash screen and video drivers
Ye Li [Sat, 9 May 2020 02:23:11 +0000 (19:23 -0700)]
MLK-23964-11 imx8qxp_mek: Enable the splash screen and video drivers

Update the DTS to add video relevants nodes and alias.
Enable the configurations iMX8 video, bridge and display drivers to
show splash screen

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

4 years agoMLK-23964-10 imx8qm_mek: Enable splash screen and video drivers
Ye Li [Fri, 8 May 2020 17:44:53 +0000 (10:44 -0700)]
MLK-23964-10 imx8qm_mek: Enable splash screen and video drivers

Update iMX8QM and MEK board DTS to add display relevant nodes and alias.
Add splash screen and video drivers configurations

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

4 years agoMLK-23964-9 video: imx8: Add DM video, bridge, and display driver
Ye Li [Fri, 8 May 2020 16:53:43 +0000 (09:53 -0700)]
MLK-23964-9 video: imx8: Add DM video, bridge, and display driver

Add video driver for DPU, display driver for LVDS and bridge driver
for it6263 LVDS to HDMI convertor

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

4 years agoMLK-23964-8 video: Enable DM_UC_FLAG_SEQ_ALIAS for display and bridge
Ye Li [Fri, 8 May 2020 16:51:14 +0000 (09:51 -0700)]
MLK-23964-8 video: Enable DM_UC_FLAG_SEQ_ALIAS for display and bridge

To support multiple display or bridge devices, enable the flag,
so we can assign the req seq via DTB alias

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

4 years agoMLK-15324-2 video: imxdpuv1: Add DPU driver for i.MX8
Ye Li [Mon, 3 Jul 2017 08:54:49 +0000 (03:54 -0500)]
MLK-15324-2 video: imxdpuv1: Add DPU driver for i.MX8

Adding new IMXDPUV1 (aka Seeris, Iris-lite) display control driver.

Signed-off-by: Oliver Brown <oliver.brown@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 43541cba14f851c6eebaa84becd42967f94a9cfd)
(cherry picked from commit 02b99a8ce3ed8f7ab1798b946c10b614ae386924)
(cherry picked from commit 77cce162b55aa1abf49675600b6b3f4aca626f61)
(cherry picked from commit 1871533123be12cf23671f10f90bf9500b99a4d8)
(cherry picked from commit 9ce5c4e7599aa63e8a43426d52dde5431e483042)

4 years agoMLK-23964-7 video: imx: Move imx8 HDMI lib to imx directory
Ye Li [Fri, 8 May 2020 15:48:02 +0000 (08:48 -0700)]
MLK-23964-7 video: imx: Move imx8 HDMI lib to imx directory

Using imx directory to place all new iMX display drivers and libraries.

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