Skip to contentSkip to conversation

arm64: dts: allwinner: h6: tanix tx6

PATCH Applied Jernej Skrabec 2 participants 7 messages Dec 1, 2021 – Dec 3, 2021

Subsystems (2)
lore
Share & tools
lore

Jernej Skrabec

author maintainer
#0 lore raw

cover arm64: dts: allwinner: h6: tanix tx6

This series adds new Tanix TX6 mini DT file (less capable as Tanix TX6), adds MMC1 node for wifi and enables bluetooth on Tanix TX6 (no bluetooth on mini).

Please take a look.

Best regards,
Jernej

Jernej Skrabec (5):
arm64: dts: allwinner: h6: tanix-tx6: Split to DT and DTSI
dt-bindings: arm: sunxi: Add Tanix TX6 mini
arm64: dts: allwinner: h6: Add Tanix TX6 mini dts
arm64: dts: allwinner: h6: tanix: Add MMC1 node
arm64: dts: allwinner: h6: tanix-tx6: Enable bluetooth

 .../devicetree/bindings/arm/sunxi.yaml        |   5 +
 arch/arm64/boot/dts/allwinner/Makefile        |   1 +
 .../allwinner/sun50i-h6-tanix-tx6-mini.dts    |  15 ++
 .../dts/allwinner/sun50i-h6-tanix-tx6.dts     | 168 +---------------
 .../boot/dts/allwinner/sun50i-h6-tanix.dtsi   | 189 ++++++++++++++++++
 5 files changed, 220 insertions(+), 158 deletions(-)
 create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-h6-tanix-tx6-mini.dts
 create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-h6-tanix.dtsi
Signature · 1 line
2.34.1
author maintainer
#1 lore raw

PATCH 1/5 arm64: dts: allwinner: h6: tanix-tx6: Split to DT and DTSI

There is another very similar device to Tanix TX6, namely Tanix TX6 mini. Because most of the board design is shared, it makes sense to have common nodes in DTSI file.

---
 .../dts/allwinner/sun50i-h6-tanix-tx6.dts     | 164 +----------------
 .../boot/dts/allwinner/sun50i-h6-tanix.dtsi   | 173 ++++++++++++++++++
 2 files changed, 174 insertions(+), 163 deletions(-)
 create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-h6-tanix.dtsi
arch/arm64/boot/dts/allwinner/sun50i-h6-tanix-tx6.dts +1 -163
index 7c37aa4c60cb..a6e69f4b2666 100644
@@ -3,175 +3,13 @@
 
 /dts-v1/;
 
