sunxi: move whole new device tree out of patches

This commit is contained in:
EvilOlaf 2026-01-10 07:39:50 +00:00 committed by Werner
parent 6881a93e06
commit 5d007ab5bc
5 changed files with 260 additions and 297 deletions

View File

@ -0,0 +1,225 @@
// SPDX-License-Identifier: (GPL-2.0+ or MIT)
/*
* Based original Sunvell R69 FEX file (2019 karabek)
*/
/dts-v1/;
#include "sun8i-h3.dtsi"
#include "sunxi-common-regulators.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/pinctrl/sun4i-a10.h>
/ {
model = "Sunvell R69";
compatible = "sunvell,sunvell-r69", "allwinner,sun8i-h2-plus";
aliases {
ethernet0 = &emac;
ethernet1 = &xr819;
serial0 = &uart0;
};
chosen {
stdout-path = "serial0:115200n8";
};
connector {
compatible = "hdmi-connector";
type = "a";
port {
hdmi_con_in: endpoint {
remote-endpoint = <&hdmi_out_con>;
};
};
};
leds {
compatible = "gpio-leds";
pinctrl-names = "default";
pinctrl-0 = <&leds_opc>, <&leds_r_opc>;
pwr_led {
label = "sunvell-r69:red:pwr";
gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>;
};
status_led {
label = "sunvell-r69:blue:status";
gpios = <&pio 0 15 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "heartbeat";
};
};
reg_vdd_cpux: vdd-cpux-regulator {
compatible = "regulator-gpio";
regulator-name = "vdd-cpux";
regulator-type = "voltage";
regulator-boot-on;
regulator-always-on;
regulator-min-microvolt = <1100000>;
regulator-max-microvolt = <1300000>;
regulator-ramp-delay = <50>; /* 4ms */
gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6 */
enable-active-high;
gpios-states = <0x1>;
states = <1100000 0x0
1300000 0x1>;
};
reg_vcc_wifi: reg_vcc_wifi {
compatible = "regulator-fixed";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-name = "vcc-wifi";
gpio = <&r_pio 0 7 GPIO_ACTIVE_HIGH>;
startup-delay-us = <70000>;
enable-active-high;
};
wifi_pwrseq: wifi_pwrseq {
compatible = "mmc-pwrseq-simple";
reset-gpios = <&r_pio 0 0 GPIO_ACTIVE_LOW>;
post-power-on-delay-ms = <200>;
};
};
&cpu0 {
cpu-supply = <&reg_vdd_cpux>;
};
&de {
status = "okay";
};
&ehci0 {
status = "okay";
};
&ehci1 {
status = "okay";
};
&emac {
phy-handle = <&int_mii_phy>;
phy-mode = "mii";
allwinner,leds-active-low;
status = "okay";
};
&hdmi {
status = "okay";
};
&hdmi_out {
hdmi_out_con: endpoint {
remote-endpoint = <&hdmi_con_in>;
};
};
&ir {
pinctrl-names = "default";
pinctrl-0 = <&r_ir_rx_pin>; /* <&r_ir_rx_pin> */
status = "okay";
};
&mmc0 {
vmmc-supply = <&reg_vcc3v3>;
bus-width = <4>;
cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
status = "okay";
};
&mmc1 {
vmmc-supply = <&reg_vcc_wifi>;
mmc-pwrseq = <&wifi_pwrseq>;
bus-width = <4>;
non-removable;
status = "okay";
xr819: sdio_wifi@1 {
reg = <1>;
compatible = "xradio,xr819";
interrupt-parent = <&pio>;
interrupts = <0 11 IRQ_TYPE_EDGE_RISING>;
interrupt-names = "host-wake";
};
};
&mmc2 {
pinctrl-names = "default";
pinctrl-0 = <&mmc2_8bit_pins>;
vmmc-supply = <&reg_vcc3v3>;
bus-width = <8>;
non-removable;
cap-mmc-hw-reset;
status = "okay";
};
&mmc2_8bit_pins {
/* Increase current from 30mA to 40mA for DDR eMMC */
allwinner,drive = <SUN4I_PINCTRL_40_MA>;
};
&ohci0 {
status = "okay";
};
&ohci1 {
status = "okay";
};
&pio {
leds_opc: led_pins {
pins = "PA15";
function = "gpio_out";
};
};
&r_pio {
leds_r_opc: led_pins {
pins = "PL10";
function = "gpio_out";
};
};
&reg_usb0_vbus {
gpio = <&r_pio 0 2 GPIO_ACTIVE_HIGH>; /* PL2 */
status = "okay";
};
&uart0 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_pa_pins>;
status = "okay";
};
&uart1 {
pinctrl-names = "default";
pinctrl-0 = <&uart1_pins>;
status = "disabled";
};
&uart2 {
pinctrl-names = "default";
pinctrl-0 = <&uart2_pins>;
status = "disabled";
};
&uart3 {
pinctrl-names = "default";
pinctrl-0 = <&uart3_pins>;
status = "disabled";
};
&usb_otg {
dr_mode = "host";
status = "okay";
};
&usbphy {
status = "okay";
};

