Commit Graph

50111 Commits

Author SHA1 Message Date
Andrejs Cainikovs e4c4fa35ee Update .gitignore to skip .log files 2019-06-04 14:25:01 +02:00
Andrejs Cainikovs 969cf01b7b Update .gitignore to skip .sd files 2019-06-04 14:24:13 +02:00
Andrejs Cainikovs 1583ea5c0c nmhw23: Add spi3 software SPI 2019-06-04 14:24:03 +02:00
Horatiu Vultur fbdd02057f spi: soft_spi: Fix null ptr when probing soft_spi.
When probing soft_spi the result of dev_get_parent_priv(dev) in probe
function is null ptr because the spi is on the ahb bus which has
per_child_auto_alloc_size set to 0. Therefore it would generate an Ooops
messages when accessing spi_slave structure.

The fix consist of updating the soft_spi_platdata flags inside the
.set_mode.

Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
2019-06-04 14:23:50 +02:00
Andrejs Cainikovs b8c82b4747 Add iMX8 NMHW23 build script 2019-06-04 14:23:12 +02:00
Andrejs Cainikovs be788e5b50 Add iMX8 NMHW23 firmware:
- iMX8QXP ARM Trusted Firmware (bl31)
- iMX8QX Security Controller Firmware (ahab-container)
- Custom MHW23 System Controller Unit Firmware (scfw)
2019-06-04 14:22:52 +02:00
Andrejs Cainikovs c7fb43d5ae Add iMX8 NMHW23 target 2019-06-04 14:22:06 +02:00
faqiang.zhu 0d6d880779 MA-14629 fix build warnings for varialbe initialization and type cast
initialize potential uninitialized variable with the type of"char*" to
be NULL in AVB. That "hashtree_error_mode" in code is manually specified
with a known value, the cases listed cover all potential value of
"hashtree_error_mode"

explicitly do a type cast for memcpy parameters.

Change-Id: Ie5d234422a273d6dab75585bd0d8eb81583707ca
Signed-off-by: faqiang.zhu <faqiang.zhu@nxp.com>
2019-04-18 18:49:33 +08:00
Ji Luo 87a19df5e4 MA-14511 AIY: Change the GPU reserved memory to 32M
Reserve 32M memory for GPU on AIY 1G DDR board.

Change-Id: I566a4a027982c8d4e41f280162f2f3cd67f1f5cd
Signed-off-by: Ji Luo <ji.luo@nxp.com>
2019-04-11 13:58:39 +08:00
Michael Brooks 2aa4163329 MA-14521 AIY: Explicitly set USB Switch (PTN5150A) to UFP
* The default configuration (via resistor stuffing) is DFP (host). This
means that on Type-C hosts fastboot won't work.
* Set to UFP to ensure fastboot works properly.

Change-Id: I2b63d95e08df70da43dee1f8f7bb59d1863943f4
2019-04-11 13:58:29 +08:00
Michael Brooks 7191db0835 MA-14520 AIY: Limit USB to High Speed
* There is an enumeration problem when using superspeed.
* This doesn't fix it with all hubs, but can enable fastboot to work on
some 3.0 hosts.

Change-Id: If4a603126b945bd8f84c3d6e975e1185530eb193
2019-04-11 13:58:23 +08:00
Michael Brooks 1f27791878 MA-14519 Phanbell: Explicitly set buck voltages in SPL
* Bucks 1-4 will be reconfigured via DVS in the kernel.
* Buck 5 is explicitly set to 1.0V
* Regulator lock/unlock is added, this ensures that in warm or cold
reset the values will be set.

Change-Id: I8d8be74bddbbd081030fe1762b9f9c6534c7fb77
2019-04-11 13:57:29 +08:00
Leonid Lobachev be25ff5c10 MA-14518 AIY: Enable i2c2 and i2c3 in u-boot.
Enable i2c2 and i2c3 for AIY.

Change-Id: I984e2e76e7c8929cc62088b6838c81f5dc838568
2019-04-11 13:56:03 +08:00
Breno Lima 98a6ffadea MLK-21420 crypto: fsl: blob: Flush dcache range for destination address
The blob command is not working on i.MX7D, i.MX8MQ and i.MX8MM
devices.

Due to different cache management it's necessary to flush dcache
range for destination address so data can be available in memory.

Add necessary operations in blob_encap() and blob_decap() functions.

