Skip to content

Commit 140bce4

Browse files
cameledMaureenHelm
authored andcommitted
boards: add gd35q16 flash to gd32f450i_eval and gd32vf103v_eval boards
Add gd25q16 as "jedec,spi-nor" compatible flash to gd32f450i_eval and gd32vf103v_eval boards. Signed-off-by: HaiLong Yang <[email protected]>
1 parent 9d2425c commit 140bce4

File tree

4 files changed

+58
-0
lines changed

4 files changed

+58
-0
lines changed

boards/arm/gd32f450i_eval/gd32f450i_eval-pinctrl.dtsi

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,13 @@
3030
drive-open-drain;
3131
};
3232
};
33+
34+
spi5_default: spi5_default {
35+
group1 {
36+
pinmux = <SPI5_SCK_PG13>, <SPI5_MOSI_PG14>,
37+
<SPI5_MISO_PG12>,
38+
/* Use pinmux to pullup pg10 and pg11. */
39+
<SPI5_IO2_PG10>, <SPI5_IO3_PG11>;
40+
};
41+
};
3342
};

boards/arm/gd32f450i_eval/gd32f450i_eval.dts

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,14 @@
8989
status = "okay";
9090
};
9191

92+
&gpioi {
93+
status = "okay";
94+
};
95+
96+
&gpiog {
97+
status = "okay";
98+
};
99+
92100
&usart0 {
93101
status = "okay";
94102
current-speed = <115200>;
@@ -128,3 +136,20 @@
128136
timeout = <5>;
129137
};
130138
};
139+
140+
&spi5 {
141+
status = "okay";
142+
pinctrl-0 = <&spi5_default>;
143+
pinctrl-names = "default";
144+
cs-gpios = <&gpioi 8 GPIO_ACTIVE_LOW>;
145+
146+
nor_flash: gd25q16@0 {
147+
compatible ="jedec,spi-nor";
148+
size = <0x1000000>;
149+
label = "GD25Q16";
150+
reg = <0>;
151+
spi-max-frequency = <4000000>;
152+
status = "okay";
153+
jedec-id = [c8 40 15];
154+
};
155+
};

boards/riscv/gd32vf103v_eval/gd32vf103v_eval-pinctrl.dtsi

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,11 @@
2323
pinmux = <TIMER0_CH0_PA8_OUT_NORMP>;
2424
};
2525
};
26+
27+
spi0_default: spi0_default {
28+
group1 {
29+
pinmux = <SPI0_SCK_PA5_OUT_NORMP>, <SPI0_MOSI_PA7_OUT_NORMP>,
30+
<SPI0_MISO_PA6_OUT_NORMP>;
31+
};
32+
};
2633
};

boards/riscv/gd32vf103v_eval/gd32vf103v_eval.dts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,3 +120,20 @@
120120
pinctrl-names = "default";
121121
};
122122
};
123+
124+
&spi0 {
125+
status = "okay";
126+
pinctrl-0 = <&spi0_default>;
127+
pinctrl-names = "default";
128+
cs-gpios = <&gpioe 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
129+
130+
nor_flash: gd25q16@0 {
131+
compatible ="jedec,spi-nor";
132+
size = <0x1000000>;
133+
label = "GD25Q16";
134+
reg = <0>;
135+
spi-max-frequency = <4000000>;
136+
status = "okay";
137+
jedec-id = [c8 40 15];
138+
};
139+
};

0 commit comments

Comments
 (0)