Skip to content

Commit 05a6230

Browse files
committed
Merge tag 'arm-sophgo-dt-for-v6.17' of https://github.com/sophgo/linux into soc/newsoc
ARM Devicetrees for v6.17 Sophgo: Add support for Duo Module 01 Evaluation Board. This board uses SG2000(old codename CV181xH), which is dual-arch, RISC-V and ARM64. This patch add the support for ARM64. Signed-off-by: Chen Wang <[email protected]> * tag 'arm-sophgo-dt-for-v6.17' of https://github.com/sophgo/linux: arm64: defconfig: Enable rudimentary Sophgo SG2000 support arm64: Add SOPHGO SOC family Kconfig support arm64: dts: sophgo: Add Duo Module 01 Evaluation Board arm64: dts: sophgo: Add Duo Module 01 arm64: dts: sophgo: Add initial SG2000 SoC device tree Link: https://lore.kernel.org/r/MAUPR01MB11072C4B088AAC02268044E95FE5FA@MAUPR01MB11072.INDPRD01.PROD.OUTLOOK.COM Signed-off-by: Arnd Bergmann <[email protected]>
2 parents dceb366 + fe4fd70 commit 05a6230

File tree

7 files changed

+215
-0
lines changed

7 files changed

+215
-0
lines changed

arch/arm64/Kconfig.platforms

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,12 @@ config ARCH_INTEL_SOCFPGA
327327
Stratix 10 (ex. Altera), Stratix10 Software Virtual Platform,
328328
Agilex and eASIC N5X.
329329

330+
config ARCH_SOPHGO
331+
bool "Sophgo SoCs"
332+
select ARCH_HAS_RESET_CONTROLLER
333+
help
334+
This enables support for Sophgo SoC platform hardware.
335+
330336
config ARCH_STM32
331337
bool "STMicroelectronics STM32 SoC Family"
332338
select GPIOLIB

arch/arm64/boot/dts/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ subdir-y += realtek
3030
subdir-y += renesas
3131
subdir-y += rockchip
3232
subdir-y += socionext
33+
subdir-y += sophgo
3334
subdir-y += sprd
3435
subdir-y += st
3536
subdir-y += synaptics

arch/arm64/boot/dts/sophgo/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# SPDX-License-Identifier: GPL-2.0
2+
dtb-$(CONFIG_ARCH_SOPHGO) += sg2000-milkv-duo-module-01-evb.dtb
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
// SPDX-License-Identifier: (GPL-2.0 OR MIT)
2+
3+
/dts-v1/;
4+
5+
#include "sg2000-milkv-duo-module-01.dtsi"
6+
7+
/ {
8+
model = "Milk-V Duo Module 01 Evaluation Board";
9+
compatible = "milkv,duo-module-01-evb", "milkv,duo-module-01", "sophgo,sg2000";
10+
11+
chosen {
12+
stdout-path = "serial0:115200n8";
13+
};
14+
};
15+
16+
&pinctrl {
17+
sdhci0_cfg: sdhci0-cfg {
18+
sdhci0-cd-pins {
19+
pinmux = <PINMUX(PIN_SD0_CD, 0)>;
20+
bias-pull-up;
21+
drive-strength-microamp = <10800>;
22+
power-source = <3300>;
23+
};
24+
25+
sdhci0-clk-pins {
26+
pinmux = <PINMUX(PIN_SD0_CLK, 0)>;
27+
bias-pull-up;
28+
drive-strength-microamp = <16100>;
29+
power-source = <3300>;
30+
};
31+
32+
sdhci0-cmd-pins {
33+
pinmux = <PINMUX(PIN_SD0_CMD, 0)>;
34+
bias-pull-up;
35+
drive-strength-microamp = <10800>;
36+
power-source = <3300>;
37+
};
38+
39+
sdhci0-data-pins {
40+
pinmux = <PINMUX(PIN_SD0_D0, 0)>,
41+
<PINMUX(PIN_SD0_D1, 0)>,
42+
<PINMUX(PIN_SD0_D2, 0)>,
43+
<PINMUX(PIN_SD0_D3, 0)>;
44+
bias-pull-up;
45+
drive-strength-microamp = <10800>;
46+
power-source = <3300>;
47+
};
48+
};
49+
50+
uart0_cfg: uart0-cfg {
51+
uart0-pins {
52+
pinmux = <PINMUX(PIN_UART0_TX, 0)>,
53+
<PINMUX(PIN_UART0_RX, 0)>;
54+
bias-pull-up;
55+
drive-strength-microamp = <10800>;
56+
power-source = <3300>;
57+
};
58+
};
59+
};
60+
61+
&uart0 {
62+
pinctrl-0 = <&uart0_cfg>;
63+
pinctrl-names = "default";
64+
status = "okay";
65+
};
66+
67+
&sdhci0 {
68+
bus-width = <4>;
69+
no-1-8-v;
70+
no-mmc;
71+
no-sdio;
72+
disable-wp;
73+
pinctrl-0 = <&sdhci0_cfg>;
74+
pinctrl-names = "default";
75+
status = "okay";
76+
};
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
// SPDX-License-Identifier: (GPL-2.0 OR MIT)
2+
3+
#include <dt-bindings/pinctrl/pinctrl-sg2000.h>
4+
#include "sg2000.dtsi"
5+
6+
/ {
7+
model = "Milk-V Duo Module 01";
8+
compatible = "milkv,duo-module-01", "sophgo,sg2000";
9+
10+
aliases {
11+
serial0 = &uart0;
12+
serial1 = &uart1;
13+
serial2 = &uart2;
14+
serial3 = &uart3;
15+
serial4 = &uart4;
16+
};
17+
};
18+
19+
&osc {
20+
clock-frequency = <25000000>;
21+
};
22+
23+
&emmc {
24+
bus-width = <4>;
25+
no-1-8-v;
26+
cap-mmc-hw-reset;
27+
no-sd;
28+
no-sdio;
29+
non-removable;
30+
status = "okay";
31+
};
32+
33+
/* Wi-Fi */
34+
&sdhci1 {
35+
bus-width = <4>;
36+
cap-sdio-irq;
37+
no-mmc;
38+
no-sd;
39+
non-removable;
40+
};
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
// SPDX-License-Identifier: (GPL-2.0 OR MIT)
2+
3+
#define SOC_PERIPHERAL_IRQ(nr) GIC_SPI (nr)
4+
5+
#include <dt-bindings/interrupt-controller/arm-gic.h>
6+
#include <riscv/sophgo/cv180x.dtsi>
7+
#include <riscv/sophgo/cv181x.dtsi>
8+
9+
/ {
10+
compatible = "sophgo,sg2000";
11+
interrupt-parent = <&gic>;
12+
13+
cpus {
14+
#address-cells = <1>;
15+
#size-cells = <0>;
16+
17+
cpu@0 {
18+
compatible = "arm,cortex-a53";
19+
device_type = "cpu";
20+
reg = <0>;
21+
enable-method = "psci";
22+
i-cache-size = <32768>;
23+
d-cache-size = <32768>;
24+
next-level-cache = <&l2>;
25+
};
26+
27+
l2: l2-cache {
28+
compatible = "cache";
29+
cache-level = <2>;
30+
cache-unified;
31+
cache-size = <0x20000>;
32+
};
33+
};
34+
35+
memory@80000000 {
36+
device_type = "memory";
37+
reg = <0x80000000 0x20000000>; /* 512MiB */
38+
};
39+
40+
pmu {
41+
compatible = "arm,cortex-a53-pmu";
42+
interrupts = <GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH>,
43+
<GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>;
44+
};
45+
46+
psci {
47+
compatible = "arm,psci-0.2";
48+
method = "smc";
49+
cpu_on = <0xc4000003>;
50+
cpu_off = <0x84000002>;
51+
};
52+
53+
soc {
54+
gic: interrupt-controller@1f01000 {
55+
compatible = "arm,cortex-a15-gic";
56+
interrupt-controller;
57+
#interrupt-cells = <3>;
58+
reg = <0x01f01000 0x1000>,
59+
<0x01f02000 0x2000>;
60+
};
61+
62+
pinctrl: pinctrl@3001000 {
63+
compatible = "sophgo,sg2000-pinctrl";
64+
reg = <0x03001000 0x1000>,
65+
<0x05027000 0x1000>;
66+
reg-names = "sys", "rtc";
67+
};
68+
69+
clk: clock-controller@3002000 {
70+
compatible = "sophgo,sg2000-clk";
71+
reg = <0x03002000 0x1000>;
72+
clocks = <&osc>;
73+
#clock-cells = <1>;
74+
};
75+
};
76+
77+
timer {
78+
compatible = "arm,armv8-timer";
79+
interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>,
80+
<GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>,
81+
<GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>,
82+
<GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>;
83+
always-on;
84+
clock-frequency = <25000000>;
85+
};
86+
};

