Skip to content

Commit 3184898

Browse files
committed
Merge tag 'soc-newsoc-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc
Pull sophgo SoC devicetree updates from Arnd Bergmann: "The Sophgo SG2044 SoC is their second generation server chip with 64 cores, following the SG2042. In addition, there are minor updates for the cv180x SoCs" * tag 'soc-newsoc-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: riscv: dts: sophgo: switch precise compatible for existed clock device for CV18XX riscv: dts: sophgo: Add initial device tree of Sophgo SRD3-10 dt-bindings: riscv: sophgo: Add SG2044 compatible string dt-bindings: interrupt-controller: Add Sophgo SG2044 PLIC dt-bindings: interrupt-controller: Add Sophgo SG2044 CLINT mswi riscv: dts: sopgho: use SOC_PERIPHERAL_IRQ to calculate interrupt number riscv: dts: sophgo: rename header file cv18xx.dtsi to cv180x.dtsi riscv: dts: sophgo: Move riscv cpu definition to a separate file riscv: dts: sophgo: Move all soc specific device into soc dtsi file riscv: sophgo: dts: Add spi controller for SG2042 riscv: dts: sophgo: sg2042: add pinctrl support
2 parents ec71f66 + 9bba618 commit 3184898

File tree

16 files changed

+3502
-107
lines changed

16 files changed

+3502
-107
lines changed

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
@@ -70,6 +70,7 @@ properties:
7070
- sophgo,cv1812h-plic
7171
- sophgo,sg2002-plic
7272
- sophgo,sg2042-plic
73+
- sophgo,sg2044-plic
7374
- thead,th1520-plic
7475
- const: thead,c900-plic
7576
- items:

Documentation/devicetree/bindings/interrupt-controller/thead,c900-aclint-mswi.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ properties:
1414
items:
1515
- enum:
1616
- sophgo,sg2042-aclint-mswi
17+
- sophgo,sg2044-aclint-mswi
1718
- const: thead,c900-aclint-mswi
1819

1920
reg:

Documentation/devicetree/bindings/riscv/sophgo.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ properties:
3535
- enum:
3636
- milkv,pioneer
3737
- const: sophgo,sg2042
38+
- items:
39+
- enum:
40+
- sophgo,srd3-10
41+
- const: sophgo,sg2044
3842

3943
additionalProperties: true
4044

arch/riscv/boot/dts/sophgo/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ dtb-$(CONFIG_ARCH_SOPHGO) += cv1800b-milkv-duo.dtb
33
dtb-$(CONFIG_ARCH_SOPHGO) += cv1812h-huashan-pi.dtb
44
dtb-$(CONFIG_ARCH_SOPHGO) += sg2002-licheerv-nano-b.dtb
55
dtb-$(CONFIG_ARCH_SOPHGO) += sg2042-milkv-pioneer.dtb
6+
dtb-$(CONFIG_ARCH_SOPHGO) += sg2044-sophgo-srd3-10.dtb

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

Lines changed: 28 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,11 @@
33
* Copyright (C) 2023 Jisheng Zhang <[email protected]>
44
*/
55

6+
#define SOC_PERIPHERAL_IRQ(nr) ((nr) + 16)
7+
68
#include <dt-bindings/pinctrl/pinctrl-cv1800b.h>
7-
#include "cv18xx.dtsi"
9+
#include "cv180x-cpus.dtsi"
10+
#include "cv180x.dtsi"
811

912
/ {
1013
compatible = "sophgo,cv1800b";
@@ -15,23 +18,37 @@
1518
};
1619

1720
soc {
21+
interrupt-parent = <&plic>;
22+
dma-noncoherent;
23+
1824
pinctrl: pinctrl@3001000 {
1925
compatible = "sophgo,cv1800b-pinctrl";
2026
reg = <0x03001000 0x1000>,
2127
<0x05027000 0x1000>;
2228
reg-names = "sys", "rtc";
2329
};
24-
};
25-
};
2630

27-
&plic {
28-
compatible = "sophgo,cv1800b-plic", "thead,c900-plic";
29-
};
31+
clk: clock-controller@3002000 {
32+
compatible = "sophgo,cv1800b-clk";
33+
reg = <0x03002000 0x1000>;
34+
clocks = <&osc>;
35+
#clock-cells = <1>;
36+
};
3037

31-
&clint {
32-
compatible = "sophgo,cv1800b-clint", "thead,c900-clint";
33-
};
38+
plic: interrupt-controller@70000000 {
39+
compatible = "sophgo,cv1800b-plic", "thead,c900-plic";
40+
reg = <0x70000000 0x4000000>;
41+
interrupts-extended = <&cpu0_intc 11>, <&cpu0_intc 9>;
42+
interrupt-controller;
43+
#address-cells = <0>;
44+
#interrupt-cells = <2>;
45+
riscv,ndev = <101>;
46+
};
3447

35-
&clk {
36-
compatible = "sophgo,cv1800-clk";
48+
clint: timer@74000000 {
49+
compatible = "sophgo,cv1800b-clint", "thead,c900-clint";
50+
reg = <0x74000000 0x10000>;
51+
interrupts-extended = <&cpu0_intc 3>, <&cpu0_intc 7>;
52+
};
53+
};
3754
};
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
// SPDX-License-Identifier: (GPL-2.0 OR MIT)
2+
/*
3+
* Copyright (C) 2023 Jisheng Zhang <[email protected]>
4+
* Copyright (C) 2023 Inochi Amaoto <[email protected]>
5+
*/
6+
7+
/ {
8+
cpus: cpus {
9+
#address-cells = <1>;
10+
#size-cells = <0>;
11+
timebase-frequency = <25000000>;
12+
13+
cpu0: cpu@0 {
14+
compatible = "thead,c906", "riscv";
15+
device_type = "cpu";
16+
reg = <0>;
17+
d-cache-block-size = <64>;
18+
d-cache-sets = <512>;
19+
d-cache-size = <65536>;
20+
i-cache-block-size = <64>;
21+
i-cache-sets = <128>;
22+
i-cache-size = <32768>;
23+
mmu-type = "riscv,sv39";
24+
riscv,isa = "rv64imafdc";
25+
riscv,isa-base = "rv64i";
26+
riscv,isa-extensions = "i", "m", "a", "f", "d", "c", "zicntr", "zicsr",
27+
"zifencei", "zihpm";
28+
29+
cpu0_intc: interrupt-controller {
30+
compatible = "riscv,cpu-intc";
31+
interrupt-controller;
32+
#interrupt-cells = <1>;
33+
};
34+
};
35+
};
36+
};

0 commit comments

Comments
 (0)