Commit b3cf0a8f03d162e030cde1131751d060853e16fc

Authored by Ye Li
Committed by Stefano Babic
1 parent dbb2b7e508

imx8m: Configure trustzone region 0 for non-secure access

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>
Signed-off-by: Peng Fan <peng.fan@nxp.com>

Showing 1 changed file with 6 additions and 0 deletions Side-by-side Diff

arch/arm/mach-imx/imx8m/soc.c
... ... @@ -57,6 +57,12 @@
57 57 setbits_le32(&gpr->gpr[10], GPR_TZASC_EN_LOCK);
58 58 if (IS_ENABLED(CONFIG_IMX8MM))
59 59 setbits_le32(&gpr->gpr[10], BIT(1));
  60 + /*
  61 + * set Region 0 attribute to allow secure and non-secure
  62 + * read/write permission. Found some masters like usb dwc3
  63 + * controllers can't work with secure memory.
  64 + */
  65 + writel(0xf0000000, TZASC_BASE_ADDR + 0x108);
60 66 }
61 67  
62 68 void set_wdog_reset(struct wdog_regs *wdog)