View File

@ -0,0 +1,34 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include "sun8i-h3-orangepi-pc.dts"
/ {
model = "Xunlong Orange Pi PC Sapomat";
sapomat_gpio_keys {
compatible = "gpio-keys-polled";
poll-interval = <50>;
pinctrl-names = "default";
pinctrl-0 = <&sapomat_btn_pins>;
red_btn {
label = "Red Button";
linux,code = <BTN_4>;
gpios = <&pio 2 4 GPIO_ACTIVE_LOW>; /* PC4 */
};
green_btn {
label = "Green Button";
linux,code = <BTN_5>;
gpios = <&pio 2 7 GPIO_ACTIVE_LOW>; /* PC7 */
};
};
};
&pio {
sapomat_btn_pins: btn_pins@0 {
pins = "PC4", "PC7";
function = "gpio_in";
bias-pull-up;
};
};

View File

@ -1,243 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: The-going <48602507+The-going@users.noreply.github.com>
Date: Mon, 24 Jan 2022 15:23:33 +0300
Subject: arm:dts: Add sun8i-h2-plus-sunvell-r69 device
---
arch/arm/boot/dts/allwinner/sun8i-h2-plus-sunvell-r69.dts | 225 ++++++++++
1 file changed, 225 insertions(+)
diff --git a/arch/arm/boot/dts/allwinner/sun8i-h2-plus-sunvell-r69.dts b/arch/arm/boot/dts/allwinner/sun8i-h2-plus-sunvell-r69.dts
new file mode 100644
index 000000000000..111111111111
--- /dev/null
+++ b/arch/arm/boot/dts/allwinner/sun8i-h2-plus-sunvell-r69.dts
@@ -0,0 +1,225 @@
+// SPDX-License-Identifier: (GPL-2.0+ or MIT)
+/*
+ * Based original Sunvell R69 FEX file (2019 karabek)
+ */
+
+/dts-v1/;
+#include "sun8i-h3.dtsi"
+#include "sunxi-common-regulators.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/pinctrl/sun4i-a10.h>
+
+/ {
+ model = "Sunvell R69";
+ compatible = "sunvell,sunvell-r69", "allwinner,sun8i-h2-plus";
+
+ aliases {
+ ethernet0 = &emac;
+ ethernet1 = &xr819;
+ serial0 = &uart0;
+ };
+
+ chosen {
+ stdout-path = "serial0:115200n8";
+ };
+
+ connector {
+ compatible = "hdmi-connector";
+ type = "a";
+
+ port {
+ hdmi_con_in: endpoint {
+ remote-endpoint = <&hdmi_out_con>;
+ };
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+ pinctrl-names = "default";
+ pinctrl-0 = <&leds_opc>, <&leds_r_opc>;
+
+ pwr_led {
+ label = "sunvell-r69:red:pwr";
+ gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>;
+ };
+
+ status_led {
+ label = "sunvell-r69:blue:status";
+ gpios = <&pio 0 15 GPIO_ACTIVE_HIGH>;
+ linux,default-trigger = "heartbeat";
+ };
+ };
+
+ reg_vdd_cpux: vdd-cpux-regulator {
+ compatible = "regulator-gpio";
+ regulator-name = "vdd-cpux";
+ regulator-type = "voltage";
+ regulator-boot-on;
+ regulator-always-on;
+ regulator-min-microvolt = <1100000>;
+ regulator-max-microvolt = <1300000>;
+ regulator-ramp-delay = <50>; /* 4ms */
+
+ gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6 */
+ enable-active-high;
+ gpios-states = <0x1>;
+ states = <1100000 0x0
+ 1300000 0x1>;
+ };
+
+ reg_vcc_wifi: reg_vcc_wifi {
+ compatible = "regulator-fixed";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-name = "vcc-wifi";
+ gpio = <&r_pio 0 7 GPIO_ACTIVE_HIGH>;
+ startup-delay-us = <70000>;
+ enable-active-high;
+ };
+
+ wifi_pwrseq: wifi_pwrseq {
+ compatible = "mmc-pwrseq-simple";
+ reset-gpios = <&r_pio 0 0 GPIO_ACTIVE_LOW>;
+ post-power-on-delay-ms = <200>;
+ };
+};
+
+&cpu0 {
+ cpu-supply = <&reg_vdd_cpux>;
+};
+
+&de {
+ status = "okay";
+};
+
+&ehci0 {
+ status = "okay";
+};
+
+&ehci1 {
+ status = "okay";
+};
+
+&emac {
+ phy-handle = <&int_mii_phy>;
+ phy-mode = "mii";
+ allwinner,leds-active-low;
+ status = "okay";
+};
+
+&hdmi {
+ status = "okay";
+};
+
+&hdmi_out {
+ hdmi_out_con: endpoint {
+ remote-endpoint = <&hdmi_con_in>;
+ };
+};
+
+&ir {
+ pinctrl-names = "default";
+ pinctrl-0 = <&r_ir_rx_pin>; /* <&r_ir_rx_pin> */
+ status = "okay";
+};
+
+&mmc0 {
+ vmmc-supply = <&reg_vcc3v3>;
+ bus-width = <4>;
+ cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
+ status = "okay";
+};
+
+&mmc1 {
+ vmmc-supply = <&reg_vcc_wifi>;
+ mmc-pwrseq = <&wifi_pwrseq>;
+ bus-width = <4>;
+ non-removable;
+ status = "okay";
+
+ xr819: sdio_wifi@1 {
+ reg = <1>;
+ compatible = "xradio,xr819";
+ interrupt-parent = <&pio>;
+ interrupts = <0 11 IRQ_TYPE_EDGE_RISING>;
+ interrupt-names = "host-wake";
+ };
+};
+
+&mmc2 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&mmc2_8bit_pins>;
+ vmmc-supply = <&reg_vcc3v3>;
+ bus-width = <8>;
+ non-removable;
+ cap-mmc-hw-reset;
+ status = "okay";
+};
+
+&mmc2_8bit_pins {
+ /* Increase current from 30mA to 40mA for DDR eMMC */
+ allwinner,drive = <SUN4I_PINCTRL_40_MA>;
+};
+
+&ohci0 {
+ status = "okay";
+};
+
+&ohci1 {
+ status = "okay";
+};
+
+&pio {
+ leds_opc: led_pins {
+ pins = "PA15";
+ function = "gpio_out";
+ };
+};
+
+&r_pio {
+ leds_r_opc: led_pins {
+ pins = "PL10";
+ function = "gpio_out";
+ };
+};
+
+&reg_usb0_vbus {
+ gpio = <&r_pio 0 2 GPIO_ACTIVE_HIGH>; /* PL2 */
+ status = "okay";
+};
+
+&uart0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart0_pa_pins>;
+ status = "okay";
+};
+
+&uart1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart1_pins>;
+ status = "disabled";
+};
+
+&uart2 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart2_pins>;
+ status = "disabled";
+};
+
+&uart3 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart3_pins>;
+ status = "disabled";
+};
+
+&usb_otg {
+ dr_mode = "host";
+ status = "okay";
+};
+
+&usbphy {
+ status = "okay";
+};
--
Armbian

