u-boot.git
4 years agoMLK-18476-3 configs: mx6qdl_arm2: Add defconfigs for MX6Q/DL ARM2
Ye Li [Fri, 1 Jun 2018 07:30:31 +0000 (00:30 -0700)]
MLK-18476-3 configs: mx6qdl_arm2: Add defconfigs for MX6Q/DL ARM2

Add defconfigs for iMX6Q/DL/6QPOP DDR3 and LPDDR2 ARM2 boards to
support SD boot and plugin.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit ba99b856ac290c298c9be5ef6f6f6229b1d9f539)
(cherry picked from commit 66085d2abe610afbf81f58d778dab5766c55909c)
(cherry picked from commit d9f17d51a3a19c331d19d47d88a1ffc50e2f62cd)
(cherry picked from commit 8fd974bc789de2a22dc600978b8fe07fb5d8a783)

4 years agoMLK-18476-2 mx6qdl_arm2: Add MX6Q and DL ARM2 support
Ye Li [Fri, 1 Jun 2018 07:22:46 +0000 (00:22 -0700)]
MLK-18476-2 mx6qdl_arm2: Add MX6Q and DL ARM2 support

Porting the iMX6Q DDR3/LPDDR2 ARM2, iMX6DL DDR3/LPDDR2 ARM2 and
iMX6Q POP LPDDR2 ARM2 board codes from v2019.04.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 8ce8ab2f9b875fe43489d7624a296f036e43e585)
(cherry picked from commit 34d29f3cdbf5e9f30ff9593295af4c85d3833ee3)
(cherry picked from commit 6f8ff60c04d8c5ab1e017db45ef6909f2d31447f)
(cherry picked from commit db4431dcb4e8e4fd7a484564b3e0c806f6faa9be)

4 years agoMLK-18476-1 DTS: mx6qdl_arm2: Add board DTS files for MX6Q/DL and MX6Q POP ARM2
Ye Li [Fri, 1 Jun 2018 07:19:40 +0000 (00:19 -0700)]
MLK-18476-1 DTS: mx6qdl_arm2: Add board DTS files for MX6Q/DL and MX6Q POP ARM2

Add DTS files to support iMX6Q/DL DDR3/LPDDR2 ARM2 and iMX6Q POP LPDDR2 ARM2 boards.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit a699bafb441fc8b3aeff895f60b8531923f66733)
(cherry picked from commit a8d33d1be3394685dc571044d07227173b4fcf35)
(cherry picked from commit 0f6c98703cc6a3a03de062e99c519a2eb4a2d82c)
(cherry picked from commit be4fcf363eb2b094e44942f7431ef3edbba845f5)

4 years agoMLK-23574-54 mx6ull_val: Add iMX6ULL DDR3 validation boards support
Ye Li [Tue, 5 May 2020 16:42:40 +0000 (09:42 -0700)]
MLK-23574-54 mx6ull_val: Add iMX6ULL DDR3 validation boards support

Porting the iMX6ULL DDR3 validation board support from v2019.04 u-boot.

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

4 years agoMLK-23574-53 mx6ul_val: Add iMX6UL validation boards support
Ye Li [Tue, 5 May 2020 15:09:38 +0000 (08:09 -0700)]
MLK-23574-53 mx6ul_val: Add iMX6UL validation boards support

Porting the iMX6UL DDR3/LPDDR2 validation board support from
v2019.04 u-boot.

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

4 years agoMLK-23574-52 mx6sll_val: Add iMX6SLL validation boards support
Ye Li [Tue, 5 May 2020 09:04:50 +0000 (02:04 -0700)]
MLK-23574-52 mx6sll_val: Add iMX6SLL validation boards support

Porting the iMX6SLL LPDDR3/LPDDR2 validation board support from
v2019.04 u-boot.

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

4 years agoMLK-23574-51 mx6sx_val: Add iMX6SX validation boards support
Ye Li [Tue, 5 May 2020 07:51:44 +0000 (00:51 -0700)]
MLK-23574-51 mx6sx_val: Add iMX6SX validation boards support

Porting the iMX6SX 17x17 DDR3/LPDDR2 (14x14) validation board and 19x19
DDR3/LPDDR2 validation board support from v2019.04 u-boot.

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

4 years agoMLK-23574-50 mx7d_val: Add iMX7D validation board support
Ye Li [Tue, 5 May 2020 01:58:29 +0000 (18:58 -0700)]
MLK-23574-50 mx7d_val: Add iMX7D validation board support

Porting the iMX7D 12x12 DDR3/LPDDR3 validation board and 19x19
DDR3/LPDDR2/LPDDR3 validation board support from v2019.04 u-boot.

Signed-off-by: Ye Li <ye.li@nxp.com>
4 years agoMLK-23574-49 mx7ulp_val: Add 10x10 and 14x14 validation board support
Ye Li [Mon, 4 May 2020 13:54:58 +0000 (06:54 -0700)]
MLK-23574-49 mx7ulp_val: Add 10x10 and 14x14 validation board support

Porting the iMX7ULP 10x10 validation board and 14x14 validation board codes
from v2019.04 u-boot.

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

4 years agoMLK-23574-48 imx8mm: Add DDR3L and DDR4 validation boards
Ye Li [Thu, 30 Apr 2020 13:36:39 +0000 (06:36 -0700)]
MLK-23574-48 imx8mm: Add DDR3L and DDR4 validation boards

Porting board codes, configurations, DTS and DDR initialization codes
for the DDR3L and DDR4 validation boards from imx_v2019.04

Ready functions:
  - DDR3L board: SD, UART, I2C, USB host and NAND
    FPGA on the board controls WDOG_B and ENET PHY reset, so reset
    and ethernet can't work

  - DDR4 board:  SD/eMMC, I2C, ENET, Flexspi, UART and USB

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

4 years agoMLK-23574-47 imx8mq: Add DDR3L and DDR4 validation boards
Ye Li [Thu, 26 Mar 2020 09:02:48 +0000 (02:02 -0700)]
MLK-23574-47 imx8mq: Add DDR3L and DDR4 validation boards

Porting board codes, configurations, DTS and DDR initialization codes
for the DDR3L and DDR4 validation boards from imx_v2019.04

Supported modules
   - DDR3L VAL: Two RANK DDR3L, QSPI B, eMMC/SD, RMII ENET, UART.
   - DDR4  VAL: Two RANK DDR4, SD, NAND, RGMII ENET, UART

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

4 years agoMLK-20154-1 mtd: spi: Add flash id for GD25LQ16
Ye Li [Thu, 1 Nov 2018 03:13:13 +0000 (20:13 -0700)]
MLK-20154-1 mtd: spi: Add flash id for GD25LQ16

iMX8MM DDR3L validation board uses GD25LQ16, but its id is not in
u-boot flash ids table. Add the new id and parameters into the table.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 04b813d4687028ce65c9772029d5da5500ec2e1c)
(cherry picked from commit 2257fe832100960b1cac96b92ecdd21d581bf33b)
(cherry picked from commit a7fb4e58f056e4861c3d7e5394e72e03ca8aaeff)

4 years agoMLK-23574-46 imx8qxp: Add iMX8QXP/iMX8DX validation board support
Ye Li [Thu, 30 Apr 2020 07:46:41 +0000 (00:46 -0700)]
MLK-23574-46 imx8qxp: Add iMX8QXP/iMX8DX validation board support

Add the validation board support for iMX8QXP/iMX8DX platforms.
    - iMX8QXP 21x21 DDR3 board
    - iMX8QXP 21x21 LPDDR4 board
    - iMX8QXP 17x17 LPDDR4 board
    - iMX8DX 17x17 DDR3 board

