Skip to content

Commit 5970536

Browse files
committed
drivers: flash_stm32_xspi: 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. Based-on-patch-by: Armin Brauns <[email protected]> Signed-off-by: Tim Pambor <[email protected]>
1 parent eb1081e commit 5970536

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

drivers/flash/flash_stm32_xspi.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -2413,7 +2413,7 @@ static const struct flash_stm32_xspi_config flash_stm32_xspi_cfg = {
24132413
.pclken = pclken,
24142414
.pclk_len = DT_NUM_CLOCKS(STM32_XSPI_NODE),
24152415
.irq_config = flash_stm32_xspi_irq_config_func,
2416-
.flash_size = DT_INST_REG_ADDR_BY_IDX(0, 1),
2416+
.flash_size = DT_INST_REG_SIZE(0),
24172417
.max_frequency = DT_INST_PROP(0, ospi_max_frequency),
24182418
.data_mode = DT_INST_PROP(0, spi_bus_width), /* SPI or OPI */
24192419
.data_rate = DT_INST_PROP(0, data_rate), /* DTR or STR */

dts/arm/st/h5/stm32h562.dtsi

+1-1
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@
266266
clocks = <&rcc STM32_CLOCK(AHB4, 20U)>,
267267
<&rcc STM32_SRC_PLL1_Q OCTOSPI1_SEL(1)>;
268268
#address-cells = <1>;
269-
#size-cells = <0>;
269+
#size-cells = <1>;
270270
status = "disabled";
271271
};
272272

dts/arm/st/n6/stm32n6.dtsi

+2-2
Original file line numberDiff line numberDiff line change
@@ -694,7 +694,7 @@
694694
<&rcc STM32_SRC_CKPER XSPI1_SEL(1)>,
695695
<&rcc STM32_CLOCK(AHB5, 13)>;
696696
#address-cells = <1>;
697-
#size-cells = <0>;
697+
#size-cells = <1>;
698698
status = "disabled";
699699
};
700700

@@ -707,7 +707,7 @@
707707
<&rcc STM32_SRC_CKPER XSPI2_SEL(1)>,
708708
<&rcc STM32_CLOCK(AHB5, 13)>;
709709
#address-cells = <1>;
710-
#size-cells = <0>;
710+
#size-cells = <1>;
711711
status = "disabled";
712712
};
713713
};

0 commit comments

Comments
 (0)