Skip to content

Commit 57e4ea5

Browse files
committed
dts: Update bl60x and relevant files for SDK-independance
Reorganize and update soc files for SDK-independance Signed-off-by: Camille BAUD <mail@massdriver.space>
1 parent 714d890 commit 57e4ea5

File tree

6 files changed

+59
-33
lines changed

6 files changed

+59
-33
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
description: Bouffalolab Flash Controller
2+
3+
compatible: "bflb,flash-controller"
4+
5+
include: flash-controller.yaml
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Copyright (c) 2025 MASSDRIVER EI (massdrive.space)
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
description: Even Older RISC-V core local interrupt controller
5+
it uses different offsets than the newer memory-mapped legacy CLIC
6+
7+
compatible: "sifive,legacy-clic"
8+
9+
include: [interrupt-controller.yaml, base.yaml]
10+
11+
properties:
12+
reg:
13+
required: true
14+
15+
"#interrupt-cells":
16+
const: 2
17+
18+
interrupt-cells:
19+
- irq
20+
- priority

dts/bindings/serial/bflb,uart.yaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,3 @@ include:
1313
properties:
1414
reg:
1515
required: true
16-
17-
peripheral-id:
18-
type: int
19-
description: peripheral ID
20-
required: true

dts/riscv/bflb/bl602.dtsi

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

dts/riscv/bflb/bl604.dtsi

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

dts/riscv/bflb/bl60x.dtsi

Lines changed: 18 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77

88
#include <freq.h>
99
#include <mem.h>
10-
#include <dt-bindings/pinctrl/bl60x-pinctrl.h>
1110
#include <dt-bindings/pinctrl/bflb-common-pinctrl.h>
11+
#include <dt-bindings/pinctrl/bl60x-pinctrl.h>
1212
#include <dt-bindings/clock/bflb_bl60x_clock.h>
1313

1414
/ {
@@ -48,7 +48,7 @@
4848
clk_bclk: clk-bclk {
4949
#clock-cells = <0>;
5050
compatible = "bflb,bclk";
51-
divider = <2>;
51+
divider = <4>;
5252
status = "okay";
5353
};
5454
};
@@ -82,7 +82,7 @@
8282
ranges;
8383

8484
clic: clic@2000000 {
85-
compatible = "sifive,clint0";
85+
compatible = "sifive,legacy-clic";
8686
reg = <0x2000000 0x10000>;
8787
#address-cells = <0>;
8888
#interrupt-cells = <2>;
@@ -111,16 +111,16 @@
111111
#size-cells = <1>;
112112
status = "okay";
113113

114-
glb: gpio@40000000 {
114+
gpio0: gpio@40000000 {
115115
compatible = "bflb,gpio";
116116
reg = <0x40000000 0x1000>;
117117
#gpio-cells = <2>;
118118
#bflb,pin-cells = <2>;
119119
status = "disabled";
120120

121121
gpio-controller;
122-
interrupts = <1 0>;
123-
interrupt-parent = <&ictrl>;
122+
interrupts = <60 0>;
123+
interrupt-parent = <&clic>;
124124
};
125125
};
126126

@@ -135,7 +135,6 @@
135135
clock-names = "rc32m", "crystal", "root", "bclk",
136136
"pll_192", "pll_160",
137137
"pll_120", "pll_48";
138-
zephyr,deferred-init;
139138
};
140139

141140
efuse: efuse@40007000 {
@@ -148,18 +147,16 @@
148147
uart0: uart@4000a000 {
149148
compatible = "bflb,uart";
150149
reg = <0x4000a000 0x100>;
151-
peripheral-id = <0>;
152-
interrupts = <29 0>;
153-
interrupt-parent = <&ictrl>;
150+
interrupts = <45 0>;
151+
interrupt-parent = <&clic>;
154152
status = "disabled";
155153
};
156154

157155
uart1: uart@4000a100 {
158156
compatible = "bflb,uart";
159157
reg = <0x4000a100 0x100>;
160-
peripheral-id = <1>;
161-
interrupts = <30 0>;
162-
interrupt-parent = <&ictrl>;
158+
interrupts = <46 0>;
159+
interrupt-parent = <&clic>;
163160
status = "disabled";
164161
};
165162

@@ -170,21 +167,19 @@
170167
#size-cells = <0>;
171168
status = "disabled";
172169

173-
peripheral-id = <0>;
174-
interrupts = <27 0>;
175-
interrupt-parent = <&ictrl>;
170+
interrupts = <43 0>;
171+
interrupt-parent = <&clic>;
176172
};
177173

178-
spi1: spi@4000b000 {
179-
compatible = "bflb,qspi";
174+
flashctrl: flash-controller@4000b000 {
175+
compatible = "bflb,flash-controller";
180176
reg = <0x4000b000 0x1000>;
181177
#address-cells = <1>;
182-
#size-cells = <0>;
178+
#size-cells = <1>;
183179
status = "disabled";
184180

185-
peripheral-id = <0>;
186-
interrupts = <23 0>;
187-
interrupt-parent = <&ictrl>;
181+
interrupts = <39 0>;
182+
interrupt-parent = <&clic>;
188183
};
189184

190185
retram: memory@40010000 {
@@ -206,12 +201,7 @@
206201

207202
sram0: memory@42020000 {
208203
compatible = "mmio-sram";
209-
reg = <0x42020000 DT_SIZE_K(64)>;
210-
};
211-
212-
sram1: memory@42030000 {
213-
compatible = "mmio-sram";
214-
reg = <0x42030000 DT_SIZE_K(112)>;
204+
reg = <0x42020000 DT_SIZE_K(176)>;
215205
};
216206
};
217207
};

0 commit comments

Comments
 (0)