2 * Copyright 2013 Wills Wang
4 * Wills Wang <wills.wang.open@gmail.com>
6 * This file is dual-licensed: you can use it either under the terms
7 * of the GPL or the X11 license, at your option. Note that this dual
8 * licensing only applies to this file, and not this project as a
11 * a) This file is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License as
13 * published by the Free Software Foundation; either version 2 of the
14 * License, or (at your option) any later version.
16 * This file is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public
22 * License along with this file; if not, write to the Free
23 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
28 * b) Permission is hereby granted, free of charge, to any person
29 * obtaining a copy of this software and associated documentation
30 * files (the "Software"), to deal in the Software without
31 * restriction, including without limitation the rights to use,
32 * copy, modify, merge, publish, distribute, sublicense, and/or
33 * sell copies of the Software, and to permit persons to whom the
34 * Software is furnished to do so, subject to the following
37 * The above copyright notice and this permission notice shall be
38 * included in all copies or substantial portions of the Software.
40 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
41 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
42 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
43 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
44 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
45 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
46 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
47 * OTHER DEALINGS IN THE SOFTWARE.
51 #include "sun7i-a20.dtsi"
52 #include "sunxi-common-regulators.dtsi"
54 #include <dt-bindings/gpio/gpio.h>
55 #include <dt-bindings/interrupt-controller/irq.h>
56 #include <dt-bindings/pinctrl/sun4i-a10.h>
59 model = "Merrii A20 Hummingbird";
60 compatible = "merrii,a20-hummingbird", "allwinner,sun7i-a20";
72 pinctrl-names = "default";
73 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
74 vmmc-supply = <®_vcc3v0>;
76 cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
82 pinctrl-names = "default";
83 pinctrl-0 = <&mmc3_pins_a>;
84 vmmc-supply = <®_mmc3_vdd>;
90 usbphy: phy@01c13400 {
91 usb1_vbus-supply = <®_usb1_vbus>;
92 usb2_vbus-supply = <®_usb2_vbus>;
100 ohci0: usb@01c14400 {
104 ahci: sata@01c18000 {
105 target-supply = <®_ahci_5v>;
109 ehci1: usb@01c1c000 {
113 ohci1: usb@01c1c400 {
117 pio: pinctrl@01c20800 {
118 ahci_pwr_pin_a20_hummingbird: ahci_pwr_pin@0 {
119 allwinner,pins = "PH15";
120 allwinner,function = "gpio_out";
121 allwinner,drive = <SUN4I_PINCTRL_10_MA>;
122 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
125 usb1_vbus_pin_a20_hummingbird: usb1_vbus_pin@0 {
126 allwinner,pins = "PH2";
127 allwinner,function = "gpio_out";
128 allwinner,drive = <SUN4I_PINCTRL_10_MA>;
129 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
132 mmc3_vdd_pin_a20_hummingbird: mmc3_vdd_pin@0 {
133 allwinner,pins = "PH9";
134 allwinner,function = "gpio_out";
135 allwinner,drive = <SUN4I_PINCTRL_10_MA>;
136 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
139 gmac_vdd_pin_a20_hummingbird: gmac_vdd_pin@0 {
140 allwinner,pins = "PH16";
141 allwinner,function = "gpio_out";
142 allwinner,drive = <SUN4I_PINCTRL_10_MA>;
143 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
148 pinctrl-names = "default";
149 pinctrl-0 = <&pwm0_pins_a>;
154 pinctrl-names = "default";
155 pinctrl-0 = <&ir0_pins_a>;
159 uart0: serial@01c28000 {
160 pinctrl-names = "default";
161 pinctrl-0 = <&uart0_pins_a>;
165 uart2: serial@01c28800 {
166 pinctrl-names = "default";
167 pinctrl-0 = <&uart2_pins_a>;
171 uart3: serial@01c28c00 {
172 pinctrl-names = "default";
173 pinctrl-0 = <&uart3_pins_a>;
177 uart4: serial@01c29000 {
178 pinctrl-names = "default";
179 pinctrl-0 = <&uart4_pins_a>;
183 uart5: serial@01c29400 {
184 pinctrl-names = "default";
185 pinctrl-0 = <&uart5_pins_a>;
190 pinctrl-names = "default";
191 pinctrl-0 = <&i2c0_pins_a>;
195 compatible = "x-powers,axp209";
197 interrupt-parent = <&nmi_intc>;
198 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
199 interrupt-controller;
200 #interrupt-cells = <1>;
205 pinctrl-names = "default";
206 pinctrl-0 = <&i2c1_pins_a>;
211 pinctrl-names = "default";
212 pinctrl-0 = <&i2c2_pins_a>;
217 pinctrl-names = "default";
218 pinctrl-0 = <&i2c3_pins_a>;
223 pinctrl-names = "default";
224 pinctrl-0 = <&spi2_pins_b>;
228 gmac: ethernet@01c50000 {
229 pinctrl-names = "default";
230 pinctrl-0 = <&gmac_pins_rgmii_a>;
233 phy-supply = <®_gmac_vdd>;
234 /* phy reset config */
235 snps,reset-gpio = <&pio 0 17 GPIO_ACTIVE_HIGH>; /* PA17 */
236 snps,reset-active-low;
237 /* wait 1s after reset, otherwise fail to read phy id */
238 snps,reset-delays-us = <0 10000 1000000>;
241 phy1: ethernet-phy@1 {
247 reg_ahci_5v: ahci-5v {
248 pinctrl-0 = <&ahci_pwr_pin_a20_hummingbird>;
249 gpio = <&pio 7 15 GPIO_ACTIVE_HIGH>; /* PH15 */
253 reg_usb1_vbus: usb1-vbus {
254 pinctrl-0 = <&usb1_vbus_pin_a20_hummingbird>;
255 gpio = <&pio 7 2 GPIO_ACTIVE_HIGH>; /* PH2 */
259 reg_usb2_vbus: usb2-vbus {
263 reg_mmc3_vdd: mmc3_vdd {
264 compatible = "regulator-fixed";
265 pinctrl-names = "default";
266 pinctrl-0 = <&mmc3_vdd_pin_a20_hummingbird>;
267 regulator-name = "mmc3_vdd";
268 regulator-min-microvolt = <3000000>;
269 regulator-max-microvolt = <3000000>;
271 gpio = <&pio 7 9 GPIO_ACTIVE_HIGH>; /* PH9 */
274 reg_gmac_vdd: gmac_vdd {
275 compatible = "regulator-fixed";
276 pinctrl-names = "default";
277 pinctrl-0 = <&gmac_vdd_pin_a20_hummingbird>;
278 regulator-name = "gmac_vdd";
279 regulator-min-microvolt = <3000000>;
280 regulator-max-microvolt = <3000000>;
282 gpio = <&pio 7 16 GPIO_ACTIVE_HIGH>; /* PH16 */