Skip to contentSkip to conversation

sunxi: add support for Tanix TX6

PATCH Superseded Jernej Skrabec 1 participant 4 messages Jan 3, 2021

Subsystems (2)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

cover sunxi: add support for Tanix TX6

This series introduces Tanix TX6 TV box support based on Allwinner H6 SoC. First patch syncs H6 DT files from Linux 5.11-rc1 release and second one adds support for Tanix TX6 board.

Please take a look.

Best regards,
Jernej

Jernej Skrabec (2):
ARM: dts: sunxi: h6: Update DT files
sunxi: Add support for Tanix TX6

 arch/arm/dts/Makefile                     |   3 +-
 arch/arm/dts/sun50i-h6-beelink-gs1.dts    |  70 +++-
 arch/arm/dts/sun50i-h6-cpu-opp.dtsi       | 117 +++++++
 arch/arm/dts/sun50i-h6-orangepi-lite2.dts |  71 +++-
 arch/arm/dts/sun50i-h6-orangepi.dtsi      |  72 +++-
 arch/arm/dts/sun50i-h6-pine-h64.dts       | 102 ++++--
 arch/arm/dts/sun50i-h6-tanix-tx6.dts      | 124 +++++++
 arch/arm/dts/sun50i-h6.dtsi               | 394 ++++++++++++++++++++--
 board/sunxi/MAINTAINERS                   |   6 +
 9 files changed, 890 insertions(+), 69 deletions(-)
 create mode 100644 arch/arm/dts/sun50i-h6-cpu-opp.dtsi
 create mode 100644 arch/arm/dts/sun50i-h6-tanix-tx6.dts
Signature · 1 line
2.30.0
#1 lore raw

PATCH 1/2 ARM: dts: sunxi: h6: Update DT files

Updated H6 DT files are based on Linux 5.11-rc1 release.

---
 arch/arm/dts/sun50i-h6-beelink-gs1.dts    |  70 +++-
 arch/arm/dts/sun50i-h6-cpu-opp.dtsi       | 117 +++++++
 arch/arm/dts/sun50i-h6-orangepi-lite2.dts |  71 +++-
 arch/arm/dts/sun50i-h6-orangepi.dtsi      |  72 +++-
 arch/arm/dts/sun50i-h6-pine-h64.dts       | 102 ++++--
 arch/arm/dts/sun50i-h6.dtsi               | 394 ++++++++++++++++++++--
 6 files changed, 758 insertions(+), 68 deletions(-)
 create mode 100644 arch/arm/dts/sun50i-h6-cpu-opp.dtsi
arch/arm/dts/sun50i-h6-beelink-gs1.dts +64 -6
index 0dc33c90dd60..7c9dbde645b5 100644
@@ -1,11 +1,10 @@
-// SPDX-License-Identifier: (GPL-2.0+ or MIT)
-/*
- * Copyright (C) 2019 Cl?ment P?ron <[email protected]>
- */
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+// Copyright (C) 2019 Cl?ment P?ron <[email protected]>
 
 /dts-v1/;
 
 #include "sun50i-h6.dtsi"
+#include "sun50i-h6-cpu-opp.dtsi"
 
 #include <dt-bindings/gpio/gpio.h>
 
@@ -25,6 +24,7 @@
 	connector {
 		compatible = "hdmi-connector";
 		type = "a";
+		ddc-en-gpios = <&pio 7 2 GPIO_ACTIVE_HIGH>; /* PH2 */
 
 		port {
 			hdmi_con_in: endpoint {
@@ -33,6 +33,13 @@
 		};
 	};
 
+	ext_osc32k: ext_osc32k_clk {
+		#clock-cells = <0>;
+		compatible = "fixed-clock";
+		clock-frequency = <32768>;
+		clock-output-names = "ext_osc32k";
+	};
+
 	leds {
 		compatible = "gpio-leds";
 
@@ -51,12 +58,38 @@
 		regulator-max-microvolt = <5000000>;
 		regulator-always-on;
 	};
+
+	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_dcdca>;
 };
 
 &de {
 	status = "okay";
 };
 
+&dwc3 {
+	status = "okay";
+};
+
 &ehci0 {
 	status = "okay";
 };
@@ -64,12 +97,17 @@
 &emac {
 	pinctrl-names = "default";
 	pinctrl-0 = <&ext_rgmii_pins>;
-	phy-mode = "rgmii";
+	phy-mode = "rgmii-id";
 	phy-handle = <&ext_rgmii_phy>;
 	phy-supply = <&reg_aldo2>;
 	status = "okay";
 };
 
+&gpu {
+	mali-supply = <&reg_dcdcc>;
+	status = "okay";
+};
+
 &hdmi {
 	status = "okay";
 };