Ready functions:  SD/eMMC, flexspi, ENET, USB, i2c and NAND

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

4 years agoMLK-23574-45 imx8qm: Add LPDDR4 and DDR4 validation boards support
Ye Li [Tue, 28 Apr 2020 13:25:37 +0000 (06:25 -0700)]
MLK-23574-45 imx8qm: Add LPDDR4 and DDR4 validation boards support

Porting board codes, configurations and DTS for the LPDDR4 and DDR4
validation boards from imx_v2019.04

Supported modules
   - Flexspi, eMMC/SD, ENET0, UART, USB, legacy PCI driver,

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

4 years agoMLK-23875 imx8qm_mek: Add the reset pins control for video cards
Ye Li [Thu, 30 Apr 2020 01:53:27 +0000 (18:53 -0700)]
MLK-23875 imx8qm_mek: Add the reset pins control for video cards

The reset pins for LVDS to HDMI video card and MIPI to HDMI card are
not added in current codes, but kernel requires u-boot to reset cards
to resolve the shared reset pin in dual display case.
So add the reset pins control back.

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

4 years agoMLK-23881: imx_env: add nandfit_part env for i.MX8dxl
Han Xu [Wed, 29 Apr 2020 16:01:43 +0000 (11:01 -0500)]
MLK-23881: imx_env: add nandfit_part env for i.MX8dxl

add the nandfit_part environment for iMX8dxl, so uuu will burn the
flash.bin to nandfit partition.

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

4 years agoMLK-17205-3 video: imx: hdp: Adding configs for HDP firmware loading
Oliver Brown [Wed, 13 Dec 2017 23:14:58 +0000 (17:14 -0600)]
MLK-17205-3 video: imx: hdp: Adding configs for HDP firmware loading

Added default environment for hdp loading.
Added hdp loading as default for iMX8QM ARM2 and MEK boards.

Signed-off-by: Oliver Brown <oliver.brown@nxp.com>
(cherry picked from commit 432e5b4347841095c3b5a8a0d106f35deadd006e)
(cherry picked from commit cb78a32fa8eb8c37932be003ebe4fa1f8c46c1d5)
(cherry picked from commit 5125e6c393e5dd068ebc9b9cfd724f6602f65c78)

4 years agoMLK-23574-41 video: Add HDMI Library for iMX8 and iMX8MQ
Ye Li [Fri, 29 Nov 2019 11:07:39 +0000 (03:07 -0800)]
MLK-23574-41 video: Add HDMI Library for iMX8 and iMX8MQ

Port the HDMI lib frrom imx_v2019.04 u-boot, which is used for
HDP TX/RX firmware loading and HDMI display

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

4 years agoMLK-23574-41 imx: Remove "freescale" from CPU info
Ye Li [Mon, 27 Apr 2020 02:32:18 +0000 (19:32 -0700)]
MLK-23574-41 imx: Remove "freescale" from CPU info

Since the freescale entity does not exist, remove it from CPU info print.

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

4 years agoMLK-23574-40 Revert "usb: dwc3: switch to peripheral mode when exiting"
Ye Li [Sun, 26 Apr 2020 17:02:12 +0000 (10:02 -0700)]
MLK-23574-40 Revert "usb: dwc3: switch to peripheral mode when exiting"

This reverts commit bbe3d4a6c14e17d251029e4dde07f184244e9a4a.
If we set to periperal at exiting, will get a windows USB warning since
it detect a new connection on device mode. Remove this patch to fix
the problem

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

4 years agoMLK-23783-2 DTS: imx8qm/qxp: Set assigned clocks rate to usb3
Ye Li [Mon, 13 Apr 2020 09:40:42 +0000 (02:40 -0700)]
MLK-23783-2 DTS: imx8qm/qxp: Set assigned clocks rate to usb3

Add assigned clocks rate to USB3 node, so gadget driver can set
the clocks before probing the driver.

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

4 years agoMLK-23783-1 imx8: clock: Set rate for USB3 clocks
Ye Li [Mon, 13 Apr 2020 15:10:41 +0000 (08:10 -0700)]
MLK-23783-1 imx8: clock: Set rate for USB3 clocks

Current codes depend on default clock setting on SCFW, but on QXP c0, the
USB3 BUS clock requires a lower clock at 250Mhz. Found USB TRB error on
8DX (QXP c0), if we use default 500Mhz bus clock.

Per SCFW suggestion, SW should be responsible for setting up these clocks
not depending on SCFW. So adding the clock set rate for all USB3 clocks

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewe-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 601da3c130fc6b0a864645009cf50c2d4a884d39)
(cherry picked from commit 04cf5746dc0dd8c31902c783c93d2031caf17a6f)

4 years agoMLK-23718-2 imx8: ahab: fix 'end address' parameter of rm_find_memreg
Seb Fagard [Mon, 30 Mar 2020 15:12:22 +0000 (17:12 +0200)]
MLK-23718-2 imx8: ahab: fix 'end address' parameter of rm_find_memreg

parameter 'end address' must be inclusive of address range.
And include cpu_func.h header file

Signed-off-by: Seb Fagard <sebastien.fagard@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit d17ae0d28de88bb637f6c1df5ba5c6d4f0779055)
(cherry picked from commit 489e2f897242beaa4b8a05d95efe55fdb16e4376)

4 years agoMLK-23691-5: update nandbcb to support imx8dxl ddr3 nand boot
Han Xu [Thu, 26 Mar 2020 20:33:13 +0000 (15:33 -0500)]
MLK-23691-5: update nandbcb to support imx8dxl ddr3 nand boot

add the new imx8dxl into nandbcb support list.

Signed-off-by: Han Xu <han.xu@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 3f791ca3cfb6e1e24e2c96223935f242d84c7818)
(cherry picked from commit 9eed33e69f35e21d34a2906434b10682a6c9a1e8)

4 years agoMLK-23691-4: imx8dxl: add nand pad settings and init code in imx8dxl board file
Han Xu [Thu, 26 Mar 2020 20:29:56 +0000 (15:29 -0500)]
MLK-23691-4: imx8dxl: add nand pad settings and init code in imx8dxl board file

add nand pad settings and init code in imx8dxl board file.

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

4 years agoMLK-23691-3: imx8dxl: add nand related env settings for imx8dxl
Han Xu [Thu, 26 Mar 2020 20:28:36 +0000 (15:28 -0500)]
MLK-23691-3: imx8dxl: add nand related env settings for imx8dxl

add the nand related env settings for imx8dxl ddr3 evk

Signed-off-by: Han Xu <han.xu@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 871df306ff98a93c70d7babe515acd8b680cf99b)
(cherry picked from commit 8a594b4c1a3f929e765d7d9c24b57853cbf79e37)

4 years agoMLK-23691-2: dts: add NAND node and iomux configs for nand on imx8dxl ddr3 evk
Han Xu [Thu, 26 Mar 2020 20:26:59 +0000 (15:26 -0500)]
MLK-23691-2: dts: add NAND node and iomux configs for nand on imx8dxl ddr3 evk

add nand node and iomux configs for imx8dxl nand support in dts

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

4 years agoMLK-23691-1: configs: add nand config for imx8dxl ddr3 evk
Han Xu [Thu, 26 Mar 2020 20:25:46 +0000 (15:25 -0500)]
MLK-23691-1: configs: add nand config for imx8dxl ddr3 evk

add new nand config for imx8dxl nand boot

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

4 years agoMLK-23675 configs: imx8: change CONFIG_IMX_VSERVICE_SHARED_BUFFER to 0x90400000
Peng Fan [Wed, 25 Mar 2020 02:10:49 +0000 (10:10 +0800)]
MLK-23675 configs: imx8: change CONFIG_IMX_VSERVICE_SHARED_BUFFER to 0x90400000

