Currenlty U1 and U2 low power modes are allowed in device mode.
Allowing U1 and U2 low power modes during data transfers in
device mode is causing U1 exit failure on some USB3 host: which
will transite to SS.inactive instead of U0, then host will send
warm reset and ultimately result in reenumeration. This is observed
on UUU tool with some PC host. Hence disable U1 and U2 low power
modes for now.
USB3 spec 7.5.10.4.2 Exit from Recovery.Configuration
The port shall transition to eSS.Inactive when the following
conditions are met:
1. Either the Ux_EXIT_TIMER or the 6-ms timer
(tRecoveryConfigurationTimeout) times out.
2. For a downstream port, the transition to Recovery is not to
attempt a Hot Reset.
Signed-off-by: Li Jun <jun.li@nxp.com>
(cherry picked from commit ae0cdc741f7313398539f7b576ced73871f6cd71)
The spl is located at ocram which will be lost when suspend/resume,
partition reboot will make A core reboot from the start address of
ATF, which blocks dual bootloader feature on Android Auto.
Move the spl to dram and make the partition reboot from spl to fix this
issue. The memory map will be changed to:
SPL: 0x0000_0000 --------> 0x8000_0000
ATF: 0x8000_0000 --------> 0x8004_0000
U-boot: 0x8002_0000 --------> 0x8006_0000
Test: reboot ok on imx8qm/imx8qxp.
Change-Id: I49e8be51bf427dd00eb7507de22a787c6f6e1582
Signed-off-by: Ji Luo <ji.luo@nxp.com>
The HDMI digital PLL, bus clock and core clock need to change to improve the
firmware loading time. The clock are now set to 800 MHz for DPLL, 200 MHz for
HDMI core, and 100 MHz for HDMI bus.
Signed-off-by: Oliver Brown <oliver.brown@nxp.com>
Currently when SPL load 3rd container, it will do the authentication
unconditionally. But when running SPL on Xen, the seco authentication
is not supported, and cause failure in loading.
Change the parser codes to depend on CONFIG_AHAB_BOOT to do the
authentication.
Signed-off-by: Ye Li <ye.li@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit e38169a27fbe052561c5b369500e80477760ec3e)
Create new config file based on "imx8mq_aiy_android_defconfig"
and enable the CONFIG_IMX_TRUSTY_OS to supprt Trusty OS for AIY.
Also enlarge the malloc poll to 96 MB because calculate hash
with CAAM will consume more heap memory.
Test: Trusty OS boots up and CAAM functions work.
Change-Id: Ia4bdf4c32617cb4d2951b63f34f3a4a83f4af1b5
Signed-off-by: Ji Luo <ji.luo@nxp.com>
Trusty OS will check and require the memory passed from non-secure world
is inner shareable. Change the memory attribute as PTE_BLOCK_INNER_SHARE
in u-boot to meet the requirement.
Test: build and boot on imx8qm/imx8qxp.
Change-Id: I1aac9b430ecc0fa94f9a1f6dd519b34ce6fef7bd
Signed-off-by: Ji Luo <ji.luo@nxp.com>
Check the return values for SCFW APIs and print error logs
if the return value is not "SC_ERR_NONE".
Test: boot on imx8qm.
Change-Id: Ic7008bd2656375875e77dd3c922dafb1be145357
Signed-off-by: Ji Luo <ji.luo@nxp.com>
On iMX8MM, the V flag in TRISTR register only reflect the state of SNSR
value, not the calibrated TEMP value. So checking this flag is not
reliable. Per IC suggestion, change to read the TEMP/AVG_TEMP directly
and check whether it in valid range 10-125C.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit fe41c5fa6af88cce7f5a9723c82d6ad4e61357ce)
Update SCFW API to v1.3 at below commit. A new API sc_pm_set_boot_parm
is added.
commit c5ef21f894de0ac8329f0fe540331a272fcd1461
Author: Chuck Cannon <chuck.cannon@nxp.com>
Date: Tue Feb 26 15:36:53 2019 -0600
SCF-352: Add more to SECO test.
Signed-off-by: Chuck Cannon <chuck.cannon@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit e79209e4174054bb328bae441bf8ab3c1312ee4e)
Set the default environment "panel" as "NULL" to fix the
LVDS0-HDMI not work issue.
Test: LVDS0-HDMI works fine on imx8qm_mek.
Change-Id: I115b0a185717762af911fe1e9237fb26ecbb7e3e
Signed-off-by: Ji Luo <ji.luo@nxp.com>
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)
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)
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)
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)
When flexspi is assigned to M4 for XIP, its power up/down will fail.
This is expected so don't need to give warning.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 0803b4a9d4074a5bb101d194633cbdd7510a1e9a)
The CONFIG_QSPI_BOOT has been removed from SPL flexspi build, because
we have to change the u-boot ENV to SD/MMC, and this configuration will
set relevant configurations.
But we don't clean up CONFIG_QSPI_BOOT for SPL completely, SPL still has
some places using it and cause problem to flexspi boot.
Using CONFIG_SPL_SPI_SUPPORT to replace the CONFIG_QSPI_BOOT.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 0491bd4ba21ad620b4c514323a7d6b8a9e10325c)
If resource is not owned, we ignore sid settings.
When support CM41 + android auto on xen, some resources
are owned by CM41, when CM41 releases those resources,
CM41 will program SID for those resources.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Flynn xu <flynn.xu@nxp.com>
(cherry picked from commit cd0ec61b235929d75965c43e82127b73e73e1697)
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)
Update the ddr training code to work with the atf 2.0.
Test: Build and boot on imx8mq aiy 3G board.
Change-Id: I8546c34cfa4aeeed819f7797f8362676e420b41f
Signed-off-by: Ji Luo <ji.luo@nxp.com>
Need to enable SPL NOR support for working with M4 XIP image. Missed
it in previous patch.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 51f7d1e0c46e67355f8361c1bac8322e8c6788a8)
When M4 is booted by ROM, we have to enable RPMSG in kernel, so need
to select the -rpmsg.dtb. If M4 is not enabled, use default kernel dtb.
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 8a57be45e18295ce1b19799723775cf5b205281d)
When using fdt_next_node, the depth variable needs being initialized
first, otherwise we many get undefined depth.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 1ae3d2d3859c5f2610c74cd192da2657e2600aff)
Remove trusty support in domu, since trusty EL3 not ready to handle
tipc being interrupt by xen. But we still leave the memory for trusty,
then it could be easy to add trusty back.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Flynn xu <flynn.xu@nxp.com>
(cherry picked from commit 1623426811bdf59c3d5dcab2be20293910a9bc5d)
The iMX8MQLite new part will not disable DCSS in fuse. So change
the codes to check the DCSS fuse before disable relevant FDT nodes
and u-boot HDMI splash screen.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 9e6ab0397b8d94de8b904250884726e58633066b)
When the temperature is out of sensor's range, the Valid bit won't be
set in TRITSR register. So the polling loop won't go out.
Change the codes to retry 10 times with 100ms interval for the Valid bit.
If the timeout, we give a warning for the invalid data.
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Bai Ping <ping.bai@nxp.com>
(cherry picked from commit 7ea2168e06d4f77a872f51a167ee1ed6bf2b0632)
The imx6ul/ull/ulz EVK boards enable eMMC fastboot with ack by default bootcfg.
So when using uuu to burn eMMC, we have to set ack to 1 in "mmc partconf" command.
Add this env for these board, so that uuu can use it to solve the problem by
executing "if env exists emmc_ack; then ; else setenv emmc_ack 0; fi;" to
use the emmc_ack at runtime.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 9a4a67ed9f07e99cf284fe2929c4f12809b5884b)
Current SPL code only support ONFI-compatible NAND, porting the code
from nand_base.c to support legacy full id NAND chips, such as Toshiba
TC58NVG2S0H.
Signed-off-by: Han Xu <han.xu@nxp.com>
(cherry picked from commit 4086c6b9556acbec2a8748578eb4a9e719ab4ae7)
The hash buffer is allocated on stack if we don't use
CAAM to accelerate the hash calculation, don't free
the hash buffer in such case.
Test: Boot ok on imx8qm.
Change-Id: I3b3dcc0e8359848b4f9c58c802d51f0a76931e5e
Signed-off-by: Ji Luo <ji.luo@nxp.com>
Grant user the permission to change the bootargs can be very
dangerous, so add config 'CONFIG_APPEND_BOOTARGS' to guard the
bootargs appending feature.
Test: bootargs can't be appended if "CONFIG_APPEND_BOOTARGS" is
not set.
Change-Id: I6d6879415ca251c806b56490290e5032aef24277
Signed-off-by: Ji Luo <ji.luo@nxp.com>
The A/B slot is chosen at spl stage and should be kept up to
u-boot stage. Decrease slot retry count will cause slot switch
when the slot only has one chance left.
Set the 'bootloader_verified' flag when current slot is running the last
chance at spl, u-boot will treat the slot as bootable if the
'reserved' flag is set even the retry count exhausted.
Test: Slot not switch during 7 times reboot try.
Change-Id: I7ae84b2ce683300a1bb332606cd58e48483214ea
Signed-off-by: Ji Luo <ji.luo@nxp.com>
During AVB verify, CAAM will be invoked to calculate the hash
of boot.img and dtbo.img. ALLOC_CACHE_ALIGN_BUFFER() supports
allocate cache aligned buffer on *stack*, which may cause
'dirty' dcache data be flushed to dram after CAAM operations
complete.
Use memalign() to allocate cache aligned buffer on *heap* to
fix this issue.
Test: 1200 times reboot test on imx8qm and 2300 times reboot
on imx8qxp.
Change-Id: I8f86248df318093d44a46dcab76306377898766e
Signed-off-by: Ji Luo <ji.luo@nxp.com>
When compiling with android toolchain, there is an instruction
"str q0, [x8],#16", but x8 is not 16bytes aligned,
this instruction will trigger sync abort.
So, following Linux kernel, only use general regs for arm64.
If not, compiler may use simd registers Q[x]. We need to avoid
using simd registers in U-Boot, because load/store Q[x] has
restriction that 128bits aligned when str/ldr.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 186ccd8de53f986c5913432638dfaca9bdc97e89)
(cherry picked from commit 8f3f0d339783e066f7815408949677b62e465b62)
To U-Boot on DomU, the lpuart0 is replaced with a xen paravirtual
consol driver, but reused the previous lpuart node. However
there is an power-domains entry in lpuart0 which will call
power_domain_on and failed to probe xen paravirtual driver,
because of recent change:
commit 8524ca764d8f("MLK-20945-2 dm: device: Check the power up result in probe ")
So remove the power-domains entry in lpuart0 to let DomU U-Boot could
output again.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Flynn xu <flynn.xu@nxp.com>
(cherry picked from commit 38155100481a07e961f375052241d9d03e20a899)
According to iMX8MM DRAM PLL spec, the Fvco range is from 1600Mhz to 3200Mhz,
and (Fin / P) range is from 6Mhz to 25Mhz. However, our current PLL settings
violates the spec.
This patch changes the dividers to meet the spec requirement.
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Bai Ping <ping.bai@nxp.com>
(cherry picked from commit 3b303840f625121c08898f4c43cf29cf2a2d0170)
Update MEK SPL configs to enable SPL NOR support and change ENV to
SD as default.
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit f21f2571befdad09b9c9df4fe1fc8e27cf315019)
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)
For fspi build, we will enable both SPL NOR support and SPL SPI
support. SPL will dynamically check the resource owner then
select corresponding boot device.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 675cc6031033fbe5e7d8cfe01ebe1dedfd6c1b96)
Since FSPI is assigned to M4 partition, A core only can read it from its
memory-map address. So we have to enable SPL NOR which won't access
flexspi driver.
Update SPL container parser for the RAW NOR support.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 7ea7a16fd892558098fb8cbea134ac275d1220d3)
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)
If a device has relevant power domain, we will check the power up
result in probing the device. If the power up is failed, the device_probe
will return failure immediately.
The only exception is the new FLAG (DM_FLAG_IGNORE_POWER_ON) is set by driver
to indicate ignore the power up result.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 8524ca764d8fbd05da1593abfed62bb075c50cd4)
When fspi is assigned to M4, we have to let the fspi probe failed when
its power domain is failed to power up. Because not all devices have power
domain (for example, external devices on the board). Current checking
resource owner in power domain probe is not good, change to check it in
power on.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit b62b82ad595a744f07306db4b88d644ae024872a)
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)
Current signed OS container loading address is 0x88000000. It conflicts
with DDR memory reserved for M4. If we build image with ALT_CONFIG enabled.
SCFW will assign that memory to M4. Then authentication to kernel image
will have problem. So modify to new address 0x98000000 which is safe.
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 545b972a59c86e2b45b40e53a8e6c13f79e3e265)
Check the OS container image address is belonged to valiad DRAM memory
before accessing it to avoid u-boot crash on invalid address.
Also refine the error print.
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit f40dc07b3df9ad71ea501c77a19924361b133de7)
The HDMI digital PLL, bus clock and core clock need to change to match the
settings used by the Linux driver. This allows the SECO to start and
initialize the HDMI/DP firmware.
Signed-off-by: Oliver Brown <oliver.brown@nxp.com>
(cherry picked from commit d2713d11afc35bc2ce546f9bd065cc7477ee65cc)
Add firmware athentication to the hdp and hdprx load functions.
If hdp_authenticate_fw is set to yes, the hdp tx firmware is athenticated.
If hdprx_authenticate_fw is set to yes, the hdp rx firmware is athenticated.
Signed-off-by: Oliver Brown <oliver.brown@nxp.com>
(cherry picked from commit 6c0246888012c50127b40f1ab6fa6d581f725f7a)
Update to latest SCFW API with below commit. Add version API and
remove some resource ids.
commit 004247e14afc74a21d65569415c4b2e35bfaabc3
Author: Ranjani Vaidyanathan <ranjani.vaidyanathan@nxp.com>
Date: Thu Feb 14 14:55:12 2019 -0800
SCF-341 Fix bug in setting large slice clock divider
Incorrect mask was applied when clearing out the bits in the
DSC large slice divider.
Signed-off-by: Ranjani Vaidyanathan <ranjani.vaidyanathan@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 745f2e597613e96f1ac630e842faafdc060ee029)
Since commit cf2acc5b7c ("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)
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)
The current U-Boot implementation is not decoding the verify image message
response.
=> ahab_status
Lifecycle: 0x0020, NXP closed
SECO Event[0] = 0x0088F100
Starting in SECO FW v0.2.0 engineering release an invalid image integrity
is logged as an event in open mode.
Update U-Boot ahab_status command to decode this event.
Signed-off-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 96a192eb1d09fbed0e7e544fa7cc4f9d83d4acac)