Skip to content

Commit dd93766

Browse files
committed
Merge tag 'riscv-dt-for-v6.8' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux into soc/dt
RISC-V Devicetrees for v6.8 StarFive: Key peripheral support for the jh7100 that depended on the non-standard non-coherent DMA operations, namely mmc, sdcard and sdio wifi. This platform has long been supported out of tree by Emil and Ubuntu etc ship images for it, so having mainline support for a wider range of peripherals (at last) is great. Microchip: The flash used by Auto Update support and the corresponding QSPI controller are added. On publicly available Icicle kits this flash is not usable (engineering sample silicon issues) but in the future Icicle kits will be available that have production silicon. T-Head: Jisheng is busy with RL this cycle and hence T-Head appears here. The Lichee Pi and BeagleV both grow eMMC and uSD support. Sopgho: Support for the Huashan Pi and the cv1812h SoC it uses. The cv1812h is almost identical to the existing cv1800b SoC. These SoCs are intended for use in IP camera type systems but also appear on SBCs, with the last digit denoting the amount integrated DDR3 the device has. The difference between the cv1812h and the existing cv180x devices appears to be the addition of video output interfaces. Signed-off-by: Conor Dooley <conor.dooley@microchip.com> * tag 'riscv-dt-for-v6.8' of https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux: riscv: dts: starfive: Enable SDIO wifi on JH7100 boards riscv: dts: starfive: Enable SD-card on JH7100 boards riscv: dts: starfive: Add JH7100 MMC nodes riscv: dts: starfive: Add pool for coherent DMA memory on JH7100 boards riscv: dts: starfive: Add JH7100 cache controller riscv: dts: starfive: Mark the JH7100 as having non-coherent DMAs riscv: dts: starfive: Group tuples in interrupt properties riscv: dts: thead: Enable LicheePi 4A eMMC and microSD riscv: dts: thead: Enable BeagleV Ahead eMMC and microSD riscv: dts: thead: Add TH1520 mmc controllers and sdhci clock riscv: dts: microchip: add the mpfs' system controller qspi & associated flash riscv: dts: sophgo: add Huashan Pi board device tree riscv: dts: sophgo: add initial CV1812H SoC device tree riscv: dts: sophgo: cv18xx: Add gpio devices riscv: dts: sophgo: Separate compatible specific for CV1800B soc dt-bindings: riscv: Add SOPHGO Huashan Pi board compatibles dt-bindings: timer: Add SOPHGO CV1812H clint dt-bindings: interrupt-controller: Add SOPHGO CV1812H plic Link: https://lore.kernel.org/r/20231221-skimmed-boxy-b78aed8afdc4@spud Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2 parents 3654ffd + 56b1095 commit dd93766

15 files changed

Lines changed: 566 additions & 116 deletions

File tree

Documentation/devicetree/bindings/interrupt-controller/sifive,plic-1.0.0.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ properties:
6666
- enum:
6767
- allwinner,sun20i-d1-plic
6868
- sophgo,cv1800b-plic
69+
- sophgo,cv1812h-plic
6970
- sophgo,sg2042-plic
7071
- thead,th1520-plic
7172
- const: thead,c900-plic

Documentation/devicetree/bindings/riscv/sophgo.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ properties:
2222
- enum:
2323
- milkv,duo
2424
- const: sophgo,cv1800b
25+
- items:
26+
- enum:
27+
- sophgo,huashan-pi
28+
- const: sophgo,cv1812h
2529
- items:
2630
- enum:
2731
- milkv,pioneer

Documentation/devicetree/bindings/timer/sifive,clint.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ properties:
3838
- enum:
3939
- allwinner,sun20i-d1-clint
4040
- sophgo,cv1800b-clint
41+
- sophgo,cv1812h-clint
4142
- thead,th1520-clint
4243
- const: thead,c900-clint
4344
- items:

arch/riscv/boot/dts/microchip/mpfs-icicle-kit.dts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,27 @@
199199
status = "okay";
200200
};
201201

