blob: 4d6a88ec8c0f9c16a46ff8d646b463c4f865697a [file] [log] [blame]
Wills Wangd95d6d42014-08-19 15:33:01 +08001/*
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/;
Maxime Ripard71455702014-12-16 22:59:54 +010015#include "sun7i-a20.dtsi"
16#include "sunxi-common-regulators.dtsi"
Wills Wangd95d6d42014-08-19 15:33:01 +080017
Maxime Ripardbca12922014-12-16 22:59:55 +010018#include <dt-bindings/gpio/gpio.h>
Maxime Riparda6bac9e2014-12-16 22:59:59 +010019#include <dt-bindings/interrupt-controller/irq.h>
Maxime Ripard092a0c32014-12-16 22:59:57 +010020#include <dt-bindings/pinctrl/sun4i-a10.h>
Maxime Ripardbca12922014-12-16 22:59:55 +010021
Wills Wangd95d6d42014-08-19 15:33:01 +080022/ {
23 model = "Merrii A20 Hummingbird";
24 compatible = "merrii,a20-hummingbird", "allwinner,sun7i-a20";
25
26 soc@01c00000 {
27 mmc0: mmc@01c0f000 {
28 pinctrl-names = "default";
29 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
30 vmmc-supply = <&reg_vcc3v0>;
31 bus-width = <4>;
Maxime Ripardbca12922014-12-16 22:59:55 +010032 cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
Wills Wangd95d6d42014-08-19 15:33:01 +080033 cd-inverted;
34 status = "okay";
35 };
36
37 mmc3: mmc@01c12000 {
38 pinctrl-names = "default";
39 pinctrl-0 = <&mmc3_pins_a>;
40 vmmc-supply = <&reg_mmc3_vdd>;
41 bus-width = <4>;
42 non-removable;
43 status = "okay";
44 };
45
46 usbphy: phy@01c13400 {
47 usb1_vbus-supply = <&reg_usb1_vbus>;
48 usb2_vbus-supply = <&reg_usb2_vbus>;
49 status = "okay";
50 };
51
52 ehci0: usb@01c14000 {
53 status = "okay";
54 };
55
56 ohci0: usb@01c14400 {
57 status = "okay";
58 };
59
60 ahci: sata@01c18000 {
61 target-supply = <&reg_ahci_5v>;
62 status = "okay";
63 };
64
65 ehci1: usb@01c1c000 {
66 status = "okay";
67 };
68
69 ohci1: usb@01c1c400 {
70 status = "okay";
71 };
72
73 pio: pinctrl@01c20800 {
74 ahci_pwr_pin_a20_hummingbird: ahci_pwr_pin@0 {
75 allwinner,pins = "PH15";
76 allwinner,function = "gpio_out";
Maxime Ripard092a0c32014-12-16 22:59:57 +010077 allwinner,drive = <SUN4I_PINCTRL_10_MA>;
78 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
Wills Wangd95d6d42014-08-19 15:33:01 +080079 };
80
81 usb1_vbus_pin_a20_hummingbird: usb1_vbus_pin@0 {
82 allwinner,pins = "PH2";
83 allwinner,function = "gpio_out";
Maxime Ripard092a0c32014-12-16 22:59:57 +010084 allwinner,drive = <SUN4I_PINCTRL_10_MA>;
85 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
Wills Wangd95d6d42014-08-19 15:33:01 +080086 };
87
88 mmc3_vdd_pin_a20_hummingbird: mmc3_vdd_pin@0 {
89 allwinner,pins = "PH9";
90 allwinner,function = "gpio_out";
Maxime Ripard092a0c32014-12-16 22:59:57 +010091 allwinner,drive = <SUN4I_PINCTRL_10_MA>;
92 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
Wills Wangd95d6d42014-08-19 15:33:01 +080093 };
94
95 gmac_vdd_pin_a20_hummingbird: gmac_vdd_pin@0 {
96 allwinner,pins = "PH16";
97 allwinner,function = "gpio_out";
Maxime Ripard092a0c32014-12-16 22:59:57 +010098 allwinner,drive = <SUN4I_PINCTRL_10_MA>;
99 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
Wills Wangd95d6d42014-08-19 15:33:01 +0800100 };
101 };
102
103 pwm: pwm@01c20e00 {
104 pinctrl-names = "default";
105 pinctrl-0 = <&pwm0_pins_a>;
106 status = "okay";
107 };
108
109 ir0: ir@01c21800 {
110 pinctrl-names = "default";
111 pinctrl-0 = <&ir0_pins_a>;
112 status = "okay";
113 };
114
115 uart0: serial@01c28000 {
116 pinctrl-names = "default";
117 pinctrl-0 = <&uart0_pins_a>;
118 status = "okay";
119 };
120
121 uart2: serial@01c28800 {
122 pinctrl-names = "default";
123 pinctrl-0 = <&uart2_pins_a>;
124 status = "okay";
125 };
126
127 uart3: serial@01c28c00 {
128 pinctrl-names = "default";
129 pinctrl-0 = <&uart3_pins_a>;
130 status = "okay";
131 };
132
133 uart4: serial@01c29000 {
134 pinctrl-names = "default";
135 pinctrl-0 = <&uart4_pins_a>;
136 status = "okay";
137 };
138
139 uart5: serial@01c29400 {
140 pinctrl-names = "default";
141 pinctrl-0 = <&uart5_pins_a>;
142 status = "okay";
143 };
144
145 i2c0: i2c@01c2ac00 {
146 pinctrl-names = "default";
147 pinctrl-0 = <&i2c0_pins_a>;
148 status = "okay";
149
150 axp209: pmic@34 {
151 compatible = "x-powers,axp209";
152 reg = <0x34>;
153 interrupt-parent = <&nmi_intc>;
Maxime Riparda6bac9e2014-12-16 22:59:59 +0100154 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
Wills Wangd95d6d42014-08-19 15:33:01 +0800155 interrupt-controller;
156 #interrupt-cells = <1>;
157 };
158 };
159
160 i2c1: i2c@01c2b000 {
161 pinctrl-names = "default";
162 pinctrl-0 = <&i2c1_pins_a>;
163 status = "okay";
164 };
165
166 i2c2: i2c@01c2b400 {
167 pinctrl-names = "default";
168 pinctrl-0 = <&i2c2_pins_a>;
169 status = "okay";
170 };
171
172 i2c3: i2c@01c2b800 {
173 pinctrl-names = "default";
174 pinctrl-0 = <&i2c3_pins_a>;
175 status = "okay";
176 };
177
178 spi2: spi@01c17000 {
179 pinctrl-names = "default";
180 pinctrl-0 = <&spi2_pins_b>;
181 status = "okay";
182 };
183
184 gmac: ethernet@01c50000 {
185 pinctrl-names = "default";
186 pinctrl-0 = <&gmac_pins_rgmii_a>;
187 phy = <&phy1>;
188 phy-mode = "rgmii";
189 phy-supply = <&reg_gmac_vdd>;
190 /* phy reset config */
Maxime Ripardbca12922014-12-16 22:59:55 +0100191 snps,reset-gpio = <&pio 0 17 GPIO_ACTIVE_HIGH>; /* PA17 */
Wills Wangd95d6d42014-08-19 15:33:01 +0800192 snps,reset-active-low;
193 /* wait 1s after reset, otherwise fail to read phy id */
194 snps,reset-delays-us = <0 10000 1000000>;
195 status = "okay";
196
197 phy1: ethernet-phy@1 {
198 reg = <1>;
199 };
200 };
201 };
202
203 reg_ahci_5v: ahci-5v {
204 pinctrl-0 = <&ahci_pwr_pin_a20_hummingbird>;
Maxime Ripardbca12922014-12-16 22:59:55 +0100205 gpio = <&pio 7 15 GPIO_ACTIVE_HIGH>; /* PH15 */
Wills Wangd95d6d42014-08-19 15:33:01 +0800206 status = "okay";
207 };
208
209 reg_usb1_vbus: usb1-vbus {
210 pinctrl-0 = <&usb1_vbus_pin_a20_hummingbird>;
Maxime Ripardbca12922014-12-16 22:59:55 +0100211 gpio = <&pio 7 2 GPIO_ACTIVE_HIGH>; /* PH2 */
Wills Wangd95d6d42014-08-19 15:33:01 +0800212 status = "okay";
213 };
214
215 reg_usb2_vbus: usb2-vbus {
216 status = "okay";
217 };
218
219 reg_mmc3_vdd: mmc3_vdd {
220 compatible = "regulator-fixed";
221 pinctrl-names = "default";
222 pinctrl-0 = <&mmc3_vdd_pin_a20_hummingbird>;
223 regulator-name = "mmc3_vdd";
224 regulator-min-microvolt = <3000000>;
225 regulator-max-microvolt = <3000000>;
226 enable-active-high;
Maxime Ripardbca12922014-12-16 22:59:55 +0100227 gpio = <&pio 7 9 GPIO_ACTIVE_HIGH>; /* PH9 */
Wills Wangd95d6d42014-08-19 15:33:01 +0800228 };
229
230 reg_gmac_vdd: gmac_vdd {
231 compatible = "regulator-fixed";
232 pinctrl-names = "default";
233 pinctrl-0 = <&gmac_vdd_pin_a20_hummingbird>;
234 regulator-name = "gmac_vdd";
235 regulator-min-microvolt = <3000000>;
236 regulator-max-microvolt = <3000000>;
237 enable-active-high;
Maxime Ripardbca12922014-12-16 22:59:55 +0100238 gpio = <&pio 7 16 GPIO_ACTIVE_HIGH>; /* PH16 */
Wills Wangd95d6d42014-08-19 15:33:01 +0800239 };
240};