u-boot.git
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)

4 years agoMLK-22398-9 DTS: imx6qdl: Update DTS for PCIE
Ye Li [Tue, 6 Aug 2019 07:27:38 +0000 (00:27 -0700)]
MLK-22398-9 DTS: imx6qdl: Update DTS for PCIE

Add pci0 alias and gpr property for pcie node.

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

4 years agoMLK-22398-8 mx6sxsdb: Enable PCIE IMX DM driver
Ye Li [Tue, 6 Aug 2019 08:02:41 +0000 (01:02 -0700)]
MLK-22398-8 mx6sxsdb: Enable PCIE IMX DM driver

Update the board codes and configs to enable pcie imx DM driver.
The pcie node in SDB board DTS reply on the alway on regulator
"reg_pcie". So power up the always on regulators in board_init.

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

4 years agoMLK-22398-6 imx8qxp_mek/8dxl_phantom: Enable PCIE on MEK board
Ye Li [Mon, 5 Aug 2019 06:17:20 +0000 (23:17 -0700)]
MLK-22398-6 imx8qxp_mek/8dxl_phantom: Enable PCIE on MEK board

Update the configs tp enable the PCIE iMX DM driver on imx8qxp and
imx8dxl_phantom MEK board.

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

4 years agoMLK-22398-5 DTS: imx8qxp_mek/8dxl_phantom: Add PCI alias and node
Ye Li [Mon, 5 Aug 2019 06:16:15 +0000 (23:16 -0700)]
MLK-22398-5 DTS: imx8qxp_mek/8dxl_phantom: Add PCI alias and node

Add pci alias for pcieb.
Enable the pcieb node in MEK board and add relevant pin config and
regulator.

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

4 years agoMLK-22398-4 imx8qm_mek: Enable PCIE IMX DM driver on MEK board
Ye Li [Tue, 30 Jul 2019 08:36:47 +0000 (01:36 -0700)]
MLK-22398-4 imx8qm_mek: Enable PCIE IMX DM driver on MEK board

Update the configs on iMX8QM MEK board to enable PCIE IMX DM driver.
Users can use "pci enum" command to enumerate the devices.

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

4 years agoMLK-22398-3 DTS: imx8qm_mek: Add PCI alias and node for MEK board
Ye Li [Tue, 30 Jul 2019 08:36:13 +0000 (01:36 -0700)]
MLK-22398-3 DTS: imx8qm_mek: Add PCI alias and node for MEK board

Add PCI alias for pciea and pcieb.
Enable the pciea node in MEK board and add relevant pin config and
regulator

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

4 years agoMLK-22398-2 clk-imx8: Add pcie clocks for imx8qm/qxp
Ye Li [Tue, 30 Jul 2019 08:34:55 +0000 (01:34 -0700)]
MLK-22398-2 clk-imx8: Add pcie clocks for imx8qm/qxp

Add PCIE relevant clocks to clk-imx8 driver, so PCIE IMX driver can
set the clocks through DTB

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

4 years agoMLK-22398-1 pcie_imx: Update PCIE IMX driver
Ye Li [Tue, 30 Jul 2019 08:34:07 +0000 (01:34 -0700)]
MLK-22398-1 pcie_imx: Update PCIE IMX driver

Update PCIE IMX DM driver supports iMX8QM/QXP and
iMX6QDL/QP/SX. Non-DM driver supports iMX6QDL/QP/SX.
The changes in DM parses cfg/mem/io ranges, gpios, regulators and
clocks (imx8 only) from DTS for RC mode, and set iATU mapping for
each regions.

The original iATU mapping sets full PCI region to CFG space. iATU
translates MEM/IO TLP to CFG TLP when the address is falled into
the region.
The new mapping sets CFG/IO/MEM spaces to align with kernel like below
   ATU region 0 for MEM access
   ATU region 1 for CFG0 or CFG1 access by bus id
   ATU region 2 for IO access

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

4 years agoMLK-22357-4 imx8: Enable usb2 configs on imx8 platform
Sherry Sun [Wed, 31 Jul 2019 19:31:46 +0000 (15:31 -0400)]
MLK-22357-4 imx8: Enable usb2 configs on imx8 platform

Enable the configs of usb2 so that both usb2 and usb3 gadget
drivers are now supported on imx8 plaform. And add
CONFIG_USB_PORT_AUTO to support usb port autodetect function
for SDP/fastboot.

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
(cherry picked from commit 1aa6e3f84c65e99de1219aa5d58d454cef1129f9)
(cherry picked from commit 89f1ba4b13df16ddd9760a0c8c44171a9bf917d7)

4 years agoMLK-22357-3 usb: Clear the value of bEndpointAddress before refill it
Sherry Sun [Wed, 31 Jul 2019 21:07:04 +0000 (17:07 -0400)]
MLK-22357-3 usb: Clear the value of bEndpointAddress before refill it

For one usb controller driver, the transport endpoint address won't
change after the driver initialize. So the value of bEndpointAddress
have no need to be cleared.

But when more than one usb controller drivers are used at the same time,
different endpoints address is used by different controller driver
usually, it will cause confusion of endpoint address. So the value of
bEndpointAddress had better been cleared everytime before we refill
endpoint address to it.

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
(cherry picked from commit 9f9102968a777cfdcf0609a5435b35406f57124c)
(cherry picked from commit 16de9e791a045ca2cb2fe375be1d6561068e7a91)

4 years agoMLK-22357-2 sdp/fastboot: Add board_usb_gadget_port_auto() to autodetect the connecte...
Sherry Sun [Fri, 2 Aug 2019 17:58:03 +0000 (13:58 -0400)]
MLK-22357-2 sdp/fastboot: Add board_usb_gadget_port_auto() to autodetect the connected usb port

On imx8 platform, the usb2 and usb3 ports are both supported. Which
means we can use usb2(ci_udc_otg) and usb3(cdns3_generic_peripheral)
gadget driver to run sdp/fastboot/ums at the same time.

For sdp and the fastboot that runs automatically when uboot starts,
board_usb_gadget_port_auto() is added to autodetect usb port, this
means that we don't have to specify which USB port should be used to
download in code, now we can just connect either usb port then it
will download automatically.

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
(cherry picked from commit 2b6fd3da6fffae0732e8e91ef5c1f870ea393ca9)
(cherry picked from commit 7c8e0606ea4aaeceae1f1d1e17db1503ac9f841e)

4 years agoMLK-22357-1 usb: Add handle_interrupts function pointer for UCLASS_USB_GADGET_GENERIC
Sherry Sun [Wed, 31 Jul 2019 00:42:02 +0000 (20:42 -0400)]
MLK-22357-1 usb: Add handle_interrupts function pointer for UCLASS_USB_GADGET_GENERIC

Since the orginal way to call interrupts handle function of DM usb
gadget driver is through dm_usb_gadget_handle_interrupts(), when we want
to use two or more different gadget drivers at the same time, it will
cause error of duplicate names.

So here add a handle_interrupts function pointer instead of driectly
call dm_usb_gadget_handle_interrupts(), then the error can be avoided.

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
(cherry picked from commit 2458ddd952a6a2d2304dfe7ea34e4192cd1d5ed4)
(cherry picked from commit c9fc90db5b31a0f111f85b749a55b417b1341af3)

