Merge branch 'cleanup/blocksize-diet-part2' of git://git.kernel.org/pub/scm/linux...
[firefly-linux-kernel-4.4.55.git] / arch / arm / boot / dts / sun7i-a20-olinuxino-lime2.dts
1 /*
2  * Copyright 2014 - Iain Paton <ipaton0@gmail.com>
3  *
4  * This file is dual-licensed: you can use it either under the terms
5  * of the GPL or the X11 license, at your option. Note that this dual
6  * licensing only applies to this file, and not this project as a
7  * whole.
8  *
9  *  a) This file is free software; you can redistribute it and/or
10  *     modify it under the terms of the GNU General Public License as
11  *     published by the Free Software Foundation; either version 2 of the
12  *     License, or (at your option) any later version.
13  *
14  *     This file is distributed in the hope that it will be useful,
15  *     but WITHOUT ANY WARRANTY; without even the implied warranty of
16  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  *     GNU General Public License for more details.
18  *
19  *     You should have received a copy of the GNU General Public
20  *     License along with this file; if not, write to the Free
21  *     Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
22  *     MA 02110-1301 USA
23  *
24  * Or, alternatively,
25  *
26  *  b) Permission is hereby granted, free of charge, to any person
27  *     obtaining a copy of this software and associated documentation
28  *     files (the "Software"), to deal in the Software without
29  *     restriction, including without limitation the rights to use,
30  *     copy, modify, merge, publish, distribute, sublicense, and/or
31  *     sell copies of the Software, and to permit persons to whom the
32  *     Software is furnished to do so, subject to the following
33  *     conditions:
34  *
35  *     The above copyright notice and this permission notice shall be
36  *     included in all copies or substantial portions of the Software.
37  *
38  *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
39  *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
40  *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
41  *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
42  *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
43  *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
44  *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
45  *     OTHER DEALINGS IN THE SOFTWARE.
46  */
47
48 /dts-v1/;
49 /include/ "sun7i-a20.dtsi"
50 /include/ "sunxi-common-regulators.dtsi"
51
52 / {
53         model = "Olimex A20-OLinuXino-LIME2";
54         compatible = "olimex,a20-olinuxino-lime2", "allwinner,sun7i-a20";
55
56         soc@01c00000 {
57                 mmc0: mmc@01c0f000 {
58                         pinctrl-names = "default";
59                         pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
60                         vmmc-supply = <&reg_vcc3v3>;
61                         bus-width = <4>;
62                         cd-gpios = <&pio 7 1 0>; /* PH1 */
63                         cd-inverted;
64                         status = "okay";
65                 };
66
67                 usbphy: phy@01c13400 {
68                         usb1_vbus-supply = <&reg_usb1_vbus>;
69                         usb2_vbus-supply = <&reg_usb2_vbus>;
70                         status = "okay";
71                 };
72
73                 ehci0: usb@01c14000 {
74                         status = "okay";
75                 };
76
77                 ohci0: usb@01c14400 {
78                         status = "okay";
79                 };
80
81                 ahci: sata@01c18000 {
82                         target-supply = <&reg_ahci_5v>;
83                         status = "okay";
84                 };
85
86                 ehci1: usb@01c1c000 {
87                         status = "okay";
88                 };
89
90                 ohci1: usb@01c1c400 {
91                         status = "okay";
92                 };
93
94                 pinctrl@01c20800 {
95                         ahci_pwr_pin_olinuxinolime: ahci_pwr_pin@1 {
96                                 allwinner,pins = "PC3";
97                                 allwinner,function = "gpio_out";
98                                 allwinner,drive = <0>;
99                                 allwinner,pull = <0>;
100                         };
101
102                         led_pins_olinuxinolime: led_pins@0 {
103                                 allwinner,pins = "PH2";
104                                 allwinner,function = "gpio_out";
105                                 allwinner,drive = <1>;
106                                 allwinner,pull = <0>;
107                         };
108                 };
109
110                 uart0: serial@01c28000 {
111                         pinctrl-names = "default";
112                         pinctrl-0 = <&uart0_pins_a>;
113                         status = "okay";
114                 };
115
116                 i2c0: i2c@01c2ac00 {
117                         pinctrl-names = "default";
118                         pinctrl-0 = <&i2c0_pins_a>;
119                         status = "okay";
120
121                         axp209: pmic@34 {
122                                 compatible = "x-powers,axp209";
123                                 reg = <0x34>;
124                                 interrupt-parent = <&nmi_intc>;
125                                 interrupts = <0 8>;
126
127                                 interrupt-controller;
128                                 #interrupt-cells = <1>;
129
130                                 acin-supply = <&reg_axp_ipsout>;
131                                 vin2-supply = <&reg_axp_ipsout>;
132                                 vin3-supply = <&reg_axp_ipsout>;
133                                 ldo24in-supply = <&reg_axp_ipsout>;
134                                 ldo3in-supply = <&reg_axp_ipsout>;
135
136                                 regulators {
137                                         vdd_rtc: ldo1 {
138                                                 regulator-min-microvolt = <1300000>;
139                                                 regulator-max-microvolt = <1300000>;
140                                                 regulator-always-on;
141                                         };
142
143                                         avcc: ldo2 {
144                                                 regulator-min-microvolt = <1800000>;
145                                                 regulator-max-microvolt = <3300000>;
146                                                 regulator-always-on;
147                                         };
148
149                                         vcc_csi0: ldo3 {
150                                                 regulator-min-microvolt = <700000>;
151                                                 regulator-max-microvolt = <3500000>;
152                                                 regulator-always-on;
153                                         };
154
155                                         vcc_csi1: ldo4 {
156                                                 regulator-min-microvolt = <1250000>;
157                                                 regulator-max-microvolt = <3300000>;
158                                                 regulator-always-on;
159                                         };
160
161                                         vdd_cpu: dcdc2 {
162                                                 regulator-min-microvolt = <700000>;
163                                                 regulator-max-microvolt = <2275000>;
164                                                 regulator-always-on;
165                                         };
166
167                                         vdd_int: dcdc3 {
168                                                 regulator-min-microvolt = <700000>;
169                                                 regulator-max-microvolt = <3500000>;
170                                                 regulator-always-on;
171                                         };
172                                 };
173                         };
174                 };
175
176                 i2c1: i2c@01c2b000 {
177                         pinctrl-names = "default";
178                         pinctrl-0 = <&i2c1_pins_a>;
179                         status = "okay";
180                 };
181
182                 gmac: ethernet@01c50000 {
183                         pinctrl-names = "default";
184                         pinctrl-0 = <&gmac_pins_rgmii_a>;
185                         phy = <&phy1>;
186                         phy-mode = "rgmii";
187                         status = "okay";
188
189                         phy1: ethernet-phy@1 {
190                                 reg = <1>;
191                         };
192                 };
193         };
194
195         leds {
196                 compatible = "gpio-leds";
197                 pinctrl-names = "default";
198                 pinctrl-0 = <&led_pins_olinuxinolime>;
199
200                 green {
201                         label = "a20-olinuxino-lime2:green:usr";
202                         gpios = <&pio 7 2 0>;
203                         default-state = "on";
204                 };
205         };
206
207         reg_ahci_5v: ahci-5v {
208                 pinctrl-0 = <&ahci_pwr_pin_olinuxinolime>;
209                 gpio = <&pio 2 3 0>;
210                 status = "okay";
211         };
212
213         reg_usb1_vbus: usb1-vbus {
214                 status = "okay";
215         };
216
217         reg_usb2_vbus: usb2-vbus {
218                 status = "okay";
219         };
220
221         reg_axp_ipsout: axp_ipsout {
222                 compatible = "regulator-fixed";
223                 regulator-name = "axp-ipsout";
224                 regulator-min-microvolt = <5000000>;
225                 regulator-max-microvolt = <5000000>;
226                 regulator-always-on;
227         };
228 };