riscv: dts: sophgo: add device tree for LicheeRV Nano
Import a slightly modified version of the LicheeRV Nano and SG2002 device trees from the Linux Kernel. The current supported IPs are UART, MMC, Timer, PLIC and CLINT. Signed-off-by: Thomas Bonnefille <thomas.bonnefille@bootlin.com>
This commit is contained in:

committed by
Leo Yu-Chi Liang

parent
62181bbf71
commit
4897de90c3
@@ -2,6 +2,7 @@
|
||||
|
||||
dtb-$(CONFIG_TARGET_ANDES_AE350) += ae350_32.dtb ae350_64.dtb
|
||||
dtb-$(CONFIG_TARGET_MILKV_DUO) += cv1800b-milkv-duo.dtb
|
||||
dtb-$(CONFIG_TARGET_LICHEERV_NANO) += sg2002-licheerv-nano-b.dtb
|
||||
dtb-$(CONFIG_TARGET_QEMU_VIRT) += qemu-virt32.dtb qemu-virt64.dtb
|
||||
dtb-$(CONFIG_TARGET_OPENPITON_RISCV64) += openpiton-riscv64.dtb
|
||||
dtb-$(CONFIG_TARGET_SIFIVE_UNLEASHED) += hifive-unleashed-a00.dtb
|
||||
|
45
arch/riscv/dts/sg2002-licheerv-nano-b.dts
Normal file
45
arch/riscv/dts/sg2002-licheerv-nano-b.dts
Normal file
@@ -0,0 +1,45 @@
|
||||
// SPDX-License-Identifier: (GPL-2.0 OR MIT)
|
||||
/*
|
||||
* Copyright (C) 2024 Thomas Bonnefille <thomas.bonnefille@bootlin.com>
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
#include "sg2002.dtsi"
|
||||
|
||||
/ {
|
||||
model = "LicheeRV Nano B";
|
||||
compatible = "sipeed,licheerv-nano-b", "sipeed,licheerv-nano", "sophgo,sg2002";
|
||||
|
||||
aliases {
|
||||
gpio0 = &gpio0;
|
||||
gpio1 = &gpio1;
|
||||
gpio2 = &gpio2;
|
||||
gpio3 = &gpio3;
|
||||
serial0 = &uart0;
|
||||
serial1 = &uart1;
|
||||
serial2 = &uart2;
|
||||
serial3 = &uart3;
|
||||
serial4 = &uart4;
|
||||
};
|
||||
|
||||
chosen {
|
||||
stdout-path = "serial0:115200n8";
|
||||
};
|
||||
};
|
||||
|
||||
&osc {
|
||||
clock-frequency = <25000000>;
|
||||
};
|
||||
|
||||
&sdhci0 {
|
||||
status = "okay";
|
||||
bus-width = <4>;
|
||||
no-1-8-v;
|
||||
no-mmc;
|
||||
no-sdio;
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
status = "okay";
|
||||
};
|
34
arch/riscv/dts/sg2002.dtsi
Normal file
34
arch/riscv/dts/sg2002.dtsi
Normal file
@@ -0,0 +1,34 @@
|
||||
// SPDX-License-Identifier: (GPL-2.0 OR MIT)
|
||||
/*
|
||||
* Copyright (C) 2024 Thomas Bonnefille <thomas.bonnefille@bootlin.com>
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
|
||||
#include <dt-bindings/interrupt-controller/irq.h>
|
||||
#include "cv18xx.dtsi"
|
||||
|
||||
/ {
|
||||
compatible = "sophgo,sg2002";
|
||||
|
||||
memory@80000000 {
|
||||
device_type = "memory";
|
||||
reg = <0x80000000 0x10000000>;
|
||||
};
|
||||
};
|
||||
|
||||
&plic {
|
||||
compatible = "sophgo,sg2002-plic", "sophgo,cv1800b-plic", "thead,c900-plic";
|
||||
};
|
||||
|
||||
&clint {
|
||||
compatible = "sophgo,sg2002-plic", "sophgo,cv1800b-clint", "thead,c900-clint";
|
||||
};
|
||||
|
||||
&clk {
|
||||
compatible = "sophgo,sg2002-clk", "sophgo,cv1800-clk";
|
||||
};
|
||||
|
||||
&sdhci0 {
|
||||
compatible = "sophgo,sg2002-dwcmshc", "sophgo,cv1800b-dwcmshc";
|
||||
};
|
Reference in New Issue
Block a user