4 years agoMLK-22351 iMX8DXL: Add iMX8DXL phantom chip MEK board
Ye Li [Wed, 12 Jun 2019 03:27:12 +0000 (20:27 -0700)]
MLK-22351 iMX8DXL: Add iMX8DXL phantom chip MEK board

The iMX8DXL phantom chip is 15x15 iMX8QXP, so we will use 8QXP as SOC,
add configs and codes for the new board.

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

4 years agoMLK-23574-36 DTS: imx8mm/8mn: Update USB assigned clocks
Ye Li [Sun, 19 Apr 2020 09:25:48 +0000 (02:25 -0700)]
MLK-23574-36 DTS: imx8mm/8mn: Update USB assigned clocks

Update OTG1 and OTG2 assigned clocks for USB core ref clock.
Remove the deleting of OTG assigned clocks since we have support
them in clk drivers

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

4 years agoMLK-22336-4 imx8mm: configs: Move CONFIG_CI_UDC
Sherry Sun [Sat, 27 Jul 2019 01:22:54 +0000 (21:22 -0400)]
MLK-22336-4 imx8mm: configs: Move CONFIG_CI_UDC

For imx8mm, the CONFIG_CI_UDC is defined in
include/configs/imx8mm_evk.h, which leads to CONFIG_CI_UDC can not been
enabled in Kconfig, and CONFIG_DM_USB_GADGET which we need selected by
CONFIG_CI_UDC in Kconfig also can not work. So move CONFIG_CI_UDC to
defconfig files.

The CONFIG_USB_GADGET_DUALSPEED is selected by CONFIG_CI_UDC in Kconfig
files too, so we don't need it to be defined in include/configs/imx8mm_evk.h
files.

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit cb33ca7a2a5052bdb7b479ae2af5169360625962)
(cherry picked from commit 1f4da952f962a03a9a7b274704924f7f04f71bae)

4 years agoMLK-22336-3 usb: Kconfig: imply DM_USB_GADGET
Sherry Sun [Sat, 27 Jul 2019 01:12:21 +0000 (21:12 -0400)]
MLK-22336-3 usb: Kconfig: imply DM_USB_GADGET

Since the ci_udc driver has been converted to DM driver, the
CONFIG_DM_USB_GADGET should also be selected when CONFIG_CI_UDC
is enabled, then we can use DM ci_udc driver.

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit d456376b59459403c4570d66297cc34f7264bd6d)
(cherry picked from commit 64b058c4ece0d4faef9a375bf4b75af16e3815d2)

4 years agoMLK-22336-2 dts: Add a new usb gadget node on imx6/7/7ulp/8/8mm
Sherry Sun [Thu, 25 Jul 2019 21:20:26 +0000 (17:20 -0400)]
MLK-22336-2 dts: Add a new usb gadget node on imx6/7/7ulp/8/8mm

Since one dts node can only bind to one DM driver in uboot, for usbotg
node, we can not use it for both DM usb host driver and DM usb gadget
driver. So a new usb gadget node is added to each usbotg node, the
original usbotg node is bind to usb host driver as default, and the
new usb gadget node is bind to usb gadet driver as default.

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 342adc8948def972dbd08b71009584745f7826f0)
(cherry picked from commit 6716cd87079cae70a5c521f83be292628403b9ab)

4 years agoMLK-22336-1 usb: ci_udc: Convert driver to DM_USB_GADGET
Sherry Sun [Tue, 23 Jul 2019 19:21:57 +0000 (15:21 -0400)]
MLK-22336-1 usb: ci_udc: Convert driver to DM_USB_GADGET

Convert the ci_udc driver to driver model by using the uclass
UCLASS_USB_GADGET_GENERIC. The clk and power of USB controller and USB
PHY both are initialized by parsing the device tree nodes.

If CONFIG_DM_USB_GADGET is defined, we use the ci_udc driver in DM way,
if it does not defined, we can use ci_udc driver in its original Non-DM
way.

Move some USB PHY register definitions from ehci-mx6.c to
asm/mach-imx/regs-usbphy.h in order to share with DM usb gadget driver.

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

4 years agoMLK-22293-12 mx6q/qp: Update SATA codes and configs for sabre boards
Ye Li [Tue, 23 Jul 2019 03:53:31 +0000 (20:53 -0700)]
MLK-22293-12 mx6q/qp: Update SATA codes and configs for sabre boards

Enable the SCSI and imx AHCI driver in imx6q/qp sabreauto and sabresd
SATA configs. Removed unused codes for old SATA driver.

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

4 years agoMLK-22293-11 DTS: imx6q/qp: Add gpr property to sata node
Ye Li [Tue, 23 Jul 2019 03:52:12 +0000 (20:52 -0700)]
MLK-22293-11 DTS: imx6q/qp: Add gpr property to sata node

Because u-boot does not support syscon_regmap_lookup_by_compatible,
we have to add a gpr phandle property to point to iomuxc gpr node.
and uses syscon_regmap_lookup_by_phandle to get gpr node in driver.

This is common implementation in other nodes and better than
by_compatible interface.

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

4 years agoMLK-22293-9 imx6: clock: Enable sata clock for imx AHCI
Ye Li [Tue, 23 Jul 2019 03:50:41 +0000 (20:50 -0700)]
MLK-22293-9 imx6: clock: Enable sata clock for imx AHCI

We reuse current sata clock interface in imx AHCI for imx6q/qp. So
enable them when the config is set

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

4 years agoMLK-22293-8 iMX8QM: enable AHCI on MEK
Ye Li [Thu, 18 Jul 2019 03:12:47 +0000 (20:12 -0700)]
MLK-22293-8 iMX8QM: enable AHCI on MEK

Enable the iMX AHCI driver and relevat codes on iMX8QM MEK board.
User can access the SATA disk via SCSI commands.

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

4 years agoMLK-22293-7 DTS: Update iMX8QM MEK dts to enable SATA
Ye Li [Thu, 18 Jul 2019 03:16:24 +0000 (20:16 -0700)]
MLK-22293-7 DTS: Update iMX8QM MEK dts to enable SATA

Enable the SATA node in iMX8QM MEK DTS file for iMX AHCI driver.

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

4 years agoMLK-22293-6 clk-imx8: Add SATA relevant clock for iMX8QM
Ye Li [Fri, 19 Jul 2019 03:41:46 +0000 (20:41 -0700)]
MLK-22293-6 clk-imx8: Add SATA relevant clock for iMX8QM

Add the SATA clocks to clk-imx8, so we can use clk uclass interfaces
to access the clocks in AHCI driver.

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

4 years agoMLK-22293-5 env: Update SATA env location driver to use SCSI
Ye Li [Tue, 23 Jul 2019 01:23:05 +0000 (18:23 -0700)]
MLK-22293-5 env: Update SATA env location driver to use SCSI

When DM SCSI is enabled with AHCI, use SCSI device to replace SATA
device to access the peripheral.

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

4 years agoMLK-22293-4 fastboot: Change to use SCSI interface for sata device
Ye Li [Fri, 19 Jul 2019 03:42:17 +0000 (20:42 -0700)]
MLK-22293-4 fastboot: Change to use SCSI interface for sata device

After enabling AHCI driver and DM SCSI, we need to access SCSI device
for SATA

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

4 years agoMLK-22293-3 ata: ahci: Fix nport index issue
Ye Li [Fri, 19 Jul 2019 03:40:23 +0000 (20:40 -0700)]
MLK-22293-3 ata: ahci: Fix nport index issue

