Skip to content

Commit 04a9963

Browse files
Andre-ARMjernejsk
authored andcommitted
arm64: dts: allwinner: Add Tanix TX1 support
The Tanix TX1 is a tiny TV box with the Allwinner H313 SoC. The box features no Ethernet or an SD card slot, which makes booting from it somewhat interesting: Pressing the hidden FEL button and using a USB-A to USB-A cable to upload code from a host PC is one way to run mainline. The box features: - Allwinner H313 SoC (4 * Arm Cortex-A53 cores) - 1 or 2 GB DRAM - 8 or 16 GB eMMC flash - SCI S9082H WiFi chip - HDMI port - one USB 2.0 port - 3.5mm AV port - barrel plug 5V DC input via barrel plug The devicetree covers most peripherals. The eMMC did not work properly in HS200 speed mode, so this mode property is omitted. HS-DDR seems to work fine. The blue LED is connected to the same GPIO pin as the red LED, just using the opposite polarity. Apparently there is no way of describing this in DT, so the red LED is omitted. Next to the FEL button is a hidden button, that can be pushed by using something like a paperclip, through the ventilation vents of the case. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com> Link: https://lore.kernel.org/r/20240418104942.1556914-3-andre.przywara@arm.com Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
1 parent 8ee9a40 commit 04a9963

2 files changed

Lines changed: 184 additions & 0 deletions

File tree

