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