Ahci driver set max ports to 2, but the codes has comparing issue if we
only has one port. Also suppress the print of invalid port.

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

4 years agoMLK-22293-2 ata: Add iMX AHCI driver
Ye Li [Thu, 18 Jul 2019 02:54:55 +0000 (19:54 -0700)]
MLK-22293-2 ata: Add iMX AHCI driver

Add new iMX AHCI driver which is ported from kernel and support
imx6q/qp/imx8qm.
The new driver adapt to SCSI through common AHCI interfaces in ahci.c
So after enabling it, we will use SCSI commands to access the SATA
disk device.

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

4 years agoMLK-21485 imx8qm/qxp: Extend image size for bootaux M4
Ye Li [Tue, 7 May 2019 07:06:17 +0000 (00:06 -0700)]
MLK-21485 imx8qm/qxp: Extend image size for bootaux M4

iMX8 has consective address for TCML and TCMU, so the M4 image size
could exceed the TCML boundary and put its data section in TCMU.

So change the size limitation in bootaux to 256KB to include TCMU.

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

4 years agoMA-14501[Android] Set BOOTAUX_RESERVED_MEM macro to iMX8 defconfig
Ye Li [Fri, 24 May 2019 06:07:18 +0000 (23:07 -0700)]
MA-14501[Android] Set BOOTAUX_RESERVED_MEM macro to iMX8 defconfig

As the M4 use different DDR memory size in normal android/car2 and car
image, use different defconfig for car2 to decrease DDR memory
reservation. So memory reserved for each M4 core is 8MB in car2 and
normal android image. it's 32MB for car image.

Change-Id: Idf608f539cd614a154c78e3a1af28eff1da5c1f2
Signed-off-by: Zhang Bo <bo.zhang@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 565f2204e7925d3bd25623ff1104a54ee0f8a601)
(cherry picked from commit fdb033f37174713728132fd8e933225019c3aec5)

4 years agoMLK-20976-1 imx8qm: mek: remove partition creation for domu
Peng Fan [Mon, 25 Feb 2019 09:59:17 +0000 (17:59 +0800)]
MLK-20976-1 imx8qm: mek: remove partition creation for domu

Partition creation will be done in xen, remove it from uboot.
And add domu-android-auto property

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Flynn xu <flynn.xu@nxp.com>
(cherry picked from commit 23f7a037d14d05c2eea5622bd8ffda2f23d04372)
(cherry picked from commit 9646e5b095f4c79114eaa7d60bfa03504c7da172)
(cherry picked from commit d4d53611c19b67d217bc9194e269e2dcefd0e72f)

4 years agoMLK-20542 imx8qm: xen: mek: add magic number
Peng Fan [Wed, 12 Dec 2018 06:28:56 +0000 (14:28 +0800)]
MLK-20542 imx8qm: xen: mek: add magic number

Write magic number in board early init, and clear magic when booting
Linux.

This is to let XEN know the current EL1 code is U-Boot or Linux
when reset/reboot. This is just a workaround because CM41 could not
communicate with XEN now, even XEN knows that EL1 is reseting/rebooting.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Flynn xu <flynn.xu@nxp.com>
(cherry picked from commit 8132f6b5848d45cab795bb472d6484130985415d)
(cherry picked from commit c9dc0848f0ccf01f3a7c048d1a309ab99c46bd48)
(cherry picked from commit ace8af3d53a8e3ebb06a72099a2ebe274703d057)

4 years agoMLK-19890 configs: imx8qm_mek: create partition before loading hdmi firmware
Peng Fan [Thu, 11 Oct 2018 09:13:25 +0000 (17:13 +0800)]
MLK-19890 configs: imx8qm_mek: create partition before loading hdmi firmware

After loading hdmi firmware, create partition, HDMI power domain will be
off, this will cause HDMI firmware being lost.

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

4 years agoMLK-21854-5 imx8qxp_mek: Update MEK board defconfig to support UUU
Ye Li [Tue, 21 May 2019 06:28:10 +0000 (23:28 -0700)]
MLK-21854-5 imx8qxp_mek: Update MEK board defconfig to support UUU

Enable the SPL SDP driver and FASTBOOT driver in iMX8QXP MEK board
defconfigs to support running UUU

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

4 years agoMLK-21854-3 imx8qm_mek: Update MEK board defconfig to support UUU
Ye Li [Tue, 21 May 2019 03:23:00 +0000 (20:23 -0700)]
MLK-21854-3 imx8qm_mek: Update MEK board defconfig to support UUU

Enable the SPL SDP driver and FASTBOOT driver in MEK board defconfigs

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

4 years agoMLK-20886-12: imx8qxp_mek: Enable i2c and i2c mux virtual drivers
Ye Li [Thu, 31 Jan 2019 06:44:50 +0000 (22:44 -0800)]
MLK-20886-12: imx8qxp_mek: Enable i2c and i2c mux virtual drivers

Update the defconfig files for imx8qxp MEK to enable i2c and
i2c mux virtual drivers.

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

4 years agoMLK-20945-7 imx8qm/qxp: Add MEK FSPI configurations
Ye Li [Sun, 28 Apr 2019 08:21:44 +0000 (01:21 -0700)]
MLK-20945-7 imx8qm/qxp: Add MEK FSPI configurations

Add MEK FSPI configs to enable SPL SPI and NOR support for flexspi booting

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

4 years agoMLK-20945-6 spl: Fix DM_SPI_FLASH build error in SPL
Ye Li [Tue, 19 Feb 2019 08:13:41 +0000 (00:13 -0800)]
MLK-20945-6 spl: Fix DM_SPI_FLASH build error in SPL

SPL should not use DM_SPI_FLASH, this is already cleaned in
Makefile.uncmd_spl, but not in config_uncmd_spl.h

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

4 years agoMLK-20945-3 imx_virt_i2c: Add DM_FLAG_DEFAULT_PD_CTRL_OFF flag
Ye Li [Tue, 19 Feb 2019 07:51:46 +0000 (23:51 -0800)]
MLK-20945-3 imx_virt_i2c: Add DM_FLAG_DEFAULT_PD_CTRL_OFF flag

When we probe device with virtual i2c driver, it will definitely
fail to power up the PD. Becasue the resource is owned by M4. So
set this driver to ignore the power up result

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 7f753d1b5950015b11be58aa937e5c14b9f26d7a)
(cherry picked from commit 6ac1ee462c7000e7017c55f76550551a6267dc58)
(cherry picked from commit 08e051be36043273c4d5fc496e657aaeab5b16e7)

4 years agoMLK-20939 imx_virt_i2c: Add a STOP flag for last message
Ye Li [Mon, 18 Feb 2019 02:26:03 +0000 (18:26 -0800)]
MLK-20939 imx_virt_i2c: Add a STOP flag for last message

Add a new private flag I2C_M_SRTM_STOP(0x0200) to indicate if STOP
is needed for current message.
When reading/writing registers for slave devices, generally we have two messages,
the first message writes the register address, second message reads/writes the value.
Only the last message needs STOP. But previously M4 sends STOP for each message,
this causes some slave devices treat it as end of transfer. Then, second message won't
have any effect. To solve the problem, we introduce this private STOP flag, so M4 can
STOP according to the flag.

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

4 years agoMLK-21850-2 imx_virt_i2c: Add DM_FLAG_IGNORE_DEFAULT_CLKS flag
Ye Li [Sun, 28 Apr 2019 11:12:34 +0000 (04:12 -0700)]
MLK-21850-2 imx_virt_i2c: Add DM_FLAG_IGNORE_DEFAULT_CLKS flag

