u-boot.git
3 years agoimx8mm-somdevices: arm: dts: Add imx8mm-somdevices.dtb to Makefile.
Josep Orga [Wed, 1 Sep 2021 17:31:35 +0000 (19:31 +0200)]
imx8mm-somdevices: arm: dts: Add imx8mm-somdevices.dtb to Makefile.

Signed-off-by: Josep Orga <jorga@somdevices.com>
3 years agoimx8mm-somdevices: Changed evk/freescale references to somdevices.
Josep Orga [Wed, 1 Sep 2021 17:30:16 +0000 (19:30 +0200)]
imx8mm-somdevices: Changed evk/freescale references to somdevices.

Signed-off-by: Josep Orga <jorga@somdevices.com>
3 years agoimx8mm-somdevices: Renamed imx8mm_evk.c -> imx8mm_somdevices.c.
Josep Orga [Wed, 1 Sep 2021 17:25:07 +0000 (19:25 +0200)]
imx8mm-somdevices: Renamed imx8mm_evk.c -> imx8mm_somdevices.c.

Signed-off-by: Josep Orga <jorga@somdevices.com>
3 years agoimx8mm-somdevices: configs: Add imx8mm_somdevices.h file copying imx8mm_evk.h file.
Josep Orga [Wed, 1 Sep 2021 17:23:04 +0000 (19:23 +0200)]
imx8mm-somdevices: configs: Add imx8mm_somdevices.h file copying imx8mm_evk.h file.

Signed-off-by: Josep Orga <jorga@somdevices.com>
3 years agoimx8mm-somdevices: arm: dts: Add imx8mm-somdevices.dts copying imx8mm-evk.dtsi file.
Josep Orga [Wed, 1 Sep 2021 17:21:59 +0000 (19:21 +0200)]
imx8mm-somdevices: arm: dts: Add imx8mm-somdevices.dts copying imx8mm-evk.dtsi file.

Signed-off-by: Josep Orga <jorga@somdevices.com>
3 years agoimx8mm-somdevices: configs: Add imx8mm_somdevices_defconfig copying imx8mm_evk_defcon...
Josep Orga [Wed, 1 Sep 2021 17:20:27 +0000 (19:20 +0200)]
imx8mm-somdevices: configs: Add imx8mm_somdevices_defconfig copying imx8mm_evk_defconfig file.

Signed-off-by: Josep Orga <jorga@somdevices.com>
3 years agoimx8mm-somdevices: Add somdevices board files based on freescale/imx8mm_evk files.
Josep Orga [Wed, 1 Sep 2021 13:01:35 +0000 (15:01 +0200)]
imx8mm-somdevices: Add somdevices board files based on freescale/imx8mm_evk files.

Signed-off-by: Josep Orga <jorga@somdevices.com>
3 years agoMerge remote-tracking branch 'origin/imx_v2021.04' into lf_v2021.04
BJ DevOps Team [Tue, 8 Jun 2021 01:39:44 +0000 (03:39 +0200)]
Merge remote-tracking branch 'origin/imx_v2021.04' into lf_v2021.04

* origin/imx_v2021.04:
  LFU-164 arm: dts: imx8qm: Remove alias of pcieb node

3 years agoLFU-164 arm: dts: imx8qm: Remove alias of pcieb node
Ye Li [Mon, 7 Jun 2021 14:26:27 +0000 (07:26 -0700)]
LFU-164 arm: dts: imx8qm: Remove alias of pcieb node

When pcieb alias is added, 2021.04 PCI uclass driver will occupy
its seq as a bus address even the controller is disabled.

This causes the device enumerated on pciea bridge assigned with a
bus address 2 which is conflict with address translate scheme
in the driver.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
3 years agoMerge remote-tracking branch 'origin/imx_v2021.04' into lf_v2021.04
BJ DevOps Team [Mon, 7 Jun 2021 14:22:37 +0000 (16:22 +0200)]
Merge remote-tracking branch 'origin/imx_v2021.04' into lf_v2021.04

* origin/imx_v2021.04:
  LF-3946 crypto: caam: Fix kick_trng for i.MX

3 years agoLF-3946 crypto: caam: Fix kick_trng for i.MX
Ye Li [Mon, 7 Jun 2021 13:31:07 +0000 (06:31 -0700)]
LF-3946 crypto: caam: Fix kick_trng for i.MX

Porting the RNG init relevant configurations for i.MX from fsl_caam.c
to jr.c to fix hwrng performance issue in kernel.

Signed-off-by: Ye Li <ye.li@nxp.com>
Acked-by: Gaurav Jain <gaurav.jain@nxp.com>
3 years agoMerge remote-tracking branch 'origin/ls_v2021.04' into lf_v2021.04
BJ DevOps Team [Mon, 7 Jun 2021 12:12:05 +0000 (14:12 +0200)]
Merge remote-tracking branch 'origin/ls_v2021.04' into lf_v2021.04

* origin/ls_v2021.04:
  net: fm: Fix a memory leak issue
  net: e1000: Fix Unchecked return value coverity

3 years agonet: fm: Fix a memory leak issue
Hou Zhiqiang [Wed, 2 Jun 2021 05:28:52 +0000 (13:28 +0800)]
net: fm: Fix a memory leak issue

Fix a memory leak issue in the RX port initialization.

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
3 years agonet: e1000: Fix Unchecked return value coverity
Hou Zhiqiang [Mon, 31 May 2021 08:25:41 +0000 (16:25 +0800)]
net: e1000: Fix Unchecked return value coverity

Added check for return value of e1000_read_phy_reg().

Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
3 years agoMerge remote-tracking branch 'origin/imx_v2021.04' into lf_v2021.04
BJ DevOps Team [Mon, 7 Jun 2021 05:58:50 +0000 (07:58 +0200)]
Merge remote-tracking branch 'origin/imx_v2021.04' into lf_v2021.04

* origin/imx_v2021.04:
  LFU-145 imx8qm_val: Fix uninitialized gpio variable
  LF-3943 arm: dts: imx8mm-evk: Change board's model name

3 years agoLFU-145 imx8qm_val: Fix uninitialized gpio variable
Ye Li [Mon, 7 Jun 2021 04:42:06 +0000 (21:42 -0700)]
LFU-145 imx8qm_val: Fix uninitialized gpio variable

Fix coverity Issue: 13562326 Uninitialized scalar variable
The flags field of struct gpio_desc is not initialized. When calling
dm_gpio_set_dir_flags, the flags field will be used.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
3 years agoLF-3943 arm: dts: imx8mm-evk: Change board's model name
Ye Li [Mon, 7 Jun 2021 04:30:58 +0000 (21:30 -0700)]
LF-3943 arm: dts: imx8mm-evk: Change board's model name

Update Model to "NXP i.MX8MM EVK board"

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
3 years agoMerge remote-tracking branch 'origin/imx_v2021.04' into lf_v2021.04
BJ DevOps Team [Fri, 4 Jun 2021 07:33:56 +0000 (09:33 +0200)]
Merge remote-tracking branch 'origin/imx_v2021.04' into lf_v2021.04

* origin/imx_v2021.04:
  LFU-161 imx8m: Fix pad DSE issue for imx8mm/mn/mp
  LFU-160 mx6sabre: Enable IMX_THERMAL for iMX6Q/DL/QP SDB and ARD

