Skip to content

Commit 1ce3a95

Browse files
committed
Merge initial Sophgo patches into riscv-dt-for-next
Two series, from Chen and Jisheng, to add support for some of Sophgo's offerings - albeit on vastly different ends of the spectrum. The sg2042 is a "developer motherboard" with a 64 core SoC. The cv1800 series are aimed for use in IP cameras, as far as I can tell, and have one core for running Linux on. I expect that Chen Wang will take over maintenance of these SoCs once they have got more used to the process etc, and in the meantime I will apply the patches and send them to the soc maintainers. At least, that was what they requested I do :) Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
2 parents af57113 + 27df2ed commit 1ce3a95

17 files changed

Lines changed: 2649 additions & 1 deletion

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ properties:
6565
- items:
6666
- enum:
6767
- allwinner,sun20i-d1-plic
68+
- sophgo,cv1800b-plic
69+
- sophgo,sg2042-plic
6870
- thead,th1520-plic
6971
- const: thead,c900-plic
7072
- items:
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/interrupt-controller/thead,c900-aclint-mswi.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Sophgo sg2042 CLINT Machine-level Software Interrupt Device
8+
9+
maintainers:
10+
- Inochi Amaoto <inochiama@outlook.com>
11+
12+
properties:
13+
compatible:
14+
items:
15+
- enum:
16+
- sophgo,sg2042-aclint-mswi
17+
- const: thead,c900-aclint-mswi
18+
19+
reg:
20+
maxItems: 1
21+
22+
interrupts-extended:
23+
minItems: 1
24+
maxItems: 4095
25+
26+
additionalProperties: false
27+
28+
required:
29+
- compatible
30+
- reg
31+
- interrupts-extended
32+
33+
examples:
34+
- |
35+
interrupt-controller@94000000 {
36+
compatible = "sophgo,sg2042-aclint-mswi", "thead,c900-aclint-mswi";
37+
interrupts-extended = <&cpu1intc 3>,
38+
<&cpu2intc 3>,
39+
<&cpu3intc 3>,
40+
<&cpu4intc 3>;
41+
reg = <0x94000000 0x00010000>;
42+
};
43+
...

Documentation/devicetree/bindings/riscv/cpus.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ properties:
4747
- sifive,u74-mc
4848
- thead,c906
4949
- thead,c910
50+
- thead,c920
5051
- const: riscv
5152
- items:
5253
- enum:
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/riscv/sophgo.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Sophgo SoC-based boards
8+
9+
maintainers:
10+
- Chao Wei <chao.wei@sophgo.com>
11+
- Chen Wang <unicorn_wang@outlook.com>
12+
13+
description:
14+
Sophgo SoC-based boards
15+
16+
properties:
17+
$nodename:
18+
const: '/'
19+
compatible:
20+
oneOf:
21+
- items:
22+
- enum:
23+
- milkv,duo
24+
- const: sophgo,cv1800b
25+
- items:
26+
- enum:
27+
- milkv,pioneer
28+
- const: sophgo,sg2042
29+
30+
additionalProperties: true
31+
32+
...

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ properties:
3737
- items:
3838
- enum:
3939
- allwinner,sun20i-d1-clint
40+
- sophgo,cv1800b-clint
4041
- thead,th1520-clint
4142
- const: thead,c900-clint
4243
- items:
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/timer/thead,c900-aclint-mtimer.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Sophgo CLINT Timer
8+
9+
maintainers:
10+
- Inochi Amaoto <inochiama@outlook.com>
11+
12+
properties:
13+
compatible:
14+
items:
15+
- enum:
16+
- sophgo,sg2042-aclint-mtimer
17+
- const: thead,c900-aclint-mtimer
18+
19+
reg:
20+
maxItems: 1
21+
22+
interrupts-extended:
23+
minItems: 1
24+
maxItems: 4095
25+
26+
additionalProperties: false
27+
28+
required:
29+
- compatible
30+
- reg
31+
- interrupts-extended
32+
33+
examples:
34+
- |
35+
timer@ac000000 {
36+
compatible = "sophgo,sg2042-aclint-mtimer", "thead,c900-aclint-mtimer";
37+
interrupts-extended = <&cpu1intc 7>,
38+
<&cpu2intc 7>,
39+
<&cpu3intc 7>,
40+
<&cpu4intc 7>;
41+
reg = <0xac000000 0x00010000>;
42+
};
43+
...

Documentation/devicetree/bindings/vendor-prefixes.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -863,6 +863,8 @@ patternProperties:
863863
description: MikroElektronika d.o.o.
864864
"^mikrotik,.*":
865865
description: MikroTik
866+
"^milkv,.*":
867+
description: MilkV Technology Co., Ltd
866868
"^miniand,.*":
867869
description: Miniand Tech
868870
"^minix,.*":
@@ -1273,6 +1275,8 @@ patternProperties:
12731275
description: Solomon Systech Limited
12741276
"^sony,.*":
12751277
description: Sony Corporation
1278+
"^sophgo,.*":
1279+
description: Sophgo Technology Inc.
12761280
"^sourceparts,.*":
12771281
description: Source Parts Inc.
12781282
"^spansion,.*":

MAINTAINERS

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20063,6 +20063,13 @@ F: drivers/char/sonypi.c
2006320063
F: drivers/platform/x86/sony-laptop.c
2006420064
F: include/linux/sony-laptop.h
2006520065

20066+
SOPHGO DEVICETREES
20067+
M: Chao Wei <chao.wei@sophgo.com>
20068+
M: Chen Wang <unicorn_wang@outlook.com>
20069+
S: Maintained
20070+
F: arch/riscv/boot/dts/sophgo/
20071+
F: Documentation/devicetree/bindings/riscv/sophgo.yaml
20072+
2006620073
SOUND
2006720074
M: Jaroslav Kysela <perex@perex.cz>
2006820075
M: Takashi Iwai <tiwai@suse.com>

arch/riscv/Kconfig.socs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ config SOC_SIFIVE
2222
help
2323
This enables support for SiFive SoC platform hardware.
2424

25+
config ARCH_SOPHGO
26+
bool "Sophgo SoCs"
27+
help
28+
This enables support for Sophgo SoC platform hardware.
29+
2530
config ARCH_STARFIVE
2631
def_bool SOC_STARFIVE
2732

arch/riscv/boot/dts/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ subdir-y += canaan
44
subdir-y += microchip
55
subdir-y += renesas
66
subdir-y += sifive
7+
subdir-y += sophgo
78
subdir-y += starfive
89
subdir-y += thead
910

0 commit comments

Comments
 (0)