Skip to content

Commit bd98e01

Browse files
arbraunskartben
authored andcommitted
drivers: flash_stm32_qspi: fix DT accessor for flash size
The flash size is the second part (size) of the first reg value, not the first part (address) of a nonexistent second reg value. Signed-off-by: Armin Brauns <[email protected]>
1 parent c1531b2 commit bd98e01

File tree

12 files changed

+16
-16
lines changed

12 files changed

+16
-16
lines changed

drivers/flash/flash_stm32_ospi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2593,7 +2593,7 @@ static const struct flash_stm32_ospi_config flash_stm32_ospi_cfg = {
25932593
.enr = DT_CLOCKS_CELL_BY_NAME(STM32_OSPI_NODE, ospi_mgr, bits)},
25942594
#endif
25952595
.irq_config = flash_stm32_ospi_irq_config_func,
2596-
.flash_size = DT_INST_REG_ADDR_BY_IDX(0, 1),
2596+
.flash_size = DT_INST_REG_SIZE(0),
25972597
.max_frequency = DT_INST_PROP(0, ospi_max_frequency),
25982598
.data_mode = DT_INST_PROP(0, spi_bus_width), /* SPI or OPI */
25992599
.data_rate = DT_INST_PROP(0, data_rate), /* DTR or STR */

drivers/flash/flash_stm32_qspi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1617,7 +1617,7 @@ static const struct flash_stm32_qspi_config flash_stm32_qspi_cfg = {
16171617
.bus = DT_CLOCKS_CELL(STM32_QSPI_NODE, bus)
16181618
},
16191619
.irq_config = flash_stm32_qspi_irq_config_func,
1620-
.flash_size = DT_INST_REG_ADDR_BY_IDX(0, 1) << STM32_QSPI_DOUBLE_FLASH,
1620+
.flash_size = DT_INST_REG_SIZE(0) << STM32_QSPI_DOUBLE_FLASH,
16211621
.max_frequency = DT_INST_PROP(0, qspi_max_frequency),
16221622
.pcfg = PINCTRL_DT_DEV_CONFIG_GET(STM32_QSPI_NODE),
16231623
#if STM32_QSPI_RESET_GPIO

dts/arm/st/f4/stm32f412.dtsi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@
215215
quadspi: spi@a0001000 {
216216
compatible = "st,stm32-qspi";
217217
#address-cells = <0x1>;
218-
#size-cells = <0x0>;
218+
#size-cells = <0x1>;
219219
reg = <0xa0001000 0x400>;
220220
interrupts = <92 0>;
221221
clocks = <&rcc STM32_CLOCK(AHB3, 1U)>;

dts/arm/st/f7/stm32f7.dtsi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -857,7 +857,7 @@
857857
quadspi: spi@a0001000 {
858858
compatible = "st,stm32-qspi";
859859
#address-cells = <0x1>;
860-
#size-cells = <0x0>;
860+
#size-cells = <0x1>;
861861
reg = <0xa0001000 0x34>;
862862
interrupts = <92 0>;
863863
clocks = <&rcc STM32_CLOCK(AHB3, 1U)>;

dts/arm/st/h7/stm32h7.dtsi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1068,7 +1068,7 @@
10681068
quadspi: spi@52005000 {
10691069
compatible = "st,stm32-qspi";
10701070
#address-cells = <0x1>;
1071-
#size-cells = <0x0>;
1071+
#size-cells = <0x1>;
10721072
reg = <0x52005000 0x34>;
10731073
interrupts = <92 0>;
10741074
clocks = <&rcc STM32_CLOCK(AHB3, 14U)>;

dts/arm/st/h7/stm32h723.dtsi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@
101101
clocks = <&rcc STM32_CLOCK(AHB3, 14U)>,
102102
<&rcc STM32_SRC_PLL1_Q OSPI_SEL(1)>;
103103
#address-cells = <1>;
104-
#size-cells = <0>;
104+
#size-cells = <1>;
105105
status = "disabled";
106106
};
107107

@@ -113,7 +113,7 @@
113113
clocks = <&rcc STM32_CLOCK(AHB3, 19U)>,
114114
<&rcc STM32_SRC_PLL1_Q OSPI_SEL(1)>;
115115
#address-cells = <1>;
116-
#size-cells = <0>;
116+
#size-cells = <1>;
117117
status = "disabled";
118118
};
119119

dts/arm/st/h7/stm32h7a3.dtsi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
clocks = <&rcc STM32_CLOCK(AHB3, 14U)>,
6565
<&rcc STM32_SRC_PLL1_Q OSPI_SEL(1)>;
6666
#address-cells = <1>;
67-
#size-cells = <0>;
67+
#size-cells = <1>;
6868
status = "disabled";
6969
};
7070

@@ -76,7 +76,7 @@
7676
clocks = <&rcc STM32_CLOCK(AHB3, 19U)>,
7777
<&rcc STM32_SRC_PLL1_Q OSPI_SEL(1)>;
7878
#address-cells = <1>;
79-
#size-cells = <0>;
79+
#size-cells = <1>;
8080
status = "disabled";
8181
};
8282

dts/arm/st/l4/stm32l4.dtsi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@
266266
quadspi: spi@a0001000 {
267267
compatible = "st,stm32-qspi";
268268
#address-cells = <1>;
269-
#size-cells = <0>;
269+
#size-cells = <1>;
270270
reg = <0xa0001000 0x400>;
271271
interrupts = <71 0>;
272272
clocks = <&rcc STM32_CLOCK(AHB3, 8U)>;

dts/arm/st/l4/stm32l4p5.dtsi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@
373373
<&rcc STM32_CLOCK(AHB2, 20U)>;
374374

375375
#address-cells = <1>;
376-
#size-cells = <0>;
376+
#size-cells = <1>;
377377
status = "disabled";
378378
};
379379

@@ -387,7 +387,7 @@
387387
<&rcc STM32_CLOCK(AHB2, 20U)>;
388388

389389
#address-cells = <1>;
390-
#size-cells = <0>;
390+
#size-cells = <1>;
391391
status = "disabled";
392392
};
393393
};

dts/arm/st/l5/stm32l5.dtsi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@
440440
clocks = <&rcc STM32_CLOCK(AHB3, 8U)>,
441441
<&rcc STM32_SRC_SYSCLK OSPI_SEL(0)>;
442442
#address-cells = <1>;
443-
#size-cells = <0>;
443+
#size-cells = <1>;
444444
status = "disabled";
445445
};
446446

0 commit comments

Comments
 (0)