Skip to content

Commit

Permalink
riscv: dts: t-head: Add basic device tree for Sipeed Lichee PI 4A board
Browse files Browse the repository at this point in the history
Only add basic support for CPU, PLIC UART and Timer.

Reviewed-by: Wei Fu <wefu@redhat.com>
Signed-off-by: Yixun Lan <dlan@gentoo.org>
  • Loading branch information
dlan17 committed May 23, 2023
1 parent bca3adc commit db820a7
Show file tree
Hide file tree
Showing 4 changed files with 502 additions and 0 deletions.
1 change: 1 addition & 0 deletions arch/riscv/dts/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ dtb-$(CONFIG_TARGET_SIFIVE_UNMATCHED) += hifive-unmatched-a00.dtb
dtb-$(CONFIG_TARGET_SIPEED_MAIX) += k210-maix-bit.dtb
dtb-$(CONFIG_TARGET_STARFIVE_VISIONFIVE2) += jh7110-starfive-visionfive-2-v1.3b.dtb
dtb-$(CONFIG_TARGET_STARFIVE_VISIONFIVE2) += jh7110-starfive-visionfive-2-v1.2a.dtb
dtb-$(CONFIG_TARGET_TH1520_LPI4A) += th1520-lichee-pi-4a.dtb
include $(srctree)/scripts/Makefile.dts

targets += $(dtb-y)
Expand Down
34 changes: 34 additions & 0 deletions arch/riscv/dts/th1520-lichee-module-4a.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (C) 2023 Jisheng Zhang <jszhang@kernel.org>
*/

/dts-v1/;

#include "th1520.dtsi"

/ {
model = "Sipeed Lichee Module 4A";
compatible = "sipeed,lichee-module-4a", "thead,th1520";

memory@0 {
device_type = "memory";
reg = <0x0 0x00000000 0x2 0x00000000>;
};
};

&osc {
clock-frequency = <24000000>;
};

&osc_32k {
clock-frequency = <32768>;
};

&apb_clk {
clock-frequency = <62500000>;
};

&uart_sclk {
clock-frequency = <100000000>;
};
32 changes: 32 additions & 0 deletions arch/riscv/dts/th1520-lichee-pi-4a.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (C) 2023 Jisheng Zhang <jszhang@kernel.org>
*/

#include "th1520-lichee-module-4a.dtsi"

/ {
model = "Sipeed Lichee Pi 4A";
compatible = "sipeed,lichee-pi-4a", "sipeed,lichee-module-4a", "thead,th1520";

aliases {
gpio0 = &gpio0;
gpio1 = &gpio1;
gpio2 = &gpio2;
gpio3 = &gpio3;
serial0 = &uart0;
serial1 = &uart1;
serial2 = &uart2;
serial3 = &uart3;
serial4 = &uart4;
serial5 = &uart5;
};

chosen {
stdout-path = "serial0:115200n8";
};
};

&uart0 {
status = "okay";
};

0 comments on commit db820a7

Please sign in to comment.