Merge remote-tracking branch 'mfd/for-mfd-next'
[deliverable/linux.git] / arch / arm / boot / dts / sun9i-a80-cubieboard4.dts
CommitLineData
6d11c8e2
TB
1/*
2 * Copyright 2015 Tyler Baker
3 *
4 * Tyler Baker <tyler.baker@linaro.org>
5 * Chen-Yu Tsai <wens@csie.org>
6 *
7 * This file is dual-licensed: you can use it either under the terms
8 * of the GPL or the X11 license, at your option. Note that this dual
9 * licensing only applies to this file, and not this project as a
10 * whole.
11 *
12 * a) This file is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License as
14 * published by the Free Software Foundation; either version 2 of the
15 * License, or (at your option) any later version.
16 *
17 * This file is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
21 *
22 * Or, alternatively,
23 *
24 * b) Permission is hereby granted, free of charge, to any person
25 * obtaining a copy of this software and associated documentation
26 * files (the "Software"), to deal in the Software without
27 * restriction, including without limitation the rights to use,
28 * copy, modify, merge, publish, distribute, sublicense, and/or
29 * sell copies of the Software, and to permit persons to whom the
30 * Software is furnished to do so, subject to the following
31 * conditions:
32 *
33 * The above copyright notice and this permission notice shall be
34 * included in all copies or substantial portions of the Software.
35 *
36 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
37 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
38 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
39 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
40 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
41 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
42 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
43 * OTHER DEALINGS IN THE SOFTWARE.
44 */
45
46/dts-v1/;
47#include "sun9i-a80.dtsi"
6d11c8e2
TB
48
49#include <dt-bindings/gpio/gpio.h>
50#include <dt-bindings/pinctrl/sun4i-a10.h>
51
52/ {
53 model = "Cubietech Cubieboard4";
54 compatible = "cubietech,a80-cubieboard4", "allwinner,sun9i-a80";
55
56 aliases {
57 serial0 = &uart0;
58 };
59
60 chosen {
61 stdout-path = "serial0:115200n8";
62 };
63
c807d6e2
CYT
64 leds {
65 compatible = "gpio-leds";
66 pinctrl-names = "default";
67 pinctrl-0 = <&led_pins_cubieboard4>;
68
69 green {
70 label = "cubieboard4:green:usr";
71 gpios = <&pio 7 17 GPIO_ACTIVE_HIGH>; /* PH17 */
72 };
73
74 red {
75 label = "cubieboard4:red:usr";
76 gpios = <&pio 7 6 GPIO_ACTIVE_HIGH>; /* PH6 */
77 };
78 };
6d11c8e2
TB
79};
80
6d11c8e2
TB
81&mmc0 {
82 pinctrl-names = "default";
83 pinctrl-0 = <&mmc0_pins>, <&mmc0_cd_pin_cubieboard4>;
1e1dea72 84 vmmc-supply = <&reg_dcdc1>;
6d11c8e2
TB
85 bus-width = <4>;
86 cd-gpios = <&pio 7 18 GPIO_ACTIVE_HIGH>; /* PH18 */
87 cd-inverted;
88 status = "okay";
89};
90
91&mmc2 {
92 pinctrl-names = "default";
93 pinctrl-0 = <&mmc2_8bit_pins>;
1e1dea72 94 vmmc-supply = <&reg_dcdc1>;
6d11c8e2
TB
95 bus-width = <8>;
96 non-removable;
8826532c 97 cap-mmc-hw-reset;
6d11c8e2
TB
98 status = "okay";
99};
100
8826532c
CYT
101&mmc2_8bit_pins {
102 /* Increase drive strength for DDR modes */
103 allwinner,drive = <SUN4I_PINCTRL_40_MA>;
104};
105
16266987
CYT
106&osc32k {
107 /* osc32k input is from AC100 */
108 clocks = <&ac100_rtc 0>;
109};
110
08ff3e4e
CYT
111&pio {
112 led_pins_cubieboard4: led-pins@0 {
113 allwinner,pins = "PH6", "PH17";
114 allwinner,function = "gpio_out";
115 allwinner,drive = <SUN4I_PINCTRL_10_MA>;
116 allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
117 };
118
119 mmc0_cd_pin_cubieboard4: mmc0_cd_pin@0 {
120 allwinner,pins = "PH18";
121 allwinner,function = "gpio_in";
122 allwinner,drive = <SUN4I_PINCTRL_10_MA>;
123 allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
124 };
125};
126
62b4b20c
CYT
127&r_ir {
128 status = "okay";
129};
130
6f353f61
CYT
131&r_rsb {
132 status = "okay";
1e1dea72
CYT
133
134 axp809: pmic@3a3 {
135 reg = <0x3a3>;
136 interrupt-parent = <&nmi_intc>;
137 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
138
139 regulators {
140 reg_aldo1: aldo1 {
141 /*
142 * TODO: This should be handled by the
143 * USB PHY driver.
144 */
145 regulator-always-on;
146 regulator-min-microvolt = <3000000>;
147 regulator-max-microvolt = <3000000>;
148 regulator-name = "vcc33-usbh";
149 };
150
151 reg_aldo2: aldo2 {
152 regulator-min-microvolt = <1800000>;
153 regulator-max-microvolt = <1800000>;
154 regulator-name = "vcc-pb-io-cam";
155 };
156
157 aldo3 {
158 /* unused */
159 };
160
161 reg_dc5ldo: dc5ldo {
162 regulator-always-on;
163 regulator-min-microvolt = <800000>;
164 regulator-max-microvolt = <1100000>;
165 regulator-name = "vdd-cpus-09-usbh";
166 };
167
168 reg_dcdc1: dcdc1 {
169 regulator-always-on;
170 regulator-min-microvolt = <3000000>;
171 regulator-max-microvolt = <3000000>;
172 regulator-name = "vcc-3v";
173 };
174
175 reg_dcdc2: dcdc2 {
176 regulator-min-microvolt = <800000>;
177 regulator-max-microvolt = <1100000>;
178 regulator-name = "vdd-gpu";
179 };
180
181 reg_dcdc3: dcdc3 {
182 regulator-always-on;
183 regulator-min-microvolt = <800000>;
184 regulator-max-microvolt = <1100000>;
185 regulator-name = "vdd-cpua";
186 };
187
188 reg_dcdc4: dcdc4 {
189 regulator-always-on;
190 regulator-min-microvolt = <800000>;
191 regulator-max-microvolt = <1100000>;
192 regulator-name = "vdd-sys-usb0-hdmi";
193 };
194
195 reg_dcdc5: dcdc5 {
196 regulator-always-on;
197 regulator-min-microvolt = <1425000>;
198 regulator-max-microvolt = <1575000>;
199 regulator-name = "vcc-dram";
200 };
201
202 reg_dldo1: dldo1 {
203 /*
204 * The WiFi chip supports a wide range
205 * (3.0 ~ 4.8V) of voltages, and so does
206 * this regulator (3.0 ~ 4.2V), but
207 * Allwinner SDK always sets it to 3.3V.
208 */
209 regulator-min-microvolt = <3300000>;
210 regulator-max-microvolt = <3300000>;
211 regulator-name = "vcc-wifi";
212 };
213
214 reg_dldo2: dldo2 {
215 regulator-always-on;
216 regulator-min-microvolt = <3000000>;
217 regulator-max-microvolt = <3000000>;
218 regulator-name = "vcc-pl";
219 };
220
221 reg_eldo1: eldo1 {
222 regulator-min-microvolt = <1200000>;
223 regulator-max-microvolt = <1200000>;
224 regulator-name = "vcc-dvdd-cam";
225 };
226
227 reg_eldo2: eldo2 {
228 regulator-min-microvolt = <1800000>;
229 regulator-max-microvolt = <1800000>;
230 regulator-name = "vcc-pe";
231 };
232
233 reg_eldo3: eldo3 {
234 regulator-always-on;
235 regulator-min-microvolt = <3000000>;
236 regulator-max-microvolt = <3000000>;
237 regulator-name = "vcc-pm-codec-io1";
238 };
239
240 reg_ldo_io0: ldo_io0 {
241 regulator-always-on;
242 regulator-min-microvolt = <3000000>;
243 regulator-max-microvolt = <3000000>;
244 regulator-name = "vcc-pg";
245 };
246
247 reg_ldo_io1: ldo_io1 {
248 regulator-min-microvolt = <2500000>;
249 regulator-max-microvolt = <2500000>;
250 regulator-name = "vcc-pa-gmac-2v5";
251 };
252
253 reg_rtc_ldo: rtc_ldo {
254 regulator-name = "vcc-rtc-vdd1v8-io";
255 };
256 };
257 };
38f151d4
CYT
258
259 ac100: codec@e89 {
260 compatible = "x-powers,ac100";
261 reg = <0xe89>;
262
263 ac100_codec: codec {
264 compatible = "x-powers,ac100-codec";
265 interrupt-parent = <&r_pio>;
266 interrupts = <0 9 IRQ_TYPE_LEVEL_LOW>; /* PL9 */
267 #clock-cells = <0>;
268 clock-output-names = "4M_adda";
269 };
270
271 ac100_rtc: rtc {
272 compatible = "x-powers,ac100-rtc";
273 interrupt-parent = <&nmi_intc>;
274 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
275 clocks = <&ac100_codec>;
276 #clock-cells = <1>;
277 clock-output-names = "cko1_rtc",
278 "cko2_rtc",
279 "cko3_rtc";
280 };
281 };
6f353f61
CYT
282};
283
1e1dea72
CYT
284#include "axp809.dtsi"
285
6d11c8e2
TB
286&uart0 {
287 pinctrl-names = "default";
288 pinctrl-0 = <&uart0_pins_a>;
289 status = "okay";
290};
This page took 0.106722 seconds and 5 git commands to generate.