Signed-off-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 639e5c15816c3eea0d4904a72ad175627be043d8)
2019-04-09 18:56:00 -07:00
Breno Lima d1515ca9cd MLK-21389 imx: hab: Check if IVT header is HABv4
The HABv4 implementation in ROM checks if HAB major version
in IVT header is 4.x.

The current implementation in hab.c code is only validating
HAB v4.0 and HAB v4.1 and may be incompatible with newer
HABv4 versions.

Modify verify_ivt_header() function to align with HABv4
implementation in ROM code.

Signed-off-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 33f51b401dffa393274a28f9d49a87af3eb02fe0)
2019-04-09 18:33:31 -07:00
Breno Lima 822252fdc1 MLK-21251-2 doc: imx: habv4: Fix typo in csf_additional_images.txt CSF example
The csf_additional_images.txt example should match with
mx6_mx7_secure_boot.txt guide.

Fix addresses provided in csf_additional_images.txt CSF
example.

Reviewed-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Breno Lima <breno.lima@nxp.com>
(cherry picked from commit 17c3af7a1935a40057c01459766d41ff0a19723b)
2019-04-09 18:33:24 -07:00
Breno Lima f905f893e3 MLK-21251-1 imx: hab: Fix build warnings in 32-bit targets
When building 32-bit targets with CONFIG_SECURE_BOOT and DEBUG enabled
the following warnings are displayed:

arch/arm/mach-imx/hab.c:840:41: warning: format '%lx' expects argument \
of type 'long unsigned int', but argument 3 has type 'uint32_t \
{aka unsigned int}' [-Wformat=]
   printf("HAB check target 0x%08x-0x%08lx fail\n",
                                     ~~~~^
                                     %08x
          ddr_start, ddr_start + bytes);

arch/arm/mach-imx/hab.c:845:45: warning: format '%x' expects argument \
of type 'unsigned int', but argument 3 has type 'ulong \
{aka long unsigned int}' [-Wformat=]
  printf("\nivt_offset = 0x%x, ivt addr = 0x%x\n", ivt_offset, ivt_addr);
                                            ~^
                                            %lx

Fix warnings by providing the correct data type.

Reviewed-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Breno Lima <breno.lima@nxp.com>
(cherry picked from commit 050beb8ee3fc4c690c9ce7c4f47adfc6f48dccdf)
2019-04-09 18:33:16 -07:00
Breno Lima dd058bca4a MLK-21174 mx7ulp: hab: Add hab_status command for HABv4 M4 boot
When booting in low power or dual boot modes the M4 binary is
authenticated by the M4 ROM code.

Add an option in hab_status command so users can retrieve M4 HAB
failure and warning events.

=> hab_status m4

   Secure boot disabled

   HAB Configuration: 0xf0, HAB State: 0x66
   No HAB Events Found!

Add command documentation in mx6_mx7_secure_boot.txt guide.

As HAB M4 API cannot be called from A7 core the code is parsing
the M4 HAB persistent memory region. The HAB persistent memory
stores HAB events, public keys and others HAB related information.

The HAB persistent memory region addresses and sizes can be found
in AN12263 "HABv4 RVT Guidelines and Recommendations".