arch/arm64/boot/dts/allwinner/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h6-pine-h64.dtb
3939
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h6-pine-h64-model-b.dtb
4040
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h6-tanix-tx6.dtb
4141
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h6-tanix-tx6-mini.dtb
42+
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h313-tanix-tx1.dtb
4243
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h616-bigtreetech-cb1-manta.dtb
4344
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h616-bigtreetech-pi.dtb
4445
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h616-orangepi-zero2.dtb
Lines changed: 183 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,183 @@
1+
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2+
/*
3+
* Copyright (C) 2024 Arm Ltd.
4+
*/
5+
6+
/dts-v1/;
7+
8+
#include "sun50i-h616.dtsi"
9+
10+
#include <dt-bindings/gpio/gpio.h>
11+
#include <dt-bindings/interrupt-controller/arm-gic.h>
12+
#include <dt-bindings/input/linux-event-codes.h>
13+
#include <dt-bindings/leds/common.h>
14+
15+
/ {
16+
model = "Tanix TX1";
17+
compatible = "oranth,tanix-tx1", "allwinner,sun50i-h616";
18+
19+
aliases {
20+
serial0 = &uart0;
21+
ethernet0 = &sdio_wifi;
22+
};
23+
24+
chosen {
25+
stdout-path = "serial0:115200n8";
26+
};
27+
28+
gpio-keys {
29+
compatible = "gpio-keys";
30+
31+
key {
32+
label = "hidden";
33+
linux,code = <BTN_0>;
34+
gpios = <&pio 7 9 GPIO_ACTIVE_LOW>; /* PH9 */
35+
};
36+
};
37+
38+
leds {
39+
compatible = "gpio-leds";
40+
41+
led-0 {
42+
function = LED_FUNCTION_POWER;
43+
color = <LED_COLOR_ID_BLUE>;
44+
gpios = <&pio 7 6 GPIO_ACTIVE_HIGH>; /* PH6 */
45+
default-state = "on";
46+
};
47+
};
48+
49+
wifi_pwrseq: pwrseq {
50+
compatible = "mmc-pwrseq-simple";
51+
clocks = <&rtc CLK_OSC32K_FANOUT>;
52+
clock-names = "ext_clock";
53+
pinctrl-0 = <&x32clk_fanout_pin>;
54+
pinctrl-names = "default";
55+
reset-gpios = <&pio 6 18 GPIO_ACTIVE_LOW>; /* PG18 */
56+
};
57+
58+
reg_vcc5v: vcc5v {
59+
/* board wide 5V supply directly from the DC input */
60+
compatible = "regulator-fixed";
61+
regulator-name = "vcc-5v";
62+
regulator-min-microvolt = <5000000>;
63+
regulator-max-microvolt = <5000000>;
64+
regulator-always-on;
65+
};
66+
};
67+
68+
&cpu0 {
69+
cpu-supply = <&reg_dcdc2>;
70+
};
71+
72+
&ehci0 {
73+
status = "okay";
74+
};
75+
76+
&ir {
77+
status = "okay";
78+
};
79+
80+
&mmc1 {
81+
vmmc-supply = <&reg_dldo1>;
82+
vqmmc-supply = <&reg_aldo1>;
83+
mmc-pwrseq = <&wifi_pwrseq>;
84+
bus-width = <4>;
85+
non-removable;
86+
status = "okay";
87+
88+
sdio_wifi: wifi@1 {
89+
reg = <1>;
90+
};
91+
};
92+
93+
&mmc2 {
94+
vmmc-supply = <&reg_dldo1>;
95+
vqmmc-supply = <&reg_aldo1>;
96+
bus-width = <8>;
97+
non-removable;
98+
max-frequency = <100000000>;
99+
cap-mmc-hw-reset;
100+
mmc-ddr-1_8v;
101+
status = "okay";
102+
};
103+
104+
&ohci0 {
105+
status = "okay";
106+
};
107+
108+
&pio {
109+
vcc-pc-supply = <&reg_aldo1>;
110+
vcc-pf-supply = <&reg_dldo1>;
111+
vcc-pg-supply = <&reg_aldo1>;
112+
vcc-ph-supply = <&reg_dldo1>;
113+
vcc-pi-supply = <&reg_dldo1>;
114+
};
115+
116+
&r_i2c {
117+
status = "okay";
118+
119+
axp313: pmic@36 {
120+
compatible = "x-powers,axp313a";
121+
reg = <0x36>;
122+
#interrupt-cells = <1>;
123+
interrupt-controller;
124+
125+
vin1-supply = <&reg_vcc5v>;
126+
vin2-supply = <&reg_vcc5v>;
127+
vin3-supply = <&reg_vcc5v>;
128+
129+
regulators {
130+
/* Supplies VCC-PLL, so needs to be always on. */
131+
reg_aldo1: aldo1 {
132+
regulator-always-on;
133+
regulator-min-microvolt = <1800000>;
134+
regulator-max-microvolt = <1800000>;
135+
regulator-name = "vcc1v8";
136+
};
137+
138+
/* Supplies VCC-IO, so needs to be always on. */
139+
reg_dldo1: dldo1 {
140+
regulator-always-on;
141+
regulator-min-microvolt = <3300000>;
142+
regulator-max-microvolt = <3300000>;
143+
regulator-name = "vcc3v3";
144+
};
145+
146+
reg_dcdc1: dcdc1 {
147+
regulator-always-on;
148+
regulator-min-microvolt = <810000>;
149+
regulator-max-microvolt = <990000>;
150+
regulator-name = "vdd-gpu-sys";
151+
};
152+
153+
reg_dcdc2: dcdc2 {
154+
regulator-always-on;
155+
regulator-min-microvolt = <810000>;
156+
regulator-max-microvolt = <1120000>;
157+
regulator-name = "vdd-cpu";
158+
};
159+
160+
reg_dcdc3: dcdc3 {
161+
regulator-always-on;
162+
regulator-min-microvolt = <1200000>;
163+
regulator-max-microvolt = <1200000>;
164+
regulator-name = "vdd-dram";
165+
};
166+
};
167+
};
168+
};
169+
170+
&uart0 {
171+
pinctrl-names = "default";
172+
pinctrl-0 = <&uart0_ph_pins>;
173+
status = "okay";
174+
};
175+
176+
&usbotg {
177+
dr_mode = "host"; /* USB A type receptable */
178+
status = "okay";
179+
};
180+
181+
&usbphy {
182+
status = "okay";
183+
};

0 commit comments

Comments
 (0)