sun7i-a20-hummingbird.dts revision 284090
1/*
2 * Copyright 2013 Wills Wang
3 *
4 * Wills Wang <wills.wang.open@gmail.com>
5 *
6 * The code contained herein is licensed under the GNU General Public
7 * License. You may obtain a copy of the GNU General Public License
8 * Version 2 or later at the following locations:
9 *
10 * http://www.opensource.org/licenses/gpl-license.html
11 * http://www.gnu.org/copyleft/gpl.html
12 */
13
14/dts-v1/;
15#include "sun7i-a20.dtsi"
16#include "sunxi-common-regulators.dtsi"
17
18#include <dt-bindings/gpio/gpio.h>
19#include <dt-bindings/interrupt-controller/irq.h>
20#include <dt-bindings/pinctrl/sun4i-a10.h>
21
22/ {
23	model = "Merrii A20 Hummingbird";
24	compatible = "merrii,a20-hummingbird", "allwinner,sun7i-a20";
25
26	aliases {
27		serial0 = &uart0;
28		serial1 = &uart2;
29		serial2 = &uart3;
30		serial3 = &uart4;
31		serial4 = &uart5;
32	};
33
34	soc@01c00000 {
35		mmc0: mmc@01c0f000 {
36			pinctrl-names = "default";
37			pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
38			vmmc-supply = <&reg_vcc3v0>;
39			bus-width = <4>;
40			cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
41			cd-inverted;
42			status = "okay";
43		};
44
45		mmc3: mmc@01c12000 {
46			pinctrl-names = "default";
47			pinctrl-0 = <&mmc3_pins_a>;
48			vmmc-supply = <&reg_mmc3_vdd>;
49			bus-width = <4>;
50			non-removable;
51			status = "okay";
52		};
53
54		usbphy: phy@01c13400 {
55			usb1_vbus-supply = <&reg_usb1_vbus>;
56			usb2_vbus-supply = <&reg_usb2_vbus>;
57			status = "okay";
58		};
59
60		ehci0: usb@01c14000 {
61			status = "okay";
62		};
63
64		ohci0: usb@01c14400 {
65			status = "okay";
66		};
67
68		ahci: sata@01c18000 {
69			target-supply = <&reg_ahci_5v>;
70			status = "okay";
71		};
72
73		ehci1: usb@01c1c000 {
74			status = "okay";
75		};
76
77		ohci1: usb@01c1c400 {
78			status = "okay";
79		};
80
81		pio: pinctrl@01c20800 {
82			ahci_pwr_pin_a20_hummingbird: ahci_pwr_pin@0 {
83				allwinner,pins = "PH15";
84				allwinner,function = "gpio_out";
85				allwinner,drive = <SUN4I_PINCTRL_10_MA>;
86				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
87			};
88
89			usb1_vbus_pin_a20_hummingbird: usb1_vbus_pin@0 {
90				allwinner,pins = "PH2";
91				allwinner,function = "gpio_out";
92				allwinner,drive = <SUN4I_PINCTRL_10_MA>;
93				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
94			};
95
96			mmc3_vdd_pin_a20_hummingbird: mmc3_vdd_pin@0 {
97				allwinner,pins = "PH9";
98				allwinner,function = "gpio_out";
99				allwinner,drive = <SUN4I_PINCTRL_10_MA>;
100				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
101			};
102
103			gmac_vdd_pin_a20_hummingbird: gmac_vdd_pin@0 {
104				allwinner,pins = "PH16";
105				allwinner,function = "gpio_out";
106				allwinner,drive = <SUN4I_PINCTRL_10_MA>;
107				allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
108			};
109		};
110
111		pwm: pwm@01c20e00 {
112			pinctrl-names = "default";
113			pinctrl-0 = <&pwm0_pins_a>;
114			status = "okay";
115		};
116
117		ir0: ir@01c21800 {
118			pinctrl-names = "default";
119			pinctrl-0 = <&ir0_pins_a>;
120			status = "okay";
121		};
122
123		uart0: serial@01c28000 {
124			pinctrl-names = "default";
125			pinctrl-0 = <&uart0_pins_a>;
126			status = "okay";
127		};
128
129		uart2: serial@01c28800 {
130			pinctrl-names = "default";
131			pinctrl-0 = <&uart2_pins_a>;
132			status = "okay";
133		};
134
135		uart3: serial@01c28c00 {
136			pinctrl-names = "default";
137			pinctrl-0 = <&uart3_pins_a>;
138			status = "okay";
139		};
140
141		uart4: serial@01c29000 {
142			pinctrl-names = "default";
143			pinctrl-0 = <&uart4_pins_a>;
144			status = "okay";
145		};
146
147		uart5: serial@01c29400 {
148			pinctrl-names = "default";
149			pinctrl-0 = <&uart5_pins_a>;
150			status = "okay";
151		};
152
153		i2c0: i2c@01c2ac00 {
154			pinctrl-names = "default";
155			pinctrl-0 = <&i2c0_pins_a>;
156			status = "okay";
157
158			axp209: pmic@34 {
159				compatible = "x-powers,axp209";
160				reg = <0x34>;
161				interrupt-parent = <&nmi_intc>;
162				interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
163				interrupt-controller;
164				#interrupt-cells = <1>;
165			};
166		};
167
168		i2c1: i2c@01c2b000 {
169			pinctrl-names = "default";
170			pinctrl-0 = <&i2c1_pins_a>;
171			status = "okay";
172		};
173
174		i2c2: i2c@01c2b400 {
175			pinctrl-names = "default";
176			pinctrl-0 = <&i2c2_pins_a>;
177			status = "okay";
178		};
179
180		i2c3: i2c@01c2b800 {
181			pinctrl-names = "default";
182			pinctrl-0 = <&i2c3_pins_a>;
183			status = "okay";
184		};
185
186		spi2: spi@01c17000 {
187			pinctrl-names = "default";
188			pinctrl-0 = <&spi2_pins_b>;
189			status = "okay";
190		};
191
192		gmac: ethernet@01c50000 {
193			pinctrl-names = "default";
194			pinctrl-0 = <&gmac_pins_rgmii_a>;
195			phy = <&phy1>;
196			phy-mode = "rgmii";
197			phy-supply = <&reg_gmac_vdd>;
198			/* phy reset config */
199			snps,reset-gpio = <&pio 0 17 GPIO_ACTIVE_HIGH>; /* PA17 */
200			snps,reset-active-low;
201			/* wait 1s after reset, otherwise fail to read phy id */
202			snps,reset-delays-us = <0 10000 1000000>;
203			status = "okay";
204
205			phy1: ethernet-phy@1 {
206				reg = <1>;
207			};
208		};
209	};
210
211	reg_ahci_5v: ahci-5v {
212		pinctrl-0 = <&ahci_pwr_pin_a20_hummingbird>;
213		gpio = <&pio 7 15 GPIO_ACTIVE_HIGH>; /* PH15 */
214		status = "okay";
215	};
216
217	reg_usb1_vbus: usb1-vbus {
218		pinctrl-0 = <&usb1_vbus_pin_a20_hummingbird>;
219		gpio = <&pio 7 2 GPIO_ACTIVE_HIGH>; /* PH2 */
220		status = "okay";
221	};
222
223	reg_usb2_vbus: usb2-vbus {
224		status = "okay";
225	};
226
227	reg_mmc3_vdd: mmc3_vdd {
228		compatible = "regulator-fixed";
229		pinctrl-names = "default";
230		pinctrl-0 = <&mmc3_vdd_pin_a20_hummingbird>;
231		regulator-name = "mmc3_vdd";
232		regulator-min-microvolt = <3000000>;
233		regulator-max-microvolt = <3000000>;
234		enable-active-high;
235		gpio = <&pio 7 9 GPIO_ACTIVE_HIGH>; /* PH9 */
236	};
237
238	reg_gmac_vdd: gmac_vdd {
239		compatible = "regulator-fixed";
240		pinctrl-names = "default";
241		pinctrl-0 = <&gmac_vdd_pin_a20_hummingbird>;
242		regulator-name = "gmac_vdd";
243		regulator-min-microvolt = <3000000>;
244		regulator-max-microvolt = <3000000>;
245		enable-active-high;
246		gpio = <&pio 7 16 GPIO_ACTIVE_HIGH>; /* PH16 */
247	};
248};
249