202+
&syscontroller_qspi {
203+
/*
204+
* The flash *is* there, but Icicle kits that have engineering sample
205+
* silicon (write?) access to this flash to non-functional. The system
206+
* controller itself can actually access it, but the MSS cannot write
207+
* an image there. Instantiating a coreQSPI in the fabric & connecting
208+
* it to the flash instead should work though. Pre-production or later
209+
* silicon does not have this issue.
210+
*/
211+
status = "disabled";
212+
213+
sys_ctrl_flash: flash@0 { // MT25QL01GBBB8ESF-0SIT
214+
compatible = "jedec,spi-nor";
215+
#address-cells = <1>;
216+
#size-cells = <1>;
217+
spi-max-frequency = <20000000>;
218+
spi-rx-bus-width = <1>;
219+
reg = <0>;
220+
};
221+
};
222+
202223
&usb {
203224
status = "okay";
204225
dr_mode = "host";

arch/riscv/boot/dts/microchip/mpfs.dtsi

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,12 @@
193193
mboxes = <&mbox 0>;
194194
};
195195

196+
scbclk: mssclkclk {
197+
compatible = "fixed-clock";
198+
#clock-cells = <0>;
199+
clock-frequency = <80000000>;
200+
};
201+
196202
soc {
197203
#address-cells = <2>;
198204
#size-cells = <2>;
@@ -523,5 +529,16 @@
523529
#mbox-cells = <1>;
524530
status = "disabled";
525531
};
532+
533+
syscontroller_qspi: spi@37020100 {
534+
compatible = "microchip,mpfs-qspi", "microchip,coreqspi-rtl-v2";
535+
#address-cells = <1>;
536+
#size-cells = <0>;
537+
reg = <0x0 0x37020100 0x0 0x100>;
538+
interrupt-parent = <&plic>;
539+
interrupts = <110>;
540+
clocks = <&scbclk>;
541+
status = "disabled";
542+
};
526543
};
527544
};
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
# SPDX-License-Identifier: GPL-2.0
22
dtb-$(CONFIG_ARCH_SOPHGO) += cv1800b-milkv-duo.dtb
3+
dtb-$(CONFIG_ARCH_SOPHGO) += cv1812h-huashan-pi.dtb
34
dtb-$(CONFIG_ARCH_SOPHGO) += sg2042-milkv-pioneer.dtb

arch/riscv/boot/dts/sophgo/cv1800b.dtsi

Lines changed: 7 additions & 112 deletions
Original file line numberDiff line numberDiff line change
@@ -3,121 +3,16 @@
33
* Copyright (C) 2023 Jisheng Zhang <jszhang@kernel.org>
44
*/
55

6-
#include <dt-bindings/interrupt-controller/irq.h>
6+
#include "cv18xx.dtsi"
77

