xref: /freebsd/sys/contrib/device-tree/src/arm/allwinner/sun4i-a10-topwise-a721.dts (revision f126890ac5386406dadf7c4cfa9566cbb56537c5)
1*f126890aSEmmanuel Vadot// SPDX-License-Identifier: GPL-2.0+
2*f126890aSEmmanuel Vadot/*
3*f126890aSEmmanuel Vadot * Copyright 2020 Pascal Roeleven <dev@pascalroeleven.nl>
4*f126890aSEmmanuel Vadot */
5*f126890aSEmmanuel Vadot
6*f126890aSEmmanuel Vadot/dts-v1/;
7*f126890aSEmmanuel Vadot#include "sun4i-a10.dtsi"
8*f126890aSEmmanuel Vadot#include "sunxi-common-regulators.dtsi"
9*f126890aSEmmanuel Vadot
10*f126890aSEmmanuel Vadot#include <dt-bindings/gpio/gpio.h>
11*f126890aSEmmanuel Vadot#include <dt-bindings/input/input.h>
12*f126890aSEmmanuel Vadot#include <dt-bindings/interrupt-controller/irq.h>
13*f126890aSEmmanuel Vadot#include <dt-bindings/pwm/pwm.h>
14*f126890aSEmmanuel Vadot
15*f126890aSEmmanuel Vadot/ {
16*f126890aSEmmanuel Vadot	model = "Topwise A721";
17*f126890aSEmmanuel Vadot	compatible = "topwise,a721", "allwinner,sun4i-a10";
18*f126890aSEmmanuel Vadot
19*f126890aSEmmanuel Vadot	aliases {
20*f126890aSEmmanuel Vadot		serial0 = &uart0;
21*f126890aSEmmanuel Vadot	};
22*f126890aSEmmanuel Vadot
23*f126890aSEmmanuel Vadot	backlight: backlight {
24*f126890aSEmmanuel Vadot		compatible = "pwm-backlight";
25*f126890aSEmmanuel Vadot		pwms = <&pwm 0 100000 PWM_POLARITY_INVERTED>;
26*f126890aSEmmanuel Vadot		power-supply = <&reg_vbat>;
27*f126890aSEmmanuel Vadot		enable-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */
28*f126890aSEmmanuel Vadot		brightness-levels = <0 30 40 50 60 70 80 90 100>;
29*f126890aSEmmanuel Vadot		default-brightness-level = <8>;
30*f126890aSEmmanuel Vadot	};
31*f126890aSEmmanuel Vadot
32*f126890aSEmmanuel Vadot	chosen {
33*f126890aSEmmanuel Vadot		stdout-path = "serial0:115200n8";
34*f126890aSEmmanuel Vadot	};
35*f126890aSEmmanuel Vadot
36*f126890aSEmmanuel Vadot	panel {
37*f126890aSEmmanuel Vadot		compatible = "starry,kr070pe2t";
38*f126890aSEmmanuel Vadot		backlight = <&backlight>;
39*f126890aSEmmanuel Vadot		power-supply = <&reg_lcd_power>;
40*f126890aSEmmanuel Vadot
41*f126890aSEmmanuel Vadot		port {
42*f126890aSEmmanuel Vadot			panel_input: endpoint {
43*f126890aSEmmanuel Vadot				remote-endpoint = <&tcon0_out_panel>;
44*f126890aSEmmanuel Vadot			};
45*f126890aSEmmanuel Vadot		};
46*f126890aSEmmanuel Vadot	};
47*f126890aSEmmanuel Vadot
48*f126890aSEmmanuel Vadot	reg_lcd_power: reg-lcd-power {
49*f126890aSEmmanuel Vadot		compatible = "regulator-fixed";
50*f126890aSEmmanuel Vadot		regulator-name = "reg-lcd-power";
51*f126890aSEmmanuel Vadot		gpio = <&pio 7 8 GPIO_ACTIVE_HIGH>; /* PH8 */
52*f126890aSEmmanuel Vadot		enable-active-high;
53*f126890aSEmmanuel Vadot	};
54*f126890aSEmmanuel Vadot
55*f126890aSEmmanuel Vadot	reg_vbat: reg-vbat {
56*f126890aSEmmanuel Vadot		compatible = "regulator-fixed";
57*f126890aSEmmanuel Vadot		regulator-name = "vbat";
58*f126890aSEmmanuel Vadot		regulator-min-microvolt = <3700000>;
59*f126890aSEmmanuel Vadot		regulator-max-microvolt = <3700000>;
60*f126890aSEmmanuel Vadot	};
61*f126890aSEmmanuel Vadot
62*f126890aSEmmanuel Vadot};
63*f126890aSEmmanuel Vadot
64*f126890aSEmmanuel Vadot&codec {
65*f126890aSEmmanuel Vadot	status = "okay";
66*f126890aSEmmanuel Vadot};
67*f126890aSEmmanuel Vadot
68*f126890aSEmmanuel Vadot&cpu0 {
69*f126890aSEmmanuel Vadot	cpu-supply = <&reg_dcdc2>;
70*f126890aSEmmanuel Vadot};
71*f126890aSEmmanuel Vadot
72*f126890aSEmmanuel Vadot&de {
73*f126890aSEmmanuel Vadot	status = "okay";
74*f126890aSEmmanuel Vadot};
75*f126890aSEmmanuel Vadot
76*f126890aSEmmanuel Vadot&ehci0 {
77*f126890aSEmmanuel Vadot	status = "okay";
78*f126890aSEmmanuel Vadot};
79*f126890aSEmmanuel Vadot
80*f126890aSEmmanuel Vadot&ehci1 {
81*f126890aSEmmanuel Vadot	status = "okay";
82*f126890aSEmmanuel Vadot};
83*f126890aSEmmanuel Vadot
84*f126890aSEmmanuel Vadot&i2c0 {
85*f126890aSEmmanuel Vadot	status = "okay";
86*f126890aSEmmanuel Vadot
87*f126890aSEmmanuel Vadot	axp209: pmic@34 {
88*f126890aSEmmanuel Vadot		reg = <0x34>;
89*f126890aSEmmanuel Vadot		interrupts = <0>;
90*f126890aSEmmanuel Vadot	};
91*f126890aSEmmanuel Vadot};
92*f126890aSEmmanuel Vadot
93*f126890aSEmmanuel Vadot#include "axp209.dtsi"
94*f126890aSEmmanuel Vadot
95*f126890aSEmmanuel Vadot&ac_power_supply {
96*f126890aSEmmanuel Vadot	status = "okay";
97*f126890aSEmmanuel Vadot};
98*f126890aSEmmanuel Vadot
99*f126890aSEmmanuel Vadot&battery_power_supply {
100*f126890aSEmmanuel Vadot	status = "okay";
101*f126890aSEmmanuel Vadot};
102*f126890aSEmmanuel Vadot
103*f126890aSEmmanuel Vadot&i2c1 {
104*f126890aSEmmanuel Vadot	status = "okay";
105*f126890aSEmmanuel Vadot
106*f126890aSEmmanuel Vadot	accelerometer@4c {
107*f126890aSEmmanuel Vadot		compatible = "fsl,mma7660";
108*f126890aSEmmanuel Vadot		reg = <0x4c>;
109*f126890aSEmmanuel Vadot	};
110*f126890aSEmmanuel Vadot};
111*f126890aSEmmanuel Vadot
112*f126890aSEmmanuel Vadot&i2c2 {
113*f126890aSEmmanuel Vadot	status = "okay";
114*f126890aSEmmanuel Vadot
115*f126890aSEmmanuel Vadot	touchscreen@38 {
116*f126890aSEmmanuel Vadot		compatible = "edt,edt-ft5406";
117*f126890aSEmmanuel Vadot		reg = <0x38>;
118*f126890aSEmmanuel Vadot		interrupt-parent = <&pio>;
119*f126890aSEmmanuel Vadot		interrupts = <7 21 IRQ_TYPE_EDGE_FALLING>;
120*f126890aSEmmanuel Vadot		touchscreen-size-x = <800>;
121*f126890aSEmmanuel Vadot		touchscreen-size-y = <480>;
122*f126890aSEmmanuel Vadot		vcc-supply = <&reg_vcc3v3>;
123*f126890aSEmmanuel Vadot	};
124*f126890aSEmmanuel Vadot};
125*f126890aSEmmanuel Vadot
126*f126890aSEmmanuel Vadot&lradc {
127*f126890aSEmmanuel Vadot	vref-supply = <&reg_ldo2>;
128*f126890aSEmmanuel Vadot	status = "okay";
129*f126890aSEmmanuel Vadot
130*f126890aSEmmanuel Vadot	button-571 {
131*f126890aSEmmanuel Vadot		label = "Volume Up";
132*f126890aSEmmanuel Vadot		linux,code = <KEY_VOLUMEUP>;
133*f126890aSEmmanuel Vadot		channel = <0>;
134*f126890aSEmmanuel Vadot		voltage = <571428>;
135*f126890aSEmmanuel Vadot	};
136*f126890aSEmmanuel Vadot
137*f126890aSEmmanuel Vadot	button-761 {
138*f126890aSEmmanuel Vadot		label = "Volume Down";
139*f126890aSEmmanuel Vadot		linux,code = <KEY_VOLUMEDOWN>;
140*f126890aSEmmanuel Vadot		channel = <0>;
141*f126890aSEmmanuel Vadot		voltage = <761904>;
142*f126890aSEmmanuel Vadot	};
143*f126890aSEmmanuel Vadot};
144*f126890aSEmmanuel Vadot
145*f126890aSEmmanuel Vadot&mmc0 {
146*f126890aSEmmanuel Vadot	vmmc-supply = <&reg_vcc3v3>;
147*f126890aSEmmanuel Vadot	bus-width = <4>;
148*f126890aSEmmanuel Vadot	cd-gpios = <&pio 7 1 GPIO_ACTIVE_LOW>; /* PH01 */
149*f126890aSEmmanuel Vadot	status = "okay";
150*f126890aSEmmanuel Vadot};
151*f126890aSEmmanuel Vadot
152*f126890aSEmmanuel Vadot&ohci0 {
153*f126890aSEmmanuel Vadot	status = "okay";
154*f126890aSEmmanuel Vadot};
155*f126890aSEmmanuel Vadot
156*f126890aSEmmanuel Vadot&ohci1 {
157*f126890aSEmmanuel Vadot	status = "okay";
158*f126890aSEmmanuel Vadot};
159*f126890aSEmmanuel Vadot
160*f126890aSEmmanuel Vadot&otg_sram {
161*f126890aSEmmanuel Vadot	status = "okay";
162*f126890aSEmmanuel Vadot};
163*f126890aSEmmanuel Vadot
164*f126890aSEmmanuel Vadot&pio {
165*f126890aSEmmanuel Vadot	vcc-pb-supply = <&reg_vcc3v3>;
166*f126890aSEmmanuel Vadot	vcc-pf-supply = <&reg_vcc3v3>;
167*f126890aSEmmanuel Vadot	vcc-ph-supply = <&reg_vcc3v3>;
168*f126890aSEmmanuel Vadot};
169*f126890aSEmmanuel Vadot
170*f126890aSEmmanuel Vadot&pwm {
171*f126890aSEmmanuel Vadot	pinctrl-names = "default";
172*f126890aSEmmanuel Vadot	pinctrl-0 = <&pwm0_pin>;
173*f126890aSEmmanuel Vadot	status = "okay";
174*f126890aSEmmanuel Vadot};
175*f126890aSEmmanuel Vadot
176*f126890aSEmmanuel Vadot&reg_dcdc2 {
177*f126890aSEmmanuel Vadot	regulator-always-on;
178*f126890aSEmmanuel Vadot	regulator-min-microvolt = <1000000>;
179*f126890aSEmmanuel Vadot	regulator-max-microvolt = <1400000>;
180*f126890aSEmmanuel Vadot	regulator-name = "vdd-cpu";
181*f126890aSEmmanuel Vadot};
182*f126890aSEmmanuel Vadot
183*f126890aSEmmanuel Vadot&reg_dcdc3 {
184*f126890aSEmmanuel Vadot	regulator-always-on;
185*f126890aSEmmanuel Vadot	regulator-min-microvolt = <1250000>;
186*f126890aSEmmanuel Vadot	regulator-max-microvolt = <1250000>;
187*f126890aSEmmanuel Vadot	regulator-name = "vdd-int-dll";
188*f126890aSEmmanuel Vadot};
189*f126890aSEmmanuel Vadot
190*f126890aSEmmanuel Vadot&reg_ldo1 {
191*f126890aSEmmanuel Vadot	regulator-name = "vdd-rtc";
192*f126890aSEmmanuel Vadot};
193*f126890aSEmmanuel Vadot
194*f126890aSEmmanuel Vadot&reg_ldo2 {
195*f126890aSEmmanuel Vadot	regulator-always-on;
196*f126890aSEmmanuel Vadot	regulator-min-microvolt = <3000000>;
197*f126890aSEmmanuel Vadot	regulator-max-microvolt = <3000000>;
198*f126890aSEmmanuel Vadot	regulator-name = "avcc";
199*f126890aSEmmanuel Vadot};
200*f126890aSEmmanuel Vadot
201*f126890aSEmmanuel Vadot&reg_usb0_vbus {
202*f126890aSEmmanuel Vadot	status = "okay";
203*f126890aSEmmanuel Vadot};
204*f126890aSEmmanuel Vadot
205*f126890aSEmmanuel Vadot&reg_usb1_vbus {
206*f126890aSEmmanuel Vadot	status = "okay";
207*f126890aSEmmanuel Vadot};
208*f126890aSEmmanuel Vadot
209*f126890aSEmmanuel Vadot&reg_usb2_vbus {
210*f126890aSEmmanuel Vadot	status = "okay";
211*f126890aSEmmanuel Vadot};
212*f126890aSEmmanuel Vadot
213*f126890aSEmmanuel Vadot&tcon0_out {
214*f126890aSEmmanuel Vadot	tcon0_out_panel: endpoint@0 {
215*f126890aSEmmanuel Vadot		reg = <0>;
216*f126890aSEmmanuel Vadot		remote-endpoint = <&panel_input>;
217*f126890aSEmmanuel Vadot	};
218*f126890aSEmmanuel Vadot};
219*f126890aSEmmanuel Vadot
220*f126890aSEmmanuel Vadot&uart0 {
221*f126890aSEmmanuel Vadot	pinctrl-names = "default";
222*f126890aSEmmanuel Vadot	pinctrl-0 = <&uart0_pb_pins>;
223*f126890aSEmmanuel Vadot	status = "okay";
224*f126890aSEmmanuel Vadot};
225*f126890aSEmmanuel Vadot
226*f126890aSEmmanuel Vadot&usb_otg {
227*f126890aSEmmanuel Vadot	dr_mode = "otg";
228*f126890aSEmmanuel Vadot	status = "okay";
229*f126890aSEmmanuel Vadot};
230*f126890aSEmmanuel Vadot
231*f126890aSEmmanuel Vadot&usb_power_supply {
232*f126890aSEmmanuel Vadot	status = "okay";
233*f126890aSEmmanuel Vadot};
234*f126890aSEmmanuel Vadot
235*f126890aSEmmanuel Vadot&usbphy {
236*f126890aSEmmanuel Vadot	usb0_id_det-gpios = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
237*f126890aSEmmanuel Vadot	usb0_vbus_det-gpios = <&pio 7 5 GPIO_ACTIVE_HIGH>; /* PH5 */
238*f126890aSEmmanuel Vadot	usb0_vbus-supply = <&reg_usb0_vbus>;
239*f126890aSEmmanuel Vadot	usb1_vbus-supply = <&reg_usb1_vbus>;
240*f126890aSEmmanuel Vadot	usb2_vbus-supply = <&reg_usb2_vbus>;
241*f126890aSEmmanuel Vadot	status = "okay";
242*f126890aSEmmanuel Vadot};
243