ce1e28afa2fe2c32123181f191d72b44caf6a5da
[pandora-kernel.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 #include <dt-bindings/gpio/gpio.h>
53
54 / {
55         model = "Olimex A20-OLinuXino-LIME2";
56         compatible = "olimex,a20-olinuxino-lime2", "allwinner,sun7i-a20";
57
58         soc@01c00000 {
59                 mmc0: mmc@01c0f000 {
60                         pinctrl-names = "default";
61                         pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>;
62                         vmmc-supply = <&reg_vcc3v3>;
63                         bus-width = <4>;
64                         cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
65                         cd-inverted;
66                         status = "okay";
67                 };
68
69                 usbphy: phy@01c13400 {
70                         usb1_vbus-supply = <&reg_usb1_vbus>;
71                         usb2_vbus-supply = <&reg_usb2_vbus>;
72                         status = "okay";
73                 };
74
75                 ehci0: usb@01c14000 {
76                         status = "okay";
77                 };
78
79                 ohci0: usb@01c14400 {
80                         status = "okay";
81                 };
82
83                 ahci: sata@01c18000 {
84                         target-supply = <&reg_ahci_5v>;
85                         status = "okay";
86                 };
87
88                 ehci1: usb@01c1c000 {
89                         status = "okay";
90                 };
91
92                 ohci1: usb@01c1c400 {
93                         status = "okay";
94                 };
95
96                 pinctrl@01c20800 {
97                         ahci_pwr_pin_olinuxinolime: ahci_pwr_pin@1 {
98                                 allwinner,pins = "PC3";
99                                 allwinner,function = "gpio_out";
100                                 allwinner,drive = <0>;
101                                 allwinner,pull = <0>;
102                         };
103
104                         led_pins_olinuxinolime: led_pins@0 {
105                                 allwinner,pins = "PH2";
106                                 allwinner,function = "gpio_out";
107                                 allwinner,drive = <1>;
108                                 allwinner,pull = <0>;
109                         };
110                 };
111
112                 uart0: serial@01c28000 {
113                         pinctrl-names = "default";
114                         pinctrl-0 = <&uart0_pins_a>;
115                         status = "okay";
116                 };
117
118                 i2c0: i2c@01c2ac00 {
119                         pinctrl-names = "default";
120                         pinctrl-0 = <&i2c0_pins_a>;
121                         status = "okay";
122
123                         axp209: pmic@34 {
124                                 compatible = "x-powers,axp209";
125                                 reg = <0x34>;
126                                 interrupt-parent = <&nmi_intc>;
127                                 interrupts = <0 8>;
128
129                                 interrupt-controller;
130                                 #interrupt-cells = <1>;
131
132                                 acin-supply = <&reg_axp_ipsout>;
133                                 vin2-supply = <&reg_axp_ipsout>;
134                                 vin3-supply = <&reg_axp_ipsout>;
135                                 ldo24in-supply = <&reg_axp_ipsout>;
136                                 ldo3in-supply = <&reg_axp_ipsout>;
137
138                                 regulators {
139                                         vdd_rtc: ldo1 {
140                                                 regulator-min-microvolt = <1300000>;
141                                                 regulator-max-microvolt = <1300000>;
142                                                 regulator-always-on;
143                                         };
144
145                                         avcc: ldo2 {
146                                                 regulator-min-microvolt = <1800000>;
147                                                 regulator-max-microvolt = <3300000>;
148                                                 regulator-always-on;
149                                         };
150
151                                         vcc_csi0: ldo3 {
152                                                 regulator-min-microvolt = <700000>;
153                                                 regulator-max-microvolt = <3500000>;
154                                                 regulator-always-on;
155                                         };
156
157                                         vcc_csi1: ldo4 {
158                                                 regulator-min-microvolt = <1250000>;
159                                                 regulator-max-microvolt = <3300000>;
160                                                 regulator-always-on;
161                                         };
162
163                                         vdd_cpu: dcdc2 {
164                                                 regulator-min-microvolt = <700000>;
165                                                 regulator-max-microvolt = <2275000>;
166                                                 regulator-always-on;
167                                         };
168
169                                         vdd_int: dcdc3 {
170                                                 regulator-min-microvolt = <700000>;
171                                                 regulator-max-microvolt = <3500000>;
172                                                 regulator-always-on;
173                                         };
174                                 };
175                         };
176                 };
177
178                 i2c1: i2c@01c2b000 {
179                         pinctrl-names = "default";
180                         pinctrl-0 = <&i2c1_pins_a>;
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                         status = "okay";
190
191                         phy1: ethernet-phy@1 {
192                                 reg = <1>;
193                         };
194                 };
195         };
196
197         leds {
198                 compatible = "gpio-leds";
199                 pinctrl-names = "default";
200                 pinctrl-0 = <&led_pins_olinuxinolime>;
201
202                 green {
203                         label = "a20-olinuxino-lime2:green:usr";
204                         gpios = <&pio 7 2 GPIO_ACTIVE_HIGH>;
205                         default-state = "on";
206                 };
207         };
208
209         reg_ahci_5v: ahci-5v {
210                 pinctrl-0 = <&ahci_pwr_pin_olinuxinolime>;
211                 gpio = <&pio 2 3 GPIO_ACTIVE_HIGH>;
212                 status = "okay";
213         };
214
215         reg_usb1_vbus: usb1-vbus {
216                 status = "okay";
217         };
218
219         reg_usb2_vbus: usb2-vbus {
220                 status = "okay";
221         };
222
223         reg_axp_ipsout: axp_ipsout {
224                 compatible = "regulator-fixed";
225                 regulator-name = "axp-ipsout";
226                 regulator-min-microvolt = <5000000>;
227                 regulator-max-microvolt = <5000000>;
228                 regulator-always-on;
229         };
230 };