View File

@ -1,52 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20Jirman?= <megi@xff.cz>
Date: Fri, 18 Aug 2017 13:56:06 +0200
Subject: Add support for my private Sapomat device
---
arch/arm/boot/dts/allwinner/sun8i-h3-orangepi-pc-sapomat.dts | 34 ++++++++++
1 file changed, 34 insertions(+)
diff --git a/arch/arm/boot/dts/allwinner/sun8i-h3-orangepi-pc-sapomat.dts b/arch/arm/boot/dts/allwinner/sun8i-h3-orangepi-pc-sapomat.dts
new file mode 100644
index 000000000000..111111111111
--- /dev/null
+++ b/arch/arm/boot/dts/allwinner/sun8i-h3-orangepi-pc-sapomat.dts
@@ -0,0 +1,34 @@
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include "sun8i-h3-orangepi-pc.dts"
+
+/ {
+ model = "Xunlong Orange Pi PC Sapomat";
+
+ sapomat_gpio_keys {
+ compatible = "gpio-keys-polled";
+ poll-interval = <50>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&sapomat_btn_pins>;
+
+ red_btn {
+ label = "Red Button";
+ linux,code = <BTN_4>;
+ gpios = <&pio 2 4 GPIO_ACTIVE_LOW>; /* PC4 */
+ };
+
+ green_btn {
+ label = "Green Button";
+ linux,code = <BTN_5>;
+ gpios = <&pio 2 7 GPIO_ACTIVE_LOW>; /* PC7 */
+ };
+ };
+};
+
+&pio {
+ sapomat_btn_pins: btn_pins@0 {
+ pins = "PC4", "PC7";
+ function = "gpio_in";
+ bias-pull-up;
+ };
+};
--
Armbian

