]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
riscv: dts: spacemit: Add OrangePi RV2 board device tree
authorHendrik Hamerlinck <hendrik.hamerlinck@hammernet.be>
Wed, 13 Aug 2025 09:22:40 +0000 (11:22 +0200)
committerYixun Lan <dlan@gentoo.org>
Fri, 15 Aug 2025 01:28:28 +0000 (09:28 +0800)
Add initial device tree support for the OrangePi RV2 board [1]. The board
is described as using the Ky X1 SoC, which, based on available downstream
sources and testing, appears to be identical or very closely related to
the SpacemiT K1 SoC [2].

The device tree is adapted from the OrangePi vendor tree [3], and similar
integration can be found in the Banana Pi kernel tree [4], confirming SoC
compatibility. The main difference with the current Banana Pi BPI-F3 tree
is that status led is using GPIO_ACTIVE_LOW.

This minimal device tree enables booting into a serial console with UART
output and a blinking LED.

Link: http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/details/Orange-Pi-RV2.html
Link: https://www.spacemit.com/en/key-stone-k1
Link: https://github.com/BPI-SINOVOIP/pi-linux/blob/linux-6.6.63-k1/arch/riscv/boot/dts/spacemit/k1-x_orangepi-rv2.dts
Link: https://github.com/orangepi-xunlong/linux-orangepi/tree/orange-pi-6.6-ky
Signed-off-by: Hendrik Hamerlinck <hendrik.hamerlinck@hammernet.be>
Reviewed-by: Yixun Lan <dlan@gentoo.org>
Link: https://lore.kernel.org/r/20250813092240.180333-3-hendrik.hamerlinck@hammernet.be
Signed-off-by: Yixun Lan <dlan@gentoo.org>
arch/riscv/boot/dts/spacemit/Makefile
arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts [new file with mode: 0644]

index 92e13ce1c16d552d988ffc6a25b115f2a793019c..152832644870624d8fd77684ef33addb42b0baf3 100644 (file)
@@ -1,3 +1,4 @@
 # SPDX-License-Identifier: GPL-2.0
 dtb-$(CONFIG_ARCH_SPACEMIT) += k1-bananapi-f3.dtb
 dtb-$(CONFIG_ARCH_SPACEMIT) += k1-milkv-jupiter.dtb
+dtb-$(CONFIG_ARCH_SPACEMIT) += k1-orangepi-rv2.dtb
diff --git a/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts b/arch/riscv/boot/dts/spacemit/k1-orangepi-rv2.dts
new file mode 100644 (file)
index 0000000..337240e
--- /dev/null
@@ -0,0 +1,40 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/*
+ * Copyright (C) 2024 Yangyu Chen <cyy@cyyself.name>
+ * Copyright (C) 2025 Hendrik Hamerlinck <hendrik.hamerlinck@hammernet.be>
+ */
+
+/dts-v1/;
+
+#include "k1.dtsi"
+#include "k1-pinctrl.dtsi"
+
+/ {
+       model = "OrangePi RV2";
+       compatible = "xunlong,orangepi-rv2", "spacemit,k1";
+
+       aliases {
+               serial0 = &uart0;
+       };
+
+       chosen {
+               stdout-path = "serial0";
+       };
+
+       leds {
+               compatible = "gpio-leds";
+
+               led1 {
+                       label = "sys-led";
+                       gpios = <&gpio K1_GPIO(96) GPIO_ACTIVE_LOW>;
+                       linux,default-trigger = "heartbeat";
+                       default-state = "on";
+               };
+       };
+};
+
+&uart0 {
+       pinctrl-names = "default";
+       pinctrl-0 = <&uart0_2_cfg>;
+       status = "okay";
+};