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

4 years agoMLK-22035-1 lmb: Add lmb_reserve_overlap for fdt reserved memory
Ye Li [Tue, 18 Jun 2019 08:24:10 +0000 (01:24 -0700)]
MLK-22035-1 lmb: Add lmb_reserve_overlap for fdt reserved memory

Previous patch "MLK-21885 lmb: Handle the overlap case for lmb reserve" adds
the overlap support to lmb reserve. However, u-boot has some places to use the
lmb_reserve when allocating memory in loading images.  If we allowed overlap
in this function, it means images loading address can overlap each other and
cause the address check mechanism not work.

So add another function to allow overlap and only use it for fdt reserved-memory
nodes. The FDT reserved-memory is ok to merge with other reserved memory, since
this won't break image loading address check.

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

4 years agoMLK-21885 lmb: Handle the overlap case for lmb reserve
Ye Li [Wed, 5 Jun 2019 06:33:38 +0000 (23:33 -0700)]
MLK-21885 lmb: Handle the overlap case for lmb reserve

lmb reserve is used to reserve some memory so that when loading images
(like kernel, dtb, initrd), images won't be loaded into the reserved memory.

The problem in current lmb is it does not handle the overlap case. When adding
a new reserved memory, if the memory region is overlap with regions already been
added in lmb, it will fail. One example is reserved memory in DTB may overlap with
u-boot relocate address. lmb reserves the u-boot relocate address firstly, so when
adding reserved memory from DTB, we will meet failure.

Actually if we handle the overlap case, we can resolve the overlap by using a max
common region for the overlap regions. So that this case won't fail.

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

4 years agoMLK-21905 mx7ulp_evk: Change kernel DTB to EVKB board
Ye Li [Wed, 5 Jun 2019 02:14:42 +0000 (19:14 -0700)]
MLK-21905 mx7ulp_evk: Change kernel DTB to EVKB board

The latest mx7ulp evk board is renamed to EVKB board and has dedicated
DTB files. Modify the kernel DTB names in u-boot to use the new DTB.

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

4 years agoMLK-20935-4 doc: imx: ahab: Fix typo in mx8_mx8x_secure_boot.txt guide
Breno Lima [Fri, 15 Feb 2019 18:51:36 +0000 (16:51 -0200)]
MLK-20935-4 doc: imx: ahab: Fix typo in mx8_mx8x_secure_boot.txt guide

Fix a typo in path provided for imx-mkimage iMX8QM and iMX8QXP directories.

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

4 years agoMLK-20935-3 doc: imx: ahab: Add a note in SRK Hash fuses sanity check
Breno Lima [Fri, 15 Feb 2019 18:43:54 +0000 (16:43 -0200)]
MLK-20935-3 doc: imx: ahab: Add a note in SRK Hash fuses sanity check

The commands included in introduction guide should not be used as
reference for programming the SRK Hash fuses as they are in big
endian.

Add a note to avoid a possible mistake.

Reported-by: Clement Le Marquis <clement.lemarquis@nxp.com>
Signed-off-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 137319826cc32d98a9b6890f35dd6670e104c2a5)
(cherry picked from commit 03d49480f73ce62de4f759fe02dfcf82726b8b79)
(cherry picked from commit 892bafd2a9cd843662c194e7c44a06c44df9fb38)

4 years agoMLK-20935-2 doc: imx: ahab: Include ahab_close command
Breno Lima [Fri, 15 Feb 2019 18:37:56 +0000 (16:37 -0200)]
MLK-20935-2 doc: imx: ahab: Include ahab_close command

Since commit 771b824728ca ("MLK-20919 imx8: ahab: Add command to
close the chip") the U-Boot is able to move the lifecycle from
NXP closed to OEM closed.

Update AHAB guides to use U-Boot ahab_close command instead of SCFW CLI.

As the procedure is now independent of SCFW terminal we can remove
this condition from documentation.

Signed-off-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 6f93d877e1454024f666a4810d24148cf595429e)
(cherry picked from commit 4f6bc59ff94de150611d82b45365d24d356f30ef)
(cherry picked from commit c03b9b2f33b19fe5f47673592a362a4ff78cebba)

4 years agoMLK-20935-1 doc: imx: habv4: Add section to avoid crash when OP-TEE is enabled
Breno Lima [Fri, 15 Feb 2019 18:09:08 +0000 (16:09 -0200)]
MLK-20935-1 doc: imx: habv4: Add section to avoid crash when OP-TEE is enabled

Starting in L4.14.78 release, the OP-TEE CAAM driver does not set the
JROWN_NS field in case LMID is locked.

We need to include the Unlock MID command in CSF file otherwise device
will fail to boot in HAB closed mode.

