blob: 1da46d138029f2bc96b5de213b8f0523ad0784ef [file] [log] [blame]
Heiko Stuebner6bcf60f2013-10-14 17:34:02 +02001/*
2 * Copyright (c) 2013 Heiko Stuebner <heiko@sntech.de>
3 *
Heiko Stuebnere068f492015-03-06 19:04:05 +01004 * 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.
Heiko Stuebner6bcf60f2013-10-14 17:34:02 +02008 *
Heiko Stuebnere068f492015-03-06 19:04:05 +01009 * 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 * Or, alternatively,
20 *
21 * b) Permission is hereby granted, free of charge, to any person
22 * obtaining a copy of this software and associated documentation
23 * files (the "Software"), to deal in the Software without
24 * restriction, including without limitation the rights to use,
25 * copy, modify, merge, publish, distribute, sublicense, and/or
26 * sell copies of the Software, and to permit persons to whom the
27 * Software is furnished to do so, subject to the following
28 * conditions:
29 *
30 * The above copyright notice and this permission notice shall be
31 * included in all copies or substantial portions of the Software.
32 *
33 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
34 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
35 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
36 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
37 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
38 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
39 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
40 * OTHER DEALINGS IN THE SOFTWARE.
Heiko Stuebner6bcf60f2013-10-14 17:34:02 +020041 */
42
43/dts-v1/;
Heiko Stuebner8b30c892016-03-31 20:24:29 +020044#include <dt-bindings/input/input.h>
Heiko Stuebner6bcf60f2013-10-14 17:34:02 +020045#include "rk3188.dtsi"
46
47/ {
48 model = "Radxa Rock";
Beniamino Galvaniac4eba82014-05-06 19:10:11 +020049 compatible = "radxa,rock", "rockchip,rk3188";
Heiko Stuebner6bcf60f2013-10-14 17:34:02 +020050
51 memory {
Heiko Stuebner6158e6d2015-07-15 20:57:21 +020052 device_type = "memory";
Heiko Stuebner6bcf60f2013-10-14 17:34:02 +020053 reg = <0x60000000 0x80000000>;
54 };
55
Heiko Stuebnerc3030d32014-07-26 18:44:35 +020056 gpio-keys {
57 compatible = "gpio-keys";
Heiko Stuebnerc3030d32014-07-26 18:44:35 +020058 autorepeat;
59
Heiko Stuebner8b30c892016-03-31 20:24:29 +020060 power {
Heiko Stuebnerc3030d32014-07-26 18:44:35 +020061 gpios = <&gpio0 4 GPIO_ACTIVE_LOW>;
Heiko Stuebner8b30c892016-03-31 20:24:29 +020062 linux,code = <KEY_POWER>;
Heiko Stuebnerc3030d32014-07-26 18:44:35 +020063 label = "GPIO Key Power";
64 linux,input-type = <1>;
Sudeep Holla4f66f242016-02-08 21:55:12 +000065 wakeup-source;
Heiko Stuebnerc3030d32014-07-26 18:44:35 +020066 debounce-interval = <100>;
67 };
68 };
69
70 gpio-leds {
71 compatible = "gpio-leds";
72
73 green {
Romain Perier3db58942014-11-23 16:19:35 +000074 label = "rock:green:user1";
Heiko Stuebnerc3030d32014-07-26 18:44:35 +020075 gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
76 default-state = "off";
Heiko Stuebner6bcf60f2013-10-14 17:34:02 +020077 };
78
Romain Perier3db58942014-11-23 16:19:35 +000079 blue {
80 label = "rock:blue:user2";
Heiko Stuebnerc3030d32014-07-26 18:44:35 +020081 gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
82 default-state = "off";
Heiko Stuebner6bcf60f2013-10-14 17:34:02 +020083 };
84
Heiko Stuebnerc3030d32014-07-26 18:44:35 +020085 sleep {
Romain Perier3db58942014-11-23 16:19:35 +000086 label = "rock:red:power";
Heiko Stuebnerc3030d32014-07-26 18:44:35 +020087 gpios = <&gpio0 15 0>;
88 default-state = "off";
Heiko Stuebner6bcf60f2013-10-14 17:34:02 +020089 };
Heiko Stuebner6bcf60f2013-10-14 17:34:02 +020090 };
Heiko Stuebnerb09e35a2014-06-26 16:18:44 +020091
Sjoerd Simonsd97e8622015-10-08 15:31:15 +020092 sound {
93 compatible = "simple-audio-card";
94 simple-audio-card,name = "SPDIF";
95
96 simple-audio-card,dai-link@1 { /* S/PDIF - S/PDIF */
97 cpu { sound-dai = <&spdif>; };
98 codec { sound-dai = <&spdif_out>; };
99 };
100 };
101
102 spdif_out: spdif-out {
103 compatible = "linux,spdif-dit";
104 #sound-dai-cells = <0>;
105 };
106
Beniamino Galvani08567052014-07-13 14:10:01 +0200107 ir_recv: gpio-ir-receiver {
108 compatible = "gpio-ir-receiver";
109 gpios = <&gpio0 10 1>;
110 pinctrl-names = "default";
111 pinctrl-0 = <&ir_recv_pin>;
112 };
113
Heiko Stuebnerf1c85472014-09-09 15:40:52 +0200114 vcc_otg: usb-otg-regulator {
115 compatible = "regulator-fixed";
116 enable-active-high;
117 gpio = <&gpio2 31 GPIO_ACTIVE_HIGH>;
118 pinctrl-names = "default";
Heiko Stuebner66fa6cf2014-09-16 18:53:10 +0200119 pinctrl-0 = <&otg_vbus_drv>;
Heiko Stuebnerf1c85472014-09-09 15:40:52 +0200120 regulator-name = "otg-vbus";
121 regulator-min-microvolt = <5000000>;
122 regulator-max-microvolt = <5000000>;
123 regulator-always-on;
124 regulator-boot-on;
125 };
126
Heiko Stuebnerb09e35a2014-06-26 16:18:44 +0200127 vcc_sd0: sdmmc-regulator {
128 compatible = "regulator-fixed";
129 regulator-name = "sdmmc-supply";
130 regulator-min-microvolt = <3300000>;
131 regulator-max-microvolt = <3300000>;
132 gpio = <&gpio3 1 GPIO_ACTIVE_LOW>;
133 startup-delay-us = <100000>;
134 vin-supply = <&vcc_io>;
135 };
Heiko Stuebnerf1c85472014-09-09 15:40:52 +0200136
137 vcc_host: usb-host-regulator {
138 compatible = "regulator-fixed";
139 enable-active-high;
140 gpio = <&gpio0 3 GPIO_ACTIVE_HIGH>;
141 pinctrl-names = "default";
Heiko Stuebner66fa6cf2014-09-16 18:53:10 +0200142 pinctrl-0 = <&host_vbus_drv>;
Heiko Stuebnerf1c85472014-09-09 15:40:52 +0200143 regulator-name = "host-pwr";
144 regulator-min-microvolt = <5000000>;
145 regulator-max-microvolt = <5000000>;
146 regulator-always-on;
147 regulator-boot-on;
148 };
Heiko Stuebner776920e2015-03-07 15:14:59 +0100149
150 vsys: vsys-regulator {
151 compatible = "regulator-fixed";
152 regulator-name = "vsys";
153 regulator-min-microvolt = <5000000>;
154 regulator-max-microvolt = <5000000>;
155 regulator-boot-on;
156 };
Heiko Stuebner6bcf60f2013-10-14 17:34:02 +0200157};
Heiko Stuebnerfcbbf962014-07-26 23:08:06 +0200158
Romain Perierc6ec9562014-09-08 17:14:50 +0000159&emac {
160 status = "okay";
161
162 pinctrl-names = "default";
163 pinctrl-0 = <&emac_xfer>, <&emac_mdio>, <&phy_int>;
164
165 phy = <&phy0>;
166 phy-supply = <&vcc_rmii>;
167
168 phy0: ethernet-phy@0 {
169 reg = <0>;
170 interrupt-parent = <&gpio3>;
171 interrupts = <26 IRQ_TYPE_LEVEL_LOW>;
172 };
173};
174
Heiko Stuebner3adb1322014-09-13 00:34:30 +0200175&cpu0 {
176 cpu0-supply = <&vdd_arm>;
177};
178
Beniamino Galvanife2c89a2014-06-22 16:41:09 +0200179&i2c1 {
180 status = "okay";
181 clock-frequency = <400000>;
182
Heiko Stübner4721ab82014-08-20 21:07:22 +0200183 rtc@51 {
184 compatible = "haoyu,hym8563";
185 reg = <0x51>;
186 interrupt-parent = <&gpio0>;
187 interrupts = <13 IRQ_TYPE_EDGE_FALLING>;
188 pinctrl-names = "default";
189 pinctrl-0 = <&rtc_int>;
190 #clock-cells = <0>;
191 clock-output-names = "xin32k";
192 };
193
Beniamino Galvanife2c89a2014-06-22 16:41:09 +0200194 act8846: act8846@5a {
195 compatible = "active-semi,act8846";
196 reg = <0x5a>;
197 status = "okay";
Michael Niewöhner9ab79be2015-05-11 22:57:21 +0200198 system-power-controller;
Beniamino Galvanife2c89a2014-06-22 16:41:09 +0200199
200 pinctrl-names = "default";
201 pinctrl-0 = <&act8846_dvs0_ctl>;
202
Heiko Stuebner776920e2015-03-07 15:14:59 +0100203 vp1-supply = <&vsys>;
204 vp2-supply = <&vsys>;
205 vp3-supply = <&vsys>;
206 vp4-supply = <&vsys>;
207 inl1-supply = <&vcc_io>;
208 inl2-supply = <&vsys>;
209 inl3-supply = <&vsys>;
210
Beniamino Galvanife2c89a2014-06-22 16:41:09 +0200211 regulators {
212 vcc_ddr: REG1 {
213 regulator-name = "VCC_DDR";
214 regulator-min-microvolt = <1200000>;
215 regulator-max-microvolt = <1200000>;
216 regulator-always-on;
217 };
218
219 vdd_log: REG2 {
220 regulator-name = "VDD_LOG";
221 regulator-min-microvolt = <1000000>;
222 regulator-max-microvolt = <1000000>;
223 regulator-always-on;
224 };
225
226 vdd_arm: REG3 {
227 regulator-name = "VDD_ARM";
228 regulator-min-microvolt = <875000>;
Heiko Stuebner3adb1322014-09-13 00:34:30 +0200229 regulator-max-microvolt = <1350000>;
Beniamino Galvanife2c89a2014-06-22 16:41:09 +0200230 regulator-always-on;
231 };
232
233 vcc_io: REG4 {
234 regulator-name = "VCC_IO";
235 regulator-min-microvolt = <3300000>;
236 regulator-max-microvolt = <3300000>;
237 regulator-always-on;
238 };
239
240 vdd_10: REG5 {
241 regulator-name = "VDD_10";
242 regulator-min-microvolt = <1000000>;
243 regulator-max-microvolt = <1000000>;
244 regulator-always-on;
245 };
246
247 vdd_hdmi: REG6 {
248 regulator-name = "VDD_HDMI";
249 regulator-min-microvolt = <2500000>;
250 regulator-max-microvolt = <2500000>;
251 regulator-always-on;
252 };
253
254 vcc18: REG7 {
255 regulator-name = "VCC_18";
256 regulator-min-microvolt = <1800000>;
257 regulator-max-microvolt = <1800000>;
258 regulator-always-on;
259 };
260
261 vcca_33: REG8 {
262 regulator-name = "VCCA_33";
263 regulator-min-microvolt = <3300000>;
264 regulator-max-microvolt = <3300000>;
265 regulator-always-on;
266 };
267
268 vcc_rmii: REG9 {
269 regulator-name = "VCC_RMII";
270 regulator-min-microvolt = <3300000>;
271 regulator-max-microvolt = <3300000>;
Beniamino Galvanife2c89a2014-06-22 16:41:09 +0200272 };
273
274 vccio_wl: REG10 {
275 regulator-name = "VCCIO_WL";
276 regulator-min-microvolt = <3300000>;
277 regulator-max-microvolt = <3300000>;
278 regulator-always-on;
279 };
280
281 vcc_18: REG11 {
282 regulator-name = "VCC18_IO";
283 regulator-min-microvolt = <1800000>;
284 regulator-max-microvolt = <1800000>;
285 regulator-always-on;
286 };
287
288 vcc28: REG12 {
289 regulator-name = "VCC_28";
290 regulator-min-microvolt = <2800000>;
291 regulator-max-microvolt = <2800000>;
292 regulator-always-on;
293 };
294 };
295 };
296};
297
Heiko Stuebnerb09e35a2014-06-26 16:18:44 +0200298&mmc0 {
299 num-slots = <1>;
300 status = "okay";
Heiko Stuebner1302d322014-08-11 19:51:44 +0200301 pinctrl-names = "default";
302 pinctrl-0 = <&sd0_clk>, <&sd0_cmd>, <&sd0_cd>, <&sd0_bus4>;
Heiko Stuebnerb09e35a2014-06-26 16:18:44 +0200303 vmmc-supply = <&vcc_sd0>;
304
Jaehoon Chung356649a2014-08-07 16:38:02 +0900305 bus-width = <4>;
Shawn Lin2a4527f2015-09-12 18:00:50 +0800306 cap-mmc-highspeed;
307 cap-sd-highspeed;
Jaehoon Chung356649a2014-08-07 16:38:02 +0900308 disable-wp;
Heiko Stuebnerb09e35a2014-06-26 16:18:44 +0200309};
310
Julien CHAUVEAUefb66e92014-11-14 16:32:25 +0100311&pwm1 {
312 status = "okay";
313};
314
315&pwm2 {
316 status = "okay";
317};
318
319&pwm3 {
320 status = "okay";
321};
322
Beniamino Galvanife2c89a2014-06-22 16:41:09 +0200323&pinctrl {
324 pcfg_output_low: pcfg-output-low {
325 output-low;
326 };
327
328 act8846 {
329 act8846_dvs0_ctl: act8846-dvs0-ctl {
330 rockchip,pins = <RK_GPIO3 27 RK_FUNC_GPIO &pcfg_output_low>;
331 };
332 };
Beniamino Galvani08567052014-07-13 14:10:01 +0200333
Heiko Stübner4721ab82014-08-20 21:07:22 +0200334 hym8563 {
335 rtc_int: rtc-int {
336 rockchip,pins = <RK_GPIO0 0 RK_FUNC_GPIO &pcfg_pull_up>;
337 };
338 };
339
Romain Perierc6ec9562014-09-08 17:14:50 +0000340 lan8720a {
341 phy_int: phy-int {
342 rockchip,pins = <RK_GPIO3 26 RK_FUNC_GPIO &pcfg_pull_up>;
343 };
344 };
345
Beniamino Galvani08567052014-07-13 14:10:01 +0200346 ir-receiver {
347 ir_recv_pin: ir-recv-pin {
348 rockchip,pins = <RK_GPIO0 10 RK_FUNC_GPIO &pcfg_pull_none>;
349 };
350 };
Heiko Stuebnerf1c85472014-09-09 15:40:52 +0200351
352 usb {
353 host_vbus_drv: host-vbus-drv {
354 rockchip,pins = <0 3 RK_FUNC_GPIO &pcfg_pull_none>;
355 };
356 otg_vbus_drv: otg-vbus-drv {
357 rockchip,pins = <2 31 RK_FUNC_GPIO &pcfg_pull_none>;
358 };
359 };
Beniamino Galvanife2c89a2014-06-22 16:41:09 +0200360};
361
Sjoerd Simonsd97e8622015-10-08 15:31:15 +0200362&spdif {
363 status = "okay";
364};
365
Heiko Stuebnerfcbbf962014-07-26 23:08:06 +0200366&uart0 {
367 status = "okay";
368};
369
370&uart1 {
371 status = "okay";
372};
373
374&uart2 {
Heiko Stuebnerfcbbf962014-07-26 23:08:06 +0200375 status = "okay";
376};
377
378&uart3 {
379 status = "okay";
380};
Heiko Stuebnereb2b9d42014-07-30 10:16:17 +0200381
Heiko Stuebner760bb972015-08-01 20:28:36 +0200382&usbphy {
383 status = "okay";
384};
385
Heiko Stuebnerf1c85472014-09-09 15:40:52 +0200386&usb_host {
387 status = "okay";
388};
389
390&usb_otg {
391 status = "okay";
392};
393
Heiko Stuebnereb2b9d42014-07-30 10:16:17 +0200394&wdt {
395 status = "okay";
396};