3 years agoLFU-161 imx8m: Fix pad DSE issue for imx8mm/mn/mp
Ye Li [Fri, 4 Jun 2021 06:49:48 +0000 (23:49 -0700)]
LFU-161 imx8m: Fix pad DSE issue for imx8mm/mn/mp

According to RM, 8MM/MN/MP pad only have 4 valid DSE values.
And DSE2 and DSE4 are different with current definitions in iomux-v3.h.
Fix the issue to align with RM.

Signed-off-by: Ye Li <ye.li@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
3 years agoLFU-160 mx6sabre: Enable IMX_THERMAL for iMX6Q/DL/QP SDB and ARD
Ye Li [Fri, 4 Jun 2021 04:25:58 +0000 (21:25 -0700)]
LFU-160 mx6sabre: Enable IMX_THERMAL for iMX6Q/DL/QP SDB and ARD

The CONFIG_IMX_THERMAL has been deleted from header file, so we
have to enable it in Kconfig. Add it to common Kconfig for
iMX6Q/DL/QP SDB and ARD boards

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
3 years agoMerge remote-tracking branch 'origin/ls_v2021.04' into lf_v2021.04
BJ DevOps Team [Wed, 2 Jun 2021 09:12:26 +0000 (11:12 +0200)]
Merge remote-tracking branch 'origin/ls_v2021.04' into lf_v2021.04

* origin/ls_v2021.04:
  mmc: fsl_esdhc: convert to CONFIG_FSL_ESDHC_VS33_NOT_SUPPORT

3 years agommc: fsl_esdhc: convert to CONFIG_FSL_ESDHC_VS33_NOT_SUPPORT
Yangbo Lu [Wed, 2 Jun 2021 03:05:19 +0000 (11:05 +0800)]
mmc: fsl_esdhc: convert to CONFIG_FSL_ESDHC_VS33_NOT_SUPPORT

For eSDHC, power supply is through peripheral circuit. So, 3.3V
power supply capability from register bit does not reflect the
truth. 3.3V is common for SD/MMC, and is supported for all boards
with eSDHC in current u-boot. So, let's use a Kconfig
CONFIG_FSL_ESDHC_VS33_NOT_SUPPORT making 3.3V is supported in
default.

This is also a fix-up for one previous patch, which converted to
use IS_ENABLED() for CONFIG_SYS_FSL_MMC_HAS_CAPBLT_VS33 that is
not a Kconfig option.

Fixes: 52faec31827e ("mmc: fsl_esdhc: replace most #ifdefs by IS_ENABLED()")
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
3 years agoMerge remote-tracking branch 'origin/imx_v2021.04' into lf_v2021.04
BJ DevOps Team [Mon, 31 May 2021 06:17:34 +0000 (08:17 +0200)]
Merge remote-tracking branch 'origin/imx_v2021.04' into lf_v2021.04

* origin/imx_v2021.04:
  LFU-156 video: mxsfb: Fix pixel clock issue in non-DM driver

3 years agoLFU-156 video: mxsfb: Fix pixel clock issue in non-DM driver
Ye Li [Mon, 31 May 2021 04:43:51 +0000 (21:43 -0700)]
LFU-156 video: mxsfb: Fix pixel clock issue in non-DM driver

When changing video mode to display timing structure, the pclk from
env or board codes is represented by the time of one clock (picosecond).
So we can't directly assign it to pixel clock (hz), but use PS2KHZ
to convert.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
3 years agoMerge remote-tracking branch 'origin/imx_v2021.04' into lf_v2021.04
BJ DevOps Team [Thu, 27 May 2021 12:17:07 +0000 (14:17 +0200)]
Merge remote-tracking branch 'origin/imx_v2021.04' into lf_v2021.04

* origin/imx_v2021.04:
  LFU-143 tcpc: Add i2c read/write return check
  LFU-18 spi: fsl_lpspi: Fix dereference before null check
  LFU-145 imx8qxp_val: Fix uninitialized gpio variable

3 years agoLFU-143 tcpc: Add i2c read/write return check
Ye Li [Thu, 27 May 2021 10:13:14 +0000 (03:13 -0700)]
LFU-143 tcpc: Add i2c read/write return check

Fix coverity Issue: 2970631/5409463 Unchecked return value.
Add relevant return check for i2c read and write

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
3 years agoLFU-18 spi: fsl_lpspi: Fix dereference before null check
Ye Li [Thu, 27 May 2021 08:05:44 +0000 (01:05 -0700)]
LFU-18 spi: fsl_lpspi: Fix dereference before null check

Fix coverity Issue: 11026161 Dereference before null check
The lpspi should not be dereferenced before null checking, moving
getting its udevice after the checking

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
3 years agoLFU-145 imx8qxp_val: Fix uninitialized gpio variable
Ye Li [Thu, 27 May 2021 07:59:06 +0000 (00:59 -0700)]
LFU-145 imx8qxp_val: Fix uninitialized gpio variable

Fix coverity Issue: 13562326 Uninitialized scalar variable
The flags field of struct gpio_desc is not initialized. When calling
dm_gpio_set_dir_flags, the flags field will be used.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
3 years agoLFU-154 imx6ul: bee: fix build break
Peng Fan [Thu, 27 May 2021 10:42:24 +0000 (18:42 +0800)]
LFU-154 imx6ul: bee: fix build break

Fix below build break by including the global_data.h header file.
"
  CC      arch/arm/mach-imx/mx6/bee.o
arch/arm/mach-imx/mx6/bee.c:18:1: warning: data definition has no type or storage class
   18 | DECLARE_GLOBAL_DATA_PTR;
      | ^~~~~~~~~~~~~~~~~~~~~~~
