Skip to content

Commit 98a02fe

Browse files
aurel32nashif
authored andcommitted
dts: arm: st: h7: add max-erase-time property to the flash node
The erase time for a sector differs by a few order of magnitude for the various SoCs of the STM32H7 family. Declare it in the device tree using the existing max-erase-time property. For that it is necessary to add "st,stm32-nv-flash" to the compatible node. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
1 parent 04328a9 commit 98a02fe

File tree

5 files changed

+18
-6
lines changed

5 files changed

+18
-6
lines changed

dts/arm/st/h7/stm32h723.dtsi

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,11 @@
1313
soc {
1414
flash-controller@52002000 {
1515
flash0: flash@8000000 {
16-
compatible = "soc-nv-flash";
16+
compatible = "st,stm32-nv-flash", "soc-nv-flash";
1717
write-block-size = <32>;
1818
erase-block-size = <DT_SIZE_K(128)>;
19+
/* maximum erase time for a 128K sector */
20+
max-erase-time = <4000>;
1921
label = "FLASH_STM32";
2022
};
2123
};

dts/arm/st/h7/stm32h743.dtsi

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,12 @@
1111
soc {
1212
flash-controller@52002000 {
1313
flash0: flash@8000000 {
14-
compatible = "soc-nv-flash";
14+
compatible = "st,stm32-nv-flash", "soc-nv-flash";
1515
label = "FLASH_STM32";
1616
write-block-size = <32>;
1717
erase-block-size = <DT_SIZE_K(128)>;
18+
/* maximum erase time for a 128K sector */
19+
max-erase-time = <4000>;
1820
};
1921
};
2022

dts/arm/st/h7/stm32h745.dtsi

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,18 @@
1111
soc {
1212
flash-controller@52002000 {
1313
flash0: flash@8000000 {
14-
compatible = "soc-nv-flash";
14+
compatible = "st,stm32-nv-flash", "soc-nv-flash";
1515
write-block-size = <32>;
1616
erase-block-size = <DT_SIZE_K(128)>;
17+
/* maximum erase time for a 128K sector */
18+
max-erase-time = <4000>;
1719
};
1820
flash1: flash@8100000 {
19-
compatible = "soc-nv-flash";
21+
compatible = "st,stm32-nv-flash", "soc-nv-flash";
2022
write-block-size = <32>;
2123
erase-block-size = <DT_SIZE_K(128)>;
24+
/* maximum erase time for a 128K sector */
25+
max-erase-time = <4000>;
2226
};
2327
};
2428

dts/arm/st/h7/stm32h750.dtsi

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@
1111
soc {
1212
flash-controller@52002000 {
1313
flash0: flash@8000000 {
14-
compatible = "soc-nv-flash";
14+
compatible = "st,stm32-nv-flash", "soc-nv-flash";
1515
write-block-size = <32>;
1616
erase-block-size = <DT_SIZE_K(128)>;
17+
/* maximum erase time for a 128K sector */
18+
max-erase-time = <4000>;
1719
};
1820
};
1921

dts/arm/st/h7/stm32h7a3.dtsi

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,12 @@
1111
soc {
1212
flash-controller@52002000 {
1313
flash0: flash@8000000 {
14-
compatible = "soc-nv-flash";
14+
compatible = "st,stm32-nv-flash", "soc-nv-flash";
1515
label = "FLASH_STM32";
1616
write-block-size = <16>;
1717
erase-block-size = <DT_SIZE_K(8)>;
18+
/* maximum erase time for a 8K sector */
19+
max-erase-time = <3>;
1820
};
1921
};
2022

0 commit comments

Comments
 (0)