88
/ {
99
compatible = "sophgo,cv1800b";
10-
#address-cells = <1>;
11-
#size-cells = <1>;
12-
13-
cpus: cpus {
14-
#address-cells = <1>;
15-
#size-cells = <0>;
16-
timebase-frequency = <25000000>;
17-
18-
cpu0: cpu@0 {
19-
compatible = "thead,c906", "riscv";
20-
device_type = "cpu";
21-
reg = <0>;
22-
d-cache-block-size = <64>;
23-
d-cache-sets = <512>;
24-
d-cache-size = <65536>;
25-
i-cache-block-size = <64>;
26-
i-cache-sets = <128>;
27-
i-cache-size = <32768>;
28-
mmu-type = "riscv,sv39";
29-
riscv,isa = "rv64imafdc";
30-
riscv,isa-base = "rv64i";
31-
riscv,isa-extensions = "i", "m", "a", "f", "d", "c", "zicntr", "zicsr",
32-
"zifencei", "zihpm";
33-
34-
cpu0_intc: interrupt-controller {
35-
compatible = "riscv,cpu-intc";
36-
interrupt-controller;
37-
#address-cells = <0>;
38-
#interrupt-cells = <1>;
39-
};
40-
};
41-
};
42-
43-
osc: oscillator {
44-
compatible = "fixed-clock";
45-
clock-output-names = "osc_25m";
46-
#clock-cells = <0>;
47-
};
48-
49-
soc {
50-
compatible = "simple-bus";
51-
interrupt-parent = <&plic>;
52-
#address-cells = <1>;
53-
#size-cells = <1>;
54-
dma-noncoherent;
55-
ranges;
56-
57-
uart0: serial@4140000 {
58-
compatible = "snps,dw-apb-uart";
59-
reg = <0x04140000 0x100>;
60-
interrupts = <44 IRQ_TYPE_LEVEL_HIGH>;
61-
clocks = <&osc>;
62-
reg-shift = <2>;
63-
reg-io-width = <4>;
64-
status = "disabled";
65-
};
66-
67-
uart1: serial@4150000 {
68-
compatible = "snps,dw-apb-uart";
69-
reg = <0x04150000 0x100>;
70-
interrupts = <45 IRQ_TYPE_LEVEL_HIGH>;
71-
clocks = <&osc>;
72-
reg-shift = <2>;
73-
reg-io-width = <4>;
74-
status = "disabled";
75-
};
76-
77-
uart2: serial@4160000 {
78-
compatible = "snps,dw-apb-uart";
79-
reg = <0x04160000 0x100>;
80-
interrupts = <46 IRQ_TYPE_LEVEL_HIGH>;
81-
clocks = <&osc>;
82-
reg-shift = <2>;
83-
reg-io-width = <4>;
84-
status = "disabled";
85-
};
86-
87-
uart3: serial@4170000 {
88-
compatible = "snps,dw-apb-uart";
89-
reg = <0x04170000 0x100>;
90-
interrupts = <47 IRQ_TYPE_LEVEL_HIGH>;
91-
clocks = <&osc>;
92-
reg-shift = <2>;
93-
reg-io-width = <4>;
94-
status = "disabled";
95-
};
96-
97-
uart4: serial@41c0000 {
98-
compatible = "snps,dw-apb-uart";
99-
reg = <0x041c0000 0x100>;
100-
interrupts = <48 IRQ_TYPE_LEVEL_HIGH>;
101-
clocks = <&osc>;
102-
reg-shift = <2>;
103-
reg-io-width = <4>;
104-
status = "disabled";
105-
};
10+
};
10611

107-
plic: interrupt-controller@70000000 {
108-
compatible = "sophgo,cv1800b-plic", "thead,c900-plic";
109-
reg = <0x70000000 0x4000000>;
110-
interrupts-extended = <&cpu0_intc 11>, <&cpu0_intc 9>;
111-
interrupt-controller;
112-
#address-cells = <0>;
113-
#interrupt-cells = <2>;
114-
riscv,ndev = <101>;
115-
};
12+
&plic {
13+
compatible = "sophgo,cv1800b-plic", "thead,c900-plic";
14+
};
11615

117-
clint: timer@74000000 {
118-
compatible = "sophgo,cv1800b-clint", "thead,c900-clint";
119-
reg = <0x74000000 0x10000>;
120-
interrupts-extended = <&cpu0_intc 3>, <&cpu0_intc 7>;
121-
};
122-
};
16+
&clint {
17+
compatible = "sophgo,cv1800b-clint", "thead,c900-clint";
12318
};
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
// SPDX-License-Identifier: (GPL-2.0 OR MIT)
2+
/*
3+
* Copyright (C) 2023 Inochi Amaoto <inochiama@outlook.com>
4+
*/
5+
6+
/dts-v1/;
7+
8+
#include "cv1812h.dtsi"
9+
10+
/ {
11+
model = "Huashan Pi";
12+
compatible = "sophgo,huashan-pi", "sophgo,cv1812h";
13+
14+
aliases {
15+
gpio0 = &gpio0;
16+
gpio1 = &gpio1;
17+
gpio2 = &gpio2;
18+
gpio3 = &gpio3;
19+
serial0 = &uart0;
20+
serial1 = &uart1;
21+
serial2 = &uart2;
22+
serial3 = &uart3;
23+
serial4 = &uart4;
24+
};
25+
26+
chosen {
27+
stdout-path = "serial0:115200n8";
28+
};
29+
30+
reserved-memory {
31+
#address-cells = <1>;
32+
#size-cells = <1>;
33+
ranges;
34+
35+
coprocessor_rtos: region@8fe00000 {
36+
reg = <0x8fe00000 0x200000>;
37+
no-map;
38+
};
39+
};
40+
};
41+
42+
&osc {
43+
clock-frequency = <25000000>;
44+
};
45+
46+
&uart0 {
47+
status = "okay";
48+
};
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// SPDX-License-Identifier: (GPL-2.0 OR MIT)
2+
/*
3+
* Copyright (C) 2023 Inochi Amaoto <inochiama@outlook.com>
4+
*/
5+
6+
#include <dt-bindings/interrupt-controller/irq.h>
7+
#include "cv18xx.dtsi"
8+
9+
/ {
10+
compatible = "sophgo,cv1812h";
11+
12+
memory@80000000 {
13+
device_type = "memory";
14+
reg = <0x80000000 0x10000000>;
15+
};
16+
};
17+
18+
&plic {
19+
compatible = "sophgo,cv1812h-plic", "thead,c900-plic";
20+
};
21+
22+
&clint {
23+
compatible = "sophgo,cv1812h-clint", "thead,c900-clint";
24+
};

0 commit comments

Comments
 (0)