When we probe device with virtual i2c driver, assigning default clock
will definitely return false, becasue the resource is owned by M4. So
set this driver to ignore the default clocks

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

4 years agoMLK-21850-1 dm: device: Check driver flag before setting default clocks
Ye Li [Sun, 28 Apr 2019 11:08:43 +0000 (04:08 -0700)]
MLK-21850-1 dm: device: Check driver flag before setting default clocks

Add a new driver FLAG (DM_FLAG_IGNORE_DEFAULT_CLKS). If any driver
is set with this flag, then when probing the device, we will skip
setting the default clocks.

This is useful when clock driver can't work with some device driver.

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

4 years agoMLK-20886-8 DTS: imx8qxp_mek: Update for virtual i2c and i2c mux driver
Ye Li [Thu, 31 Jan 2019 06:32:53 +0000 (22:32 -0800)]
MLK-20886-8 DTS: imx8qxp_mek: Update for virtual i2c and i2c mux driver

Add compatible strings and properties to i2c1 node for using virtual
i2c and i2c mux drivers

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

4 years agoMLK-20886-7 DTS: imx8qm/qxp: Add MU8 and MU9 nodes
Ye Li [Thu, 31 Jan 2019 06:31:02 +0000 (22:31 -0800)]
MLK-20886-7 DTS: imx8qm/qxp: Add MU8 and MU9 nodes

We use MU8 and MU9 to communicate with M4_0 and M4_1 in u-boot. Add
relevant nodes for the MU driver.

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

4 years agoMLK-20886-6 imx8qm/qxp: Implement runtime i2c driver binding
Ye Li [Thu, 31 Jan 2019 06:24:15 +0000 (22:24 -0800)]
MLK-20886-6 imx8qm/qxp: Implement runtime i2c driver binding

When a i2c device is binding with drivers, we check whether current
partition ownes the resource. If not owned, the binding to local lpi2c
driver will fail, otherwise binding to virtual i2c driver will fail.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 81dd157fd0ba476c994e95a63515cb65164f1e87)
(cherry picked from commit 8393fe1e2ad6025f686956a447a6acee3250a2b4)
(cherry picked from commit e207f7a941b86ab38691a295ef9ed17e0bb8f035)

4 years agoMLK-20886-5 imx8qm/qxp: Implement VService function and buffer pagetable
Ye Li [Thu, 31 Jan 2019 06:09:23 +0000 (22:09 -0800)]
MLK-20886-5 imx8qm/qxp: Implement VService function and buffer pagetable

Override the board_imx_vservice_find_mu for finding MU device for
virtual devices. The matching logic is if the M4_0 partition ownes
the resource of the device, we select MU8 for this Vservice channel.
Otherwise, if the M4_1 partition ownes the resource, we select MU9.

We reuse the kernel RPMSG Vring buffer for VService buffer, because it is
shared between OS partition and M4 partition. The pagetable is needed for
this region, since it is not in memregs of OS partition.

board_imx_vservice_get_buffer is also overriden is this patch to divide
VService buffer for MU8 and MU9.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 4358b4cdfc4752822066d480dd1c10086c211be7)
(cherry picked from commit 8c407ea63ad7c7cf59eb6d8b96766cd163026d82)
(cherry picked from commit 10decd628e25e4ac07651b35f7e11b2efc331edd)

4 years agoMLK-20886-4 lpi2c: Provide override binding function
Ye Li [Thu, 31 Jan 2019 06:05:43 +0000 (22:05 -0800)]
MLK-20886-4 lpi2c: Provide override binding function

We provide override binding function, so the ARCH level can use it
to determine if it is ok to bind with lpi2c driver.

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

4 years agoMLK-20886-3 i2c: Add virtual i2c and virtual i2c mux drivers
Ye Li [Thu, 31 Jan 2019 05:50:31 +0000 (21:50 -0800)]
MLK-20886-3 i2c: Add virtual i2c and virtual i2c mux drivers

Add virtual i2c driver which replies on the VService to send SRTM i2c
messages with M4.
For each output on i2c mux, M4 side abstracts a i2c bus with special bus
id. The virtual i2c mux follows basic mux design, but uses dedicated flag
to pass the abstract bus id for the mux output to virtual i2c driver.

Virtual i2c and virtual i2c mux will bind nodes with compatible string
"fsl,imx-virt-i2c" and "fsl,imx-virt-i2c-mux".

To support binding local i2c driver or virtual i2c driver at runtime. We
provides a override function for the driver bind. ARCH level is responsible
to implement it.

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

4 years agoMLK-20886-2 imx: Add Virtual service glue layer
Ye Li [Thu, 31 Jan 2019 05:31:27 +0000 (21:31 -0800)]
MLK-20886-2 imx: Add Virtual service glue layer

We use a glue layer to link the low level MU driver and virtual drivers.
This glue layer is named to virtual service (iMX VService). Virtual service
provides unified interfaces for setup connection with M4, get message buffer
and send/receive message, etc.

Multiple virtual drivers (i2c, gpio, etc)
             |
         iMX Vservice
             |
       imx_mu_m4 driver

For each virtual device, by default, the Vservice uses the device node property
"fsl,vservice-mu" to specify the MU node handler. A override function is also provided,
so te ARCH level can define its rule. We will use the override function for dynamically
select MU on 8QM/QXP.

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

4 years agoMLK-20886-1 misc: MU: Add MU driver to communicate with M4
Ye Li [Thu, 31 Jan 2019 05:21:35 +0000 (21:21 -0800)]
MLK-20886-1 misc: MU: Add MU driver to communicate with M4

Add a common iMX MU driver in misc uclass to communicate with M4.
The MU message format is defined to use 4 words as below, the driver
will use all 4 TR/RR in MU to pass one message

|WORD 0     | WORD 1      | WORD 2          | WORD 3         |
|SEQ        | TYPE        | PAYLOAD ADDRESS | PAYLOAD LENGTH |

 - SEQ:
   A sequence id starts from 0 and increases for each request message

 - TYPE:
   0x1:  Request.  Message sent from AP will set to this value.
   0x2:  Response. Message responded from M4 set to this value.
   0x3:  MU A side is ready.
   0x4:  MU B side is ready.

 - PAYLOAD ADDRESS:
   A pointer to the memory address where the uplayer message is stored

 - PAYLOAD LENGTH:
   The uplayer message length

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

4 years agoMLK-20794-1 imx8: Add legacy kernel FDT updating for fused parts
Ye Li [Thu, 24 Jan 2019 07:42:57 +0000 (23:42 -0800)]
MLK-20794-1 imx8: Add legacy kernel FDT updating for fused parts

Before booting kernel, we check all nodes in kernel FDT whether they
are owned in our partition. If it is not owned, we will disable it in FDT.

For fused iMX8X 17x17 parts, like DC0 is disabled, SCFW only disable SC_R_DC_0,
other sub-modules in DC0 SS are still assign to our partition. Since DC0 is fused,
we actually can't access these sub-modules.

