Skip to content

Commit 970d125

Browse files
danieldegrassecarlescufi
authored andcommitted
boards: mimxrt1160_evk: Refactor flexspi partition definition
Flexspi partition definition is shared between both cm4 and cm7 core. Refactor it to be in shared dtsi file. This will ensure that both cores share the same partition information, for dual core operation. Signed-off-by: Daniel DeGrasse <[email protected]>
1 parent 318751a commit 970d125

File tree

3 files changed

+48
-94
lines changed

3 files changed

+48
-94
lines changed

boards/arm/mimxrt1160_evk/mimxrt1160_evk.dtsi

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,54 @@
8181
};
8282
};
8383

84+
&flexspi {
85+
status = "okay";
86+
ahb-prefetch;
87+
ahb-read-addr-opt;
88+
rx-clock-source = <1>;
89+
reg = <0x400cc000 0x4000>, <0x30000000 DT_SIZE_M(16)>;
90+
is25wp128: is25wp128@0 {
91+
compatible = "nxp,imx-flexspi-nor";
92+
size = <134217728>;
93+
reg = <0>;
94+
spi-max-frequency = <133000000>;
95+
status = "okay";
96+
jedec-id = [9d 70 17];
97+
erase-block-size = <4096>;
98+
write-block-size = <1>;
99+
100+
partitions {
101+
compatible = "fixed-partitions";
102+
#address-cells = <1>;
103+
#size-cells = <1>;
104+
105+
boot_partition: partition@0 {
106+
label = "mcuboot";
107+
reg = <0x00000000 DT_SIZE_K(128)>;
108+
};
109+
/* Note slot 0 has one additional sector,
110+
* this is intended for use with the swap move algorithm
111+
*/
112+
slot0_partition: partition@20000 {
113+
label = "image-0";
114+
reg = <0x00020000 0x301000>;
115+
};
116+
slot1_partition: partition@321000 {
117+
label = "image-1";
118+
reg = <0x00321000 0x300000>;
119+
};
120+
scratch_partition: partition@621000 {
121+
label = "image-scratch";
122+
reg = <0x00621000 DT_SIZE_K(128)>;
123+
};
124+
storage_partition: partition@641000 {
125+
label = "storage";
126+
reg = <0x00641000 DT_SIZE_K(1856)>;
127+
};
128+
};
129+
};
130+
};
131+
84132
&flexpwm1_pwm2 {
85133
status = "okay";
86134
pinctrl-0 = <&pinmux_flexpwm1>;

boards/arm/mimxrt1160_evk/mimxrt1160_evk_cm4.dts

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -45,52 +45,6 @@
4545
status = "okay";
4646
};
4747

48-
&flexspi {
49-
status = "okay";
50-
ahb-prefetch;
51-
ahb-read-addr-opt;
52-
rx-clock-source = <1>;
53-
reg = <0x400cc000 0x4000>, <0x30000000 DT_SIZE_M(16)>;
54-
is25wp128: is25wp128@0 {
55-
compatible = "nxp,imx-flexspi-nor";
56-
size = <134217728>;
57-
reg = <0>;
58-
spi-max-frequency = <133000000>;
59-
status = "okay";
60-
jedec-id = [9d 70 17];
61-
62-
partitions {
63-
compatible = "fixed-partitions";
64-
#address-cells = <1>;
65-
#size-cells = <1>;
66-
67-
boot_partition: partition@0 {
68-
label = "mcuboot";
69-
reg = <0x00000000 DT_SIZE_K(128)>;
70-
};
71-
/* Note slot 0 has one additional sector,
72-
* this is intended for use with the swap move algorithm
73-
*/
74-
slot0_partition: partition@20000 {
75-
label = "image-0";
76-
reg = <0x00020000 0x301000>;
77-
};
78-
slot1_partition: partition@321000 {
79-
label = "image-1";
80-
reg = <0x00321000 0x300000>;
81-
};
82-
scratch_partition: partition@621000 {
83-
label = "image-scratch";
84-
reg = <0x00621000 DT_SIZE_K(128)>;
85-
};
86-
storage_partition: partition@641000 {
87-
label = "storage";
88-
reg = <0x00641000 DT_SIZE_K(1856)>;
89-
};
90-
};
91-
};
92-
};
93-
9448
/* Enable GPT for use as a hardware timer. This disables Cortex Systick.
9549
* to use systick, change this node from "gpt_hw_timer" to "systick"
9650
*/

boards/arm/mimxrt1160_evk/mimxrt1160_evk_cm7.dts

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -58,54 +58,6 @@
5858
status = "okay";
5959
};
6060

61-
&flexspi {
62-
status = "okay";
63-
ahb-prefetch;
64-
ahb-read-addr-opt;
65-
rx-clock-source = <1>;
66-
reg = <0x400cc000 0x4000>, <0x30000000 DT_SIZE_M(16)>;
67-
is25wp128: is25wp128@0 {
68-
compatible = "nxp,imx-flexspi-nor";
69-
size = <134217728>;
70-
reg = <0>;
71-
spi-max-frequency = <133000000>;
72-
status = "okay";
73-
jedec-id = [9d 70 17];
74-
erase-block-size = <4096>;
75-
write-block-size = <1>;
76-
77-
partitions {
78-
compatible = "fixed-partitions";
79-
#address-cells = <1>;
80-
#size-cells = <1>;
81-
82-
boot_partition: partition@0 {
83-
label = "mcuboot";
84-
reg = <0x00000000 DT_SIZE_K(128)>;
85-
};
86-
/* Note slot 0 has one additional sector,
87-
* this is intended for use with the swap move algorithm
88-
*/
89-
slot0_partition: partition@20000 {
90-
label = "image-0";
91-
reg = <0x00020000 0x301000>;
92-
};
93-
slot1_partition: partition@321000 {
94-
label = "image-1";
95-
reg = <0x00321000 0x300000>;
96-
};
97-
scratch_partition: partition@621000 {
98-
label = "image-scratch";
99-
reg = <0x00621000 DT_SIZE_K(128)>;
100-
};
101-
storage_partition: partition@641000 {
102-
label = "storage";
103-
reg = <0x00641000 DT_SIZE_K(1856)>;
104-
};
105-
};
106-
};
107-
};
108-
10961
/* Enable GPT for use as a hardware timer. This disables Cortex Systick.
11062
* to use systick, change this node from "gpt_hw_timer" to "systick"
11163
*/

0 commit comments

Comments
 (0)