Skip to content

Commit f638693

Browse files
committed
dts: arm: GD32F4xx serial SoCs basic device tree description
Introduce GD32F4xx serial SoCs basic device tree description. Use GD32F405 as the basic device model. Signed-off-by: HaiLong Yang <[email protected]>
1 parent 18d6f22 commit f638693

File tree

5 files changed

+183
-0
lines changed

5 files changed

+183
-0
lines changed

dts/arm/gigadevice/gd32f405.dtsi

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
/*
2+
* Copyright (c) 2021 BrainCo Inc.
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#include <arm/armv7-m.dtsi>
8+
9+
/ {
10+
cpus {
11+
#address-cells = <1>;
12+
#size-cells = <0>;
13+
14+
cpu0: cpu@0 {
15+
device_type = "cpu";
16+
compatible = "arm,cortex-m4f";
17+
reg = <0>;
18+
#address-cells = <1>;
19+
#size-cells = <1>;
20+
21+
mpu: mpu@e000ed90 {
22+
compatible = "arm,armv7m-mpu";
23+
reg = <0xe000ed90 0x40>;
24+
arm,num-mpu-regions = <8>;
25+
};
26+
};
27+
};
28+
29+
soc {
30+
sram0: memory@20000000 {
31+
compatible = "mmio-sram";
32+
};
33+
34+
fmc: flash-controller@40023c00 {
35+
compatible = "gd,gd32-flash-controller";
36+
label = "FLASH_CTRL";
37+
reg = <0x40023c00 0x400>;
38+
peripheral-id = <6>;
39+
40+
#address-cells = <1>;
41+
#size-cells = <1>;
42+
43+
flash0: flash@8000000 {
44+
compatible = "soc-nv-flash";
45+
label = "FLASH_0";
46+
};
47+
};
48+
49+
usart0: usart@40011000 {
50+
compatible = "gd,gd32-usart";
51+
reg = <0x40011000 0x400>;
52+
interrupts = <37 0>;
53+
rcu-periph-clock = <0x1104>;
54+
status = "disabled";
55+
label = "usart_0";
56+
};
57+
58+
usart1: usart@40004400 {
59+
compatible = "gd,gd32-usart";
60+
reg = <0x40004400 0x400>;
61+
interrupts = <38 0>;
62+
rcu-periph-clock = <0x1011>;
63+
status = "disabled";
64+
label = "usart_1";
65+
};
66+
67+
usart2: usart@40004800 {
68+
compatible = "gd,gd32-usart";
69+
reg = <0x40004800 0x400>;
70+
interrupts = <39 0>;
71+
rcu-periph-clock = <0x1012>;
72+
status = "disabled";
73+
label = "usart_2";
74+
};
75+
76+
uart3: usart@40004c00 {
77+
compatible = "gd,gd32-usart";
78+
reg = <0x40004c00 0x400>;
79+
interrupts = <52 0>;
80+
rcu-periph-clock = <0x1013>;
81+
status = "disabled";
82+
label = "uart_3";
83+
};
84+
85+
uart4: usart@40005000 {
86+
compatible = "gd,gd32-usart";
87+
reg = <0x40005000 0x400>;
88+
interrupts = <52 0>;
89+
rcu-periph-clock = <0x1014>;
90+
status = "disabled";
91+
label = "uart_4";
92+
};
93+
94+
usart5: usart@40011400 {
95+
compatible = "gd,gd32-usart";
96+
reg = <0x40011400 0x400>;
97+
interrupts = <71 0>;
98+
rcu-periph-clock = <0x1105>;
99+
status = "disabled";
100+
label = "usart_5";
101+
};
102+
103+
uart6: usart@40007800 {
104+
compatible = "gd,gd32-usart";
105+
reg = <0x40007800 0x400>;
106+
interrupts = <82 0>;
107+
rcu-periph-clock = <0x101e>;
108+
status = "disabled";
109+
label = "uart_6";
110+
};
111+
112+
uart7: usart@40007c00 {
113+
compatible = "gd,gd32-usart";
114+
reg = <0x40007c00 0x400>;
115+
interrupts = <83 0>;
116+
rcu-periph-clock = <0x101f>;
117+
status = "disabled";
118+
label = "uart_7";
119+
};
120+
};
121+
};
122+
123+
&nvic {
124+
arm,num-irq-priority-bits = <4>;
125+
};
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/*
2+
* Copyright (c) 2021 BrainCo Inc.
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#include <mem.h>
8+
#include <gigadevice/gd32f405.dtsi>
9+
10+
/ {
11+
soc {
12+
flash-controller@40023c00 {
13+
flash0: flash@8000000 {
14+
reg = <0x08000000 DT_SIZE_K(1024)>;
15+
};
16+
};
17+
18+
sram0: memory@20000000 {
19+
reg = <0x20000000 DT_SIZE_K(192)>;
20+
};
21+
};
22+
};

dts/arm/gigadevice/gd32f407.dtsi

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/*
2+
* Copyright (c) 2021 BrainCo Inc.
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#include <gigadevice/gd32f405.dtsi>

dts/arm/gigadevice/gd32f450.dtsi

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/*
2+
* Copyright (c) 2021 BrainCo Inc.
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#include <gigadevice/gd32f405.dtsi>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/*
2+
* Copyright (c) 2021 BrainCo Inc.
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#include <mem.h>
8+
#include <gigadevice/gd32f450.dtsi>
9+
10+
/ {
11+
soc {
12+
flash-controller@40023c00 {
13+
flash0: flash@8000000 {
14+
reg = <0x08000000 DT_SIZE_K(3072)>;
15+
};
16+
};
17+
18+
sram0: memory@20000000 {
19+
reg = <0x20000000 DT_SIZE_K(256)>;
20+
};
21+
};
22+
};

0 commit comments

Comments
 (0)