mirror of
https://github.com/torvalds/linux.git
synced 2026-09-24 06:24:02 +02:00
RISC-V Devicetrees for v7.3
Sophgo: The changes of this PR are all for CV18xx serials. There are three major changes. The first is to allow DMA multiplexer setting channel number for DMA controller; the second is to add initial RISC-V support for "Duo S" board, which uses SG2000, a dual-arch SoC (RISC-V and ARM64); the third is to add support for "Duo 256M" board, another dev-board based on SG2002 SoC. Signed-off-by: Chen Wang <chen.wang@linux.dev> -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQTYPcWJ6By3aFu8IuKHG95Quc97dgUCanKEvQAKCRCHG95Quc97 dn44AP9HHp2ut8rY0UnmS/s+rCAbWX/2YkhGWdWPPk1o4VkSdQEArt9F9RpXg/Mp RfmT/LEx81g7zR7wqpGlpy1a5F+TBw4= =SAg0 -----END PGP SIGNATURE----- gpgsig -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAmp57JAACgkQmmx57+YA GNla7xAAqMRFdMgCOH74zaNtohonnSgbmJi4dL6RakzJHCjZO+VWMnxavg/A8qTb DrSugeW0SV1pe/NbOKaJbqZ6xa/gJJitivPNJIgn8uM3WauetzE55isGPb+smR1r soqTG/3AYocT88fy7FgLL3GmvY9yd1dAOHA/CFdTpmBdrqfV5fSSmed08wM0lVQe O1EgjHe7eNk+v3DYo80buRxwljiW0gpbhFFsz84hbdFoL/Cf/GAXWP1xhZjCTKo1 9/Zex3J7SsdNAaZjDzMyF0S0eolyAPJW0SzToDkMniE/tSYc2lkjW7R1I55iuQvi BJ+kKK1k2/TrSbmvjuvqCEnwfOh9BzXPf4UWuLrUrEVTpdEBtpe0otFGRBqzg0lO RkgUPdHWR8uhL57Oos8HM4WH2VN4s0jqP0FN1sUp46fnnQFCEi/nO4vRTnOt+ppy HxNjJyQRrP97OH7s7zpUTyCVVJBZPL3EF3NuNCzioooXK3LHI4MSApTtDIt9bPBi yS5U1SaUaNm4RwCaFH9QZSQHXdoEXKe0DPX/P9cROr62T6eSyDhZnIIcucveMw+6 tJie38mJChficq8mCo3/S1P3gMELy5lmBw68XCg/UMBcdV76Mq4AgFq6o5Ow+oXp KS/sO+RkxZPD7ImnGLKrSuurJnIsMpOR/69lLFBkZ0LBtdZY9W4= =CrHg -----END PGP SIGNATURE----- Merge tag 'riscv-sophgo-dt-for-v7.3' of https://github.com/sophgo/linux into soc/dt RISC-V Devicetrees for v7.3 Sophgo: The changes of this PR are all for CV18xx serials. There are three major changes. The first is to allow DMA multiplexer setting channel number for DMA controller; the second is to add initial RISC-V support for "Duo S" board, which uses SG2000, a dual-arch SoC (RISC-V and ARM64); the third is to add support for "Duo 256M" board, another dev-board based on SG2002 SoC. Signed-off-by: Chen Wang <chen.wang@linux.dev> * tag 'riscv-sophgo-dt-for-v7.3' of https://github.com/sophgo/linux: riscv: dts: sophgo: Add Milk-V Duo 256M board support riscv: dts: sophgo: cv180x: Add PWR_GPIO controller dt-bindings: soc: sophgo: add Milk-V Duo 256M board riscv64: dts: sophgo: add initial Milk-V Duo S board support riscv64: dts: sophgo: add SG2000 dtsi riscv: dts: sophgo: cv180x: Allow the DMA multiplexer to set channel number for DMA controller Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
commit
545ecc3577
|
|
@ -35,6 +35,10 @@ properties:
|
|||
- enum:
|
||||
- milkv,duo-s
|
||||
- const: sophgo,sg2000
|
||||
- items:
|
||||
- enum:
|
||||
- milkv,duo256m
|
||||
- const: sophgo,sg2002
|
||||
- items:
|
||||
- enum:
|
||||
- sipeed,licheerv-nano-b
|
||||
|
|
|
|||
|
|
@ -1,7 +1,9 @@
|
|||
# SPDX-License-Identifier: GPL-2.0
|
||||
dtb-$(CONFIG_ARCH_SOPHGO) += cv1800b-milkv-duo.dtb
|
||||
dtb-$(CONFIG_ARCH_SOPHGO) += cv1812h-huashan-pi.dtb
|
||||
dtb-$(CONFIG_ARCH_SOPHGO) += sg2000-milkv-duo-s.dtb
|
||||
dtb-$(CONFIG_ARCH_SOPHGO) += sg2002-licheerv-nano-b.dtb
|
||||
dtb-$(CONFIG_ARCH_SOPHGO) += sg2002-milkv-duo256m.dtb
|
||||
dtb-$(CONFIG_ARCH_SOPHGO) += sg2042-milkv-pioneer.dtb
|
||||
dtb-$(CONFIG_ARCH_SOPHGO) += sg2042-evb-v1.dtb
|
||||
dtb-$(CONFIG_ARCH_SOPHGO) += sg2042-evb-v2.dtb
|
||||
|
|
|
|||
|
|
@ -417,7 +417,7 @@ sdhci1: mmc@4320000 {
|
|||
};
|
||||
|
||||
dmac: dma-controller@4330000 {
|
||||
compatible = "snps,axi-dma-1.01a";
|
||||
compatible = "sophgo,cv1800b-axi-dma", "snps,axi-dma-1.01a";
|
||||
reg = <0x04330000 0x1000>;
|
||||
interrupts = <SOC_PERIPHERAL_IRQ(13) IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&clk CLK_SDMA_AXI>, <&clk CLK_SDMA_AXI>;
|
||||
|
|
@ -448,6 +448,24 @@ usb: usb@4340000 {
|
|||
status = "disabled";
|
||||
};
|
||||
|
||||
gpio4: gpio@5021000 {
|
||||
compatible = "snps,dw-apb-gpio";
|
||||
reg = <0x5021000 0x1000>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
porte: gpio-controller@0 {
|
||||
compatible = "snps,dw-apb-gpio-port";
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
ngpios = <32>;
|
||||
reg = <0>;
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <2>;
|
||||
interrupts = <SOC_PERIPHERAL_IRQ(54) IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
};
|
||||
|
||||
rtc@5025000 {
|
||||
compatible = "sophgo,cv1800b-rtc", "syscon";
|
||||
reg = <0x5025000 0x2000>;
|
||||
|
|
|
|||
244
arch/riscv/boot/dts/sophgo/sg2000-milkv-duo-s.dts
Normal file
244
arch/riscv/boot/dts/sophgo/sg2000-milkv-duo-s.dts
Normal file
|
|
@ -0,0 +1,244 @@
|
|||
// SPDX-License-Identifier: (GPL-2.0 OR MIT)
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
#include <dt-bindings/pinctrl/pinctrl-sg2000.h>
|
||||
#include "sg2000.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Milk-V Duo S";
|
||||
compatible = "milkv,duo-s", "sophgo,sg2000";
|
||||
|
||||
aliases {
|
||||
i2c4 = &i2c4;
|
||||
mmc0 = &sdhci0;
|
||||
mmc1 = &emmc;
|
||||
mmc2 = &sdhci1;
|
||||
serial0 = &uart0;
|
||||
serial4 = &uart4;
|
||||
};
|
||||
|
||||
chosen {
|
||||
stdout-path = "serial0:115200n8";
|
||||
};
|
||||
|
||||
wifi_pwrseq: wifi-pwrseq {
|
||||
compatible = "mmc-pwrseq-simple";
|
||||
reset-gpios = <&porta 15 GPIO_ACTIVE_LOW>;
|
||||
power-off-delay-us = <50000>;
|
||||
post-power-on-delay-ms = <200>;
|
||||
};
|
||||
};
|
||||
|
||||
&osc {
|
||||
clock-frequency = <25000000>;
|
||||
};
|
||||
|
||||
&pinctrl {
|
||||
emmc_cfg: emmc-cfg {
|
||||
emmc-rstn-pins {
|
||||
pinmux = <PINMUX(PIN_EMMC_RSTN, 0)>;
|
||||
bias-pull-up;
|
||||
drive-strength-microamp = <10800>;
|
||||
power-source = <1800>;
|
||||
};
|
||||
|
||||
emmc-clk-pins {
|
||||
pinmux = <PINMUX(PIN_EMMC_CLK, 0)>;
|
||||
bias-pull-up;
|
||||
drive-strength-microamp = <10800>;
|
||||
power-source = <1800>;
|
||||
};
|
||||
|
||||
emmc-cmd-pins {
|
||||
pinmux = <PINMUX(PIN_EMMC_CMD, 0)>;
|
||||
bias-pull-up;
|
||||
drive-strength-microamp = <10800>;
|
||||
power-source = <1800>;
|
||||
};
|
||||
|
||||
emmc-data-pins {
|
||||
pinmux = <PINMUX(PIN_EMMC_DAT0, 0)>,
|
||||
<PINMUX(PIN_EMMC_DAT1, 0)>,
|
||||
<PINMUX(PIN_EMMC_DAT2, 0)>,
|
||||
<PINMUX(PIN_EMMC_DAT3, 0)>;
|
||||
bias-pull-up;
|
||||
drive-strength-microamp = <10800>;
|
||||
power-source = <1800>;
|
||||
};
|
||||
};
|
||||
|
||||
i2c4_cfg: i2c4-cfg {
|
||||
i2c4-pins {
|
||||
pinmux = <PINMUX(PIN_VIVO_D1, 7)>,
|
||||
<PINMUX(PIN_VIVO_D0, 7)>;
|
||||
bias-pull-up;
|
||||
drive-strength-microamp = <4000>;
|
||||
power-source = <1800>;
|
||||
};
|
||||
};
|
||||
|
||||
sdhci0_cfg: sdhci0-cfg {
|
||||
sdhci0-cd-pins {
|
||||
pinmux = <PINMUX(PIN_SD0_CD, 0)>;
|
||||
bias-pull-up;
|
||||
drive-strength-microamp = <10800>;
|
||||
power-source = <3300>;
|
||||
};
|
||||
|
||||
sdhci0-clk-pins {
|
||||
pinmux = <PINMUX(PIN_SD0_CLK, 0)>;
|
||||
bias-pull-up;
|
||||
drive-strength-microamp = <16100>;
|
||||
power-source = <3300>;
|
||||
};
|
||||
|
||||
sdhci0-cmd-pins {
|
||||
pinmux = <PINMUX(PIN_SD0_CMD, 0)>;
|
||||
bias-pull-up;
|
||||
drive-strength-microamp = <10800>;
|
||||
power-source = <3300>;
|
||||
};
|
||||
|
||||
sdhci0-data-pins {
|
||||
pinmux = <PINMUX(PIN_SD0_D0, 0)>,
|
||||
<PINMUX(PIN_SD0_D1, 0)>,
|
||||
<PINMUX(PIN_SD0_D2, 0)>,
|
||||
<PINMUX(PIN_SD0_D3, 0)>;
|
||||
bias-pull-up;
|
||||
drive-strength-microamp = <10800>;
|
||||
power-source = <3300>;
|
||||
};
|
||||
};
|
||||
|
||||
sdhci1_cfg: sdhci1-cfg {
|
||||
sdhci1-clk-pins {
|
||||
pinmux = <PINMUX(PIN_MIPI_TXM4, 1)>;
|
||||
bias-pull-up;
|
||||
drive-strength-microamp = <10800>;
|
||||
power-source = <1800>;
|
||||
};
|
||||
|
||||
sdhci1-cmd-pins {
|
||||
pinmux = <PINMUX(PIN_MIPI_TXP4, 1)>;
|
||||
bias-pull-up;
|
||||
drive-strength-microamp = <10800>;
|
||||
power-source = <1800>;
|
||||
};
|
||||
|
||||
sdhci1-data-pins {
|
||||
pinmux = <PINMUX(PIN_MIPI_TXM3, 1)>,
|
||||
<PINMUX(PIN_MIPI_TXP3, 1)>,
|
||||
<PINMUX(PIN_MIPI_TXM2, 7)>,
|
||||
<PINMUX(PIN_MIPI_TXP2, 7)>;
|
||||
bias-pull-up;
|
||||
drive-strength-microamp = <10800>;
|
||||
power-source = <1800>;
|
||||
};
|
||||
};
|
||||
|
||||
uart0_cfg: uart0-cfg {
|
||||
uart0-pins {
|
||||
pinmux = <PINMUX(PIN_UART0_TX, 0)>,
|
||||
<PINMUX(PIN_UART0_RX, 0)>;
|
||||
bias-pull-up;
|
||||
drive-strength-microamp = <10800>;
|
||||
power-source = <3300>;
|
||||
};
|
||||
};
|
||||
|
||||
uart4_cfg: uart4-cfg {
|
||||
uart4-data-pins {
|
||||
pinmux = <PINMUX(PIN_UART2_TX, 5)>,
|
||||
<PINMUX(PIN_UART2_RX, 5)>;
|
||||
drive-strength-microamp = <10800>;
|
||||
power-source = <3300>;
|
||||
};
|
||||
|
||||
uart4-control-pins {
|
||||
pinmux = <PINMUX(PIN_UART2_CTS, 5)>,
|
||||
<PINMUX(PIN_UART2_RTS, 5)>;
|
||||
bias-pull-up;
|
||||
drive-strength-microamp = <10800>;
|
||||
power-source = <3300>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&dmac {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&emmc {
|
||||
bus-width = <4>;
|
||||
no-1-8-v;
|
||||
cap-mmc-hw-reset;
|
||||
no-sd;
|
||||
no-sdio;
|
||||
non-removable;
|
||||
pinctrl-0 = <&emmc_cfg>;
|
||||
pinctrl-names = "default";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gmac0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&i2c4 {
|
||||
pinctrl-0 = <&i2c4_cfg>;
|
||||
pinctrl-names = "default";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&mdio {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&saradc {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&sdhci0 {
|
||||
bus-width = <4>;
|
||||
disable-wp;
|
||||
no-1-8-v;
|
||||
pinctrl-0 = <&sdhci0_cfg>;
|
||||
pinctrl-names = "default";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&sdhci1 {
|
||||
bus-width = <4>;
|
||||
cap-sdio-irq;
|
||||
cap-sd-highspeed;
|
||||
keep-power-in-suspend;
|
||||
no-mmc;
|
||||
no-sd;
|
||||
non-removable;
|
||||
max-frequency = <150000000>;
|
||||
mmc-pwrseq = <&wifi_pwrseq>;
|
||||
pinctrl-0 = <&sdhci1_cfg>;
|
||||
pinctrl-names = "default";
|
||||
sd-uhs-sdr50;
|
||||
sd-uhs-sdr104;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
pinctrl-0 = <&uart0_cfg>;
|
||||
pinctrl-names = "default";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&uart4 {
|
||||
pinctrl-0 = <&uart4_cfg>;
|
||||
pinctrl-names = "default";
|
||||
uart-has-rtscts;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb {
|
||||
dr_mode = "host";
|
||||
status = "okay";
|
||||
};
|
||||
53
arch/riscv/boot/dts/sophgo/sg2000.dtsi
Normal file
53
arch/riscv/boot/dts/sophgo/sg2000.dtsi
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
// SPDX-License-Identifier: (GPL-2.0 OR MIT)
|
||||
|
||||
#define SOC_PERIPHERAL_IRQ(nr) ((nr) + 16)
|
||||
|
||||
#include <dt-bindings/interrupt-controller/irq.h>
|
||||
#include <dt-bindings/pinctrl/pinctrl-sg2000.h>
|
||||
#include "cv180x-cpus.dtsi"
|
||||
#include "cv180x.dtsi"
|
||||
#include "cv181x.dtsi"
|
||||
|
||||
/ {
|
||||
compatible = "sophgo,sg2000";
|
||||
|
||||
memory@80000000 {
|
||||
device_type = "memory";
|
||||
reg = <0x80000000 0x20000000>;
|
||||
};
|
||||
|
||||
soc {
|
||||
interrupt-parent = <&plic>;
|
||||
dma-noncoherent;
|
||||
|
||||
pinctrl: pinctrl@3001000 {
|
||||
compatible = "sophgo,sg2000-pinctrl";
|
||||
reg = <0x03001000 0x1000>,
|
||||
<0x05027000 0x1000>;
|
||||
reg-names = "sys", "rtc";
|
||||
};
|
||||
|
||||
clk: clock-controller@3002000 {
|
||||
compatible = "sophgo,sg2000-clk";
|
||||
reg = <0x03002000 0x1000>;
|
||||
clocks = <&osc>;
|
||||
#clock-cells = <1>;
|
||||
};
|
||||
|
||||
plic: interrupt-controller@70000000 {
|
||||
compatible = "sophgo,sg2000-plic", "thead,c900-plic";
|
||||
reg = <0x70000000 0x4000000>;
|
||||
interrupts-extended = <&cpu0_intc 11>, <&cpu0_intc 9>;
|
||||
interrupt-controller;
|
||||
#address-cells = <0>;
|
||||
#interrupt-cells = <2>;
|
||||
riscv,ndev = <101>;
|
||||
};
|
||||
|
||||
clint: timer@74000000 {
|
||||
compatible = "sophgo,sg2000-clint", "thead,c900-clint";
|
||||
reg = <0x74000000 0x10000>;
|
||||
interrupts-extended = <&cpu0_intc 3>, <&cpu0_intc 7>;
|
||||
};
|
||||
};
|
||||
};
|
||||
121
arch/riscv/boot/dts/sophgo/sg2002-milkv-duo256m.dts
Normal file
121
arch/riscv/boot/dts/sophgo/sg2002-milkv-duo256m.dts
Normal file
|
|
@ -0,0 +1,121 @@
|
|||
// SPDX-License-Identifier: (GPL-2.0 OR MIT)
|
||||
/*
|
||||
* Copyright (C) 2023 Jisheng Zhang <jszhang@kernel.org>
|
||||
* Copyright (C) 2026 Chen-Yu Yeh <chenyou910331@gmail.com>
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
#include "sg2002.dtsi"
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/leds/common.h>
|
||||
|
||||
/ {
|
||||
model = "Milk-V Duo 256M";
|
||||
compatible = "milkv,duo256m", "sophgo,sg2002";
|
||||
|
||||
aliases {
|
||||
serial0 = &uart0;
|
||||
serial1 = &uart1;
|
||||
serial2 = &uart2;
|
||||
serial3 = &uart3;
|
||||
serial4 = &uart4;
|
||||
};
|
||||
|
||||
chosen {
|
||||
stdout-path = "serial0:115200n8";
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
led-0 {
|
||||
gpios = <&porte 2 GPIO_ACTIVE_HIGH>;
|
||||
color = <LED_COLOR_ID_BLUE>;
|
||||
function = LED_FUNCTION_STATUS;
|
||||
linux,default-trigger = "heartbeat";
|
||||
};
|
||||
};
|
||||
|
||||
reserved-memory {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
ranges;
|
||||
|
||||
coprocessor_rtos: region@8fe00000 {
|
||||
reg = <0x8fe00000 0x200000>;
|
||||
no-map;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&osc {
|
||||
clock-frequency = <25000000>;
|
||||
};
|
||||
|
||||
&pinctrl {
|
||||
uart0_cfg: uart0-cfg {
|
||||
uart0-pins {
|
||||
pinmux = <PINMUX(PIN_UART0_TX, 0)>,
|
||||
<PINMUX(PIN_UART0_RX, 0)>;
|
||||
bias-pull-up;
|
||||
drive-strength-microamp = <10800>;
|
||||
power-source = <3300>;
|
||||
};
|
||||
};
|
||||
|
||||
sdhci0_cfg: sdhci0-cfg {
|
||||
sdhci0-clk-pins {
|
||||
pinmux = <PINMUX(PIN_SD0_CLK, 0)>;
|
||||
bias-pull-up;
|
||||
drive-strength-microamp = <16100>;
|
||||
power-source = <3300>;
|
||||
};
|
||||
|
||||
sdhci0-cmd-pins {
|
||||
pinmux = <PINMUX(PIN_SD0_CMD, 0)>;
|
||||
bias-pull-up;
|
||||
drive-strength-microamp = <10800>;
|
||||
power-source = <3300>;
|
||||
};
|
||||
|
||||
sdhci0-data-pins {
|
||||
pinmux = <PINMUX(PIN_SD0_D0, 0)>,
|
||||
<PINMUX(PIN_SD0_D1, 0)>,
|
||||
<PINMUX(PIN_SD0_D2, 0)>,
|
||||
<PINMUX(PIN_SD0_D3, 0)>;
|
||||
bias-pull-up;
|
||||
drive-strength-microamp = <10800>;
|
||||
power-source = <3300>;
|
||||
};
|
||||
|
||||
sdhci0-cd-pins {
|
||||
pinmux = <PINMUX(PIN_SD0_CD, 0)>;
|
||||
bias-pull-up;
|
||||
drive-strength-microamp = <10800>;
|
||||
power-source = <3300>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&sdhci0 {
|
||||
pinctrl-0 = <&sdhci0_cfg>;
|
||||
pinctrl-names = "default";
|
||||
status = "okay";
|
||||
bus-width = <4>;
|
||||
no-1-8-v;
|
||||
no-mmc;
|
||||
no-sdio;
|
||||
disable-wp;
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
pinctrl-0 = <&uart0_cfg>;
|
||||
pinctrl-names = "default";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb {
|
||||
dr_mode = "host";
|
||||
status = "okay";
|
||||
};
|
||||
Loading…
Reference in New Issue
Block a user