-#include "sun50i-h6.dtsi"
-#include "sun50i-h6-cpu-opp.dtsi"
-
-#include <dt-bindings/gpio/gpio.h>
+#include "sun50i-h6-tanix.dtsi"
 
 / {
 	model = "Tanix TX6";
 	compatible = "oranth,tanix-tx6", "allwinner,sun50i-h6";
-
-	aliases {
-		serial0 = &uart0;
-	};
-
-	chosen {
-		stdout-path = "serial0:115200n8";
-	};
-
-	connector {
-		compatible = "hdmi-connector";
-		ddc-en-gpios = <&pio 7 2 GPIO_ACTIVE_HIGH>; /* PH2 */
-		type = "a";
-
-		port {
-			hdmi_con_in: endpoint {
-				remote-endpoint = <&hdmi_out_con>;
-			};
-		};
-	};
-
-	/* used for FD650 LED display driver */
-	i2c {
-		compatible = "i2c-gpio";
-		sda-gpios = <&pio 7 6 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; /* PH6 */
-		scl-gpios = <&pio 7 5 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; /* PH5 */
-		i2c-gpio,delay-us = <5>;
-	};
-
-	reg_vcc1v8: regulator-vcc1v8 {
-		compatible = "regulator-fixed";
-		regulator-name = "vcc1v8";
-		regulator-min-microvolt = <1800000>;
-		regulator-max-microvolt = <1800000>;
-	};
-
-	reg_vcc3v3: regulator-vcc3v3 {
-		compatible = "regulator-fixed";
-		regulator-name = "vcc3v3";
-		regulator-min-microvolt = <3300000>;
-		regulator-max-microvolt = <3300000>;
-	};
-
-	reg_vdd_cpu_gpu: regulator-vdd-cpu-gpu {
-		compatible = "regulator-fixed";
-		regulator-name = "vdd-cpu-gpu";
-		regulator-min-microvolt = <1135000>;
-		regulator-max-microvolt = <1135000>;
-	};
-
-	sound-spdif {
-		compatible = "simple-audio-card";
-		simple-audio-card,name = "sun50i-h6-spdif";
-
-		simple-audio-card,cpu {
-			sound-dai = <&spdif>;
-		};
-
-		simple-audio-card,codec {
-			sound-dai = <&spdif_out>;
-		};
-	};
-
-	spdif_out: spdif-out {
-		#sound-dai-cells = <0>;
-		compatible = "linux,spdif-dit";
-	};
-};
-
-&cpu0 {
-	cpu-supply = <&reg_vdd_cpu_gpu>;
-};
-
-&de {
-	status = "okay";
-};
-
-&dwc3 {
-	status = "okay";
-};
-
-&ehci0 {
-	status = "okay";
-};
-
-&ehci3 {
-	status = "okay";
-};
-
-&gpu {
-	mali-supply = <&reg_vdd_cpu_gpu>;
-	status = "okay";
-};
-
-&hdmi {
-	status = "okay";
-};
-
-&hdmi_out {
-	hdmi_out_con: endpoint {
-		remote-endpoint = <&hdmi_con_in>;
-	};
-};
-
-&mmc0 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&mmc0_pins>;
-	vmmc-supply = <&reg_vcc3v3>;
-	cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;
-	bus-width = <4>;
-	status = "okay";
-};
-
-&mmc2 {
-	vmmc-supply = <&reg_vcc3v3>;
-	vqmmc-supply = <&reg_vcc1v8>;
-	bus-width = <8>;
-	non-removable;
-	cap-mmc-hw-reset;
-	mmc-hs200-1_8v;
-	status = "okay";
-};
-
-&ohci0 {
-	status = "okay";
-};
-
-&ohci3 {
-	status = "okay";
-};
-
-&pio {
-	vcc-pc-supply = <&reg_vcc1v8>;
-	vcc-pd-supply = <&reg_vcc3v3>;
-	vcc-pg-supply = <&reg_vcc1v8>;
 };
 
 &r_ir {
 	linux,rc-map-name = "rc-tanix-tx5max";
-	status = "okay";
-};
-
-&spdif {
-	status = "okay";
-};
-
-&uart0 {
-	pinctrl-names = "default";
-	pinctrl-0 = <&uart0_ph_pins>;
-	status = "okay";
-};
-
-&usb2otg {
-	dr_mode = "host";
-	status = "okay";
-};
-
-&usb2phy {
-	status = "okay";
-};
-
-&usb3phy {
-	status = "okay";
 };
arch/arm64/boot/dts/allwinner/sun50i-h6-tanix.dtsi new file +173 -0

173 lines not on this page · raw message

Signature · 1 line
2.34.1
author maintainer
#2 lore raw

PATCH 2/5 dt-bindings: arm: sunxi: Add Tanix TX6 mini

In reply to Jernej Skrabec

Tanix TX6 mini is, as its name suggest, very similar to Tanix TX6, but with less features. It misses bluetooth support, it has less RAM, wifi supports only 2.4G, it comes with different IR remote, etc.

---
 Documentation/devicetree/bindings/arm/sunxi.yaml | 5 +++++
 1 file changed, 5 insertions(+)
Documentation/devicetree/bindings/arm/sunxi.yaml +5 -0
index 889128acf49a..c8a3102c0fde 100644
@@ -808,6 +808,11 @@ properties:
           - const: oranth,tanix-tx6
           - const: allwinner,sun50i-h6
 
+      - description: Tanix TX6 mini
+        items:
+          - const: oranth,tanix-tx6-mini
+          - const: allwinner,sun50i-h6
+
       - description: TBS A711 Tablet
         items:
           - const: tbs-biometrics,a711
Signature · 1 line
2.34.1
author maintainer
#3 lore raw

PATCH 3/5 arm64: dts: allwinner: h6: Add Tanix TX6 mini dts

In reply to Jernej Skrabec

Tanix TX6 mini is less capable version of Tanix TX6 although it comes with some features not present on Tanix TX6.

Basic specs:
- H6 SoC
- 2 GiB DDR3 RAM
- HDMI
- SPDIF
- 2x USB
- analogue audio
- CVBS
- SD card
- IR remote
- LED display
- fast ethernet
- XR819 wifi
- 16 GiB eMMC

Currently supported features doesn't differ that much from Tanix TX6, but that will change soon.

---
 arch/arm64/boot/dts/allwinner/Makefile            |  1 +
 .../dts/allwinner/sun50i-h6-tanix-tx6-mini.dts    | 15 +++++++++++++++
 2 files changed, 16 insertions(+)
 create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-h6-tanix-tx6-mini.dts