This patch changes the algorithm to check resources along the power domain tree to the
top node of that SS power domain. If any resource in the PD tree is not owned, we will
disable the peripheral node.
For example, the i2c0_mipi_lvds1 peripheral node, according to power domain tree,
we checks resources: SC_R_MIPI_1_I2C_0  -->  SC_R_MIPI_1  --> SC_R_DC_0. When SC_R_DC_0
is not owned, we will disable the i2c0_mipi_lvds1 peripheral node from FDT.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit da636e4b8eda4698be6e2e53767cc1a598aadb0b)
(cherry picked from commit 8b83db421811d9d761c004d000eb0259902ad150)
(cherry picked from commit 0819497d68537c20d1d8d05e0e6e5a49710b4c35)

4 years agoMLK-18393 imx8: Check the eDMA channels and update DTB
Ye Li [Fri, 18 May 2018 02:49:03 +0000 (19:49 -0700)]
MLK-18393 imx8: Check the eDMA channels and update DTB

Since M4 will arrange some eDMA channels to its partition, the A core
can't use them. We have to remove these eDMA channels from DTB dynamically.

Different like other resources, disabling the eDMA channels require to modify
the edma nodes by removing relevant registers, interrupts configurations, and
adjust dma channels number.

This patch searches the edma nodes from kernel DTB, checks the channels by
binding their registers base address with their resource IDs. Then update
the reg, interrupts, interrupt-names and dma-channels properties.

Signed-off-by: Ye Li <ye.li@nxp.com>
Acked-by : Robin Gong <yibin.gong@nxp.com>

(cherry picked from commit 37efd38e5306680047ab9545f271716fea15fa95)
(cherry picked from commit ec6a694c1430f023401286862902bd14ca9acf87)
(cherry picked from commit 1aa411d4a3f401ab85b62eadc7c426a797d59b74)

4 years agoMLK-21856 imx8: Check the RevA ROM pass over info only in u-boot
Ye Li [Tue, 23 Apr 2019 08:47:11 +0000 (01:47 -0700)]
MLK-21856 imx8: Check the RevA ROM pass over info only in u-boot

Since we only support RevA booting without SPL, so move the ROM pass
over info checking to u-boot build. Because the we get CPU revision
from SCU, need moving it to arch_cpu_init_dm after SCFW driver is ready.

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

4 years agoMLK-20654-2 imx8: SPL: Move arch_cpu_init to board_init_f
Ye Li [Thu, 25 Apr 2019 04:57:23 +0000 (21:57 -0700)]
MLK-20654-2 imx8: SPL: Move arch_cpu_init to board_init_f

Since we have data section save/restore in arch_cpu_init, need it
in early stage, so move arch_cpu_init to board_init_f

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

4 years agoMLK-19882 imx8qm/qxp: introduce dom0fdt_file env
Peng Fan [Thu, 11 Oct 2018 06:38:46 +0000 (14:38 +0800)]
MLK-19882 imx8qm/qxp: introduce dom0fdt_file env

Introduce dom0fdt_file env to let user could change
the dom0 dtb file.

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

4 years agoMLK-18161-12 imx8qm/imx8qxp - Power down devices enabled by uboot before launching...
Ye Li [Thu, 19 Apr 2018 02:34:11 +0000 (19:34 -0700)]
MLK-18161-12 imx8qm/imx8qxp - Power down devices enabled by uboot before launching the kernel

Make sure that all devices that are powered up by uboot
are powered down before bringing up kernel.
Else the subsystem/device will never be powered down by SCFW even though
from the kernel's point of view it should be powered down.

Benefiting from power domain driver, We have implemented the function "power_off_pd_devices"
to power off all active devices. No need to explicitly power off them in board_quiesce_devices.

Apply the same power off interface to SPL as well.

Signed-off-by: Ranjani Vaidyanathan <Ranjani.Vaidyanathan@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 3ab7cc26500eb78407bc6454a48f4d5f0ebf4f60)
(cherry picked from commit f6c3e3191de31f0249a89a24a477d82feecb526f)
(cherry picked from commit 1105214ef0023bf3df1e0b8071a795d42013a35e)

4 years agoMLK-19011-2 configs: imx8qm_mek: add jailhouse boot env
Peng Fan [Mon, 23 Jul 2018 07:36:51 +0000 (15:36 +0800)]
MLK-19011-2 configs: imx8qm_mek: add jailhouse boot env

Add jailhouse boot env. run `jh_netboot` or `jh_mmcboot` to
boot Linux.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 2248152c7217ac78f4d399612679a45c54405502)
(cherry picked from commit 4b6b331c424c4d62844641c32c90915ebf5bf223)
(cherry picked from commit f21fc30aa7b723db68c2d62afc6be0edb9de0ed2)
(cherry picked from commit a607d579064989e9ad285e9115ebe5cac3e69d09)

4 years agoMLK-19011-1 configs: imx8qxp_mek: add jailhouse boot env
Peng Fan [Mon, 23 Jul 2018 07:29:07 +0000 (15:29 +0800)]
MLK-19011-1 configs: imx8qxp_mek: add jailhouse boot env

Add jailhouse boot env. Use `run jh_netboot` or `jh_mmcboot`
to boot Linux.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 8a575a160b8e4f8cfdd79177a8f9551106395cf9)
(cherry picked from commit 864c2f9cb3463bfa715cbfd1d7ca16d8bd323003)
(cherry picked from commit e3ba5c0719e4b6b7867451b815f11a3683dd393d)
(cherry picked from commit 931d1bd7a4fd6675d0f0b891afc6203bdfd185f6)

4 years agoMLK-18316 imx8: Fix USBOTG disconnect when XRDC blocking is enabled
Ye Li [Tue, 15 May 2018 09:03:19 +0000 (02:03 -0700)]
MLK-18316 imx8: Fix USBOTG disconnect when XRDC blocking is enabled

We clean USBOTG register USBCMD if it is used in serial download mode.
When XRDC blocking is enabled, we can't write this register directly,
must enable the OTG power, otherwise the kernel will get SError
exception in mfgtool.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit cf2143dc97b2a8f21b828c7386c59ee965d981f2)
(cherry picked from commit 55dd2c8e17eca27b3d393be9fd84a153ce7bf37b)
(cherry picked from commit 4cadac201b480ac28dcbb27903489a98c0303a3d)
(cherry picked from commit 60d41ce815e5bd63952794d2868ee7dd3be54157)

4 years agoMLK-18172-2: imx8: Introduce xenlinux_addr for dom0 kernel
Leonard Crestez [Fri, 27 Apr 2018 11:49:01 +0000 (14:49 +0300)]
MLK-18172-2: imx8: Introduce xenlinux_addr for dom0 kernel

Avoid overloading variable meaning and overlap with hdp_addr.

Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
(cherry picked from commit 9e4b3e80b4b2f40bb35a2c8f1b5ede9868788a34)
(cherry picked from commit 7dea0df52f0100f2b363b79d793f271fac5b6fab)
(cherry picked from commit dfb3c57f9313ed0bee355dd7217135d05c824be6)
(cherry picked from commit e5f701e32d3f516f15c0c7c53a85d94381838a17)

4 years agoMLK-18172-1: imx8qm_mek: Load hdmi fw before dom0 kernel for xenboot
Leonard Crestez [Thu, 26 Apr 2018 19:17:45 +0000 (22:17 +0300)]
MLK-18172-1: imx8qm_mek: Load hdmi fw before dom0 kernel for xenboot