Reviewed-by: Utkarsh Gupta <utkarsh.gupta@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Breno Lima <breno.lima@nxp.com>
(cherry picked from commit 0efff16579fabcf57acb9c8857afac8fb58de355)
2019-04-09 18:33:07 -07:00
Ye Li 5cc3fbe211 MLK-21400 mx6solosabre: Enable fastboot for UUU support
Enable fastboot configurations in mx6solo sabresd and sabreauto
defconfigs to support UUU. Since the DDR size on mx6solo sabre
boards is smaller, also change the fastboot buffer to 256MB.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit c482755fb22fa1a459927ed9aadf2477c42b1a59)
2019-04-09 02:46:48 -07:00
Breno Lima 625d4faf5c MLK-21386 Revert "drivers/crypto/fsl: assign job-rings to non-TrustZone"
Commit 22191ac353 ("drivers/crypto/fsl: assign job-rings to
 non-TrustZone") breaks HABv4 encrypted boot support in the
following i.MX devices:

- i.MX6UL
- i.MX7S
- i.MX7D
- i.MX7ULP

For preparing a HABv4 encrypted boot image it's necessary to
encapsulated the generated DEK in a blob. The blob generation
function takes into consideration the Job Ring TrustZone
ownership configuration (JROWN_NS) and can be only decapsulated
by the same configuration.

The ROM code expects DEK blobs encapsulated by the Secure World
environments which commonly have JROWN_NS = 0.

As U-Boot is running in Secure World we must have JROWN_NS=0
so the blobs generated by dek_blob tool can be decapsulated
by the ROM code.

As NXP BSP does not requires all job-rings assigned to
non-Secure world this commit can be safely reverted.

This reverts commit 22191ac353.

Reviewed-by: Silvano Di Ninno <silvano.dininno@nxp.com>
Signed-off-by: Breno Lima <breno.lima@nxp.com>
(cherry picked from commit 3eebc76f5571f7ce74d385235019e8eb4a6718f6)
2019-04-08 22:29:22 -07:00
Zhang Bo 57fa56f3ce MA-14501[Android] change BOOTAUX_RESERVED_MEM macro to 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>
2019-04-02 18:48:27 +08:00
Ji Luo f3e266d088 MA-14494 Support DVT AIY 1G board
Add support for DVT AIY 1G board, distinguish the board type
with the board id.
  TYPE:         ID:
  Micron 1G     0x5
  HYNIX  1G     0x3
  Micron 3G     0x1

Test: Boot on AIY 1G/3G ddr board.

Change-Id: I3c7b6ebe8bc5d4e59917fcc3947e9ebfefc940da
Signed-off-by: Ji Luo <ji.luo@nxp.com>
2019-04-01 10:28:10 +08:00
Peng Fan b22b70ff0b MLK-21291 imx8mm: evk: not restrict uart4 when enabling jailhouse
When booting dual linux with jailhouse, inmate linux will use
the 2nd uart, so not restrict access the uart for jailhouse case.

The best solution would be using SIP call to ATF, for simplicity,
directly modify the RDC register.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2019-03-29 16:58:58 +08:00
Teo Hall 77ee38dd28 MLK-21277: imx8qm: spl: Add support for container parsing on validation board
Sync support for container parsing for validation board as on MEK
boards.

Signed-off-by: Teo Hall <teo.hall@nxp.com>
2019-03-28 11:58:01 -05:00
Jacky Bai f85f740805 MLK-21214 board: imx8mm_evk: Use the default QoS setting for imx8mm_evk ddr4
previous setting can NOT meet the USB stream mode performance settting.
So use the default QoS setting on the i.MX8MM DDR4.

Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit dc9b5e2ffb1d74477c7ec766c6312f9e98afa64c)
2019-03-21 17:53:10 +08:00
Utkarsh Gupta 2330001afc MLK-20893: imx: in_le32 out_le32 preprocessor casting issue with addresses involving math
The sec_in32 preprocessor is defined as follows in include/fsl_sec.h file:
When address "a" is calculated using math for ex: addition of base address and an offset, then casting is applied only to the first address which in this example is base address.

caam_ccbvid_reg = sec_in32(CONFIG_SYS_FSL_SEC_ADDR + CAAM_CCBVID_OFFSET)
resolves to:
caam_ccbvid_reg = in_le32((ulong *)(ulong)CONFIG_SYS_FSL_SEC_ADDR + CAAM_CCBVID_OFFSET)
instead it should resolve to:
caam_ccbvid_reg = in_le32((ulong *)(ulong)(CONFIG_SYS_FSL_SEC_ADDR + CAAM_CCBVID_OFFSET))

Thus add parenthesis around the address "a" so that however the address is calculated, the casting is applied to the final calculated address.

Bug introduced by commit 79e90af14a ("MLK-18044-2: crypto: caam: Fix build warnings pointer casting").

Signed-off-by: Utkarsh Gupta <utkarsh.gupta@nxp.com>
Reviewed-by: Horia Geanta <horia.geanta@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 5d10d1cab052f8af4fd00640e09642aa0a596922)
2019-03-20 02:00:56 -07:00
Adrian Negreanu 15ecd669ac env variable to specify androidboot.storage_type
The boota command boots an Android already written to mmc/emmc.
It calls get_boot_device() to figure out where to look for Android;
but when a board is booted over serial, get_boot_device() returns
an invalid boot mode.

Explicitly setting the storage_type will enable boota on
a board booted over serial.

   FB: ucmd setenv storage_type emmc
   FB: ucmd boota

