Skip to content

Commit 8a74463

Browse files
drivers: flash: flexspi_mx25um51345g: get max speed from dts
The maximum speed should be configured individually for each board since it depends on the layout and the controller's flexspi capabilities. Signed-off-by: Andre Heinemans <[email protected]>
1 parent 2eaf520 commit 8a74463

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

boards/nxp/mimxrt595_evk/mimxrt595_evk_mimxrt595s_cm33.dts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ zephyr_udc0: &usbhs {
400400
/* MX25UM51245G is 64MB, 512MBit flash part */
401401
size = <DT_SIZE_M(64 * 8)>;
402402
reg = <0>;
403-
spi-max-frequency = <DT_FREQ_M(200)>;
403+
spi-max-frequency = <DT_FREQ_M(120)>;
404404
status = "okay";
405405
jedec-id = [c2 81 3a];
406406
erase-block-size = <DT_SIZE_K(4)>;

boards/nxp/mimxrt685_evk/mimxrt685_evk_mimxrt685s_cm33.dts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ i2s1: &flexcomm3 {
265265
/* MX25UM51245G is 64MB, 512MBit flash part */
266266
size = <DT_SIZE_M(64 * 8)>;
267267
reg = <2>;
268-
spi-max-frequency = <DT_FREQ_M(200)>;
268+
spi-max-frequency = <DT_FREQ_M(120)>;
269269
status = "okay";
270270
jedec-id = [c2 81 3a];
271271
erase-block-size = <DT_SIZE_K(4)>;

boards/nxp/vmu_rt1170/vmu_rt1170.dtsi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@
205205
/* MX25UM51245G is 64MB, 512MBit flash part */
206206
size = <DT_SIZE_M(64 * 8)>;
207207
reg = <0>;
208-
spi-max-frequency = <DT_FREQ_M(200)>;
208+
spi-max-frequency = <DT_FREQ_M(120)>;
209209
status = "okay";
210210
jedec-id = [c2 81 3a];
211211
erase-block-size = <DT_SIZE_K(4)>;

drivers/flash/flash_mcux_flexspi_mx25um51345g.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,8 @@ static DEVICE_API(flash, flash_flexspi_nor_api) = {
600600

601601
#define FLASH_FLEXSPI_DEVICE_CONFIG(n) \
602602
{ \
603-
.flexspiRootClk = MHZ(120), \
603+
.flexspiRootClk = \
604+
DT_INST_PROP_OR(n, spi_max_frequency, MHZ(200)),\
604605
.flashSize = DT_INST_PROP(n, size) / 8 / KB(1), \
605606
.CSIntervalUnit = \
606607
CS_INTERVAL_UNIT( \

0 commit comments

Comments
 (0)