xref: /freebsd/sys/contrib/device-tree/src/arm/allwinner/sun8i-r16-parrot.dts (revision 7d0873ebb83b19ba1e8a89e679470d885efe12e3)
1f126890aSEmmanuel Vadot/*
2f126890aSEmmanuel Vadot * Copyright 2016 Quentin Schulz
3f126890aSEmmanuel Vadot *
4f126890aSEmmanuel Vadot * Quentin Schulz <quentin.schulz@free-electrons.com>
5f126890aSEmmanuel Vadot *
6f126890aSEmmanuel Vadot * This file is dual-licensed: you can use it either under the terms
7f126890aSEmmanuel Vadot * of the GPL or the X11 license, at your option. Note that this dual
8f126890aSEmmanuel Vadot * licensing only applies to this file, and not this project as a
9f126890aSEmmanuel Vadot * whole.
10f126890aSEmmanuel Vadot *
11f126890aSEmmanuel Vadot *  a) This file is free software; you can redistribute it and/or
12f126890aSEmmanuel Vadot *     modify it under the terms of the GNU General Public License as
13f126890aSEmmanuel Vadot *     published by the Free Software Foundation; either version 2 of the
14f126890aSEmmanuel Vadot *     License, or (at your option) any later version.
15f126890aSEmmanuel Vadot *
16f126890aSEmmanuel Vadot *     This file is distributed in the hope that it will be useful,
17f126890aSEmmanuel Vadot *     but WITHOUT ANY WARRANTY; without even the implied warranty of
18f126890aSEmmanuel Vadot *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19f126890aSEmmanuel Vadot *     GNU General Public License for more details.
20f126890aSEmmanuel Vadot *
21f126890aSEmmanuel Vadot * Or, alternatively,
22f126890aSEmmanuel Vadot *
23f126890aSEmmanuel Vadot *  b) Permission is hereby granted, free of charge, to any person
24f126890aSEmmanuel Vadot *     obtaining a copy of this software and associated documentation
25f126890aSEmmanuel Vadot *     files (the "Software"), to deal in the Software without
26f126890aSEmmanuel Vadot *     restriction, including without limitation the rights to use,
27f126890aSEmmanuel Vadot *     copy, modify, merge, publish, distribute, sublicense, and/or
28f126890aSEmmanuel Vadot *     sell copies of the Software, and to permit persons to whom the
29f126890aSEmmanuel Vadot *     Software is furnished to do so, subject to the following
30f126890aSEmmanuel Vadot *     conditions:
31f126890aSEmmanuel Vadot *
32f126890aSEmmanuel Vadot *     The above copyright notice and this permission notice shall be
33f126890aSEmmanuel Vadot *     included in all copies or substantial portions of the Software.
34f126890aSEmmanuel Vadot *
35f126890aSEmmanuel Vadot *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
36f126890aSEmmanuel Vadot *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
37f126890aSEmmanuel Vadot *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
38f126890aSEmmanuel Vadot *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
39f126890aSEmmanuel Vadot *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
40f126890aSEmmanuel Vadot *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
41f126890aSEmmanuel Vadot *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
42f126890aSEmmanuel Vadot *     OTHER DEALINGS IN THE SOFTWARE.
43f126890aSEmmanuel Vadot */
44f126890aSEmmanuel Vadot
45f126890aSEmmanuel Vadot/dts-v1/;
46f126890aSEmmanuel Vadot#include "sun8i-a33.dtsi"
47f126890aSEmmanuel Vadot#include "sunxi-common-regulators.dtsi"
48f126890aSEmmanuel Vadot
49f126890aSEmmanuel Vadot#include <dt-bindings/gpio/gpio.h>
50f126890aSEmmanuel Vadot#include <dt-bindings/input/input.h>
51f126890aSEmmanuel Vadot
52f126890aSEmmanuel Vadot/ {
53f126890aSEmmanuel Vadot	model = "Allwinner R16 EVB (Parrot)";
54f126890aSEmmanuel Vadot	compatible = "allwinner,parrot", "allwinner,sun8i-a33";
55f126890aSEmmanuel Vadot
56f126890aSEmmanuel Vadot	aliases {
57f126890aSEmmanuel Vadot		serial0 = &uart0;
58f126890aSEmmanuel Vadot	};
59f126890aSEmmanuel Vadot
60f126890aSEmmanuel Vadot	chosen {
61f126890aSEmmanuel Vadot		stdout-path = "serial0:115200n8";
62f126890aSEmmanuel Vadot	};
63f126890aSEmmanuel Vadot
64f126890aSEmmanuel Vadot	leds {
65f126890aSEmmanuel Vadot		compatible = "gpio-leds";
66f126890aSEmmanuel Vadot
67f126890aSEmmanuel Vadot		led-1 {
68f126890aSEmmanuel Vadot			label = "parrot:led1:usr";
69f126890aSEmmanuel Vadot			gpios = <&pio 4 17 GPIO_ACTIVE_HIGH>; /* PE17 */
70f126890aSEmmanuel Vadot		};
71f126890aSEmmanuel Vadot
72f126890aSEmmanuel Vadot		led-2 {
73f126890aSEmmanuel Vadot			label = "parrot:led2:usr";
74f126890aSEmmanuel Vadot			gpios = <&pio 4 16 GPIO_ACTIVE_HIGH>; /* PE16 */
75f126890aSEmmanuel Vadot		};
76f126890aSEmmanuel Vadot	};
77f126890aSEmmanuel Vadot
78*7d0873ebSEmmanuel Vadot	wifi_pwrseq: pwrseq {
79f126890aSEmmanuel Vadot		compatible = "mmc-pwrseq-simple";
80f126890aSEmmanuel Vadot		reset-gpios = <&r_pio 0 6 GPIO_ACTIVE_LOW>; /* PL06 */
81f126890aSEmmanuel Vadot	};
82f126890aSEmmanuel Vadot
83f126890aSEmmanuel Vadot};
84f126890aSEmmanuel Vadot
85f126890aSEmmanuel Vadot&codec {
86f126890aSEmmanuel Vadot	status = "okay";
87f126890aSEmmanuel Vadot};
88f126890aSEmmanuel Vadot
89f126890aSEmmanuel Vadot&dai {
90f126890aSEmmanuel Vadot	status = "okay";
91f126890aSEmmanuel Vadot};
92f126890aSEmmanuel Vadot
93f126890aSEmmanuel Vadot&ehci0 {
94f126890aSEmmanuel Vadot	status = "okay";
95f126890aSEmmanuel Vadot};
96f126890aSEmmanuel Vadot
97f126890aSEmmanuel Vadot&i2c1 {
98f126890aSEmmanuel Vadot	status = "okay";
99f126890aSEmmanuel Vadot
100f126890aSEmmanuel Vadot	/*
101f126890aSEmmanuel Vadot	 * FIXME: An as-yet-unknown accelerometer is connected to this
102f126890aSEmmanuel Vadot	 * i2c bus.
103f126890aSEmmanuel Vadot	 */
104f126890aSEmmanuel Vadot};
105f126890aSEmmanuel Vadot
106f126890aSEmmanuel Vadot&lradc {
107f126890aSEmmanuel Vadot	vref-supply = <&reg_aldo3>;
108f126890aSEmmanuel Vadot	status = "okay";
109f126890aSEmmanuel Vadot
110f126890aSEmmanuel Vadot	button-190 {
111f126890aSEmmanuel Vadot		label = "V+";
112f126890aSEmmanuel Vadot		linux,code = <KEY_VOLUMEUP>;
113f126890aSEmmanuel Vadot		channel = <0>;
114f126890aSEmmanuel Vadot		voltage = <190000>;
115f126890aSEmmanuel Vadot	};
116f126890aSEmmanuel Vadot
117f126890aSEmmanuel Vadot	button-390 {
118f126890aSEmmanuel Vadot		label = "V-";
119f126890aSEmmanuel Vadot		linux,code = <KEY_VOLUMEDOWN>;
120f126890aSEmmanuel Vadot		channel = <0>;
121f126890aSEmmanuel Vadot		voltage = <390000>;
122f126890aSEmmanuel Vadot	};
123f126890aSEmmanuel Vadot
124f126890aSEmmanuel Vadot};
125f126890aSEmmanuel Vadot
126f126890aSEmmanuel Vadot&mmc0 {
127f126890aSEmmanuel Vadot	vmmc-supply = <&reg_dcdc1>;
128f126890aSEmmanuel Vadot	cd-gpios = <&pio 3 14 GPIO_ACTIVE_LOW>; /* PD14 */
129f126890aSEmmanuel Vadot	bus-width = <4>;
130f126890aSEmmanuel Vadot	status = "okay";
131f126890aSEmmanuel Vadot};
132f126890aSEmmanuel Vadot
133f126890aSEmmanuel Vadot&mmc1 {
134f126890aSEmmanuel Vadot	pinctrl-names = "default";
135f126890aSEmmanuel Vadot	pinctrl-0 = <&mmc1_pg_pins>;
136f126890aSEmmanuel Vadot	vmmc-supply = <&reg_aldo1>;
137f126890aSEmmanuel Vadot	mmc-pwrseq = <&wifi_pwrseq>;
138f126890aSEmmanuel Vadot	bus-width = <4>;
139f126890aSEmmanuel Vadot	non-removable;
140f126890aSEmmanuel Vadot	status = "okay";
141f126890aSEmmanuel Vadot};
142f126890aSEmmanuel Vadot
143f126890aSEmmanuel Vadot&mmc2 {
144f126890aSEmmanuel Vadot	pinctrl-names = "default";
145f126890aSEmmanuel Vadot	pinctrl-0 = <&mmc2_8bit_pins>;
146f126890aSEmmanuel Vadot	vmmc-supply = <&reg_dcdc1>;
147f126890aSEmmanuel Vadot	bus-width = <8>;
148f126890aSEmmanuel Vadot	non-removable;
149f126890aSEmmanuel Vadot	cap-mmc-hw-reset;
150f126890aSEmmanuel Vadot	status = "okay";
151f126890aSEmmanuel Vadot};
152f126890aSEmmanuel Vadot
153f126890aSEmmanuel Vadot&mmc2_8bit_pins {
154f126890aSEmmanuel Vadot	drive-strength = <40>;
155f126890aSEmmanuel Vadot};
156f126890aSEmmanuel Vadot
157f126890aSEmmanuel Vadot&ohci0 {
158f126890aSEmmanuel Vadot	status = "okay";
159f126890aSEmmanuel Vadot};
160f126890aSEmmanuel Vadot
161f126890aSEmmanuel Vadot&r_rsb {
162f126890aSEmmanuel Vadot	status = "okay";
163f126890aSEmmanuel Vadot
164f126890aSEmmanuel Vadot	axp22x: pmic@3a3 {
165f126890aSEmmanuel Vadot		compatible = "x-powers,axp223";
166f126890aSEmmanuel Vadot		reg = <0x3a3>;
167f126890aSEmmanuel Vadot		interrupt-parent = <&r_intc>;
168f126890aSEmmanuel Vadot		interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_LOW>;
169f126890aSEmmanuel Vadot		drivevbus-supply = <&reg_vcc5v0>;
170f126890aSEmmanuel Vadot		x-powers,drive-vbus-en;
171f126890aSEmmanuel Vadot	};
172f126890aSEmmanuel Vadot};
173f126890aSEmmanuel Vadot
174f126890aSEmmanuel Vadot#include "axp223.dtsi"
175f126890aSEmmanuel Vadot
176f126890aSEmmanuel Vadot&reg_aldo1 {
177f126890aSEmmanuel Vadot	regulator-always-on;
178f126890aSEmmanuel Vadot	regulator-min-microvolt = <3000000>;
179f126890aSEmmanuel Vadot	regulator-max-microvolt = <3000000>;
180f126890aSEmmanuel Vadot	regulator-name = "vcc-io";
181f126890aSEmmanuel Vadot};
182f126890aSEmmanuel Vadot
183f126890aSEmmanuel Vadot&reg_aldo2 {
184f126890aSEmmanuel Vadot	regulator-always-on;
185f126890aSEmmanuel Vadot	regulator-min-microvolt = <2350000>;
186f126890aSEmmanuel Vadot	regulator-max-microvolt = <2650000>;
187f126890aSEmmanuel Vadot	regulator-name = "vdd-dll";
188f126890aSEmmanuel Vadot};
189f126890aSEmmanuel Vadot
190f126890aSEmmanuel Vadot&reg_aldo3 {
191f126890aSEmmanuel Vadot	regulator-always-on;
192f126890aSEmmanuel Vadot	regulator-min-microvolt = <2700000>;
193f126890aSEmmanuel Vadot	regulator-max-microvolt = <3300000>;
194f126890aSEmmanuel Vadot	regulator-name = "vcc-pll-avcc";
195f126890aSEmmanuel Vadot};
196f126890aSEmmanuel Vadot
197f126890aSEmmanuel Vadot&reg_dc5ldo {
198f126890aSEmmanuel Vadot	regulator-always-on;
199f126890aSEmmanuel Vadot	regulator-min-microvolt = <900000>;
200f126890aSEmmanuel Vadot	regulator-max-microvolt = <1400000>;
201f126890aSEmmanuel Vadot	regulator-name = "vdd-cpus";
202f126890aSEmmanuel Vadot};
203f126890aSEmmanuel Vadot
204f126890aSEmmanuel Vadot&reg_dcdc1 {
205f126890aSEmmanuel Vadot	regulator-always-on;
206f126890aSEmmanuel Vadot	regulator-min-microvolt = <3000000>;
207f126890aSEmmanuel Vadot	regulator-max-microvolt = <3000000>;
208f126890aSEmmanuel Vadot	regulator-name = "vcc-3v0";
209f126890aSEmmanuel Vadot};
210f126890aSEmmanuel Vadot
211f126890aSEmmanuel Vadot&reg_dcdc2 {
212f126890aSEmmanuel Vadot	regulator-always-on;
213f126890aSEmmanuel Vadot	regulator-min-microvolt = <900000>;
214f126890aSEmmanuel Vadot	regulator-max-microvolt = <1400000>;
215f126890aSEmmanuel Vadot	regulator-name = "vdd-sys";
216f126890aSEmmanuel Vadot};
217f126890aSEmmanuel Vadot
218f126890aSEmmanuel Vadot&reg_dcdc3 {
219f126890aSEmmanuel Vadot	regulator-always-on;
220f126890aSEmmanuel Vadot	regulator-min-microvolt = <900000>;
221f126890aSEmmanuel Vadot	regulator-max-microvolt = <1400000>;
222f126890aSEmmanuel Vadot	regulator-name = "vdd-cpu";
223f126890aSEmmanuel Vadot};
224f126890aSEmmanuel Vadot
225f126890aSEmmanuel Vadot&reg_dcdc5 {
226f126890aSEmmanuel Vadot	regulator-always-on;
227f126890aSEmmanuel Vadot	regulator-min-microvolt = <1500000>;
228f126890aSEmmanuel Vadot	regulator-max-microvolt = <1500000>;
229f126890aSEmmanuel Vadot	regulator-name = "vcc-dram";
230f126890aSEmmanuel Vadot};
231f126890aSEmmanuel Vadot
232f126890aSEmmanuel Vadot&reg_dldo1 {
233f126890aSEmmanuel Vadot	/*
234f126890aSEmmanuel Vadot	 * TODO: WiFi chip needs dldo1 AND dldo2 to be on to be powered.
235f126890aSEmmanuel Vadot	 * Remove next line once it is possible to sync two regulators.
236f126890aSEmmanuel Vadot	 */
237f126890aSEmmanuel Vadot	regulator-always-on;
238f126890aSEmmanuel Vadot	regulator-min-microvolt = <3300000>;
239f126890aSEmmanuel Vadot	regulator-max-microvolt = <3300000>;
240f126890aSEmmanuel Vadot	regulator-name = "vcc-wifi0";
241f126890aSEmmanuel Vadot};
242f126890aSEmmanuel Vadot
243f126890aSEmmanuel Vadot&reg_dldo2 {
244f126890aSEmmanuel Vadot	/*
245f126890aSEmmanuel Vadot	 * TODO: WiFi chip needs dldo1 AND dldo2 to be on to be powered.
246f126890aSEmmanuel Vadot	 * Remove next line once it is possible to sync two regulators.
247f126890aSEmmanuel Vadot	 */
248f126890aSEmmanuel Vadot	regulator-always-on;
249f126890aSEmmanuel Vadot	regulator-min-microvolt = <3300000>;
250f126890aSEmmanuel Vadot	regulator-max-microvolt = <3300000>;
251f126890aSEmmanuel Vadot	regulator-name = "vcc-wifi1";
252f126890aSEmmanuel Vadot};
253f126890aSEmmanuel Vadot
254f126890aSEmmanuel Vadot&reg_dldo3 {
255f126890aSEmmanuel Vadot	regulator-min-microvolt = <3000000>;
256f126890aSEmmanuel Vadot	regulator-max-microvolt = <3000000>;
257f126890aSEmmanuel Vadot	regulator-name = "vcc-3v0-csi";
258f126890aSEmmanuel Vadot};
259f126890aSEmmanuel Vadot
260f126890aSEmmanuel Vadot&reg_drivevbus {
261f126890aSEmmanuel Vadot	regulator-name = "usb0-vbus";
262f126890aSEmmanuel Vadot	status = "okay";
263f126890aSEmmanuel Vadot};
264f126890aSEmmanuel Vadot
265f126890aSEmmanuel Vadot&reg_eldo1 {
266f126890aSEmmanuel Vadot	regulator-min-microvolt = <1200000>;
267f126890aSEmmanuel Vadot	regulator-max-microvolt = <1200000>;
268f126890aSEmmanuel Vadot	regulator-name = "vcc-1v2-hsic";
269f126890aSEmmanuel Vadot};
270f126890aSEmmanuel Vadot
271f126890aSEmmanuel Vadot&reg_eldo2 {
272f126890aSEmmanuel Vadot	regulator-min-microvolt = <3000000>;
273f126890aSEmmanuel Vadot	regulator-max-microvolt = <3000000>;
274f126890aSEmmanuel Vadot	regulator-name = "vcc-dsp";
275f126890aSEmmanuel Vadot};
276f126890aSEmmanuel Vadot
277f126890aSEmmanuel Vadot&reg_eldo3 {
278f126890aSEmmanuel Vadot	regulator-min-microvolt = <3000000>;
279f126890aSEmmanuel Vadot	regulator-max-microvolt = <3000000>;
280f126890aSEmmanuel Vadot	regulator-name = "eldo3";
281f126890aSEmmanuel Vadot};
282f126890aSEmmanuel Vadot
283f126890aSEmmanuel Vadot&reg_usb1_vbus {
284f126890aSEmmanuel Vadot	gpio = <&pio 3 12 GPIO_ACTIVE_HIGH>; /* PD12 */
285f126890aSEmmanuel Vadot	status = "okay";
286f126890aSEmmanuel Vadot};
287f126890aSEmmanuel Vadot
288f126890aSEmmanuel Vadot&sound {
289f126890aSEmmanuel Vadot	status = "okay";
290f126890aSEmmanuel Vadot};
291f126890aSEmmanuel Vadot
292f126890aSEmmanuel Vadot&uart0 {
293f126890aSEmmanuel Vadot	pinctrl-names = "default";
294f126890aSEmmanuel Vadot	pinctrl-0 = <&uart0_pb_pins>;
295f126890aSEmmanuel Vadot	status = "okay";
296f126890aSEmmanuel Vadot};
297f126890aSEmmanuel Vadot
298f126890aSEmmanuel Vadot&usb_otg {
299f126890aSEmmanuel Vadot	dr_mode = "otg";
300f126890aSEmmanuel Vadot	status = "okay";
301f126890aSEmmanuel Vadot};
302f126890aSEmmanuel Vadot
303f126890aSEmmanuel Vadot&usb_power_supply {
304f126890aSEmmanuel Vadot	status = "okay";
305f126890aSEmmanuel Vadot};
306f126890aSEmmanuel Vadot
307f126890aSEmmanuel Vadot&usbphy {
308f126890aSEmmanuel Vadot	status = "okay";
309f126890aSEmmanuel Vadot	usb0_vbus-supply = <&reg_drivevbus>;
310f126890aSEmmanuel Vadot	usb0_id_det-gpios = <&pio 3 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>; /* PD10 */
311f126890aSEmmanuel Vadot	usb0_vbus_power-supply = <&usb_power_supply>;
312f126890aSEmmanuel Vadot	usb1_vbus-supply = <&reg_usb1_vbus>;
313f126890aSEmmanuel Vadot};
314