Signed-off-by: Adrian Negreanu <adrian.negreanu@nxp.com>
2019-03-20 09:17:31 +02:00
Haibo Chen 8915891b77 MLK-21176 mmc: correct the HS400 initialization process
After the commit b9a2a0e2e9 ("mmc: Add support for downgrading
HS200/HS400 to HS mode"), it add a parameter in mmc_set_card_speed()
which indicates that the HS200/HS400 to HS downgrade is happening.

During the HS400 initialization, first select to HS200, and config
the related clock rate, then downgrade to HS mode. So here also need
to config the downgrade value to be true, make sure in the function
mmc_set_card_speed(), after switch to HS mode, first config the
clock rate, then read the EXT_CSD. Otherwise read EXT_CSD in HS mode
at wrong clock rate, e.g. 200MHz, may lead to uncertain result.

Test on i.MX8QM MEK board, some Micron eMMC will stuck in transfer
mode in this case, and USDHC will never get data transfer complete
status, cause the uboot hang.

Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
(cherry picked from commit 0ba8e1c6efa2e9c34c9b54105d6c50ee293ec1d7)
2019-03-19 11:19:54 +08:00
Marek Vasut c421756879 mmc: Do not poll using CMD13 when changing timing
When using CMD6 to switch eMMC card timing from HS200/HS400 to HS/legacy,
do not poll for the completion status using CMD13, but rather wait 50mS.

Once the card receives the CMD6 and starts executing it, the bus is in
undefined state until both the card finishes executing the command and
until the controller switches the bus to matching timing configuration.
During this time, it is not possible to transport any commands or data
across the bus, which includes the CMD13.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
(cherry picked from commit 5dbade95cb7ebc1f3a309b00430ebf2b466d7aba)
Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
2019-03-19 11:19:42 +08:00
Marek Vasut 4c95f33890 mmc: Add support for downgrading HS200/HS400 to HS mode
The mmc_select_mode_and_width() function can be called while the card
is in HS200/HS400 mode and can be used to downgrade the card to lower
mode, e.g. HS. This is used for example by mmc_boot_part_access_chk()
which cannot access the card in HS200/HS400 mode and which is in turn
called by saveenv if env is in the MMC.

In such case, forcing the card clock to legacy frequency cannot work.
Instead, the card must be switched to HS mode first, from which it can
then be reprogrammed as needed.

However, this procedure needs additional code changes, since the current
implementation checks whether the card correctly switched to HS mode in
mmc_set_card_speed(). The check only expects that the card will be going
to HS mode from lower modes, not from higher modes, hence add a parameter
which indicates that the HS200/HS400 to HS downgrade is happening. This
makes the code send the switch command first, reconfigure the controller
next and finally perform the EXT_CSD readback check. The last two steps
cannot be done in reverse order as the card is already in HS mode when
the clock are being switched on the controller side.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
(cherry picked from commit 523f613609545252f08f01f346ba4b0403f78b7c)
Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
2019-03-19 11:19:29 +08:00
Jacky Bai 128b1aaf8d MLK-21068 board: imx8mm_evk: update the lpddr4 timing config
Update the lpddr4 timing config to align with the ddr tool

Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit a1433dec3a03a6c944b61600e7b317e2a83f2981)
2019-03-18 17:39:44 +08:00
Ye Li 4c530d1979 MLK-21168 imx: Set timeout of virtual driver service connection to 2s
The normal ready time of M4 side is less than 1s, so we can use
2s as the timeout of connection.  The current value is 10s, which seems
a little long if M4 SRTM service does not run.

Signed-off-by: Ye Li <ye.li@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 4792d8967d3c631d055c133303bb6385b822a3ca)
2019-03-18 02:06:53 -07:00
Ye Li 487875a832 MLK-21165 imx8: Workaround LPCG HW issue
There are two LPCG HW issues reported in TKT322331. Add workaround
for them in u-boot.
1. Back to back LPCG write access must have 4x DSC cycle interval.
2. When DSC clock is gated, LPCG write access may be missed due to
   the edge detect is not see by DSC. Two writes shall be performed
   to re-enable the clock if DSC clock is gated

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 96186ca0048e6ae261176e5f3ebf02be09bacb08)
2019-03-18 02:06:44 -07:00
Ye Li 47096e5310 MLK-21158 imx8mm: Add workaround for arm timer stopped issue
When switching ARM root clock source from ARM PLL to 24M OSC,
found the ARM timer may stop on few chips during stress reboot test.
The system counter is still increasing, but ARM timer is stopped.

Add a workaround that switch ARM clock source from ARM PLL to
Sys PLL2 500M clock instead of 24M OSC. Stress reboot test is
passed on all failed chips.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 74770228976c013a3e289b21f6e27334ea97bee4)
2019-03-15 06:32:58 -07:00
Luo Ji 9d6623f13f MA-14379 [coverity] Resource leak (RESOURCE_LEAK)
Fix coverity issue: CID 2970630: Resource leak (RESOURCE_LEAK)
leaked_storage: Variable cdns going out of scope leaks the storage
it points to.

