From d10d89d8f6a6737fae866e636bbbcc0741a8cc11 Mon Sep 17 00:00:00 2001
From: Gunjan Gupta <viraniac@gmail.com>
Date: Tue, 19 Sep 2023 11:06:01 +0000
Subject: Add wifi nodes for Inovato Quadra

---
 arch/arm64/boot/dts/allwinner/Makefile        |  1 +
 .../allwinner/sun50i-h6-inovato-quadra.dts    | 56 +++++++++++++++++++
 2 files changed, 57 insertions(+)
 create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-h6-inovato-quadra.dts

diff --git a/arch/arm64/boot/dts/allwinner/Makefile b/arch/arm64/boot/dts/allwinner/Makefile
index dc922a71cfc1..95d2886defc8 100644
--- a/arch/arm64/boot/dts/allwinner/Makefile
+++ b/arch/arm64/boot/dts/allwinner/Makefile
@@ -49,6 +49,7 @@ dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h6-orangepi-one-plus.dtb
 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h6-pine-h64.dtb
 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h6-pine-h64-model-b.dtb
 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h6-tanix-tx6.dtb
+dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h6-inovato-quadra.dtb
 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h6-tanix-tx6-mini.dtb
 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h313-tanix-tx1.dtb
 dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h616-bigtreetech-cb1-manta.dtb
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-inovato-quadra.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-inovato-quadra.dts
new file mode 100644
index 000000000000..551ad69f18a6
--- /dev/null
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-inovato-quadra.dts
@@ -0,0 +1,56 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+// Copyright (c) 2023 Gunjan Gupta <gunjan@armbian.com>
+
+/dts-v1/;
+
+#include "sun50i-h6-tanix.dtsi"
+
+/ {
+	model = "Inovato Quadra";
+	compatible = "oranth,inovato-quadra", "allwinner,sun50i-h6";
+
+	aliases {
+		ethernet1 = &xr819;
+	};
+
+	leds {
+		compatible = "gpio-leds";
+
+		led-0 {
+			label = "red";
+			gpios = <&r_pio 0 4 GPIO_ACTIVE_HIGH>; /* PL4 */
+		};
+
+		led-1 {
+			label = "blue";
+			gpios = <&r_pio 0 7 GPIO_ACTIVE_HIGH>; /* PL7 */
+			default-state = "on";
+		};
+	};
+};
+
+&i2s1 {
+	status = "okay";
+};
+
+&mmc1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&mmc1_pins>;
+
+	xr819: sdio_wifi@1 {
+		compatible = "xradio,xr819";
+		interrupt-names = "host-wake";
+		interrupt-parent = <&r_pio>;
+		interrupts = <1 0 IRQ_TYPE_EDGE_RISING>;
+		local-mac-address = [dc 44 6d c0 ff ee];
+		reg = <1>;
+	};
+};
+
+&sound_hdmi {
+	status = "okay";
+};
+
+&wifi_pwrseq {
+	post-power-on-delay-ms = <0xc8>;
+};
-- 
2.35.3

