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>
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)
On iMX8MM, the default value of TMU registers TCALIV and TASR need
be loaded from fuse. HW won't do this, it expect SW loads them before
using TMU.
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Bai Ping <ping.bai@nxp.com>
Due to dcss is disabled on iMX8MQLite, the hdmi won't work, we have
to disable all hdmi relavent nodes. The sound-hdmi-arc is missed in
previous patch.
Signed-off-by: Ye Li <ye.li@nxp.com>
Add support for fastboot variable 'at-vboot-state', it's composed
by 6 sub-variable: 'bootloader-locked', 'bootloader-min-versions',
'avb-perm-attr-set', 'avb-locked', 'avb-unlock-disabled' and
'avb-min-versions'.
Test: All 'at-vboot-state' variables are returned
correctly on imx7d_pico and AIY.
Change-Id: Ibb855cbcc7c41657af62dafb98a96c4dfb96ef22
Signed-off-by: Ji Luo <ji.luo@nxp.com>
When running with OPTEE, the MMU table in u-boot does not remove the OPTEE
memory from its settings. So ARM speculative prefetch in u-boot may access
that OPTEE memory. Due to trust zone is enabled by OPTEE and that memory
is set to secure access, then the speculative prefetch will fail and cause
various memory issue in u-boot.
The fail address register and int_status register in trustzone has logged
that speculative access from u-boot.
Signed-off-by: Ye Li <ye.li@nxp.com>
Stop the usb device controller before enter kernel, this is required
to make kernel can properly init usb controller with it's in stopped
state.
Suggested-by: Ye.Li <ye.li@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
Power down the A53 cores for dual core and single core iMX8MM parts
to save power.
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
iMX8MM family has several variant parts below.
Add CPU type and relevant updates
i.MX 8M Mini Quad Full featured, 4x A53
i.MX 8M Mini QuadLite No VPU, 4x A53
i.MX 8M Mini Dual Full featured, 2x A53
i.MX 8M Mini DualLite No VPU, 2x A53
i.MX 8M Mini Solo Full featured, 1x A53
i.MX 8M Mini SoloLite No VPU, 1x A53
Signed-off-by: Ye Li <ye.li@nxp.com>
Enable RTC in bootloader to avoid rtc time less than jiffies time
when linux first bootup after RTC lose power.
It will cause the issue as
MA-9554[Android_6DL_SD]RTC: Sometimes the RTC reset to the initial
time 1970 after softare reboot the first time. 40%
Change-Id: I048a148003241f73345aeb8ff0fda8fc328c0efb
Signed-off-by: Zhang Bo <bo.zhang@nxp.com>
CPU 2/3 are fused on iMX8MD, power down the two cores in SPL to
save power.
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Since VPU/DCSS/HDMI are disabled on iMX8QLite, the CPU core 2/3 are disabled
on iMX8MD, we have to update kernel DTB to disable relevant nodes. The MIPI-DSI
can input from DCSS or LCDIF, so we need to check the input in DTB and only
Signed-off-by: Ye Li <ye.li@nxp.com>
iMX8MQ has two variant versions: iMX8MD and iMX8MQLite. Add dummy CPU ID
for these two, and check the fuses to get correct versions.
Signed-off-by: Ye Li <ye.li@nxp.com>
We read the ROM version to determine the CPU revision before B1 chip.
The rom version is 4 bytes word, it has major version at low byte,
minor version at second byte.
On B0.1 chip, the value is 0x1020 not 0x20, if reading the word and comparing
with 0x20, the result is wrong.
Fix the issue by only reading the lowest byte for major version.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 8d0812e63155cca91ecb78c630a450e7d5e5fd00)
The mscale B1 uses OCOTP_HW_OCOTP_READ_FUSE_DATA register for chip id.
It returns a magic number 0xff0055aa.
Update get_cpu_rev to support this way, also enable OCOTP clock to allow
access OCOTP register.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 866631c2140b9352c6f74ec36d1a51fea40c0445)
Set trustzone region 0 to allow both non-secure and secure access when trust zone is enabled.
We found USB controller fails to access DDR if the default region 0 is secure access
only.
Signed-off-by: Ye Li <ye.li@nxp.com>
Enable TZASC on i.MX 8mm.
There is a need on 8MM to enable
the BYPASS ID SWAP bit (GPR10 bit 1) in order
for GPU not to generated AXI bus errors.
Signed-off-by: Silvano di Ninno <silvano.dininno@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
In file included from arch/arm/mach-imx/imx8m/soc.c:11:0:
arch/arm/mach-imx/imx8m/soc.c: In function ‘imx_gpc_set_m_core_pgc’:
./arch/arm/include/asm/io.h:44:28: warning: cast to pointer from integer of differen t size [-Wint-to-pointer-cast]
#define __arch_getl(a) (*(volatile unsigned int *)(a))
^
./arch/arm/include/asm/io.h:122:31: note: in expansion of macro ‘__arch_getl’
#define readl(c) ({ u32 __v = __arch_getl(c); __iormb(); __v; })
^~~~~~~~~~~
arch/arm/mach-imx/imx8m/soc.c:427:8: note: in expansion of macro ‘readl’
val = readl(GPC_BASE_ADDR + offset);
^~~~~
./arch/arm/include/asm/io.h:49:29: warning: cast to pointer from integer of differen t size [-Wint-to-pointer-cast]
#define __arch_putl(v,a) (*(volatile unsigned int *)(a) = (v))
^
./arch/arm/include/asm/io.h:117:48: note: in expansion of macro ‘__arch_putl’
#define writel(v,c) ({ u32 __v = v; __iowmb(); __arch_putl(__v,c); __v; })
^~~~~~~~~~~
arch/arm/mach-imx/imx8m/soc.c:432:2: note: in expansion of macro ‘writel’
writel(val, GPC_BASE_ADDR + offset);
^~~~~~
arch/arm/mach-imx/imx8m/soc.c: In function ‘imx8m_usb_power’:
arch/arm/mach-imx/imx8m/soc.c:453:16: warning: unused variable ‘ret’ [-Wunused-varia ble]
unsigned long ret;
^~~
Signed-off-by: Li Jun <jun.li@nxp.com>
Call the TRNG init function at the end of arch_cpu_init()
Concerned SoCs are: i.MX6, i.MX7 and i.MX8M
Signed-off-by: Aymen Sghaier <aymen.sghaier@nxp.com>
Porting the FSL android fastboot features from imx u-boot v2017.03 to
support all SoCs: imx6/imx7/imx7ulp/imx8/imx8m
Signed-off-by: Ye Li <ye.li@nxp.com>
like for i.MX 8mq ATF passes as argument to u-boot
the start and the length of the BL32 firmware.
u-boot uses this information to adjust the size of the DDR for linux.
Signed-off-by: Silvano di Ninno <silvano.dininno@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit e9ec5ea8dbe3d12b40ba22fe36400cfe98e1bd44)
Enable the OTG power on, add clock fuction and USB base address.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit d4f12cd92b18283daca35b35339a96c557f5127c)
Using the cpu chip id in DIGPROG registers 0x824110
Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 330051b4fbcdda201b67a94e72345ec47bd85a96)
To i.MX8MM SCTR clock is disabled by ROM, so before timer init
need to enable it.
To i.MX8MQ, it does not hurt the clock is enabled again.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 2347541e9e79f833716fe88f7de860b5704b5e48)
i.MX8MM supports larger DRAM space beyond 4GB compared with i.MX8MQ.
The changes does not hurt i.MX8MQ, so let's share the same value.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit b1f5c76afc593952fbeba1bf299207d3178f6dc4)
If TEE is enabled according to rom_pointer[0,1] passed to BL33
from ATF, uboot need to add the optee node in dts to let
Kernel could probe the TEE driver.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Add some SOC level codes and build configurations to use HAB lib for
CONFIG_SECURE_BOOT, like adding the SEC_CONFIG fuse, enable fuse driver,
CAAM clock function, and add CAAM secure RAM to MMU table.
The FSL_CAAM is temporally not enabled for iMX8M when CONFIG_SECURE_BOOT is set,
because we don't need the CAAM driver for SPL.
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit a0cba5678b10827bc4b5e4fb2e40945a5c332baa)
ATF will power off all PUs at default, so for USB, we enable
its PU power for both host and device modes in board_usb_init and
disable the power when usb is stop in board_usb_cleanup.
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Li Jun <jun.li@nxp.com>
We found USB issue when using super-speed for mfgtool, temporally work around
the problem to use high-speed only.
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Li Jun <jun.li@nxp.com>
(cherry picked from commit e31f99c05c37ac35080e415cfd8c8e2a1c96f865)
When booting for mfgtool, we need to disable DCSS and HDMI since the HDMI
firmware won't be loaded by mfgtool. Add the detect in u-boot and update the
DTB.
Signed-off-by: Ye Li <ye.li@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 1d01cec0296d56ba8436941864d8da81013e0732)