Xen boot writes ${filesize} to /chosen/module but if HDMI fw is present
then the size of hdmitxfw.bin is written instead of the size of dom0
kernel.

Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
(cherry picked from commit 8823d52896aedf740899c59db3da73f8478c40ed)
(cherry picked from commit 0efebadd915a999030c2462be9c714db3ae51895)
(cherry picked from commit 02e8bbe4e659a7ffb360c392ea79ce073b90f276)
(cherry picked from commit a12d5e0559843c6870aa0fb2091ebe9f23bdbc56)

4 years agoMLK-18129-2 imx8qm/qxp: Add secure boot environment
Ye Li [Wed, 25 Apr 2018 09:45:32 +0000 (02:45 -0700)]
MLK-18129-2 imx8qm/qxp: Add secure boot environment

Add the secure boot relevant environment variables to MEK.
When CONFIG_AHAB_BOOT is enabled, we will switch to boot in this
new way:
1. Load the OS container to address 0x98000000
2. Using auth_cntr to authenticate the OS container. It will load the
   kernel and FDT to destination address.
3. Using booti to boot kernel.

Signed-off-by: Ye Li <ye.li@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 545c8fe112244f20377e97921389c86eacc8551f)
(cherry picked from commit cba5acebbe6be0736f229ef719b1a1e5835e1a5f)
(cherry picked from commit 07b9850354b27dafa4cc774c59770931af2ac898)
(cherry picked from commit 149006de99c9c214232d30cc2e9795401766fe4b)

4 years agoMLK-17998 configs: imx8qxp_mek: add xenmmcboot and xennetboot
Peng Fan [Wed, 11 Apr 2018 07:53:18 +0000 (15:53 +0800)]
MLK-17998 configs: imx8qxp_mek: add xenmmcboot and xennetboot

Add xenmmcboot and xennetboot command.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 13f791db9a2bd0fe442115e77c91e8a56a4cf217)
(cherry picked from commit f71b5a989d0292e17f8a5ad526ea8faa3d28ea60)
(cherry picked from commit e7d4d1ff4a6a1055d1339623edd81d52fa81a6d9)
(cherry picked from commit 1410ee49abf27cbd98245fbd4d2f2103b69c006f)

4 years agoMLK-17842 imx8: introduce partition cmd
Peng Fan [Tue, 20 Mar 2018 03:17:53 +0000 (11:17 +0800)]
MLK-17842 imx8: introduce partition cmd

Add partition API cmd support.
And parse dtb support, see
arch/arm64/boot/dts/freescale/fsl-imx8qm-mek-dom0.dts for example.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit f61119240922ad13fd573f16c02361d7228fbd67)
(cherry picked from commit ef488a85953398838c5242aed66c917547f7f918)
(cherry picked from commit 9689d96fd7406c56bcc7fb9cc551f4c6cb6e4933)
(cherry picked from commit 6c4b850c164899bbe2e57e8d537e5f9108b08295)

4 years agoMLK-17786: imx8qm: add xen boot script
Peng Fan [Tue, 13 Mar 2018 01:46:39 +0000 (09:46 +0800)]
MLK-17786: imx8qm: add xen boot script

Add XEN boot script to ease booting.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 2fd813fcfcb82f28f353fbdc727765d6e848bfd7)
(cherry picked from commit 28caf1e050765a040b1290c210b40563b30cca3c)
(cherry picked from commit 9a50c211a07975cc36646a4188d1774260274429)
(cherry picked from commit 5637d852810c6de23f6acab2d3b4d1857c1ac1a5)

4 years agoMLK-17143 imx8qxp: mek: add xen env
Peng Fan [Sun, 10 Dec 2017 02:01:30 +0000 (10:01 +0800)]
MLK-17143 imx8qxp: mek: add xen env

Add xen env, "run xenboot" to boot xen.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit d5f756f0de780d6e8db2f43f8388083f9454dcac)
(cherry picked from commit 9c9f854b7a5952f66423145ea18c77a9dfb0a99c)
(cherry picked from commit 2b4556ce58f3d6b1ff69ad16f7b22e808173373b)
(cherry picked from commit f9dd1a9154c6e67003b477b5d126cf730809b27f)

4 years agoMLK-21842-1 DTS: imx8mq: Update DTS files for imx8mq and imx8mq EVK
Ye Li [Wed, 25 Mar 2020 03:45:28 +0000 (20:45 -0700)]
MLK-21842-1 DTS: imx8mq: Update DTS files for imx8mq and imx8mq EVK

Update thermal node properties, i2c pinmux, gpmi/apbh-dma nodes and
alias for mmc/usb/qspi.

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

4 years agoMLK-21834-2 imx8qxp_mek: Update board codes and config
Ye Li [Tue, 24 Mar 2020 09:19:03 +0000 (02:19 -0700)]
MLK-21834-2 imx8qxp_mek: Update board codes and config

Add ENET no-DM support, CDNS USB3 host/gadget, M4 bootaux and memtest etc
Update some SPL configs:
1. Remove FIT support and enable TINY printf for saving SPL size.
2. Fix wrong SPL regulator driver enabled, show use fixed regulator not
   gpio.
3. Add flexspi defconfig which uses SPI relevant SPL configs and disable
   MMC, GPIO and regulator SPL drivers.
4. Enable the panic. Since we use PSCI to reset, but ATF is not boot when
   SPL is running.
5. Use full malloc not simple malloc which has dedicated malloc pool
   to support large pool size. The simple malloc size is also used by
   early malloc which occupies the stack space. This causes we can't
   have a large malloc pool

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

4 years agoMLK-21834-1 DTS: Update iMX8QXP MEK board DTS
Ye Li [Tue, 24 Mar 2020 08:02:46 +0000 (01:02 -0700)]
MLK-21834-1 DTS: Update iMX8QXP MEK board DTS

Add i2c alias for i2c mux bus, add mipi lvds i2c nodes, usbotg1, usbotg3,
fec, flexspi, and update iomux.

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

4 years agoMLK-21840-2 imx8qm_mek: Update iMX8QM MEK board
Ye Li [Thu, 19 Mar 2020 08:16:41 +0000 (01:16 -0700)]
MLK-21840-2 imx8qm_mek: Update iMX8QM MEK board

Add board codes and defconfig file for iMX8QM MEK board. Support
peripherals: UART, USB3 host/gadget, Flexspi, SD/eMMC, ENET, i2c.

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

4 years agoMLK-21840-1 DTS: imx8qm_mek: Update DTS files for QM MEK board
Ye Li [Tue, 17 Mar 2020 06:43:05 +0000 (23:43 -0700)]
MLK-21840-1 DTS: imx8qm_mek: Update DTS files for QM MEK board

Update DTS files for iMX8QM MEK board. Porting them from imx_v2019.04
u-boot

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

4 years agoMLK-23574-10 imx8: Enable UART0 LPCG clock for early serial
Ye Li [Wed, 3 Jul 2019 09:30:27 +0000 (02:30 -0700)]
MLK-23574-10 imx8: Enable UART0 LPCG clock for early serial

Enable the UART0 LPCG clock in sc_pm_setup_uart for early print
not depending on the reset default value.

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

4 years agoMLK-21837-2 imx8: clock: Update non-DM clock functions
Ye Li [Wed, 10 Apr 2019 04:06:02 +0000 (21:06 -0700)]
MLK-21837-2 imx8: clock: Update non-DM clock functions

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

4 years agoMLK-17821-2 imx8: clock: Add cdns3 and usbotg clock enable and disable
Ye Li [Thu, 21 Mar 2019 08:21:29 +0000 (01:21 -0700)]
MLK-17821-2 imx8: clock: Add cdns3 and usbotg clock enable and disable

