Merge branch 'xtensa-sim-params' into xtensa-fixes
[sfrench/cifs-2.6.git] / arch / arm / boot / dts / sun5i-a13-licheepi-one.dts
1 /*
2  * Copyright 2016 Icenowy Zheng <icenowy@aosc.xyz>
3  *
4  * Based on sun5i-a13-olinuxino.dts, which is
5  *   Copyright 2012 Maxime Ripard <maxime.ripard@free-electrons.com>
6  *   Copyright 2013 Hans de Goede <hdegoede@redhat.com>
7  *
8  * This file is dual-licensed: you can use it either under the terms
9  * of the GPL or the X11 license, at your option. Note that this dual
10  * licensing only applies to this file, and not this project as a
11  * whole.
12  *
13  *  a) This file is free software; you can redistribute it and/or
14  *     modify it under the terms of the GNU General Public License as
15  *     published by the Free Software Foundation; either version 2 of the
16  *     License, or (at your option) any later version.
17  *
18  *     This file is distributed in the hope that it will be useful,
19  *     but WITHOUT ANY WARRANTY; without even the implied warranty of
20  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21  *     GNU General Public License for more details.
22  *
23  * Or, alternatively,
24  *
25  *  b) Permission is hereby granted, free of charge, to any person
26  *     obtaining a copy of this software and associated documentation
27  *     files (the "Software"), to deal in the Software without
28  *     restriction, including without limitation the rights to use,
29  *     copy, modify, merge, publish, distribute, sublicense, and/or
30  *     sell copies of the Software, and to permit persons to whom the
31  *     Software is furnished to do so, subject to the following
32  *     conditions:
33  *
34  *     The above copyright notice and this permission notice shall be
35  *     included in all copies or substantial portions of the Software.
36  *
37  *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
38  *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
39  *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
40  *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
41  *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
42  *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
43  *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
44  *     OTHER DEALINGS IN THE SOFTWARE.
45  */
46
47 /dts-v1/;
48 #include "sun5i-a13.dtsi"
49 #include "sunxi-common-regulators.dtsi"
50
51 #include <dt-bindings/gpio/gpio.h>
52 #include <dt-bindings/input/input.h>
53 #include <dt-bindings/pinctrl/sun4i-a10.h>
54
55 / {
56         model = "Lichee Pi One";
57         compatible = "licheepi,licheepi-one", "allwinner,sun5i-a13";
58
59         aliases {
60                 serial0 = &uart1;
61         };
62
63         chosen {
64                 stdout-path = "serial0:115200n8";
65         };
66
67         leds {
68                 compatible = "gpio-leds";
69
70                 red {
71                         label ="licheepi:red:usr";
72                         gpios = <&pio 2 5 GPIO_ACTIVE_LOW>;
73                 };
74
75                 green {
76                         label ="licheepi:green:usr";
77                         gpios = <&pio 2 19 GPIO_ACTIVE_LOW>;
78                         default-state = "on";
79                 };
80
81                 blue {
82                         label ="licheepi:blue:usr";
83                         gpios = <&pio 2 4 GPIO_ACTIVE_LOW>;
84                 };
85
86         };
87 };
88
89 &cpu0 {
90         cpu-supply = <&reg_dcdc2>;
91 };
92
93 &ehci0 {
94         status = "okay";
95 };
96
97 &i2c0 {
98         pinctrl-names = "default";
99         pinctrl-0 = <&i2c0_pins_a>;
100         status = "okay";
101
102         axp209: pmic@34 {
103                 compatible = "x-powers,axp209";
104                 reg = <0x34>;
105                 interrupts = <0>;
106
107                 interrupt-controller;
108                 #interrupt-cells = <1>;
109         };
110 };
111
112 &i2c1 {
113         pinctrl-names = "default";
114         pinctrl-0 = <&i2c1_pins_a>;
115         status = "disabled";
116 };
117
118 &i2c2 {
119         pinctrl-names = "default";
120         pinctrl-0 = <&i2c2_pins_a>;
121         status = "disabled";
122 };
123
124 &lradc {
125         vref-supply = <&reg_ldo2>;
126         status = "okay";
127
128         button@984 {
129                 label = "Home";
130                 linux,code = <KEY_HOMEPAGE>;
131                 channel = <0>;
132                 voltage = <984126>;
133         };
134 };
135
136 &mmc0 {
137         pinctrl-names = "default";
138         pinctrl-0 = <&mmc0_pins_a>;
139         vmmc-supply = <&reg_vcc3v3>;
140         bus-width = <4>;
141         broken-cd;
142         status = "okay";
143 };
144
145 &mmc2 {
146         pinctrl-names = "default";
147         pinctrl-0 = <&mmc2_4bit_pins_a>;
148         vmmc-supply = <&reg_vcc3v3>;
149         bus-width = <4>;
150         broken-cd;
151         status = "okay";
152 };
153
154 &ohci0 {
155         status = "okay";
156 };
157
158 &otg_sram {
159         status = "okay";
160 };
161
162 #include "axp209.dtsi"
163
164 &reg_dcdc2 {
165         regulator-always-on;
166         regulator-min-microvolt = <1000000>;
167         regulator-max-microvolt = <1500000>;
168         regulator-name = "vdd-cpu";
169 };
170
171 &reg_dcdc3 {
172         regulator-always-on;
173         regulator-min-microvolt = <1000000>;
174         regulator-max-microvolt = <1400000>;
175         regulator-name = "vdd-int-dll";
176 };
177
178 &reg_ldo1 {
179         regulator-name = "vdd-rtc";
180 };
181
182 &reg_ldo2 {
183         regulator-always-on;
184         regulator-min-microvolt = <3000000>;
185         regulator-max-microvolt = <3000000>;
186         regulator-name = "avcc";
187 };
188
189 &reg_ldo3 {
190         regulator-min-microvolt = <1800000>;
191         regulator-max-microvolt = <1800000>;
192         regulator-name = "csi-1.8v";
193 };
194
195 &reg_ldo4 {
196         regulator-min-microvolt = <2800000>;
197         regulator-max-microvolt = <2800000>;
198         regulator-name = "csi-2.8v";
199 };
200
201 &reg_usb0_vbus {
202         gpio = <&pio 2 12 GPIO_ACTIVE_HIGH>; /* PC12 */
203         status = "okay";
204 };
205
206 &uart1 {
207         pinctrl-names = "default";
208         pinctrl-0 = <&uart1_pins_b>;
209         status = "okay";
210 };
211
212 &usb_otg {
213         dr_mode = "otg";
214         status = "okay";
215 };
216
217 &usbphy {
218         pinctrl-names = "default";
219         usb0_id_det-gpio = <&pio 6 2 GPIO_ACTIVE_HIGH>; /* PG2 */
220         usb0_vbus_det-gpio = <&pio 6 1 GPIO_ACTIVE_HIGH>; /* PG1 */
221         usb0_vbus-supply = <&reg_usb0_vbus>;
222         usb1_vbus-supply = <&reg_vcc5v0>;
223         status = "okay";
224 };