imx: imx8mn_smm_s2/s2pro: Enable TrustZone

Message ID 20220515094109.1737878-1-michael@amarulasolutions.com
State New
Headers show
Series
  • imx: imx8mn_smm_s2/s2pro: Enable TrustZone
Related show

Commit Message

Michael Nazzareno Trimarchi May 15, 2022, 9:41 a.m. UTC
When the board was added, enabling tzc380 was left off by
mistake. The optee was tested with the following configuration
in s2pro

+	firmware {
+		optee {
+			compatible = "linaro,optee-tz";
+			method = "smc";
+		};
+	};
+
+	reserved-memory {
+		#address-cells = <2>;
+		#size-cells = <2>;
+		ranges;
+
+		/* 6MiB */
+		optee_core@5f800000 {
+			reg = <0x00 0x5f800000 0x00 0x600000>;
+		};
+
+		/* 2MiB */
+		optee_shm@5fe00000 {
+			reg = <0x00 0x5fe00000 0x00 0x200000>;
+		};
+	};
+

Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
---
 board/bsh/imx8mn_smm_s2/spl.c | 2 ++
 1 file changed, 2 insertions(+)

Patch

diff --git a/board/bsh/imx8mn_smm_s2/spl.c b/board/bsh/imx8mn_smm_s2/spl.c
index 097b60c055..549fc6992b 100644
--- a/board/bsh/imx8mn_smm_s2/spl.c
+++ b/board/bsh/imx8mn_smm_s2/spl.c
@@ -86,6 +86,8 @@  void board_init_f(ulong dummy)
 
 	preloader_console_init();
 
+	enable_tzc380();
+
 	/* DDR initialization */
 	spl_dram_init();