sun7i-a20-pcduino3.dts revision 284090
1/*
2 * Copyright 2014 Zoltan HERPAI
3 * Zoltan HERPAI <wigyori@uid0.hu>
4 *
5 * This file is dual-licensed: you can use it either under the terms
6 * of the GPL or the X11 license, at your option. Note that this dual
7 * licensing only applies to this file, and not this project as a
8 * whole.
9 *
10 *  a) This file is free software; you can redistribute it and/or
11 *     modify it under the terms of the GNU General Public License as
12 *     published by the Free Software Foundation; either version 2 of the
13 *     License, or (at your option) any later version.
14 *
15 *     This file is distributed in the hope that it will be useful,
16 *     but WITHOUT ANY WARRANTY; without even the implied warranty of
17 *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 *     GNU General Public License for more details.
19 *
20 *     You should have received a copy of the GNU General Public
21 *     License along with this file; if not, write to the Free
22 *     Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
23 *     MA 02110-1301 USA
24 *
25 * Or, alternatively,
26 *
27 *  b) Permission is hereby granted, free of charge, to any person
28 *     obtaining a copy of this software and associated documentation
29 *     files (the "Software"), to deal in the Software without
30 *     restriction, including without limitation the rights to use,
31 *     copy, modify, merge, publish, distribute, sublicense, and/or
32 *     sell copies of the Software, and to permit persons to whom the
33 *     Software is furnished to do so, subject to the following
34 *     conditions:
35 *
36 *     The above copyright notice and this permission notice shall be
37 *     included in all copies or substantial portions of the Software.
38 *
39 *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
40 *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
41 *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
42 *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
43 *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
44 *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
45 *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
46 *     OTHER DEALINGS IN THE SOFTWARE.
47 */
48
49/dts-v1/;
50#include "sun7i-a20.dtsi"
51#include "sunxi-common-regulators.dtsi"
52
53#include <dt-bindings/gpio/gpio.h>
54#include <dt-bindings/input/input.h>
55#include <dt-bindings/interrupt-controller/irq.h>
56#include <dt-bindings/pinctrl/sun4i-a10.h>
57
58/ {
59	model = "LinkSprite pcDuino3";
60	compatible = "linksprite,pcduino3", "allwinner,sun7i-a20";
61
62	soc@01c00000 {
63		mmc0: mmc@01c0f000 {
64			pinctrl-names = "default";
65			pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
66			vmmc-supply = <&reg_vcc3v3>;
67			bus-width = <4>;
68			cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
69			cd-inverted;
70			status = "okay";
71		};
72
73		usbphy: phy@01c13400 {
74			usb1_vbus-supply = <&reg_usb1_vbus>;
75			usb2_vbus-supply = <&reg_usb2_vbus>;
76			status = "okay";
77		};
78
79		ehci0: usb@01c14000 {
80			status = "okay";
81		};
82
83		ohci0: usb@01c14400 {
84			status = "okay";
85		};
86
87		ahci: sata@01c18000 {
88			target-supply = <&reg_ahci_5v>;
89			status = "okay";
90		};
91
92		ehci1: usb@01c1c000 {
93			status = "okay";
94		};
95
96		ohci1: usb@01c1c400 {
97			status = "okay";
98		};
99
100		pinctrl@01c20800 {
101			ahci_pwr_pin_a: ahci_pwr_pin@0 {
102				allwinner,pins = "PH2";
103			};
104
105			led_pins_pcduino3: led_pins@0 {
106				allwinner,pins = "PH15", "PH16";
107				allwinner,function = "gpio_out";
108				allwinner,drive = <SUN4I_PINCTRL_10_MA>;
109				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
110			};
111
112			key_pins_pcduino3: key_pins@0 {
113				allwinner,pins = "PH17", "PH18", "PH19";
114				allwinner,function = "gpio_in";
115				allwinner,drive = <SUN4I_PINCTRL_10_MA>;
116				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
117			};
118		};
119
120		ir0: ir@01c21800 {
121			pinctrl-names = "default";
122			pinctrl-0 = <&ir0_pins_a>;
123			status = "okay";
124		};
125
126		uart0: serial@01c28000 {
127			pinctrl-names = "default";
128			pinctrl-0 = <&uart0_pins_a>;
129			status = "okay";
130		};
131
132		i2c0: i2c@01c2ac00 {
133			pinctrl-names = "default";
134			pinctrl-0 = <&i2c0_pins_a>;
135			status = "okay";
136
137			axp209: pmic@34 {
138				compatible = "x-powers,axp209";
139				reg = <0x34>;
140				interrupt-parent = <&nmi_intc>;
141				interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
142
143				interrupt-controller;
144				#interrupt-cells = <1>;
145			};
146		};
147
148		gmac: ethernet@01c50000 {
149			pinctrl-names = "default";
150			pinctrl-0 = <&gmac_pins_mii_a>;
151			phy = <&phy1>;
152			phy-mode = "mii";
153			status = "okay";
154
155			phy1: ethernet-phy@1 {
156				reg = <1>;
157			};
158		};
159	};
160
161	leds {
162		compatible = "gpio-leds";
163		pinctrl-names = "default";
164		pinctrl-0 = <&led_pins_pcduino3>;
165
166		tx {
167			label = "pcduino3:green:tx";
168			gpios = <&pio 7 15 GPIO_ACTIVE_LOW>;
169		};
170
171		rx {
172			label = "pcduino3:green:rx";
173			gpios = <&pio 7 16 GPIO_ACTIVE_LOW>;
174		};
175	};
176
177	gpio_keys {
178		compatible = "gpio-keys";
179		pinctrl-names = "default";
180		pinctrl-0 = <&key_pins_pcduino3>;
181		#address-cells = <1>;
182		#size-cells = <0>;
183		button@0 {
184			label = "Key Back";
185			linux,code = <KEY_BACK>;
186			gpios = <&pio 7 17 GPIO_ACTIVE_LOW>;
187		};
188		button@1 {
189			label = "Key Home";
190			linux,code = <KEY_HOME>;
191			gpios = <&pio 7 18 GPIO_ACTIVE_LOW>;
192		};
193		button@2 {
194			label = "Key Menu";
195			linux,code = <KEY_MENU>;
196			gpios = <&pio 7 19 GPIO_ACTIVE_LOW>;
197		};
198	};
199
200	reg_usb1_vbus: usb1-vbus {
201		status = "okay";
202	};
203
204	reg_usb2_vbus: usb2-vbus {
205		status = "okay";
206	};
207
208	reg_ahci_5v: ahci-5v {
209		gpio = <&pio 7 2 GPIO_ACTIVE_HIGH>;
210		status = "okay";
211	};
212};
213