arch/arm64/configs/defconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ CONFIG_ARCH_RENESAS=y
6868
CONFIG_ARCH_ROCKCHIP=y
6969
CONFIG_ARCH_SEATTLE=y
7070
CONFIG_ARCH_INTEL_SOCFPGA=y
71+
CONFIG_ARCH_SOPHGO=y
7172
CONFIG_ARCH_STM32=y
7273
CONFIG_ARCH_SYNQUACER=y
7374
CONFIG_ARCH_TEGRA=y
@@ -656,6 +657,7 @@ CONFIG_PINCTRL_SM8450_LPASS_LPI=m
656657
CONFIG_PINCTRL_SC8280XP_LPASS_LPI=m
657658
CONFIG_PINCTRL_SM8550_LPASS_LPI=m
658659
CONFIG_PINCTRL_SM8650_LPASS_LPI=m
660+
CONFIG_PINCTRL_SOPHGO_SG2000=y
659661
CONFIG_GPIO_ALTERA=m
660662
CONFIG_GPIO_DAVINCI=y
661663
CONFIG_GPIO_DWAPB=y
@@ -1432,6 +1434,7 @@ CONFIG_QCOM_HFPLL=y
14321434
CONFIG_CLK_GFM_LPASS_SM8250=m
14331435
CONFIG_CLK_RCAR_USB2_CLOCK_SEL=y
14341436
CONFIG_CLK_RENESAS_VBATTB=m
1437+
CONFIG_CLK_SOPHGO_CV1800=y
14351438
CONFIG_HWSPINLOCK=y
14361439
CONFIG_HWSPINLOCK_OMAP=m
14371440
CONFIG_HWSPINLOCK_QCOM=y
@@ -1533,6 +1536,7 @@ CONFIG_QCOM_SPMI_VADC=m
15331536
CONFIG_QCOM_SPMI_ADC5=m
15341537
CONFIG_ROCKCHIP_SARADC=m
15351538
CONFIG_RZG2L_ADC=m
1539+
CONFIG_SOPHGO_CV1800B_ADC=m
15361540
CONFIG_TI_ADS1015=m
15371541
CONFIG_TI_AM335X_ADC=m
15381542
CONFIG_IIO_CROS_EC_SENSORS_CORE=m

0 commit comments

Comments
 (0)