xref: /linux/scripts/dtc/include-prefixes/arm/allwinner/sun7i-a20-hummingbird.dts (revision 621cde16e49b3ecf7d59a8106a20aaebfb4a59a9)
1724ba675SRob Herring/*
2724ba675SRob Herring * Copyright 2013 Wills Wang
3724ba675SRob Herring *
4724ba675SRob Herring * Wills Wang <wills.wang.open@gmail.com>
5724ba675SRob Herring *
6724ba675SRob Herring * This file is dual-licensed: you can use it either under the terms
7724ba675SRob Herring * of the GPL or the X11 license, at your option. Note that this dual
8724ba675SRob Herring * licensing only applies to this file, and not this project as a
9724ba675SRob Herring * whole.
10724ba675SRob Herring *
11724ba675SRob Herring *  a) This file is free software; you can redistribute it and/or
12724ba675SRob Herring *     modify it under the terms of the GNU General Public License as
13724ba675SRob Herring *     published by the Free Software Foundation; either version 2 of the
14724ba675SRob Herring *     License, or (at your option) any later version.
15724ba675SRob Herring *
16724ba675SRob Herring *     This file is distributed in the hope that it will be useful,
17724ba675SRob Herring *     but WITHOUT ANY WARRANTY; without even the implied warranty of
18724ba675SRob Herring *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19724ba675SRob Herring *     GNU General Public License for more details.
20724ba675SRob Herring *
21724ba675SRob Herring * Or, alternatively,
22724ba675SRob Herring *
23724ba675SRob Herring *  b) Permission is hereby granted, free of charge, to any person
24724ba675SRob Herring *     obtaining a copy of this software and associated documentation
25724ba675SRob Herring *     files (the "Software"), to deal in the Software without
26724ba675SRob Herring *     restriction, including without limitation the rights to use,
27724ba675SRob Herring *     copy, modify, merge, publish, distribute, sublicense, and/or
28724ba675SRob Herring *     sell copies of the Software, and to permit persons to whom the
29724ba675SRob Herring *     Software is furnished to do so, subject to the following
30724ba675SRob Herring *     conditions:
31724ba675SRob Herring *
32724ba675SRob Herring *     The above copyright notice and this permission notice shall be
33724ba675SRob Herring *     included in all copies or substantial portions of the Software.
34724ba675SRob Herring *
35724ba675SRob Herring *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
36724ba675SRob Herring *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
37724ba675SRob Herring *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
38724ba675SRob Herring *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
39724ba675SRob Herring *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
40724ba675SRob Herring *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
41724ba675SRob Herring *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
42724ba675SRob Herring *     OTHER DEALINGS IN THE SOFTWARE.
43724ba675SRob Herring */
44724ba675SRob Herring
45724ba675SRob Herring/dts-v1/;
46724ba675SRob Herring#include "sun7i-a20.dtsi"
47724ba675SRob Herring#include "sunxi-common-regulators.dtsi"
48724ba675SRob Herring
49724ba675SRob Herring#include <dt-bindings/gpio/gpio.h>
50724ba675SRob Herring#include <dt-bindings/interrupt-controller/irq.h>
51724ba675SRob Herring
52724ba675SRob Herring/ {
53724ba675SRob Herring	model = "Merrii A20 Hummingbird";
54724ba675SRob Herring	compatible = "merrii,a20-hummingbird", "allwinner,sun7i-a20";
55724ba675SRob Herring
56724ba675SRob Herring	aliases {
57724ba675SRob Herring		serial0 = &uart0;
58724ba675SRob Herring		serial1 = &uart2;
59724ba675SRob Herring		serial2 = &uart3;
60724ba675SRob Herring		serial3 = &uart4;
61724ba675SRob Herring		serial4 = &uart5;
62724ba675SRob Herring	};
63724ba675SRob Herring
64724ba675SRob Herring	chosen {
65724ba675SRob Herring		stdout-path = "serial0:115200n8";
66724ba675SRob Herring	};
67724ba675SRob Herring
68*0f47ef3fSKrzysztof Kozlowski	reg_mmc3_vdd: regulator-mmc3-vdd {
69724ba675SRob Herring		compatible = "regulator-fixed";
70724ba675SRob Herring		regulator-name = "mmc3_vdd";
71724ba675SRob Herring		regulator-min-microvolt = <3000000>;
72724ba675SRob Herring		regulator-max-microvolt = <3000000>;
73724ba675SRob Herring		enable-active-high;
74724ba675SRob Herring		gpio = <&pio 7 9 GPIO_ACTIVE_HIGH>; /* PH9 */
75724ba675SRob Herring	};
76724ba675SRob Herring
77*0f47ef3fSKrzysztof Kozlowski	reg_gmac_vdd: regulator-gmac-vdd {
78724ba675SRob Herring		compatible = "regulator-fixed";
79724ba675SRob Herring		regulator-name = "gmac_vdd";
80724ba675SRob Herring		regulator-min-microvolt = <3000000>;
81724ba675SRob Herring		regulator-max-microvolt = <3000000>;
82724ba675SRob Herring		enable-active-high;
83724ba675SRob Herring		gpio = <&pio 7 16 GPIO_ACTIVE_HIGH>; /* PH16 */
84724ba675SRob Herring	};
85724ba675SRob Herring};
86724ba675SRob Herring
87724ba675SRob Herring&ahci {
88724ba675SRob Herring	target-supply = <&reg_ahci_5v>;
89724ba675SRob Herring	status = "okay";
90724ba675SRob Herring};
91724ba675SRob Herring
92724ba675SRob Herring&ehci0 {
93724ba675SRob Herring	status = "okay";
94724ba675SRob Herring};
95724ba675SRob Herring
96724ba675SRob Herring&ehci1 {
97724ba675SRob Herring	status = "okay";
98724ba675SRob Herring};
99724ba675SRob Herring
100724ba675SRob Herring&gmac {
101724ba675SRob Herring	pinctrl-names = "default";
102724ba675SRob Herring	pinctrl-0 = <&gmac_rgmii_pins>;
103724ba675SRob Herring	phy-handle = <&phy1>;
104724ba675SRob Herring	phy-mode = "rgmii";
105724ba675SRob Herring	phy-supply = <&reg_gmac_vdd>;
106724ba675SRob Herring	status = "okay";
107724ba675SRob Herring};
108724ba675SRob Herring
109724ba675SRob Herring&i2c0 {
110724ba675SRob Herring	status = "okay";
111724ba675SRob Herring
112724ba675SRob Herring	axp209: pmic@34 {
113724ba675SRob Herring		compatible = "x-powers,axp209";
114724ba675SRob Herring		reg = <0x34>;
115724ba675SRob Herring		interrupt-parent = <&nmi_intc>;
116724ba675SRob Herring		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
117724ba675SRob Herring		interrupt-controller;
118724ba675SRob Herring		#interrupt-cells = <1>;
119724ba675SRob Herring	};
120724ba675SRob Herring};
121724ba675SRob Herring
122724ba675SRob Herring&i2c1 {
123724ba675SRob Herring	status = "okay";
124724ba675SRob Herring};
125724ba675SRob Herring
126724ba675SRob Herring&i2c2 {
127724ba675SRob Herring	status = "okay";
128724ba675SRob Herring};
129724ba675SRob Herring
130724ba675SRob Herring&i2c3 {
131724ba675SRob Herring	status = "okay";
132724ba675SRob Herring};
133724ba675SRob Herring
134724ba675SRob Herring&ir0 {
135724ba675SRob Herring	pinctrl-names = "default";
136724ba675SRob Herring	pinctrl-0 = <&ir0_rx_pin>;
137724ba675SRob Herring	status = "okay";
138724ba675SRob Herring};
139724ba675SRob Herring
140724ba675SRob Herring&gmac_mdio {
141724ba675SRob Herring	phy1: ethernet-phy@1 {
142724ba675SRob Herring		reg = <1>;
143724ba675SRob Herring		reset-gpios = <&pio 0 17 GPIO_ACTIVE_LOW>; /* PA17 */
144724ba675SRob Herring		reset-assert-us = <10000>;
145724ba675SRob Herring		/* wait 1s after reset, otherwise fail to read phy id */
146724ba675SRob Herring		reset-deassert-us = <1000000>;
147724ba675SRob Herring	};
148724ba675SRob Herring};
149724ba675SRob Herring
150724ba675SRob Herring&mmc0 {
151724ba675SRob Herring	vmmc-supply = <&reg_vcc3v0>;
152724ba675SRob Herring	bus-width = <4>;
153724ba675SRob Herring	cd-gpios = <&pio 7 1 GPIO_ACTIVE_LOW>; /* PH1 */
154724ba675SRob Herring	status = "okay";
155724ba675SRob Herring};
156724ba675SRob Herring
157724ba675SRob Herring&mmc3 {
158724ba675SRob Herring	vmmc-supply = <&reg_mmc3_vdd>;
159724ba675SRob Herring	bus-width = <4>;
160724ba675SRob Herring	non-removable;
161724ba675SRob Herring	status = "okay";
162724ba675SRob Herring};
163724ba675SRob Herring
164724ba675SRob Herring&ohci0 {
165724ba675SRob Herring	status = "okay";
166724ba675SRob Herring};
167724ba675SRob Herring
168724ba675SRob Herring&ohci1 {
169724ba675SRob Herring	status = "okay";
170724ba675SRob Herring};
171724ba675SRob Herring
172724ba675SRob Herring&pwm {
173724ba675SRob Herring	pinctrl-names = "default";
174724ba675SRob Herring	pinctrl-0 = <&pwm0_pin>;
175724ba675SRob Herring	status = "okay";
176724ba675SRob Herring};
177724ba675SRob Herring
178724ba675SRob Herring&reg_ahci_5v {
179724ba675SRob Herring	gpio = <&pio 7 15 GPIO_ACTIVE_HIGH>; /* PH15 */
180724ba675SRob Herring	status = "okay";
181724ba675SRob Herring};
182724ba675SRob Herring
183724ba675SRob Herring&reg_usb1_vbus {
184724ba675SRob Herring	gpio = <&pio 7 2 GPIO_ACTIVE_HIGH>; /* PH2 */
185724ba675SRob Herring	status = "okay";
186724ba675SRob Herring};
187724ba675SRob Herring
188724ba675SRob Herring&reg_usb2_vbus {
189724ba675SRob Herring	status = "okay";
190724ba675SRob Herring};
191724ba675SRob Herring
192724ba675SRob Herring&spi2 {
193724ba675SRob Herring	pinctrl-names = "default";
194724ba675SRob Herring	pinctrl-0 = <&spi2_pb_pins>,
195724ba675SRob Herring		    <&spi2_cs0_pb_pin>;
196724ba675SRob Herring	status = "okay";
197724ba675SRob Herring};
198724ba675SRob Herring
199724ba675SRob Herring&uart0 {
200724ba675SRob Herring	pinctrl-names = "default";
201724ba675SRob Herring	pinctrl-0 = <&uart0_pb_pins>;
202724ba675SRob Herring	status = "okay";
203724ba675SRob Herring};
204724ba675SRob Herring
205724ba675SRob Herring&uart2 {
206724ba675SRob Herring	pinctrl-names = "default";
207724ba675SRob Herring	pinctrl-0 = <&uart2_pi_pins>, <&uart2_cts_rts_pi_pins>;
208724ba675SRob Herring	status = "okay";
209724ba675SRob Herring};
210724ba675SRob Herring
211724ba675SRob Herring&uart3 {
212724ba675SRob Herring	pinctrl-names = "default";
213724ba675SRob Herring	pinctrl-0 = <&uart3_pg_pins>, <&uart3_cts_rts_pg_pins>;
214724ba675SRob Herring	status = "okay";
215724ba675SRob Herring};
216724ba675SRob Herring
217724ba675SRob Herring&uart4 {
218724ba675SRob Herring	pinctrl-names = "default";
219724ba675SRob Herring	pinctrl-0 = <&uart4_pg_pins>;
220724ba675SRob Herring	status = "okay";
221724ba675SRob Herring};
222724ba675SRob Herring
223724ba675SRob Herring&uart5 {
224724ba675SRob Herring	pinctrl-names = "default";
225724ba675SRob Herring	pinctrl-0 = <&uart5_pi_pins>;
226724ba675SRob Herring	status = "okay";
227724ba675SRob Herring};
228724ba675SRob Herring
229724ba675SRob Herring&usbphy {
230724ba675SRob Herring	usb1_vbus-supply = <&reg_usb1_vbus>;
231724ba675SRob Herring	usb2_vbus-supply = <&reg_usb2_vbus>;
232724ba675SRob Herring	status = "okay";
233724ba675SRob Herring};
234