Add section to avoid crash when OP-TEE is enabled.

Reported-by: Frank Zhang <frank.zhang@nxp.com>
Signed-off-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit af03284ad38bd03ef1f0d4942842629db93d2c11)
(cherry picked from commit 66f05532d587e50631eef066c4190936e0d33583)
(cherry picked from commit c2ffee032e21bbd9fa9e43cc60b60dd039a61133)

4 years agoMLK-20916-2: doc: imx: ahab: Update AHAB document to include ahab_status command
Breno Lima [Tue, 12 Feb 2019 16:51:12 +0000 (14:51 -0200)]
MLK-20916-2: doc: imx: ahab: Update AHAB document to include ahab_status command

Since commit cf2acc5b7cde ("MLK-18942-2 imx8: ahab: Add ahab_status
 command") the U-Boot is able to display and parse the SECO events.

Update AHAB guides to use U-Boot ahab_status command instead of
SCFW CLI.

Starting in SECO FW v0.2.0 engineering release an invalid image
integrity is logged as an event in open mode. As ahab_status
is able to return this event the note can be removed.

Signed-off-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 385ed19051a47f5858e8d326e5ee97f8a08a679d)
(cherry picked from commit 4a88ca0aecec31d0877d7a620fa796a83387a195)
(cherry picked from commit d28e60d27186fef3dd9da2de7780e3ac62855ee1)

4 years agoMLK-20916-1: doc: imx: habv4: Fix typo in iMX6 and iMX7 encrypted boot guide
Breno Lima [Tue, 12 Feb 2019 16:30:17 +0000 (14:30 -0200)]
MLK-20916-1: doc: imx: habv4: Fix typo in iMX6 and iMX7 encrypted boot guide

The set_priblob_bitfield command is enabled by selecting
CONFIG_CMD_PRIBLOB.

Fix typo in mx6_mx7_encrypted_boot.txt guide.

Signed-off-by: Breno Lima <breno.lima@nxp.com>
(cherry picked from commit 99f9696ef5f7d1c0f93b7d910e884890fca6c973)
(cherry picked from commit e3fbcaa744db8d4f0556c67c788ada939404a892)
(cherry picked from commit 636e69cbd2694c3c26f866799c60c0908a50069b)

4 years agoMLK-20758 mx7: Add new command for tamper pin
Ye Li [Mon, 14 Jan 2019 06:05:22 +0000 (22:05 -0800)]
MLK-20758 mx7: Add new command for tamper pin

Add new u-boot command "imx_tamper" to configure and check the tamper pins.
The codes are used for reference and test. So command is disabled at default,
user can enable it by adding CONFIG_IMX_TAMPER=y to defconfig

The iMX7D has 10 tamper pins those can be used for SNVS tamper detection.

Tamper 9 pin is NVCC_DRAM power switch for LPSR by default.
It must be fused to tamper function by command
=> fuse prog -y 1 3 0x80000000
Otherwise, SNVS power consumption would be high

When tamper is detected, CPU can't enter/stay in SNVS mode,
the tamper must be cleared and disabled before enter SNVS.

Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Shaojun Wang <shaojun.wang@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit d520e1c6067c08103a020b0bc19feb620473e543)
(cherry picked from commit 4333529337a554352e1f9fb7486287dea31aeb79)
(cherry picked from commit c8ca53e9891371c292d4e88a92dd52498ba1c1a2)

4 years agoMLK-20668-2 fat: Fix issue in rootdir table flush for FAT16/12
Ye Li [Wed, 2 Jan 2019 09:41:23 +0000 (01:41 -0800)]
MLK-20668-2 fat: Fix issue in rootdir table flush for FAT16/12

The FAT16/12 has rootdir area before data area, and the clusters for
rootdir are not mantained by FAT table. So we don't need to find empty
cluster for next rootdir space, just use next dir cluster. And the FAT
table don't need to update for this new dir cluster.

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

4 years agoMLK-20594-2 enable fat write for all configuration with uuu
Ye Li [Fri, 24 May 2019 04:48:36 +0000 (21:48 -0700)]
MLK-20594-2 enable fat write for all configuration with uuu

Enable the FAT write when UUU support is enabled

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

4 years agoMLK-20553-3 doc: imx: ahab: Add Secure Boot documentation for i.MX8 and i.MX8x SPL...
Breno Lima [Fri, 30 Nov 2018 20:48:06 +0000 (18:48 -0200)]
MLK-20553-3 doc: imx: ahab: Add Secure Boot documentation for i.MX8 and i.MX8x SPL targets

The current U-Boot implementation includes SPL targets for i.MX8QM and
i.MXQXP MEK boards:

