Skip to content

Commit 850d471

Browse files
lucien-nxpnashif
authored andcommitted
boards: nxp: mimxrt1180_evk: add flexspi1 support
USE_HYPERRAM macro defined shouldn't be placed under CONFIG_BOOT_FLEXSPI_NOR. Add flexspi1 pinmux pinctrl and flash partitions Add flash partitions and correct flash parameter. This commit was tested with samples: flash_shell on cm33/cm7 cores Signed-off-by: Lucien Zhao <[email protected]>
1 parent 6463dd6 commit 850d471

File tree

4 files changed

+54
-6
lines changed

4 files changed

+54
-6
lines changed

boards/nxp/mimxrt1180_evk/CMakeLists.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,12 @@ if(CONFIG_NXP_IMXRT_BOOT_HEADER)
2222
# used on your custom board.
2323
zephyr_compile_definitions(XIP_EXTERNAL_FLASH=1)
2424
zephyr_compile_definitions(XIP_BOOT_HEADER_ENABLE=1)
25-
if(CONFIG_EXTERNAL_MEM_CONFIG_DATA AND CONFIG_NXP_IMX_EXTERNAL_HYPERRAM)
26-
zephyr_compile_definitions(USE_HYPERRAM)
27-
endif()
2825
zephyr_library_sources(${RT1180_BOARD_DIR}/xip/evkmimxrt1180_flexspi_nor_config.c)
2926
zephyr_library_include_directories(${RT1180_BOARD_DIR}/xip)
3027
zephyr_library_include_directories(${RT1180_BOARD_DIR})
3128
endif()
29+
if(CONFIG_EXTERNAL_MEM_CONFIG_DATA AND CONFIG_NXP_IMX_EXTERNAL_HYPERRAM)
30+
zephyr_compile_definitions(USE_HYPERRAM)
31+
zephyr_library_sources(${RT1180_BOARD_DIR}/xip/evkmimxrt1180_flexspi_nor_config.c)
32+
endif()
3233
endif()

boards/nxp/mimxrt1180_evk/doc/index.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,8 @@ configuration supports the following hardware features:
112112
+-----------+------------+-------------------------------------+
113113
| LPTMR | on-chip | counter |
114114
+-----------+------------+-------------------------------------+
115+
| FLEXSPI | on-chip | flash programming |
116+
+-----------+------------+-------------------------------------+
115117

116118
The default configuration can be found in the defconfig file:
117119
:zephyr_file:`boards/nxp/mimxrt1180_evk/mimxrt1180_evk_mimxrt1189_cm33_defconfig`

boards/nxp/mimxrt1180_evk/mimxrt1180_evk-pinctrl.dtsi

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,4 +115,18 @@
115115
slew-rate = "fast";
116116
};
117117
};
118+
119+
pinmux_flexspi1: pinmux_flexspi1 {
120+
group0 {
121+
pinmux = <&iomuxc_gpio_sd_b2_05_flexspi1_b_dqs>,
122+
<&iomuxc_gpio_sd_b2_06_flexspi1_b_ss0_b>,
123+
<&iomuxc_gpio_sd_b2_07_flexspi1_b_sclk>,
124+
<&iomuxc_gpio_sd_b2_08_flexspi1_b_data0>,
125+
<&iomuxc_gpio_sd_b2_09_flexspi1_b_data1>,
126+
<&iomuxc_gpio_sd_b2_10_flexspi1_b_data2>,
127+
<&iomuxc_gpio_sd_b2_11_flexspi1_b_data3>;
128+
bias-pull-down;
129+
input-enable;
130+
};
131+
};
118132
};

boards/nxp/mimxrt1180_evk/mimxrt1180_evk.dtsi

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,20 +55,51 @@
5555
status = "okay";
5656
};
5757

58-
&flexspi1 {
58+
&flexspi {
59+
pinctrl-0 = <&pinmux_flexspi1>;
60+
pinctrl-names = "default";
61+
};
62+
63+
&flexspi {
5964
status = "okay";
6065
ahb-prefetch;
6166
ahb-read-addr-opt;
6267
rx-clock-source = <1>;
6368
w25q128jw: w25q128jw@0 {
6469
compatible = "nxp,imx-flexspi-nor";
65-
size = <134217728>;
70+
size = <DT_SIZE_M(16*8)>;
6671
reg = <0>;
6772
spi-max-frequency = <133000000>;
6873
status = "okay";
69-
jedec-id = [ef 80 18];
74+
jedec-id = [ef 60 18];
7075
erase-block-size = <4096>;
7176
write-block-size = <1>;
77+
78+
partitions {
79+
compatible = "fixed-partitions";
80+
#address-cells = <1>;
81+
#size-cells = <1>;
82+
83+
boot_partition: partition@0 {
84+
label = "mcuboot";
85+
reg = <0x00000000 DT_SIZE_K(128)>;
86+
};
87+
/* The MCUBoot swap-move algorithm uses the last 3 sectors
88+
* of the primary slot0 for swap status and move.
89+
*/
90+
slot0_partition: partition@20000 {
91+
label = "image-0";
92+
reg = <0x00020000 (DT_SIZE_M(7) + DT_SIZE_K(12))>;
93+
};
94+
slot1_partition: partition@723000 {
95+
label = "image-1";
96+
reg = <0x00723000 DT_SIZE_M(7)>;
97+
};
98+
storage_partition: partition@E23000 {
99+
label = "storage";
100+
reg = <0x00E23000 (DT_SIZE_M(2) - DT_SIZE_K(140))>;
101+
};
102+
};
72103
};
73104
};
74105

0 commit comments

Comments
 (0)