diff --git a/dts/arm/st/stm32f0.dtsi b/dts/arm/st/stm32f0.dtsi index 4f34b4259ec..8d1c4baaa5f 100644 --- a/dts/arm/st/stm32f0.dtsi +++ b/dts/arm/st/stm32f0.dtsi @@ -22,14 +22,6 @@ }; }; - flash0: flash@8000000 { - compatible = "soc-nv-flash"; - label = "FLASH_STM32"; - reg = <0x08000000 DT_FLASH_SIZE>; - - write-block-size = <2>; - }; - sram0: memory@20000000 { device_type = "memory"; compatible = "mmio-sram"; @@ -37,6 +29,24 @@ }; soc { + flash-controller@40022000 { + compatible = "st,stm32f0-flash-controller"; + label = "FLASH_CTRL"; + reg = <0x40022000 0x400>; + interrupts = <3 0>; + + #address-cells = <1>; + #size-cells = <1>; + + flash0: flash@8000000 { + compatible = "soc-nv-flash"; + label = "FLASH_STM32"; + reg = <0x08000000 DT_FLASH_SIZE>; + + write-block-size = <2>; + }; + }; + rcc: rcc@40021000 { compatible = "st,stm32-rcc"; clocks-controller; diff --git a/dts/arm/st/stm32f3.dtsi b/dts/arm/st/stm32f3.dtsi index 04c01823313..ffe41a9e1e4 100644 --- a/dts/arm/st/stm32f3.dtsi +++ b/dts/arm/st/stm32f3.dtsi @@ -22,12 +22,6 @@ }; }; - flash0: flash@8000000 { - compatible = "soc-nv-flash"; - label = "FLASH_STM32"; - reg = <0x08000000 DT_FLASH_SIZE>; - }; - sram0: memory@20000000 { device_type = "memory"; compatible = "mmio-sram"; @@ -35,6 +29,22 @@ }; soc { + flash-controller@40022000 { + compatible = "st,stm32f3-flash-controller"; + label = "FLASH_CTRL"; + reg = <0x40022000 0x400>; + interrupts = <4 0>; + + #address-cells = <1>; + #size-cells = <1>; + + flash0: flash@8000000 { + compatible = "soc-nv-flash"; + label = "FLASH_STM32"; + reg = <0x08000000 DT_FLASH_SIZE>; + }; + }; + rcc: rcc@40021000 { compatible = "st,stm32-rcc"; clocks-controller; diff --git a/dts/arm/st/stm32f4.dtsi b/dts/arm/st/stm32f4.dtsi index 60c53c55965..8ba3f109596 100644 --- a/dts/arm/st/stm32f4.dtsi +++ b/dts/arm/st/stm32f4.dtsi @@ -22,14 +22,6 @@ }; }; - flash0: flash@8000000 { - compatible = "soc-nv-flash"; - label = "FLASH_STM32"; - reg = <0x08000000 DT_FLASH_SIZE>; - - write-block-size = <1>; - }; - sram0: memory@20000000 { device_type = "memory"; compatible = "mmio-sram"; @@ -37,6 +29,24 @@ }; soc { + flash-controller@40023c00 { + compatible = "st,stm32f4-flash-controller"; + label = "FLASH_CTRL"; + reg = <0x40023c00 0x400>; + interrupts = <4 0>; + + #address-cells = <1>; + #size-cells = <1>; + + flash0: flash@8000000 { + compatible = "soc-nv-flash"; + label = "FLASH_STM32"; + reg = <0x08000000 DT_FLASH_SIZE>; + + write-block-size = <1>; + }; + }; + rcc: rcc@40023800 { compatible = "st,stm32-rcc"; clocks-controller; diff --git a/dts/arm/st/stm32l4.dtsi b/dts/arm/st/stm32l4.dtsi index af0230ff716..1bb5bff5c2e 100644 --- a/dts/arm/st/stm32l4.dtsi +++ b/dts/arm/st/stm32l4.dtsi @@ -23,14 +23,6 @@ }; }; - flash0: flash@8000000 { - compatible = "soc-nv-flash"; - label = "FLASH_STM32"; - reg = <0x08000000 DT_FLASH_SIZE>; - - write-block-size = <8>; - }; - sram0: memory@20000000 { device_type = "memory"; compatible = "mmio-sram"; @@ -38,6 +30,24 @@ }; soc { + flash-controller@40022000 { + compatible = "st,stm32l4-flash-controller"; + label = "FLASH_CTRL"; + reg = <0x40022000 0x400>; + interrupts = <4 0>; + + #address-cells = <1>; + #size-cells = <1>; + + flash0: flash@8000000 { + compatible = "soc-nv-flash"; + label = "FLASH_STM32"; + reg = <0x08000000 DT_FLASH_SIZE>; + + write-block-size = <8>; + }; + }; + rcc: rcc@40021000 { compatible = "st,stm32-rcc"; clocks-controller; diff --git a/dts/bindings/flash_controller/st,stm32f0-flash-controller.yaml b/dts/bindings/flash_controller/st,stm32f0-flash-controller.yaml new file mode 100644 index 00000000000..263a59b4d33 --- /dev/null +++ b/dts/bindings/flash_controller/st,stm32f0-flash-controller.yaml @@ -0,0 +1,19 @@ +--- +title: STM32 F0 Flash Controller +id: st,stm32f0-flash-controller +version: 0.1 + +description: > + This binding gives a base representation of the STM32 F0 Flash Controller + +inherits: + !include flash-controller.yaml + +properties: + compatible: + type: string + category: required + description: compatible strings + constraint: "st,stm32f0-flash-controller" + +... diff --git a/dts/bindings/flash_controller/st,stm32f3-flash-controller.yaml b/dts/bindings/flash_controller/st,stm32f3-flash-controller.yaml new file mode 100644 index 00000000000..4b750026138 --- /dev/null +++ b/dts/bindings/flash_controller/st,stm32f3-flash-controller.yaml @@ -0,0 +1,19 @@ +--- +title: STM32 F3 Flash Controller +id: st,stm32f3-flash-controller +version: 0.1 + +description: > + This binding gives a base representation of the STM32 F3 Flash Controller + +inherits: + !include flash-controller.yaml + +properties: + compatible: + type: string + category: required + description: compatible strings + constraint: "st,stm32f3-flash-controller" + +... diff --git a/dts/bindings/flash_controller/st,stm32f4-flash-controller.yaml b/dts/bindings/flash_controller/st,stm32f4-flash-controller.yaml new file mode 100644 index 00000000000..90e0b316481 --- /dev/null +++ b/dts/bindings/flash_controller/st,stm32f4-flash-controller.yaml @@ -0,0 +1,19 @@ +--- +title: STM32 F4 Flash Controller +id: st,stm32f4-flash-controller +version: 0.1 + +description: > + This binding gives a base representation of the STM32 F4 Flash Controller + +inherits: + !include flash-controller.yaml + +properties: + compatible: + type: string + category: required + description: compatible strings + constraint: "st,stm32f4-flash-controller" + +... diff --git a/dts/bindings/flash_controller/st,stm32l4-flash-controller.yaml b/dts/bindings/flash_controller/st,stm32l4-flash-controller.yaml new file mode 100644 index 00000000000..eb637a43c60 --- /dev/null +++ b/dts/bindings/flash_controller/st,stm32l4-flash-controller.yaml @@ -0,0 +1,19 @@ +--- +title: STM32 L4 Flash Controller +id: st,stm32l4-flash-controller +version: 0.1 + +description: > + This binding gives a base representation of the STM32 L4 Flash Controller + +inherits: + !include flash-controller.yaml + +properties: + compatible: + type: string + category: required + description: compatible strings + constraint: "st,stm32l4-flash-controller" + +...