xref: /linux/scripts/dtc/include-prefixes/arm/allwinner/sun8i-r16-parrot.dts (revision 621cde16e49b3ecf7d59a8106a20aaebfb4a59a9)
1724ba675SRob Herring/*
2724ba675SRob Herring * Copyright 2016 Quentin Schulz
3724ba675SRob Herring *
4724ba675SRob Herring * Quentin Schulz <quentin.schulz@free-electrons.com>
5724ba675SRob Herring *
6724ba675SRob Herring * This file is dual-licensed: you can use it either under the terms
7724ba675SRob Herring * of the GPL or the X11 license, at your option. Note that this dual
8724ba675SRob Herring * licensing only applies to this file, and not this project as a
9724ba675SRob Herring * whole.
10724ba675SRob Herring *
11724ba675SRob Herring *  a) This file is free software; you can redistribute it and/or
12724ba675SRob Herring *     modify it under the terms of the GNU General Public License as
13724ba675SRob Herring *     published by the Free Software Foundation; either version 2 of the
14724ba675SRob Herring *     License, or (at your option) any later version.
15724ba675SRob Herring *
16724ba675SRob Herring *     This file is distributed in the hope that it will be useful,
17724ba675SRob Herring *     but WITHOUT ANY WARRANTY; without even the implied warranty of
18724ba675SRob Herring *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19724ba675SRob Herring *     GNU General Public License for more details.
20724ba675SRob Herring *
21724ba675SRob Herring * Or, alternatively,
22724ba675SRob Herring *
23724ba675SRob Herring *  b) Permission is hereby granted, free of charge, to any person
24724ba675SRob Herring *     obtaining a copy of this software and associated documentation
25724ba675SRob Herring *     files (the "Software"), to deal in the Software without
26724ba675SRob Herring *     restriction, including without limitation the rights to use,
27724ba675SRob Herring *     copy, modify, merge, publish, distribute, sublicense, and/or
28724ba675SRob Herring *     sell copies of the Software, and to permit persons to whom the
29724ba675SRob Herring *     Software is furnished to do so, subject to the following
30724ba675SRob Herring *     conditions:
31724ba675SRob Herring *
32724ba675SRob Herring *     The above copyright notice and this permission notice shall be
33724ba675SRob Herring *     included in all copies or substantial portions of the Software.
34724ba675SRob Herring *
35724ba675SRob Herring *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
36724ba675SRob Herring *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
37724ba675SRob Herring *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
38724ba675SRob Herring *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
39724ba675SRob Herring *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
40724ba675SRob Herring *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
41724ba675SRob Herring *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
42724ba675SRob Herring *     OTHER DEALINGS IN THE SOFTWARE.
43724ba675SRob Herring */
44724ba675SRob Herring
45724ba675SRob Herring/dts-v1/;
46724ba675SRob Herring#include "sun8i-a33.dtsi"
47724ba675SRob Herring#include "sunxi-common-regulators.dtsi"
48724ba675SRob Herring
49724ba675SRob Herring#include <dt-bindings/gpio/gpio.h>
50724ba675SRob Herring#include <dt-bindings/input/input.h>
51724ba675SRob Herring
52724ba675SRob Herring/ {
53724ba675SRob Herring	model = "Allwinner R16 EVB (Parrot)";
54724ba675SRob Herring	compatible = "allwinner,parrot", "allwinner,sun8i-a33";
55724ba675SRob Herring
56724ba675SRob Herring	aliases {
57724ba675SRob Herring		serial0 = &uart0;
58724ba675SRob Herring	};
59724ba675SRob Herring
60724ba675SRob Herring	chosen {
61724ba675SRob Herring		stdout-path = "serial0:115200n8";
62724ba675SRob Herring	};
63724ba675SRob Herring
64724ba675SRob Herring	leds {
65724ba675SRob Herring		compatible = "gpio-leds";
66724ba675SRob Herring
67724ba675SRob Herring		led-1 {
68724ba675SRob Herring			label = "parrot:led1:usr";
69724ba675SRob Herring			gpios = <&pio 4 17 GPIO_ACTIVE_HIGH>; /* PE17 */
70724ba675SRob Herring		};
71724ba675SRob Herring
72724ba675SRob Herring		led-2 {
73724ba675SRob Herring			label = "parrot:led2:usr";
74724ba675SRob Herring			gpios = <&pio 4 16 GPIO_ACTIVE_HIGH>; /* PE16 */
75724ba675SRob Herring		};
76724ba675SRob Herring	};
77724ba675SRob Herring
78*0f47ef3fSKrzysztof Kozlowski	wifi_pwrseq: pwrseq {
79724ba675SRob Herring		compatible = "mmc-pwrseq-simple";
80724ba675SRob Herring		reset-gpios = <&r_pio 0 6 GPIO_ACTIVE_LOW>; /* PL06 */
81724ba675SRob Herring	};
82724ba675SRob Herring
83724ba675SRob Herring};
84724ba675SRob Herring
85724ba675SRob Herring&codec {
86724ba675SRob Herring	status = "okay";
87724ba675SRob Herring};
88724ba675SRob Herring
89724ba675SRob Herring&dai {
90724ba675SRob Herring	status = "okay";
91724ba675SRob Herring};
92724ba675SRob Herring
93724ba675SRob Herring&ehci0 {
94724ba675SRob Herring	status = "okay";
95724ba675SRob Herring};
96724ba675SRob Herring
97724ba675SRob Herring&i2c1 {
98724ba675SRob Herring	status = "okay";
99724ba675SRob Herring
100724ba675SRob Herring	/*
101724ba675SRob Herring	 * FIXME: An as-yet-unknown accelerometer is connected to this
102724ba675SRob Herring	 * i2c bus.
103724ba675SRob Herring	 */
104724ba675SRob Herring};
105724ba675SRob Herring
106724ba675SRob Herring&lradc {
107724ba675SRob Herring	vref-supply = <&reg_aldo3>;
108724ba675SRob Herring	status = "okay";
109724ba675SRob Herring
110724ba675SRob Herring	button-190 {
111724ba675SRob Herring		label = "V+";
112724ba675SRob Herring		linux,code = <KEY_VOLUMEUP>;
113724ba675SRob Herring		channel = <0>;
114724ba675SRob Herring		voltage = <190000>;
115724ba675SRob Herring	};
116724ba675SRob Herring
117724ba675SRob Herring	button-390 {
118724ba675SRob Herring		label = "V-";
119724ba675SRob Herring		linux,code = <KEY_VOLUMEDOWN>;
120724ba675SRob Herring		channel = <0>;
121724ba675SRob Herring		voltage = <390000>;
122724ba675SRob Herring	};
123724ba675SRob Herring
124724ba675SRob Herring};
125724ba675SRob Herring
126724ba675SRob Herring&mmc0 {
127724ba675SRob Herring	vmmc-supply = <&reg_dcdc1>;
128724ba675SRob Herring	cd-gpios = <&pio 3 14 GPIO_ACTIVE_LOW>; /* PD14 */
129724ba675SRob Herring	bus-width = <4>;
130724ba675SRob Herring	status = "okay";
131724ba675SRob Herring};
132724ba675SRob Herring
133724ba675SRob Herring&mmc1 {
134724ba675SRob Herring	pinctrl-names = "default";
135724ba675SRob Herring	pinctrl-0 = <&mmc1_pg_pins>;
136724ba675SRob Herring	vmmc-supply = <&reg_aldo1>;
137724ba675SRob Herring	mmc-pwrseq = <&wifi_pwrseq>;
138724ba675SRob Herring	bus-width = <4>;
139724ba675SRob Herring	non-removable;
140724ba675SRob Herring	status = "okay";
141724ba675SRob Herring};
142724ba675SRob Herring
143724ba675SRob Herring&mmc2 {
144724ba675SRob Herring	pinctrl-names = "default";
145724ba675SRob Herring	pinctrl-0 = <&mmc2_8bit_pins>;
146724ba675SRob Herring	vmmc-supply = <&reg_dcdc1>;
147724ba675SRob Herring	bus-width = <8>;
148724ba675SRob Herring	non-removable;
149724ba675SRob Herring	cap-mmc-hw-reset;
150724ba675SRob Herring	status = "okay";
151724ba675SRob Herring};
152724ba675SRob Herring
153724ba675SRob Herring&mmc2_8bit_pins {
154724ba675SRob Herring	drive-strength = <40>;
155724ba675SRob Herring};
156724ba675SRob Herring
157724ba675SRob Herring&ohci0 {
158724ba675SRob Herring	status = "okay";
159724ba675SRob Herring};
160724ba675SRob Herring
161724ba675SRob Herring&r_rsb {
162724ba675SRob Herring	status = "okay";
163724ba675SRob Herring
164724ba675SRob Herring	axp22x: pmic@3a3 {
165724ba675SRob Herring		compatible = "x-powers,axp223";
166724ba675SRob Herring		reg = <0x3a3>;
167724ba675SRob Herring		interrupt-parent = <&r_intc>;
168724ba675SRob Herring		interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_LOW>;
169724ba675SRob Herring		drivevbus-supply = <&reg_vcc5v0>;
170724ba675SRob Herring		x-powers,drive-vbus-en;
171724ba675SRob Herring	};
172724ba675SRob Herring};
173724ba675SRob Herring
174724ba675SRob Herring#include "axp223.dtsi"
175724ba675SRob Herring
176724ba675SRob Herring&reg_aldo1 {
177724ba675SRob Herring	regulator-always-on;
178724ba675SRob Herring	regulator-min-microvolt = <3000000>;
179724ba675SRob Herring	regulator-max-microvolt = <3000000>;
180724ba675SRob Herring	regulator-name = "vcc-io";
181724ba675SRob Herring};
182724ba675SRob Herring
183724ba675SRob Herring&reg_aldo2 {
184724ba675SRob Herring	regulator-always-on;
185724ba675SRob Herring	regulator-min-microvolt = <2350000>;
186724ba675SRob Herring	regulator-max-microvolt = <2650000>;
187724ba675SRob Herring	regulator-name = "vdd-dll";
188724ba675SRob Herring};
189724ba675SRob Herring
190724ba675SRob Herring&reg_aldo3 {
191724ba675SRob Herring	regulator-always-on;
192724ba675SRob Herring	regulator-min-microvolt = <2700000>;
193724ba675SRob Herring	regulator-max-microvolt = <3300000>;
194724ba675SRob Herring	regulator-name = "vcc-pll-avcc";
195724ba675SRob Herring};
196724ba675SRob Herring
197724ba675SRob Herring&reg_dc5ldo {
198724ba675SRob Herring	regulator-always-on;
199724ba675SRob Herring	regulator-min-microvolt = <900000>;
200724ba675SRob Herring	regulator-max-microvolt = <1400000>;
201724ba675SRob Herring	regulator-name = "vdd-cpus";
202724ba675SRob Herring};
203724ba675SRob Herring
204724ba675SRob Herring&reg_dcdc1 {
205724ba675SRob Herring	regulator-always-on;
206724ba675SRob Herring	regulator-min-microvolt = <3000000>;
207724ba675SRob Herring	regulator-max-microvolt = <3000000>;
208724ba675SRob Herring	regulator-name = "vcc-3v0";
209724ba675SRob Herring};
210724ba675SRob Herring
211724ba675SRob Herring&reg_dcdc2 {
212724ba675SRob Herring	regulator-always-on;
213724ba675SRob Herring	regulator-min-microvolt = <900000>;
214724ba675SRob Herring	regulator-max-microvolt = <1400000>;
215724ba675SRob Herring	regulator-name = "vdd-sys";
216724ba675SRob Herring};
217724ba675SRob Herring
218724ba675SRob Herring&reg_dcdc3 {
219724ba675SRob Herring	regulator-always-on;
220724ba675SRob Herring	regulator-min-microvolt = <900000>;
221724ba675SRob Herring	regulator-max-microvolt = <1400000>;
222724ba675SRob Herring	regulator-name = "vdd-cpu";
223724ba675SRob Herring};
224724ba675SRob Herring
225724ba675SRob Herring&reg_dcdc5 {
226724ba675SRob Herring	regulator-always-on;
227724ba675SRob Herring	regulator-min-microvolt = <1500000>;
228724ba675SRob Herring	regulator-max-microvolt = <1500000>;
229724ba675SRob Herring	regulator-name = "vcc-dram";
230724ba675SRob Herring};
231724ba675SRob Herring
232724ba675SRob Herring&reg_dldo1 {
233724ba675SRob Herring	/*
234724ba675SRob Herring	 * TODO: WiFi chip needs dldo1 AND dldo2 to be on to be powered.
235724ba675SRob Herring	 * Remove next line once it is possible to sync two regulators.
236724ba675SRob Herring	 */
237724ba675SRob Herring	regulator-always-on;
238724ba675SRob Herring	regulator-min-microvolt = <3300000>;
239724ba675SRob Herring	regulator-max-microvolt = <3300000>;
240724ba675SRob Herring	regulator-name = "vcc-wifi0";
241724ba675SRob Herring};
242724ba675SRob Herring
243724ba675SRob Herring&reg_dldo2 {
244724ba675SRob Herring	/*
245724ba675SRob Herring	 * TODO: WiFi chip needs dldo1 AND dldo2 to be on to be powered.
246724ba675SRob Herring	 * Remove next line once it is possible to sync two regulators.
247724ba675SRob Herring	 */
248724ba675SRob Herring	regulator-always-on;
249724ba675SRob Herring	regulator-min-microvolt = <3300000>;
250724ba675SRob Herring	regulator-max-microvolt = <3300000>;
251724ba675SRob Herring	regulator-name = "vcc-wifi1";
252724ba675SRob Herring};
253724ba675SRob Herring
254724ba675SRob Herring&reg_dldo3 {
255724ba675SRob Herring	regulator-min-microvolt = <3000000>;
256724ba675SRob Herring	regulator-max-microvolt = <3000000>;
257724ba675SRob Herring	regulator-name = "vcc-3v0-csi";
258724ba675SRob Herring};
259724ba675SRob Herring
260724ba675SRob Herring&reg_drivevbus {
261724ba675SRob Herring	regulator-name = "usb0-vbus";
262724ba675SRob Herring	status = "okay";
263724ba675SRob Herring};
264724ba675SRob Herring
265724ba675SRob Herring&reg_eldo1 {
266724ba675SRob Herring	regulator-min-microvolt = <1200000>;
267724ba675SRob Herring	regulator-max-microvolt = <1200000>;
268724ba675SRob Herring	regulator-name = "vcc-1v2-hsic";
269724ba675SRob Herring};
270724ba675SRob Herring
271724ba675SRob Herring&reg_eldo2 {
272724ba675SRob Herring	regulator-min-microvolt = <3000000>;
273724ba675SRob Herring	regulator-max-microvolt = <3000000>;
274724ba675SRob Herring	regulator-name = "vcc-dsp";
275724ba675SRob Herring};
276724ba675SRob Herring
277724ba675SRob Herring&reg_eldo3 {
278724ba675SRob Herring	regulator-min-microvolt = <3000000>;
279724ba675SRob Herring	regulator-max-microvolt = <3000000>;
280724ba675SRob Herring	regulator-name = "eldo3";
281724ba675SRob Herring};
282724ba675SRob Herring
283724ba675SRob Herring&reg_usb1_vbus {
284724ba675SRob Herring	gpio = <&pio 3 12 GPIO_ACTIVE_HIGH>; /* PD12 */
285724ba675SRob Herring	status = "okay";
286724ba675SRob Herring};
287724ba675SRob Herring
288724ba675SRob Herring&sound {
289724ba675SRob Herring	status = "okay";
290724ba675SRob Herring};
291724ba675SRob Herring
292724ba675SRob Herring&uart0 {
293724ba675SRob Herring	pinctrl-names = "default";
294724ba675SRob Herring	pinctrl-0 = <&uart0_pb_pins>;
295724ba675SRob Herring	status = "okay";
296724ba675SRob Herring};
297724ba675SRob Herring
298724ba675SRob Herring&usb_otg {
299724ba675SRob Herring	dr_mode = "otg";
300724ba675SRob Herring	status = "okay";
301724ba675SRob Herring};
302724ba675SRob Herring
303724ba675SRob Herring&usb_power_supply {
304724ba675SRob Herring	status = "okay";
305724ba675SRob Herring};
306724ba675SRob Herring
307724ba675SRob Herring&usbphy {
308724ba675SRob Herring	status = "okay";
309724ba675SRob Herring	usb0_vbus-supply = <&reg_drivevbus>;
310724ba675SRob Herring	usb0_id_det-gpios = <&pio 3 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PD10 */
311724ba675SRob Herring	usb0_vbus_power-supply = <&usb_power_supply>;
312724ba675SRob Herring	usb1_vbus-supply = <&reg_usb1_vbus>;
313724ba675SRob Herring};
314