tp: vtl new driver
[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         //wifi-bt-power-toggle;
32
33         uart_rts_gpios = <&gpio4 GPIO_C3 GPIO_ACTIVE_LOW>;
34         pinctrl-names = "default","rts_gpio";
35         pinctrl-0 = <&uart0_rts>;
36         pinctrl-1 = <&uart0_rts_gpio>;
37
38         BT,power_gpio = <&gpio4 GPIO_D3 GPIO_ACTIVE_HIGH>;
39         BT,reset_gpio = <&gpio4 GPIO_D5 GPIO_ACTIVE_HIGH>;
40         BT,wake_gpio = <&gpio4 GPIO_D2 GPIO_ACTIVE_HIGH>;
41         BT,wake_host_irq = <&gpio4 GPIO_D7 GPIO_ACTIVE_LOW>;
42
43         status = "okay";
44     };
45
46     hallsensor {
47                compatible = "hall_och165t";
48                type = <SENSOR_TYPE_HALL>;
49                irq-gpio = <&gpio0 GPIO_A6 IRQ_TYPE_EDGE_BOTH>;
50      };
51
52         backlight {
53                 compatible = "pwm-backlight";
54                 pwms = <&pwm0 0 25000>;
55                 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>;
56                 default-brightness-level = <128>;
57                 enable-gpios = <&gpio7 GPIO_A2 GPIO_ACTIVE_HIGH>;
58         };
59
60         pwm_regulator {
61                 compatible = "rockchip_pwm_regulator";
62                 pwms = <&pwm1 0 2000>;
63                 rockchip,pwm_id= <1>;
64                 rockchip,pwm_voltage_map= <925000 950000 975000 1000000 1025000 1050000 1075000 1100000 1125000 1150000 1175000 1200000 1225000 1250000 1275000 1300000 1325000 1350000 1375000 1400000>;
65                 rockchip,pwm_voltage= <1000000>;
66                 rockchip,pwm_min_voltage= <925000>;
67                 rockchip,pwm_max_voltage= <1400000>;
68                 rockchip,pwm_suspend_voltage= <950000>;
69                 rockchip,pwm_coefficient= <475>;
70                 regulators {
71                         #address-cells = <1>;
72                         #size-cells = <0>;
73                         pwm_reg0: regulator@0 {
74                                 regulator-compatible = "pwm_dcdc1";
75                                 regulator-name= "vdd_logic";
76                                 regulator-min-microvolt = <925000>;
77                                 regulator-max-microvolt = <1400000>;
78                                 regulator-always-on;
79                                 regulator-boot-on;
80                         };
81                 };
82         };
83
84         codec_hdmi_i2s: codec-hdmi-i2s {
85                 compatible = "hdmi-i2s";
86         };
87
88         codec_hdmi_spdif: codec-hdmi-spdif {
89                 compatible = "hdmi-spdif";
90         };
91
92         rockchip-hdmi-i2s {
93                 compatible = "rockchip-hdmi-i2s";
94                 dais {
95                         dai0 {
96                                 audio-codec = <&codec_hdmi_i2s>;
97                                 i2s-controller = <&i2s>;
98                                 format = "i2s";
99                                 //continuous-clock;
100                                 //bitclock-inversion;
101                                 //frame-inversion;
102                                 //bitclock-master;
103                                 //frame-master;
104                         };
105                 };
106         };
107         
108         rockchip-hdmi-spdif {
109                 compatible = "rockchip-hdmi-spdif";
110                 dais {
111                         dai0 {
112                                 audio-codec = <&codec_hdmi_spdif>;
113                                 i2s-controller = <&spdif>;
114                         };
115                 };
116         };
117
118         rockchip-rt5631 {
119                 compatible = "rockchip-rt5631";
120                 dais {
121                         dai0 {
122                                 audio-codec = <&rt5631>;
123                                 i2s-controller = <&i2s>;
124                                 format = "i2s";
125                                 //continuous-clock;
126                                 //bitclock-inversion;
127                                 //frame-inversion;
128                                 //bitclock-master;
129                                 //frame-master;
130                         };
131                 };
132         };
133
134         rockchip-rt3224 {
135                 compatible = "rockchip-rt3261";
136                 dais {
137                         dai0 {
138                                 audio-codec = <&rt3261>;
139                                 i2s-controller = <&i2s>;
140                                 format = "i2s";
141                                 //continuous-clock;
142                                 //bitclock-inversion;
143                                 //frame-inversion;
144                                 //bitclock-master;
145                                 //frame-master;
146                         };
147                         dai1 {
148                                 audio-codec = <&rt3261>;
149                                 i2s-controller = <&i2s>;
150                                 format = "dsp_a";
151                                 //continuous-clock;
152                                 bitclock-inversion;
153                                 //frame-inversion;
154                                 //bitclock-master;
155                                 //frame-master;
156                         };
157                 };
158         };
159
160         usb_control {
161                 compatible = "rockchip,rk3288-usb-control";
162
163                 host_drv_gpio = <&gpio0 GPIO_B6 GPIO_ACTIVE_LOW>;
164                 otg_drv_gpio = <&gpio0 GPIO_B4 GPIO_ACTIVE_LOW>;
165
166                 rockchip,remote_wakeup;
167                 rockchip,usb_irq_wakeup;
168         };
169 };
170
171 &gmac {
172 //      power_ctl_by = "gpio";  //"gpio" "pmu"
173         power-gpio = <&gpio0 GPIO_A6 GPIO_ACTIVE_HIGH>;
174 //      power-pmu = "act_ldo"
175         reset-gpio = <&gpio4 GPIO_A7 GPIO_ACTIVE_LOW>;
176 };
177
178 &pinctrl {
179         //used for init some gpio
180         init-gpios = <&gpio0 GPIO_A6 GPIO_ACTIVE_HIGH
181                         /*&gpio0 GPIO_C2 GPIO_ACTIVE_HIGH */
182                         /*&gpio7 GPIO_B7 GPIO_ACTIVE_LOW */>;
183         
184         gpio0_gpio {
185                         gpio0_c2: gpio0-c2 {
186                                 rockchip,pins = <GPIO0_C2>;
187                                 rockchip,pull = <VALUE_PULL_DOWN>;
188                         };
189
190                         //to add
191                 };
192                 
193         gpio7_gpio {
194                         gpio7_b7: gpio7-b7 {
195                                 rockchip,pins = <GPIO7_B7>;
196                                 rockchip,pull = <VALUE_PULL_UP>;
197                         };
198
199                         //to add
200                 };
201                 
202         //could add other pinctrl definition such as gpio
203
204 };
205
206 &emmc {
207                 clock-frequency = <200000000>;
208                 clock-freq-min-max = <400000 200000000>;
209         supports-highspeed;
210                 supports-emmc;
211                 bootpart-no-access;
212         ignore-pm-notify;
213                 keep-power-in-suspend;
214         status = "okay";
215 };
216     
217 &sdmmc {
218                 clock-frequency = <50000000>;
219                 lock-freq-min-max = <400000 50000000>;
220                 supports-highspeed;
221                 supports-sd;
222                 broken-cd;
223                 card-detect-delay = <200>;
224                 vmmc-supply = <&rk808_ldo5_reg>;
225                 status = "okay";
226 };
227                 
228 &sdio {
229                 clock-frequency = <50000000>;
230                 clock-freq-min-max = <200000 50000000>;
231                 supports-highspeed;
232                 supports-sdio;
233                 ignore-pm-notify;
234                 keep-power-in-suspend;
235                 //cap-sdio-irq;
236                 status = "okay";
237 };
238
239 &spi0 {
240         status = "okay";
241         max-freq = <48000000>;  
242         /*
243         spi_test@00 {
244                 compatible = "rockchip,spi_test_bus0_cs0";
245                 reg = <0>;
246                 spi-max-frequency = <24000000>;
247                 //spi-cpha;
248                 //spi-cpol;
249                 poll_mode = <0>;
250                 type = <0>;
251                 enable_dma = <0>;
252
253         };
254
255         spi_test@01 {
256                 compatible = "rockchip,spi_test_bus0_cs1";
257                 reg = <1>;
258                 spi-max-frequency = <24000000>;
259                 spi-cpha;
260                 spi-cpol;
261                 poll_mode = <0>;
262                 type = <0>;
263                 enable_dma = <0>;               
264         };
265         */
266 };
267
268 &spi1 {
269         status = "okay";
270         max-freq = <48000000>;
271         /*
272         spi_test@10 {
273                 compatible = "rockchip,spi_test_bus1_cs0";
274                 reg = <0>;
275                 spi-max-frequency = <24000000>;
276                 //spi-cpha;
277                 //spi-cpol;
278                 poll_mode = <0>;
279                 type = <0>;
280                 enable_dma = <0>;
281         };
282
283         */
284 };
285
286 &spi2 {
287         status = "okay";
288         max-freq = <48000000>;
289         /*
290         spi_test@20 {
291                 compatible = "rockchip,spi_test_bus2_cs0";
292                 reg = <0>;
293                 spi-max-frequency = <24000000>;
294                 //spi-cpha;
295                 //spi-cpol;
296                 poll_mode = <0>;
297                 type = <0>;
298                 enable_dma = <0>;
299         };
300
301         spi_test@21 {
302                 compatible = "rockchip,spi_test_bus2_cs1";
303                 reg = <1>;
304                 spi-max-frequency = <24000000>;
305                 //spi-cpha;
306                 //spi-cpol;
307                 poll_mode = <0>;
308                 type = <0>;
309                 enable_dma = <0>;
310         };
311         */
312 };
313
314 &uart_bt {
315         status = "okay";
316         dma-names = "!tx", "!rx";
317         pinctrl-0 = <&uart0_xfer &uart0_cts>;
318 };
319
320 &i2c0 {
321         status = "okay";
322         rk808: rk808@1b {
323                 reg = <0x1b>;
324                 status = "okay";
325         };
326         rk818: rk818@1c {
327                 reg = <0x1c>;
328                 status = "okay";
329         };
330                 syb827b: syb827b@40 {
331                 compatible = "silergy,syb827";
332         reg = <0x40>;
333                 status = "okay";
334                 regulators {
335                         #address-cells = <1>;
336                         #size-cells = <0>;      
337                         syb827b_dc1: regulator@0 {
338                         reg = <0>;
339                         regulator-compatible = "syb827_dcdc1";
340                         regulator-name = "vdd_arm";
341                         regulator-min-microvolt = <712500>;
342                         regulator-max-microvolt = <1500000>;
343                         regulator-always-on;
344                         regulator-boot-on;
345                         regulator-initial-mode = <0x2>;
346                         regulator-initial-state = <3>;
347                         regulator-state-mem {
348                                 regulator-state-mode = <0x2>;
349                                 regulator-state-disabled;
350                                 regulator-state-uv = <900000>;
351                         };
352                 };
353            };
354         };
355         syb827c: syb827c@41 {
356                 compatible = "silergy,syb827";
357                 reg = <0x41>;
358                 status = "okay";
359                 regulators {
360                         #address-cells = <1>;
361                         #size-cells = <0>;      
362                         syb827c_dc1: regulator@0 {
363                         reg = <0>;
364                         regulator-compatible = "syb827_dcdc1";
365                         regulator-name = "vdd_gpu";
366                         regulator-min-microvolt = <712500>;
367                         regulator-max-microvolt = <1500000>;
368                         regulator-always-on;
369                 regulator-boot-on;
370                         regulator-initial-mode = <0x2>;
371                         regulator-initial-state = <3>;
372                         regulator-state-mem {
373                                 regulator-state-mode = <0x2>;
374                                 regulator-state-enabled;
375                                 regulator-state-uv = <900000>;
376                         };      
377                 };
378            };
379         };
380
381         ricoh619: ricoh619@32 {
382                 reg = <0x32>;
383                 status = "okay";
384         };
385         bq24296: bq24296@6b {
386                 compatible = "ti,bq24296";
387                 reg = <0x6b>;
388                 gpios = <&gpio0 GPIO_A7 GPIO_ACTIVE_HIGH>,<&gpio0 GPIO_B0 GPIO_ACTIVE_HIGH>;
389                 bq24296,chg_current = <1000 2000 3000>;
390                 status = "okay";
391         };
392         
393         bq27320: bq27320@55 {
394                 compatible = "ti,bq27320";
395                 reg = <0x55>;
396         /*   gpios = <&gpio0 GPIO_A7 GPIO_ACTIVE_HIGH>; */
397                 status = "okay";
398         };
399
400         CW2015@62 {
401                 compatible = "cw201x";
402                 reg = <0x62>;
403                 dc_det_gpio = <&gpio0 GPIO_B0 GPIO_ACTIVE_LOW>;
404                 bat_low_gpio = <&gpio0 GPIO_A7 GPIO_ACTIVE_LOW>;
405                 chg_ok_gpio = <&gpio0 GPIO_B1 GPIO_ACTIVE_HIGH>;
406                 bat_config_info = <0x15 0x42 0x60 0x59 0x52 0x58 0x4D 0x48 0x48 0x44 0x44 0x46 0x49 0x48 0x32
407                         0x24 0x20 0x17 0x13 0x0F 0x19 0x3E 0x51 0x45 0x08 0x76 0x0B 0x85 0x0E 0x1C 0x2E 0x3E 0x4D 0x52 0x52
408                         0x57 0x3D 0x1B 0x6A 0x2D 0x25 0x43 0x52 0x87 0x8F 0x91 0x94 0x52 0x82 0x8C 0x92 0x96 0xFF 0x7B 0xBB
409                         0xCB 0x2F 0x7D 0x72 0xA5 0xB5 0xC1 0x46 0xAE>;
410                 is_dc_charge = <1>;
411                 is_usb_charge = <0>;
412         };
413 };
414
415 &i2c1 {
416         status = "okay";
417         rtc@51 {
418                 compatible = "nxp,pcf8563";
419                 reg = <0x51>;
420         };
421         
422         sensor@1d {
423                 compatible = "gs_mma8452";
424                 reg = <0x1d>;
425                 type = <SENSOR_TYPE_ACCEL>;
426                 irq-gpio = <&gpio8 GPIO_A0 IRQ_TYPE_EDGE_FALLING>;
427                 irq_enable = <1>;
428                 poll_delay_ms = <30>;
429                 layout = <1>;
430         };
431                 sensor@19 {
432                 compatible = "gs_lis3dh";
433                 reg = <0x19>;
434                 type = <SENSOR_TYPE_ACCEL>;
435                 irq-gpio = <&gpio0 GPIO_A0 IRQ_TYPE_LEVEL_LOW>;
436                 irq_enable = <1>;
437                 poll_delay_ms = <30>;
438                 layout = <1>;
439         };
440                 sensor@0d {
441                 compatible = "ak8963";
442                 reg = <0x0d>;
443                 type = <SENSOR_TYPE_COMPASS>;
444                 irq-gpio = <&gpio8 GPIO_A2 IRQ_TYPE_EDGE_RISING>;
445                 irq_enable = <1>;
446                 poll_delay_ms = <30>;
447                 layout = <1>;
448         };
449
450                 sensor@6b {
451                 compatible = "l3g20d_gyro";
452                 reg = <0x6b>;
453                 type = <SENSOR_TYPE_GYROSCOPE>;
454                 irq-gpio = <&gpio8 GPIO_A3 IRQ_TYPE_LEVEL_LOW>;
455                 irq_enable = <1>;
456                 poll_delay_ms = <30>;
457                 layout = <1>;
458         };
459         sensor@10 {
460               compatible = "ls_cm3218";
461               reg = <0x10>;
462               type = <SENSOR_TYPE_LIGHT>;
463               irq-gpio = <&gpio8 GPIO_A3 IRQ_TYPE_EDGE_FALLING>;              
464               irq_enable = <1>;
465               poll_delay_ms = <30>;
466               layout = <1>;
467        };
468         
469 };
470
471 &i2c2 {
472         status = "okay";
473         rt5631: rt5631@1a {
474                 compatible = "rt5631";
475                 reg = <0x1a>;
476         };
477         es8323: es8323@10 {
478                 compatible = "es8323";
479                 reg = <0x10>;
480         };
481         rt3261: rt3261@1c {
482                 compatible = "rt3261";
483                 reg = <0x1c>;
484         //      codec-en-gpio = <0>;//sdk default high level
485                 spk-num= <2>;
486                 modem-input-mode = <1>;
487                 lout-to-modem_mode = <1>;
488                 spk-amplify = <2>;
489                 playback-if1-data_control = <0>;
490                 playback-if2-data_control = <0>;
491         };
492         rt5616: rt5616@1b {
493                 compatible = "rt5616";
494                 reg = <0x1b>;
495         };
496 };
497
498 &i2c3 {
499         status = "okay";
500 };
501
502 &i2c4 {
503         status = "okay";
504         ts@55 {
505                 compatible = "goodix,gt8xx";
506                 reg = <0x55>;
507                 touch-gpio = <&gpio7 GPIO_A6 IRQ_TYPE_LEVEL_LOW>;
508                 reset-gpio = <&gpio7 GPIO_A5 GPIO_ACTIVE_LOW>;
509                 //power-gpio = <&gpio0 GPIO_C5 GPIO_ACTIVE_LOW>;
510                 max-x = <1280>;
511                 max-y = <800>;
512         };
513         
514         ts@01 {
515                 compatible = "ct,vtl_ts";
516                 reg = <0x01>;
517                 screen_max_x = <2048>;
518                 screen_max_y = <1536>;
519                 irq_gpio_number = <&gpio7 GPIO_A6 IRQ_TYPE_LEVEL_LOW>;
520                 rst_gpio_number = <&gpio7 GPIO_A5 GPIO_ACTIVE_HIGH>;
521         };
522 };
523
524 &i2c5 {
525         status = "disable";
526 };
527
528 &fb {
529         rockchip,disp-mode = <DUAL>;
530 };
531
532 &rk_screen {
533          display-timings = <&disp_timings>;
534 };
535
536 /*lcdc1 as PRMRY(LCD),lcdc0 as EXTEND(HDMI)*/
537 &lcdc1 {
538         status = "okay";
539         power_ctr: power_ctr {
540                 rockchip,debug = <0>;
541                 rockchip,mirror = <NO_MIRROR>;
542                 lcd_en:lcd_en {
543                         rockchip,power_type = <GPIO>;
544                         gpios = <&gpio7 GPIO_A3 GPIO_ACTIVE_HIGH>;
545                         rockchip,delay = <10>;
546                 };
547                 
548                 lcd_cs:lcd_cs {
549 rockchip,power_type = <GPIO>;
550                         gpios = <&gpio7 GPIO_A4 GPIO_ACTIVE_HIGH>;
551                         rockchip,delay = <10>;
552                 };
553
554                 /*lcd_rst:lcd_rst {
555                         rockchip,power_type = <GPIO>;
556                         gpios = <&gpio3 GPIO_D6 GPIO_ACTIVE_HIGH>;
557                         rockchip,delay = <5>;
558                 };*/
559
560         };
561 };
562
563 &lcdc0 {
564         status = "okay";
565 };
566
567 &hdmi {
568         status = "okay";
569         rockchips,hdmi_audio_source = <0>;
570 };
571
572 &adc {
573         status = "okay";
574
575         rockchip_headset {
576                 compatible = "rockchip_headset";
577                 headset_gpio = <&gpio0 GPIO_C2 GPIO_ACTIVE_LOW>;
578                 pinctrl-names = "default";
579                 pinctrl-0 = <&gpio0_c2>;
580                 io-channels = <&adc 2>; 
581        /*
582                hook_gpio = ;
583                hook_down_type = ; //interrupt hook key down status 
584                 */       
585        };
586
587         key {
588                 compatible = "rockchip,key";
589                 io-channels = <&adc 1>;
590
591                 vol-up-key {
592                         linux,code = <115>;
593                         label = "volume up";
594                         rockchip,adc_value = <1>;
595                 };
596
597                 vol-down-key {
598                         linux,code = <114>;
599                         label = "volume down";
600                         rockchip,adc_value = <170>;
601                 };
602                 
603                 power-key {
604                         gpios = <&gpio0 GPIO_A5 GPIO_ACTIVE_LOW>;
605                         linux,code = <116>;
606                         label = "power";
607                         gpio-key,wakeup;
608                 };
609
610                 menu-key {
611                         linux,code = <59>;
612                         label = "menu";
613                         rockchip,adc_value = <355>;
614                 };
615
616                 home-key {
617                         linux,code = <102>;
618                         label = "home";
619                         rockchip,adc_value = <746>;
620                 };
621
622                 back-key {
623                         linux,code = <158>;
624                         label = "back";
625                         rockchip,adc_value = <560>;
626                 };
627
628                 camera-key {
629                         linux,code = <212>;
630                         label = "camera";
631                         rockchip,adc_value = <450>;
632                 };
633         };
634 };
635
636 &pwm0 {
637         status = "okay";
638 };
639
640 &pwm1 {
641         status = "okay";
642 };
643
644
645 &clk_core_dvfs_table {
646         operating-points = <
647                 /* KHz    uV */
648                 126000 850000
649                 216000 850000
650                 312000 850000
651                 408000 850000
652                 600000 850000
653                 696000 900000
654                 816000 950000
655                 1008000 1000000
656                 1200000 1050000
657                 1416000 1150000
658                 >;
659         status="okay";
660 };
661
662 &clk_gpu_dvfs_table {
663         operating-points = <
664                 /* KHz    uV */
665                 100000 850000
666                 200000 850000
667                 300000 900000
668                 400000 1000000
669                 500000 1100000
670                 600000 1250000
671                 >;
672         status="okay";
673 };
674
675 &clk_ddr_dvfs_table {
676         operating-points = <
677                 /* KHz    uV */
678                 200000 950000
679                 300000 950000
680                 400000 1000000
681                 533000 1050000
682                 >;
683
684         freq_table = <
685                 /*status                freq(KHz)*/
686                 SYS_STATUS_NORMAL       400000
687                 SYS_STATUS_SUSPEND      200000
688                 SYS_STATUS_VIDEO        300000
689                 SYS_STATUS_DUALVIEW     500000
690                 >;
691         auto_freq=<1>;
692         status="okay";
693 };
694
695 /include/ "rk808.dtsi"
696 &rk808 {
697         gpios =<&gpio0 GPIO_A4 GPIO_ACTIVE_HIGH>,<&gpio0 GPIO_B3 GPIO_ACTIVE_LOW>;
698         rk808,system-power-controller;
699
700         regulators {
701                 
702                 rk808_dcdc1_reg: regulator@0{
703                         regulator-name= "vdd_arm";
704                         regulator-always-on;
705                         regulator-boot-on;
706                 };
707
708                 rk808_dcdc2_reg: regulator@1 {
709                         regulator-name= "vdd_gpu";
710                         regulator-always-on;
711                         regulator-boot-on;
712                 };
713
714                 rk808_dcdc3_reg: regulator@2 {
715                         regulator-name= "rk_dcdc3";
716                         regulator-min-microvolt = <1200000>;
717                         regulator-max-microvolt = <1200000>;
718                         regulator-always-on;
719                         regulator-boot-on;
720                 };
721
722                 rk808_dcdc4_reg: regulator@3 {
723                         regulator-name= "vccio";
724                         regulator-min-microvolt = <1800000>;
725                         regulator-max-microvolt = <3300000>;
726                         regulator-always-on;
727                         regulator-boot-on;
728                 };
729
730                 rk808_ldo1_reg: regulator@4 {
731                         regulator-name= "rk_ldo1";
732                         regulator-min-microvolt = <3300000>;
733                         regulator-max-microvolt = <3300000>;
734                         regulator-always-on;
735                         regulator-boot-on;
736                 };
737
738                 rk808_ldo2_reg: regulator@5 {
739                         regulator-name= "rk_ldo2";
740                         regulator-min-microvolt = <3300000>;
741                         regulator-max-microvolt = <3300000>;
742                         regulator-always-on;
743                         regulator-boot-on;
744                 };
745
746                 rk808_ldo3_reg: regulator@6 {
747                         regulator-name= "rk_ldo3";
748                         regulator-min-microvolt = <1000000>;
749                         regulator-max-microvolt = <1000000>;
750                         regulator-always-on;
751                         regulator-boot-on;
752                 };
753
754                 rk808_ldo4_reg:regulator@7 {
755                         regulator-name= "rk_ldo4";
756                         regulator-min-microvolt = <1800000>;
757                         regulator-max-microvolt = <1800000>;
758                         regulator-always-on;
759                         regulator-boot-on;
760                 };
761
762                 rk808_ldo5_reg: regulator@8 {
763                         regulator-name= "vcc_sd";
764                         regulator-min-microvolt = <1800000>;
765                         regulator-max-microvolt = <3300000>;
766                         regulator-always-on;
767                         regulator-boot-on;
768                 };
769
770                 rk808_ldo6_reg: regulator@9 {
771                         regulator-name= "rk_ldo6";
772                         regulator-min-microvolt = <1000000>;
773                         regulator-max-microvolt = <1000000>;
774                         regulator-always-on;
775                         regulator-boot-on;
776                 };
777
778                 rk808_ldo7_reg: regulator@10 {
779                         regulator-name= "rk_ldo7";
780                         regulator-min-microvolt = <1800000>;
781                         regulator-max-microvolt = <1800000>;
782                         regulator-always-on;
783                         regulator-boot-on;
784                 };
785
786                 rk808_ldo8_reg: regulator@11 {
787                         regulator-name= "rk_ldo8";
788                         regulator-min-microvolt = <3300000>;
789                         regulator-max-microvolt = <3300000>;
790                         regulator-always-on;
791                         regulator-boot-on;
792                 };
793
794                 rk808_ldo9_reg: regulator@12 {
795                         regulator-name= "rk_ldo9";
796                         regulator-always-on;
797                         regulator-boot-on;
798                 };
799
800                 rk808_ldo10_reg: regulator@13 {
801                         regulator-name= "rk_ldo10";
802                         regulator-always-on;
803                         regulator-boot-on;
804                 };
805         };
806 };
807
808 /include/ "ricoh619.dtsi"
809 &ricoh619 {
810         gpios =<&gpio0 GPIO_A4 GPIO_ACTIVE_HIGH>,<&gpio0 GPIO_B3 GPIO_ACTIVE_LOW>;
811         ricoh619,system-power-controller;
812         
813         regulators {
814                 ricoh619_dcdc1_reg: regulator@0 {
815                         regulator-name = "vdd_logic";
816                         regulator-min-microvolt = < 700000>;
817                         regulator-max-microvolt = <1500000>;
818                         regulator-initial-mode = <0x2>;
819                         regulator-initial-state = <3>;
820                         regulator-state-mem {
821                                 regulator-state-mode = <0x2>;
822                                 regulator-state-enabled;
823                                 regulator-state-uv = <900000>;
824                         };      
825                 };
826                 ricoh619_dcdc2_reg: regulator@1 {
827                         regulator-name = "ricoh619_dcdc2";
828                         regulator-min-microvolt = <1200000>;
829                         regulator-max-microvolt = <1200000>;
830                         regulator-initial-mode = <0x2>;
831                         regulator-initial-state = <3>;
832                         regulator-state-mem {
833                                 regulator-state-mode = <0x2>;
834                                 regulator-state-enabled;
835                                 regulator-state-uv = <1200000>;
836                         };      
837                 };
838                 ricoh619_dcdc3_reg: regulator@2 {
839                         regulator-name = "ricoh619_dcdc3";
840                         regulator-min-microvolt = < 1200000>;
841                         regulator-max-microvolt = <1200000>;
842                         regulator-initial-mode = <0x2>;
843                         regulator-initial-state = <3>;
844                         regulator-state-mem {
845                                 regulator-state-mode = <0x2>;
846                                 regulator-state-enabled;
847                                 regulator-state-uv = <1200000>;
848                         };      
849                 };
850                 ricoh619_dcdc4_reg: regulator@3 {
851                         regulator-name = "ricoh619_dcdc4";
852                         regulator-min-microvolt = < 3300000>;
853                         regulator-max-microvolt = <3300000>;
854                         regulator-initial-mode = <0x2>;
855                         regulator-initial-state = <3>;
856                         regulator-state-mem {
857                                 regulator-state-mode = <0x2>;
858                                 regulator-state-enabled;
859                                 regulator-state-uv = <2800000>;
860                         };      
861                 };
862                 ricoh619_dcdc5_reg: regulator@4 {
863                         regulator-name = "ricoh619_dcdc5";
864                         regulator-min-microvolt = < 2000000>;
865                         regulator-max-microvolt = <2000000>;
866                         regulator-initial-mode = <0x2>;
867                         regulator-initial-state = <3>;
868                         regulator-state-mem {
869                                 regulator-state-mode = <0x2>;
870                                 regulator-state-enabled;
871                                 regulator-state-uv = <2000000>;
872                         };      
873                 };
874                 ricoh619_ldo1_reg: regulator@5  {
875                         regulator-name = "ricoh619_ldo1";
876                         regulator-min-microvolt = <3300000>;
877                         regulator-max-microvolt = <3300000>;
878                         regulator-initial-state = <3>;
879                         regulator-state-mem {
880                                 regulator-state-enabled;
881                                 regulator-state-uv = <3300000>;
882                         };      
883                 };
884                 ricoh619_ldo2_reg: regulator@6  {
885                         regulator-name = "ricoh619_ldo2";
886                         regulator-min-microvolt = <3300000>;
887                         regulator-max-microvolt = <3300000>;
888                         regulator-initial-state = <3>;
889                         regulator-state-mem {
890                                 regulator-state-enabled;
891                                 regulator-state-uv = <3300000>;
892                         };
893                 };
894                 ricoh619_ldo3_reg: regulator@7  {
895                         regulator-name = "ricoh619_ldo3";
896                         regulator-min-microvolt = <3300000>;
897                         regulator-max-microvolt = <3300000>;
898                         regulator-initial-state = <3>;
899                         regulator-state-mem {
900                                 regulator-state-enabled;
901                                 regulator-state-uv = <3300000>;
902                         };
903                 };
904                 ricoh619_ldo4_reg: regulator@8  {
905                         regulator-name = "vcc_sd";
906                         regulator-min-microvolt = <3300000>;
907                         regulator-max-microvolt = <3300000>;
908                         regulator-initial-state = <3>;
909                         regulator-state-mem {
910                                 regulator-state-enabled;
911                                 regulator-state-uv = <3300000>;
912                         };
913                 };
914                 ricoh619_ldo5_reg: regulator@9  {
915                         regulator-name = "ricoh619_ldo5";
916                         regulator-min-microvolt = <3300000>;
917                         regulator-max-microvolt = <3300000>;
918                         regulator-initial-state = <3>;
919                         regulator-state-mem {
920                                 regulator-state-enabled;
921                                 regulator-state-uv = <3300000>;
922                         };
923                 };
924                 ricoh619_ldo6_reg: regulator@10  {
925                         regulator-name = "ricoh619_ldo6";
926                         regulator-min-microvolt = <1800000>;
927                         regulator-max-microvolt = <1800000>;
928                         regulator-initial-state = <3>;
929                         regulator-state-mem {
930                                 regulator-state-enabled;
931                                 regulator-state-uv = <1800000>;
932                         };
933                 };
934                 ricoh619_ldo7_reg: regulator@11  {
935                         regulator-name = "ricoh619_ldo7";
936                         regulator-min-microvolt = <1000000>;
937                         regulator-max-microvolt = <1000000>;
938                         regulator-initial-state = <3>;
939                         regulator-state-mem {
940                                 regulator-state-enabled;
941                                 regulator-state-uv = <3300000>;
942                         };
943                 };
944                 ricoh619_ldo8_reg: regulator@12  {
945                         regulator-name = "ricoh619_ldo8";
946                         regulator-min-microvolt = <1800000>;
947                         regulator-max-microvolt = <1800000>;
948                         regulator-initial-state = <3>;
949                         regulator-state-mem {
950                                 regulator-state-enabled;
951                                 regulator-state-uv = <3300000>;
952                         };
953                 };
954                 ricoh619_ldo9_reg: regulator@13  {
955                         regulator-name = "ricoh619_ldo9";
956                         regulator-min-microvolt = <1000000>;
957                         regulator-max-microvolt = <1000000>;
958                         regulator-initial-state = <3>;
959                         regulator-state-mem {
960                                 regulator-state-enabled;
961                                 regulator-state-uv = <3300000>;
962                         };
963                 };
964                 ricoh619_ldo10_reg: regulator@14  {
965                         regulator-name = "ricoh619_ldo10";
966                         regulator-min-microvolt = <1800000>;
967                         regulator-max-microvolt = <1800000>;
968                         regulator-initial-state = <3>;
969                         regulator-state-mem {
970                                 regulator-state-enabled;
971                                 regulator-state-uv = <3300000>;
972                         };
973                 };
974                 ricoh619_ldortc1_reg: regulator@15  {
975                         regulator-name = "ricoh619_ldortc1";
976                         regulator-min-microvolt = < 3300000>;
977                         regulator-max-microvolt = <3300000>;
978                 };
979                 ricoh619_ldortc2_reg: regulator@16  {
980                         regulator-name = "ricoh619_ldortc2";
981                         regulator-min-microvolt = < 3300000>;
982                         regulator-max-microvolt = <3300000>;
983                 };
984         };
985 };
986 /include/ "rk818.dtsi"
987 &rk818 {
988         gpios =<&gpio0 GPIO_A4 GPIO_ACTIVE_HIGH>,<&gpio0 GPIO_B3 GPIO_ACTIVE_LOW>;
989         rk818,system-power-controller;
990
991         regulators {
992                 
993                 rk818_dcdc1_reg: regulator@0{
994                         regulator-name= "vdd_logic";
995                         regulator-min-microvolt = <700000>;
996                         regulator-max-microvolt = <1500000>;
997                         regulator-initial-mode = <0x2>;
998                         regulator-initial-state = <3>;
999                         regulator-state-mem {
1000                                 regulator-state-mode = <0x2>;
1001                                 regulator-state-enabled;
1002                                 regulator-state-uv = <900000>;
1003                         };              
1004                 };
1005
1006                 rk818_dcdc2_reg: regulator@1 {
1007                         regulator-name= "rk818_dcdc2";
1008                         regulator-min-microvolt = <1200000>;
1009                         regulator-max-microvolt = <1200000>;    
1010                         regulator-initial-mode = <0x2>;
1011                         regulator-initial-state = <3>;
1012                         regulator-state-mem {
1013                                 regulator-state-mode = <0x2>;
1014                                 regulator-state-enabled;
1015                                 regulator-state-uv = <1200000>;
1016                         };      
1017                 };
1018
1019                 rk818_dcdc3_reg: regulator@2 {
1020                         regulator-name= "rk818_dcdc3";
1021                         regulator-min-microvolt = <1200000>;
1022                         regulator-max-microvolt = <1200000>;
1023                                 regulator-initial-mode = <0x2>;
1024                         regulator-initial-state = <3>;
1025                         regulator-state-mem {
1026                                 regulator-state-mode = <0x2>;
1027                                 regulator-state-enabled;
1028                                 regulator-state-uv = <1200000>;
1029                         };      
1030                 };
1031
1032                 rk818_dcdc4_reg: regulator@3 {
1033                         regulator-name= "vccio";
1034                         regulator-min-microvolt = <1800000>;
1035                         regulator-max-microvolt = <3300000>;
1036                         regulator-initial-mode = <0x2>;
1037                         regulator-initial-state = <3>;
1038                         regulator-state-mem {
1039                                 regulator-state-mode = <0x2>;
1040                                 regulator-state-enabled;
1041                                 regulator-state-uv = <2800000>;
1042                         };      
1043                 };
1044
1045                 rk818_ldo1_reg: regulator@4 {
1046                         regulator-name= "rk818_ldo1";
1047                         regulator-min-microvolt = <3300000>;
1048                         regulator-max-microvolt = <3300000>;
1049                         regulator-initial-state = <3>;
1050                         regulator-state-mem {
1051                                 regulator-state-enabled;
1052                                 regulator-state-uv = <3300000>;
1053                         };      
1054                 };
1055
1056                 rk818_ldo2_reg: regulator@5 {
1057                         regulator-name= "rk818_ldo2";
1058                         regulator-min-microvolt = <3300000>;
1059                         regulator-max-microvolt = <3300000>;
1060                         regulator-initial-state = <3>;
1061                         regulator-state-mem {
1062                                 regulator-state-enabled;
1063                                 regulator-state-uv = <3300000>;
1064                         };      
1065                 };
1066
1067                 rk818_ldo3_reg: regulator@6 {
1068                         regulator-name= "rk818_ldo3";
1069                         regulator-min-microvolt = <1000000>;
1070                         regulator-max-microvolt = <1000000>;
1071                         regulator-initial-state = <3>;
1072                         regulator-state-mem {
1073                                 regulator-state-enabled;
1074                                 regulator-state-uv = <1000000>;
1075                         };      
1076                 };
1077
1078                 rk818_ldo4_reg:regulator@7 {
1079                         regulator-name= "rk818_ldo4";
1080                         regulator-min-microvolt = <1800000>;
1081                         regulator-max-microvolt = <1800000>;
1082                         regulator-initial-state = <3>;
1083                         regulator-state-mem {
1084                                 regulator-state-disabled;
1085                                 regulator-state-uv = <1800000>;
1086                         };
1087                 };
1088
1089                 rk818_ldo5_reg: regulator@8 {
1090                         regulator-name= "rk818_ldo5";
1091                         regulator-min-microvolt = <3300000>;
1092                         regulator-max-microvolt = <3300000>;
1093                         regulator-initial-state = <3>;
1094                         regulator-state-mem {
1095                                 regulator-state-enabled;
1096                                 regulator-state-uv = <3300000>;
1097                         };
1098                 };
1099
1100                 rk818_ldo6_reg: regulator@9 {
1101                         regulator-name= "rk818_ldo6";
1102                         regulator-min-microvolt = <1000000>;
1103                         regulator-max-microvolt = <1000000>;
1104                         regulator-initial-state = <3>;
1105                         regulator-state-mem {
1106                                 regulator-state-disabled;
1107                                 regulator-state-uv = <1000000>;
1108                         };      
1109                 };
1110
1111                 rk818_ldo7_reg: regulator@10 {
1112                         regulator-name= "rk818_ldo7";
1113                         regulator-min-microvolt = <1800000>;
1114                         regulator-max-microvolt = <1800000>;
1115                         regulator-initial-state = <3>;
1116                         regulator-state-mem {
1117                                 regulator-state-enabled;
1118                                 regulator-state-uv = <1800000>;
1119                         };      
1120                 };
1121
1122                 rk818_ldo8_reg: regulator@11 {
1123                         regulator-name= "rk818_ldo8";
1124                         regulator-min-microvolt = <1800000>;
1125                         regulator-max-microvolt = <1800000>;
1126                         regulator-initial-state = <3>;
1127                         regulator-state-mem {
1128                                 regulator-state-enabled;
1129                                 regulator-state-uv = <1800000>;
1130                         };      
1131                 };
1132                 rk818_ldo9_reg: regulator@12 {
1133                         regulator-name= "vcc_sd";
1134                         regulator-min-microvolt = <1800000>;
1135                 regulator-max-microvolt = <3300000>;
1136                         regulator-initial-state = <3>;
1137                         regulator-state-mem {
1138                                 regulator-state-enabled;
1139                                 regulator-state-uv = <3300000>;
1140                         };
1141                 };
1142                 rk818_ldo10_reg: regulator@13 {
1143                         regulator-name= "rk818_ldo10";
1144                         regulator-state-mem {
1145                                 regulator-state-disabled;
1146                         };
1147                 };
1148         };
1149 };
1150
1151 &lcdc_vdd_domain {
1152         regulator-name = "vcc30_lcd";
1153         };
1154 &dpio_vdd_domain{
1155         regulator-name = "vcc18_cif";   
1156         };
1157 &flash0_vdd_domain{
1158         regulator-name = "vcc_flash";   
1159         };
1160 &flash1_vdd_domain{
1161         regulator-name = "vcc_flash";                   
1162         };
1163 &apio3_vdd_domain{
1164         regulator-name = "vccio_wl";            
1165         };
1166 &apio5_vdd_domain{
1167         regulator-name = "vccio";               
1168         };
1169 &apio4_vdd_domain{
1170         regulator-name = "vccio";               
1171         };
1172 &apio1_vdd_domain{
1173         regulator-name = "vccio";                       
1174         };
1175 &apio2_vdd_domain{
1176         regulator-name = "vccio";               
1177         };
1178 &sdmmc0_vdd_domain{
1179         regulator-name = "vcc_sd";                      
1180         };
1181