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