Implemented the clock enable and disable interfaces for CDNS3 USB
driver and EHCI-MX6 USB otg driver.

Signed-off-by: Ye Li <ye.li@nxp.com>
Acked-by: Peter Chen <peter.chen@nxp.com>
(cherry picked from commit 2f0dc4c503d8ac831fb809ec124e79712defae77)
(cherry picked from commit c7a808574b37557199bd2b17c963ec207854b801)
(cherry picked from commit a369a235e5595b2a59754bd13f47cd699017fec3)

4 years agoMLK-21830-2 DTS: imx8qm: Add DTS and binding header files
Ye Li [Tue, 19 Mar 2019 07:40:31 +0000 (00:40 -0700)]
MLK-21830-2 DTS: imx8qm: Add DTS and binding header files

Copy the imx8qm DTS files from imx_4.14.y kernel (rel_imx_4.14.98_2.0.0_ga_rc1)

Add extra support used in u-boot:
1. Add mbox-cells used for mailbox
2. Add alias for FSPI nodes
3. Add the usb alias for OTG and USB3.
4. Add "u-boot,dm-pre-reloc" to thermal node to DTSi
5. Add "simple-bus" compatible strings to imx8qm-pm node.

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

4 years agoMLK-21830-1 imx8qm: Update soc codes for iMX8QM
Ye Li [Tue, 19 Mar 2019 03:54:06 +0000 (20:54 -0700)]
MLK-21830-1 imx8qm: Update soc codes for iMX8QM

Add CPU type, Kconfig for iMX8QM and update SoC codes.

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

4 years agoMLK-21829 dts: imx8qxp: Update DTSi files and binding header files
Ye Li [Tue, 19 Mar 2019 08:05:52 +0000 (01:05 -0700)]
MLK-21829 dts: imx8qxp: Update DTSi files and binding header files

Update the imx8qxp/dx/dxp DTSi files from imx_v2019.04 u-boot

Add extra support used in u-boot:
1. Add alias for FSPI nodes
2. Add GPIO alias which is used as seq number in u-boot DM GPIO driver.
3. Add i2c alias for i2c0 to i2c3.
4. Add i2c alias for mipi0/mipi1 i2c0.
5. Add "u-boot,dm-pre-reloc" to thermal node in QXP DTSi
6. Add USB alias for OTG and USB3 ports, add USB3 reg-name
7. Add APBH-DMA clock to GPMI node

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

4 years agoMLK-16441 imx8qm/qxp: print commit hash for SCFW, SECO, IMX-MKIMAGE and ATF
Ye Li [Thu, 12 Mar 2020 02:40:19 +0000 (19:40 -0700)]
MLK-16441 imx8qm/qxp: print commit hash for SCFW, SECO, IMX-MKIMAGE and ATF

Since we have many software running on QM/QXP, it is better to print their
commit ids in u-boot to know their versions.

This patch gets the commit ids for SCFW and ATF via their APIs and get the
commit for imx-mkimage at the end of u-boot.bin loading address.

Once the commit ids are acquired, show them in console like:
BuildInfo:
    - SCFW e2e62ca4, SECO-FW c121d4a4, IMX-MKIMAGE fe2ff1e9, ATF 8673a8e
    - U-Boot 2018.03-imx_v2018.03+g557a2e5

and set them to environment variables like:
    commit_atf=8673a8e
    commit_mkimage=fe2ff1e9
    commit_scfw=e2e62ca4
    commit_secofw=c121d4a4

If old software are running which does not support provide commit it, the patch
use 0 instead.

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

4 years agoMLK-14938-9 imx8: bootaux: Add i.MX8 M4 boot support
Ye Li [Mon, 16 Apr 2018 06:45:40 +0000 (23:45 -0700)]
MLK-14938-9 imx8: bootaux: Add i.MX8 M4 boot support

1. Implement bootaux for the M4 boot on i.MX8QM and QXP. Users need to download
   M4 image to any DDR address first. Then use the
   "bootaux <M4 download DDR address> [M4 core id]" to boot CM4_0
   or CM4_1, the default core id is 0 for CM4_0.

   Since current M4 only supports running in TCM. The bootaux will copy
   the M4 image from DDR to its TCML.

2. Implment bootaux for HIFI on QXP
   command: bootaux 0x81000000 1

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 778606204b84ce6646fe58d752e2abda67600cf2)
(cherry picked from commit e4a3fcc6fd357502d61687659b9cd7d2808b3fd4)
(cherry picked from commit 13eafa71a6cad662af16e7997ec75b785753bb66)

4 years agoMLK-22279-4 imx8mn_evk: Enable multiple env storages
Ye Li [Tue, 16 Jul 2019 09:11:04 +0000 (02:11 -0700)]
MLK-22279-4 imx8mn_evk: Enable multiple env storages

Enable multiple environment storage devices on iMX8MN DDR4 EVK board.
Remove duplicated CONFIG_ENV_OFFSET since we use env_get_offset to
override it.

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

4 years agoMLK-22279-1 env: Add env_get_offset to override static env offset
Ye Li [Tue, 16 Jul 2019 08:39:40 +0000 (01:39 -0700)]
MLK-22279-1 env: Add env_get_offset to override static env offset

Add env_get_offset interface to override static CONFIG_ENV_OFFSET,
and update env location driver to use env_get_offset. So for different
storage medium, we are able to store the env at different offset.

We don't support this feature when CONFIG_ENV_IS_EMBEDDED is set.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 5b12d7cabb14bab9a95af7460b36c6c85db1b328)
(cherry picked from commit 565d9002ac59b03d5bc77c6d88f2b93492166b66)
(cherry picked from commit 445f20fe7162a15fd7415913434f24b6224bbe57)

4 years agoMLK-22339: mx6qsabreauto: configs: add default mtdids and mtdparts
Yang-yang Guo [Sat, 3 Aug 2019 09:57:12 +0000 (17:57 +0800)]
MLK-22339: mx6qsabreauto: configs: add default mtdids and mtdparts
configs

set the i.MX6q default mtdids value as
"nor0=8000000.nor,nand0=gpmi-nand", nandbcb can directly write to the
nandboot partition after u-boot brings up.

=> nandbcb update $loadaddr nandboot 924672
Device nor0 not found!
current device is invalid, skip it and check the next one
device 0 offset 0x0, size 0x924672
Erasing at 0x3f00000 -- 100% complete.
NAND fw write: 0x200000 offset, 0x928000 bytes written: OK

Signed-off-by: Yang-yang Guo <alice.guo@nxp.com>
(cherry picked from commit 22c74fdc455d35346756c9fb82292db57db2c96f)
(cherry picked from commit cddec24d6c9f45ccbfd5cd59cf8bd02f05f164a3)

4 years agoMLK-22259-4: mx6dlsabreauto: configs: add default mtdids and mtdparts configs
Han Xu [Fri, 12 Jul 2019 21:19:56 +0000 (16:19 -0500)]
MLK-22259-4: mx6dlsabreauto: configs: add default mtdids and mtdparts configs

set the i.MX6DL default mtdids value as
"nor0=8000000.nor,nand0=gpmi-nand", nandbcb can directly write to the
nandboot partition after u-boot brings up.

=> nandbcb update $loadaddr nandboot 912384
Device nor0 not found!
current device is invalid, skip it and check the next one
device 0 offset 0x0, size 0x912384
Erasing at 0x3f00000 -- 100% complete.
NAND fw write: 0x200000 offset, 0x916000 bytes written: OK

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