arch/arm/mach-imx/mx6/bee.c:18:1: warning: type defaults to ‘int’ in declaration of ‘DECLARE_GLOBAL_DATA_PTR’ [-Wimplicit-int]
arch/arm/mach-imx/mx6/bee.c: In function ‘region_valid’:
arch/arm/mach-imx/mx6/bee.c:261:29: error: ‘gd’ undeclared (first use in this function)
  261 |  if ((start + size - 1) >= (gd->start_addr_sp - SZ_128K)) {
      |                             ^~
arch/arm/mach-imx/mx6/bee.c:261:29: note: each undeclared identifier is reported only once for each function it appears in
scripts/Makefile.build:265: recipe for target 'arch/arm/mach-imx/mx6/bee.o' failed
make[2]: *** [arch/arm/mach-imx/mx6/bee.o] Error 1

"

Reviewed-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
3 years agoMerge remote-tracking branch 'origin/imx_v2021.04' into lf_v2021.04
BJ DevOps Team [Thu, 27 May 2021 10:17:42 +0000 (12:17 +0200)]
Merge remote-tracking branch 'origin/imx_v2021.04' into lf_v2021.04

* origin/imx_v2021.04:
  LFU-154 imx6ul: bee: fix build break

3 years agoMerge remote-tracking branch 'origin/ls_v2021.04' into lf_v2021.04
BJ DevOps Team [Thu, 27 May 2021 06:46:28 +0000 (08:46 +0200)]
Merge remote-tracking branch 'origin/ls_v2021.04' into lf_v2021.04

* origin/ls_v2021.04:
  net: phy: inphi in112525 gen1/gen2 retimers support

3 years agonet: phy: inphi in112525 gen1/gen2 retimers support
Florin Chiculita [Mon, 27 Apr 2020 13:59:04 +0000 (16:59 +0300)]
net: phy: inphi in112525 gen1/gen2 retimers support

Add support for Inphi retimers used on LX2160A-RDB/QDS boards
Add support for M13,M8 mezzanine cards using Inphi retimers
Gen1 configurations: 10/25
Gen2 configurations: 10/25 + 40/50/100G (using 2 retimers)
Speeds are configurable via menuconfig options

Signed-off-by: Florin Chiculita <florinlaurentiu.chiculita@nxp.com>
Signed-off-by: Priyanka Jain <priyanka.jain@nxp.com> # rebased
Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> # rebased over v2021.04
3 years agoMerge remote-tracking branch 'origin/imx_v2021.04' into lf_v2021.04
BJ DevOps Team [Wed, 26 May 2021 13:31:27 +0000 (15:31 +0200)]
Merge remote-tracking branch 'origin/imx_v2021.04' into lf_v2021.04

* origin/imx_v2021.04:
  MA-19082-2 imx8m: Use Trusty OS handle SNVS operation

3 years agoMA-19082-2 imx8m: Use Trusty OS handle SNVS operation
Ji Luo [Thu, 18 Jul 2019 06:18:14 +0000 (14:18 +0800)]
MA-19082-2 imx8m: Use Trusty OS handle SNVS operation

This patch added Trusty OS in u-boot to handle
some snvs related operation.

Change-Id: Iba2b9e12381ce537b40959f14e831accbdecba8f
Signed-off-by: Haoran.Wang <elven.wang@nxp.com>
Signed-off-by: Ji Luo <ji.luo@nxp.com>
3 years agoLF-3898-4 dts: imx8mm/n-evk: disable over current for usb1
Peng Fan [Wed, 26 May 2021 09:47:24 +0000 (17:47 +0800)]
LF-3898-4 dts: imx8mm/n-evk: disable over current for usb1

Sync with Ticket LF-3861.

Since imx8mm and imx8mn evk base board does not support over current
detection for usb1, so disable it.

Reviewed-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
3 years agoLF-3898-3 imx: imx8m: soc: runtime drop extcon property from usbotg node
Peng Fan [Wed, 26 May 2021 09:44:41 +0000 (17:44 +0800)]
LF-3898-3 imx: imx8m: soc: runtime drop extcon property from usbotg node

The extcon is an decrepted property and not used by upstream Linux and
NXP 5.10 kernel, so we remove it before kicking linux in case it is in
dts. Otherwise distro kernel will not able to have usb function.

Reviewed-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
3 years agoLF-3898-2 arm: dts: imx8mm: remove power domain property
Peng Fan [Wed, 26 May 2021 09:39:43 +0000 (17:39 +0800)]
LF-3898-2 arm: dts: imx8mm: remove power domain property

The current power domain node in imx8mm.dtsi is not used in U-Boot,
and it not match with upstream Linux Kernel. U-Boot use arm smccc
to enable usb power domain, so we could remove this property.
It could be added back when we finally switch to upstream pgc node.

Reviewed-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
3 years agoLF-3898-1 configs: imx8mm_evk: enable CONFIG_CMD_POWEROFF
Peng Fan [Wed, 26 May 2021 09:38:04 +0000 (17:38 +0800)]
LF-3898-1 configs: imx8mm_evk: enable CONFIG_CMD_POWEROFF

Enable CONFIG_CMD_POWEROFF to support ARM SystemReady power off test.

Reviewed-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
3 years agoMerge remote-tracking branch 'origin/imx_v2021.04' into lf_v2021.04
BJ DevOps Team [Wed, 26 May 2021 09:45:42 +0000 (11:45 +0200)]
Merge remote-tracking branch 'origin/imx_v2021.04' into lf_v2021.04

* origin/imx_v2021.04:
  LF-3898-4 dts: imx8mm/n-evk: disable over current for usb1
  LF-3898-3 imx: imx8m: soc: runtime drop extcon property from usbotg node
  LF-3898-2 arm: dts: imx8mm: remove power domain property
  LF-3898-1 configs: imx8mm_evk: enable CONFIG_CMD_POWEROFF

3 years agoMerge remote-tracking branch 'origin/ls_v2021.04' into lf_v2021.04
BJ DevOps Team [Tue, 25 May 2021 03:59:41 +0000 (05:59 +0200)]
Merge remote-tracking branch 'origin/ls_v2021.04' into lf_v2021.04

* origin/ls_v2021.04:
  configs: ls2088aqds: fix synchronous exception

3 years agoconfigs: ls2088aqds: fix synchronous exception
Biwen Li [Fri, 21 May 2021 03:17:25 +0000 (11:17 +0800)]
configs: ls2088aqds: fix synchronous exception

IFC NOR flash base address of ls2088a is 0x580000000,
and env crc offset size is 0x500000, so fix the macro
CONFIG_ENV_ADDR to fix synchronous exception(access illegal address)

Fixes: 59071804c1 ("configs: ls2080a: Correct ENV_ADDR value")
Signed-off-by: Biwen Li <biwen.li@nxp.com>
3 years agoMerge remote-tracking branch 'origin/imx_v2021.04' into lf_v2021.04
BJ DevOps Team [Mon, 24 May 2021 07:37:20 +0000 (09:37 +0200)]
Merge remote-tracking branch 'origin/imx_v2021.04' into lf_v2021.04

* origin/imx_v2021.04:
  LF-3843: dts: imx8mq evk: correct 1280x720p60 video timing

3 years agoLF-3843: dts: imx8mq evk: correct 1280x720p60 video timing
Sandor Yu [Fri, 21 May 2021 06:00:50 +0000 (14:00 +0800)]
LF-3843: dts: imx8mq evk: correct 1280x720p60 video timing

For 720p60 CEA mode:
hfront_porch = hsync_start - hdisplay = 1390-1280=110
hback_porch = htotal - hsync_end = 1650-1430=220
vfront_porch = vsync_start - vdisplay = 725-720=5
vback_porch = vtotal - vsync_end = 750-730=20

Add hsync-active and vsync-active;

Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
3 years agoMerge remote-tracking branch 'origin/imx_v2021.04' into lf_v2021.04
BJ DevOps Team [Fri, 21 May 2021 07:11:24 +0000 (09:11 +0200)]
Merge remote-tracking branch 'origin/imx_v2021.04' into lf_v2021.04

* origin/imx_v2021.04:
  MA-19065-1 Support widevine keybox provision

3 years agoMerge remote-tracking branch 'origin/ls_v2021.04' into lf_v2021.04
BJ DevOps Team [Fri, 21 May 2021 06:30:13 +0000 (08:30 +0200)]
Merge remote-tracking branch 'origin/ls_v2021.04' into lf_v2021.04

* origin/ls_v2021.04:
  configs: ls1088a: Enable CONFIG_SYS_RELOC_ENV_ADDR

3 years agoconfigs: ls1088a: Enable CONFIG_SYS_RELOC_ENV_ADDR
Kuldeep Singh [Tue, 18 May 2021 06:34:28 +0000 (12:04 +0530)]
configs: ls1088a: Enable CONFIG_SYS_RELOC_ENV_ADDR

Signed-off-by: Kuldeep Singh <kuldeep.singh@nxp.com>
3 years agoMA-19065-1 Support widevine keybox provision
Ji Luo [Wed, 19 May 2021 05:48:05 +0000 (13:48 +0800)]
MA-19065-1 Support widevine keybox provision

support widevine keybox provisioning via hwcrypto,
the keybox would be wrote into secure storage.

This commit supports two kinds of widevine keybox
provisioning: plain text keybox and encrypted keybox.

Command to provision the plain text keybox:
  $ fastboot stage <path-to-plain-text-keybox>
  $ fastboot oem provision-wv-keybox

Command to provision the encrypted text keybox:
  $ fastboot stage <path-to-encrypted-keybox>
  $ fastboot oem provision-wv-keybox-enc

Test: plain text/encrypted keybox provisioning on imx8mp.

Change-Id: I241afade415fc3e2b0a80d286b3cc4e8d702e620
Signed-off-by: Ji Luo <ji.luo@nxp.com>
3 years agoMerge remote-tracking branch 'origin/imx_v2021.04' into lf_v2021.04
BJ DevOps Team [Thu, 20 May 2021 14:30:01 +0000 (16:30 +0200)]
Merge remote-tracking branch 'origin/imx_v2021.04' into lf_v2021.04

* origin/imx_v2021.04:
  MA-19068 android auto: get right kernel size

3 years agoMA-19068 android auto: get right kernel size
Ji Luo [Thu, 20 May 2021 01:47:40 +0000 (09:47 +0800)]
MA-19068 android auto: get right kernel size

Pass the correct kernel address for android auto
so uboot can get correct kernel size.

Change-Id: I20b6501bbc401c5a1d5752179e00b3b9875a10a2
Signed-off-by: Ji Luo <ji.luo@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
3 years agoMerge remote-tracking branch 'origin/imx_v2021.04' into lf_v2021.04
BJ DevOps Team [Thu, 20 May 2021 01:45:26 +0000 (03:45 +0200)]
Merge remote-tracking branch 'origin/imx_v2021.04' into lf_v2021.04

* origin/imx_v2021.04: (7 commits)
  LFU-15 Fix using uninitialized value
  LF-1897 trusty: Fix extra argument to printf format specifier
  LF-1896 trusty: fix invalid type in argument to printf format specifier
  LF-1894 trusty: fix invalid printf format string
  LF-1892 7ulp: Fix missing break in switch
  ...

3 years agoLFU-15 Fix using uninitialized value
Ji Luo [Thu, 17 Dec 2020 06:03:06 +0000 (14:03 +0800)]
LFU-15 Fix using uninitialized value

This commit fixes Coverity Issue: 11468195, avoid
uninitialized value using.

Test: AVB check.

Change-Id: I04eb8faafd6c9a9fec1aeae0b29edc6940251094
Signed-off-by: Ji Luo <ji.luo@nxp.com>
(cherry picked from commit 742cc182bf9d0d0a7c8cecdac2a328e5c0bd64cb)

3 years agoLF-1897 trusty: Fix extra argument to printf format specifier
Ji Luo [Mon, 3 Aug 2020 14:44:11 +0000 (22:44 +0800)]
LF-1897 trusty: Fix extra argument to printf format specifier

Fix Coverity Issue 10473659 and 10473672. Pass correct parameter
to fix the extra argument issue.

Signed-off-by: Ji Luo <ji.luo@nxp.com>
Change-Id: I72e30250827ad0c48e079a7048bdb40773c17a96
(cherry picked from commit ed061b4a21a24d8deb36561e0bfe2343e2ce45c8)

3 years agoLF-1896 trusty: fix invalid type in argument to printf format specifier
Ji Luo [Mon, 3 Aug 2020 11:53:15 +0000 (19:53 +0800)]
LF-1896 trusty: fix invalid type in argument to printf format specifier

Fix Coverity Issue 104736581047366310473664 and 10473668. Use "%lu"
for "uint64_t" and "unsigned long" parameter in printf to fix the type
mismatch issue.

Signed-off-by: Ji Luo <ji.luo@nxp.com>
Change-Id: Ic1642ab4d5aecee9676b65582b04eaca4c16d3c2

3 years agoLF-1894 trusty: fix invalid printf format string
Ji Luo [Mon, 3 Aug 2020 11:34:20 +0000 (19:34 +0800)]
LF-1894 trusty: fix invalid printf format string

Fix Coverity Issue 10473656. Use "%s" instead of "%" to
print the function name.

Signed-off-by: Ji Luo <ji.luo@nxp.com>
Change-Id: I3158b2504a2be0330eb982d279811ca88935a902
(cherry picked from commit 4339a489b8f24b35d2e59084e7ce42de27f28461)

3 years agoLF-1892 7ulp: Fix missing break in switch
Ji Luo [Mon, 3 Aug 2020 11:24:11 +0000 (19:24 +0800)]
LF-1892 7ulp: Fix missing break in switch

Fix Coverity Issue 10473654. Add 'break' statememt for 'case 2' to
fix MISSING_BREAK issue.

Signed-off-by: Ji Luo <ji.luo@nxp.com>
Change-Id: I33072ffeb1b8ecf108d1fbea8bc14905a23facc3
(cherry picked from commit e1155dc7a77b299899f8e0f7ca1c20a2bcbcea94)

3 years agoLF-1846 avb: Fix unintentional integer overflow
Ji Luo [Mon, 3 Aug 2020 11:17:09 +0000 (19:17 +0800)]
LF-1846 avb: Fix unintentional integer overflow

Fix Coverity Issue 2690361. Fix unintentional integer overflow by
casting the pte->length to type 'uint64_t'.

Signed-off-by: Ji Luo <ji.luo@nxp.com>
Change-Id: I4536e733c82cb31bbd7da0ee916e7698850c3b81
(cherry picked from commit 3a332c5264b1cdb5aa026bcb6fd4afad69c0d19b)

3 years agoLF-1850 fastboot: Fix buffer not null terminated
Ji Luo [Mon, 3 Aug 2020 10:31:36 +0000 (18:31 +0800)]
LF-1850 fastboot: Fix buffer not null terminated

Fix Coverity Issue 3351934. Calling strncpy() with the size shorter
than the source string and would cause null-terminate dest buffer.

Signed-off-by: Ji Luo <ji.luo@nxp.com>
Change-Id: I1e71fb584eb8f10a90ec87564cc49b7f9388c3de
(cherry picked from commit 0c408158af2592f34ed4ecc7c6a30db5c8676ffe)

3 years agoMerge remote-tracking branch 'origin/imx_v2021.04' into lf_v2021.04
BJ DevOps Team [Wed, 19 May 2021 11:28:16 +0000 (13:28 +0200)]
Merge remote-tracking branch 'origin/imx_v2021.04' into lf_v2021.04

* origin/imx_v2021.04:
  MA-19067 android: skip optee dtb node handling

3 years agoMA-19067 android: skip optee dtb node handling
Ji Luo [Wed, 19 May 2021 10:51:06 +0000 (18:51 +0800)]
MA-19067 android: skip optee dtb node handling

Android doesn't use optee so skip optee dtb node
handling.

Change-Id: I30bf91a62fe774dbae0d219fd17405feed6f0784
Signed-off-by: Ji Luo <ji.luo@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
3 years agoMerge remote-tracking branch 'origin/imx_v2021.04' into lf_v2021.04
BJ DevOps Team [Wed, 19 May 2021 06:54:12 +0000 (08:54 +0200)]
Merge remote-tracking branch 'origin/imx_v2021.04' into lf_v2021.04

* origin/imx_v2021.04:
  LFU-126-12 i.MX8: Moved Power on JR resource to jobring driver.

3 years agoLFU-126-12 i.MX8: Moved Power on JR resource to jobring driver.
Gaurav Jain [Mon, 17 May 2021 04:09:31 +0000 (09:39 +0530)]
LFU-126-12 i.MX8: Moved Power on JR resource to jobring driver.

u-boot power domain driver API is used to power on JR.
so that u-boot framework will automatically
power off JR resource before booting into kernel.

Signed-off-by: Gaurav Jain <gaurav.jain@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
3 years agoMerging in latest from upstream (LFAC/uboot-nxp:refs/heads/imx_v2021.04)
Gaurav Jain [Tue, 18 May 2021 07:10:09 +0000 (09:10 +0200)]
Merging in latest from upstream (LFAC/uboot-nxp:refs/heads/imx_v2021.04)

* commit '4272c700e189240ca1befba02dd6c0ee795c1751':
  LF-3782 fastboot: Select USB_GADGET_OS_DESCRIPTORS for fastboot function
  MLK-25497 nand: mxs_nand_spl: Fix nand_spl_adjust_offset issue
  MLK-25496 imx6: Fix CONFIG_SYS_MMC_ENV_DEV for QSPI/SPI/EIM boot

3 years agoMerge remote-tracking branch 'origin/imx_v2021.04' into lf_v2021.04
BJ DevOps Team [Tue, 18 May 2021 05:23:57 +0000 (07:23 +0200)]
Merge remote-tracking branch 'origin/imx_v2021.04' into lf_v2021.04

* origin/imx_v2021.04:
  LF-3782 fastboot: Select USB_GADGET_OS_DESCRIPTORS for fastboot function
  MLK-25497 nand: mxs_nand_spl: Fix nand_spl_adjust_offset issue
  MLK-25496 imx6: Fix CONFIG_SYS_MMC_ENV_DEV for QSPI/SPI/EIM boot

3 years agoLF-3782 fastboot: Select USB_GADGET_OS_DESCRIPTORS for fastboot function
Ye Li [Tue, 18 May 2021 03:10:22 +0000 (20:10 -0700)]
LF-3782 fastboot: Select USB_GADGET_OS_DESCRIPTORS for fastboot function

CONFIG_USB_GADGET_OS_DESCRIPTORS must be set when using OS descriptor,
otherwise the OS descriptors (windows WCID) are not handled.
Since only fastboot uses this feature, default select
USB_GADGET_OS_DESCRIPTORS for fastboot function

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
3 years agoMLK-25497 nand: mxs_nand_spl: Fix nand_spl_adjust_offset issue
Ye Li [Sat, 15 May 2021 05:54:28 +0000 (22:54 -0700)]
MLK-25497 nand: mxs_nand_spl: Fix nand_spl_adjust_offset issue

Wrong offset was returned in commit e849aaa
(LF-3483-2 nand: mxs_nand_spl: Implement the nand_spl_adjust_offset)
Fix the issue by removing the sector.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
3 years agoMLK-25496 imx6: Fix CONFIG_SYS_MMC_ENV_DEV for QSPI/SPI/EIM boot
Ye Li [Fri, 14 May 2021 10:41:18 +0000 (03:41 -0700)]
MLK-25496 imx6: Fix CONFIG_SYS_MMC_ENV_DEV for QSPI/SPI/EIM boot

CONFIG_SYS_MMC_ENV_DEV depends on CONFIG_ENV_IS_IN_MMC.  So even
we have added it in defconfig for QSPI/SPI/EIM, but this does not
really set due to we set ENV in NOR flash device.

This causes "mmcdev" set to invalid value. So u-boot fails to
select SD card before loading kernel image.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
3 years agoMerge remote-tracking branch 'origin/ls_v2021.04' into lf_v2021.04
BJ DevOps Team [Fri, 14 May 2021 09:27:14 +0000 (11:27 +0200)]
Merge remote-tracking branch 'origin/ls_v2021.04' into lf_v2021.04

* origin/ls_v2021.04:
  pci: layerscape-ep: Add check of the PCIe controller enablement

3 years agopci: layerscape-ep: Add check of the PCIe controller enablement
Hou Zhiqiang [Thu, 13 May 2021 06:32:09 +0000 (14:32 +0800)]
pci: layerscape-ep: Add check of the PCIe controller enablement

Stop to initialize the PCIe controller if it's disabled by RCW.

Fixes: 118e58e26eba ("pci: layerscape: Split the EP and RC driver")
Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@nxp.com>
3 years agoMerge remote-tracking branch 'origin/imx_v2021.04' into lf_v2021.04
BJ DevOps Team [Thu, 13 May 2021 01:58:31 +0000 (03:58 +0200)]
Merge remote-tracking branch 'origin/imx_v2021.04' into lf_v2021.04

* origin/imx_v2021.04: (94 commits)
  MA-19038 Android: Add imx8/imx8m reference boards support
  MA-19037 imx8mn: Add spl mmc boot support
  MA-19036 android: imx8mm: Add 4GB lpddr4 support
  MA-19032 android: imx8: don't initialize caam in uboot
  MA-19031 imx: hab: fix build break
  ...

3 years agoMA-19038 Android: Add imx8/imx8m reference boards support
Ji Luo [Wed, 12 May 2021 07:00:38 +0000 (15:00 +0800)]
MA-19038 Android: Add imx8/imx8m reference boards support

Add configs to support imx8/imx8m reference boards, each platform
has specific header files include.

Test: sanity test on imx8/imx8m platforms.

Change-Id: Ic7341fe71fc765b93beb061208e1e3b8b92b990b
Signed-off-by: Ji Luo <ji.luo@nxp.com>
3 years agoMA-19037 imx8mn: Add spl mmc boot support
Ji Luo [Wed, 12 May 2021 05:49:55 +0000 (13:49 +0800)]
MA-19037 imx8mn: Add spl mmc boot support

Android won't boot with boot rom so add spl
mmc boot support here.

Change-Id: I0d1d9240ed63b99cec6d964ea369ff55865547c5
Signed-off-by: Ji Luo <ji.luo@nxp.com>
3 years agoMA-19036 android: imx8mm: Add 4GB lpddr4 support
Ji Luo [Wed, 12 May 2021 05:46:20 +0000 (13:46 +0800)]
MA-19036 android: imx8mm: Add 4GB lpddr4 support

Add support for imx8mm evk board with 4GB lpddr4.

Change-Id: I8254dfba90ac48a04c38bef21741cdc22d3cd470
Signed-off-by: Ji Luo <ji.luo@nxp.com>
3 years agoMA-19032 android: imx8: don't initialize caam in uboot
Ji Luo [Tue, 11 May 2021 08:31:13 +0000 (16:31 +0800)]
MA-19032 android: imx8: don't initialize caam in uboot

CAAM JR0/JR1 are reserved for SECO, JR2/JR3 will be used in
Trusty OS for android. As Android doesn't need the caam
in uboot for imx8q, so bypass the caam JR probe to avoid
conflicts.

Change-Id: Id4ffe9fbb466abfeadc2c18e4b5d7e1b68360ab5
Signed-off-by: Ji Luo <ji.luo@nxp.com>
3 years agoMA-19031 imx: hab: fix build break
Ji Luo [Tue, 11 May 2021 06:21:10 +0000 (14:21 +0800)]
MA-19031 imx: hab: fix build break

Include correct header file to fix below build
break:
  arch/arm/mach-imx/hab.c:20:1: warning: data definition has no type or storage class DECLARE_GLOBAL_DATA_PTR;
  ^~~~~~~~~~~~~~~~~~~~~~~
  arch/arm/mach-imx/hab.c:20:1: warning: type defaults to 'int' in declaration of 'DECLARE_GLOBAL_DATA_PTR' [-Wimplicit-int]
  arch/arm/mach-imx/hab.c:61:17: error: unknown type name 'gd_t'
  static volatile gd_t *gd_save;
  ^~~~
  arch/arm/mach-imx/hab.c: In function 'save_gd':
  arch/arm/mach-imx/hab.c:67:12: error: 'gd'
  undeclared (first use in this function)
  gd_save = gd;
  ^~
  arch/arm/mach-imx/hab.c:67:12: note: each undeclared identifier is reported only once for each function it appears in

Change-Id: Ie8c396be901a80d9bf90b74e59607d6d17619aaa
Signed-off-by: Ji Luo <ji.luo@nxp.com>
3 years agoMA-19030 android: Switch to new caam drivers
Ji Luo [Tue, 11 May 2021 04:10:01 +0000 (12:10 +0800)]
MA-19030 android: Switch to new caam drivers

fsl_caam.c would be dropped and this commit switches to
the new caam drivers for android.

Change-Id: I91ff446dc9a337d14732f05fb724368010d73dd2
Signed-off-by: Ji Luo <ji.luo@nxp.com>
3 years agoMA-19027 crypto/fsl: code clean up
Ji Luo [Tue, 11 May 2021 02:17:31 +0000 (10:17 +0800)]
MA-19027 crypto/fsl: code clean up

This commit makes some clean up for the caam blob
codes.

Change-Id: I1544894825ad9a25ae1e346b5fb917dd7cd78829
Signed-off-by: Ji Luo <ji.luo@nxp.com>
3 years agoMA-19026 Add config to guard rpmb driver in SPL
Ji Luo [Tue, 11 May 2021 02:00:49 +0000 (10:00 +0800)]
MA-19026 Add config to guard rpmb driver in SPL

Android will need rpmb operation in SPL, below commit
guard the rpmb.c build with CONFIG_SPL_SUPPORT_EMMC_RPMB
but didn't add it in the Kconfig:
  commit 2448c34f9fc26d3c459e6e7b28c6357656bfa287
  Author: Heinrich Schuchardt <xypron.glpk@gmx.de>
  Date:   Wed Apr 15 18:28:09 2020 +0200

      drivers: mmc: rpmb: do not build for SPL

      RPMB support is used by the 'mmc rpmb' command and by the OP-TEE
      support.
      We do not need it in SPL.
This commit will add CONFIG_SPL_SUPPORT_EMMC_RPMB defination
and select it by default when trusty is enabled.

Change-Id: I8d3b4481d529828cb03328b826e0e7065104ba46
Signed-off-by: Ji Luo <ji.luo@nxp.com>
3 years agoMA-19023 Add is_recovery_key_pressing() for imx8/imx8m
Ji Luo [Sat, 8 May 2021 07:59:32 +0000 (15:59 +0800)]
MA-19023 Add is_recovery_key_pressing() for imx8/imx8m

This is_recovery_key_pressing() will simply return as
we don't support it on the reference board.

Change-Id: I4748450f5d571737aa457662da7c972d613e15df
Signed-off-by: Ji Luo <ji.luo@nxp.com>
3 years agoMA-19022 Remove cmd_tbl_t typedef for imx
Ji Luo [Sat, 8 May 2021 06:43:11 +0000 (14:43 +0800)]
MA-19022 Remove cmd_tbl_t typedef for imx

cmd_tbl_t typedef has been removed by below commit:
  commit 09140113108541b95d340f3c7b6ee597d31ccc73
  Author: Simon Glass <sjg@chromium.org>
  Date:   Sun May 10 11:40:03 2020 -0600

      command: Remove the cmd_tbl_t typedef
Sync this change for imx platforms.

Change-Id: Ia08287658a3471569a92438434f3163ac078a49c
Signed-off-by: Ji Luo <ji.luo@nxp.com>
3 years agoMA-17916-1 Clean Up: Guard codes with correct configs
Ji Luo [Mon, 21 Sep 2020 08:22:21 +0000 (16:22 +0800)]
MA-17916-1 Clean Up: Guard codes with correct configs

This commit does some clean-up to guard the codes/configs with
correct configs, so we can enable/disable the feature without
modifying the codes.

Test: builds and boots on imx8qm.

Signed-off-by: Ji Luo <ji.luo@nxp.com>
Change-Id: Ic4cf4d9f47bd5a4317b2621a5378cb4b192e52fb
(cherry picked from commit 2c2363e47b858bd178c44869328eca211b2c3f62)
(cherry picked from commit cdf01e8a0fbf29df6230344889d1ec5035b6c978)

3 years agoMA-17046-1 Show orange warning for unlocked device
Ji Luo [Tue, 28 Apr 2020 01:52:07 +0000 (09:52 +0800)]
MA-17046-1 Show orange warning for unlocked device

According to the google boot flow, an orange warning should
be displayed on UNLOCKED device to reminder the users of the
potential risks.

This commit will show an orange warning logo and warning text
on the screen, it shall be dismissed after 3 seconds, users
can also skip it by pressing the ON-OFF button.

Config 'CONFIG_AVB_WARNING_LOGO_COLS' and 'CONFIG_AVB_WARNING_LOGO_ROWS'
define the (x, y) position of the warning logo, its default
value is for 1080*720 resolution display and can be overridden.

Test: Orange warning logo show on all imx8m/imx8q platfroms.

Change-Id: I607edb3da039b47ddfac681f855834d8da187af8
Signed-off-by: Ji Luo <ji.luo@nxp.com>
(cherry picked from commit 8ddefdb1186feb3580830fa04b588d3ee606cf81)

3 years agoMA-17159 Implement bootloader menu for imx7ulp
Ji Luo [Thu, 7 May 2020 04:52:00 +0000 (12:52 +0800)]
MA-17159 Implement bootloader menu for imx7ulp

According to the spec of android wear, the device MUST provides a
bootloader menu for debugging purpose.

This commit implements a simple bootloader menu based on imx7ulp_evk
revb board, the menu will show when booting with 'VOL+' key pressed,
users can press "VOL+" to choose the item, then press "ONOFF" key to
confirm.

Test: bootloader menu show on imx7ulp_evk revb.

Change-Id: I80638a43afa17e312e633b05888c62440380b42b
Signed-off-by: Ji Luo <ji.luo@nxp.com>
(cherry picked from commit 9d5995caf7146d4955fba2524a7f25d761049e28)

3 years agoMA-18914 Don't load key from RPMB in hard-code case
Ji Luo [Tue, 13 Apr 2021 06:18:24 +0000 (14:18 +0800)]
MA-18914 Don't load key from RPMB in hard-code case

Use hard-code public key instead of reading it from RPMB
When "CONFIG_LOAD_KEY_FROM_RPMB" is setting to "n".

Test: Boots on imx8mp.

Change-Id: I701777a0cfe3790a4e38f2cbe858e1fbddc2552a
Signed-off-by: Ji Luo <ji.luo@nxp.com>
Reviewed-by: Wang Haoran <elven.wang@nxp.com>
(cherry picked from commit 740eaa338b656b20611affb22572fe0a2253161d)

3 years agoMA-18913 Load dtb according to kernel address
Ji Luo [Tue, 13 Apr 2021 05:03:57 +0000 (13:03 +0800)]
MA-18913 Load dtb according to kernel address

As the kernel image will get bigger after enabling some debug
tools, 64MB kernel max size is not enough. Load the dtb to the
address right after linux kernel instead of setting fixed offset
to the start of kernel image.

The "kernel_size" in boot image header is the physical size of
"Image" instead of the memory size which the linux requires to
boot.

Test: boots on imx8mp/imx8qm.

Change-Id: I5946c8530610ff0742f2a911aaeccf7636938b94
Signed-off-by: Ji Luo <ji.luo@nxp.com>
Reviewed-by: Wang Haoran <elven.wang@nxp.com>
(cherry picked from commit c1f83790077516a64397467fce5880be0871f615)

3 years agoMA-18775 system will hang about 3s when boot up kernel
zhang sanshan [Fri, 5 Mar 2021 02:15:34 +0000 (10:15 +0800)]
MA-18775 system will hang about 3s when boot up kernel

system will hang at line 1834 which will hold console_waiter
1833    /* Owner will clear console_waiter on hand off */
1834    while (READ_ONCE(console_waiter))
1835           cpu_relax();
1836    spin_release(&console_owner_dep_map, _THIS_IP_);

It means  console_lock_spinning_disable_and_check is not called in time.
So console_unlock may not called in time.
remove earlycon as workaround.

Change-Id: I5742c0ade6e289d1a96a67b27b4e55f2e1732187
Signed-off-by: zhang sanshan <pete.zhang@nxp.com>
(cherry picked from commit 74938a70b5fece2d1f3f60e74596f393a40e5713)
(cherry picked from commit 9be7570228e5ede0b1ab0b015210aeb56585e39c)

3 years agoMA-18680-2 Support derive rpmb key from BKEK
Ji Luo [Fri, 5 Feb 2021 00:43:13 +0000 (08:43 +0800)]
MA-18680-2 Support derive rpmb key from BKEK

The BKEK will bind to the soc chip and we don't need to
store the encapsulated keyslot after using BKEK as the
rpmb key, which reduces the risk of losing the rpmb key.

This commit adds two commands to support derive the rpmb
key from BKEK and erase the rpmb storage (for debug purpose,
need support from trusty):
  $ fastboot oem set-rpmb-hardware-key
  $ fastboot oem erase-rpmb

Legacy keyslot way is still supported and boards programed
with keyslot can still work in compatible way. Command
to set provisioned rpmb key is changed to:
  $ fastboot stage <rpmb-key>
  $ fastboot oem set-rpmb-staged-key

Test: Key set and boot on imx8mn/imx8qxp.

Change-Id: Ifc88010fe8802d3550e42dff0bbd5a5e5ad922a3
Signed-off-by: Ji Luo <ji.luo@nxp.com>
(cherry picked from commit 0fd1b5e41645ac3f5c05ad82258df1645c59fb5a)
(cherry picked from commit 6a5125b9caf4c2e036853d8f53f8398c147758b3)

3 years agoMA-18634-1 Android: refine config dependency
Ji Luo [Tue, 26 Jan 2021 07:26:36 +0000 (15:26 +0800)]
MA-18634-1 Android: refine config dependency

Refine the dependency of some configs to make it
easier to add/modify android config files.

Test: builds.

Change-Id: Iccb044dadc7ce1e0b839bf83e2e9157e718f286c
Signed-off-by: Ji Luo <ji.luo@nxp.com>
(cherry picked from commit 86f4f99a367bbc0ef99d4ab2a0b4078babfbfbd2)
(cherry picked from commit 8f3e86b52a27948ba1be1d93dae5e5a4c8a73a0a)

3 years agoMA-18346-11 Android refine power on imx8mp board
haidong.zheng [Mon, 12 Oct 2020 08:41:03 +0000 (16:41 +0800)]
MA-18346-11 Android refine power on imx8mp board

VDD SOC normal run changed to 0.85V
LPDDR4 freq0 change from 4000MTS to 2400MTS

Change-Id: I69676ea5b582a817fb3c367bd861db96ba647540
(cherry picked from commit 1205f1edfaed1383181d4d52344cc55e5e92a351)
(cherry picked from commit 4a9841d9f362d98fe0bf4804d2b365d1f3cb1bb8)

3 years agoMA-18508 Sync keymaster bootloader commands ID
Ji Luo [Thu, 31 Dec 2020 01:14:26 +0000 (09:14 +0800)]
MA-18508 Sync keymaster bootloader commands ID

AOSP adds command 'KM_CLEAR_ATTESTATION_CERT_CHAIN' to clear
the attestation cert chain, but its ID will conflict with
'KM_SET_ATTESTATION_KEY_ENC'. This commit will reorder the
keymaster commands to avoid conflicts.

Test: ID attestation provision.

Change-Id: I0046b5bee4e0ffea3bdcff31859452da53d8e50d
Signed-off-by: Ji Luo <ji.luo@nxp.com>
(cherry picked from commit e19aa1c26047dc719e7561695100dac807925ae7)
(cherry picked from commit b9a1bcaea22da0491df322b36740d7498e39cd38)

3 years agoMA-18422 Locate the misc partition by name
Ji Luo [Wed, 16 Dec 2020 13:07:13 +0000 (21:07 +0800)]
MA-18422 Locate the misc partition by name

Locating the misc partition by ID can help reduce the boot
time but error may happen if the ID of the misc partition
is changed. Moving the misc partition to the start of the
GPT and locate the partition by name is another option but
it will break the backward compatibility as the GPT is
changed.

part_get_info_by_name() will loop the PTE and return the
matched partition info, but it will cost much time as it
will reload the whole PTE from storage in each loop.

This commit provides part_get_info_efi_by_name() to support
return the partition info by name without reloading the whole
PTE.

Test: A/B slot switch in dual bootloader.

Change-Id: I13cb2a7b3217f73aecc2aec6e06abc0d6e8abcdd
Signed-off-by: Ji Luo <ji.luo@nxp.com>
(cherry picked from commit cd8f603f0d977ed73f0d0b44437c5c68fcebde25)
(cherry picked from commit d9972736dc0272377f89ccf528e8a873199c7903)

3 years agoMA-18352-5 Support device IDs provision
Ji Luo [Fri, 4 Dec 2020 03:01:23 +0000 (11:01 +0800)]
MA-18352-5 Support device IDs provision

The device IDs are provisioned from bootloader, this commit
add commands to provision the deivce IDs:
    $ fastboot oem append-device-id

Test: Device IDs provision and attest.

Change-Id: Id3c737d3da02f7ba463e51b0525f3cb9bcf0c6d1
Signed-off-by: Ji Luo <ji.luo@nxp.com>
(cherry picked from commit 7575ac07ac625c35269868511297385a69c96196)
(cherry picked from commit 7f300b1fc543d8f4cbe7329a78e31273678162a5)

3 years agoMA-18392-2 pass imx8 soc revision info to kernel
faqiang.zhu [Wed, 9 Dec 2020 13:56:27 +0000 (21:56 +0800)]
MA-18392-2 pass imx8 soc revision info to kernel

pass imx8 soc revision info to kernel so it can be used to judge
bootloader0 partition offset in postinstall command and update
the partition.

Change-Id: Ifc4d3d2abe8a694d7ec6f368c3e56f3d175982e5
Signed-off-by: faqiang.zhu <faqiang.zhu@nxp.com>
(cherry picked from commit cc51505010505ad39a12c07e7405bb992407d927)
(cherry picked from commit ca6530da25c826ff400b372333f46c3ad026db00)

3 years agoMA-18406 Fix panic when provision keys on boards without rpmb key
Ji Luo [Mon, 14 Dec 2020 06:47:04 +0000 (14:47 +0800)]
MA-18406 Fix panic when provision keys on boards without rpmb key

The keymaster client won't be initialized if the rpmb
key is not set, return early with error in such case
to avoid panic.

Test: provision attestation keys & certs on boards without
      rpmb key set.

Change-Id: I6f908aecafd15ab390629cb89b090c9ee817ba1e
Signed-off-by: Ji Luo <ji.luo@nxp.com>
(cherry picked from commit b999b03c3eb153a99b481e42315e048653247107)
(cherry picked from commit 8e2cacff502629d88d5dd49baae3e547728e7af7)

3 years agoMA-16954 set partition type to efi after flash gpt partition
faqiang.zhu [Tue, 14 Apr 2020 07:44:58 +0000 (15:44 +0800)]
MA-16954 set partition type to efi after flash gpt partition

If the target device have DOS partition, uboot will save the partition
type as dos partition at early stage when the driver bind the device.
After the gpt partition is flashed, uboot will try to reload the DOS
partition, instead of the the EFI partition.

In this commit, if the GPT partition is successfully flashed, set the
partition type to be PART_TYPE_EFI if necessary, so the EFI partitions
will be reloaded.

Change-Id: I6095cb56c73aecee24f76d169db89daba3783e29
Signed-off-by: faqiang.zhu <faqiang.zhu@nxp.com>
(cherry picked from commit 62becd667e5f3ebbefef796818eda78f4d0e167b)
(cherry picked from commit 358efa24b714738ce145fa60f0b4d194b68c4c49)

3 years agoMA-18325 Pad keyslot_package struct to one block size
Ji Luo [Thu, 26 Nov 2020 05:21:33 +0000 (13:21 +0800)]
MA-18325 Pad keyslot_package struct to one block size

blk_dwrite() will write data in blocks, padding the keyslot_package
struct to one block to avoid redundant data write.

Test: RPMB key set.

Change-Id: I326d7f4394d15e6e22b12c3abd6a5e2de18920cc
Signed-off-by: Ji Luo <ji.luo@nxp.com>
(cherry picked from commit 8a0deb19628d2752b516fbce00fc1b988f2e78b5)
(cherry picked from commit baaa810e604aa3afd8cf9832a5b29828d6ffc6f4)

3 years agoMA-18304 pass ramdisk address when boot up evk_7ulp
faqiang.zhu [Fri, 20 Nov 2020 05:07:13 +0000 (13:07 +0800)]
MA-18304 pass ramdisk address when boot up evk_7ulp

evk_7ulp images has normal ramdisk in boot.img and recovery ramdisk in
recovery.img.

Normal ramdisk in boot.img is used to boot up Android, ramdisk addr need
to be passed to kernel any way.

Recovery ramdisk in recovery.img is not used to boot up Android, there
is no need to pass "androidboot.force_normal_boot=1".

Change-Id: Id1e9c31035cbf65cd325c70a0aa9df05ea1d90b2
Signed-off-by: faqiang.zhu <faqiang.zhu@nxp.com>
(cherry picked from commit 3f4d826944f7f0db9251cf26f6f65014ca3f5e8a)
(cherry picked from commit 6ecfd9ed2af555f589c7cdfe32134ea1e6a41d80)

3 years agoMA-18214-1 Hard code the BT mac address for imx8mp
Ji Luo [Wed, 4 Nov 2020 12:29:01 +0000 (20:29 +0800)]
MA-18214-1 Hard code the BT mac address for imx8mp

imx8mp has serial number as all zeros, hard code the BT mac
address for such case instead of setting it by property.

Test: BT on imx8mp.

Change-Id: I99f5b49164e1fa40c7fc6ecb639c71fa89158852
Signed-off-by: Ji Luo <ji.luo@nxp.com>
(cherry picked from commit 501690cb93c4df30700c1bf40f0f2eaed2444503)
(cherry picked from commit 312109135045b450d57c3095a822db827a587be6)

3 years agoMA-18221 Fix build break for imx7ulp
Ji Luo [Thu, 5 Nov 2020 09:00:44 +0000 (17:00 +0800)]
MA-18221 Fix build break for imx7ulp

GCC for arm32 doesn't support division between signed
and unsigned integer. Clean up the code to use 'long'
for both arm32 and arm64 platforms.

Test: build on 7ulp and 8mm.

Change-Id: I21c23b1948994558237b27bfe7452e78e3d45172
Signed-off-by: Ji Luo <ji.luo@nxp.com>
(cherry picked from commit 2062183df063e0653e9e88a690764647702af7dd)
(cherry picked from commit 49aad2989b6256934b146c50af5cf26b7486d658)

3 years agoMA-18192 Only bump the rollback index when avb verify ok
Ji Luo [Fri, 30 Oct 2020 08:14:09 +0000 (16:14 +0800)]
MA-18192 Only bump the rollback index when avb verify ok

AVB verify should fail for GKI boot image but we should allow it
continue to boot in UNLOCKED state. In such case, we should not
update the stored rollback index.

This commit will update the rollback index only when the AVB
verify is OK to prevent rollback index check error.

Test: boots.

Signed-off-by: Ji Luo <ji.luo@nxp.com>
Change-Id: I82678d288edd4df6de40a1ca863ed36d3b3658a8
(cherry picked from commit ea48b544581d630bc031a7968a90b2fcf328424a)
(cherry picked from commit 8619089859b6c24f82a2f6fda9bd2c58c2e38851)

3 years agoMA-18166 Android: Fix mmc multi blk load issue
Ji Luo [Wed, 28 Oct 2020 01:12:59 +0000 (09:12 +0800)]
MA-18166 Android: Fix mmc multi blk load issue

The 'offset' can be negative number passed from fsl_read_from_partition_multi(),
don't covert 'blksz' to 'uint64_t' as it will cause overflow when the 'offset'
is negative number.

Test: mmc blk read with 'offset < 0'.

Signed-off-by: Ji Luo <ji.luo@nxp.com>
Change-Id: Id1ce8e0c748dd280d70c1722cc7d17cc9646a4bb
(cherry picked from commit 077b448679b9ad2891495c7344ba99a6c10a59fb)
(cherry picked from commit f927599650ba1fbdbe8f4887b970a4f003b0d277)