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