rk3288: raise vdd_logic to 1.3v, gpu dvfs table add 600M support
[firefly-linux-kernel-4.4.55.git] / arch / arm / boot / dts / rk3288-tb.dts
1 /dts-v1/;
2
3 #include "rk3288.dtsi"
4 #include "lcd-b101ew05.dtsi"
5
6 / {
7         fiq-debugger {
8                 status = "okay";
9         };
10
11     wireless-wlan {
12         compatible = "wlan-platdata";
13
14         wifi_chip_type = "";
15         sdio_vref = <28000>;
16
17         //power_ctrl_by_pmu;
18         pmu_regulator = "act_ldo3";
19         pmu_enable_level = <1>; //1->HIGH, 0->LOW
20
21         WIFI,poweren_gpio = <&gpio4 GPIO_D4 GPIO_ACTIVE_HIGH>;
22         WIFI,host_wake_irq = <&gpio4 GPIO_D6 GPIO_ACTIVE_HIGH>;
23         //WIFI,reset_gpio = <&gpio0 GPIO_A2 GPIO_ACTIVE_LOW>;
24
25         status = "okay";
26     };
27
28     wireless-bluetooth {
29         compatible = "bluetooth-platdata";
30
31         uart_rts_gpios = <&gpio4 GPIO_C3 GPIO_ACTIVE_LOW>;
32         pinctrl-names = "default","rts_gpio";
33         pinctrl-0 = <&uart0_rts>;
34         pinctrl-1 = <&uart0_rts_gpio>;
35
36         BT,power_gpio = <&gpio4 GPIO_D3 GPIO_ACTIVE_HIGH>;
37         BT,reset_gpio = <&gpio4 GPIO_D5 GPIO_ACTIVE_HIGH>;
38         BT,wake_gpio = <&gpio4 GPIO_D2 GPIO_ACTIVE_HIGH>;
39         BT,wake_host_irq = <&gpio4 GPIO_D7 GPIO_ACTIVE_LOW>;
40
41         status = "okay";
42     };
43
44     hallsensor {
45                compatible = "hall_och165t";
46                type = <SENSOR_TYPE_HALL>;
47                irq-gpio = <&gpio0 GPIO_A6 IRQ_TYPE_EDGE_BOTH>;
48      };
49
50         backlight {
51                 compatible = "pwm-backlight";
52                 pwms = <&pwm0 0 25000>;
53                 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>;
54                 default-brightness-level = <20>;
55                 enable-gpios = <&gpio7 GPIO_A2 GPIO_ACTIVE_HIGH>;
56         };
57
58         pwm_regulator {
59                 compatible = "rockchip_pwm_regulator";
60                 pwms = <&pwm1 0 25000>;
61                 rockchip,pwm_id= <1>;
62                 rockchip,pwm_voltage_map= <925000 950000 975000 1000000 1025000 1050000 1075000 1100000 1125000 1150000 1175000 1200000 1225000 1250000 1275000 1300000 1325000 1350000 1375000 1400000>;
63                 rockchip,pwm_voltage= <1000000>;
64                 rockchip,pwm_min_voltage= <925000>;
65                 rockchip,pwm_max_voltage= <1400000>;
66                 rockchip,pwm_suspend_voltage= <950000>;
67                 rockchip,pwm_coefficient= <475>;
68                 regulators {
69                         #address-cells = <1>;
70                         #size-cells = <0>;
71                         pwm_reg0: regulator@0 {
72                                 regulator-compatible = "pwm_dcdc1";
73                                 regulator-name= "vdd_logic";
74                                 regulator-min-microvolt = <925000>;
75                                 regulator-max-microvolt = <1400000>;
76                                 regulator-always-on;
77                                 regulator-boot-on;
78                         };
79                 };
80         };
81
82         codec_hdmi_i2s: codec-hdmi-i2s {
83                 compatible = "hdmi-i2s";
84         };
85
86         codec_hdmi_spdif: codec-hdmi-spdif {
87                 compatible = "hdmi-spdif";
88         };
89
90         rockchip-hdmi-i2s {
91                 compatible = "rockchip-hdmi-i2s";
92                 dais {
93                         dai0 {
94                                 audio-codec = <&codec_hdmi_i2s>;
95                                 i2s-controller = <&i2s>;
96                                 format = "i2s";
97                                 //continuous-clock;
98                                 //bitclock-inversion;
99                                 //frame-inversion;
100                                 //bitclock-master;
101                                 //frame-master;
102                         };
103                 };
104         };
105         
106         rockchip-hdmi-spdif {
107                 compatible = "rockchip-hdmi-spdif";
108         };
109
110         rockchip-rt5631 {
111                 compatible = "rockchip-rt5631";
112                 dais {
113                         dai0 {
114                                 audio-codec = <&rt5631>;
115                                 i2s-controller = <&i2s>;
116                                 format = "i2s";
117                                 //continuous-clock;
118                                 //bitclock-inversion;
119                                 //frame-inversion;
120                                 //bitclock-master;
121                                 //frame-master;
122                         };
123                 };
124         };
125
126         rockchip-rt3224 {
127                 compatible = "rockchip-rt3261";
128                 dais {
129                         dai0 {
130                                 audio-codec = <&rt3261>;
131                                 i2s-controller = <&i2s>;
132                                 format = "i2s";
133                                 //continuous-clock;
134                                 //bitclock-inversion;
135                                 //frame-inversion;
136                                 //bitclock-master;
137                                 //frame-master;
138                         };
139                 };
140         };
141
142 };
143
144 &emmc {
145         clock-frequency = <50000000>;
146         clock-freq-min-max = <400000 50000000>;
147
148         supports-highspeed;
149         supports-emmc;
150         bootpart-no-access;
151         
152         status = "okay";
153 };
154     
155 &sdmmc {
156         clock-frequency = <50000000>;
157         lock-freq-min-max = <400000 50000000>;              
158             
159         supports-highspeed;
160         supports-sd;
161         broken-cd;
162         card-detect-delay = <200>;
163
164         
165         vmmc-supply = <&rk808_ldo5_reg>;
166         status = "disabled";
167 };
168                 
169 &sdio {
170         clock-frequency = <50000000>;
171         clock-freq-min-max = <200000 50000000>;
172                 
173         supports-highspeed;             
174         supports-sdio;
175         cap-sdio-irq;
176
177         status = "diabled";
178 };
179
180 &spi0 {
181         status = "okay";
182 };
183
184 &spi1 {
185         status = "okay";
186 };
187
188 &spi2 {
189         status = "okay";
190 };
191
192 &i2c0 {
193         status = "okay";
194         rk808: rk808@1b {
195                 reg = <0x1b>;
196                 status = "okay";
197         };
198         
199         bq24296: bq24296@6b {
200                 compatible = "ti,bq24296";
201                 reg = <0x6b>;
202                 gpios = <&gpio0 GPIO_A7 GPIO_ACTIVE_HIGH>;
203                 bq24296,chg_current = <1000 500 2000>;
204                 status = "okay";
205         };
206         bq27320: bq27320@55 {
207                 compatible = "ti,bq27320";
208                 reg = <0x55>;
209         /*   gpios = <&gpio0 GPIO_A7 GPIO_ACTIVE_HIGH>; */
210                 status = "okay";
211         };
212
213         CW2015@62 {
214                 compatible = "cw201x";
215                 reg = <0x62>;
216                 dc_det_gpio = <&gpio0 GPIO_B0 GPIO_ACTIVE_LOW>;
217                 bat_low_gpio = <&gpio0 GPIO_A7 GPIO_ACTIVE_LOW>;
218                 chg_ok_gpio = <&gpio0 GPIO_B1 GPIO_ACTIVE_HIGH>;
219                 bat_config_info = <0x15 0x42 0x60 0x59 0x52 0x58 0x4D 0x48 0x48 0x44 0x44 0x46 0x49 0x48 0x32
220                         0x24 0x20 0x17 0x13 0x0F 0x19 0x3E 0x51 0x45 0x08 0x76 0x0B 0x85 0x0E 0x1C 0x2E 0x3E 0x4D 0x52 0x52
221                         0x57 0x3D 0x1B 0x6A 0x2D 0x25 0x43 0x52 0x87 0x8F 0x91 0x94 0x52 0x82 0x8C 0x92 0x96 0xFF 0x7B 0xBB
222                         0xCB 0x2F 0x7D 0x72 0xA5 0xB5 0xC1 0x46 0xAE>;
223                 is_dc_charge = <1>;
224                 is_usb_charge = <0>;
225         };
226 };
227
228 &i2c1 {
229         status = "okay";
230         rtc@51 {
231                 compatible = "nxp,pcf8563";
232                 reg = <0x51>;
233         };
234         
235         sensor@1d {
236                 compatible = "gs_mma8452";
237                 reg = <0x1d>;
238                 type = <SENSOR_TYPE_ACCEL>;
239                 irq-gpio = <&gpio8 GPIO_A0 IRQ_TYPE_EDGE_FALLING>;
240                 irq_enable = <1>;
241                 poll_delay_ms = <30>;
242                 layout = <1>;
243         };
244                 sensor@19 {
245                 compatible = "gs_lis3dh";
246                 reg = <0x19>;
247                 type = <SENSOR_TYPE_ACCEL>;
248                 irq-gpio = <&gpio0 GPIO_A0 IRQ_TYPE_LEVEL_LOW>;
249                 irq_enable = <1>;
250                 poll_delay_ms = <30>;
251                 layout = <1>;
252         };
253                 sensor@0d {
254                 compatible = "ak8963";
255                 reg = <0x0d>;
256                 type = <SENSOR_TYPE_COMPASS>;
257                 irq-gpio = <&gpio8 GPIO_A2 IRQ_TYPE_EDGE_RISING>;
258                 irq_enable = <1>;
259                 poll_delay_ms = <30>;
260                 layout = <1>;
261         };
262
263                 sensor@6b {
264                 compatible = "l3g20d_gyro";
265                 reg = <0x6b>;
266                 type = <SENSOR_TYPE_GYROSCOPE>;
267                 irq-gpio = <&gpio8 GPIO_A3 IRQ_TYPE_LEVEL_LOW>;
268                 irq_enable = <1>;
269                 poll_delay_ms = <30>;
270                 layout = <1>;
271         };
272         sensor@10 {
273               compatible = "ls_cm3218";
274               reg = <0x10>;
275               type = <SENSOR_TYPE_LIGHT>;
276               irq-gpio = <&gpio8 GPIO_A3 IRQ_TYPE_EDGE_FALLING>;              
277               irq_enable = <1>;
278               poll_delay_ms = <30>;
279               layout = <1>;
280        };
281         
282 };
283
284 &i2c2 {
285         status = "okay";
286         rt5631: rt5631@1a {
287                 compatible = "rt5631";
288                 reg = <0x1a>;
289         };
290         es8323: es8323@10 {
291                 compatible = "es8323";
292                 reg = <0x10>;
293         };
294         rt3261: rt3261@1c {
295                 compatible = "rt3261";
296                 reg = <0x1c>;
297                 codec-en-gpio = <0>;//sdk default high level
298                 spk-num= <2>;
299                 modem-input-mode = <1>;
300                 lout-to-modem_mode = <1>;
301                 spk-amplify = <2>;
302                 playback-if1-data_control = <0>;
303                 playback-if2-data_control = <0>;
304         };
305         rt5616: rt5616@1b {
306                 compatible = "rt5616";
307                 reg = <0x1b>;
308         };
309 };
310
311 &i2c3 {
312         status = "okay";
313 };
314
315 &i2c4 {
316         status = "okay";
317 /*
318         ts@55 {
319                 compatible = "goodix,gt8xx";
320                 reg = <0x55>;
321                 touch-gpio = <&gpio7 GPIO_A6 IRQ_TYPE_LEVEL_LOW>;
322                 reset-gpio = <&gpio7 GPIO_A5 GPIO_ACTIVE_LOW>;
323                 //power-gpio = <&gpio0 GPIO_C5 GPIO_ACTIVE_LOW>;
324                 max-x = <1280>;
325                 max-y = <800>;
326         };
327         
328         ts@01 {
329                 compatible = "ct,ct36x";
330                 reg = <0x01>;
331                 ct-model = <365>;
332                 touch-gpio = <&gpio7 GPIO_A6 IRQ_TYPE_LEVEL_LOW>;
333                 reset-gpio = <&gpio7 GPIO_A5 GPIO_ACTIVE_HIGH>;
334                 max-x = <1280>;
335                 max-y = <800>;
336                 orientation=<1 0 0 1>;
337         };
338 */
339 };
340
341 &i2c5 {
342         status = "okay";
343 };
344
345 &fb {
346         rockchip,disp-mode = <DUAL>;
347 };
348
349 &rk_screen {
350          display-timings = <&disp_timings>;
351 };
352
353 /*lcdc1 as PRMRY(LCD),lcdc0 as EXTEND(HDMI)*/
354 &lcdc1 {
355         status = "okay";
356         power_ctr: power_ctr {
357                 rockchip,debug = <0>;
358                 rockchip,mirror = <NO_MIRROR>;
359                 lcd_en:lcd_en {
360                         rockchip,power_type = <GPIO>;
361                         gpios = <&gpio7 GPIO_A3 GPIO_ACTIVE_HIGH>;
362                         rockchip,delay = <10>;
363                 };
364                 
365                 /*lcd_cs:lcd_cs {
366                         rockchip,power_type = <REGULATOR>;
367                         rockchip,delay = <10>;
368                 };
369
370                 lcd_rst:lcd_rst {
371                         rockchip,power_type = <GPIO>;
372                         gpios = <&gpio3 GPIO_D6 GPIO_ACTIVE_HIGH>;
373                         rockchip,delay = <5>;
374                 };*/
375
376         };
377 };
378
379 &lcdc0 {
380         status = "okay";
381 };
382
383 &hdmi {
384         status = "okay";
385         rockchips,hdmi_audio_source = <0>;
386 };
387
388 &adc {
389         status = "okay";
390
391         key {
392                 compatible = "rockchip,key";
393                 io-channels = <&adc 1>;
394
395                 vol-up-key {
396                         linux,code = <115>;
397                         label = "volume up";
398                         rockchip,adc_value = <1>;
399                 };
400
401                 vol-down-key {
402                         linux,code = <114>;
403                         label = "volume down";
404                         rockchip,adc_value = <170>;
405                 };
406
407                 power-key {
408                         gpios = <&gpio0 GPIO_A5 GPIO_ACTIVE_LOW>;
409                         linux,code = <116>;
410                         label = "power";
411                         gpio-key,wakeup;
412                 };
413
414                 menu-key {
415                         linux,code = <139>;
416                         label = "menu";
417                         rockchip,adc_value = <355>;
418                 };
419
420                 home-key {
421                         linux,code = <102>;
422                         label = "home";
423                         rockchip,adc_value = <746>;
424                 };
425
426                 back-key {
427                         linux,code = <158>;
428                         label = "back";
429                         rockchip,adc_value = <560>;
430                 };
431
432                 camera-key {
433                         linux,code = <212>;
434                         label = "camera";
435                         rockchip,adc_value = <450>;
436                 };
437         };
438 };
439
440 &pwm0 {
441         status = "okay";
442 };
443
444 &pwm1 {
445         status = "okay";
446 };
447
448
449 &clk_core_dvfs_table {
450         operating-points = <
451                 /* KHz    uV */
452                 312000 1100000
453                 504000 1100000
454                 816000 1100000
455                 1008000 1100000
456                 >;
457 };
458
459 &clk_gpu_dvfs_table {
460         operating-points = <
461                 /* KHz    uV */
462                 200000 1200000
463                 300000 1200000
464                 400000 1200000
465                 600000 1300000
466                 >;
467 };
468
469 &clk_ddr_dvfs_table {
470         operating-points = <
471                 /* KHz    uV */
472                 200000 1200000
473                 300000 1200000
474                 400000 1200000
475                 >;
476
477         freq_table = <
478                 /*status                freq(KHz)*/
479                 SYS_STATUS_NORMAL       400000
480                 SYS_STATUS_SUSPEND      200000
481                 SYS_STATUS_VIDEO        300000
482                 SYS_STATUS_DUALVIEW     500000
483                 >;
484 };
485
486 /include/ "rk808.dtsi"
487 &rk808 {
488         gpios =<&gpio0 GPIO_A4 GPIO_ACTIVE_HIGH>,<&gpio0 GPIO_B3 GPIO_ACTIVE_LOW>;
489
490         regulators {
491                 
492                 rk808_dcdc1_reg: regulator@0{
493                         regulator-name= "vdd_arm";
494                         regulator-always-on;
495                         regulator-boot-on;
496                 };
497
498                 rk808_dcdc2_reg: regulator@1 {
499                         regulator-name= "vdd_gpu";
500                         regulator-always-on;
501                         regulator-boot-on;
502                 };
503
504                 rk808_dcdc3_reg: regulator@2 {
505                         regulator-name= "rk_dcdc3";
506                         regulator-min-microvolt = <1200000>;
507                         regulator-max-microvolt = <1200000>;
508                         regulator-always-on;
509                         regulator-boot-on;
510                 };
511
512                 rk808_dcdc4_reg: regulator@3 {
513                         regulator-name= "vccio";
514                         regulator-min-microvolt = <1800000>;
515                         regulator-max-microvolt = <3300000>;
516                         regulator-always-on;
517                         regulator-boot-on;
518                 };
519
520                 rk808_ldo1_reg: regulator@4 {
521                         regulator-name= "rk_ldo1";
522                         regulator-min-microvolt = <3300000>;
523                         regulator-max-microvolt = <3300000>;
524                         regulator-always-on;
525                         regulator-boot-on;
526                 };
527
528                 rk808_ldo2_reg: regulator@5 {
529                         regulator-name= "rk_ldo2";
530                         regulator-min-microvolt = <3300000>;
531                         regulator-max-microvolt = <3300000>;
532                         regulator-always-on;
533                         regulator-boot-on;
534                 };
535
536                 rk808_ldo3_reg: regulator@6 {
537                         regulator-name= "rk_ldo3";
538                         regulator-min-microvolt = <1000000>;
539                         regulator-max-microvolt = <1000000>;
540                         regulator-always-on;
541                         regulator-boot-on;
542                 };
543
544                 rk808_ldo4_reg:regulator@7 {
545                         regulator-name= "rk_ldo4";
546                         regulator-min-microvolt = <1800000>;
547                         regulator-max-microvolt = <1800000>;
548                         regulator-always-on;
549                         regulator-boot-on;
550                 };
551
552                 rk808_ldo5_reg: regulator@8 {
553                         regulator-name= "rk_ldo5";
554                         regulator-min-microvolt = <3300000>;
555                         regulator-max-microvolt = <3300000>;
556                         regulator-always-on;
557                         regulator-boot-on;
558                 };
559
560                 rk808_ldo6_reg: regulator@9 {
561                         regulator-name= "rk_ldo6";
562                         regulator-min-microvolt = <1000000>;
563                         regulator-max-microvolt = <1000000>;
564                         regulator-always-on;
565                         regulator-boot-on;
566                 };
567
568                 rk808_ldo7_reg: regulator@10 {
569                         regulator-name= "rk_ldo7";
570                         regulator-min-microvolt = <1800000>;
571                         regulator-max-microvolt = <1800000>;
572                         regulator-always-on;
573                         regulator-boot-on;
574                 };
575
576                 rk808_ldo8_reg: regulator@11 {
577                         regulator-name= "rk_ldo8";
578                         regulator-min-microvolt = <3300000>;
579                         regulator-max-microvolt = <3300000>;
580                         regulator-always-on;
581                         regulator-boot-on;
582                 };
583         };
584 };