Change the buffer to use the real buffer, not vring space.
Because we are going to let M4 publish the resource table into vring
space for kernel usage. uboot will overwrite it, so use the real shared
buffer space 0x90400000

Script:
sed -i "s/CONFIG_IMX_VSERVICE_SHARED_BUFFER=0x90000000/CONFIG_IMX_VSERVICE_SHARED_BUFFER=0x90400000/" configs/*

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

4 years agoMLK-23662-1 ddr: imx8m: add print for DRAM rate
Ye Li [Mon, 23 Mar 2020 10:58:12 +0000 (03:58 -0700)]
MLK-23662-1 ddr: imx8m: add print for DRAM rate

Enable print to show the DRAM rate of current setting and training
result.

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

4 years agoMLK-23753 imx8: Implement bus active check on OTG port
Ye Li [Fri, 27 Mar 2020 03:45:17 +0000 (20:45 -0700)]
MLK-23753 imx8: Implement bus active check on OTG port

Using this way to check if OTG bus active, not depending on checking
OTG register. Because checking OTG register only working for first
cold boot from ROM. While doing partition reboot, SCFW will turn off
the entire conn SS, so that way won't work.

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

4 years agoMLK-23656 imx8: Power off connectivty SS when boot from usb
Ye Li [Mon, 23 Mar 2020 06:47:38 +0000 (23:47 -0700)]
MLK-23656 imx8: Power off connectivty SS when boot from usb

When boot from usb, scfw won't re-initialize the connectivity subsystem.
This special behavior is for uuu virtual console feature.
However, it causes entire connectivity SS using settings from ROM. We found
the bus clocks are from AVPLL not DPLL and lower than ADD required. It causes
OTG performance drop about 20% during fastboot because more NYET handshake
added into each transfer.

To workaround the issue, we need to power off all usb resources to let connectivity
SS power down at early uboot phase. Then power on any resource in conn SS will
re-initialize the subsystem.

Regard to auto USB port check, we only has this workaround in u-boot not in SPL.
SPL uses SDP to download other images, the sizes are very small and not impacted.

Signed-off-by: Ye Li <ye.li@nxp.com>
Tested-by: Peter Chen <peter.chen@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 625b061107928377f51859ee9c0558dc7d56c137)
(cherry picked from commit b5d057e8fdf7ca91fe41204132cd3bff4f57d57a)

4 years agoMLK-23646 i.MX8DXL support DDR3 EVK boards
Frank Li [Sun, 22 Mar 2020 16:17:04 +0000 (11:17 -0500)]
MLK-23646 i.MX8DXL support DDR3 EVK boards

USB0 and USB1 work.
fastboot work
eqos Network work
Only 512MB in DDR3 evk boards.

Signed-off-by: Frank Li <Frank.Li@nxp.com>
(cherry picked from commit 824d85bb9862264317c43ab10af80e3d946111ee)
(cherry picked from commit f96bc402d96974c0d700883820c3e8b233876d44)

4 years agoMLK-23588: configs: change nand boot partition from mtd index to partition name
Han Xu [Fri, 13 Mar 2020 19:56:47 +0000 (14:56 -0500)]
MLK-23588: configs: change nand boot partition from mtd index to partition name

The previous NAND boot looking the rootfs by the mtd index, which is
easy get impacted by other mtd devices, such as SPI NOR. Changed it to
the unique nand rootfs partition name can avoid this issue.

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

4 years agoMLK-23583 doc: imx: habv4: Consolidate mx8m documentation
Vanessa Maegima [Thu, 13 Feb 2020 15:09:57 +0000 (12:09 -0300)]
MLK-23583 doc: imx: habv4: Consolidate mx8m documentation

Old documentation styling mentioned all iMX8M devices variants (iMX8M,
iMX8MM, iMX8MN) for every SoC reference.

As the secure/encrypted boot procedure is similar for all the variants
(including iMX8MP), make this information common for the whole iMX8M
family to keep the documentation clean instead of adding iMX8MP on every
reference.
Specific information for single variants is described when needed.

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

4 years agoTEE-465: arm: imx8: enable fdt overlay support
Silvano di Ninno [Tue, 3 Mar 2020 16:32:04 +0000 (17:32 +0100)]
TEE-465: arm: imx8: enable fdt overlay support

Enable FDT overlay for all the i.MX 8 series.
Instead of modifying the FDT like done currently,
allow u-boot to apply an overlay instead.
Fallback to previous imlementation if overlay fails.

Signed-off-by: Silvano di Ninno <silvano.dininno@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 13463bf47b27771976f8b824a20224f599a0518a)
(cherry picked from commit 18ae293f8ce2d26bc9c187f97653e26ed00d1a15)

4 years agoMLK-23382 imx8dxl: Add defconfig for flexspi boot
Ye Li [Tue, 25 Feb 2020 02:57:13 +0000 (18:57 -0800)]
MLK-23382 imx8dxl: Add defconfig for flexspi boot

Add defconfig to support flexspi boot for both SPL and u-boot

Signed-off-by: Ye Li <ye.li@nxp.com>
Tested-by: Han Xu <han.xu@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit dea8a1e5e104310a07d670c86aa416d7292c1564)
(cherry picked from commit 9154787d3459bf04cc6b51ea10ae5d6710e65872)

4 years agoMLK-23361 usb: cdns3: gadget: reset endpoint before set DEVDS
Ye Li [Wed, 19 Feb 2020 05:27:15 +0000 (21:27 -0800)]
MLK-23361 usb: cdns3: gadget: reset endpoint before set DEVDS

On CDNS3 usb, the IOC interrupt for IN is triggered when data
move from memory to FIFO, but not for the transfer completion.

When running fastboot command "continue" to disconnect USB device.
The last message "OKAY" sent from device setups a callback to IOC
interrupt handler and disconnect with host in this callback.
However, the real transfer hasn't finished due to host doesn't send
IN at that time, it causes the error at host side.

This patch will reset all enabled endpoints in pull up before disable
the device mode. The reset checks the EP_STS.BUFFEREMPTY bit to ensure
data has sent to host.

Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
Reviewed-by: Peter Chen <peter.chen@nxp.com>
(cherry picked from commit 9be87bc89c1e75755b524703dc536c93bd3fbe5c)
(cherry picked from commit 076f49edefab2ef832b09ada855f968d44c15928)

4 years agoMLK-23311-2: 8DXL enable second usb controller
Frank Li [Wed, 12 Feb 2020 21:55:45 +0000 (15:55 -0600)]
MLK-23311-2: 8DXL enable second usb controller

USB OH clock is default enabled by SCFW because it shared
between two USB controller.

Signed-off-by: Frank Li <Frank.Li@nxp.com>
(cherry picked from commit 7a8ec829d4410c51550ad7a589645595042ba541)
(cherry picked from commit c0041c43f554a778c27d7574b3d58fb76ace6d48)

4 years agoMLK-23311-1 ehci-mx6: usb phy support multi gadget controller
Frank Li [Wed, 12 Feb 2020 21:44:40 +0000 (15:44 -0600)]
MLK-23311-1 ehci-mx6: usb phy support multi gadget controller

fix usb_power_config hard code to first one

Signed-off-by: Frank Li <Frank.Li@nxp.com>
(cherry picked from commit dbe54e1f3625269f7bc422ccf53693cb9e0f949b)
(cherry picked from commit a9dadac19d87a5812c2bbbd50bc22a76cb432f9b)

4 years agoMLK-23280: Add i.MX8DXL EVK Board support
Teo Hall [Thu, 6 Feb 2020 17:10:12 +0000 (11:10 -0600)]
MLK-23280: Add i.MX8DXL EVK Board support

Add device trees, configs and board files for
the i.MX8DXL EVK board.

Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Teo Hall <teo.hall@nxp.com>
(cherry picked from commit f0238679d332f1af2148d467804a93de8f868bd5)
(cherry picked from commit 2ce08b29516a582b295f22565695e57da75e551f)

4 years agoMLK-23279-4 net: eqos: Add support for i.MX8DXL SoC
Teo Hall [Wed, 5 Feb 2020 23:44:36 +0000 (17:44 -0600)]
MLK-23279-4 net: eqos: Add support for i.MX8DXL SoC

Update dwc qos driver for i.MX8DXL

Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
(cherry picked from commit d1e718565972495c99345ee8119651ffa14a3238)
(cherry picked from commit 90e308053a02cb6804ebfc06ada20733f000ecc3)

4 years agoMLK-23279-3 imx: Add support for i.MX8DXL SoC
Teo Hall [Thu, 6 Feb 2020 16:56:25 +0000 (10:56 -0600)]
MLK-23279-3 imx: Add support for i.MX8DXL SoC

Add soc id in cpu codes and conditionals.
Also add support for v2x container on 8DXL.

Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Teo Hall <teo.hall@nxp.com>
(cherry picked from commit 35691a6b85c3240b0e3b9f9a8da9fc6328bf92d8)
(cherry picked from commit f1f546d03dec535774f0583ae95b02875dfcf72c)

4 years agoMLK-23279-2 imx: Add support for i.MX8DXL SoC
Teo Hall [Thu, 6 Feb 2020 14:57:33 +0000 (08:57 -0600)]
MLK-23279-2 imx: Add support for i.MX8DXL SoC

Add clocks required for new i.MX8DXL SoC. Since most of clocks are
same as iMX8QXP, share the same driver but with iMX8DXL new clocks added.

Signed-off-by: Fugang Duan <B38611@freescale.com>
Signed-off-by: Teo Hall <teo.hall@nxp.com>
(cherry picked from commit f9c23b2df504c5db5f8f4567ee4c92f2439308fc)
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit dc7b8a6b97258e7a46a014e5b866cac55ad617f7)

4 years agoMLK-23279-1 imx: Add support for i.MX8DXL SoC
Teo Hall [Thu, 6 Feb 2020 14:52:32 +0000 (08:52 -0600)]
MLK-23279-1 imx: Add support for i.MX8DXL SoC

Add pads for i.MX8DXL SoC

Signed-off-by: Teo Hall <teo.hall@nxp.com>
(cherry picked from commit eccdb0d167e10dc8f179c00cbb1ebee72d93225b)
(cherry picked from commit e6953f3167af25961c7f02adcba8f0ace335567d)

4 years agoLF-3483-13 imx8: Update SCFW API to version 1.16
Ye Li [Sat, 10 Apr 2021 06:06:46 +0000 (23:06 -0700)]
LF-3483-13 imx8: Update SCFW API to version 1.16

Upgrade SCFW API to 1.16 to align with commit
8f2a1e1(SSI-87: imx8: Configure SNVS) in imx_v2020.04 u-boot.

Signed-off-by: Ye Li <ye.li@nxp.com>
4 years agoMLK-23317 configs: imx8mp: Add a defconfig for inline ecc feature test
Sherry Sun [Fri, 14 Feb 2020 03:16:37 +0000 (11:16 +0800)]
MLK-23317 configs: imx8mp: Add a defconfig for inline ecc feature test

Since inline ECC feature is disabled in default imx8mp_evk_defconfig, in
order to test the new feature, add a new config file based on
imx8mp_evk_defconfig with inline ECC enabled.

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 8dff0e01bd5411caa757fe4c296fccbb7e1bdd2b)
(cherry picked from commit 2a8d4cfb0e70d5745b73666ecc9377e692390421)

4 years agoMLK-23307-2 imx8mp: Add three reserved-memory dts nodes if inline ECC is enabled
Sherry Sun [Wed, 12 Feb 2020 06:04:57 +0000 (14:04 +0800)]
MLK-23307-2 imx8mp: Add three reserved-memory dts nodes if inline ECC is enabled

If inline ECC is enabled on imx8mp, then the ECC region should be
reserved. Since the limit of the ddr address map when use inline ecc
and 6G memory, ECC region have to be divided into three parts. So these
three parts ECC region should be set as reserved-memory with no-map.

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
(cherry picked from commit 0ea77fc9364e46e897cfa554d93895595aaf2a20)
(cherry picked from commit db36f389921293abbd2824e95867650ae290bad5)

4 years agoMLK-23307-1 imx8mp: ddr: Add inline ECC feature support
Sherry Sun [Mon, 20 Jan 2020 03:13:14 +0000 (11:13 +0800)]
MLK-23307-1 imx8mp: ddr: Add inline ECC feature support

Add inline ECC support for lpddr4 on imx8mp-evk. And add a config which
can enable/disable inline ECC feature for lpddr4 on imx8mp-evk board.

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
(cherry picked from commit 6f491bb187dffbb3d235681c0858df515f90f504)
(cherry picked from commit eacca8d68cbdb5e3e664976a297d0aae855d9802)

4 years agoTEE-502 imx: refactor optee bindings addition
Silvano di Ninno [Wed, 29 Jan 2020 16:52:00 +0000 (17:52 +0100)]
TEE-502 imx: refactor optee bindings addition

- Remove code duplication betwee imx8 and imx8m support
- add reserved memory node to prevent Linux accessing optee reserved memory

Signed-off-by: Silvano di Ninno <silvano.dininno@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 8beac7ef22c16b72ad337b44a0516436a4a0d00c)
(cherry picked from commit 07be6f855bdcbca200e4685ea557b2529187e29f)

4 years agoMLK-23574-40 imx8: Rename boot_pointer to share optee codes
Ye Li [Wed, 22 Apr 2020 09:29:20 +0000 (02:29 -0700)]
MLK-23574-40 imx8: Rename boot_pointer to share optee codes

To share some common optee codes for iMX8 and iMX8M, we need same
name for parameters passed from ATF. Currently iMX8 uses boot_pointer
but iMX8M use rom_pointer. So rename boot_pointer to rom_pointer.

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

4 years agoSSI-87: imx8: Configure SNVS
Franck LENORMAND [Wed, 9 Oct 2019 08:27:43 +0000 (10:27 +0200)]
SSI-87: imx8: Configure SNVS

Add a module to configure the tamper and secure violation of
the SNVS using the SCU API.

The module also adds some commands:
 - snvs_cfg: Configure the SNVS HP and LP registers
 - snvs_dgo_cfg: Configure the SNVS DGO bloc if present (8QXP)
 - tamper_pin_cfg: Change the configuration of the tamper pins
 - snvs_clear_status: Allow to write to LPSR and LPTDSR to clear status bits

Signed-off-by: Franck LENORMAND <franck.lenormand@nxp.com>
Reviewed-by: Silvano Di Ninno <silvano.dininno@nxp.com>
(cherry picked from commit b84be4fa1454ee0cd718be329d630b55aff34273)
(cherry picked from commit 24b0be839ea2166ee80194b93d8efcca70b81539)

4 years agoMLK-23180 doc: ahab: Update SECO event example description
Breno Lima [Tue, 31 Dec 2019 20:47:16 +0000 (17:47 -0300)]
MLK-23180 doc: ahab: Update SECO event example description

Update SECO event example description to clarify the
error reported.

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

4 years agoMLK-23241 imx8dx_mek: Add iMX8DX MEK board support
Ye Li [Thu, 16 Jan 2020 06:33:39 +0000 (22:33 -0800)]
MLK-23241 imx8dx_mek: Add iMX8DX MEK board support

iMX8DX MEK board has similar design with 8QXP MEK. The major changes are
1. DDR changed to 16bits 1GB DDR part
2. USB3.0 is removed and only support OTG on typec port. (No SW change needed)

This patch adds new defconfigs and DTS file for this new board.

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

4 years agoMLK-23574-39 imx8mp_evk: Update iMX8MP EVK board codes
Ye Li [Wed, 22 Apr 2020 03:14:29 +0000 (20:14 -0700)]
MLK-23574-39 imx8mp_evk: Update iMX8MP EVK board codes

Change to enable USB/tcpc, TMU, flexspi on iMX8MP EVK board.
And convert SPL to use DM I2C and PMIC driver

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

4 years agoMLK-23574-37 DTS: imx8mp: Update iMX8MP EVK DTS and binding files
Ye Li [Wed, 22 Apr 2020 02:57:12 +0000 (19:57 -0700)]
MLK-23574-37 DTS: imx8mp: Update iMX8MP EVK DTS and binding files

Update DTS files to support FEC, eQoS, DWC3 USB and flexspi

1. Update nodes and assigned clocks for flexspi, FEC, eQos
2. Add nodes for DWC3 USB
3. Add i2c force idle
4. Add thermal nodes

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

4 years agoLF-3483-12 imx8mp_evk: Enable the DWC EQoS iMX driver
Ye Li [Fri, 19 Feb 2021 05:34:59 +0000 (21:34 -0800)]
LF-3483-12 imx8mp_evk: Enable the DWC EQoS iMX driver

Enable the EQoS i.MX driver in defconfig, also enable the PHYLIB
to facilitate the case that only has FEC enabled.

Signed-off-by: Ye Li <ye.li@nxp.com>
4 years agoLF-3483-11 imx8mp_evk: Delete noncached memory config
Ye Li [Fri, 19 Feb 2021 07:02:45 +0000 (23:02 -0800)]
LF-3483-11 imx8mp_evk: Delete noncached memory config

DWC EQOS driver has removed to use noncached memory, so delete
the configuration from iMX8MP EVK head file.

Signed-off-by: Ye Li <ye.li@nxp.com>
4 years agoLF-3483-10 imx8mp_evk: Remove EQoS PHY reset codes
Ye Li [Fri, 19 Feb 2021 05:32:54 +0000 (21:32 -0800)]
LF-3483-10 imx8mp_evk: Remove EQoS PHY reset codes

Since we uses the DTS and PHY reset gpio in EQoS driver to do the
reset, remove the duplicated codes from board file.

Signed-off-by: Ye Li <ye.li@nxp.com>
4 years agoLF-3483-9 imx8mp_evk: Fix incorrect cascade for FEC and EQOS setup
Ye Li [Sat, 6 Feb 2021 18:20:14 +0000 (10:20 -0800)]
LF-3483-9 imx8mp_evk: Fix incorrect cascade for FEC and EQOS setup

The setup functions should be independent for two ethernet controllers

Signed-off-by: Ye Li <ye.li@nxp.com>
4 years agoLF-3483-8 arm: dts: imx8mp-evk: Enable the EQoS ethernet port
Ye Li [Fri, 19 Feb 2021 05:22:31 +0000 (21:22 -0800)]
LF-3483-8 arm: dts: imx8mp-evk: Enable the EQoS ethernet port

i.MX8MP EVK has two ethernet ports. Add relevant nodes and properties
for EQoS port to the EVK DTS file.
In -u-boot.dtsi, change the u-boot eqos compatible string, add PHY
reset gpio and remove assigned clocks as not supported in CCF.

Signed-off-by: Ye Li <ye.li@nxp.com>
4 years agoLF-3483-7 arm: dts: imx8mp: Add EQoS controller node
Ye Li [Fri, 19 Feb 2021 05:19:52 +0000 (21:19 -0800)]
LF-3483-7 arm: dts: imx8mp: Add EQoS controller node

Add node for EQoS ethernet controller as the second ethernet port
on i.MX8MP

Signed-off-by: Ye Li <ye.li@nxp.com>
4 years agoLF-3483-6 arm: mach-imx: Allow to build mac.c for EQoS driver
Ye Li [Sat, 6 Feb 2021 16:53:27 +0000 (08:53 -0800)]
LF-3483-6 arm: mach-imx: Allow to build mac.c for EQoS driver

i.MX8MP has one DWC EQoS controller, so allow to build mac.c when
only this driver is enabled.

Signed-off-by: Ye Li <ye.li@nxp.com>
4 years agoLF-3483-5 net: eqos: Add PHY reset control for i.MX platform
Ye Li [Fri, 19 Feb 2021 02:01:09 +0000 (18:01 -0800)]
LF-3483-5 net: eqos: Add PHY reset control for i.MX platform

Parse the "phy-reset-gpios", "phy-reset-post-delay" and
"phy-reset-duration" properties from eqos node to control the
ethernet PHY reset at driver probe.
Reset PHY once is enough that can reduce the time cost to
get IP after the first time.

Signed-off-by: Ye Li <ye.li@nxp.com>
4 years agoMLK-23196 imx8mp_evk: Increase VDD_ARM to 0.95v Overdrive voltage
Ye Li [Mon, 6 Jan 2020 03:21:26 +0000 (19:21 -0800)]
MLK-23196 imx8mp_evk: Increase VDD_ARM to 0.95v Overdrive voltage

There is a frequency/timing limitation for SOC and ARM, if SOC is OD voltage/OD freq,
then ARM can't run at ND voltage/1.2Ghz, it may have timing risk from SOC to ARM.

Current VDD_SOC is set to 0.95v OD voltage in SPL, and kernel will increase bus
clocks to OD frequency before it increases ARM voltage. So to conform to the
limitation, we'd better increases VDD_ARM to OD voltage in SPL.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Anson Huang <Anson.Huang@nxp.com>
(cherry picked from commit f9fdb7a6134d8929c2291303c006f7380d97faa8)
(cherry picked from commit 543a0f1fdc2009fb24436b14a0488408c2f8341f)

4 years agoMA-15300-4 flush fastboot usb request buf cache before data movement
faqiang.zhu [Mon, 13 Jan 2020 10:36:58 +0000 (18:36 +0800)]
MA-15300-4 flush fastboot usb request buf cache before data movement

when boot from A72, use fastboot to download images, the first usb
request buf to save image data may have problem with the cache, which
cause the last 64bytes of this packet to be wrong.

flush this cache before data movement to avoid this issue.

Change-Id: Ic0927f1ec90ec9fb4cecdf4055bc7f536ef5471a
Signed-off-by: faqiang.zhu <faqiang.zhu@nxp.com>
(cherry picked from commit 45119132756b951c6f52e27625c06f94e4f0db59)
(cherry picked from commit 467f1d9f0c133438500d1c151c52276152bf36bf)

4 years agoMLK-23209-3 imx: Update imx_get_mac_from_fuse for imx8mp
Ye Li [Mon, 6 Jan 2020 08:39:19 +0000 (00:39 -0800)]
MLK-23209-3 imx: Update imx_get_mac_from_fuse for imx8mp

iMX8MP supports two ENET controllers, have to update the function to
enable loading two MAC addresses.

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

4 years agoMLK-23165-12 Update XHCI driver to support imx8MP PHY
Ye Li [Wed, 25 Dec 2019 03:30:45 +0000 (19:30 -0800)]
MLK-23165-12 Update XHCI driver to support imx8MP PHY

Update PHY settings to select 24M ref clock and enable clock in
HSIOMIX GPR.

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

4 years agoMLK-23124 fastboot: support duplicate uart console output to uuu
Frank Li [Fri, 13 Dec 2019 20:36:01 +0000 (14:36 -0600)]
MLK-23124 fastboot: support duplicate uart console output to uuu

to enable it, in uuu script add below command
fb: ucmd setenv stdout serial,fastboot
uuu add -v opition.
output will show in uuu console

Signed-off-by: Frank Li <Frank.Li@nxp.com>
(cherry picked from commit a5e86802515221cdfa4b6d82e697cf9dc0d29a98)
(cherry picked from commit e4bcf17c0c7eaf8365435927be43577a98deed78)

4 years agoMLK-23110-2 imx8qm/qxp: Remove SPL USB host driver and SPL ENV support
Ye Li [Wed, 11 Dec 2019 09:28:02 +0000 (01:28 -0800)]
MLK-23110-2 imx8qm/qxp: Remove SPL USB host driver and SPL ENV support

Remove both configs to save SPL size, since we have decoupled the
CI_UDC with EHCI driver

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

4 years agoMLK-23110-1 usb: Decouple the CI_UDC DM gadget driver with EHCI MX6 driver
Ye Li [Wed, 11 Dec 2019 08:28:17 +0000 (00:28 -0800)]
MLK-23110-1 usb: Decouple the CI_UDC DM gadget driver with EHCI MX6 driver

On 2019.04 SPL, we enabled DM gadget driver for QM/QXP to support
dual USB ports. The CI_UDC DM gadget driver will call init function
inside EHCI mx6 driver, so when building SPL on iMX8QM/QXP with CI UDC
enabled, we have to enable usb host driver as well, and this introduces
about more than 40KB size to SPL.

Move the common codes to a independent file, so that both host driver
and gadget driver can call it, then decouple the host and gadget driver.

Note: the patch only applies to ci_udc gadget DM driver. For non-DM gadget
driver, it still depends ehci host interfaces.

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

4 years agoMLK-22881 board: imx8mn: Update the DDR4 timing script on imx8mn ddr4 evk
Jacky Bai [Thu, 17 Oct 2019 04:34:02 +0000 (12:34 +0800)]
MLK-22881 board: imx8mn: Update the DDR4 timing script on imx8mn ddr4 evk

On i.MX8MN, we can only support DLL-ON mode only, so update the timing
to support 2400mts & 1066mts setpoint.

Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit c8347f8eb51e4a603ed5f1649129dd3a0a8ea9f9)
(cherry picked from commit 1466b915bb7df3942b4aa67ff9518a3dd461bf9c)
(cherry picked from commit 9532207ae26ffc7c2a25b964964a61ca8eb85613)

4 years agoMLK-22997: add nandfit_part env for uuu
Han Xu [Tue, 19 Nov 2019 02:50:13 +0000 (20:50 -0600)]
MLK-22997: add nandfit_part env for uuu

Add the nandfit_part environment to notify uuu to burn flash.bin to
nandfit partition for iMX8QM/QX/MQ/MM platforms

Signed-off-by: Han Xu <han.xu@nxp.com>
(cherry picked from commit 79474268a4d7ec473435181b85176b266549f278)
Signed-off-by: Clement Faure <clement.faure@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 8a5d712cb9ba6cf99c5b5a7da3b82b16ac101ccc)

4 years agoMICRDEVOPS-61: imx6/imx7ulp: enable CONFIG_CMD_USB_MASS_STORAGE
Clement Faure [Wed, 13 Nov 2019 16:05:55 +0000 (17:05 +0100)]
MICRDEVOPS-61: imx6/imx7ulp: enable CONFIG_CMD_USB_MASS_STORAGE

Enable CONFIG_CMD_USB_MASS_STORAGE by default to enable UMS flashing.

Signed-off-by: Clement Faure <clement.faure@nxp.com>
Acked-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 52fddd71c5fc2bf10d9e551197f90cf4096fbc71)
(cherry picked from commit 2b73a73ce53b8007afbfbb83332e8e16de0ad4e4)

4 years agoMLK-22954-4: configs: iMX6ULL add mtdparts config
Han Xu [Mon, 11 Nov 2019 15:37:29 +0000 (09:37 -0600)]
MLK-22954-4: configs: iMX6ULL add mtdparts config

add the mtdparts config for iMX6ULL

Signed-off-by: Han Xu <han.xu@nxp.com>
(cherry picked from commit 66430af4cee0e18a211244114ca4648342c7d995)
(cherry picked from commit 3a565150546931f2a5816c34a2380be3fb89fba7)

4 years agoMLK-22954-2: Kconfig: change the nandbcb Kconfig for iMX8QX
Han Xu [Tue, 12 Nov 2019 21:11:48 +0000 (15:11 -0600)]
MLK-22954-2: Kconfig: change the nandbcb Kconfig for iMX8QX

Add the ARCH_MX8 in Kconfig for supporting iMX8QX in nandbcb

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

4 years agoMLK-22907-3 fsl_mfgprot: Fix typo in sign_mppubk()
Breno Lima [Sun, 27 Oct 2019 00:28:58 +0000 (21:28 -0300)]
MLK-22907-3 fsl_mfgprot: Fix typo in sign_mppubk()

The signature is generated using manufacturing protection private key.

Fix typo in fsl_mfgprot.c.

Signed-off-by: Breno Lima <breno.lima@nxp.com>
(cherry picked from commit a14286a86fd73b6dcd2d15c3051c17653922a50f)
(cherry picked from commit 619e69d0891c4d2a0590de088048fe0b67277297)

4 years agoMLK-22907-2 imx8: Add SECO manufacturing protection command support
Breno Lima [Sat, 19 Oct 2019 01:24:26 +0000 (22:24 -0300)]
MLK-22907-2 imx8: Add SECO manufacturing protection command support

i.MX8/8x devices support CAAM manufacturing protection through SECO
APIs, SECO FW generates P-384 private key in every OEM closed boot.

Add support for SECO enabled devices in mfgprot U-Boot command, the
following commands are available:

=> mfgprot pubk
=> mfgprot sign <data_addr> <size>

Signed-off-by: Breno Lima <breno.lima@nxp.com>
(cherry picked from commit 1fdb9726fdc4642d0f24104ec2e4099d59569468)
(cherry picked from commit 18b06286d28d78b04fcef7a4b3bd8324f789bf32)

4 years agoMLK-22675 usb: dwc3: host: disable park mode for super speed
Li Jun [Fri, 8 Nov 2019 06:01:04 +0000 (14:01 +0800)]
MLK-22675 usb: dwc3: host: disable park mode for super speed

- Advantage of park mode
  When only a single Async endpoint is active.

- Behavior of park mode
  1. The controller prefetches data/TRBs to do 3 * burst_size worth
     of packets.
  2. When park mode is disabled there will be some delay between
     bursts on the USB. This can be avoided if park mode is enabled
     in cases of only one endpoint is active.
  3. But this delay is significant only with systems of large
     latencies.
  4. We have noticed that in cases where a device NAKs often, it
     tends to bring down the performance for a single endpoint case.

- Issue on "park mode"
  1. LSP (List Processor) goes in and out of park mode irrespective
     of the fact that there are more endpoints active. #LSP consider
     that there is only one endpoint active.
  2. This causes master scheduler and transaction handlers to think
     that they are in park mode even though they are not. This is
     because request to transaction handlers, generated by HSCH is
     in park mode when the request is made
  3. This causes a case where the master scheduler calculates wrongly
     the number of TRB cache space available.
  4. Because of the wrongly calculated number of TRB spaces, the core
     fetches more TRBS than there is space for.
  5. This causes overwriting the TRB cache area into the TRQ cache
     area which is next to the TRB cache area.
  6. This causes invalidating an entry in the TRQ
  7. This causes transaction handlers to ignore a request in the TRQ
     which it should have processed.
  8. This causes the main scheduler to hang because it is waiting for
     status from transaction handler.
  9. This causes host controller to hang.

- Work Around
  Disabling park mode for super speed by setting GUCTL1[17] to be 1.

The STAR number is 9001415732, which is target to be released around
May,2020.

Reviewed-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
(cherry picked from commit 191211adfc8a797875079c228a10269c5b0d7e13)
(cherry picked from commit ee96ccf8455a100488af6449ab941423c81b1789)

4 years agoMLK-22866 imx8: Remove the optee shared memory from DDR banks
Ye Li [Tue, 29 Oct 2019 07:11:33 +0000 (00:11 -0700)]
MLK-22866 imx8: Remove the optee shared memory from DDR banks

Optee has 4MB shared memory at its top space which was assigned to
non-secure OS partition in ATF. By default this memory is added to
u-boot DDR banks and will pass to kernel. This means kernel has possibility
to allocate from this memory for system usage. At same time this memory is
used by optee and mem-remapped by optee kernel driver. So it is possible to
have conflict and cause kernel crash.

Fix the issue by removing the shared memory from u-boot DDR banks. Then it
is not visible for both u-boot and kernel and can avoid such issue.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Anson Huang <Anson.Huang@nxp.com>
(cherry picked from commit 164279c42de0d058b7abe198cc154ee683087e6a)
(cherry picked from commit 2c1016db0c08b8ade597146782c4267d77f77973)

4 years agoMLK-22851-3 imx8mq: Enable eMMC HS400 and SD UHS mode on EVK
Ye Li [Fri, 25 Oct 2019 08:28:48 +0000 (01:28 -0700)]
MLK-22851-3 imx8mq: Enable eMMC HS400 and SD UHS mode on EVK

iMX8MQ EVK board has a eMMC5.0 chip and supports SD3.0, so enable the UHS
and HS400 configs to enhance the eMMC/SD access.

The change also needs to set usdhc clock to 400Mhz, and add the off-on-delay-us
to SD reset pin, otherwise some SD cards will fail to select UHS mode in
re-initialization.

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

4 years agoMLK-22832 board: imx8mn_evk: Fix the retention hang on imx8mn lpddr4 evk
Jacky Bai [Wed, 23 Oct 2019 05:31:19 +0000 (13:31 +0800)]
MLK-22832 board: imx8mn_evk: Fix the retention hang on imx8mn lpddr4 evk

The '0x20060' register is used for phy memory reset, should not be put
in the ddrphy config section, so remove it from the timing script,
otherwise, ddr retention can NOT work. Additionally, the'0xd0000'
register config in phy section is redundant, remove it too.

Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 9d944032008fb37850aeb3d83f7de4e659fad319)
(cherry picked from commit 75e87a0af9b81d0b6c98234c8e33396360b3c629)
(cherry picked from commit f3dc8af4b6fe1bd6ade5c2d45df0ca11beeec5e0)

4 years agoMLK-22827-1: mxs_nand: bch: add the missing bch register debug0
Han Xu [Tue, 22 Oct 2019 17:24:39 +0000 (12:24 -0500)]
MLK-22827-1: mxs_nand: bch: add the missing bch register debug0

add the missing bch register debug0

Signed-off-by: Han Xu <han.xu@nxp.com>
(cherry picked from commit 0883946855f7e1eabe26787fbc8529ac412047e7)
(cherry picked from commit 56235ef0fd596ab9d1d0b15db3cf708d058da703)

4 years agoMLK-22755 mx7ulp: wdog: Wait for WDOG unlock and reconfiguration to complete
Breno Lima [Mon, 14 Oct 2019 00:35:53 +0000 (21:35 -0300)]
MLK-22755 mx7ulp: wdog: Wait for WDOG unlock and reconfiguration to complete

According to i.MX7ULP Reference Manual we should wait for WDOG unlock
and reconfiguration to complete.

Section "59.5.3 Configure Watchdog" provides the following example:

DisableInterrupts; //disable global interrupt
WDOG_CNT = 0xD928C520; //unlock watchdog
while(WDOG_CS[ULK]==0); //wait until registers are unlocked
WDOG_TOVAL = 256; //set timeout value
WDOG_CS = WDOG_CS_EN(1) | WDOG_CS_CLK(1) | WDOG_CS_INT(1) |
  WDOG_CS_WIN(0) | WDOG_CS_UPDATE(1);
while(WDOG_CS[RCS]==0); //wait until new configuration takes effect
EnableInterrupts; //enable global interrupt

Update U-Boot WDOG driver to align with i.MX7ULP reference manual.

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

4 years agoMLK-22766-1: imx6sx: configs: enable mtdparts for imx6sx sabreauto
Han Xu [Wed, 16 Oct 2019 22:24:18 +0000 (17:24 -0500)]
MLK-22766-1: imx6sx: configs: enable mtdparts for imx6sx sabreauto

Enable the mtdparts for imx6sx sabreauto platform

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

4 years agoMLK-22759-3 imx8mn: Add LPDDR4 EVK board support
Peng Fan [Fri, 19 Mar 2021 07:57:08 +0000 (15:57 +0800)]
MLK-22759-3 imx8mn: Add LPDDR4 EVK board support

Add support for iMX8MN LPDDR4 EVK board which uses 2GB LPDDR4 and
PCA9450B PMIC.

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

4 years agoMLK-22580-2: imx8mm-evk: config: add some dependencies and modify
Alice Guo [Fri, 11 Oct 2019 18:22:51 +0000 (02:22 +0800)]
MLK-22580-2: imx8mm-evk: config: add some dependencies and modify
dependency of CMD_NANDBCB`s default value

compiling nandbcb of imx8mm-evk depends on NAND and CMD_MTDPARTS

modify dependency of CMD_NANDBCB`s default value

Signed-off-by: Alice Guo <alice.guo@nxp.com>
(cherry picked from commit 1b14e8cbefdb0f8126ceb6a85b1fd0db142328e6)
(cherry picked from commit 31d900682a77b8dc0cd7112d66d898bbe52d5edb)

4 years agoMLK-22570-2 doc: habv4: Add encrypted boot documentation for i.MX8M, i.MX8MM and...
Breno Lima [Wed, 28 Aug 2019 22:10:09 +0000 (19:10 -0300)]
MLK-22570-2 doc: habv4: Add encrypted boot documentation for i.MX8M, i.MX8MM and i.MX8MN devices

Add HABv4 encrypted boot documentation for i.MX8M, i.MX8MM and i.MX8MN
family devices covering the following topics:

- How to encrypt and sign a flash.bin image.
- How to manage CAAM PRIBLOBs when using encrypted boot
- Add 4 CSF examples.

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

4 years agoMLK-22570-1 mx8mqevk: Add OP-TEE Device Tree Bindings
Clement Faure [Fri, 30 Aug 2019 14:37:08 +0000 (11:37 -0300)]
MLK-22570-1 mx8mqevk: Add OP-TEE Device Tree Bindings

Currently is not possible to use dek_blob command in
mx8mq:

u-boot=> dek_blob 0x40400000 0x40401000 128
Cannot get OP-TEE device

Add OP-TEE Device Tree Bindings to fix this issue.

Reviewed-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Clement Faure <clement.faure@nxp.com>
Signed-off-by: Breno Lima <breno.lima@nxp.com>
(cherry picked from commit f762fe218ec60025e2dfd6173efaa826286ba297)
(cherry picked from commit ffc0afa58547e102f1231f0c42048d18923d84ec)

4 years agoMLK-22749 imx8mq: Add workaround to fix sticky bits lock up
Ye Li [Tue, 27 Aug 2019 06:39:57 +0000 (23:39 -0700)]
MLK-22749 imx8mq: Add workaround to fix sticky bits lock up

On B1 chips with HAB v4.4, the sticky bits are not locked up in
HAB closed mode. We introduce a workaround in SPL to lock up
these bits and clear Manufacturing Protection Private Key for
secure boot.

For field return case, user has to build a SPL with
CONFIG_SECURE_STICKY_BITS_LOCKUP=n and set CONFIG_IMX_UNIQUE_ID to
part's unique id. When the UID check is passed, sticky bits are not
lockup and users can burn field return fuse. Otherwise the boot will
stop.

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

4 years agoMLK-22743 mx7ulp: Update unlock and refresh sequences in sWDOG driver
Breno Lima [Thu, 10 Oct 2019 13:43:02 +0000 (10:43 -0300)]
MLK-22743 mx7ulp: Update unlock and refresh sequences in sWDOG driver

According to i.MX7ULP Reference Manual the second word write for both
UNLOCK and REFRESH operations must occur in maximum 16 bus clock.

The current code is using writel() function which has a DMB barrier to
order the memory access. The DMB between two words write may introduce
some delay in certain circumstance, causing a WDOG timeout due to 16 bus
clock window requirement.

Replace writel() function by __raw_writel() to achieve a faster memory
access and avoid such issue.

Signed-off-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 5dd8c46d68d3267e989f980598a4e3e2ed04d4f9)
(cherry picked from commit 8d99b70490c88b09b88e96291ecc468c22f91d22)

4 years agoMLK-22711-2: fastboot: emmc: update bootloader to offset 0 for RevC QXP chip
Frank Li [Tue, 8 Oct 2019 15:20:55 +0000 (10:20 -0500)]
MLK-22711-2: fastboot: emmc: update bootloader to offset 0 for RevC QXP chip

ROM update emmc offset to 0.
previous B0 is 32K.

Signed-off-by: Frank Li <Frank.Li@nxp.com>
(cherry picked from commit b642241380227b97f0fa434e3d38dc746adbd9e0)
(cherry picked from commit 2065bf0a12180f73eb918d09dbe809c10077b033)
(cherry picked from commit 61870feff7a4b28b0f78a3af5329e0e540713662)

4 years agoMLK-22622 imx8m: Enable the SError exception
Ye Li [Fri, 6 Sep 2019 08:21:00 +0000 (01:21 -0700)]
MLK-22622 imx8m: Enable the SError exception

To work with commit 2f3c920(imx8m: workaround ROM serror),
we need to enable the SError exception and install vector in SPL.

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

4 years agoMLK-22654 mx7ulp: Update wdog disable sequence
Ye Li [Wed, 18 Sep 2019 08:56:34 +0000 (01:56 -0700)]
MLK-22654 mx7ulp: Update wdog disable sequence

Update the mx7ulp wdog disable sequence to avoid potential reset issue
in unlock or refresh sequence. Both sequence need two words write
to wdog CNT register in 16 bus clocks window, if miss the window,
the write will cause violation in wdog and reset the chip.

Current u-boot code is using writel() function which has a DMB barrier
to order the memory access. The DMB between two words write may introduce
some delay in certain circumstance, causing the wdog reset due to 16 bus
clock window requirement.

This patch replaces writel() function by __raw_writel() to avoid such issue,
and improve to check if watchdog is already disabled or unlocked.

Signed-off-by: Ye Li <ye.li@nxp.com>
Tested-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit b8c99d5f5bcc5573d3394b68890db16b6bb5fc88)
(cherry picked from commit 29cf0fa20f54ca80e9ba4baf9eee3e53c1c634fa)

4 years agoMLK-22577-2: usb: cdns3: Change the max packetsize of interrupt endpoint
Sherry Sun [Mon, 9 Sep 2019 21:14:16 +0000 (17:14 -0400)]
MLK-22577-2: usb: cdns3: Change the max packetsize of interrupt endpoint

When use ep1out interrupt endpoint to receive data in sdp, the max
packetsize of ep1out is set to 1024. But in cdns3 gadget driver, the
max packetsize is limited to 512 bytes in high speed. So we can't
implement data download through ep1out of cdns3 driver, here need
change the max packesize of interrupt endpoints to 1024.

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 17f321b4a32cfaac52339172dc354729e641451a)
(cherry picked from commit 9d81e87f6fc37b42c28694f3938b1e1c37879904)

4 years agoMLK-22556-1 spi: flexspi_nand: Add new flexspi nand driver
Ye Li [Mon, 1 Jul 2019 10:58:29 +0000 (03:58 -0700)]
MLK-22556-1 spi: flexspi_nand: Add new flexspi nand driver

Add flexspi_nand driver which works on iMX flexspi controller to support
SPI NAND flash. This driver requires DM_SPI and follows SPI-MEM interfaces
to adapt to the SPI NAND framework.

Note: Current implementation limits to the 12-bit column address. This is
popular in main stream SPI NAND and flash devices supported in u-boot.
If device with larger page size (> 4096) needs to support, we have to change
the driver.

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

4 years agoMLK-22515 doc: habv4: mx8m: Remove u-boot.bin dependency
Breno Lima [Tue, 27 Aug 2019 13:48:51 +0000 (10:48 -0300)]
MLK-22515 doc: habv4: mx8m: Remove u-boot.bin dependency

The u-boot.bin file is not included in flash.bin binary, remove it
from mx8m_mx8mm_secure_boot.txt guide.

Reviewed-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Breno Lima <breno.lima@nxp.com>
(cherry picked from commit 92f238a1faaae3bbad27873704d33277f0663c40)
(cherry picked from commit 352c0f3699f453187aff4974197fe64a502d3053)

4 years agoMLK-22513 doc: ahab: Update OS container image target
Breno Lima [Tue, 27 Aug 2019 11:39:15 +0000 (08:39 -0300)]
MLK-22513 doc: ahab: Update OS container image target

Commit 28dd37699022("imx8: Clean up targets") in imx-mkimage project
renamed flash_linux target to flash_kernel.

Update AHAB documentation to align with this change.

Reported-by: Frank Zhang <frank.zhang@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Breno Lima <breno.lima@nxp.com>
(cherry picked from commit 8713142afd953e89bb6aa460716692fbb0a6a413)
(cherry picked from commit 9905b167b07a1558dece08724c1d7d0655c5f866)

4 years agoMLK-22398-10 mx6sabresd: Enable PCIE IMX DM driver
Ye Li [Tue, 6 Aug 2019 08:04:55 +0000 (01:04 -0700)]
MLK-22398-10 mx6sabresd: Enable PCIE IMX DM driver

Update the board codes and configs to enable PCIE IMX driver on all
imx6dql sabresd boards.
The always on regulators is powered up in board_init for enabling
"pcie_reg" regulator.

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

4 years agoMLK-24042-1 DTS: imx6qp-sdb: Fix wrong polarity of pcie reset gpio
Ye Li [Fri, 22 May 2020 08:46:53 +0000 (01:46 -0700)]
MLK-24042-1 DTS: imx6qp-sdb: Fix wrong polarity of pcie reset gpio

The polarity of PCIE reset gpio is wrong in imx6qp-sdb DTS, which
causes PCIE link failed to setup on iMX6QP.

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