- imx8qxp_mek_spl_defconfig
- imx8qxp_mek_spl_fspi_defconfig
- imx8qm_mek_spl_defconfig
- imx8qm_mek_spl_fspi_defconfig

The U-Boot proper and ATF are included in an additional container being
necessary a different procedure for signing the flash.bin image.

Add a step-by-step guide covering the signing procedure.
Add a CSF example for the 3rd container.

Signed-off-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Frank Zhang <frank.zhang@nxp.com>
Reviewed-by: Marius Grigoras <marius.grigoras@nxp.com>
Reviewed-by: Utkarsh Gupta <utkarsh.gupta@nxp.com>
(cherry picked from commit 04505024d38eebbb5f39133b502c8e450ca40215)
(cherry picked from commit b139f10ccec5c57164f7e07e33984c845ce58b60)
(cherry picked from commit 82c70d0fc7cf8dcd0eafb48722ea978fffb414d8)

4 years agoMLK-20553-2 doc: imx: ahab: Add AHAB secure boot documentation for i.MX 8 and 8X...
Clement Le Marquis [Wed, 28 Nov 2018 12:10:22 +0000 (13:10 +0100)]
MLK-20553-2 doc: imx: ahab: Add AHAB secure boot documentation for i.MX 8 and 8X families

Add AHAB secure boot step-by-step guide for i.MX8 and i.MX8x families
devices.

Add 3 CSF example files:
- Example to sign flash.bin only using SRK keys.
- Example to sign flash.bin using a subordinate SGK key.
- Example to sign Linux image only using SRK keys.

Signed-off-by: Clement Le Marquis <clement.lemarquis@nxp.com>
Reviewed-by: Frank Zhang <frank.zhang@nxp.com>
Reviewed-by: Marius Grigoras <marius.grigoras@nxp.com>
Reviewed-by: Utkarsh Gupta <utkarsh.gupta@nxp.com>
(cherry picked from commit 7c46caba3b528b0399242f99612e5b094b1a4703)
(cherry picked from commit 20016c156f4f4e618de9eff6f5b1fc6a1c871e2a)
(cherry picked from commit 3c0fc7380132900628fe975643e7106032c861a6)

4 years agoMLK-20553-1 doc: imx: ahab: Add AHAB introduction
Breno Lima [Mon, 26 Nov 2018 16:32:43 +0000 (14:32 -0200)]
MLK-20553-1 doc: imx: ahab: Add AHAB introduction

The AHAB is currently supported in i.MX8QXP and i.MX8QM devices.

Add an introductory document containing the following topics:

- AHAB Secure Boot Architecture
- System Control Unit (SCU) introduction
- Security Controller (SECO) introduction
- i.MX8/8x secure boot flow
- AHAB PKI tree generation
- SRK Table and SRK Hash generation

Signed-off-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Frank Zhang <frank.zhang@nxp.com>
Reviewed-by: Marius Grigoras <marius.grigoras@nxp.com>
Reviewed-by: Utkarsh Gupta <utkarsh.gupta@nxp.com>
(cherry picked from commit 6e9ceb2526bd4a45c6ff669afb086cc3a0627e6b)
(cherry picked from commit d3534f1d0e9a0f777160a4a6732a30a2bb545733)
(cherry picked from commit 3cf95909fec8e0f6a367633fc0d52223fd456eae)

4 years agoMLK-20270-1 doc: imx: habv4: Add Secure Boot documentation for i.MX8M and i.MX8MM...
Breno Lima [Wed, 17 Oct 2018 21:45:22 +0000 (18:45 -0300)]
MLK-20270-1 doc: imx: habv4: Add Secure Boot documentation for i.MX8M and i.MX8MM devices

Add HABv4 documentation for i.MX8M and i.MX8MM targets covering the
following topics:

- How to sign an securely boot an flash.bin image.
- How to extend the root of trust for additional boot images.
- Add 2 CSF examples.

Reviewed-by: Utkarsh Gupta <utkarsh.gupta@nxp.com>
Signed-off-by: Breno Lima <breno.lima@nxp.com>
(cherry picked from commit cc63be298a3e5f44e417f4098c124715917d09e1)
(cherry picked from commit ca9c6f091095d3bf09cac42c3eb4493490ac8912)
(cherry picked from commit 03865f7279b6f66625ecad83bf8364989e5da4c1)

4 years agoMLK-20061-1: doc: imx: habv4: Add Encrypted Boot documentation for i.MX 6 and i.MX...
Clement Le Marquis [Fri, 12 Oct 2018 16:44:45 +0000 (18:44 +0200)]
MLK-20061-1: doc: imx: habv4: Add Encrypted Boot documentation for i.MX 6 and i.MX 7 family devices