4 years agoMLK-22259-2: cmd: mtdparts: skip invalid devices rather than quit
Han Xu [Fri, 12 Jul 2019 20:52:58 +0000 (15:52 -0500)]
MLK-22259-2: cmd: mtdparts: skip invalid devices rather than quit

mtdparts quit when invalid mtd devices found. Add thes patches to skip
the invalid devices, so NAND partitions can be alway found to burn boot
images.

For instance,

On i.MX6DL Sabreauto, nand config u-boot didn't enable the weim nor, so
parsing 8000000.nor leads to error:

Device nor0 not found!

With the patches, we can skip this invalid device and still get nand
boot partition table:

Device nor0 not found!
current device is invalid, skip it and check the next one

device nand0 <gpmi-nand>, # parts = 5
0: nandboot 0x04000000 0x00000000 0
1: nandkernel 0x01000000 0x04000000 0
2: nanddtb 0x01000000 0x05000000 0
3: nandtee 0x01000000 0x06000000 0
4: nandrootfs 0xf9000000 0x07000000 0

active partition: nand0,0 - (nandboot) 0x04000000 @ 0x00000000

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

4 years agoMLK-22259-1: cmd: Kconfig: add new option CONFIG_MTDPARTS_SKIP_INVALID
Han Xu [Fri, 12 Jul 2019 20:52:46 +0000 (15:52 -0500)]
MLK-22259-1: cmd: Kconfig: add new option CONFIG_MTDPARTS_SKIP_INVALID

add a new option in mtdparts to skip the invalid devices rather than
just quit

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

4 years agoFix P0/EVT boards boot without serial cable connection.
Leonid Lobachev [Mon, 16 Jul 2018 19:30:01 +0000 (12:30 -0700)]
Fix P0/EVT boards boot without serial cable connection.

Change-Id: I5969217e400ab494f9a74662d1d228fcf2e2d465
(cherry picked from commit 92c762e1b80b3b12852e3f766cdb16a6be3cbbf8)
(cherry picked from commit c5469efd6cda82cacdbb5549da3f8be1f1195032)

4 years agoMLK-21297 imx8: Add DEK blob encapsulation
Clement Faure [Tue, 28 May 2019 15:01:07 +0000 (17:01 +0200)]
MLK-21297 imx8: Add DEK blob encapsulation

Add DEK encapsulation support for imx8. The DEK blob is generated by the
SECO through the SCFW API.

Signed-off-by: Clement Faure <clement.faure@nxp.com>
(cherry picked from commit b785e44ce2d042c51386dadb6ec6693344a16fc6)
(cherry picked from commit 14f7558113319025508e38fbd36ad057c56e3237)

4 years agoMLK-20373-2 dm: serial: introduce puts hook
Peng Fan [Thu, 15 Nov 2018 05:13:14 +0000 (13:13 +0800)]
MLK-20373-2 dm: serial: introduce puts hook

Introduce puts hook for dm serial driver.

Change-Id: I75423998c7d8db20949bae6ac46a094dc62c9612
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Flynn xu <flynn.xu@nxp.com>
(cherry picked from commit bb986d4ff2124285ec0d99a51a2702a53f485813)
(cherry picked from commit c2cf89d2035598ca2601bb405cece474ed337817)

4 years agoTEE-346 Add DEK blob encapsulation for imx8m
Clement Faure [Thu, 23 May 2019 14:00:11 +0000 (16:00 +0200)]
TEE-346 Add DEK blob encapsulation for imx8m

Add DEK blob encapsulation support for IMX8M through "dek_blob" command.
On ARMv8, u-boot runs in non-secure, thus cannot encapsulate a DEK blob
for encrypted boot.
The DEK blob is encapsulated by OP-TEE through a trusted application call.
U-boot sends and receives the DEK and the DEK blob binaries through OP-TEE
dynamic shared memory.

To enable the DEK blob encapsulation, add to the defconfig:
CONFIG_SECURE_BOOT=y
CONFIG_FAT_WRITE=y
CONFIG_CMD_DEKBLOB=y

Signed-off-by: Clement Faure <clement.faure@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 7ffd25bddc89db30612f4e805d103c7d8dde5d95)
(cherry picked from commit e8b33b19b34e0653aff0950becb533ae845a5feb)

4 years agoMLK-22078 romapi: Fix issue for stream mode with secure boot enabled
Ye Li [Fri, 21 Jun 2019 03:09:07 +0000 (20:09 -0700)]
MLK-22078 romapi: Fix issue for stream mode with secure boot enabled

When download image through ROM API for stream mode (USB, eMMC fastboot).
We uses tricky way to get the total image size:
The spl_load_simple_fit is called but the data reading is invalid, so the image
data is not really downloaded.
We should not call HAB authenticate in this tricky way. Otherwise it
will alway fail.
This patch add a new flag SPL_FIT_BYPASS_POST_LOAD to skip the authentication
only for this tricky using.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 47b0cf6de06ff9b3e2b2755d5c8203210378b26a)
(cherry picked from commit 3e50573a7007771586e737b343bdde4d98c21c23)
(cherry picked from commit 50ea462702262c65afbd1985d831edf16e47e212)

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

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

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

4 years agoMLK-22047 imx8mn: pins: add SION for I2C
Peng Fan [Wed, 19 Jun 2019 09:34:52 +0000 (17:34 +0800)]
MLK-22047 imx8mn: pins: add SION for I2C

SION bit needs to be set when the pin are used for I2C.

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

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

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

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

4 years agoMLK-22092 Enable GPT command
Frank Li [Fri, 21 Jun 2019 15:09:26 +0000 (10:09 -0500)]
MLK-22092 Enable GPT command

Enable GPT command to allow create gpt partitoin in uboot

Signed-off-by: Frank Li <Frank.Li@nxp.com>
(cherry picked from commit 85a14ccf76ace1ada4732b9d225af8313031f5e0)
(cherry picked from commit a1998761639d74576274b6ed5a02eeab7feaad90)

4 years agoMLK-22103 doc: ahab: Update imx-mkimage SPL build target
Ye Li [Tue, 25 Jun 2019 02:11:57 +0000 (19:11 -0700)]
MLK-22103 doc: ahab: Update imx-mkimage SPL build target

Since we have changed imx-mkimage flash_spl_container target
to flash_spl, also update it in u-boot ahab document.

Signed-off-by: Ye Li <ye.li@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit f850d467db9cf3b9b58688b96f1b4d9d8632b07d)
(cherry picked from commit 6b86e3f2f9dd7a29ee817119340ef61efb010cf6)
(cherry picked from commit 48cbb77f540b49ec89256f49c9c68657af036b60)

4 years agoMLK-21956-3 mx6qdlsabreauto: Enable i2c gpio mux to fix io expander issue
Ye Li [Thu, 6 Jun 2019 08:44:42 +0000 (01:44 -0700)]
MLK-21956-3 mx6qdlsabreauto: Enable i2c gpio mux to fix io expander issue

The i2c gpio mux is not enabled, this causes i2c3 not work and all
io expander devices on i2c3 not work.  So we will meet such as
"usb start" fail due to the VBUS is not power up.

The patch add the i2c mux and i2c gpio mux configs. And remove codes of
controlling i2c steering from board, since i2c gpio mux does same thing.

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