GNU Linux-libre 4.14.290-gnu1
[releases.git] / arch / arm / boot / dts / rk3188-radxarock.dts
1 /*
2  * Copyright (c) 2013 Heiko Stuebner <heiko@sntech.de>
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  * 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.
41  */
42
43 /dts-v1/;
44 #include <dt-bindings/input/input.h>
45 #include "rk3188.dtsi"
46
47 / {
48         model = "Radxa Rock";
49         compatible = "radxa,rock", "rockchip,rk3188";
50
51         memory@60000000 {
52                 device_type = "memory";
53                 reg = <0x60000000 0x80000000>;
54         };
55
56         gpio-keys {
57                 compatible = "gpio-keys";
58                 autorepeat;
59
60                 power {
61                         gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_LOW>;
62                         linux,code = <KEY_POWER>;
63                         label = "GPIO Key Power";
64                         linux,input-type = <1>;
65                         wakeup-source;
66                         debounce-interval = <100>;
67                 };
68         };
69
70         gpio-leds {
71                 compatible = "gpio-leds";
72
73                 green {
74                         label = "rock:green:user1";
75                         gpios = <&gpio0 RK_PB4 GPIO_ACTIVE_LOW>;
76                         default-state = "off";
77                 };
78
79                 blue {
80                         label = "rock:blue:user2";
81                         gpios = <&gpio0 RK_PB6 GPIO_ACTIVE_LOW>;
82                         default-state = "off";
83                 };
84
85                 sleep {
86                         label = "rock:red:power";
87                         gpios = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>;
88                         default-state = "off";
89                 };
90         };
91
92         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
107         ir_recv: gpio-ir-receiver {
108                 compatible = "gpio-ir-receiver";
109                 gpios = <&gpio0 RK_PB2 GPIO_ACTIVE_LOW>;
110                 pinctrl-names = "default";
111                 pinctrl-0 = <&ir_recv_pin>;
112         };
113
114         vcc_otg: usb-otg-regulator {
115                 compatible = "regulator-fixed";
116                 enable-active-high;
117                 gpio = <&gpio2 RK_PD7 GPIO_ACTIVE_HIGH>;
118                 pinctrl-names = "default";
119                 pinctrl-0 = <&otg_vbus_drv>;
120                 regulator-name = "otg-vbus";
121                 regulator-min-microvolt = <5000000>;
122                 regulator-max-microvolt = <5000000>;
123                 regulator-always-on;
124                 regulator-boot-on;
125         };
126
127         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 RK_PA1 GPIO_ACTIVE_LOW>;
133                 pinctrl-names = "default";
134                 pinctrl-0 = <&sdmmc_pwr>;
135                 startup-delay-us = <100000>;
136                 vin-supply = <&vcc_io>;
137         };
138
139         vcc_host: usb-host-regulator {
140                 compatible = "regulator-fixed";
141                 enable-active-high;
142                 gpio = <&gpio0 RK_PA3 GPIO_ACTIVE_HIGH>;
143                 pinctrl-names = "default";
144                 pinctrl-0 = <&host_vbus_drv>;
145                 regulator-name = "host-pwr";
146                 regulator-min-microvolt = <5000000>;
147                 regulator-max-microvolt = <5000000>;
148                 regulator-always-on;
149                 regulator-boot-on;
150         };
151
152         vsys: vsys-regulator {
153                 compatible = "regulator-fixed";
154                 regulator-name = "vsys";
155                 regulator-min-microvolt = <5000000>;
156                 regulator-max-microvolt = <5000000>;
157                 regulator-boot-on;
158         };
159 };
160
161 &emac {
162         status = "okay";
163
164         pinctrl-names = "default";
165         pinctrl-0 = <&emac_xfer>, <&emac_mdio>, <&phy_int>;
166
167         phy = <&phy0>;
168         phy-supply = <&vcc_rmii>;
169
170         phy0: ethernet-phy@0 {
171                 reg = <0>;
172                 interrupt-parent = <&gpio3>;
173                 interrupts = <RK_PD2 IRQ_TYPE_LEVEL_LOW>;
174         };
175 };
176
177 &cpu0 {
178         cpu0-supply = <&vdd_arm>;
179 };
180
181 &i2c1 {
182         status = "okay";
183         clock-frequency = <400000>;
184
185         rtc@51 {
186                 compatible = "haoyu,hym8563";
187                 reg = <0x51>;
188                 interrupt-parent = <&gpio0>;
189                 interrupts = <RK_PB5 IRQ_TYPE_EDGE_FALLING>;
190                 pinctrl-names = "default";
191                 pinctrl-0 = <&rtc_int>;
192                 #clock-cells = <0>;
193                 clock-output-names = "xin32k";
194         };
195
196         act8846: act8846@5a {
197                 compatible = "active-semi,act8846";
198                 reg = <0x5a>;
199                 status = "okay";
200                 system-power-controller;
201
202                 pinctrl-names = "default";
203                 pinctrl-0 = <&act8846_dvs0_ctl>;
204
205                 vp1-supply = <&vsys>;
206                 vp2-supply = <&vsys>;
207                 vp3-supply = <&vsys>;
208                 vp4-supply = <&vsys>;
209                 inl1-supply = <&vcc_io>;
210                 inl2-supply = <&vsys>;
211                 inl3-supply = <&vsys>;
212
213                 regulators {
214                         vcc_ddr: REG1 {
215                                 regulator-name = "VCC_DDR";
216                                 regulator-min-microvolt = <1200000>;
217                                 regulator-max-microvolt = <1200000>;
218                                 regulator-always-on;
219                         };
220
221                         vdd_log: REG2 {
222                                 regulator-name = "VDD_LOG";
223                                 regulator-min-microvolt = <1000000>;
224                                 regulator-max-microvolt = <1000000>;
225                                 regulator-always-on;
226                         };
227
228                         vdd_arm: REG3 {
229                                 regulator-name = "VDD_ARM";
230                                 regulator-min-microvolt = <875000>;
231                                 regulator-max-microvolt = <1350000>;
232                                 regulator-always-on;
233                         };
234
235                         vcc_io: REG4 {
236                                 regulator-name = "VCC_IO";
237                                 regulator-min-microvolt = <3300000>;
238                                 regulator-max-microvolt = <3300000>;
239                                 regulator-always-on;
240                         };
241
242                         vdd_10: REG5 {
243                                 regulator-name = "VDD_10";
244                                 regulator-min-microvolt = <1000000>;
245                                 regulator-max-microvolt = <1000000>;
246                                 regulator-always-on;
247                         };
248
249                         vdd_hdmi: REG6 {
250                                 regulator-name = "VDD_HDMI";
251                                 regulator-min-microvolt = <2500000>;
252                                 regulator-max-microvolt = <2500000>;
253                                 regulator-always-on;
254                         };
255
256                         vcc18: REG7 {
257                                 regulator-name = "VCC_18";
258                                 regulator-min-microvolt = <1800000>;
259                                 regulator-max-microvolt = <1800000>;
260                                 regulator-always-on;
261                         };
262
263                         vcca_33: REG8 {
264                                 regulator-name = "VCCA_33";
265                                 regulator-min-microvolt = <3300000>;
266                                 regulator-max-microvolt = <3300000>;
267                                 regulator-always-on;
268                         };
269
270                         vcc_rmii: REG9 {
271                                 regulator-name = "VCC_RMII";
272                                 regulator-min-microvolt = <3300000>;
273                                 regulator-max-microvolt = <3300000>;
274                         };
275
276                         vccio_wl: REG10 {
277                                 regulator-name = "VCCIO_WL";
278                                 regulator-min-microvolt = <3300000>;
279                                 regulator-max-microvolt = <3300000>;
280                                 regulator-always-on;
281                         };
282
283                         vcc_18: REG11 {
284                                 regulator-name = "VCC18_IO";
285                                 regulator-min-microvolt = <1800000>;
286                                 regulator-max-microvolt = <1800000>;
287                                 regulator-always-on;
288                         };
289
290                         vcc28: REG12 {
291                                 regulator-name = "VCC_28";
292                                 regulator-min-microvolt = <2800000>;
293                                 regulator-max-microvolt = <2800000>;
294                                 regulator-always-on;
295                         };
296                 };
297         };
298 };
299
300 &mmc0 {
301         status = "okay";
302         pinctrl-names = "default";
303         pinctrl-0 = <&sd0_clk>, <&sd0_cmd>, <&sd0_cd>, <&sd0_bus4>;
304         vmmc-supply = <&vcc_sd0>;
305
306         bus-width = <4>;
307         cap-mmc-highspeed;
308         cap-sd-highspeed;
309         disable-wp;
310 };
311
312 &pwm1 {
313         status = "okay";
314 };
315
316 &pwm2 {
317         status = "okay";
318 };
319
320 &pwm3 {
321         status = "okay";
322 };
323
324 &pinctrl {
325         pcfg_output_low: pcfg-output-low {
326                 output-low;
327         };
328
329         act8846 {
330                 act8846_dvs0_ctl: act8846-dvs0-ctl {
331                         rockchip,pins = <RK_GPIO3 27 RK_FUNC_GPIO &pcfg_output_low>;
332                 };
333         };
334
335         hym8563 {
336                 rtc_int: rtc-int {
337                         rockchip,pins = <RK_GPIO0 0 RK_FUNC_GPIO &pcfg_pull_up>;
338                 };
339         };
340
341         lan8720a  {
342                 phy_int: phy-int {
343                         rockchip,pins = <RK_GPIO3 26 RK_FUNC_GPIO &pcfg_pull_up>;
344                 };
345         };
346
347         ir-receiver {
348                 ir_recv_pin: ir-recv-pin {
349                         rockchip,pins = <RK_GPIO0 10 RK_FUNC_GPIO &pcfg_pull_none>;
350                 };
351         };
352
353         sd0 {
354                 sdmmc_pwr: sdmmc-pwr {
355                         rockchip,pins = <RK_GPIO3 1 RK_FUNC_GPIO &pcfg_pull_none>;
356                 };
357         };
358
359         usb {
360                 host_vbus_drv: host-vbus-drv {
361                         rockchip,pins = <0 3 RK_FUNC_GPIO &pcfg_pull_none>;
362                 };
363                 otg_vbus_drv: otg-vbus-drv {
364                         rockchip,pins = <2 31 RK_FUNC_GPIO &pcfg_pull_none>;
365                 };
366         };
367 };
368
369 &spdif {
370         status = "okay";
371 };
372
373 &uart0 {
374         status = "okay";
375 };
376
377 &uart1 {
378         status = "okay";
379 };
380
381 &uart2 {
382         status = "okay";
383 };
384
385 &uart3 {
386         status = "okay";
387 };
388
389 &usbphy {
390         status = "okay";
391 };
392
393 &usb_host {
394         status = "okay";
395 };
396
397 &usb_otg {
398         status = "okay";
399 };
400
401 &wdt {
402         status = "okay";
403 };