@@ -201,13 +239,16 @@
 			reg_dcdca: dcdca {
 				regulator-always-on;
 				regulator-min-microvolt = <810000>;
-				regulator-max-microvolt = <1080000>;
+				regulator-max-microvolt = <1160000>;
+				regulator-ramp-delay = <2500>;
 				regulator-name = "vdd-cpu";
 			};
 
 			reg_dcdcc: dcdcc {
+				regulator-enable-ramp-delay = <32000>;
 				regulator-min-microvolt = <810000>;
 				regulator-max-microvolt = <1080000>;
+				regulator-ramp-delay = <2500>;
 				regulator-name = "vdd-gpu";
 			};
 
@@ -232,6 +273,11 @@
 	};
 };
 
+&r_ir {
+	linux,rc-map-name = "rc-beelink-gs1";
+	status = "okay";
+};
+
 &r_pio {
 	/*
 	 * PL0 and PL1 are used for PMIC I2C
@@ -243,6 +289,14 @@
 	vcc-pm-supply = <&reg_aldo1>;
 };
 
+&rtc {
+	clocks = <&ext_osc32k>;
+};
+
+&spdif {
+	status = "okay";
+};
+
 &uart0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart0_ph_pins>;
@@ -258,3 +312,7 @@
 	usb0_vbus-supply = <&reg_vcc5v>;
 	status = "okay";
 };
+
+&usb3phy {
+	status = "okay";
+};
arch/arm/dts/sun50i-h6-cpu-opp.dtsi new file +117 -0

117 lines not on this page · raw message

arch/arm/dts/sun50i-h6-orangepi-lite2.dts +67 -4

78 lines not on this page · raw message

arch/arm/dts/sun50i-h6-orangepi.dtsi +66 -6

117 lines not on this page · raw message

arch/arm/dts/sun50i-h6-pine-h64.dts +79 -23

175 lines not on this page · raw message

arch/arm/dts/sun50i-h6.dtsi +365 -29

592 lines not on this page · raw message

Signature · 1 line
2.30.0
#2 lore raw

PATCH 2/2 sunxi: Add support for Tanix TX6

In reply to Jernej Skrabec

This commit adds support for Tanix TX6 TV box, based on H6. It's low end H6 board, with 3 GiB of RAM, eMMC, fast ethernet, USB, IR and other peripherals.

DT file is taken from Linux 5.11-rc1 release.

---
 arch/arm/dts/Makefile                |   3 +-
 arch/arm/dts/sun50i-h6-tanix-tx6.dts | 124 +++++++++++++++++++++++++++
 board/sunxi/MAINTAINERS              |   6 ++
 3 files changed, 132 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/dts/sun50i-h6-tanix-tx6.dts
arch/arm/dts/Makefile +2 -1
index fd47e408f826..e00aed1ec207 100644
@@ -607,7 +607,8 @@ dtb-$(CONFIG_MACH_SUN50I_H6) += \
 	sun50i-h6-beelink-gs1.dtb \
 	sun50i-h6-orangepi-lite2.dtb \
 	sun50i-h6-orangepi-one-plus.dtb \
-	sun50i-h6-pine-h64.dtb
+	sun50i-h6-pine-h64.dtb \
+	sun50i-h6-tanix-tx6.dtb
 dtb-$(CONFIG_MACH_SUN50I) += \
 	sun50i-a64-amarula-relic.dtb \
 	sun50i-a64-bananapi-m64.dtb \
arch/arm/dts/sun50i-h6-tanix-tx6.dts new file +124 -0

124 lines not on this page · raw message

board/sunxi/MAINTAINERS +6 -0
index d3755ae41a9d..1b37a9899edd 100644
@@ -489,6 +489,12 @@ S:	Maintained
 F:	configs/Sunchip_CX-A99_defconfig
 W:	https://linux-sunxi.org/Sunchip_CX-A99
 
+TANIX TX6 BOARD
+M:	Jernej Skrabec <[email protected]>
+S:	Maintained
+F:	configs/tanix_tx6_defconfig
+W:	https://linux-sunxi.org/Tanix_TX6
+
 TBS A711 BOARD
 M:	Maxime Ripard <[email protected]>
 S:	Maintained
Signature · 1 line
2.30.0
#3 lore raw

cover sunxi: add support for Tanix TX6

In reply to Jernej Skrabec

Dne nedelja, 03. januar 2021 ob 10:56:52 CET je Jernej Skrabec napisal(a):

Quoted 8 lines

This series introduces Tanix TX6 TV box support based on Allwinner H6 SoC. First patch syncs H6 DT files from Linux 5.11-rc1 release and second one adds support for Tanix TX6 board.

Please take a look.

Best regards,
Jernej

Please disregard, I forgot to include board defconfig. I sent v2 with fix.

Regards,
Jernej