View File

@ -259,7 +259,7 @@
patches.megous/ppkb-6.18/0015-misc-ppkb-manager-Disable-debug-mode.patch
patches.megous/ppkb-6.18/0016-ip5xxx-fix-POWER_SUPPLY_PROP_CHARGE_BEHAVIOUR.patch
patches.megous/private-6.18/0001-Make-microbuttons-on-Orange-Pi-PC-and-PC-2-work-as-p.patch
patches.megous/private-6.18/0002-Add-support-for-my-private-Sapomat-device.patch
- patches.megous/private-6.18/0002-Add-support-for-my-private-Sapomat-device.patch # added to autopatcher, patchfile removed
patches.megous/private-6.18/0003-ARM-dts-sun8i-h3-orange-pi-one-Enable-all-gpio-heade.patch
patches.megous/private-6.18/0004-mtd-spi-nor-Add-Alliance-memory-support.patch
patches.megous/pt2-6.18/0001-arm64-dts-rk3566-pientab2-Use-non-linear-brightness-.patch
@ -469,7 +469,6 @@
patches.armbian/arm-dts-a20-orangepi-and-mini-fix-phy-mode-hdmi.patch
patches.armbian/arm-dts-sun8i-h3-nanopi-add-leds-pio-pins.patch
patches.armbian/arm-dts-a10-cubiebord-a20-cubietruck-green-LED-mmc0-default-tri.patch
patches.armbian/arm-dts-Add-sun8i-h2-plus-sunvell-r69-device.patch
patches.armbian/arm-dts-h3-nanopi-neo-Add-regulator-leds-mmc2.patch
patches.armbian/arm-dts-h3-nanopi-neo-air-Add-regulator-camera-wifi-bluetooth-o.patch
patches.armbian/arm-dts-h3-orangepi-2-Add-regulator-vdd-cpu.patch