delete spi1_cs1 dts code for rk3288
[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 = <1800>; //1800mv or 3300mv
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 = <128>;
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                 dais {
109                         dai0 {
110                                 audio-codec = <&codec_hdmi_spdif>;
111                                 i2s-controller = <&spdif>;
112                                 format = "spdif";
113                                 //continuous-clock;
114                                 //bitclock-inversion;
115                                 //frame-inversion;
116                                 //bitclock-master;
117                                 //frame-master;
118                         };
119                 };              
120         };
121
122         rockchip-rt5631 {
123                 compatible = "rockchip-rt5631";
124                 dais {
125                         dai0 {
126                                 audio-codec = <&rt5631>;
127                                 i2s-controller = <&i2s>;
128                                 format = "i2s";
129                                 //continuous-clock;
130                                 //bitclock-inversion;
131                                 //frame-inversion;
132                                 //bitclock-master;
133                                 //frame-master;
134                         };
135                 };
136         };
137
138         rockchip-rt3224 {
139                 compatible = "rockchip-rt3261";
140                 dais {
141                         dai0 {
142                                 audio-codec = <&rt3261>;
143                                 i2s-controller = <&i2s>;
144                                 format = "i2s";
145                                 //continuous-clock;
146                                 //bitclock-inversion;
147                                 //frame-inversion;
148                                 //bitclock-master;
149                                 //frame-master;
150                         };
151                         dai1 {
152                                 audio-codec = <&rt3261>;
153                                 i2s-controller = <&i2s>;
154                                 format = "i2s";
155                                 //continuous-clock;
156                                 //bitclock-inversion;
157                                 //frame-inversion;
158                                 //bitclock-master;
159                                 //frame-master;
160                         };
161                 };
162         };
163 };
164
165 &gmac {
166 //      power_ctl_by = "gpio";  //"gpio" "pmu"
167         power-gpio = <&gpio0 GPIO_A6 GPIO_ACTIVE_HIGH>;
168 //      power-pmu = "act_ldo"
169         reset-gpio = <&gpio4 GPIO_A7 GPIO_ACTIVE_HIGH>;
170 };
171
172 &pinctrl {
173         gpio0_gpio {
174                         gpio0_c2: gpio0-c2 {
175                                 rockchip,pins = <GPIO0_C2>;
176                                 rockchip,pull = <VALUE_PULL_DOWN>;
177                         };
178
179                         //to add
180                 };
181                 
182         gpio7_gpio {
183                         gpio7_b7: gpio7-b7 {
184                                 rockchip,pins = <GPIO7_B7>;
185                                 rockchip,pull = <VALUE_PULL_UP>;
186                         };
187
188                         //to add
189                 };
190
191         
192
193         //could add other pinctrl definition such as gpio
194
195 };
196
197 &emmc {
198         clock-frequency = <200000000>;
199         clock-freq-min-max = <400000 200000000>;
200
201         supports-highspeed;
202         supports-emmc;
203         bootpart-no-access;
204         
205         status = "okay";
206 };
207     
208 &sdmmc {
209         clock-frequency = <50000000>;
210         lock-freq-min-max = <400000 50000000>;              
211             
212         supports-highspeed;
213         supports-sd;
214         broken-cd;
215         card-detect-delay = <200>;
216
217         
218         vmmc-supply = <&rk808_ldo5_reg>;
219         status = "okay";
220 };
221                 
222 &sdio {
223         clock-frequency = <50000000>;
224         clock-freq-min-max = <200000 50000000>;
225                 
226         supports-highspeed;             
227         supports-sdio;
228         //cap-sdio-irq;
229
230         status = "okay";
231 };
232
233 &spi0 {
234         status = "okay";
235         max-freq = <48000000>;  
236         /*
237         spi_test@00 {
238                 compatible = "rockchip,spi_test_bus0_cs0";
239                 reg = <0>;
240                 spi-max-frequency = <24000000>;
241                 //spi-cpha;
242                 //spi-cpol;
243                 poll_mode = <0>;
244                 type = <0>;
245                 enable_dma = <0>;
246
247         };
248
249         spi_test@01 {
250                 compatible = "rockchip,spi_test_bus0_cs1";
251                 reg = <1>;
252                 spi-max-frequency = <24000000>;
253                 spi-cpha;
254                 spi-cpol;
255                 poll_mode = <0>;
256                 type = <0>;
257                 enable_dma = <0>;               
258         };
259         */
260 };
261
262 &spi1 {
263         status = "okay";
264         max-freq = <48000000>;
265         /*
266         spi_test@10 {
267                 compatible = "rockchip,spi_test_bus1_cs0";
268                 reg = <0>;
269                 spi-max-frequency = <24000000>;
270                 //spi-cpha;
271                 //spi-cpol;
272                 poll_mode = <0>;
273                 type = <0>;
274                 enable_dma = <0>;
275         };
276
277         */
278 };
279
280 &spi2 {
281         status = "okay";
282         max-freq = <48000000>;
283         /*
284         spi_test@20 {
285                 compatible = "rockchip,spi_test_bus2_cs0";
286                 reg = <0>;
287                 spi-max-frequency = <24000000>;
288                 //spi-cpha;
289                 //spi-cpol;
290                 poll_mode = <0>;
291                 type = <0>;
292                 enable_dma = <0>;
293         };
294
295         spi_test@21 {
296                 compatible = "rockchip,spi_test_bus2_cs1";
297                 reg = <1>;
298                 spi-max-frequency = <24000000>;
299                 //spi-cpha;
300                 //spi-cpol;
301                 poll_mode = <0>;
302                 type = <0>;
303                 enable_dma = <0>;
304         };
305         */
306 };
307
308 &uart_bt {
309         status = "okay";
310         dma-names = "!tx", "!rx";
311         pinctrl-0 = <&uart0_xfer &uart0_cts>;
312 };
313
314 &i2c0 {
315         status = "okay";
316         rk808: rk808@1b {
317                 reg = <0x1b>;
318                 status = "okay";
319         };
320         
321         bq24296: bq24296@6b {
322                 compatible = "ti,bq24296";
323                 reg = <0x6b>;
324                 gpios = <&gpio0 GPIO_A7 GPIO_ACTIVE_HIGH>,<&gpio0 GPIO_B0 GPIO_ACTIVE_HIGH>;
325                 bq24296,chg_current = <1000 2000 3000>;
326                 status = "okay";
327         };
328         bq27320: bq27320@55 {
329                 compatible = "ti,bq27320";
330                 reg = <0x55>;
331         /*   gpios = <&gpio0 GPIO_A7 GPIO_ACTIVE_HIGH>; */
332                 status = "okay";
333         };
334
335         CW2015@62 {
336                 compatible = "cw201x";
337                 reg = <0x62>;
338                 dc_det_gpio = <&gpio0 GPIO_B0 GPIO_ACTIVE_LOW>;
339                 bat_low_gpio = <&gpio0 GPIO_A7 GPIO_ACTIVE_LOW>;
340                 chg_ok_gpio = <&gpio0 GPIO_B1 GPIO_ACTIVE_HIGH>;
341                 bat_config_info = <0x15 0x42 0x60 0x59 0x52 0x58 0x4D 0x48 0x48 0x44 0x44 0x46 0x49 0x48 0x32
342                         0x24 0x20 0x17 0x13 0x0F 0x19 0x3E 0x51 0x45 0x08 0x76 0x0B 0x85 0x0E 0x1C 0x2E 0x3E 0x4D 0x52 0x52
343                         0x57 0x3D 0x1B 0x6A 0x2D 0x25 0x43 0x52 0x87 0x8F 0x91 0x94 0x52 0x82 0x8C 0x92 0x96 0xFF 0x7B 0xBB
344                         0xCB 0x2F 0x7D 0x72 0xA5 0xB5 0xC1 0x46 0xAE>;
345                 is_dc_charge = <1>;
346                 is_usb_charge = <0>;
347         };
348 };
349
350 &i2c1 {
351         status = "okay";
352         rtc@51 {
353                 compatible = "nxp,pcf8563";
354                 reg = <0x51>;
355         };
356         
357         sensor@1d {
358                 compatible = "gs_mma8452";
359                 reg = <0x1d>;
360                 type = <SENSOR_TYPE_ACCEL>;
361                 irq-gpio = <&gpio8 GPIO_A0 IRQ_TYPE_EDGE_FALLING>;
362                 irq_enable = <1>;
363                 poll_delay_ms = <30>;
364                 layout = <1>;
365         };
366                 sensor@19 {
367                 compatible = "gs_lis3dh";
368                 reg = <0x19>;
369                 type = <SENSOR_TYPE_ACCEL>;
370                 irq-gpio = <&gpio0 GPIO_A0 IRQ_TYPE_LEVEL_LOW>;
371                 irq_enable = <1>;
372                 poll_delay_ms = <30>;
373                 layout = <1>;
374         };
375                 sensor@0d {
376                 compatible = "ak8963";
377                 reg = <0x0d>;
378                 type = <SENSOR_TYPE_COMPASS>;
379                 irq-gpio = <&gpio8 GPIO_A2 IRQ_TYPE_EDGE_RISING>;
380                 irq_enable = <1>;
381                 poll_delay_ms = <30>;
382                 layout = <1>;
383         };
384
385                 sensor@6b {
386                 compatible = "l3g20d_gyro";
387                 reg = <0x6b>;
388                 type = <SENSOR_TYPE_GYROSCOPE>;
389                 irq-gpio = <&gpio8 GPIO_A3 IRQ_TYPE_LEVEL_LOW>;
390                 irq_enable = <1>;
391                 poll_delay_ms = <30>;
392                 layout = <1>;
393         };
394         sensor@10 {
395               compatible = "ls_cm3218";
396               reg = <0x10>;
397               type = <SENSOR_TYPE_LIGHT>;
398               irq-gpio = <&gpio8 GPIO_A3 IRQ_TYPE_EDGE_FALLING>;              
399               irq_enable = <1>;
400               poll_delay_ms = <30>;
401               layout = <1>;
402        };
403         
404 };
405
406 &i2c2 {
407         status = "okay";
408         rt5631: rt5631@1a {
409                 compatible = "rt5631";
410                 reg = <0x1a>;
411         };
412         es8323: es8323@10 {
413                 compatible = "es8323";
414                 reg = <0x10>;
415         };
416         rt3261: rt3261@1c {
417                 compatible = "rt3261";
418                 reg = <0x1c>;
419         //      codec-en-gpio = <0>;//sdk default high level
420                 spk-num= <2>;
421                 modem-input-mode = <1>;
422                 lout-to-modem_mode = <1>;
423                 spk-amplify = <2>;
424                 playback-if1-data_control = <0>;
425                 playback-if2-data_control = <0>;
426         };
427         rt5616: rt5616@1b {
428                 compatible = "rt5616";
429                 reg = <0x1b>;
430         };
431 };
432
433 &i2c3 {
434         status = "okay";
435 };
436
437 &i2c4 {
438         status = "okay";
439         ts@55 {
440                 compatible = "goodix,gt8xx";
441                 reg = <0x55>;
442                 touch-gpio = <&gpio7 GPIO_A6 IRQ_TYPE_LEVEL_LOW>;
443                 reset-gpio = <&gpio7 GPIO_A5 GPIO_ACTIVE_LOW>;
444                 //power-gpio = <&gpio0 GPIO_C5 GPIO_ACTIVE_LOW>;
445                 max-x = <1280>;
446                 max-y = <800>;
447         };
448         
449         ts@01 {
450                 compatible = "ct,ct36x";
451                 reg = <0x01>;
452                 ct-model = <365>;
453                 touch-gpio = <&gpio7 GPIO_A6 IRQ_TYPE_LEVEL_LOW>;
454                 reset-gpio = <&gpio7 GPIO_A5 GPIO_ACTIVE_HIGH>;
455                 max-x = <1280>;
456                 max-y = <800>;
457                 orientation=<1 0 0 1>;
458         };
459 };
460
461 &i2c5 {
462         status = "disable";
463 };
464
465 &fb {
466         rockchip,disp-mode = <DUAL>;
467 };
468
469 &rk_screen {
470          display-timings = <&disp_timings>;
471 };
472
473 /*lcdc1 as PRMRY(LCD),lcdc0 as EXTEND(HDMI)*/
474 &lcdc1 {
475         status = "okay";
476         power_ctr: power_ctr {
477                 rockchip,debug = <0>;
478                 rockchip,mirror = <NO_MIRROR>;
479                 lcd_en:lcd_en {
480                         rockchip,power_type = <GPIO>;
481                         gpios = <&gpio7 GPIO_A3 GPIO_ACTIVE_HIGH>;
482                         rockchip,delay = <10>;
483                 };
484                 
485                 lcd_cs:lcd_cs {
486 rockchip,power_type = <GPIO>;
487                         gpios = <&gpio7 GPIO_A4 GPIO_ACTIVE_HIGH>;
488                         rockchip,delay = <10>;
489                 };
490
491                 /*lcd_rst:lcd_rst {
492                         rockchip,power_type = <GPIO>;
493                         gpios = <&gpio3 GPIO_D6 GPIO_ACTIVE_HIGH>;
494                         rockchip,delay = <5>;
495                 };*/
496
497         };
498 };
499
500 &lcdc0 {
501         status = "okay";
502 };
503
504 &hdmi {
505         status = "okay";
506         rockchips,hdmi_audio_source = <0>;
507 };
508
509 &adc {
510         status = "okay";
511
512         key {
513                 compatible = "rockchip,key";
514                 io-channels = <&adc 1>;
515
516                 vol-up-key {
517                         linux,code = <115>;
518                         label = "volume up";
519                         rockchip,adc_value = <1>;
520                 };
521
522                 vol-down-key {
523                         linux,code = <114>;
524                         label = "volume down";
525                         rockchip,adc_value = <170>;
526                 };
527
528                 power-key {
529                         gpios = <&gpio0 GPIO_A5 GPIO_ACTIVE_LOW>;
530                         linux,code = <116>;
531                         label = "power";
532                         gpio-key,wakeup;
533                 };
534
535                 menu-key {
536                         linux,code = <139>;
537                         label = "menu";
538                         rockchip,adc_value = <355>;
539                 };
540
541                 home-key {
542                         linux,code = <102>;
543                         label = "home";
544                         rockchip,adc_value = <746>;
545                 };
546
547                 back-key {
548                         linux,code = <158>;
549                         label = "back";
550                         rockchip,adc_value = <560>;
551                 };
552
553                 camera-key {
554                         linux,code = <212>;
555                         label = "camera";
556                         rockchip,adc_value = <450>;
557                 };
558         };
559 };
560
561 &pwm0 {
562         status = "okay";
563 };
564
565 &pwm1 {
566         status = "okay";
567 };
568
569
570 &clk_core_dvfs_table {
571         operating-points = <
572                 /* KHz    uV */
573                 312000 1100000
574                 504000 1100000
575                 816000 1100000
576                 1008000 1100000
577                 >;
578 };
579
580 &clk_gpu_dvfs_table {
581         operating-points = <
582                 /* KHz    uV */
583                 200000 1200000
584                 300000 1200000
585                 400000 1200000
586                 600000 1300000
587                 >;
588 };
589
590 &clk_ddr_dvfs_table {
591         operating-points = <
592                 /* KHz    uV */
593                 200000 1200000
594                 300000 1200000
595                 400000 1200000
596                 >;
597
598         freq_table = <
599                 /*status                freq(KHz)*/
600                 SYS_STATUS_NORMAL       400000
601                 SYS_STATUS_SUSPEND      200000
602                 SYS_STATUS_VIDEO        300000
603                 SYS_STATUS_DUALVIEW     500000
604                 >;
605 };
606
607 /include/ "rk808.dtsi"
608 &rk808 {
609         gpios =<&gpio0 GPIO_A4 GPIO_ACTIVE_HIGH>,<&gpio0 GPIO_B3 GPIO_ACTIVE_LOW>;
610         rk808,system-power-controller;
611
612         regulators {
613                 
614                 rk808_dcdc1_reg: regulator@0{
615                         regulator-name= "vdd_arm";
616                         regulator-always-on;
617                         regulator-boot-on;
618                 };
619
620                 rk808_dcdc2_reg: regulator@1 {
621                         regulator-name= "vdd_gpu";
622                         regulator-always-on;
623                         regulator-boot-on;
624                 };
625
626                 rk808_dcdc3_reg: regulator@2 {
627                         regulator-name= "rk_dcdc3";
628                         regulator-min-microvolt = <1200000>;
629                         regulator-max-microvolt = <1200000>;
630                         regulator-always-on;
631                         regulator-boot-on;
632                 };
633
634                 rk808_dcdc4_reg: regulator@3 {
635                         regulator-name= "vccio";
636                         regulator-min-microvolt = <1800000>;
637                         regulator-max-microvolt = <3300000>;
638                         regulator-always-on;
639                         regulator-boot-on;
640                 };
641
642                 rk808_ldo1_reg: regulator@4 {
643                         regulator-name= "rk_ldo1";
644                         regulator-min-microvolt = <3300000>;
645                         regulator-max-microvolt = <3300000>;
646                         regulator-always-on;
647                         regulator-boot-on;
648                 };
649
650                 rk808_ldo2_reg: regulator@5 {
651                         regulator-name= "rk_ldo2";
652                         regulator-min-microvolt = <3300000>;
653                         regulator-max-microvolt = <3300000>;
654                         regulator-always-on;
655                         regulator-boot-on;
656                 };
657
658                 rk808_ldo3_reg: regulator@6 {
659                         regulator-name= "rk_ldo3";
660                         regulator-min-microvolt = <1000000>;
661                         regulator-max-microvolt = <1000000>;
662                         regulator-always-on;
663                         regulator-boot-on;
664                 };
665
666                 rk808_ldo4_reg:regulator@7 {
667                         regulator-name= "rk_ldo4";
668                         regulator-min-microvolt = <1800000>;
669                         regulator-max-microvolt = <1800000>;
670                         regulator-always-on;
671                         regulator-boot-on;
672                 };
673
674                 rk808_ldo5_reg: regulator@8 {
675                         regulator-name= "rk_ldo5";
676                         regulator-min-microvolt = <3300000>;
677                         regulator-max-microvolt = <3300000>;
678                         regulator-always-on;
679                         regulator-boot-on;
680                 };
681
682                 rk808_ldo6_reg: regulator@9 {
683                         regulator-name= "rk_ldo6";
684                         regulator-min-microvolt = <1000000>;
685                         regulator-max-microvolt = <1000000>;
686                         regulator-always-on;
687                         regulator-boot-on;
688                 };
689
690                 rk808_ldo7_reg: regulator@10 {
691                         regulator-name= "rk_ldo7";
692                         regulator-min-microvolt = <1800000>;
693                         regulator-max-microvolt = <1800000>;
694                         regulator-always-on;
695                         regulator-boot-on;
696                 };
697
698                 rk808_ldo8_reg: regulator@11 {
699                         regulator-name= "rk_ldo8";
700                         regulator-min-microvolt = <3300000>;
701                         regulator-max-microvolt = <3300000>;
702                         regulator-always-on;
703                         regulator-boot-on;
704                 };
705         };
706 };