xref: /linux/scripts/dtc/include-prefixes/arm/allwinner/sun5i-gr8-evb.dts (revision cdd5b5a9761fd66d17586e4f4ba6588c70e640ea)
1*724ba675SRob Herring/*
2*724ba675SRob Herring * Copyright 2016 Free Electrons
3*724ba675SRob Herring * Copyright 2016 NextThing Co
4*724ba675SRob Herring *
5*724ba675SRob Herring * Mylène Josserand <mylene.josserand@free-electrons.com>
6*724ba675SRob Herring *
7*724ba675SRob Herring * This file is dual-licensed: you can use it either under the terms
8*724ba675SRob Herring * of the GPL or the X11 license, at your option. Note that this dual
9*724ba675SRob Herring * licensing only applies to this file, and not this project as a
10*724ba675SRob Herring * whole.
11*724ba675SRob Herring *
12*724ba675SRob Herring *  a) This file is free software; you can redistribute it and/or
13*724ba675SRob Herring *     modify it under the terms of the GNU General Public License as
14*724ba675SRob Herring *     published by the Free Software Foundation; either version 2 of the
15*724ba675SRob Herring *     License, or (at your option) any later version.
16*724ba675SRob Herring *
17*724ba675SRob Herring *     This file is distributed in the hope that it will be useful,
18*724ba675SRob Herring *     but WITHOUT ANY WARRANTY; without even the implied warranty of
19*724ba675SRob Herring *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20*724ba675SRob Herring *     GNU General Public License for more details.
21*724ba675SRob Herring *
22*724ba675SRob Herring * Or, alternatively,
23*724ba675SRob Herring *
24*724ba675SRob Herring *  b) Permission is hereby granted, free of charge, to any person
25*724ba675SRob Herring *     obtaining a copy of this software and associated documentation
26*724ba675SRob Herring *     files (the "Software"), to deal in the Software without
27*724ba675SRob Herring *     restriction, including without limitation the rights to use,
28*724ba675SRob Herring *     copy, modify, merge, publish, distribute, sublicense, and/or
29*724ba675SRob Herring *     sell copies of the Software, and to permit persons to whom the
30*724ba675SRob Herring *     Software is furnished to do so, subject to the following
31*724ba675SRob Herring *     conditions:
32*724ba675SRob Herring *
33*724ba675SRob Herring *     The above copyright notice and this permission notice shall be
34*724ba675SRob Herring *     included in all copies or substantial portions of the Software.
35*724ba675SRob Herring *
36*724ba675SRob Herring *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
37*724ba675SRob Herring *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
38*724ba675SRob Herring *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
39*724ba675SRob Herring *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
40*724ba675SRob Herring *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
41*724ba675SRob Herring *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
42*724ba675SRob Herring *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
43*724ba675SRob Herring *     OTHER DEALINGS IN THE SOFTWARE.
44*724ba675SRob Herring */
45*724ba675SRob Herring
46*724ba675SRob Herring/dts-v1/;
47*724ba675SRob Herring#include "sun5i-gr8.dtsi"
48*724ba675SRob Herring#include "sunxi-common-regulators.dtsi"
49*724ba675SRob Herring
50*724ba675SRob Herring#include <dt-bindings/gpio/gpio.h>
51*724ba675SRob Herring#include <dt-bindings/input/input.h>
52*724ba675SRob Herring#include <dt-bindings/interrupt-controller/irq.h>
53*724ba675SRob Herring
54*724ba675SRob Herring/ {
55*724ba675SRob Herring	model = "NextThing GR8-EVB";
56*724ba675SRob Herring	compatible = "nextthing,gr8-evb", "nextthing,gr8";
57*724ba675SRob Herring
58*724ba675SRob Herring	aliases {
59*724ba675SRob Herring		i2c0 = &i2c0;
60*724ba675SRob Herring		i2c1 = &i2c1;
61*724ba675SRob Herring		i2c2 = &i2c2;
62*724ba675SRob Herring		serial0 = &uart1;
63*724ba675SRob Herring		serial1 = &uart2;
64*724ba675SRob Herring	};
65*724ba675SRob Herring
66*724ba675SRob Herring	chosen {
67*724ba675SRob Herring		stdout-path = "serial0:115200n8";
68*724ba675SRob Herring	};
69*724ba675SRob Herring
70*724ba675SRob Herring	backlight: backlight {
71*724ba675SRob Herring		compatible = "pwm-backlight";
72*724ba675SRob Herring		pwms = <&pwm 0 10000 0>;
73*724ba675SRob Herring		enable-gpios = <&axp_gpio 1 GPIO_ACTIVE_HIGH>;
74*724ba675SRob Herring		power-supply = <&reg_vcc3v3>;
75*724ba675SRob Herring		brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
76*724ba675SRob Herring		default-brightness-level = <8>;
77*724ba675SRob Herring	};
78*724ba675SRob Herring
79*724ba675SRob Herring	sound-analog {
80*724ba675SRob Herring		compatible = "simple-audio-card";
81*724ba675SRob Herring		simple-audio-card,name = "gr8-evb-wm8978";
82*724ba675SRob Herring		simple-audio-card,format = "i2s";
83*724ba675SRob Herring		simple-audio-card,mclk-fs = <512>;
84*724ba675SRob Herring
85*724ba675SRob Herring		simple-audio-card,cpu {
86*724ba675SRob Herring			sound-dai = <&i2s0>;
87*724ba675SRob Herring		};
88*724ba675SRob Herring
89*724ba675SRob Herring		simple-audio-card,codec {
90*724ba675SRob Herring			sound-dai = <&wm8978>;
91*724ba675SRob Herring		};
92*724ba675SRob Herring	};
93*724ba675SRob Herring
94*724ba675SRob Herring	sound-spdif {
95*724ba675SRob Herring		compatible = "simple-audio-card";
96*724ba675SRob Herring		simple-audio-card,name = "On-board SPDIF";
97*724ba675SRob Herring
98*724ba675SRob Herring		simple-audio-card,cpu {
99*724ba675SRob Herring			sound-dai = <&spdif>;
100*724ba675SRob Herring		};
101*724ba675SRob Herring
102*724ba675SRob Herring		simple-audio-card,codec {
103*724ba675SRob Herring			sound-dai = <&spdif_out>;
104*724ba675SRob Herring		};
105*724ba675SRob Herring	};
106*724ba675SRob Herring
107*724ba675SRob Herring	spdif_out: spdif-out {
108*724ba675SRob Herring		#sound-dai-cells = <0>;
109*724ba675SRob Herring		compatible = "linux,spdif-dit";
110*724ba675SRob Herring	};
111*724ba675SRob Herring};
112*724ba675SRob Herring
113*724ba675SRob Herring&be0 {
114*724ba675SRob Herring	status = "okay";
115*724ba675SRob Herring};
116*724ba675SRob Herring
117*724ba675SRob Herring&codec {
118*724ba675SRob Herring	status = "okay";
119*724ba675SRob Herring};
120*724ba675SRob Herring
121*724ba675SRob Herring&ehci0 {
122*724ba675SRob Herring	status = "okay";
123*724ba675SRob Herring};
124*724ba675SRob Herring
125*724ba675SRob Herring&i2c0 {
126*724ba675SRob Herring	status = "okay";
127*724ba675SRob Herring
128*724ba675SRob Herring	axp209: pmic@34 {
129*724ba675SRob Herring		reg = <0x34>;
130*724ba675SRob Herring
131*724ba675SRob Herring		/*
132*724ba675SRob Herring		* The interrupt is routed through the "External Fast
133*724ba675SRob Herring		* Interrupt Request" pin (ball G13 of the module)
134*724ba675SRob Herring		* directly to the main interrupt controller, without
135*724ba675SRob Herring		* any other controller interfering.
136*724ba675SRob Herring		*/
137*724ba675SRob Herring		interrupts = <0>;
138*724ba675SRob Herring	};
139*724ba675SRob Herring};
140*724ba675SRob Herring
141*724ba675SRob Herring#include "axp209.dtsi"
142*724ba675SRob Herring
143*724ba675SRob Herring&i2c1 {
144*724ba675SRob Herring	status = "okay";
145*724ba675SRob Herring
146*724ba675SRob Herring	wm8978: codec@1a {
147*724ba675SRob Herring		#sound-dai-cells = <0>;
148*724ba675SRob Herring		compatible = "wlf,wm8978";
149*724ba675SRob Herring		reg = <0x1a>;
150*724ba675SRob Herring	};
151*724ba675SRob Herring
152*724ba675SRob Herring	pcf8563: rtc@51 {
153*724ba675SRob Herring		compatible = "nxp,pcf8563";
154*724ba675SRob Herring		reg = <0x51>;
155*724ba675SRob Herring	};
156*724ba675SRob Herring};
157*724ba675SRob Herring
158*724ba675SRob Herring&i2c2 {
159*724ba675SRob Herring	status = "okay";
160*724ba675SRob Herring};
161*724ba675SRob Herring
162*724ba675SRob Herring&i2s0 {
163*724ba675SRob Herring	pinctrl-names = "default";
164*724ba675SRob Herring	pinctrl-0 = <&i2s0_mclk_pin>, <&i2s0_data_pins>;
165*724ba675SRob Herring	status = "okay";
166*724ba675SRob Herring};
167*724ba675SRob Herring
168*724ba675SRob Herring&ir0 {
169*724ba675SRob Herring	pinctrl-names = "default";
170*724ba675SRob Herring	pinctrl-0 = <&ir0_rx_pin>;
171*724ba675SRob Herring	status = "okay";
172*724ba675SRob Herring};
173*724ba675SRob Herring
174*724ba675SRob Herring&lradc {
175*724ba675SRob Herring	vref-supply = <&reg_ldo2>;
176*724ba675SRob Herring	status = "okay";
177*724ba675SRob Herring
178*724ba675SRob Herring	button-190 {
179*724ba675SRob Herring		label = "Volume Up";
180*724ba675SRob Herring		linux,code = <KEY_VOLUMEUP>;
181*724ba675SRob Herring		channel = <0>;
182*724ba675SRob Herring		voltage = <190000>;
183*724ba675SRob Herring	};
184*724ba675SRob Herring
185*724ba675SRob Herring	button-390 {
186*724ba675SRob Herring		label = "Volume Down";
187*724ba675SRob Herring		linux,code = <KEY_VOLUMEDOWN>;
188*724ba675SRob Herring		channel = <0>;
189*724ba675SRob Herring		voltage = <390000>;
190*724ba675SRob Herring	};
191*724ba675SRob Herring
192*724ba675SRob Herring	button-600 {
193*724ba675SRob Herring		label = "Menu";
194*724ba675SRob Herring		linux,code = <KEY_MENU>;
195*724ba675SRob Herring		channel = <0>;
196*724ba675SRob Herring		voltage = <600000>;
197*724ba675SRob Herring	};
198*724ba675SRob Herring
199*724ba675SRob Herring	button-800 {
200*724ba675SRob Herring		label = "Search";
201*724ba675SRob Herring		linux,code = <KEY_SEARCH>;
202*724ba675SRob Herring		channel = <0>;
203*724ba675SRob Herring		voltage = <800000>;
204*724ba675SRob Herring	};
205*724ba675SRob Herring
206*724ba675SRob Herring	button-980 {
207*724ba675SRob Herring		label = "Home";
208*724ba675SRob Herring		linux,code = <KEY_HOMEPAGE>;
209*724ba675SRob Herring		channel = <0>;
210*724ba675SRob Herring		voltage = <980000>;
211*724ba675SRob Herring	};
212*724ba675SRob Herring
213*724ba675SRob Herring	button-1180 {
214*724ba675SRob Herring		label = "Esc";
215*724ba675SRob Herring		linux,code = <KEY_ESC>;
216*724ba675SRob Herring		channel = <0>;
217*724ba675SRob Herring		voltage = <1180000>;
218*724ba675SRob Herring	};
219*724ba675SRob Herring
220*724ba675SRob Herring	button-1400 {
221*724ba675SRob Herring		label = "Enter";
222*724ba675SRob Herring		linux,code = <KEY_ENTER>;
223*724ba675SRob Herring		channel = <0>;
224*724ba675SRob Herring		voltage = <1400000>;
225*724ba675SRob Herring	};
226*724ba675SRob Herring};
227*724ba675SRob Herring
228*724ba675SRob Herring&mmc0 {
229*724ba675SRob Herring	vmmc-supply = <&reg_vcc3v3>;
230*724ba675SRob Herring	bus-width = <4>;
231*724ba675SRob Herring	cd-gpios = <&pio 6 0 GPIO_ACTIVE_LOW>; /* PG0 */
232*724ba675SRob Herring	status = "okay";
233*724ba675SRob Herring};
234*724ba675SRob Herring
235*724ba675SRob Herring&nfc {
236*724ba675SRob Herring	pinctrl-names = "default";
237*724ba675SRob Herring	pinctrl-0 = <&nand_pins &nand_cs0_pin &nand_rb0_pin>;
238*724ba675SRob Herring
239*724ba675SRob Herring	/* MLC Support sucks for now */
240*724ba675SRob Herring	status = "disabled";
241*724ba675SRob Herring};
242*724ba675SRob Herring
243*724ba675SRob Herring&ohci0 {
244*724ba675SRob Herring	status = "okay";
245*724ba675SRob Herring};
246*724ba675SRob Herring
247*724ba675SRob Herring&otg_sram {
248*724ba675SRob Herring	status = "okay";
249*724ba675SRob Herring};
250*724ba675SRob Herring
251*724ba675SRob Herring&pwm {
252*724ba675SRob Herring	pinctrl-names = "default";
253*724ba675SRob Herring	pinctrl-0 = <&pwm0_pin>;
254*724ba675SRob Herring	status = "okay";
255*724ba675SRob Herring};
256*724ba675SRob Herring
257*724ba675SRob Herring&reg_dcdc2 {
258*724ba675SRob Herring	regulator-min-microvolt = <1000000>;
259*724ba675SRob Herring	regulator-max-microvolt = <1400000>;
260*724ba675SRob Herring	regulator-name = "vdd-cpu";
261*724ba675SRob Herring	regulator-always-on;
262*724ba675SRob Herring};
263*724ba675SRob Herring
264*724ba675SRob Herring&reg_dcdc3 {
265*724ba675SRob Herring	regulator-min-microvolt = <1000000>;
266*724ba675SRob Herring	regulator-max-microvolt = <1300000>;
267*724ba675SRob Herring	regulator-name = "vdd-sys";
268*724ba675SRob Herring	regulator-always-on;
269*724ba675SRob Herring};
270*724ba675SRob Herring
271*724ba675SRob Herring&reg_ldo1 {
272*724ba675SRob Herring	regulator-name = "vdd-rtc";
273*724ba675SRob Herring};
274*724ba675SRob Herring
275*724ba675SRob Herring&reg_ldo2 {
276*724ba675SRob Herring	regulator-min-microvolt = <2700000>;
277*724ba675SRob Herring	regulator-max-microvolt = <3300000>;
278*724ba675SRob Herring	regulator-name = "avcc";
279*724ba675SRob Herring	regulator-always-on;
280*724ba675SRob Herring};
281*724ba675SRob Herring
282*724ba675SRob Herring&reg_usb1_vbus {
283*724ba675SRob Herring	gpio = <&pio 6 13 GPIO_ACTIVE_HIGH>;
284*724ba675SRob Herring	status = "okay";
285*724ba675SRob Herring};
286*724ba675SRob Herring
287*724ba675SRob Herring&rtp {
288*724ba675SRob Herring	allwinner,ts-attached;
289*724ba675SRob Herring};
290*724ba675SRob Herring
291*724ba675SRob Herring&spdif {
292*724ba675SRob Herring	pinctrl-names = "default";
293*724ba675SRob Herring	pinctrl-0 = <&spdif_tx_pin>;
294*724ba675SRob Herring	status = "okay";
295*724ba675SRob Herring};
296*724ba675SRob Herring
297*724ba675SRob Herring&tve0 {
298*724ba675SRob Herring	status = "okay";
299*724ba675SRob Herring};
300*724ba675SRob Herring
301*724ba675SRob Herring&uart1 {
302*724ba675SRob Herring	pinctrl-names = "default";
303*724ba675SRob Herring	pinctrl-0 = <&uart1_pg_pins>, <&uart1_cts_rts_pins>;
304*724ba675SRob Herring	status = "okay";
305*724ba675SRob Herring};
306*724ba675SRob Herring
307*724ba675SRob Herring&usb_otg {
308*724ba675SRob Herring	/*
309*724ba675SRob Herring	 * The GR8-EVB has a somewhat interesting design. There's a
310*724ba675SRob Herring	 * pin supposed to control VBUS, an ID pin, a VBUS detect pin,
311*724ba675SRob Herring	 * so everything should work just fine.
312*724ba675SRob Herring	 *
313*724ba675SRob Herring	 * Except that the pin supposed to control VBUS is not
314*724ba675SRob Herring	 * connected to any controllable output, neither to the SoC
315*724ba675SRob Herring	 * through a GPIO or to the PMIC, and it is pulled down,
316*724ba675SRob Herring	 * meaning that we will never be able to enable VBUS on this
317*724ba675SRob Herring	 * board.
318*724ba675SRob Herring	 */
319*724ba675SRob Herring	dr_mode = "otg";
320*724ba675SRob Herring	status = "okay";
321*724ba675SRob Herring};
322*724ba675SRob Herring
323*724ba675SRob Herring&usb_power_supply {
324*724ba675SRob Herring	status = "okay";
325*724ba675SRob Herring};
326*724ba675SRob Herring
327*724ba675SRob Herring&usbphy {
328*724ba675SRob Herring	usb0_id_det-gpios = <&pio 6 2 GPIO_ACTIVE_HIGH>; /* PG2 */
329*724ba675SRob Herring	usb0_vbus_det-gpios = <&pio 6 1 GPIO_ACTIVE_HIGH>; /* PG1 */
330*724ba675SRob Herring	usb0_vbus_power-supply = <&usb_power_supply>;
331*724ba675SRob Herring	usb1_vbus-supply = <&reg_usb1_vbus>;
332*724ba675SRob Herring	status = "okay";
333*724ba675SRob Herring};
334