Skip to content

Commit be2fe8e

Browse files
committed
dts: bflb: Add BL70x dts
Add devicetree files for BL70x SoCs Signed-off-by: Camille BAUD <[email protected]>
1 parent 7c56c9d commit be2fe8e

File tree

4 files changed

+230
-0
lines changed

4 files changed

+230
-0
lines changed

dts/riscv/bflb/bl702.dtsi

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/*
2+
* Copyright (c) 2025 MASSDRIVER EI (massdriver.space)
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#include <bflb/bl70x.dtsi>
8+
#include <dt-bindings/pinctrl/bl702x-pinctrl.h>

dts/riscv/bflb/bl704.dtsi

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/*
2+
* Copyright (c) 2025 MASSDRIVER EI (massdriver.space)
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#include <bflb/bl70x.dtsi>
8+
#include <dt-bindings/pinctrl/bl704x-pinctrl.h>

dts/riscv/bflb/bl706.dtsi

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/*
2+
* Copyright (c) 2025 MASSDRIVER EI (massdriver.space)
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#include <bflb/bl70x.dtsi>
8+
#include <dt-bindings/pinctrl/bl706x-pinctrl.h>

dts/riscv/bflb/bl70x.dtsi

Lines changed: 206 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,206 @@
1+
/*
2+
* Copyright (c) 2024-2025 MASSDRIVER EI (massdriver.space)
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#include <freq.h>
8+
#include <mem.h>
9+
#include <dt-bindings/pinctrl/bflb-common-pinctrl.h>
10+
#include <dt-bindings/pinctrl/bl70x-pinctrl.h>
11+
#include <dt-bindings/clock/bflb_bl70x_clock.h>
12+
13+
/ {
14+
#address-cells = <1>;
15+
#size-cells = <1>;
16+
17+
clocks {
18+
clk_rc32m: clk-rc32m {
19+
#clock-cells = <0>;
20+
compatible = "fixed-clock";
21+
clock-frequency = <DT_FREQ_M(32)>;
22+
status = "okay";
23+
};
24+
25+
clk_crystal: clk-crystal {
26+
#clock-cells = <0>;
27+
compatible = "fixed-clock";
28+
clock-frequency = <DT_FREQ_M(32)>;
29+
status = "okay";
30+
};
31+
32+
clk_pll: clk-pll {
33+
#clock-cells = <1>;
34+
compatible = "bflb,bl70x-dll";
35+
clocks = <&clk_crystal>;
36+
status = "okay";
37+
};
38+
39+
clk_root: clk-root {
40+
#clock-cells = <0>;
41+
compatible = "bflb,bl70x-root-clk";
42+
clocks = <&clk_pll BL70X_DLL_144MHz>;
43+
divider = <1>;
44+
status = "okay";
45+
};
46+
47+
clk_bclk: clk-bclk {
48+
#clock-cells = <0>;
49+
compatible = "bflb,bclk";
50+
divider = <2>;
51+
status = "okay";
52+
};
53+
};
54+
55+
cpus {
56+
#address-cells = <1>;
57+
#size-cells = <0>;
58+
timebase-frequency = <DT_FREQ_M(1)>;
59+
60+
cpu0: cpu@0 {
61+
device_type = "cpu";
62+
compatible = "sifive,e24", "riscv";
63+
reg = <0>;
64+
riscv,isa = "rv32imafcb";
65+
hardware-exec-breakpoint-count = <4>;
66+
status = "okay";
67+
68+
ictrl: interrupt-controller {
69+
#address-cells = <0>;
70+
#interrupt-cells = <1>;
71+
compatible = "riscv,cpu-intc";
72+
interrupt-controller;
73+
};
74+
};
75+
};
76+
77+
soc {
78+
compatible = "simple-bus";
79+
#address-cells = <1>;
80+
#size-cells = <1>;
81+
ranges;
82+
83+
clic: clic@2000000 {
84+
compatible = "sifive,clic-draft";
85+
reg = <0x2000000 0x10000>;
86+
#address-cells = <0>;
87+
#interrupt-cells = <2>;
88+
89+
interrupt-controller;
90+
interrupts-extended = <&ictrl 3 &ictrl 7 &ictrl 11 &ictrl 12>;
91+
interrupt-names = "msip", /* Machine Software Interrupt */
92+
"mtip", /* Machine Timer interrupt */
93+
"meip", /* Machine External Interrupt */
94+
"csip"; /* CLIC Software Interrupt */
95+
};
96+
97+
mtimer: timer@200bff8 {
98+
compatible = "riscv,machine-timer";
99+
reg = <0x200bff8 0x8 0x2004000 0x8>;
100+
reg-names = "mtime", "mtimecmp";
101+
102+
interrupts-extended = <&ictrl 7>;
103+
};
104+
105+
pinctrl: pin-controller@40000000 {
106+
compatible = "bflb,pinctrl";
107+
reg = <0x40000000 0x1000>;
108+
ranges = <0x40000000 0x40000000 0x1000>;
109+
#address-cells = <1>;
110+
#size-cells = <1>;
111+
status = "okay";
112+
113+
gpio0: gpio@40000000 {
114+
compatible = "bflb,gpio";
115+
reg = <0x40000000 0x1000>;
116+
#gpio-cells = <2>;
117+
#bflb,pin-cells = <2>;
118+
status = "disabled";
119+
120+
gpio-controller;
121+
interrupts = <60 0>;
122+
interrupt-parent = <&clic>;
123+
};
124+
};
125+
126+
clocks: clock-controller@40000000 {
127+
compatible = "bflb,bl70x-clock-controller", "bflb,clock-controller";
128+
reg = <0x40000000 DT_SIZE_K(4)>;
129+
#clock-cells = <1>;
130+
status = "okay";
131+
clocks = <&clk_rc32m>, <&clk_crystal>, <&clk_root>, <&clk_bclk>,
132+
<&clk_pll BL70X_DLL_144MHz>, <&clk_pll BL70X_DLL_96MHz>,
133+
<&clk_pll BL70X_DLL_120MHz>, <&clk_pll BL70X_DLL_57MHz>;
134+
clock-names = "rc32m", "crystal", "root", "bclk",
135+
"dll_144", "dll_96",
136+
"dll_120", "dll_57";
137+
};
138+
139+
efuse: efuse@40007000 {
140+
compatible = "bflb,efuse";
141+
reg = <0x40007000 0x1000>;
142+
status = "okay";
143+
size = <128>;
144+
};
145+
146+
uart0: uart@4000a000 {
147+
compatible = "bflb,uart";
148+
reg = <0x4000a000 0x100>;
149+
interrupts = <45 0>;
150+
interrupt-parent = <&clic>;
151+
status = "disabled";
152+
};
153+
154+
uart1: uart@4000a100 {
155+
compatible = "bflb,uart";
156+
reg = <0x4000a100 0x100>;
157+
interrupts = <46 0>;
158+
interrupt-parent = <&clic>;
159+
status = "disabled";
160+
};
161+
162+
spi0: spi@4000a200 {
163+
compatible = "bflb,spi";
164+
reg = <0x4000a200 0x100>;
165+
#address-cells = <1>;
166+
#size-cells = <0>;
167+
status = "disabled";
168+
169+
interrupts = <43 0>;
170+
interrupt-parent = <&clic>;
171+
};
172+
173+
flashctrl: flash-controller@4000b000 {
174+
compatible = "bflb,flash-controller";
175+
reg = <0x4000b000 0x1000>;
176+
#address-cells = <1>;
177+
#size-cells = <1>;
178+
status = "disabled";
179+
180+
interrupts = <39 0>;
181+
interrupt-parent = <&clic>;
182+
};
183+
184+
retram: memory@40010000 {
185+
compatible = "mmio-sram";
186+
reg = <0x40010000 DT_SIZE_K(4)>;
187+
};
188+
189+
itcm: itcm@22014000 {
190+
compatible = "zephyr,memory-region", "sifive,dtim0";
191+
reg = <0x22014000 DT_SIZE_K(12)>;
192+
zephyr,memory-region = "ITCM";
193+
};
194+
195+
dtcm: dtcm@42017000 {
196+
compatible = "zephyr,memory-region", "sifive,dtim0";
197+
reg = <0x42017000 DT_SIZE_K(4)>;
198+
zephyr,memory-region = "DTCM";
199+
};
200+
201+
sram0: memory@42018000 {
202+
compatible = "mmio-sram";
203+
reg = <0x42018000 DT_SIZE_K(96)>;
204+
};
205+
};
206+
};

0 commit comments

Comments
 (0)