xref: /linux/scripts/dtc/include-prefixes/arm/allwinner/sun7i-a20-cubietruck.dts (revision 621cde16e49b3ecf7d59a8106a20aaebfb4a59a9)
1724ba675SRob Herring/*
2724ba675SRob Herring * Copyright 2013 Oliver Schinagl
3724ba675SRob Herring *
4724ba675SRob Herring * Oliver Schinagl <oliver@schinagl.nl>
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 "sun7i-a20.dtsi"
47724ba675SRob Herring#include "sunxi-common-regulators.dtsi"
48724ba675SRob Herring
49724ba675SRob Herring#include <dt-bindings/gpio/gpio.h>
50724ba675SRob Herring#include <dt-bindings/interrupt-controller/irq.h>
51724ba675SRob Herring
52724ba675SRob Herring/ {
53724ba675SRob Herring	model = "Cubietech Cubietruck";
54724ba675SRob Herring	compatible = "cubietech,cubietruck", "allwinner,sun7i-a20";
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	hdmi-connector {
65724ba675SRob Herring		compatible = "hdmi-connector";
66724ba675SRob Herring		type = "a";
67724ba675SRob Herring
68724ba675SRob Herring		port {
69724ba675SRob Herring			hdmi_con_in: endpoint {
70724ba675SRob Herring				remote-endpoint = <&hdmi_out_con>;
71724ba675SRob Herring			};
72724ba675SRob Herring		};
73724ba675SRob Herring	};
74724ba675SRob Herring
75724ba675SRob Herring	leds {
76724ba675SRob Herring		compatible = "gpio-leds";
77724ba675SRob Herring
78724ba675SRob Herring		led-0 {
79724ba675SRob Herring			label = "cubietruck:blue:usr";
80724ba675SRob Herring			gpios = <&pio 7 21 GPIO_ACTIVE_HIGH>;
81724ba675SRob Herring		};
82724ba675SRob Herring
83724ba675SRob Herring		led-1 {
84724ba675SRob Herring			label = "cubietruck:orange:usr";
85724ba675SRob Herring			gpios = <&pio 7 20 GPIO_ACTIVE_HIGH>;
86724ba675SRob Herring		};
87724ba675SRob Herring
88724ba675SRob Herring		led-2 {
89724ba675SRob Herring			label = "cubietruck:white:usr";
90724ba675SRob Herring			gpios = <&pio 7 11 GPIO_ACTIVE_HIGH>;
91724ba675SRob Herring		};
92724ba675SRob Herring
93724ba675SRob Herring		led-3 {
94724ba675SRob Herring			label = "cubietruck:green:usr";
95724ba675SRob Herring			gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>;
96724ba675SRob Herring		};
97724ba675SRob Herring	};
98724ba675SRob Herring
99*0f47ef3fSKrzysztof Kozlowski	mmc3_pwrseq: pwrseq {
100724ba675SRob Herring		compatible = "mmc-pwrseq-simple";
101724ba675SRob Herring		reset-gpios = <&pio 7 9 GPIO_ACTIVE_LOW>; /* PH9 WIFI_EN */
102724ba675SRob Herring		clocks = <&ccu CLK_OUT_A>;
103724ba675SRob Herring		clock-names = "ext_clock";
104724ba675SRob Herring	};
105724ba675SRob Herring
106724ba675SRob Herring	sound {
107724ba675SRob Herring		compatible = "simple-audio-card";
108724ba675SRob Herring		simple-audio-card,name = "On-board SPDIF";
109724ba675SRob Herring
110724ba675SRob Herring		simple-audio-card,cpu {
111724ba675SRob Herring			sound-dai = <&spdif>;
112724ba675SRob Herring		};
113724ba675SRob Herring
114724ba675SRob Herring		simple-audio-card,codec {
115724ba675SRob Herring			sound-dai = <&spdif_out>;
116724ba675SRob Herring		};
117724ba675SRob Herring	};
118724ba675SRob Herring
119724ba675SRob Herring	spdif_out: spdif-out {
120724ba675SRob Herring		#sound-dai-cells = <0>;
121724ba675SRob Herring		compatible = "linux,spdif-dit";
122724ba675SRob Herring	};
123724ba675SRob Herring};
124724ba675SRob Herring
125724ba675SRob Herring&ahci {
126724ba675SRob Herring	target-supply = <&reg_ahci_5v>;
127724ba675SRob Herring	status = "okay";
128724ba675SRob Herring};
129724ba675SRob Herring
130724ba675SRob Herring&codec {
131724ba675SRob Herring	status = "okay";
132724ba675SRob Herring};
133724ba675SRob Herring
134724ba675SRob Herring&cpu0 {
135724ba675SRob Herring	cpu-supply = <&reg_dcdc2>;
136724ba675SRob Herring};
137724ba675SRob Herring
138724ba675SRob Herring&de {
139724ba675SRob Herring	status = "okay";
140724ba675SRob Herring};
141724ba675SRob Herring
142724ba675SRob Herring&ehci0 {
143724ba675SRob Herring	status = "okay";
144724ba675SRob Herring};
145724ba675SRob Herring
146724ba675SRob Herring&ehci1 {
147724ba675SRob Herring	status = "okay";
148724ba675SRob Herring};
149724ba675SRob Herring
150724ba675SRob Herring&gmac {
151724ba675SRob Herring	pinctrl-names = "default";
152724ba675SRob Herring	pinctrl-0 = <&gmac_rgmii_pins>;
153724ba675SRob Herring	phy-handle = <&phy1>;
154724ba675SRob Herring	phy-mode = "rgmii-id";
155724ba675SRob Herring	status = "okay";
156724ba675SRob Herring};
157724ba675SRob Herring
158724ba675SRob Herring&hdmi {
159724ba675SRob Herring	status = "okay";
160724ba675SRob Herring};
161724ba675SRob Herring
162724ba675SRob Herring&hdmi_out {
163724ba675SRob Herring	hdmi_out_con: endpoint {
164724ba675SRob Herring		remote-endpoint = <&hdmi_con_in>;
165724ba675SRob Herring	};
166724ba675SRob Herring};
167724ba675SRob Herring
168724ba675SRob Herring&i2c0 {
169724ba675SRob Herring	status = "okay";
170724ba675SRob Herring
171724ba675SRob Herring	axp209: pmic@34 {
172724ba675SRob Herring		reg = <0x34>;
173724ba675SRob Herring		interrupt-parent = <&nmi_intc>;
174724ba675SRob Herring		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
175724ba675SRob Herring	};
176724ba675SRob Herring};
177724ba675SRob Herring
178724ba675SRob Herring&i2c1 {
179724ba675SRob Herring	pinctrl-names = "default";
180724ba675SRob Herring	status = "okay";
181724ba675SRob Herring};
182724ba675SRob Herring
183724ba675SRob Herring&i2c2 {
184724ba675SRob Herring	status = "okay";
185724ba675SRob Herring};
186724ba675SRob Herring
187724ba675SRob Herring&ir0 {
188724ba675SRob Herring	pinctrl-names = "default";
189724ba675SRob Herring	pinctrl-0 = <&ir0_rx_pin>;
190724ba675SRob Herring	status = "okay";
191724ba675SRob Herring};
192724ba675SRob Herring
193724ba675SRob Herring&gmac_mdio {
194724ba675SRob Herring	phy1: ethernet-phy@1 {
195724ba675SRob Herring		reg = <1>;
196724ba675SRob Herring	};
197724ba675SRob Herring};
198724ba675SRob Herring
199724ba675SRob Herring&mmc0 {
200724ba675SRob Herring	vmmc-supply = <&reg_vcc3v3>;
201724ba675SRob Herring	bus-width = <4>;
202724ba675SRob Herring	cd-gpios = <&pio 7 1 GPIO_ACTIVE_LOW>; /* PH1 */
203724ba675SRob Herring	status = "okay";
204724ba675SRob Herring};
205724ba675SRob Herring
206724ba675SRob Herring&mmc3 {
207724ba675SRob Herring	vmmc-supply = <&reg_vcc3v3>;
208724ba675SRob Herring	mmc-pwrseq = <&mmc3_pwrseq>;
209724ba675SRob Herring	bus-width = <4>;
210724ba675SRob Herring	non-removable;
211724ba675SRob Herring	status = "okay";
212724ba675SRob Herring
213724ba675SRob Herring	brcmf: wifi@1 {
214724ba675SRob Herring		reg = <1>;
215724ba675SRob Herring		compatible = "brcm,bcm4329-fmac";
216724ba675SRob Herring		interrupt-parent = <&pio>;
217724ba675SRob Herring		interrupts = <7 10 IRQ_TYPE_LEVEL_LOW>; /* PH10 / EINT10 */
218724ba675SRob Herring		interrupt-names = "host-wake";
219724ba675SRob Herring	};
220724ba675SRob Herring};
221724ba675SRob Herring
222724ba675SRob Herring&ohci0 {
223724ba675SRob Herring	status = "okay";
224724ba675SRob Herring};
225724ba675SRob Herring
226724ba675SRob Herring&ohci1 {
227724ba675SRob Herring	status = "okay";
228724ba675SRob Herring};
229724ba675SRob Herring
230724ba675SRob Herring&otg_sram {
231724ba675SRob Herring	status = "okay";
232724ba675SRob Herring};
233724ba675SRob Herring
234724ba675SRob Herring&pio {
235724ba675SRob Herring	/* Pin outputs low power clock for WiFi and BT */
236724ba675SRob Herring	pinctrl-0 = <&clk_out_a_pin>;
237724ba675SRob Herring	pinctrl-names = "default";
238724ba675SRob Herring};
239724ba675SRob Herring
240724ba675SRob Herring&pwm {
241724ba675SRob Herring	pinctrl-names = "default";
242724ba675SRob Herring	pinctrl-0 = <&pwm0_pin>, <&pwm1_pin>;
243724ba675SRob Herring	status = "okay";
244724ba675SRob Herring};
245724ba675SRob Herring
246724ba675SRob Herring&reg_ahci_5v {
247724ba675SRob Herring	gpio = <&pio 7 12 GPIO_ACTIVE_HIGH>;
248724ba675SRob Herring	status = "okay";
249724ba675SRob Herring};
250724ba675SRob Herring
251724ba675SRob Herring#include "axp209.dtsi"
252724ba675SRob Herring
253724ba675SRob Herring&ac_power_supply {
254724ba675SRob Herring	status = "okay";
255724ba675SRob Herring};
256724ba675SRob Herring
257724ba675SRob Herring&battery_power_supply {
258724ba675SRob Herring	status = "okay";
259724ba675SRob Herring};
260724ba675SRob Herring
261724ba675SRob Herring&reg_dcdc2 {
262724ba675SRob Herring	regulator-always-on;
263724ba675SRob Herring	regulator-min-microvolt = <1000000>;
264724ba675SRob Herring	regulator-max-microvolt = <1450000>;
265724ba675SRob Herring	regulator-name = "vdd-cpu";
266724ba675SRob Herring};
267724ba675SRob Herring
268724ba675SRob Herring&reg_dcdc3 {
269724ba675SRob Herring	regulator-always-on;
270724ba675SRob Herring	regulator-min-microvolt = <1000000>;
271724ba675SRob Herring	regulator-max-microvolt = <1400000>;
272724ba675SRob Herring	regulator-name = "vdd-int-dll";
273724ba675SRob Herring};
274724ba675SRob Herring
275724ba675SRob Herring&reg_ldo1 {
276724ba675SRob Herring	regulator-name = "vdd-rtc";
277724ba675SRob Herring};
278724ba675SRob Herring
279724ba675SRob Herring&reg_ldo2 {
280724ba675SRob Herring	regulator-always-on;
281724ba675SRob Herring	regulator-min-microvolt = <3000000>;
282724ba675SRob Herring	regulator-max-microvolt = <3000000>;
283724ba675SRob Herring	regulator-name = "avcc";
284724ba675SRob Herring};
285724ba675SRob Herring
286724ba675SRob Herring&reg_usb0_vbus {
287724ba675SRob Herring	gpio = <&pio 7 17 GPIO_ACTIVE_HIGH>;
288724ba675SRob Herring	status = "okay";
289724ba675SRob Herring};
290724ba675SRob Herring
291724ba675SRob Herring&reg_usb1_vbus {
292724ba675SRob Herring	status = "okay";
293724ba675SRob Herring};
294724ba675SRob Herring
295724ba675SRob Herring&reg_usb2_vbus {
296724ba675SRob Herring	status = "okay";
297724ba675SRob Herring};
298724ba675SRob Herring
299724ba675SRob Herring&spdif {
300724ba675SRob Herring	pinctrl-names = "default";
301724ba675SRob Herring	pinctrl-0 = <&spdif_tx_pin>;
302724ba675SRob Herring	status = "okay";
303724ba675SRob Herring};
304724ba675SRob Herring
305724ba675SRob Herring&uart0 {
306724ba675SRob Herring	pinctrl-names = "default";
307724ba675SRob Herring	pinctrl-0 = <&uart0_pb_pins>;
308724ba675SRob Herring	status = "okay";
309724ba675SRob Herring};
310724ba675SRob Herring
311724ba675SRob Herring&uart2 {
312724ba675SRob Herring	pinctrl-names = "default";
313724ba675SRob Herring	pinctrl-0 = <&uart2_pi_pins>, <&uart2_cts_rts_pi_pins>;
314724ba675SRob Herring	uart-has-rtscts;
315724ba675SRob Herring	status = "okay";
316724ba675SRob Herring
317724ba675SRob Herring	bluetooth {
318724ba675SRob Herring		compatible = "brcm,bcm20702a1";
319724ba675SRob Herring		clocks = <&ccu CLK_OUT_A>;
320724ba675SRob Herring		clock-names = "lpo";
321724ba675SRob Herring		device-wakeup-gpios = <&pio 7 24 GPIO_ACTIVE_LOW>; /* PH24 */
322724ba675SRob Herring		host-wakeup-gpios = <&pio 7 25 GPIO_ACTIVE_LOW>; /* PH25 */
323724ba675SRob Herring		shutdown-gpios = <&pio 7 18 GPIO_ACTIVE_HIGH>; /* PH18 */
324724ba675SRob Herring		max-speed = <1500000>;
325724ba675SRob Herring	};
326724ba675SRob Herring};
327724ba675SRob Herring
328724ba675SRob Herring&usb_otg {
329724ba675SRob Herring	dr_mode = "otg";
330724ba675SRob Herring	status = "okay";
331724ba675SRob Herring};
332724ba675SRob Herring
333724ba675SRob Herring&usb_power_supply {
334724ba675SRob Herring	status = "okay";
335724ba675SRob Herring};
336724ba675SRob Herring
337724ba675SRob Herring&usbphy {
338724ba675SRob Herring	usb0_id_det-gpios = <&pio 7 19 GPIO_ACTIVE_HIGH>; /* PH19 */
339724ba675SRob Herring	usb0_vbus_det-gpios = <&pio 7 22 GPIO_ACTIVE_HIGH>; /* PH22 */
340724ba675SRob Herring	usb0_vbus_power-supply = <&usb_power_supply>;
341724ba675SRob Herring	usb0_vbus-supply = <&reg_usb0_vbus>;
342724ba675SRob Herring	usb1_vbus-supply = <&reg_usb1_vbus>;
343724ba675SRob Herring	usb2_vbus-supply = <&reg_usb2_vbus>;
344724ba675SRob Herring	status = "okay";
345724ba675SRob Herring};
346