ARM: dts: rockchip: enable ohci for rk3288-evb
[firefly-linux-kernel-4.4.55.git] / arch / arm / boot / dts / rk3288-evb.dtsi
1 /*
2  * Copyright (c) 2015~2017 Fuzhou Rockchip Electronics Co., Ltd
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 #include <dt-bindings/pwm/pwm.h>
44 #include <dt-bindings/input/input.h>
45 #include "rk3288.dtsi"
46
47 / {
48         chosen {
49                 bootargs = "earlycon=uart8250,mmio32,0xff690000 swiotlb=1";
50         };
51
52         edp_panel: edp-panel {
53                 status = "disabled";
54
55                 ports {
56                         panel_in_edp: endpoint {
57                                 remote-endpoint = <&edp_out_panel>;
58                         };
59                 };
60         };
61
62         lvds_panel: lvds-panel {
63                 status = "disabled";
64                 pinctrl-0 = <&lcd_cs>;
65                 ports {
66                         panel_in_lvds: endpoint {
67                                 remote-endpoint = <&lvds_out_panel>;
68                         };
69                 };
70         };
71
72         sound: sound {
73                 status = "disabled";
74                 compatible = "simple-audio-card";
75                 simple-audio-card,format = "i2s";
76                 simple-audio-card,name = "rockchip,rt5640-codec";
77                 simple-audio-card,mclk-fs = <512>;
78                 simple-audio-card,widgets =
79                         "Microphone", "Microphone Jack",
80                         "Headphone", "Headphone Jack";
81                 simple-audio-card,routing =
82                         "MIC1", "Microphone Jack",
83                         "MIC2", "Microphone Jack",
84                         "Microphone Jack", "micbias1",
85                         "Headphone Jack", "HPOL",
86                         "Headphone Jack", "HPOR";
87
88                 simple-audio-card,dai-link@0 {
89                         format = "i2s";
90                         cpu {
91                                 sound-dai = <&i2s>;
92                         };
93
94                         codec {
95                                 sound-dai = <&rt5640>;
96                         };
97                 };
98
99                 simple-audio-card,dai-link@1 {
100                         format = "i2s";
101                         cpu {
102                                 sound-dai = <&i2s>;
103                         };
104
105                         codec {
106                                 sound-dai = <&hdmi>;
107                         };
108                 };
109         };
110
111         ext_gmac: external-gmac-clock {
112                 compatible = "fixed-clock";
113                 clock-frequency = <125000000>;
114                 clock-output-names = "ext_gmac";
115                 #clock-cells = <0>;
116         };
117
118         vccadc_ref: vccadc-ref {
119                 compatible = "regulator-fixed";
120                 regulator-name = "vcc1v8_sys";
121                 regulator-always-on;
122                 regulator-boot-on;
123                 regulator-min-microvolt = <1800000>;
124                 regulator-max-microvolt = <1800000>;
125         };
126
127         /* This turns on USB vbus for both host0 (ehci) and host1 (dwc2) */
128         vcc_host: vcc-host-regulator {
129                 compatible = "regulator-fixed";
130                 enable-active-high;
131                 gpio = <&gpio0 14 GPIO_ACTIVE_HIGH>;
132                 pinctrl-names = "default";
133                 pinctrl-0 = <&host_vbus_drv>;
134                 regulator-name = "vcc_host";
135                 regulator-always-on;
136                 regulator-boot-on;
137         };
138
139         vcc_phy: vcc-phy-regulator {
140                 compatible = "regulator-fixed";
141                 enable-active-high;
142                 gpio = <&gpio0 6 GPIO_ACTIVE_HIGH>;
143                 pinctrl-names = "default";
144                 pinctrl-0 = <&eth_phy_pwr>;
145                 regulator-name = "vcc_phy";
146                 regulator-min-microvolt = <3300000>;
147                 regulator-max-microvolt = <3300000>;
148                 regulator-always-on;
149                 regulator-boot-on;
150         };
151
152         vcc_sys: vsys-regulator {
153                 compatible = "regulator-fixed";
154                 regulator-name = "vcc_sys";
155                 regulator-min-microvolt = <5000000>;
156                 regulator-max-microvolt = <5000000>;
157                 regulator-always-on;
158                 regulator-boot-on;
159         };
160
161         /* This switch DIO3222 HOST_DP_HOST to host2 (dwc2) */
162         vcc_3g: vcc-3g-regulator {
163                 compatible = "regulator-fixed";
164                 enable-active-high;
165                 gpio = <&gpio7 8 GPIO_ACTIVE_HIGH>;
166                 pinctrl-names = "default";
167                 pinctrl-0 = <&pwr_3g>;
168                 regulator-name = "vcc_3g";
169         };
170
171         /*
172          * NOTE: vcc_sd isn't hooked up on v1.0 boards where power comes from
173          * vcc_io directly.  Those boards won't be able to power cycle SD cards
174          * but it shouldn't hurt to toggle this pin there anyway.
175          */
176         vcc_sd: sdmmc-regulator {
177                 compatible = "regulator-fixed";
178                 pinctrl-names = "default";
179                 pinctrl-0 = <&sdmmc_pwr>;
180                 regulator-name = "vcc_sd";
181                 regulator-min-microvolt = <3300000>;
182                 regulator-max-microvolt = <3300000>;
183                 startup-delay-us = <100000>;
184                 vin-supply = <&vcc_io>;
185         };
186
187         wireless-bluetooth {
188                 compatible = "bluetooth-platdata";
189                 uart_rts_gpios = <&gpio4 19 GPIO_ACTIVE_LOW>;
190                 pinctrl-names = "default", "rts_gpio";
191                 pinctrl-0 = <&uart0_rts>;
192                 pinctrl-1 = <&uart0_gpios>;
193                 BT,reset_gpio    = <&gpio4 29 GPIO_ACTIVE_HIGH>;
194                 BT,wake_gpio     = <&gpio4 26 GPIO_ACTIVE_HIGH>;
195                 BT,wake_host_irq = <&gpio4 31 GPIO_ACTIVE_HIGH>;
196                 status = "okay";
197         };
198
199         wireless-wlan {
200                 compatible = "wlan-platdata";
201                 rockchip,grf = <&grf>;
202                 wifi_chip_type = "ap6335";
203                 sdio_vref = <1800>;
204                 WIFI,host_wake_irq = <&gpio4 30 GPIO_ACTIVE_HIGH>;
205                 status = "okay";
206         };
207 };
208
209 &emmc {
210         bus-width = <8>;
211         cap-mmc-highspeed;
212         disable-wp;
213         non-removable;
214         num-slots = <1>;
215         pinctrl-names = "default";
216         pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_pwr &emmc_bus8>;
217         max-frequency = <100000000>;
218         mmc-hs200-1_8v;
219         mmc-ddr-1_8v;
220         status = "okay";
221 };
222
223 &gmac {
224         phy-supply = <&vcc_phy>;
225         phy-mode = "rgmii";
226         clock_in_out = "input";
227         snps,reset-gpio = <&gpio4 7 0>;
228         snps,reset-active-low;
229         snps,reset-delays-us = <0 10000 50000>;
230         assigned-clocks = <&cru SCLK_MAC>;
231         assigned-clock-parents = <&ext_gmac>;
232         pinctrl-names = "default";
233         pinctrl-0 = <&rgmii_pins>;
234         tx_delay = <0x30>;
235         rx_delay = <0x10>;
236         max-speed = <100>;
237         status = "okay";
238 };
239
240 &hdmi {
241         #address-cells = <1>;
242         #size-cells = <0>;
243         #sound-dai-cells = <0>;
244         status = "okay";
245 };
246
247 &saradc {
248         vref-supply = <&vccadc_ref>;
249         status = "okay";
250 };
251
252 &sdmmc {
253         supports-sd;
254         bus-width = <4>;
255         cap-mmc-highspeed;
256         sd-uhs-sdr12;
257         sd-uhs-sdr25;
258         sd-uhs-sdr50;
259         sd-uhs-sdr104;
260         cap-sd-highspeed;
261         card-detect-delay = <200>;
262         disable-wp;                     /* wp not hooked up */
263         num-slots = <1>;
264         pinctrl-names = "default";
265         pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
266         status = "okay";
267         vmmc-supply = <&vcc_sd>;
268         vqmmc-supply = <&vccio_sd>;
269         supports-sd;
270 };
271
272 &edp {
273         force-hpd;
274         status = "disabled";
275
276         ports {
277                 edp_out: port@1 {
278                         reg = <1>;
279                         #address-cells = <1>;
280                         #size-cells = <0>;
281                         edp_out_panel: endpoint {
282                                 reg = <0>;
283                                 remote-endpoint = <&panel_in_edp>;
284                         };
285                 };
286         };
287 };
288
289 &hevc_service {
290         status = "okay";
291 };
292
293 &i2c0 {
294         status = "okay";
295 };
296
297 &i2c2 {
298         status = "okay";
299
300         rt5640: rt5640@1c {
301                 #sound-dai-cells = <0>;
302                 compatible = "realtek,rt5640";
303                 reg = <0x1c>;
304                 clocks = <&cru SCLK_I2S0_OUT>;
305                 clock-names = "mclk";
306                 interrupt-parent = <&gpio6>;
307                 interrupts = <7 IRQ_TYPE_EDGE_FALLING>;
308         };
309 };
310
311 &i2c3 {
312         status = "okay";
313 };
314
315 &i2c4 {
316         status = "okay";
317         clock-frequency = <400000>;
318
319         gsl3673@40 {
320                 compatible = "GSL,GSL3673";
321                 reg = <0x40>;
322                 screen_max_x = <1536>;
323                 screen_max_y = <2048>;
324                 irq_gpio_number = <&gpio7 6 IRQ_TYPE_LEVEL_LOW>;
325                 rst_gpio_number = <&gpio7 5 GPIO_ACTIVE_HIGH>;
326                 status = "okay";
327         };
328 };
329
330 &i2s {
331         #sound-dai-cells = <0>;
332         status = "okay";
333 };
334
335 &io_domains {
336         status = "okay";
337
338         sdcard-supply = <&vccio_sd>;
339         wifi-supply = <&vcc_18>;
340 };
341
342 &wdt {
343         status = "okay";
344 };
345
346 &pwm0 {
347         status = "okay";
348 };
349
350 &isp {
351         status = "okay";
352 };
353
354 &isp_mmu {
355         status = "okay";
356 };
357
358 &rga {
359         status = "okay";
360 };
361
362 &sdio0 {
363         status = "okay";
364
365         clock-frequency = <50000000>;
366         clock-freq-min-max = <200000 50000000>;
367
368         bus-width = <4>;
369         cap-sd-highspeed;
370         cap-sdio-irq;
371         disable-wp;
372         keep-power-in-suspend;
373         mmc-pwrseq = <&sdio_pwrseq>;
374         non-removable;
375         num-slots = <1>;
376         pinctrl-names = "default";
377         pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk &sdio0_int>;
378         sd-uhs-sdr104;
379         supports-sdio;
380 };
381
382 &uart0 {
383         pinctrl-names = "default";
384         pinctrl-0 = <&uart0_xfer &uart0_cts>;
385         status = "okay";
386 };
387
388 &uart2 {
389         status = "disabled";
390 };
391
392 &vpu_service {
393         status = "okay";
394 };
395
396 &tsadc {
397         rockchip,hw-tshut-mode = <0>; /* tshut mode 0:CRU 1:GPIO */
398         rockchip,hw-tshut-polarity = <0>; /* tshut polarity 0:LOW 1:HIGH */
399         status = "okay";
400 };
401
402 &usbphy {
403         status = "okay";
404 };
405
406 &usb_host0_ehci {
407         rockchip-relinquish-port;
408         status = "okay";
409 };
410
411 &usb_host0_ohci {
412         status = "okay";
413 };
414
415 &usb_host1 {
416         status = "okay";
417 };
418
419 &usb_otg {
420         status = "okay";
421 };
422
423 &lvds {
424         status = "disabled";
425         ports {
426                 lvds_out: port@1 {
427                         reg = <1>;
428                         #address-cells = <1>;
429                         #size-cells = <0>;
430
431                         lvds_out_panel: endpoint@0 {
432                                 reg = <0>;
433                                 remote-endpoint = <&panel_in_lvds>;
434                         };
435                 };
436         };
437 };
438
439 &vopb {
440         status = "okay";
441 };
442
443 &vopb_mmu {
444         status = "okay";
445 };
446
447 &vopl {
448         status = "okay";
449 };
450
451 &vopl_mmu {
452         status = "okay";
453 };
454
455 &pinctrl {
456         pcfg_pull_none_drv_8ma: pcfg-pull-none-drv-8ma {
457                 drive-strength = <8>;
458         };
459
460         pcfg_pull_up_drv_8ma: pcfg-pull-up-drv-8ma {
461                 bias-pull-up;
462                 drive-strength = <8>;
463         };
464
465         pmic {
466                 pmic_int: pmic-int {
467                         rockchip,pins = <RK_GPIO0 4 RK_FUNC_GPIO &pcfg_pull_up>;
468                 };
469         };
470
471         sdio-pwrseq {
472                 wifi_enable_h: wifi-enable-h {
473                         rockchip,pins = <4 28 RK_FUNC_GPIO &pcfg_pull_none>;
474                 };
475         };
476
477         sdmmc {
478                 /*
479                  * Default drive strength isn't enough to achieve even
480                  * high-speed mode on EVB board so bump up to 8ma.
481                  */
482                 sdmmc_bus4: sdmmc-bus4 {
483                         rockchip,pins = <6 16 RK_FUNC_1 &pcfg_pull_up_drv_8ma>,
484                                         <6 17 RK_FUNC_1 &pcfg_pull_up_drv_8ma>,
485                                         <6 18 RK_FUNC_1 &pcfg_pull_up_drv_8ma>,
486                                         <6 19 RK_FUNC_1 &pcfg_pull_up_drv_8ma>;
487                 };
488
489                 sdmmc_clk: sdmmc-clk {
490                         rockchip,pins = <6 20 RK_FUNC_1 &pcfg_pull_none_drv_8ma>;
491                 };
492
493                 sdmmc_cmd: sdmmc-cmd {
494                         rockchip,pins = <6 21 RK_FUNC_1 &pcfg_pull_up_drv_8ma>;
495                 };
496
497                 sdmmc_pwr: sdmmc-pwr {
498                         rockchip,pins = <7 11 RK_FUNC_GPIO &pcfg_pull_none>;
499                 };
500         };
501
502         usb {
503                 host_vbus_drv: host-vbus-drv {
504                         rockchip,pins = <0 14 RK_FUNC_GPIO &pcfg_pull_none>;
505                 };
506
507                 pwr_3g: pwr-3g {
508                         rockchip,pins = <7 8 RK_FUNC_GPIO &pcfg_pull_none>;
509                 };
510         };
511
512         eth_phy {
513                 eth_phy_pwr: eth-phy-pwr {
514                         rockchip,pins = <0 6 RK_FUNC_GPIO &pcfg_pull_none>;
515                 };
516         };
517
518         lcd {
519                 lcd_cs: lcd-cs {
520                         rockchip,pins = <7 4 RK_FUNC_GPIO &pcfg_pull_none>;
521                 };
522         };
523
524         wireless-bluetooth {
525                 uart0_gpios: uart0-gpios {
526                         rockchip,pins = <4 19 RK_FUNC_GPIO &pcfg_pull_none>;
527                 };
528         };
529 };