stm32mp1: bsec: use device tree new compatible
authorPatrick Delaunay <patrick.delaunay@st.com>
Wed, 27 Feb 2019 16:01:27 +0000 (17:01 +0100)
committerPatrick Delaunay <patrick.delaunay@st.com>
Fri, 12 Apr 2019 14:09:13 +0000 (16:09 +0200)
Update bsec driver to use the device tree provided by Kernel.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
arch/arm/dts/stm32mp157-u-boot.dtsi
arch/arm/dts/stm32mp157c.dtsi
arch/arm/mach-stm32mp/bsec.c
arch/arm/mach-stm32mp/include/mach/stm32.h

index 90d13f35c4622f61f3f38b10c2b36caa4949d0dd..2594702c926f3ae47287adb125a494c09e3f28f3 100644 (file)
        };
 };
 
+&bsec {
+       u-boot,dm-pre-reloc;
+};
+
 &clk_hsi {
        u-boot,dm-pre-reloc;
 };
index d1d0f90b2a18d4dd5e4a7ea40e8bc3d20370e030..50978efc7c22ae77ba4e3f29f6a953fe41e2920d 100644 (file)
                        status = "disabled";
                };
 
+               bsec: nvmem@5c005000 {
+                       compatible = "st,stm32mp15-bsec";
+                       reg = <0x5c005000 0x400>;
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+               };
+
                i2c6: i2c@5c009000 {
                        compatible = "st,stm32f7-i2c";
                        reg = <0x5c009000 0x400>;
index 920a6c9191be4cbde55a1c348e1a147cc8f11e11..8c5a299104d05330975827e67513199d894a804c 100644 (file)
@@ -434,7 +434,7 @@ static int stm32mp_bsec_ofdata_to_platdata(struct udevice *dev)
 }
 
 static const struct udevice_id stm32mp_bsec_ids[] = {
-       { .compatible = "st,stm32mp-bsec" },
+       { .compatible = "st,stm32mp15-bsec" },
        {}
 };
 
@@ -446,13 +446,3 @@ U_BOOT_DRIVER(stm32mp_bsec) = {
        .platdata_auto_alloc_size = sizeof(struct stm32mp_bsec_platdata),
        .ops = &stm32mp_bsec_ops,
 };
-
-/* bsec IP is not present in device tee, manage IP address by platdata */
-static struct stm32mp_bsec_platdata stm32_bsec_platdata = {
-       .base = STM32_BSEC_BASE,
-};
-
-U_BOOT_DEVICE(stm32mp_bsec) = {
-       .name = "stm32mp_bsec",
-       .platdata = &stm32_bsec_platdata,
-};
index d153ac8203fbf0677d245596fe4b55a68e09a37a..c526c88e3ee9caf25558c66c80d976c8bacdb37b 100644 (file)
@@ -13,7 +13,6 @@
 #define STM32_RCC_BASE                 0x50000000
 #define STM32_PWR_BASE                 0x50001000
 #define STM32_DBGMCU_BASE              0x50081000
-#define STM32_BSEC_BASE                        0x5C005000
 #define STM32_TZC_BASE                 0x5C006000
 #define STM32_ETZPC_BASE               0x5C007000
 #define STM32_TAMP_BASE                        0x5C00A000