SDMMC: add the SDIO_IRQ for sdio
[firefly-linux-kernel-4.4.55.git] / arch / arm / boot / dts / rk3188-tb.dts
1 /dts-v1/;
2
3 #include "rk3188.dtsi"
4 #include "lcd-b101ew05.dtsi"
5
6 / {
7         memory {
8                 device_type = "memory";
9                 reg = <0x60000000 0x40000000>;
10         };
11
12         chosen {
13                 bootargs = "clk_ignore_unused";
14         };
15
16         fiq-debugger {
17                 status = "okay";
18         };
19
20
21         wireless-wlan {
22                 compatible = "wlan-platdata";
23
24                 wifi_chip_type = "";
25                 sdio_vref = <28000>;
26
27                 //power_ctrl_by_pmu;
28                 pmu_regulator = "act_ldo3";
29                 pmu_enable_level = <1>; //1->HIGH, 0->LOW
30
31                 WIFI,poweren_gpio = <&gpio3 GPIO_D0 GPIO_ACTIVE_HIGH>;
32                 WIFI,host_wake_irq = <&gpio3 GPIO_D2 GPIO_ACTIVE_HIGH>;
33                 //WIFI,reset_gpio = <&gpio0 GPIO_A2 GPIO_ACTIVE_LOW>;
34
35                 status = "okay";
36         };
37
38         wireless-bluetooth {
39                 compatible = "bluetooth-platdata";
40
41                 uart_rts_gpios = <&gpio1 GPIO_A3 GPIO_ACTIVE_LOW>;
42                 pinctrl-names = "default","rts_gpio";
43                 pinctrl-0 = <&uart0_rts>;
44                 pinctrl-1 = <&uart0_rts_gpio>;
45
46                 BT,power_gpio = <&gpio3 GPIO_C7 GPIO_ACTIVE_HIGH>;
47                 BT,reset_gpio = <&gpio3 GPIO_D1 GPIO_ACTIVE_HIGH>;
48                 BT,wake_gpio = <&gpio3 GPIO_C6 GPIO_ACTIVE_HIGH>;
49                 BT,wake_host_irq = <&gpio0 GPIO_A5 GPIO_ACTIVE_LOW>;
50
51                 status = "okay";
52         };
53
54         backlight {
55                 compatible = "pwm-backlight";
56                 pwms = <&pwm3 0 25000>;
57                 brightness-levels = <0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255>;
58                 default-brightness-level = <128>;
59                 enable-gpios = <&gpio0 GPIO_A2 GPIO_ACTIVE_HIGH>;
60         };
61
62         pwm_regulator {
63        compatible = "rockchip_pwm_regulator";
64         pwms = <&pwm0 0 25000>;
65         rockchip,pwm_id= <0>;
66        rockchip,pwm_voltage_map= <925000 950000 975000 1000000 1025000 1050000 1075000 1100000 1125000 1150000 1175000 1200000 1225000 1250000 1275000 1300000 1325000 1350000 1375000 1400000>;
67         rockchip,pwm_voltage= <1000000>;
68         rockchip,pwm_min_voltage= <925000>;
69         rockchip,pwm_max_voltage= <1400000>;
70         rockchip,pwm_suspend_voltage= <950000>;
71         rockchip,pwm_coefficient= <475>;
72         regulators {
73                 #address-cells = <1>;
74                 #size-cells = <0>;                      
75                  pwm_reg0: regulator@0{
76                         regulator-compatible = "pwm_dcdc1";
77                         regulator-name= "vdd_gpu";
78                         regulator-min-microvolt = <925000>;
79                         regulator-max-microvolt = <1400000>;    
80                         regulator-always-on;
81                         regulator-boot-on;
82                 };
83             };
84         };
85
86
87         codec_hdmi_i2s: codec-hdmi-i2s {
88                 compatible = "hdmi-i2s";
89         };
90
91         codec_hdmi_spdif: codec-hdmi-spdif {
92                 compatible = "hdmi-spdif";
93         };
94
95         rockchip-rt5631 {
96                 compatible = "rockchip-rt5631";
97                 dais {
98                         dai0 {
99                                 audio-codec = <&rt5631>;
100                                 i2s-controller = <&i2s0>;
101                                 format = "i2s";
102                                 //continuous-clock;
103                                 //bitclock-inversion;
104                                 //frame-inversion;
105                                 //bitclock-master;
106                                 //frame-master;
107                         };
108                 };
109         };
110
111         rockchip-rk610 {
112                 compatible = "rockchip-rk610";
113                 dais {
114                         dai0 {
115                                 audio-codec = <&rk610_codec>;
116                                 i2s-controller = <&i2s0>;
117                                 format = "i2s";
118                                 //continuous-clock;
119                                 //bitclock-inversion;
120                                 //frame-inversion;
121                                 //bitclock-master;
122                                 //frame-master;
123                         };
124                 };
125         };
126
127         rockchip-hdmi-i2s {
128                 compatible = "rockchip-hdmi-i2s";
129                 dais {
130                         dai0 {
131                                 audio-codec = <&codec_hdmi_i2s>;
132                                 i2s-controller = <&i2s0>;
133                                 format = "i2s";
134                                 //continuous-clock;
135                                 //bitclock-inversion;
136                                 //frame-inversion;
137                                 //bitclock-master;
138                                 //frame-master;
139                         };
140                 };
141         };
142
143         rockchip-hdmi-spdif {
144                 compatible = "rockchip-hdmi-spdif";
145         };
146
147         vmac-phy {
148                 compatible = "rockchip,vmac-phy";
149                 power-gpios = <&gpio0 GPIO_C0 GPIO_ACTIVE_HIGH>;
150         };
151 };
152
153
154 &emmc {
155         clock-frequency = <50000000>;
156         clock-freq-min-max = <400000 50000000>;
157
158         supports-highspeed;
159         supports-emmc;
160         bootpart-no-access;
161         
162         status = "okay";
163 };
164     
165 &sdmmc {
166         clock-frequency = <50000000>;
167         lock-freq-min-max = <400000 50000000>;              
168             
169         supports-highspeed;
170         supports-sd;
171         broken-cd;
172         card-detect-delay = <200>;
173
174         pwr-gpios = <&gpio3 GPIO_A1 GPIO_ACTIVE_LOW>; /*pwr_en = GPIO3_A1*/
175
176         status = "okay";
177 };
178                 
179 &sdio {
180         clock-frequency = <50000000>;
181         clock-freq-min-max = <200000 50000000>;
182                 
183         supports-highspeed;             
184         supports-sdio;
185         cap-sdio-irq;
186         status = "okay";
187 };
188
189
190 &uart0 {
191         status = "okay";
192         dma-names = "!tx", "!rx";
193         pinctrl-0 = <&uart0_xfer &uart0_cts>;
194 };
195
196 &uart3 {
197         status = "okay";
198         dma-names = "!tx", "!rx";
199 };
200
201 &watchdog {
202         rockchip,timeout = <50>;
203         rockchip,debug = <1>;
204         status = "disabled";
205 };
206
207 &i2c0 {
208         status = "okay";
209         rt5631: rt5631@1a {
210                 compatible = "rt5631";
211                 reg = <0x1a>;
212         };
213
214         rk610ctl@40 {
215                 compatible = "rk610_ctl";
216                 reg = <0x40>;
217                 rk610-reset-io = <&gpio3 GPIO_B2 GPIO_ACTIVE_HIGH>;
218                 clocks = <&clk_i2s>;
219                 clock-names = "i2s_clk";
220         };
221
222         rk610_codec: rk610codec@60 {//RK610_CODEC addr  from 0x60 to 0x80 (0x60~0x80)
223                 compatible = "rk610_codec";
224                 reg = <0x60>;
225                 spk_ctl_io = <&gpio2 GPIO_D7 GPIO_ACTIVE_HIGH>;
226                 boot_depop = <1>;
227                 pa_enable_time = <1000>;
228         };
229
230         sensor@1d {
231                 compatible = "gs_mma8452";
232                 reg = <0x1d>;
233                 type = <SENSOR_TYPE_ACCEL>;
234                 irq-gpio = <&gpio0 GPIO_B7 IRQ_TYPE_EDGE_FALLING>;              
235                 irq_enable = <1>;
236                 poll_delay_ms = <30>;
237                 layout = <1>;
238         };
239 };
240
241 &i2c1 {
242         status = "okay";
243         rtc@51 {
244                 compatible = "nxp,pcf8563";
245                 reg = <0x51>;
246         };
247
248         act8846: act8846@5a {
249                 reg = <0x5a>;
250                 status = "okay";
251         };
252         rk808: rk808@1b {
253                 reg = <0x1b>;
254                 status = "okay";
255         };
256         bq24296: bq24296@6b {
257                 compatible = "ti,bq24296";
258                 reg = <0x6b>;
259 /*      gpios = <&gpio0 GPIO_A7 GPIO_ACTIVE_HIGH>; */
260           bq24296,chg_current = <1000 500 2000>;
261                 status = "disable";
262         };
263         bq27320: bq27320@55 {
264                 compatible = "ti,bq27320";
265                 reg = <0x55>;
266 /*  gpios = <&gpio0 GPIO_A7 GPIO_ACTIVE_HIGH>; */
267                 status = "disable";
268         };
269 };
270
271 &i2c2 {
272         status = "okay";
273         ts@55 {
274                 compatible = "goodix,gt8xx";
275                 reg = <0x55>;
276                 touch-gpio = <&gpio1 GPIO_B7 IRQ_TYPE_LEVEL_LOW>;
277                 reset-gpio = <&gpio0 GPIO_B6 GPIO_ACTIVE_LOW>;
278                 power-gpio = <&gpio0 GPIO_C5 GPIO_ACTIVE_LOW>;
279                 max-x = <1280>;
280                 max-y = <800>;
281         };
282         ts@01 {
283                 compatible = "ct,ct36x";
284                 reg = <0x01>;
285                 ct-model = <365>;
286                 touch-gpio = <&gpio1 GPIO_B7 IRQ_TYPE_LEVEL_LOW>;
287                 reset-gpio = <&gpio0 GPIO_B6 GPIO_ACTIVE_HIGH>;
288                 max-x = <1280>;
289                 max-y = <800>;
290                 orientation=<1 0 0 1>;
291         };
292 };
293
294 &i2c3 {
295         status = "okay";
296 };
297
298 &fb {
299         rockchip,disp-mode = <DUAL>;
300 };
301
302 &rk_screen {
303          display-timings = <&disp_timings>;
304 };
305
306 &lcdc0 {
307         status = "okay";
308         power_ctr: power_ctr {
309                 rockchip,debug = <0>;
310                 lcd_en:lcd_en {
311                         rockchip,power_type = <GPIO>;
312                         gpios = <&gpio0 GPIO_B0 GPIO_ACTIVE_HIGH>;
313                         rockchip,delay = <10>;
314                 };
315
316                      /*lcd_cs:lcd_cs {
317                                 rockchip,power_type = <GPIO>;
318                                 gpios = <&gpio3 GPIO_D6 GPIO_ACTIVE_HIGH>;
319                                 rockchip,delay = <10>;
320                         };
321
322                         lcd_rst:lcd_rst {
323                                 rockchip,power_type = <REGULATOR>;
324                                 rockchip,delay = <5>;
325                         };*/
326
327         };
328 };
329
330 &lcdc1 {
331         status = "okay";
332 };
333
334 &adc {
335         status = "okay";
336
337         key {
338                 compatible = "rockchip,key";
339                 io-channels = <&adc 1>;
340
341                 vol-up-key {
342                         linux,code = <115>;
343                         label = "volume up";
344                         rockchip,adc_value = <1>;
345                 };
346
347                 vol-down-key {
348                         linux,code = <114>;
349                         label = "volume down";
350                         rockchip,adc_value = <170>;
351                 };
352
353                 power-key {
354                         gpios = <&gpio0 GPIO_A4 GPIO_ACTIVE_LOW>;
355                         linux,code = <116>;
356                         label = "power";
357                         gpio-key,wakeup;
358                 };
359
360                 menu-key {
361                         linux,code = <139>;
362                         label = "menu";
363                         rockchip,adc_value = <355>;
364                 };
365
366                 home-key {
367                         linux,code = <102>;
368                         label = "home";
369                         rockchip,adc_value = <746>;
370                 };
371
372                 back-key {
373                         linux,code = <158>;
374                         label = "back";
375                         rockchip,adc_value = <560>;
376                 };
377
378                 camera-key {
379                         linux,code = <212>;
380                         label = "camera";
381                         rockchip,adc_value = <450>;
382                 };
383         };
384 };
385
386 &pwm3 {
387         status = "okay";
388 };
389
390 &pwm0 {
391         status = "disable";
392 };
393
394 &clk_core_dvfs_table {
395         operating-points = <
396                 /* KHz    uV */
397                 312000 1100000
398                 504000 1100000
399                 816000 1100000
400                 1008000 1100000
401                 1200000 1200000
402                 1416000 1300000
403                 1608000 1350000
404                 >;
405 };
406
407 &clk_gpu_dvfs_table {
408         operating-points = <
409                 /* KHz    uV */
410                 200000 1200000
411                 300000 1200000
412                 400000 1200000
413                 >;
414 };
415
416 &clk_ddr_dvfs_table {
417         operating-points = <
418                 /* KHz    uV */
419                 200000 1200000
420                 300000 1200000
421                 400000 1200000
422                 >;
423
424         freq_table = <
425                 /*status                freq(KHz)*/
426                 SYS_STATUS_NORMAL       400000
427                 SYS_STATUS_SUSPEND      200000
428                 SYS_STATUS_VIDEO        300000
429                 SYS_STATUS_DUALVIEW     500000
430                 >;
431 };
432
433 /include/ "act8846.dtsi"
434 &act8846 {
435         gpios =<&gpio3 GPIO_D3 GPIO_ACTIVE_LOW>;
436
437         regulators {
438                 
439                 dcdc1_reg: regulator@0{
440                         regulator-name= "act_dcdc1";
441                         regulator-min-microvolt = <1200000>;
442                         regulator-max-microvolt = <1200000>;
443                         regulator-always-on;
444                         regulator-boot-on;
445                 };
446
447                 dcdc2_reg: regulator@1 {
448                         regulator-name= "vdd_logic";
449                         regulator-always-on;
450                         regulator-boot-on;                      
451                 };
452
453                 dcdc3_reg: regulator@2 {
454                         regulator-name= "vdd_arm";
455                         regulator-always-on;
456                         regulator-boot-on;
457                 };
458
459                 dcdc4_reg: regulator@3 {
460                         regulator-name= "vccio";
461                         regulator-min-microvolt = <1800000>;
462                         regulator-max-microvolt = <3300000>;
463                         regulator-always-on;
464                         regulator-boot-on;
465                 };
466
467                 ldo1_reg: regulator@4 {
468                         regulator-name= "act_ldo1";
469                         regulator-min-microvolt = <1000000>;
470                         regulator-max-microvolt = <1000000>;
471                         regulator-always-on;
472                         regulator-boot-on;
473                 };
474
475                 ldo2_reg: regulator@5 {
476                         regulator-name= "act_ldo2";
477                         regulator-min-microvolt = <1200000>;
478                         regulator-max-microvolt = <1200000>;
479                         regulator-always-on;
480                         regulator-boot-on;
481                 };
482
483                 ldo3_reg: regulator@6 {
484                         regulator-name= "act_ldo3";
485                         regulator-min-microvolt = <1800000>;
486                         regulator-max-microvolt = <1800000>;
487                         regulator-always-on;
488                         regulator-boot-on;
489                 };
490
491                 ldo4_reg:regulator@7 {
492                         regulator-name= "act_ldo4";
493                         regulator-min-microvolt = <3300000>;
494                         regulator-max-microvolt = <3300000>;
495                         regulator-always-on;
496                         regulator-boot-on;
497                 };
498
499                 ldo5_reg: regulator@8 {
500                         regulator-name= "act_ldo5";
501                         regulator-min-microvolt = <3300000>;
502                         regulator-max-microvolt = <3300000>;
503                         regulator-always-on;
504                         regulator-boot-on;
505                 };
506
507                 ldo6_reg: regulator@9 {
508                         regulator-name= "act_ldo6";
509                         regulator-min-microvolt = <3300000>;
510                         regulator-max-microvolt = <3300000>;
511                         regulator-always-on;
512                         regulator-boot-on;
513                 };
514
515                 ldo7_reg: regulator@10 {
516                         regulator-name= "act_ldo7";
517                         regulator-min-microvolt = <1800000>;
518                         regulator-max-microvolt = <1800000>;
519                         regulator-always-on;
520                         regulator-boot-on;
521                 };
522
523                 ldo8_reg: regulator@11 {
524                         regulator-name= "act_ldo8";
525                         regulator-min-microvolt = <2800000>;
526                         regulator-max-microvolt = <2800000>;
527                         regulator-always-on;
528                         regulator-boot-on;
529                 };
530         };
531 };
532
533 /include/ "rk808.dtsi"
534 &rk808 {
535         gpios =<&gpio0 GPIO_B3 GPIO_ACTIVE_HIGH>,<&gpio0 GPIO_A1 GPIO_ACTIVE_LOW>;
536
537         regulators {
538                 
539                 rk808_dcdc1_reg: regulator@0{
540                         regulator-name= "vdd_arm";      
541                         regulator-always-on;
542                         regulator-boot-on;
543                 };
544
545                 rk808_dcdc2_reg: regulator@1 {
546                         regulator-name= "vdd_logic";
547                         regulator-always-on;
548                         regulator-boot-on;              
549                 };
550
551                 rk808_dcdc3_reg: regulator@2 {
552                         regulator-name= "rk_dcdc3";
553                         regulator-min-microvolt = <1200000>;
554                         regulator-max-microvolt = <1200000>;
555                         regulator-always-on;
556                         regulator-boot-on;
557                 };
558
559                 rk808_dcdc4_reg: regulator@3 {
560                         regulator-name= "vccio";
561                         regulator-min-microvolt = <1800000>;
562                         regulator-max-microvolt = <3300000>;
563                         regulator-always-on;
564                         regulator-boot-on;
565                 };
566
567                 rk808_ldo1_reg: regulator@4 {
568                         regulator-name= "rk_ldo1";
569                         regulator-min-microvolt = <3300000>;
570                         regulator-max-microvolt = <3300000>;
571                         regulator-always-on;
572                         regulator-boot-on;
573                 };
574
575                 rk808_ldo2_reg: regulator@5 {
576                         regulator-name= "rk_ldo2";
577                         regulator-min-microvolt = <3300000>;
578                         regulator-max-microvolt = <3300000>;
579                         regulator-always-on;
580                         regulator-boot-on;
581                 };
582
583                 rk808_ldo3_reg: regulator@6 {
584                         regulator-name= "rk_ldo3";
585                         regulator-min-microvolt = <1000000>;
586                         regulator-max-microvolt = <1000000>;
587                         regulator-always-on;
588                         regulator-boot-on;
589                 };
590
591                 rk808_ldo4_reg:regulator@7 {
592                         regulator-name= "rk_ldo4";
593                         regulator-min-microvolt = <1800000>;
594                         regulator-max-microvolt = <1800000>;
595                         regulator-always-on;
596                         regulator-boot-on;
597                 };
598
599                 rk808_ldo5_reg: regulator@8 {
600                         regulator-name= "rk_ldo5";
601                         regulator-min-microvolt = <2800000>;
602                         regulator-max-microvolt = <2800000>;
603                         regulator-always-on;
604                         regulator-boot-on;
605                 };
606
607                 rk808_ldo6_reg: regulator@9 {
608                         regulator-name= "rk_ldo6";
609                         regulator-min-microvolt = <1200000>;
610                         regulator-max-microvolt = <1200000>;
611                         regulator-always-on;
612                         regulator-boot-on;
613                 };
614
615                 rk808_ldo7_reg: regulator@10 {
616                         regulator-name= "rk_ldo7";
617                         regulator-min-microvolt = <1800000>;
618                         regulator-max-microvolt = <1800000>;
619                         regulator-always-on;
620                         regulator-boot-on;
621                 };
622
623                 rk808_ldo8_reg: regulator@11 {
624                         regulator-name= "rk_ldo8";
625                         regulator-min-microvolt = <1800000>;
626                         regulator-max-microvolt = <1800000>;
627                         regulator-always-on;
628                         regulator-boot-on;
629                 };
630         };
631 };
632
633 &ap0_vcc_domain{
634         regulator-name= "vccio_wl";     
635 };
636 &ap1_vcc_domain{
637         regulator-name= "vccio";        
638 };
639 &cif_vcc_domain{
640         regulator-name= "vcc18_cif";    
641 };
642 &flash_vcc_domain{
643         regulator-name= "vcc_flash";    
644 };
645 &vccio0_vcc_domain{
646         regulator-name= "vccio";        
647 };
648 &vccio1_vcc_domain{
649         regulator-name= "vccio";        
650 };
651 &lcdc0_vcc_domain{
652         regulator-name= "vcc_lcd";      
653 };
654 &lcdc1_vcc_domain{
655         regulator-name= "vccio";        
656 };