WiFi: add rtl8189es/etv support, Optimization wifi configuration.
[firefly-linux-kernel-4.4.55.git] / arch / arm / boot / dts / rk3288-tb_8846.dts
1 /dts-v1/;
2
3 #include "rk3288.dtsi"
4 //#include "lcd-b101ew05.dtsi"
5 #include "lcd-F402.dtsi"
6 #include "vtl_ts_sdk8846.dtsi"
7
8 / {
9         fiq-debugger {
10                 status = "okay";
11         };
12
13     wireless-wlan {
14         compatible = "wlan-platdata";
15
16         /* wifi_chip_type - wifi chip define
17          * bcmwifi ==> like ap6xxx, rk90x;
18          * rtkwifi ==> like rtl8188xx, rtl8723xx;
19          * esp8089 ==> esp8089;
20          * other   ==> for other wifi;
21          */
22         wifi_chip_type = "bcmwifi";
23
24         sdio_vref = <1800>; //1800mv or 3300mv
25
26         //power_ctrl_by_pmu;
27         power_pmu_regulator = "act_ldo3";
28         power_pmu_enable_level = <1>; //1->HIGH, 0->LOW
29
30         //vref_ctrl_enable;
31         //vref_ctrl_gpio = <&gpio0 GPIO_A2 GPIO_ACTIVE_HIGH>;
32         vref_pmu_regulator = "act_ldo3";
33         vref_pmu_enable_level = <1>; //1->HIGH, 0->LOW
34
35         WIFI,poweren_gpio = <&gpio4 GPIO_D4 GPIO_ACTIVE_HIGH>;
36         WIFI,host_wake_irq = <&gpio4 GPIO_D6 GPIO_ACTIVE_HIGH>;
37         //WIFI,reset_gpio = <&gpio0 GPIO_A2 GPIO_ACTIVE_LOW>;
38
39         status = "okay";
40     };
41
42     wireless-bluetooth {
43         compatible = "bluetooth-platdata";
44
45         //wifi-bt-power-toggle;
46
47         uart_rts_gpios = <&gpio4 GPIO_C3 GPIO_ACTIVE_LOW>;
48         pinctrl-names = "default","rts_gpio";
49         pinctrl-0 = <&uart0_rts>;
50         pinctrl-1 = <&uart0_rts_gpio>;
51
52         BT,power_gpio = <&gpio4 GPIO_D3 GPIO_ACTIVE_HIGH>;
53         BT,reset_gpio = <&gpio4 GPIO_D5 GPIO_ACTIVE_HIGH>;
54         BT,wake_gpio = <&gpio4 GPIO_D2 GPIO_ACTIVE_HIGH>;
55         BT,wake_host_irq = <&gpio4 GPIO_D7 GPIO_ACTIVE_LOW>;
56
57         status = "okay";
58     };
59
60     hallsensor {
61                compatible = "hall_och165t";
62                type = <SENSOR_TYPE_HALL>;
63                irq-gpio = <&gpio0 GPIO_A6 IRQ_TYPE_EDGE_BOTH>;
64      };
65
66         backlight {
67                 compatible = "pwm-backlight";
68                 pwms = <&pwm0 0 25000>;
69                 brightness-levels = <255 254 253 252 251 250 249 248 247 246 245 244 243 242 241 240
70                      239 238 237 236 235 234 233 232 231 230 229 228 227 226 225 224 223 222 221 220
71                      219 218 217 216 215 214 213 212 211 210 209 208 207 206 205 204 203 202 201 200
72                      199 198 197 196 195 194 193 192 191 190 189 188 187 186 185 184 183 182 181 180
73                      179 178 177 176 175 174 173 172 171 170 169 168 167 166 165 164 163 162 161 160
74                      159 158 157 156 155 154 153 152 151 150 149 148 147 146 145 144 143 142 141 140
75                      139 138 137 136 135 134 133 132 131 130 129 128 127 126 125 124 123 122 121 120
76                      119 118 117 116 115 114 113 112 111 110 109 108 107 106 105 104 103 102 101 100
77                      99 98 97 96 95 94 93 92 91 90 89 88 87 86 85 84 83 82 81 80 79 78 77 76 75 74 73 72 71 70
78                      69 68 67 66 65 64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40
79                      39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10
80                      9 8 7 6 5 4 3 2 1 0>;
81                 default-brightness-level = <200>;
82                 enable-gpios = <&gpio7 GPIO_A2 GPIO_ACTIVE_HIGH>;
83         };
84
85         pwm_regulator {
86                 compatible = "rockchip_pwm_regulator";
87                 pwms = <&pwm1 0 2000>;
88                 rockchip,pwm_id= <1>;
89                 rockchip,pwm_voltage_map= <925000 950000 975000 1000000 1025000 1050000 1075000 1100000 1125000 1150000 1175000 1200000 1225000 1250000 1275000 1300000 1325000 1350000 1375000 1400000>;
90                 rockchip,pwm_voltage= <1000000>;
91                 rockchip,pwm_min_voltage= <925000>;
92                 rockchip,pwm_max_voltage= <1400000>;
93                 rockchip,pwm_suspend_voltage= <950000>;
94                 rockchip,pwm_coefficient= <475>;
95                 regulators {
96                         #address-cells = <1>;
97                         #size-cells = <0>;
98                         pwm_reg0: regulator@0 {
99                                 regulator-compatible = "pwm_dcdc1";
100                                 regulator-name= "vdd_logic";
101                                 regulator-min-microvolt = <925000>;
102                                 regulator-max-microvolt = <1400000>;
103                                 regulator-always-on;
104                                 regulator-boot-on;
105                         };
106                 };
107         };
108
109         codec_hdmi_i2s: codec-hdmi-i2s {
110                 compatible = "hdmi-i2s";
111         };
112
113         codec_hdmi_spdif: codec-hdmi-spdif {
114                 compatible = "hdmi-spdif";
115         };
116
117         rockchip-hdmi-i2s {
118                 compatible = "rockchip-hdmi-i2s";
119                 dais {
120                         dai0 {
121                                 audio-codec = <&codec_hdmi_i2s>;
122                                 i2s-controller = <&i2s>;
123                                 format = "i2s";
124                                 //continuous-clock;
125                                 //bitclock-inversion;
126                                 //frame-inversion;
127                                 //bitclock-master;
128                                 //frame-master;
129                         };
130                 };
131         };
132         
133         rockchip-hdmi-spdif {
134                 compatible = "rockchip-hdmi-spdif";
135                 dais {
136                         dai0 {
137                                 audio-codec = <&codec_hdmi_spdif>;
138                                 i2s-controller = <&spdif>;
139                         };
140                 };
141         };
142
143         rockchip-rt5631 {
144                 compatible = "rockchip-rt5631";
145                 dais {
146                         dai0 {
147                                 audio-codec = <&rt5631>;
148                                 i2s-controller = <&i2s>;
149                                 format = "i2s";
150                                 //continuous-clock;
151                                 //bitclock-inversion;
152                                 //frame-inversion;
153                                 //bitclock-master;
154                                 //frame-master;
155                         };
156                 };
157         };
158
159         rockchip-rt3224 {
160                 compatible = "rockchip-rt3261";
161                 dais {
162                         dai0 {
163                                 audio-codec = <&rt3261>;
164                                 i2s-controller = <&i2s>;
165                                 format = "i2s";
166                                 //continuous-clock;
167                                 //bitclock-inversion;
168                                 //frame-inversion;
169                                 //bitclock-master;
170                                 //frame-master;
171                         };
172                         dai1 {
173                                 audio-codec = <&rt3261>;
174                                 i2s-controller = <&i2s>;
175                                 format = "dsp_a";
176                                 //continuous-clock;
177                                 bitclock-inversion;
178                                 //frame-inversion;
179                                 //bitclock-master;
180                                 //frame-master;
181                         };
182                 };
183         };
184
185         usb_control {
186                 compatible = "rockchip,rk3288-usb-control";
187
188                 host_drv_gpio = <&gpio0 GPIO_B6 GPIO_ACTIVE_LOW>;
189                 otg_drv_gpio = <&gpio0 GPIO_B4 GPIO_ACTIVE_LOW>;
190
191                 rockchip,remote_wakeup;
192                 rockchip,usb_irq_wakeup;
193         };
194         chosen {
195                 bootargs = "vmalloc=512M";
196         };
197 };
198
199 &gmac {
200 //      power_ctl_by = "gpio";  //"gpio" "pmu"
201         power-gpio = <&gpio0 GPIO_A6 GPIO_ACTIVE_HIGH>;
202 //      power-pmu = "act_ldo"
203 //      reset-gpio = <&gpio4 GPIO_A7 GPIO_ACTIVE_LOW>;
204         phy-mode = "rgmii";
205         clock_in_out = "input";
206         tx_delay = <0x28>;
207         rx_delay = <0x10>;
208 };
209
210 &pinctrl {
211         //used for init some gpio
212         init-gpios = <&gpio0 GPIO_A6 GPIO_ACTIVE_HIGH
213                         /*&gpio0 GPIO_C2 GPIO_ACTIVE_HIGH */
214                         /*&gpio7 GPIO_B7 GPIO_ACTIVE_LOW */>;
215         
216         gpio0_gpio {
217                         gpio0_c2: gpio0-c2 {
218                                 rockchip,pins = <GPIO0_C2>;
219                                 rockchip,pull = <VALUE_PULL_DOWN>;
220                         };
221
222                         //to add
223                 };
224                 
225         gpio7_gpio {
226                         gpio7_a7: gpio7-a7 {
227                                 rockchip,pins = <GPIO7_A7>;
228                                 rockchip,pull = <VALUE_PULL_DOWN>;
229                         };
230
231                         //to add
232                 };
233                 
234         //could add other pinctrl definition such as gpio
235
236         // gmac drive strength
237         gpio4_gmac {
238                 mac_clk: mac-clk {
239                         rockchip,drive = <VALUE_DRV_12MA>;
240                 };
241
242                 mac_txpins: mac-txpins {
243                         rockchip,drive = <VALUE_DRV_12MA>;
244                 };
245
246                 mac_rxpins: mac-rxpins {
247                         rockchip,drive = <VALUE_DRV_12MA>;
248                 };
249
250                 mac_crs: mac-crs {
251                         rockchip,drive = <VALUE_DRV_12MA>;
252                 };
253
254                 mac_mdpins: mac-mdpins {
255                         rockchip,drive = <VALUE_DRV_12MA>;
256                 };
257         };
258 };
259
260 &nandc0 {
261         status = "disabled"; // used nand set "disabled" ,used emmc set "okay"
262 };
263 &nandc1 {
264         status = "disabled"; // used nand set "disabled" ,used emmc set "okay"
265 };   
266
267 &nandc0reg {
268         status = "okay"; // used nand set "disabled" ,used emmc set "okay"
269 };
270
271 &emmc {
272         clock-frequency = <100000000>;
273         clock-freq-min-max = <400000 100000000>;
274
275         supports-highspeed;
276         supports-emmc;
277         bootpart-no-access;
278
279         //supports-tSD;
280         //supports-DDR_MODE; //you should set the two value in your project. only close in RK3288-SDK board.
281         //caps2-mmc-hs200;
282
283         ignore-pm-notify;
284         keep-power-in-suspend;
285         
286         //poll-hw-reset 
287         status = "okay";
288 };
289     
290 &sdmmc {
291                 clock-frequency = <50000000>;
292                 clock-freq-min-max = <400000 50000000>;
293                 supports-highspeed;
294                 supports-sd;
295                 broken-cd;
296                 card-detect-delay = <200>;
297
298                 ignore-pm-notify;
299                 keep-power-in-suspend;
300         
301                 vmmc-supply = <&ldo1_reg>;
302                 status = "okay";
303 };
304                 
305 &sdio {
306                 clock-frequency = <50000000>;
307                 clock-freq-min-max = <200000 50000000>;
308                 supports-highspeed;
309                 supports-sdio;
310                 ignore-pm-notify;
311                 keep-power-in-suspend;
312                 //cap-sdio-irq;
313                 status = "okay";
314 };
315
316 &spi0 {
317         status = "okay";
318         max-freq = <48000000>;  
319         /*
320         spi_test@00 {
321                 compatible = "rockchip,spi_test_bus0_cs0";
322                 reg = <0>;
323                 spi-max-frequency = <24000000>;
324                 //spi-cpha;
325                 //spi-cpol;
326                 poll_mode = <0>;
327                 type = <0>;
328                 enable_dma = <0>;
329
330         };
331
332         spi_test@01 {
333                 compatible = "rockchip,spi_test_bus0_cs1";
334                 reg = <1>;
335                 spi-max-frequency = <24000000>;
336                 spi-cpha;
337                 spi-cpol;
338                 poll_mode = <0>;
339                 type = <0>;
340                 enable_dma = <0>;               
341         };
342         */
343 };
344
345 &spi1 {
346         status = "okay";
347         max-freq = <48000000>;
348         /*
349         spi_test@10 {
350                 compatible = "rockchip,spi_test_bus1_cs0";
351                 reg = <0>;
352                 spi-max-frequency = <24000000>;
353                 //spi-cpha;
354                 //spi-cpol;
355                 poll_mode = <0>;
356                 type = <0>;
357                 enable_dma = <0>;
358         };
359
360         */
361 };
362
363 &spi2 {
364         status = "okay";
365         max-freq = <48000000>;
366         /*
367         spi_test@20 {
368                 compatible = "rockchip,spi_test_bus2_cs0";
369                 reg = <0>;
370                 spi-max-frequency = <24000000>;
371                 //spi-cpha;
372                 //spi-cpol;
373                 poll_mode = <0>;
374                 type = <0>;
375                 enable_dma = <0>;
376         };
377
378         spi_test@21 {
379                 compatible = "rockchip,spi_test_bus2_cs1";
380                 reg = <1>;
381                 spi-max-frequency = <24000000>;
382                 //spi-cpha;
383                 //spi-cpol;
384                 poll_mode = <0>;
385                 type = <0>;
386                 enable_dma = <0>;
387         };
388         */
389 };
390
391 &uart_bt {
392         status = "okay";
393         dma-names = "!tx", "!rx";
394         pinctrl-0 = <&uart0_xfer &uart0_cts>;
395 };
396
397 &i2c0 {
398         status = "okay";
399         rk808: rk808@1b {
400                 reg = <0x1b>;
401                 status = "okay";
402         };
403         rk818: rk818@1c {
404                 reg = <0x1c>;
405                 status = "okay";
406         };
407                 syr827: syr827@40 {
408                 compatible = "silergy,syr82x";
409         reg = <0x40>;
410                 status = "okay";
411                 regulators {
412                         #address-cells = <1>;
413                         #size-cells = <0>;      
414                         syr827_dc1: regulator@0 {
415                         reg = <0>;
416                         regulator-compatible = "syr82x_dcdc1";
417                         regulator-name = "vdd_arm";
418                         regulator-min-microvolt = <712500>;
419                         regulator-max-microvolt = <1500000>;
420                         regulator-always-on;
421                         regulator-boot-on;
422                         regulator-initial-mode = <0x2>;
423                         regulator-initial-state = <3>;
424                         regulator-state-mem {
425                                 regulator-state-mode = <0x2>;
426                                 regulator-state-disabled;
427                                 regulator-state-uv = <900000>;
428                         };
429                 };
430            };
431         };
432         syr828: syr828@41 {
433                 compatible = "silergy,syr82x";
434                 reg = <0x41>;
435                 status = "okay";
436                 regulators {
437                         #address-cells = <1>;
438                         #size-cells = <0>;      
439                         syr828_dc1: regulator@0 {
440                         reg = <0>;
441                         regulator-compatible = "syr82x_dcdc1";
442                         regulator-name = "vdd_gpu";
443                         regulator-min-microvolt = <712500>;
444                         regulator-max-microvolt = <1500000>;
445                         regulator-always-on;
446                 regulator-boot-on;
447                         regulator-initial-mode = <0x2>;
448                         regulator-initial-state = <3>;
449                         regulator-state-mem {
450                                 regulator-state-mode = <0x2>;
451                                 regulator-state-enabled;
452                                 regulator-state-uv = <900000>;
453                         };      
454                 };
455            };
456         };
457         act8846: act8846@5a {
458                 reg = <0x5a>;
459                 status = "okay";
460         };
461
462         ricoh619: ricoh619@32 {
463                 reg = <0x32>;
464                 status = "okay";
465         };
466         bq24296: bq24296@6b {
467                 compatible = "ti,bq24296";
468                 reg = <0x6b>;
469                 gpios = <&gpio0 GPIO_A7 GPIO_ACTIVE_HIGH>,<&gpio0 GPIO_B0 GPIO_ACTIVE_HIGH>;
470                 bq24296,chg_current = <1000 2000 3000>;
471                 status = "okay";
472         };
473         
474         bq27320: bq27320@55 {
475                 compatible = "ti,bq27320";
476                 reg = <0x55>;
477         /*   gpios = <&gpio0 GPIO_A7 GPIO_ACTIVE_HIGH>; */
478                 status = "okay";
479         };
480
481         CW2015@62 {
482                 compatible = "cw201x";
483                 reg = <0x62>;
484                 dc_det_gpio = <&gpio0 GPIO_B0 GPIO_ACTIVE_LOW>;
485                 bat_low_gpio = <&gpio0 GPIO_A7 GPIO_ACTIVE_LOW>;
486                 chg_ok_gpio = <&gpio0 GPIO_B1 GPIO_ACTIVE_HIGH>;
487                 bat_config_info = <0x15 0x42 0x60 0x59 0x52 0x58 0x4D 0x48 0x48 0x44 0x44 0x46 0x49 0x48 0x32
488                         0x24 0x20 0x17 0x13 0x0F 0x19 0x3E 0x51 0x45 0x08 0x76 0x0B 0x85 0x0E 0x1C 0x2E 0x3E 0x4D 0x52 0x52
489                         0x57 0x3D 0x1B 0x6A 0x2D 0x25 0x43 0x52 0x87 0x8F 0x91 0x94 0x52 0x82 0x8C 0x92 0x96 0xFF 0x7B 0xBB
490                         0xCB 0x2F 0x7D 0x72 0xA5 0xB5 0xC1 0x46 0xAE>;
491                 is_dc_charge = <1>;
492                 is_usb_charge = <0>;
493         };
494         
495         rtc@51 {
496                 compatible = "rtc,hym8563";
497                 reg = <0x51>;
498                 irq_gpio = <&gpio0 GPIO_A4 IRQ_TYPE_EDGE_FALLING>;
499         };
500
501 };
502
503 &i2c1 {
504         status = "okay";
505                 
506         mpu6050:mpu@68{
507                 compatible = "mpu6050";
508                 reg = <0x68>;
509                 mpu-int_config = <0x10>;
510                 mpu-level_shifter = <0>;
511                 mpu-orientation = <0 1 0 1 0 0 0 0 1>;  
512                 orientation-x= <0>;
513                 orientation-y= <1>;
514                 orientation-z= <1>;
515                 irq-gpio = <&gpio8 GPIO_A0 IRQ_TYPE_LEVEL_LOW>;                 
516                 mpu-debug = <0>;
517         };
518         
519
520         ak8963:compass@0d{
521                 compatible = "mpu_ak8963";
522                 reg = <0x0d>;
523                 compass-bus = <0>;
524                 compass-adapt_num = <0>;
525                 compass-orientation = <1 0 0 0 1 0 0 0 1>;
526                 orientation-x= <0>;
527                 orientation-y= <0>;
528                 orientation-z= <1>;     
529                 compass-debug = <1>;
530                 status = "okay";
531         };      
532
533 };
534
535 &i2c2 {
536         status = "okay";
537         rt5631: rt5631@1a {
538                 compatible = "rt5631";
539                 reg = <0x1a>;
540         };
541         es8323: es8323@10 {
542                 compatible = "es8323";
543                 reg = <0x10>;
544         };
545         rt3261: rt3261@1c {
546                 compatible = "rt3261";
547                 reg = <0x1c>;
548         //      codec-en-gpio = <0>;//sdk default high level
549                 spk-num= <2>;
550                 modem-input-mode = <1>;
551                 lout-to-modem_mode = <1>;
552                 spk-amplify = <2>;
553                 playback-if1-data_control = <0>;
554                 playback-if2-data_control = <0>;
555         };
556         rt5616: rt5616@1b {
557                 compatible = "rt5616";
558                 reg = <0x1b>;
559         };
560 };
561
562 &i2c3 {
563         status = "okay";
564 };
565
566 &i2c4 {
567         status = "okay";
568         ts@55 {
569                 compatible = "goodix,gt8xx";
570                 reg = <0x55>;
571                 touch-gpio = <&gpio7 GPIO_A6 IRQ_TYPE_LEVEL_LOW>;
572                 reset-gpio = <&gpio7 GPIO_A5 GPIO_ACTIVE_LOW>;
573                 //power-gpio = <&gpio0 GPIO_C5 GPIO_ACTIVE_LOW>;
574                 max-x = <1280>;
575                 max-y = <800>;
576         };
577         
578         ts@01 {
579                 compatible = "ct,vtl_ts";
580                 reg = <0x01>;
581                 screen_max_x = <1536>;
582                 screen_max_y = <2048>;
583                 xy_swap = <1>;
584                 x_reverse = <0>;
585                 y_reverse = <0>;
586                 x_mul = <2>;
587                 y_mul = <2>;
588                 bin_ver = <0>;
589                 irq_gpio_number = <&gpio7 GPIO_A6 IRQ_TYPE_LEVEL_LOW>;
590                 rst_gpio_number = <&gpio7 GPIO_A5 GPIO_ACTIVE_HIGH>;
591         };
592 };
593
594 &i2c5 {
595         status = "disable";
596 };
597
598 &fb {
599         rockchip,disp-mode = <DUAL>;
600         rockchip,uboot-logo-on = <1>;
601 };
602
603 &rk_screen {
604          display-timings = <&disp_timings>;
605 };
606
607 /*lcdc0 as PRMRY(LCD),lcdc1 as EXTEND(HDMI)*/
608 &lcdc0 {
609         status = "okay";
610         rockchip,mirror = <NO_MIRROR>;
611         rockchip,cabc_mode = <0>;
612         power_ctr: power_ctr {
613                 rockchip,debug = <0>;
614                 lcd_en:lcd_en {
615                         rockchip,power_type = <GPIO>;
616                         gpios = <&gpio7 GPIO_A3 GPIO_ACTIVE_HIGH>;
617                         rockchip,delay = <10>;
618                 };
619                 
620                 lcd_cs:lcd_cs {
621                         rockchip,power_type = <GPIO>;
622                         gpios = <&gpio7 GPIO_A4 GPIO_ACTIVE_HIGH>;
623                         rockchip,delay = <10>;
624                 };
625
626                 /*lcd_rst:lcd_rst {
627                         rockchip,power_type = <GPIO>;
628                         gpios = <&gpio3 GPIO_D6 GPIO_ACTIVE_HIGH>;
629                         rockchip,delay = <5>;
630                 };*/
631
632         };
633 };
634
635 &lcdc1 {
636         status = "okay";
637         rockchip,mirror = <ROTATE_270>;
638
639 };
640
641 &hdmi {
642         status = "okay";
643         rockchips,hdmi_audio_source = <0>;
644 };
645
646 &adc {
647         status = "okay";
648
649         rockchip_headset {
650                 compatible = "rockchip_headset";
651                 headset_gpio = <&gpio7 GPIO_A7 GPIO_ACTIVE_LOW>;
652                 pinctrl-names = "default";
653                 pinctrl-0 = <&gpio7_a7>;
654                 io-channels = <&adc 2>; 
655        /*
656                hook_gpio = ;
657                hook_down_type = ; //interrupt hook key down status 
658                 */       
659        };
660
661         key {
662                 compatible = "rockchip,key";
663                 io-channels = <&adc 1>;
664
665                 vol-up-key {
666                         linux,code = <115>;
667                         label = "volume up";
668                         rockchip,adc_value = <1>;
669                 };
670
671                 vol-down-key {
672                         linux,code = <114>;
673                         label = "volume down";
674                         rockchip,adc_value = <170>;
675                 };
676                 
677                 power-key {
678                         gpios = <&gpio0 GPIO_A5 GPIO_ACTIVE_LOW>;
679                         linux,code = <116>;
680                         label = "power";
681                         gpio-key,wakeup;
682                 };
683
684                 menu-key {
685                         linux,code = <59>;
686                         label = "menu";
687                         rockchip,adc_value = <355>;
688                 };
689
690                 home-key {
691                         linux,code = <102>;
692                         label = "home";
693                         rockchip,adc_value = <746>;
694                 };
695
696                 back-key {
697                         linux,code = <158>;
698                         label = "back";
699                         rockchip,adc_value = <560>;
700                 };
701
702                 camera-key {
703                         linux,code = <212>;
704                         label = "camera";
705                         rockchip,adc_value = <450>;
706                 };
707         };
708 };
709
710 &pwm0 {
711         status = "okay";
712 };
713
714 &pwm1 {
715         status = "okay";
716 };
717
718
719 &clk_core_dvfs_table {
720         operating-points = <
721                 /* KHz    uV */
722                 126000 900000
723                 216000 900000
724                 312000 900000
725                 408000 900000
726                 600000 900000
727                 696000 950000
728                 816000 1000000
729                 1008000 1050000
730                 1200000 1100000
731                 1416000 1200000
732                 1512000 1300000
733                 1608000 1350000
734         //      1704000 1350000
735         //      1800000 1400000
736                 >;
737         status="okay";
738 };
739
740 &clk_gpu_dvfs_table {
741         operating-points = <
742                 /* KHz    uV */
743                 100000 900000
744                 200000 900000
745                 300000 950000
746                 420000 1050000
747                 500000 1150000
748                 >;
749         status="okay";
750 };
751
752 &clk_ddr_dvfs_table {
753         operating-points = <
754                 /* KHz    uV */
755                 200000 1050000
756                 300000 1050000
757                 400000 1100000
758                 533000 1150000
759                 >;
760
761         freq-table = <
762                 /*status                freq(KHz)*/
763                 SYS_STATUS_NORMAL       400000
764                 SYS_STATUS_SUSPEND      200000
765                 SYS_STATUS_VIDEO_1080P  240000
766                 SYS_STATUS_VIDEO_4K     400000
767                 SYS_STATUS_PERFORMANCE  528000
768                 SYS_STATUS_DUALVIEW     400000
769                 SYS_STATUS_BOOST        324000
770                 SYS_STATUS_ISP          400000
771                 >;
772         auto-freq-table = <
773                 240000
774                 324000
775                 396000
776                 528000
777                 >;
778         auto-freq=<1>;
779         status="okay";
780 };
781 /include/ "act8846.dtsi"
782 &act8846 {
783         gpios =<&gpio7 GPIO_A1 GPIO_ACTIVE_LOW>,<&gpio0 GPIO_B2 GPIO_ACTIVE_HIGH>;
784         act8846,system-power-controller;
785
786         regulators {
787                 
788                 dcdc1_reg: regulator@0{
789                         regulator-name= "act_dcdc1";
790                         regulator-min-microvolt = <1200000>;
791                         regulator-max-microvolt = <1200000>;
792                         regulator-always-on;
793                         regulator-boot-on;
794                 };
795
796                 dcdc2_reg: regulator@1 {
797                         regulator-name= "vccio";
798                         regulator-min-microvolt = <3300000>;
799                         regulator-max-microvolt = <3300000>;
800                         regulator-initial-state = <3>;
801                         regulator-state-mem {
802                                 regulator-state-enabled;
803                                 regulator-state-uv = <3300000>;
804                         };              
805                 };
806
807                 dcdc3_reg: regulator@2 {
808                         regulator-name= "vdd_logic";
809                         regulator-min-microvolt = <700000>;
810                         regulator-max-microvolt = <1500000>;
811                         regulator-initial-state = <3>;
812                         regulator-state-mem {
813                                 regulator-state-enabled;
814                                 regulator-state-uv = <1000000>;
815                         };              
816                 
817                 };
818
819                 dcdc4_reg: regulator@3 {
820                         regulator-name= "act_dcdc4";
821                         regulator-min-microvolt = <2000000>;
822                         regulator-max-microvolt = <2000000>;
823                                 regulator-initial-state = <3>;
824                         regulator-state-mem {
825                                 regulator-state-enabled;
826                                 regulator-state-uv = <2000000>;
827                         };
828                 };
829
830                 ldo1_reg: regulator@4 {
831                         regulator-name= "vccio_sd";
832                         regulator-min-microvolt = <1800000>;
833                         regulator-max-microvolt = <3300000>;
834                         
835                 };
836
837                 ldo2_reg: regulator@5 {
838                         regulator-name= "act_ldo2";
839                         regulator-min-microvolt = <1000000>;
840                         regulator-max-microvolt = <1000000>;
841                 
842                 };
843
844                 ldo3_reg: regulator@6 {
845                         regulator-name= "act_ldo3";
846                         regulator-min-microvolt = <3300000>;
847                         regulator-max-microvolt = <3300000>;
848                         
849                 };
850
851                 ldo4_reg:regulator@7 {
852                         regulator-name= "act_ldo4";
853                         regulator-min-microvolt = <3300000>;
854                         regulator-max-microvolt = <3300000>;
855                 
856                 };
857
858                 ldo5_reg: regulator@8 {
859                         regulator-name= "act_ldo5";
860                         regulator-min-microvolt = <3300000>;
861                         regulator-max-microvolt = <3300000>;
862                 
863                 };
864
865                 ldo6_reg: regulator@9 {
866                         regulator-name= "act_ldo6";
867                         regulator-min-microvolt = <1000000>;
868                         regulator-max-microvolt = <1000000>;
869                         regulator-initial-state = <3>;
870                         regulator-state-mem {
871                                 regulator-state-enabled;
872                         };
873                         
874                 };
875
876                 ldo7_reg: regulator@10 {
877                         regulator-name= "vcc_18";
878                         regulator-min-microvolt = <1800000>;
879                         regulator-max-microvolt = <1800000>;
880                         regulator-initial-state = <3>;
881                         regulator-state-mem {
882                                 regulator-state-enabled;
883                         };
884                 
885                 };
886
887                 ldo8_reg: regulator@11 {
888                         regulator-name= "act_ldo8";
889                         regulator-min-microvolt = <1800000>;
890                         regulator-max-microvolt = <1800000>;
891                 
892                 };
893         };
894 };
895
896
897 /include/ "rk808.dtsi"
898 &rk808 {
899         gpios =<&gpio0 GPIO_A4 GPIO_ACTIVE_HIGH>,<&gpio0 GPIO_B3 GPIO_ACTIVE_LOW>;
900         rk808,system-power-controller;
901
902         regulators {
903                 
904                 rk808_dcdc1_reg: regulator@0{
905                         regulator-name= "vdd_arm";
906                         regulator-always-on;
907                         regulator-boot-on;
908                 };
909
910                 rk808_dcdc2_reg: regulator@1 {
911                         regulator-name= "vdd_gpu";
912                         regulator-always-on;
913                         regulator-boot-on;
914                 };
915
916                 rk808_dcdc3_reg: regulator@2 {
917                         regulator-name= "rk_dcdc3";
918                         regulator-min-microvolt = <1200000>;
919                         regulator-max-microvolt = <1200000>;
920                         regulator-always-on;
921                         regulator-boot-on;
922                 };
923
924                 rk808_dcdc4_reg: regulator@3 {
925                         regulator-name= "vccio";
926                         regulator-min-microvolt = <1800000>;
927                         regulator-max-microvolt = <3300000>;
928                         regulator-always-on;
929                         regulator-boot-on;
930                 };
931
932                 rk808_ldo1_reg: regulator@4 {
933                         regulator-name= "rk_ldo1";
934                         regulator-min-microvolt = <3300000>;
935                         regulator-max-microvolt = <3300000>;
936                         regulator-always-on;
937                         regulator-boot-on;
938                 };
939
940                 rk808_ldo2_reg: regulator@5 {
941                         regulator-name= "rk_ldo2";
942                         regulator-min-microvolt = <3300000>;
943                         regulator-max-microvolt = <3300000>;
944                         regulator-always-on;
945                         regulator-boot-on;
946                 };
947
948                 rk808_ldo3_reg: regulator@6 {
949                         regulator-name= "rk_ldo3";
950                         regulator-min-microvolt = <1000000>;
951                         regulator-max-microvolt = <1000000>;
952                         regulator-always-on;
953                         regulator-boot-on;
954                 };
955
956                 rk808_ldo4_reg:regulator@7 {
957                         regulator-name= "rk_ldo4";
958                         regulator-min-microvolt = <1800000>;
959                         regulator-max-microvolt = <1800000>;
960                         regulator-always-on;
961                         regulator-boot-on;
962                 };
963
964                 rk808_ldo5_reg: regulator@8 {
965                         regulator-name= "vcc_sd";
966                         regulator-min-microvolt = <1800000>;
967                         regulator-max-microvolt = <3300000>;
968                         regulator-always-on;
969                         regulator-boot-on;
970                 };
971
972                 rk808_ldo6_reg: regulator@9 {
973                         regulator-name= "rk_ldo6";
974                         regulator-min-microvolt = <1000000>;
975                         regulator-max-microvolt = <1000000>;
976                         regulator-always-on;
977                         regulator-boot-on;
978                 };
979
980                 rk808_ldo7_reg: regulator@10 {
981                         regulator-name= "rk_ldo7";
982                         regulator-min-microvolt = <1800000>;
983                         regulator-max-microvolt = <1800000>;
984                         regulator-always-on;
985                         regulator-boot-on;
986                 };
987
988                 rk808_ldo8_reg: regulator@11 {
989                         regulator-name= "rk_ldo8";
990                         regulator-min-microvolt = <3300000>;
991                         regulator-max-microvolt = <3300000>;
992                         regulator-always-on;
993                         regulator-boot-on;
994                 };
995
996                 rk808_ldo9_reg: regulator@12 {
997                         regulator-name= "rk_ldo9";
998                         regulator-always-on;
999                         regulator-boot-on;
1000                 };
1001
1002                 rk808_ldo10_reg: regulator@13 {
1003                         regulator-name= "rk_ldo10";
1004                         regulator-always-on;
1005                         regulator-boot-on;
1006                 };
1007         };
1008 };
1009
1010 &lcdc_vdd_domain {
1011         regulator-name = "vcc30_lcd";
1012         };
1013 &dpio_vdd_domain{
1014         regulator-name = "vcc18_cif";   
1015         };
1016 &flash0_vdd_domain{
1017         regulator-name = "vcc_flash";   
1018         };
1019 &flash1_vdd_domain{
1020         regulator-name = "vcc_flash";                   
1021         };
1022 &apio3_vdd_domain{
1023         regulator-name = "vccio_wl";            
1024         };
1025 &apio5_vdd_domain{
1026         regulator-name = "vccio";               
1027         };
1028 &apio4_vdd_domain{
1029         regulator-name = "vccio";               
1030         };
1031 &apio1_vdd_domain{
1032         regulator-name = "vccio";                       
1033         };
1034 &apio2_vdd_domain{
1035         regulator-name = "vccio";               
1036         };
1037 &sdmmc0_vdd_domain{
1038         regulator-name = "vcc_sd";                      
1039         };
1040
1041 &ion_cma {
1042        reg = <0x40000000 0x28000000>; /* 640MB */
1043 };
1044
1045 &dwc_control_usb {
1046         usb_uart {
1047                 status = "disabled";
1048         };
1049 };