enable spi defconfig and rk3288 pinctrl clocks
[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 &spi0 {
208         status = "okay";
209 };
210
211 &spi1 {
212         status = "okay";
213 };
214
215 &i2c0 {
216         status = "okay";
217         rt5631: rt5631@1a {
218                 compatible = "rt5631";
219                 reg = <0x1a>;
220         };
221
222         rk610ctl@40 {
223                 compatible = "rk610_ctl";
224                 reg = <0x40>;
225                 rk610-reset-io = <&gpio3 GPIO_B2 GPIO_ACTIVE_HIGH>;
226                 clocks = <&clk_i2s>;
227                 clock-names = "i2s_clk";
228         };
229
230         rk610_codec: rk610codec@60 {//RK610_CODEC addr  from 0x60 to 0x80 (0x60~0x80)
231                 compatible = "rk610_codec";
232                 reg = <0x60>;
233                 spk_ctl_io = <&gpio2 GPIO_D7 GPIO_ACTIVE_HIGH>;
234                 boot_depop = <1>;
235                 pa_enable_time = <1000>;
236         };
237
238         sensor@1d {
239                 compatible = "gs_mma8452";
240                 reg = <0x1d>;
241                 type = <SENSOR_TYPE_ACCEL>;
242                 irq-gpio = <&gpio0 GPIO_B7 IRQ_TYPE_EDGE_FALLING>;              
243                 irq_enable = <1>;
244                 poll_delay_ms = <30>;
245                 layout = <1>;
246         };
247 };
248
249 &i2c1 {
250         status = "okay";
251         rtc@51 {
252                 compatible = "nxp,pcf8563";
253                 reg = <0x51>;
254         };
255
256         act8846: act8846@5a {
257                 reg = <0x5a>;
258                 status = "okay";
259         };
260         rk808: rk808@1b {
261                 reg = <0x1b>;
262                 status = "okay";
263         };
264         bq24296: bq24296@6b {
265                 compatible = "ti,bq24296";
266                 reg = <0x6b>;
267 /*      gpios = <&gpio0 GPIO_A7 GPIO_ACTIVE_HIGH>; */
268           bq24296,chg_current = <1000 500 2000>;
269                 status = "disable";
270         };
271         bq27320: bq27320@55 {
272                 compatible = "ti,bq27320";
273                 reg = <0x55>;
274 /*  gpios = <&gpio0 GPIO_A7 GPIO_ACTIVE_HIGH>; */
275                 status = "disable";
276         };
277 };
278
279 &i2c2 {
280         status = "okay";
281         ts@55 {
282                 compatible = "goodix,gt8xx";
283                 reg = <0x55>;
284                 touch-gpio = <&gpio1 GPIO_B7 IRQ_TYPE_LEVEL_LOW>;
285                 reset-gpio = <&gpio0 GPIO_B6 GPIO_ACTIVE_LOW>;
286                 power-gpio = <&gpio0 GPIO_C5 GPIO_ACTIVE_LOW>;
287                 max-x = <1280>;
288                 max-y = <800>;
289         };
290         ts@01 {
291                 compatible = "ct,ct36x";
292                 reg = <0x01>;
293                 ct-model = <365>;
294                 touch-gpio = <&gpio1 GPIO_B7 IRQ_TYPE_LEVEL_LOW>;
295                 reset-gpio = <&gpio0 GPIO_B6 GPIO_ACTIVE_HIGH>;
296                 max-x = <1280>;
297                 max-y = <800>;
298                 orientation=<1 0 0 1>;
299         };
300 };
301
302 &i2c3 {
303         status = "okay";
304 };
305
306 &fb {
307         rockchip,disp-mode = <DUAL>;
308 };
309
310 &rk_screen {
311          display-timings = <&disp_timings>;
312 };
313
314 &lcdc0 {
315         status = "okay";
316         power_ctr: power_ctr {
317                 rockchip,debug = <0>;
318                 lcd_en:lcd_en {
319                         rockchip,power_type = <GPIO>;
320                         gpios = <&gpio0 GPIO_B0 GPIO_ACTIVE_HIGH>;
321                         rockchip,delay = <10>;
322                 };
323
324                      /*lcd_cs:lcd_cs {
325                                 rockchip,power_type = <GPIO>;
326                                 gpios = <&gpio3 GPIO_D6 GPIO_ACTIVE_HIGH>;
327                                 rockchip,delay = <10>;
328                         };
329
330                         lcd_rst:lcd_rst {
331                                 rockchip,power_type = <REGULATOR>;
332                                 rockchip,delay = <5>;
333                         };*/
334
335         };
336 };
337
338 &lcdc1 {
339         status = "okay";
340 };
341
342 &adc {
343         status = "okay";
344
345         key {
346                 compatible = "rockchip,key";
347                 io-channels = <&adc 1>;
348
349                 vol-up-key {
350                         linux,code = <115>;
351                         label = "volume up";
352                         rockchip,adc_value = <1>;
353                 };
354
355                 vol-down-key {
356                         linux,code = <114>;
357                         label = "volume down";
358                         rockchip,adc_value = <170>;
359                 };
360
361                 power-key {
362                         gpios = <&gpio0 GPIO_A4 GPIO_ACTIVE_LOW>;
363                         linux,code = <116>;
364                         label = "power";
365                         gpio-key,wakeup;
366                 };
367
368                 menu-key {
369                         linux,code = <139>;
370                         label = "menu";
371                         rockchip,adc_value = <355>;
372                 };
373
374                 home-key {
375                         linux,code = <102>;
376                         label = "home";
377                         rockchip,adc_value = <746>;
378                 };
379
380                 back-key {
381                         linux,code = <158>;
382                         label = "back";
383                         rockchip,adc_value = <560>;
384                 };
385
386                 camera-key {
387                         linux,code = <212>;
388                         label = "camera";
389                         rockchip,adc_value = <450>;
390                 };
391         };
392 };
393
394 &pwm3 {
395         status = "okay";
396 };
397
398 &pwm0 {
399         status = "disable";
400 };
401
402 &clk_core_dvfs_table {
403         operating-points = <
404                 /* KHz    uV */
405                 312000 1100000
406                 504000 1100000
407                 816000 1100000
408                 1008000 1100000
409                 1200000 1200000
410                 1416000 1300000
411                 1608000 1350000
412                 >;
413 };
414
415 &clk_gpu_dvfs_table {
416         operating-points = <
417                 /* KHz    uV */
418                 200000 1200000
419                 300000 1200000
420                 400000 1200000
421                 >;
422 };
423
424 &clk_ddr_dvfs_table {
425         operating-points = <
426                 /* KHz    uV */
427                 200000 1200000
428                 300000 1200000
429                 400000 1200000
430                 >;
431
432         freq_table = <
433                 /*status                freq(KHz)*/
434                 SYS_STATUS_NORMAL       400000
435                 SYS_STATUS_SUSPEND      200000
436                 SYS_STATUS_VIDEO        300000
437                 SYS_STATUS_DUALVIEW     500000
438                 >;
439 };
440
441 /include/ "act8846.dtsi"
442 &act8846 {
443         gpios =<&gpio3 GPIO_D3 GPIO_ACTIVE_LOW>;
444
445         regulators {
446                 
447                 dcdc1_reg: regulator@0{
448                         regulator-name= "act_dcdc1";
449                         regulator-min-microvolt = <1200000>;
450                         regulator-max-microvolt = <1200000>;
451                         regulator-always-on;
452                         regulator-boot-on;
453                 };
454
455                 dcdc2_reg: regulator@1 {
456                         regulator-name= "vdd_logic";
457                         regulator-always-on;
458                         regulator-boot-on;                      
459                 };
460
461                 dcdc3_reg: regulator@2 {
462                         regulator-name= "vdd_arm";
463                         regulator-always-on;
464                         regulator-boot-on;
465                 };
466
467                 dcdc4_reg: regulator@3 {
468                         regulator-name= "vccio";
469                         regulator-min-microvolt = <1800000>;
470                         regulator-max-microvolt = <3300000>;
471                         regulator-always-on;
472                         regulator-boot-on;
473                 };
474
475                 ldo1_reg: regulator@4 {
476                         regulator-name= "act_ldo1";
477                         regulator-min-microvolt = <1000000>;
478                         regulator-max-microvolt = <1000000>;
479                         regulator-always-on;
480                         regulator-boot-on;
481                 };
482
483                 ldo2_reg: regulator@5 {
484                         regulator-name= "act_ldo2";
485                         regulator-min-microvolt = <1200000>;
486                         regulator-max-microvolt = <1200000>;
487                         regulator-always-on;
488                         regulator-boot-on;
489                 };
490
491                 ldo3_reg: regulator@6 {
492                         regulator-name= "act_ldo3";
493                         regulator-min-microvolt = <1800000>;
494                         regulator-max-microvolt = <1800000>;
495                         regulator-always-on;
496                         regulator-boot-on;
497                 };
498
499                 ldo4_reg:regulator@7 {
500                         regulator-name= "act_ldo4";
501                         regulator-min-microvolt = <3300000>;
502                         regulator-max-microvolt = <3300000>;
503                         regulator-always-on;
504                         regulator-boot-on;
505                 };
506
507                 ldo5_reg: regulator@8 {
508                         regulator-name= "act_ldo5";
509                         regulator-min-microvolt = <3300000>;
510                         regulator-max-microvolt = <3300000>;
511                         regulator-always-on;
512                         regulator-boot-on;
513                 };
514
515                 ldo6_reg: regulator@9 {
516                         regulator-name= "act_ldo6";
517                         regulator-min-microvolt = <3300000>;
518                         regulator-max-microvolt = <3300000>;
519                         regulator-always-on;
520                         regulator-boot-on;
521                 };
522
523                 ldo7_reg: regulator@10 {
524                         regulator-name= "act_ldo7";
525                         regulator-min-microvolt = <1800000>;
526                         regulator-max-microvolt = <1800000>;
527                         regulator-always-on;
528                         regulator-boot-on;
529                 };
530
531                 ldo8_reg: regulator@11 {
532                         regulator-name= "act_ldo8";
533                         regulator-min-microvolt = <2800000>;
534                         regulator-max-microvolt = <2800000>;
535                         regulator-always-on;
536                         regulator-boot-on;
537                 };
538         };
539 };
540
541 /include/ "rk808.dtsi"
542 &rk808 {
543         gpios =<&gpio0 GPIO_B3 GPIO_ACTIVE_HIGH>,<&gpio0 GPIO_A1 GPIO_ACTIVE_LOW>;
544
545         regulators {
546                 
547                 rk808_dcdc1_reg: regulator@0{
548                         regulator-name= "vdd_arm";      
549                         regulator-always-on;
550                         regulator-boot-on;
551                 };
552
553                 rk808_dcdc2_reg: regulator@1 {
554                         regulator-name= "vdd_logic";
555                         regulator-always-on;
556                         regulator-boot-on;              
557                 };
558
559                 rk808_dcdc3_reg: regulator@2 {
560                         regulator-name= "rk_dcdc3";
561                         regulator-min-microvolt = <1200000>;
562                         regulator-max-microvolt = <1200000>;
563                         regulator-always-on;
564                         regulator-boot-on;
565                 };
566
567                 rk808_dcdc4_reg: regulator@3 {
568                         regulator-name= "vccio";
569                         regulator-min-microvolt = <1800000>;
570                         regulator-max-microvolt = <3300000>;
571                         regulator-always-on;
572                         regulator-boot-on;
573                 };
574
575                 rk808_ldo1_reg: regulator@4 {
576                         regulator-name= "rk_ldo1";
577                         regulator-min-microvolt = <3300000>;
578                         regulator-max-microvolt = <3300000>;
579                         regulator-always-on;
580                         regulator-boot-on;
581                 };
582
583                 rk808_ldo2_reg: regulator@5 {
584                         regulator-name= "rk_ldo2";
585                         regulator-min-microvolt = <3300000>;
586                         regulator-max-microvolt = <3300000>;
587                         regulator-always-on;
588                         regulator-boot-on;
589                 };
590
591                 rk808_ldo3_reg: regulator@6 {
592                         regulator-name= "rk_ldo3";
593                         regulator-min-microvolt = <1000000>;
594                         regulator-max-microvolt = <1000000>;
595                         regulator-always-on;
596                         regulator-boot-on;
597                 };
598
599                 rk808_ldo4_reg:regulator@7 {
600                         regulator-name= "rk_ldo4";
601                         regulator-min-microvolt = <1800000>;
602                         regulator-max-microvolt = <1800000>;
603                         regulator-always-on;
604                         regulator-boot-on;
605                 };
606
607                 rk808_ldo5_reg: regulator@8 {
608                         regulator-name= "rk_ldo5";
609                         regulator-min-microvolt = <2800000>;
610                         regulator-max-microvolt = <2800000>;
611                         regulator-always-on;
612                         regulator-boot-on;
613                 };
614
615                 rk808_ldo6_reg: regulator@9 {
616                         regulator-name= "rk_ldo6";
617                         regulator-min-microvolt = <1200000>;
618                         regulator-max-microvolt = <1200000>;
619                         regulator-always-on;
620                         regulator-boot-on;
621                 };
622
623                 rk808_ldo7_reg: regulator@10 {
624                         regulator-name= "rk_ldo7";
625                         regulator-min-microvolt = <1800000>;
626                         regulator-max-microvolt = <1800000>;
627                         regulator-always-on;
628                         regulator-boot-on;
629                 };
630
631                 rk808_ldo8_reg: regulator@11 {
632                         regulator-name= "rk_ldo8";
633                         regulator-min-microvolt = <1800000>;
634                         regulator-max-microvolt = <1800000>;
635                         regulator-always-on;
636                         regulator-boot-on;
637                 };
638         };
639 };
640
641 &ap0_vcc_domain{
642         regulator-name= "vccio_wl";     
643 };
644 &ap1_vcc_domain{
645         regulator-name= "vccio";        
646 };
647 &cif_vcc_domain{
648         regulator-name= "vcc18_cif";    
649 };
650 &flash_vcc_domain{
651         regulator-name= "vcc_flash";    
652 };
653 &vccio0_vcc_domain{
654         regulator-name= "vccio";        
655 };
656 &vccio1_vcc_domain{
657         regulator-name= "vccio";        
658 };
659 &lcdc0_vcc_domain{
660         regulator-name= "vcc_lcd";      
661 };
662 &lcdc1_vcc_domain{
663         regulator-name= "vccio";        
664 };