Add useful documentation for encrypted boot:
- Add 2 CSF examples for encrypt and sign
- How to encrypt and sign a U-Boot binary on closed device
- Why and how increase the PRIBLOB bitfield from CAAM SCFGR

Signed-off-by: Clement Le Marquis <clement.lemarquis@nxp.com>
(cherry picked from commit 3732dddfeddd989ca1fb930972f19303e3b67756)
(cherry picked from commit 9e7ccdd51a0754e728f2e27d282aaa3dbc8eec38)
(cherry picked from commit 570267bf173304655674bfa6f1640f310900f8f7)

4 years agoMLK-19194 PCI: imx: disable the ltssm when link is down in uboot
Richard Zhu [Fri, 10 Aug 2018 08:51:20 +0000 (16:51 +0800)]
MLK-19194 PCI: imx: disable the ltssm when link is down in uboot

Disable the LTSSM when link is down in uboot.
Otherwise, the pcie ep/rc validation system in kernel
would be impacted by the enabled ltssm stat in the uboot.

Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit cdedbb42e052d4bb3ff6b45044dd0d6023f3cb20)
(cherry picked from commit dcad2189b3d4f405a4675c1cc4f9ce38b524a947)
(cherry picked from commit 01007b8695df5c9f25d37a2f8d87037de5f14d3b)

4 years agoMLK-14831 mx6: Fix wrong bmode value used for usb boot
Ye Li [Mon, 8 May 2017 06:25:19 +0000 (01:25 -0500)]
MLK-14831 mx6: Fix wrong bmode value used for usb boot

Wrong bmode value is used in community u-boot for usb reboot. And cause
it failed. Fix this by using a reserved bootcfg value.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit eacd50f370203218a8e96c28c8a7adc0b638fc6d)
(cherry picked from commit aed4820fa81c1da9206f946a61ff851a255c9288)
(cherry picked from commit 1a944ae01addda559d1bf9869288424c00043406)
(cherry picked from commit 50b976a3b69f0de32e323ab95b28454c563916b9)

4 years agoMLK-19699: imx6ulz: configs: add fastboot to defconfigs
Ye Li [Thu, 23 May 2019 15:06:01 +0000 (08:06 -0700)]
MLK-19699: imx6ulz: configs: add fastboot to defconfigs

Add fastboot to iMX6ULZ EVK defconfig files to support UUU

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

4 years agoMLK-19150 fastboot: enable fastboot in mx7dsabresd
Ye Li [Thu, 23 May 2019 14:46:10 +0000 (07:46 -0700)]
MLK-19150 fastboot: enable fastboot in mx7dsabresd

Modify defconfig files to enable fastboot in mx7dsabresd board

Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit b7a2347cc382c8d0c80762c12664a7287a2f3d65)
(cherry picked from commit 614dc04b62283a90735f967b97eb46c92ac4f1f7)

4 years agoMLK-19062-1 fastboot: enable fastboot in mx6ul
Ye Li [Thu, 23 May 2019 14:39:49 +0000 (07:39 -0700)]
MLK-19062-1 fastboot: enable fastboot in mx6ul

Modify mx6ul defconfig files to enable fastboot in
mx6ul_14x14 and mx6ul_9x9 EVK boards

Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit a9a7715eb2471cdf01c160ac269f822abbd80cdc)
(cherry picked from commit 8192d0446e91933e30bbf87a7b7c9e4679e3450c)

4 years agoMLK-19062-2 fastboot: enable fastboot in mx6ull
Ye Li [Thu, 23 May 2019 14:33:02 +0000 (07:33 -0700)]
MLK-19062-2 fastboot: enable fastboot in mx6ull

Modify deconfig files to enable fastboot in
mx6ull_14x14 and mx6ull_9x9 EVK boards

Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 41d3fd64b8791847d58a89cbb05b7135c012f323)
(cherry picked from commit 8c55ae15006eebf48a50653cb63e6a8e9ed3d5a8)

4 years agoMLK-19104 imx7ulp: Enable uuu support for mx7ulp.
Shenwei Wang [Wed, 1 Aug 2018 14:13:12 +0000 (09:13 -0500)]
MLK-19104 imx7ulp: Enable uuu support for mx7ulp.

iMX7ULP EVK boards enable fastboot as default to support uuu.

Signed-off-by: Shenwei Wang <shenwei.wang@nxp.com>
Acked-by : Frank Li <frank.li@nxp.com>

(cherry picked from commit 035506e86e4f054ec6e75a52e5d7fdbb0f18f8cd)
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 610f6b43c47ac963744442ec9801abf3ec0af784)
(cherry picked from commit 1c02ef7ba55ec35cd18645595af322f67eaac793)