d6c3d2e3eccd2264a335779e44b12617b540263b
[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,ct36x";
516                 reg = <0x01>;
517                 ct-model = <365>;
518                 touch-gpio = <&gpio7 GPIO_A6 IRQ_TYPE_LEVEL_LOW>;
519                 reset-gpio = <&gpio7 GPIO_A5 GPIO_ACTIVE_HIGH>;
520                 max-x = <1280>;
521                 max-y = <800>;
522                 orientation=<1 0 0 1>;
523         };
524 };
525
526 &i2c5 {
527         status = "disable";
528 };
529
530 &fb {
531         rockchip,disp-mode = <DUAL>;
532 };
533
534 &rk_screen {
535          display-timings = <&disp_timings>;
536 };
537
538 /*lcdc1 as PRMRY(LCD),lcdc0 as EXTEND(HDMI)*/
539 &lcdc1 {
540         status = "okay";
541         power_ctr: power_ctr {
542                 rockchip,debug = <0>;
543                 rockchip,mirror = <NO_MIRROR>;
544                 lcd_en:lcd_en {
545                         rockchip,power_type = <GPIO>;
546                         gpios = <&gpio7 GPIO_A3 GPIO_ACTIVE_HIGH>;
547                         rockchip,delay = <10>;
548                 };
549                 
550                 lcd_cs:lcd_cs {
551 rockchip,power_type = <GPIO>;
552                         gpios = <&gpio7 GPIO_A4 GPIO_ACTIVE_HIGH>;
553                         rockchip,delay = <10>;
554                 };
555
556                 /*lcd_rst:lcd_rst {
557                         rockchip,power_type = <GPIO>;
558                         gpios = <&gpio3 GPIO_D6 GPIO_ACTIVE_HIGH>;
559                         rockchip,delay = <5>;
560                 };*/
561
562         };
563 };
564
565 &lcdc0 {
566         status = "okay";
567 };
568
569 &hdmi {
570         status = "okay";
571         rockchips,hdmi_audio_source = <0>;
572 };
573
574 &adc {
575         status = "okay";
576
577         rockchip_headset {
578                 compatible = "rockchip_headset";
579                 headset_gpio = <&gpio0 GPIO_C2 GPIO_ACTIVE_LOW>;
580                 pinctrl-names = "default";
581                 pinctrl-0 = <&gpio0_c2>;
582                 io-channels = <&adc 2>; 
583        /*
584                hook_gpio = ;
585                hook_down_type = ; //interrupt hook key down status 
586                 */       
587        };
588
589         key {
590                 compatible = "rockchip,key";
591                 io-channels = <&adc 1>;
592
593                 vol-up-key {
594                         linux,code = <115>;
595                         label = "volume up";
596                         rockchip,adc_value = <1>;
597                 };
598
599                 vol-down-key {
600                         linux,code = <114>;
601                         label = "volume down";
602                         rockchip,adc_value = <170>;
603                 };
604                 
605                 power-key {
606                         gpios = <&gpio0 GPIO_A5 GPIO_ACTIVE_LOW>;
607                         linux,code = <116>;
608                         label = "power";
609                         gpio-key,wakeup;
610                 };
611
612                 menu-key {
613                         linux,code = <59>;
614                         label = "menu";
615                         rockchip,adc_value = <355>;
616                 };
617
618                 home-key {
619                         linux,code = <102>;
620                         label = "home";
621                         rockchip,adc_value = <746>;
622                 };
623
624                 back-key {
625                         linux,code = <158>;
626                         label = "back";
627                         rockchip,adc_value = <560>;
628                 };
629
630                 camera-key {
631                         linux,code = <212>;
632                         label = "camera";
633                         rockchip,adc_value = <450>;
634                 };
635         };
636 };
637
638 &pwm0 {
639         status = "okay";
640 };
641
642 &pwm1 {
643         status = "okay";
644 };
645
646
647 &clk_core_dvfs_table {
648         operating-points = <
649                 /* KHz    uV */
650                 126000 850000
651                 216000 850000
652                 312000 850000
653                 408000 850000
654                 600000 850000
655                 696000 900000
656                 816000 950000
657                 1008000 1000000
658                 1200000 1050000
659                 1416000 1150000
660                 >;
661         status="okay";
662 };
663
664 &clk_gpu_dvfs_table {
665         operating-points = <
666                 /* KHz    uV */
667                 100000 850000
668                 200000 850000
669                 300000 900000
670                 400000 1000000
671                 500000 1100000
672                 600000 1250000
673                 >;
674         status="okay";
675 };
676
677 &clk_ddr_dvfs_table {
678         operating-points = <
679                 /* KHz    uV */
680                 200000 950000
681                 300000 950000
682                 400000 1000000
683                 533000 1050000
684                 >;
685
686         freq_table = <
687                 /*status                freq(KHz)*/
688                 SYS_STATUS_NORMAL       400000
689                 SYS_STATUS_SUSPEND      200000
690                 SYS_STATUS_VIDEO        300000
691                 SYS_STATUS_DUALVIEW     500000
692                 >;
693         auto_freq=<1>;
694         status="okay";
695 };
696
697 /include/ "rk808.dtsi"
698 &rk808 {
699         gpios =<&gpio0 GPIO_A4 GPIO_ACTIVE_HIGH>,<&gpio0 GPIO_B3 GPIO_ACTIVE_LOW>;
700         rk808,system-power-controller;
701
702         regulators {
703                 
704                 rk808_dcdc1_reg: regulator@0{
705                         regulator-name= "vdd_arm";
706                         regulator-always-on;
707                         regulator-boot-on;
708                 };
709
710                 rk808_dcdc2_reg: regulator@1 {
711                         regulator-name= "vdd_gpu";
712                         regulator-always-on;
713                         regulator-boot-on;
714                 };
715
716                 rk808_dcdc3_reg: regulator@2 {
717                         regulator-name= "rk_dcdc3";
718                         regulator-min-microvolt = <1200000>;
719                         regulator-max-microvolt = <1200000>;
720                         regulator-always-on;
721                         regulator-boot-on;
722                 };
723
724                 rk808_dcdc4_reg: regulator@3 {
725                         regulator-name= "vccio";
726                         regulator-min-microvolt = <1800000>;
727                         regulator-max-microvolt = <3300000>;
728                         regulator-always-on;
729                         regulator-boot-on;
730                 };
731
732                 rk808_ldo1_reg: regulator@4 {
733                         regulator-name= "rk_ldo1";
734                         regulator-min-microvolt = <3300000>;
735                         regulator-max-microvolt = <3300000>;
736                         regulator-always-on;
737                         regulator-boot-on;
738                 };
739
740                 rk808_ldo2_reg: regulator@5 {
741                         regulator-name= "rk_ldo2";
742                         regulator-min-microvolt = <3300000>;
743                         regulator-max-microvolt = <3300000>;
744                         regulator-always-on;
745                         regulator-boot-on;
746                 };
747
748                 rk808_ldo3_reg: regulator@6 {
749                         regulator-name= "rk_ldo3";
750                         regulator-min-microvolt = <1000000>;
751                         regulator-max-microvolt = <1000000>;
752                         regulator-always-on;
753                         regulator-boot-on;
754                 };
755
756                 rk808_ldo4_reg:regulator@7 {
757                         regulator-name= "rk_ldo4";
758                         regulator-min-microvolt = <1800000>;
759                         regulator-max-microvolt = <1800000>;
760                         regulator-always-on;
761                         regulator-boot-on;
762                 };
763
764                 rk808_ldo5_reg: regulator@8 {
765                         regulator-name= "vcc_sd";
766                         regulator-min-microvolt = <1800000>;
767                         regulator-max-microvolt = <3300000>;
768                         regulator-always-on;
769                         regulator-boot-on;
770                 };
771
772                 rk808_ldo6_reg: regulator@9 {
773                         regulator-name= "rk_ldo6";
774                         regulator-min-microvolt = <1000000>;
775                         regulator-max-microvolt = <1000000>;
776                         regulator-always-on;
777                         regulator-boot-on;
778                 };
779
780                 rk808_ldo7_reg: regulator@10 {
781                         regulator-name= "rk_ldo7";
782                         regulator-min-microvolt = <1800000>;
783                         regulator-max-microvolt = <1800000>;
784                         regulator-always-on;
785                         regulator-boot-on;
786                 };
787
788                 rk808_ldo8_reg: regulator@11 {
789                         regulator-name= "rk_ldo8";
790                         regulator-min-microvolt = <3300000>;
791                         regulator-max-microvolt = <3300000>;
792                         regulator-always-on;
793                         regulator-boot-on;
794                 };
795
796                 rk808_ldo9_reg: regulator@12 {
797                         regulator-name= "rk_ldo9";
798                         regulator-always-on;
799                         regulator-boot-on;
800                 };
801
802                 rk808_ldo10_reg: regulator@13 {
803                         regulator-name= "rk_ldo10";
804                         regulator-always-on;
805                         regulator-boot-on;
806                 };
807         };
808 };
809
810 /include/ "ricoh619.dtsi"
811 &ricoh619 {
812         gpios =<&gpio0 GPIO_A4 GPIO_ACTIVE_HIGH>,<&gpio0 GPIO_B3 GPIO_ACTIVE_LOW>;
813         ricoh619,system-power-controller;
814         
815         regulators {
816                 ricoh619_dcdc1_reg: regulator@0 {
817                         regulator-name = "vdd_logic";
818                         regulator-min-microvolt = < 700000>;
819                         regulator-max-microvolt = <1500000>;
820                         regulator-initial-mode = <0x2>;
821                         regulator-initial-state = <3>;
822                         regulator-state-mem {
823                                 regulator-state-mode = <0x2>;
824                                 regulator-state-enabled;
825                                 regulator-state-uv = <900000>;
826                         };      
827                 };
828                 ricoh619_dcdc2_reg: regulator@1 {
829                         regulator-name = "ricoh619_dcdc2";
830                         regulator-min-microvolt = <1200000>;
831                         regulator-max-microvolt = <1200000>;
832                         regulator-initial-mode = <0x2>;
833                         regulator-initial-state = <3>;
834                         regulator-state-mem {
835                                 regulator-state-mode = <0x2>;
836                                 regulator-state-enabled;
837                                 regulator-state-uv = <1200000>;
838                         };      
839                 };
840                 ricoh619_dcdc3_reg: regulator@2 {
841                         regulator-name = "ricoh619_dcdc3";
842                         regulator-min-microvolt = < 1200000>;
843                         regulator-max-microvolt = <1200000>;
844                         regulator-initial-mode = <0x2>;
845                         regulator-initial-state = <3>;
846                         regulator-state-mem {
847                                 regulator-state-mode = <0x2>;
848                                 regulator-state-enabled;
849                                 regulator-state-uv = <1200000>;
850                         };      
851                 };
852                 ricoh619_dcdc4_reg: regulator@3 {
853                         regulator-name = "ricoh619_dcdc4";
854                         regulator-min-microvolt = < 3300000>;
855                         regulator-max-microvolt = <3300000>;
856                         regulator-initial-mode = <0x2>;
857                         regulator-initial-state = <3>;
858                         regulator-state-mem {
859                                 regulator-state-mode = <0x2>;
860                                 regulator-state-enabled;
861                                 regulator-state-uv = <2800000>;
862                         };      
863                 };
864                 ricoh619_dcdc5_reg: regulator@4 {
865                         regulator-name = "ricoh619_dcdc5";
866                         regulator-min-microvolt = < 2000000>;
867                         regulator-max-microvolt = <2000000>;
868                         regulator-initial-mode = <0x2>;
869                         regulator-initial-state = <3>;
870                         regulator-state-mem {
871                                 regulator-state-mode = <0x2>;
872                                 regulator-state-enabled;
873                                 regulator-state-uv = <2000000>;
874                         };      
875                 };
876                 ricoh619_ldo1_reg: regulator@5  {
877                         regulator-name = "ricoh619_ldo1";
878                         regulator-min-microvolt = <3300000>;
879                         regulator-max-microvolt = <3300000>;
880                         regulator-initial-state = <3>;
881                         regulator-state-mem {
882                                 regulator-state-enabled;
883                                 regulator-state-uv = <3300000>;
884                         };      
885                 };
886                 ricoh619_ldo2_reg: regulator@6  {
887                         regulator-name = "ricoh619_ldo2";
888                         regulator-min-microvolt = <3300000>;
889                         regulator-max-microvolt = <3300000>;
890                         regulator-initial-state = <3>;
891                         regulator-state-mem {
892                                 regulator-state-enabled;
893                                 regulator-state-uv = <3300000>;
894                         };
895                 };
896                 ricoh619_ldo3_reg: regulator@7  {
897                         regulator-name = "ricoh619_ldo3";
898                         regulator-min-microvolt = <3300000>;
899                         regulator-max-microvolt = <3300000>;
900                         regulator-initial-state = <3>;
901                         regulator-state-mem {
902                                 regulator-state-enabled;
903                                 regulator-state-uv = <3300000>;
904                         };
905                 };
906                 ricoh619_ldo4_reg: regulator@8  {
907                         regulator-name = "vcc_sd";
908                         regulator-min-microvolt = <3300000>;
909                         regulator-max-microvolt = <3300000>;
910                         regulator-initial-state = <3>;
911                         regulator-state-mem {
912                                 regulator-state-enabled;
913                                 regulator-state-uv = <3300000>;
914                         };
915                 };
916                 ricoh619_ldo5_reg: regulator@9  {
917                         regulator-name = "ricoh619_ldo5";
918                         regulator-min-microvolt = <3300000>;
919                         regulator-max-microvolt = <3300000>;
920                         regulator-initial-state = <3>;
921                         regulator-state-mem {
922                                 regulator-state-enabled;
923                                 regulator-state-uv = <3300000>;
924                         };
925                 };
926                 ricoh619_ldo6_reg: regulator@10  {
927                         regulator-name = "ricoh619_ldo6";
928                         regulator-min-microvolt = <1800000>;
929                         regulator-max-microvolt = <1800000>;
930                         regulator-initial-state = <3>;
931                         regulator-state-mem {
932                                 regulator-state-enabled;
933                                 regulator-state-uv = <1800000>;
934                         };
935                 };
936                 ricoh619_ldo7_reg: regulator@11  {
937                         regulator-name = "ricoh619_ldo7";
938                         regulator-min-microvolt = <1000000>;
939                         regulator-max-microvolt = <1000000>;
940                         regulator-initial-state = <3>;
941                         regulator-state-mem {
942                                 regulator-state-enabled;
943                                 regulator-state-uv = <3300000>;
944                         };
945                 };
946                 ricoh619_ldo8_reg: regulator@12  {
947                         regulator-name = "ricoh619_ldo8";
948                         regulator-min-microvolt = <1800000>;
949                         regulator-max-microvolt = <1800000>;
950                         regulator-initial-state = <3>;
951                         regulator-state-mem {
952                                 regulator-state-enabled;
953                                 regulator-state-uv = <3300000>;
954                         };
955                 };
956                 ricoh619_ldo9_reg: regulator@13  {
957                         regulator-name = "ricoh619_ldo9";
958                         regulator-min-microvolt = <1000000>;
959                         regulator-max-microvolt = <1000000>;
960                         regulator-initial-state = <3>;
961                         regulator-state-mem {
962                                 regulator-state-enabled;
963                                 regulator-state-uv = <3300000>;
964                         };
965                 };
966                 ricoh619_ldo10_reg: regulator@14  {
967                         regulator-name = "ricoh619_ldo10";
968                         regulator-min-microvolt = <1800000>;
969                         regulator-max-microvolt = <1800000>;
970                         regulator-initial-state = <3>;
971                         regulator-state-mem {
972                                 regulator-state-enabled;
973                                 regulator-state-uv = <3300000>;
974                         };
975                 };
976                 ricoh619_ldortc1_reg: regulator@15  {
977                         regulator-name = "ricoh619_ldortc1";
978                         regulator-min-microvolt = < 3300000>;
979                         regulator-max-microvolt = <3300000>;
980                 };
981                 ricoh619_ldortc2_reg: regulator@16  {
982                         regulator-name = "ricoh619_ldortc2";
983                         regulator-min-microvolt = < 3300000>;
984                         regulator-max-microvolt = <3300000>;
985                 };
986         };
987 };
988 /include/ "rk818.dtsi"
989 &rk818 {
990         gpios =<&gpio0 GPIO_A4 GPIO_ACTIVE_HIGH>,<&gpio0 GPIO_B3 GPIO_ACTIVE_LOW>;
991         rk818,system-power-controller;
992
993         regulators {
994                 
995                 rk818_dcdc1_reg: regulator@0{
996                         regulator-name= "vdd_logic";
997                         regulator-min-microvolt = <700000>;
998                         regulator-max-microvolt = <1500000>;
999                         regulator-initial-mode = <0x2>;
1000                         regulator-initial-state = <3>;
1001                         regulator-state-mem {
1002                                 regulator-state-mode = <0x2>;
1003                                 regulator-state-enabled;
1004                                 regulator-state-uv = <900000>;
1005                         };              
1006                 };
1007
1008                 rk818_dcdc2_reg: regulator@1 {
1009                         regulator-name= "rk818_dcdc2";
1010                         regulator-min-microvolt = <1200000>;
1011                         regulator-max-microvolt = <1200000>;    
1012                         regulator-initial-mode = <0x2>;
1013                         regulator-initial-state = <3>;
1014                         regulator-state-mem {
1015                                 regulator-state-mode = <0x2>;
1016                                 regulator-state-enabled;
1017                                 regulator-state-uv = <1200000>;
1018                         };      
1019                 };
1020
1021                 rk818_dcdc3_reg: regulator@2 {
1022                         regulator-name= "rk818_dcdc3";
1023                         regulator-min-microvolt = <1200000>;
1024                         regulator-max-microvolt = <1200000>;
1025                                 regulator-initial-mode = <0x2>;
1026                         regulator-initial-state = <3>;
1027                         regulator-state-mem {
1028                                 regulator-state-mode = <0x2>;
1029                                 regulator-state-enabled;
1030                                 regulator-state-uv = <1200000>;
1031                         };      
1032                 };
1033
1034                 rk818_dcdc4_reg: regulator@3 {
1035                         regulator-name= "vccio";
1036                         regulator-min-microvolt = <1800000>;
1037                         regulator-max-microvolt = <3300000>;
1038                         regulator-initial-mode = <0x2>;
1039                         regulator-initial-state = <3>;
1040                         regulator-state-mem {
1041                                 regulator-state-mode = <0x2>;
1042                                 regulator-state-enabled;
1043                                 regulator-state-uv = <2800000>;
1044                         };      
1045                 };
1046
1047                 rk818_ldo1_reg: regulator@4 {
1048                         regulator-name= "rk818_ldo1";
1049                         regulator-min-microvolt = <3300000>;
1050                         regulator-max-microvolt = <3300000>;
1051                         regulator-initial-state = <3>;
1052                         regulator-state-mem {
1053                                 regulator-state-enabled;
1054                                 regulator-state-uv = <3300000>;
1055                         };      
1056                 };
1057
1058                 rk818_ldo2_reg: regulator@5 {
1059                         regulator-name= "rk818_ldo2";
1060                         regulator-min-microvolt = <3300000>;
1061                         regulator-max-microvolt = <3300000>;
1062                         regulator-initial-state = <3>;
1063                         regulator-state-mem {
1064                                 regulator-state-enabled;
1065                                 regulator-state-uv = <3300000>;
1066                         };      
1067                 };
1068
1069                 rk818_ldo3_reg: regulator@6 {
1070                         regulator-name= "rk818_ldo3";
1071                         regulator-min-microvolt = <1000000>;
1072                         regulator-max-microvolt = <1000000>;
1073                         regulator-initial-state = <3>;
1074                         regulator-state-mem {
1075                                 regulator-state-enabled;
1076                                 regulator-state-uv = <1000000>;
1077                         };      
1078                 };
1079
1080                 rk818_ldo4_reg:regulator@7 {
1081                         regulator-name= "rk818_ldo4";
1082                         regulator-min-microvolt = <1800000>;
1083                         regulator-max-microvolt = <1800000>;
1084                         regulator-initial-state = <3>;
1085                         regulator-state-mem {
1086                                 regulator-state-disabled;
1087                                 regulator-state-uv = <1800000>;
1088                         };
1089                 };
1090
1091                 rk818_ldo5_reg: regulator@8 {
1092                         regulator-name= "rk818_ldo5";
1093                         regulator-min-microvolt = <3300000>;
1094                         regulator-max-microvolt = <3300000>;
1095                         regulator-initial-state = <3>;
1096                         regulator-state-mem {
1097                                 regulator-state-enabled;
1098                                 regulator-state-uv = <3300000>;
1099                         };
1100                 };
1101
1102                 rk818_ldo6_reg: regulator@9 {
1103                         regulator-name= "rk818_ldo6";
1104                         regulator-min-microvolt = <1000000>;
1105                         regulator-max-microvolt = <1000000>;
1106                         regulator-initial-state = <3>;
1107                         regulator-state-mem {
1108                                 regulator-state-disabled;
1109                                 regulator-state-uv = <1000000>;
1110                         };      
1111                 };
1112
1113                 rk818_ldo7_reg: regulator@10 {
1114                         regulator-name= "rk818_ldo7";
1115                         regulator-min-microvolt = <1800000>;
1116                         regulator-max-microvolt = <1800000>;
1117                         regulator-initial-state = <3>;
1118                         regulator-state-mem {
1119                                 regulator-state-enabled;
1120                                 regulator-state-uv = <1800000>;
1121                         };      
1122                 };
1123
1124                 rk818_ldo8_reg: regulator@11 {
1125                         regulator-name= "rk818_ldo8";
1126                         regulator-min-microvolt = <1800000>;
1127                         regulator-max-microvolt = <1800000>;
1128                         regulator-initial-state = <3>;
1129                         regulator-state-mem {
1130                                 regulator-state-enabled;
1131                                 regulator-state-uv = <1800000>;
1132                         };      
1133                 };
1134                 rk818_ldo9_reg: regulator@12 {
1135                         regulator-name= "vcc_sd";
1136                         regulator-min-microvolt = <1800000>;
1137                 regulator-max-microvolt = <3300000>;
1138                         regulator-initial-state = <3>;
1139                         regulator-state-mem {
1140                                 regulator-state-enabled;
1141                                 regulator-state-uv = <3300000>;
1142                         };
1143                 };
1144                 rk818_ldo10_reg: regulator@13 {
1145                         regulator-name= "rk818_ldo10";
1146                         regulator-state-mem {
1147                                 regulator-state-disabled;
1148                         };
1149                 };
1150         };
1151 };
1152
1153 &lcdc_vdd_domain {
1154         regulator-name = "vcc30_lcd";
1155         };
1156 &dpio_vdd_domain{
1157         regulator-name = "vcc18_cif";   
1158         };
1159 &flash0_vdd_domain{
1160         regulator-name = "vcc_flash";   
1161         };
1162 &flash1_vdd_domain{
1163         regulator-name = "vcc_flash";                   
1164         };
1165 &apio3_vdd_domain{
1166         regulator-name = "vccio_wl";            
1167         };
1168 &apio5_vdd_domain{
1169         regulator-name = "vccio";               
1170         };
1171 &apio4_vdd_domain{
1172         regulator-name = "vccio";               
1173         };
1174 &apio1_vdd_domain{
1175         regulator-name = "vccio";                       
1176         };
1177 &apio2_vdd_domain{
1178         regulator-name = "vccio";               
1179         };
1180 &sdmmc0_vdd_domain{
1181         regulator-name = "vcc_sd";                      
1182         };
1183