arch/arm64/boot/dts/allwinner/Makefile +1 -0
index a96d9d2d8dd8..8fa5c060a4fe 100644
@@ -37,3 +37,4 @@ 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-tanix-tx6-mini.dtb
arch/arm64/boot/dts/allwinner/sun50i-h6-tanix-tx6-mini.dts new file +15 -0
new file mode 100644
index 000000000000..08d84160d88f
@@ -0,0 +1,15 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+// Copyright (c) 2021 Jernej Skrabec <[email protected]>
+
+/dts-v1/;
+
+#include "sun50i-h6-tanix.dtsi"
+
+/ {
+	model = "Tanix TX6 mini";
+	compatible = "oranth,tanix-tx6-mini", "allwinner,sun50i-h6";
+};
+
+&r_ir {
+	linux,rc-map-name = "rc-tanix-tx3mini";
+};
Signature · 1 line
2.34.1
author maintainer
#4 lore raw

PATCH 4/5 arm64: dts: allwinner: h6: tanix: Add MMC1 node

In reply to Jernej Skrabec

Both, Tanix TX6 and Tanix TX6 mini, have SDIO wifi module, albeit different. However, driver can be autoprobed via SDIO ID.

Add MMC1 node, so kernel can discover wifi module and load driver for it.

---
 .../boot/dts/allwinner/sun50i-h6-tanix.dtsi      | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
arch/arm64/boot/dts/allwinner/sun50i-h6-tanix.dtsi +16 -0
index 166b6a7a586c..edb71e4a0304 100644
@@ -75,6 +75,13 @@ spdif_out: spdif-out {
 		#sound-dai-cells = <0>;
 		compatible = "linux,spdif-dit";
 	};
+
+	wifi_pwrseq: wifi-pwrseq {
+		compatible = "mmc-pwrseq-simple";
+		clocks = <&rtc 1>;
+		clock-names = "ext_clock";
+		reset-gpios = <&r_pio 1 3 GPIO_ACTIVE_LOW>; /* PM3 */
+	};
 };
 
 &cpu0 {
@@ -121,6 +128,15 @@ &mmc0 {
 	status = "okay";
 };
 
+&mmc1 {
+	vmmc-supply = <&reg_vcc3v3>;
+	vqmmc-supply = <&reg_vcc1v8>;
+	mmc-pwrseq = <&wifi_pwrseq>;
+	bus-width = <4>;
+	non-removable;
+	status = "okay";
+};
+
 &mmc2 {
 	vmmc-supply = <&reg_vcc3v3>;
 	vqmmc-supply = <&reg_vcc1v8>;
Signature · 1 line
2.34.1
author maintainer
#5 lore raw

PATCH 5/5 arm64: dts: allwinner: h6: tanix-tx6: Enable bluetooth

In reply to Jernej Skrabec

Tanix TX6 comes either with RTL8822BS or RTL8822CS wifi+bt combo module. Wifi part is already enabled in tanix DTSI. Let's enable also bluetooth.

---
 .../boot/dts/allwinner/sun50i-h6-tanix-tx6.dts     | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
arch/arm64/boot/dts/allwinner/sun50i-h6-tanix-tx6.dts +14 -0
index a6e69f4b2666..9a38ff9b3fc7 100644
@@ -13,3 +13,17 @@ / {
 &r_ir {
 	linux,rc-map-name = "rc-tanix-tx5max";
 };
+
+&uart1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>;
+	uart-has-rtscts;
+	status = "okay";
+
+	bluetooth {
+		compatible = "realtek,rtl8822cs-bt";
+		device-wake-gpios = <&r_pio 1 2 GPIO_ACTIVE_HIGH>; /* PM2 */
+		host-wake-gpios = <&r_pio 1 1 GPIO_ACTIVE_HIGH>; /* PM1 */
+		enable-gpios = <&r_pio 1 4 GPIO_ACTIVE_HIGH>; /* PM4 */
+	};
+};
Signature · 1 line
2.34.1
#6 lore raw
In reply to Jernej Skrabec
Quoted 10 lines · Jernej Skrabec

This series adds new Tanix TX6 mini DT file (less capable as Tanix TX6), adds MMC1 node for wifi and enables bluetooth on Tanix TX6 (no bluetooth on mini).

Please take a look.

Best regards,
Jernej

[...]

Applied to sunxi/linux.git (sunxi/dt-for-5.17).

Thanks!
Maxime