Memory allocated by devm_kzalloc() won't be freed automatically in
u-boot, free the memory manually here.

Test: Coverity scan pass.

Change-Id: I3000a2385941cef3b8b7e01611cfdc999971a4ca
Signed-off-by: Luo Ji <ji.luo@nxp.com>
2019-03-14 17:24:21 +08:00
Luo Ji dfdf60c69c MA-14374 [coverity] Fix coverity issues in fsl_avbkey.c
Fix coverity issues as:
  CID 5899697: Dereference before null check (REVERSE_INULL)
  CID 3616594: Unchecked return value (CHECKED_RETURN)
  CID 3616598: Resource leak (RESOURCE_LEAK)
  CID 3616591: Resource leak (RESOURCE_LEAK)

Test: Coverity scan pass.

Change-Id: I70abb41c3cd825c6eec43dc7e5baec716ae46680
Signed-off-by: Luo Ji <ji.luo@nxp.com>
2019-03-14 17:24:19 +08:00
Luo Ji 682826b332 MA-14370 [coverity] Buffer not null terminated
Fix coverity issue:
  CID 43787: Buffer not null terminated (BUFFER_SIZE_WARNING)
  buffer_size_warning: Calling strncpy with a maximum size argument
  of 32 bytes on destination array sdev.name of size 32 bytes might
  leave the destination string unterminated.

Test: Coverity scan pass.

Change-Id: Ib10e631bab893cb9cd1484082229f806b02849ba
Signed-off-by: Luo Ji <ji.luo@nxp.com>
2019-03-14 17:24:18 +08:00
Luo Ji 026360c2db MA-14322 [coverity] Uninitialized scalar variable
Fix coverity issue: CID 1477258: Uninitialized scalar variable (UNINIT)
uninit_use_in_call: Using uninitialized value txbuf when calling __fswab32.

Test: Coverity scan pass.

Change-Id: If57f70c272ef49a6636a59ae3b5dcc5430fd1753
Signed-off-by: Luo Ji <ji.luo@nxp.com>
2019-03-14 17:24:13 +08:00
Han Xu c76785f611 MLK-21022: imx8qxp: change the mtd rootfs index number
change the mtd rootfs partition index number for i.MX8QXP lpddr4 validation board.

Signed-off-by: Han Xu <han.xu@nxp.com>
(cherry picked from commit 2d5923f215dfcc74b187e3b7ec4af1d0c9462d45)
2019-03-13 15:33:05 -05:00
Ji Luo d3ddc1970d MA-14318-4 Support dual bootloader for xen
Add defconfig file to support dual bootloader for xen.

Test: build and boot on imx8qm_mek.

Change-Id: I21e372b71a9b25e4cbf71cf7f41cfd87296b9afe
Signed-off-by: Ji Luo <ji.luo@nxp.com>
2019-03-12 19:12:27 +08:00
Ye Li c20b7761db MLK-21103 imx8: Fix build break on ARM2 SPL
Meet the build error below with ARM2 SPL defconfig
arch/arm/mach-imx/imx8/image.c: In function ‘spl_nor_get_uboot_base’:
arch/arm/mach-imx/imx8/image.c:224:13: error: ‘CONFIG_SYS_UBOOT_BASE’
undeclared (first use in this function)
if (end <= CONFIG_SYS_UBOOT_BASE)

The root cause is we did not add SPL NOR support for ARM2 SPL, but
the codes still use the CONFIG_SYS_UBOOT_BASE.

Fix the issue by adding SPL device support config for each device
relevant function.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit a96fd317601db7f21402e5f74fe24653e2af8ae7)
2019-03-12 04:06:23 -07:00
Ji Luo e0343ea466 MA-14318-1 Support dual bootloader for xen
Trusty is not supported for xen so we don't need to check
the keyslot package or rollback index in spl. Reassign the
dram address for spl and u-boot to avoid conflicts.

Support serial init functions to enable debug console
in spl when xen is running.

Test: Boot and A/B slot switch on imx8qm_mek.

