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";
71 stdout-path = "serial0:115200n8";
74 reg_mmc3_vdd: mmc3_vdd {
75 compatible = "regulator-fixed";
76 pinctrl-names = "default";
77 pinctrl-0 = <&mmc3_vdd_pin_a20_hummingbird>;
78 regulator-name = "mmc3_vdd";
79 regulator-min-microvolt = <3000000>;
80 regulator-max-microvolt = <3000000>;
82 gpio = <&pio 7 9 GPIO_ACTIVE_HIGH>; /* PH9 */
85 reg_gmac_vdd: gmac_vdd {
86 compatible = "regulator-fixed";
87 pinctrl-names = "default";
88 pinctrl-0 = <&gmac_vdd_pin_a20_hummingbird>;
89 regulator-name = "gmac_vdd";
90 regulator-min-microvolt = <3000000>;
91 regulator-max-microvolt = <3000000>;
93 gpio = <&pio 7 16 GPIO_ACTIVE_HIGH>; /* PH16 */
98 target-supply = <®_ahci_5v>;
111 pinctrl-names = "default";
112 pinctrl-0 = <&gmac_pins_rgmii_a>;
115 phy-supply = <®_gmac_vdd>;
116 /* phy reset config */
117 snps,reset-gpio = <&pio 0 17 GPIO_ACTIVE_HIGH>; /* PA17 */
118 snps,reset-active-low;
119 /* wait 1s after reset, otherwise fail to read phy id */
120 snps,reset-delays-us = <0 10000 1000000>;
123 phy1: ethernet-phy@1 {
129 pinctrl-names = "default";
130 pinctrl-0 = <&i2c0_pins_a>;
134 compatible = "x-powers,axp209";
136 interrupt-parent = <&nmi_intc>;
137 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
138 interrupt-controller;
139 #interrupt-cells = <1>;
144 pinctrl-names = "default";
145 pinctrl-0 = <&i2c1_pins_a>;
150 pinctrl-names = "default";
151 pinctrl-0 = <&i2c2_pins_a>;
156 pinctrl-names = "default";
157 pinctrl-0 = <&i2c3_pins_a>;
162 pinctrl-names = "default";
163 pinctrl-0 = <&ir0_pins_a>;
168 pinctrl-names = "default";
169 pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
170 vmmc-supply = <®_vcc3v0>;
172 cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
178 pinctrl-names = "default";
179 pinctrl-0 = <&mmc3_pins_a>;
180 vmmc-supply = <®_mmc3_vdd>;
195 ahci_pwr_pin_a20_hummingbird: ahci_pwr_pin@0 {
196 allwinner,pins = "PH15";
197 allwinner,function = "gpio_out";
198 allwinner,drive = <SUN4I_PINCTRL_10_MA>;
199 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
202 usb1_vbus_pin_a20_hummingbird: usb1_vbus_pin@0 {
203 allwinner,pins = "PH2";
204 allwinner,function = "gpio_out";
205 allwinner,drive = <SUN4I_PINCTRL_10_MA>;
206 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
209 mmc3_vdd_pin_a20_hummingbird: mmc3_vdd_pin@0 {
210 allwinner,pins = "PH9";
211 allwinner,function = "gpio_out";
212 allwinner,drive = <SUN4I_PINCTRL_10_MA>;
213 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
216 gmac_vdd_pin_a20_hummingbird: gmac_vdd_pin@0 {
217 allwinner,pins = "PH16";
218 allwinner,function = "gpio_out";
219 allwinner,drive = <SUN4I_PINCTRL_10_MA>;
220 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
225 pinctrl-names = "default";
226 pinctrl-0 = <&pwm0_pins_a>;
231 pinctrl-0 = <&ahci_pwr_pin_a20_hummingbird>;
232 gpio = <&pio 7 15 GPIO_ACTIVE_HIGH>; /* PH15 */
237 pinctrl-0 = <&usb1_vbus_pin_a20_hummingbird>;
238 gpio = <&pio 7 2 GPIO_ACTIVE_HIGH>; /* PH2 */
247 pinctrl-names = "default";
248 pinctrl-0 = <&spi2_pins_b>;
253 pinctrl-names = "default";
254 pinctrl-0 = <&uart0_pins_a>;
259 pinctrl-names = "default";
260 pinctrl-0 = <&uart2_pins_a>;
265 pinctrl-names = "default";
266 pinctrl-0 = <&uart3_pins_a>;
271 pinctrl-names = "default";
272 pinctrl-0 = <&uart4_pins_a>;
277 pinctrl-names = "default";
278 pinctrl-0 = <&uart5_pins_a>;
283 usb1_vbus-supply = <®_usb1_vbus>;
284 usb2_vbus-supply = <®_usb2_vbus>;