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