Change-Id: If6829252f1ec2e32255f951715c8747181951fd0
Signed-off-by: Ji Luo <ji.luo@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
2019-03-12 17:33:39 +08:00
Luo Ji 40f95bfc01 MA-14280 [coverity] Fix resource leak in libavb
Fix resource leak in libavb, coverity issue:
  CID 5899691: Resource leak (RESOURCE_LEAK) leaked_storage: Variable
  hash_out going out of scope leaks the storage it points to.

  CID 5899689: Resource leak (RESOURCE_LEAK) leaked_storage: Variable
  hash_buf going out of scope leaks the storage it points to.

  CID 5899688: Uninitialized pointer read (UNINIT) uninit_use: Using
  uninitialized value digest.

  CID 5899692: Structurally dead code (UNREACHABLE) unreachable: This
  code cannot be reached: goto out;

Test: Coverity scan pass.

Change-Id: If8e26fdd383c32a9160775006621830b42c0f07e
Signed-off-by: Luo Ji <ji.luo@nxp.com>
2019-03-12 14:50:52 +08:00
Luo Ji 27deefcad9 MA-14283 [coverity] Fix uninitialized scalar variable
Fix coverity issue: CID 5433686: Uninitialized scalar variable (UNINIT)
uninit_use_in_call: Using uninitialized value value when calling
call_imx_sip_ret2.

Test: coverity scan pass.

Change-Id: Id89f8f6f69fb944179b34dca4146fd7636505681
Signed-off-by: Luo Ji <ji.luo@nxp.com>
2019-03-12 14:50:25 +08:00
Luo Ji 4b28b03dbb MA-14293 [coverity] imx8: Fix double free issue
Fix coverity issue CID 3298992: Double free (USE_AFTER_FREE)
double_free: Calling free frees pointer rsrc_data which has
already been freed.

Check the rsrc_data buffer before free to avoid free NULL
pointer.

Change-Id: I781e87667a5d3bbe25ec12fbae8e3958d9b29244
Signed-off-by: Luo Ji <ji.luo@nxp.com>
2019-03-12 14:50:19 +08:00
Zhang Bo ff76415a1b MA-14296-2[Android]Enable virtual I2C for imx8qxp to support fastboot function
The enable pin of USB is controlled by i2c IO expender which is
controlled by M4 image. Add macro to enable virtual i2c function. It
will send i2c message to M4 side to enable USB phy chip.

Change-Id: Ib7ed710d293b002526be3bd233921797eb9c6d41
Signed-off-by: Zhang Bo <bo.zhang@nxp.com>
2019-03-12 13:41:19 +08:00
Zhang Bo 0bba42ebb3 MA-14296-1[Android]Change uboot malloc size and change hdmi fw load address
Image size is about 30M and 0x8028000+30M has overlaped with malloc
memory. malloc memory end address is 0x88000000 and need to decrease the
malloc size to reserve enough memory for loading kernel and dtb image.

The memory address 0x90000000~0x92000000 has been reserved for M4 in
SCFW. Need to change the HDMI firmware loading address to 0x84000000
which is aligned with BSP image.

Change-Id: I6f9b6e05a9c9d8b5f7d385632a0ef54a0c20667d
Signed-off-by: Zhang Bo <bo.zhang@nxp.com>
2019-03-12 13:41:19 +08:00
Leonard Crestez 4dc141f821 MLK-20958-2 imx8: Replace SC_R_LAST with SC_R_NONE in DTB
We are currently using SC_R_LAST as a marker for imx8 power domain tree
nodes without a resource attached. This value is compiled into dtb as
part of the linux build and used by uboot.

The SC_R_LAST constant changes frequently as SCFW resources are added
(by design) and every time we need to update linux and uboot headers
together or boot can fail.

Fix this by replacing SC_R_LAST usage with a new constant SC_R_NONE
defined to be 0xFFF0.

Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 93f302a6642adedfdd6336b22d08f32284539e35)
2019-03-11 13:41:58 +02:00
Leonard Crestez fc2798fc55 MLK-20958-1 imx8: Sync SCFW API to commit ef4a5057
Also fixes MLK-21051: Replace manually added pads with defines from SCFW
export package.

Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
Acked-by: Fugang Duan <fugang.duan@nxp.com>
(cherry picked from commit cc76365cb15dc9d4ba3983ec93094c6017e12d83)
2019-03-11 13:41:58 +02:00
Ji Luo 3d2b5c0dae MA-14289-1 Revert "imx8q: Move spl to dram to fix reboot issue"
Move spl to 0x8000_0000 will cause cpu1 ~ cpu3 jump to spl when
boot/reboot, revert this patch.

This reverts commit 7d111f4c8bac25c234b0fc24af885421ce8bb188.

Change-Id: I9adcd980b42a7539d6309cafaabff9d079ca993d
2019-03-08 16:41:05 +08:00