fdts: stm32mp1: add bsec node
authorYann Gautier <yann.gautier@st.com>
Mon, 11 Mar 2019 09:04:38 +0000 (10:04 +0100)
committerYann Gautier <yann.gautier@st.com>
Mon, 11 Mar 2019 09:09:34 +0000 (10:09 +0100)
This node is added in a new file stm32mp157c-security.dtsi.
This node includes OTPs that should be shadowed and made readable
to non secure world.
Explicitly add status and secure-status, as these OTPs are accessible
by secure and non-secure world.

The stgen node is also moved to this file.

Change-Id: I3c89a01588d2e411fecfc44997e1c5df2fc37cad
Signed-off-by: Yann Gautier <yann.gautier@st.com>
fdts/stm32mp157a-dk1.dts
fdts/stm32mp157c-ed1.dts
fdts/stm32mp157c-security.dtsi [new file with mode: 0644]

index cf0fe2889200ec791e618f2b31ce6cceacfc95ab..68188be92b4449eded40c0a971e8723f127f9153 100644 (file)
 /* ATF Specific */
 #include <dt-bindings/clock/stm32mp1-clksrc.h>
 #include "stm32mp15-ddr3-1x4Gb-1066-binG.dtsi"
+#include "stm32mp157c-security.dtsi"
 
 / {
        aliases {
                gpio25 = &gpioz;
                i2c3 = &i2c4;
        };
-
-       soc {
-               stgen: stgen@5C008000 {
-                       compatible = "st,stm32-stgen";
-                       reg = <0x5C008000 0x1000>;
-                       status = "okay";
-               };
-       };
 };
 
 /* CLOCK init */
index 0fadffbd6d494472afb72e57a6a0b176c7080e2c..820e4131e9460069de91752101595018a67ce046 100644 (file)
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
 /*
- * Copyright (C) STMicroelectronics 2017 - All Rights Reserved
+ * Copyright (C) STMicroelectronics 2017-2019 - All Rights Reserved
  * Author: Ludovic Barre <ludovic.barre@st.com> for STMicroelectronics.
  */
 /dts-v1/;
 /* ATF Specific */
 #include <dt-bindings/clock/stm32mp1-clksrc.h>
 #include "stm32mp15-ddr3-2x4Gb-1066-binG.dtsi"
+#include "stm32mp157c-security.dtsi"
 
 / {
        aliases {
                gpio25 = &gpioz;
                i2c3 = &i2c4;
        };
-
-       soc {
-               stgen: stgen@5C008000 {
-                       compatible = "st,stm32-stgen";
-                       reg = <0x5C008000 0x1000>;
-                       status = "okay";
-               };
-       };
 };
 
 /* CLOCK init */
diff --git a/fdts/stm32mp157c-security.dtsi b/fdts/stm32mp157c-security.dtsi
new file mode 100644 (file)
index 0000000..fb04e7d
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2017-2019, STMicroelectronics - All Rights Reserved
+ *
+ * SPDX-License-Identifier:    GPL-2.0+        BSD-3-Clause
+ */
+
+/ {
+       soc {
+               stgen: stgen@5C008000 {
+                       compatible = "st,stm32-stgen";
+                       reg = <0x5C008000 0x1000>;
+                       status = "okay";
+               };
+       };
+};
+
+&bsec {
+       mac_addr: mac_addr@e4 {
+               reg = <0xe4 0x6>;
+               status = "okay";
+               secure-status = "okay";
+       };
+       /* Spare field to align on 32-bit OTP granularity  */
+       spare_ns_ea: spare_ns_ea@ea {
+               reg = <0xea 0x2>;
+               status = "okay";
+               secure-status = "okay";
+       };
+       board_id: board_id@ec {
+               reg = <0xec 0x4>;
+               status = "okay";
+               secure-status = "okay";
+       };
+};