rk312x: always enable jtab clk
[firefly-linux-kernel-4.4.55.git] / arch / arm / boot / dts / rk312x-sdk.dtsi
1 /dts-v1/;
2
3 #include "rk312x.dtsi"
4 #include "rk3126-cif-sensor.dtsi"
5 #include "rk3128-cif-sensor.dtsi"
6
7 / {
8         fiq-debugger {
9                 status = "okay";
10         };
11
12         chosen {
13                 bootargs = "vmalloc=496M rockchip_jtag";
14         };
15
16         pwm_regulator1:pwm-regulator1 {
17                 compatible = "rockchip_pwm_regulator";
18                 pwms = <&pwm1 0 25000>;
19                 rockchip,pwm_id= <1>;
20                 rockchip,pwm_voltage_map= <950000 975000 1000000 1025000 1050000 1075000 1100000 1125000 1150000 1175000 1200000 1225000 1250000 1275000 1300000 1325000 1350000 1375000 1400000 1425000 1450000>;
21                 rockchip,pwm_voltage= <1250000>;
22                 rockchip,pwm_min_voltage= <950000>;
23                 rockchip,pwm_max_voltage= <1450000>;
24                 rockchip,pwm_suspend_voltage= <1250000>;
25                 rockchip,pwm_coefficient= <550>;
26                 status = "disabled";
27                 regulators {
28                         #address-cells = <1>;
29                         #size-cells = <0>;
30                         pwm_reg0: regulator@0 {
31                                 regulator-compatible = "pwm_dcdc1";
32                                 regulator-name= "vdd_arm";
33                                 regulator-min-microvolt = <950000>;
34                                 regulator-max-microvolt = <1450000>;
35                                 regulator-always-on;
36                                 regulator-boot-on;
37                         };
38                 };
39         };
40
41         pwm_regulator2:pwm-regulator2 {
42                 compatible = "rockchip_pwm_regulator";
43                 pwms = <&pwm2 0 25000>;
44                 rockchip,pwm_id= <2>;
45                 rockchip,pwm_voltage_map= <950000 975000 1000000 1025000 1050000 1075000 1100000 1125000 1150000 1175000 1200000 1225000 1250000 1275000 1300000 1325000 1350000 1375000 1400000 1425000 1450000>;
46                 rockchip,pwm_voltage= <1200000>;
47                 rockchip,pwm_min_voltage= <950000>;
48                 rockchip,pwm_max_voltage= <1450000>;
49                 rockchip,pwm_suspend_voltage= <1250000>;
50                 rockchip,pwm_coefficient= <550>;
51                 status = "disabled";
52                 regulators {
53                         #address-cells = <1>;
54                         #size-cells = <0>;
55                         pwm_reg1: regulator@1 {
56                                 regulator-compatible = "pwm_dcdc2";
57                                 regulator-name= "vdd_logic";
58                                 regulator-min-microvolt = <950000>;
59                                 regulator-max-microvolt = <1450000>;
60                                 regulator-always-on;
61                                 regulator-boot-on;
62                         };
63                 };
64         };
65
66 };
67
68 &nandc {
69         status = "okay"; // used nand set "okay" ,used emmc set "disabled"
70 };
71
72 &nandc0reg {
73         status = "disabled"; // used nand set "disabled" ,used emmc set "okay"
74 };
75
76 &emmc {
77         clock-frequency = <37500000>;
78         clock-freq-min-max = <400000 37500000>;
79         supports-highspeed;
80         supports-emmc;
81         bootpart-no-access;
82         supports-DDR_MODE;
83         ignore-pm-notify;
84         keep-power-in-suspend;
85         //poll-hw-reset
86         status = "disabled";
87 };
88
89 &sdmmc {
90         clock-frequency = <37500000>;
91         clock-freq-min-max = <400000 37500000>;
92         supports-highspeed;
93         supports-sd;
94         broken-cd;
95         card-detect-delay = <200>;
96         ignore-pm-notify;
97         keep-power-in-suspend;
98         vmmc-supply = <&rk818_ldo9_reg>;
99         status = "disabled";
100 };
101
102 &sdio {
103         clock-frequency = <37500000>;
104         clock-freq-min-max = <200000 37500000>;
105         supports-highspeed;
106         supports-sdio;
107         ignore-pm-notify;
108         keep-power-in-suspend;
109         cap-sdio-irq;
110         status = "okay";
111 };
112
113 &adc {
114         status = "okay";
115
116         key: key {
117                 compatible = "rockchip,key";
118                 io-channels = <&adc 1>;
119
120                 vol-up-key {
121                         linux,code = <115>;
122                         label = "volume up";
123                         rockchip,adc_value = <523>;
124                 };
125
126                 vol-down-key {
127                         linux,code = <114>;
128                         label = "volume down";
129                         rockchip,adc_value = <727>;
130                 };
131
132                 power-key {
133                         gpios = <&gpio0 GPIO_A5 GPIO_ACTIVE_LOW>;
134                         linux,code = <116>;
135                         label = "power";
136                         gpio-key,wakeup;
137                 };
138
139                 menu-key {
140                         linux,code = <59>;
141                         label = "menu";
142                         rockchip,adc_value = <1>;
143                 };
144
145                 home-key {
146                         linux,code = <102>;
147                         label = "home";
148                         rockchip,adc_value = <318>;
149                 };
150
151                 back-key {
152                         linux,code = <158>;
153                         label = "back";
154                         rockchip,adc_value = <146>;
155                 };
156
157                 camera-key {
158                         linux,code = <212>;
159                         label = "camera";
160                         rockchip,adc_value = <450>;
161                 };
162         };
163 };
164
165
166 &i2c0 {
167         status = "okay";
168         rk818: rk818@1c {
169                 reg = <0x1c>;
170                 status = "okay";
171         };
172         rt5025: rt5025@35 {
173                         compatible = "rt,rt5025";
174                         reg = <0x35>;
175                         status = "disabled";
176         };
177         rt5036: rt5036@38 {
178                         compatible = "rt,rt5036";
179                         reg = <0x38>;
180                         status = "disabled";
181         };
182 };
183
184 &i2c2 {
185         status = "okay";
186         ts@55 {
187                 compatible = "goodix,gt8xx";
188                 reg = <0x55>;
189                 touch-gpio = <&gpio1 GPIO_B0 IRQ_TYPE_LEVEL_LOW>;
190                 reset-gpio = <&gpio2 GPIO_C1 GPIO_ACTIVE_LOW>;
191                 //power-gpio = <&gpio0 GPIO_C5 GPIO_ACTIVE_LOW>;
192                 max-x = <1280>;
193                 max-y = <800>;
194         };
195         /*
196         ts@01 {
197                 compatible = "ct,vtl_ts";
198                 reg = <0x01>;
199                 screen_max_x = <1280>;
200                 screen_max_y = <800>;
201                 irq_gpio_number = <&gpio1 GPIO_B0 IRQ_TYPE_LEVEL_LOW>;
202                 rst_gpio_number = <&gpio2 GPIO_C1 GPIO_ACTIVE_HIGH>;
203         };
204         */
205 };
206
207 &fb {
208         rockchip,disp-mode = <ONE_DUAL>;
209         rockchip,uboot-logo-on = <0>;
210 };
211
212
213 /include/ "rt5025.dtsi"
214 &rt5025 {
215
216                         rt5025_dcdc1: regulator_0 {
217                                 regulator-name = "vdd_arm";
218                                 regulator-min-microvolt = < 700000>;
219                                 regulator-max-microvolt = <1500000>;
220                                 qcom,comsumer-supplies = "vdd_arm", "";
221                                 regulator-always-on;
222                                 regulator-boot-on;
223
224                         };
225
226                         rt5025_dcdc2: regulator_1 {
227                                 regulator-name = "vdd_logic";
228                                 regulator-min-microvolt = < 700000>;
229                                 regulator-max-microvolt = <1500000>;
230                                 qcom,comsumer-supplies = "vdd_logic", "";
231                                 regulator-always-on;
232                                 regulator-boot-on;
233                         };
234
235                         rt5025_dcdc3: regulator_2 {
236                                 regulator-name = "rt5025-dcdc3";
237                                 regulator-min-microvolt = < 1800000>;
238                                 regulator-max-microvolt = <3300000>;
239                                 qcom,comsumer-supplies = "rt5025-dcdc3", "";
240                                 regulator-always-on;
241                                 regulator-boot-on;
242                         };
243
244                         rt5025_dcdc4: regulator_3 {
245                                 regulator-name = "rt5025-dcdc4";
246                                 regulator-min-microvolt = <5000000>;
247                                 regulator-max-microvolt = <5000000>;
248                                 qcom,comsumer-supplies = "rt5025-dcdc4", "";
249                                 regulator-always-on;
250                                 regulator-boot-on;
251                         };
252
253                         rt5025_ldo1: regulator_4 {
254                                 regulator-name = "rt5025-ldo1";
255                                 regulator-min-microvolt = < 1800000>;
256                                 regulator-max-microvolt = <1800000>;
257                                 qcom,comsumer-supplies = "rt5025-ldo1", "";
258                                 regulator-always-on;
259                                 regulator-boot-on;
260                         };
261
262                         rt5025_ldo2: regulator_5 {
263                                 regulator-name = "rt5025-ldo2";
264                                 regulator-min-microvolt = < 1200000>;
265                                 regulator-max-microvolt = <1200000>;
266                                 qcom,comsumer-supplies = "rt5025-ldo2", "";
267                                 regulator-always-on;
268                                 regulator-boot-on;
269                         };
270
271                         rt5025_ldo3: regulator_6 {
272                                 regulator-name = "rt5025-ldo3";
273                                 regulator-min-microvolt = <2800000>;
274                                 regulator-max-microvolt = <2800000>;
275                                 qcom,comsumer-supplies = "rt5025-ldo3", "";
276                                 regulator-always-on;
277                                 regulator-boot-on;
278                         };
279
280                         rt5025_ldo4: regulator_7 {
281                                 regulator-name = "rt5025-ldo4";
282                                 regulator-min-microvolt = <3300000>;
283                                 regulator-max-microvolt = <3300000>;
284                                 qcom,comsumer-supplies = "rt5025-ldo4", "";
285                                 regulator-always-on;
286                                 regulator-boot-on;
287                         };
288
289                         rt5025_ldo5: regulator_8 {
290                                 regulator-name = "rt5025-ldo5";
291                                 regulator-min-microvolt = <1800000>;
292                                 regulator-max-microvolt = <1800000>;
293                                 qcom,comsumer-supplies = "rt5025-ldo5", "";
294                                 regulator-always-on;
295                                 regulator-boot-on;
296                         };
297
298                         rt5025_ldo6: regulator_9 {
299                                 regulator-name = "rt5025-ldo6";
300                                 regulator-min-microvolt = <330000>;
301                                 regulator-max-microvolt = <3300000>;
302                                 qcom,comsumer-supplies = "rt5025-ldo6", "";
303                                 regulator-always-on;
304                                 regulator-boot-on;
305                         };
306
307         rt5025-irq {
308                                 compatible = "rt,rt5025-irq";
309                                 rt,irq-gpio = <&gpio1 GPIO_B1 GPIO_ACTIVE_HIGH>;
310         };
311 };
312
313 /include/ "rt5036.dtsi"
314 &rt5036 {
315
316                         rt5036_dcdc1: regulator_0 {
317                                 regulator-name = "vdd_arm";
318                                 regulator-min-microvolt = < 800000>;
319                                 regulator-max-microvolt = <3300000>;
320                                 qcom,comsumer-supplies = "vdd_arm", "";
321                                 regulator-always-on;
322                                 regulator-boot-on;
323                                 rt,standby_enabled;
324                                 rt,standby_vol = <950000>; 
325                         };
326
327                         rt5036_dcdc2: regulator_1 {
328                                 regulator-name = "vdd_logic";
329                                 regulator-min-microvolt = < 800000>;
330                                 regulator-max-microvolt = <3300000>;
331                                 qcom,comsumer-supplies = "vdd_logic", "";
332                                 regulator-always-on;
333                                 regulator-boot-on;
334                                 rt,standby_enabled;
335                                 rt,standby_vol = <950000>; 
336                         };
337
338                         rt5036_dcdc3: regulator_2 {
339                                 regulator-name = "rt5036-dcdc3";
340                                 regulator-min-microvolt = < 800000>;
341                                 regulator-max-microvolt = <3300000>;
342                                 qcom,comsumer-supplies = "rt5036-dcdc3", "";
343                                 regulator-always-on;
344                                 regulator-boot-on;
345                                 rt,standby_enabled;
346                                 rt,standby_vol = <2800000>; 
347                         };
348
349                         rt5036_dcdc4: regulator_3 {
350                                 regulator-name = "rt5036-dcdc4";
351                                 regulator-min-microvolt = < 800000>;
352                                 regulator-max-microvolt = <3300000>;
353                                 qcom,comsumer-supplies = "rt5036-dcdc4", "";
354                                 regulator-always-on;
355                                 regulator-boot-on;
356                                 rt,standby_enabled;
357                                 rt,standby_vol = <1200000>; 
358                         };
359
360                         rt5036_ldo1: regulator_4 {
361                                 regulator-name = "rt5036-ldo1";
362                                 regulator-min-microvolt = < 3000000>;
363                                 regulator-max-microvolt = <3000000>;
364                                 qcom,comsumer-supplies = "rt5036-ldo1", "";
365                                 regulator-always-on;
366                                 regulator-boot-on;
367                                 rt,standby_enabled;
368                                 rt,standby_vol = <3000000>; 
369                         };
370
371                         rt5036_ldo2: regulator_5 {
372                                 regulator-name = "rt5036-ldo2";
373                                 regulator-min-microvolt = < 1100000>;
374                                 regulator-max-microvolt = <1100000>;
375                                 qcom,comsumer-supplies = "rt5036-ldo2", "";
376                                 regulator-always-on;
377                                 regulator-boot-on;
378                                 rt,standby_enabled;
379                                 rt,standby_vol = <1100000>; 
380                         };
381
382                         rt5036_ldo3: regulator_6 {
383                                 regulator-name = "rt5036-ldo3";
384                                 regulator-min-microvolt = < 1800000>;
385                                 regulator-max-microvolt = <1800000>;
386                                 qcom,comsumer-supplies = "rt5036-ldo3", "";
387                                 regulator-always-on;
388                                 regulator-boot-on;
389                                 rt,standby_enabled;
390                                 rt,standby_vol = <1800000>; 
391                         };
392
393                         rt5036_ldo4: regulator_7 {
394                                 regulator-name = "rt5036-ldo4";
395                                 regulator-min-microvolt = < 1800000>;
396                                 regulator-max-microvolt = <1800000>;
397                                 qcom,comsumer-supplies = "rt5036-ldo4", "";
398                                 regulator-always-on;
399                                 regulator-boot-on;
400                                 rt,standby_enabled;
401                                 rt,standby_vol = <1800000>; 
402                         };
403
404                         rt5036_ldo5: regulator_8 {
405                                 regulator-name = "rt5036-ldo5";
406                                 qcom,comsumer-supplies = "rt5036-ldo5", "";
407                                 regulator-always-on;
408                                 regulator-boot-on;
409                                 rt,standby_enabled;
410                         };
411
412                         rt5036_ldo6: regulator_9 {
413                                 regulator-name = "rt5036-ldo6";
414                                 qcom,comsumer-supplies = "rt5036-ldo6", "";
415                                 regulator-always-on;
416                                 regulator-boot-on;
417                                 rt,standby_enabled;
418                         };
419
420                         rt5036-irq {
421                                 compatible = "rt,rt5036-irq";
422                                 rt,irq-gpio = <&gpio1 GPIO_B1 GPIO_ACTIVE_HIGH>;
423                         };
424
425                         rt5036-charger {
426                                 compatible = "rt,rt5036-charger";
427                                 rt,te_en;
428                                 rt,iprec = <0x2>;
429                                 rt,ieoc = <0x3>;
430                                 rt,vprec = <0xA>;
431                                 rt,batlv = <0x4>;
432                                 rt,vrechg = <1>;
433                                 rt,chg_volt = <4200>;
434                                 rt,otg_volt = <5025>;
435                                 rt,acchg_icc = <2000>;
436                                 rt,usbtachg_icc = <2000>;
437                                 rt,usbchg_icc = <900>;
438                                 /*rt,acdet_gpio = <&gpio1 GPIO_B1 GPIO_ACTIVE_HIGH>;*/
439                                 /*rt,usbdet_gpio = <&gpio1 GPIO_B1 GPIO_ACTIVE_HIGH>;*/
440                         };
441 };
442
443 /include/ "rk818.dtsi"
444 &rk818 {
445         gpios =<&gpio1 GPIO_B1 GPIO_ACTIVE_HIGH>,<&gpio1 GPIO_A1 GPIO_ACTIVE_LOW>;
446         rk818,system-power-controller;
447         rk818,support_dc_chg = <1>;/*1: dc chg; 0:usb chg*/
448
449         regulators {
450
451                 rk818_dcdc1_reg: regulator@0{
452                         regulator-name= "vdd_arm";
453                         regulator-min-microvolt = <700000>;
454                         regulator-max-microvolt = <1500000>;
455                         regulator-initial-mode = <0x2>;
456                         regulator-initial-state = <3>;
457                         regulator-state-mem {
458                                 regulator-state-mode = <0x2>;
459                                 regulator-state-disabled;
460                                 regulator-state-uv = <900000>;
461                         };
462                 };
463
464                 rk818_dcdc2_reg: regulator@1 {
465                         regulator-name= "vdd_logic";
466                         regulator-min-microvolt = <700000>;
467                         regulator-max-microvolt = <1500000>;
468                         regulator-initial-mode = <0x2>;
469                         regulator-initial-state = <3>;
470                         regulator-state-mem {
471                                 regulator-state-mode = <0x2>;
472                                 regulator-state-enabled;
473                                 regulator-state-uv = <900000>;
474                         };
475                 };
476
477                 rk818_dcdc3_reg: regulator@2 {
478                         regulator-name= "rk818_dcdc3";
479                         regulator-min-microvolt = <1200000>;
480                         regulator-max-microvolt = <1200000>;
481                         regulator-initial-mode = <0x2>;
482                         regulator-initial-state = <3>;
483                         regulator-state-mem {
484                                 regulator-state-mode = <0x2>;
485                                 regulator-state-enabled;
486                                 regulator-state-uv = <1200000>;
487                         };
488                 };
489
490                 rk818_dcdc4_reg: regulator@3 {
491                         regulator-name= "vccio";
492                         regulator-min-microvolt = <1800000>;
493                         regulator-max-microvolt = <3300000>;
494                         regulator-initial-mode = <0x2>;
495                         regulator-initial-state = <3>;
496                         regulator-state-mem {
497                                 regulator-state-mode = <0x2>;
498                                 regulator-state-enabled;
499                                 regulator-state-uv = <2800000>;
500                         };
501                 };
502
503                 rk818_ldo1_reg: regulator@4 {
504                         regulator-name= "rk818_ldo1";
505                         regulator-min-microvolt = <3300000>;
506                         regulator-max-microvolt = <3300000>;
507                         regulator-initial-state = <3>;
508                         regulator-state-mem {
509                                 regulator-state-enabled;
510                                 regulator-state-uv = <3300000>;
511                         };
512                 };
513
514                 rk818_ldo2_reg: regulator@5 {
515                         regulator-name= "rk818_ldo2";
516                         regulator-min-microvolt = <3000000>;
517                         regulator-max-microvolt = <3000000>;
518                         regulator-initial-state = <3>;
519                         regulator-state-mem {
520                                 regulator-state-enabled;
521                                 regulator-state-uv = <3000000>;
522                         };
523                 };
524
525                 rk818_ldo3_reg: regulator@6 {
526                         regulator-name= "rk818_ldo3";
527                         regulator-min-microvolt = <1100000>;
528                         regulator-max-microvolt = <1100000>;
529                         regulator-initial-state = <3>;
530                         regulator-state-mem {
531                                 regulator-state-enabled;
532                                 regulator-state-uv = <1100000>;
533                         };
534                 };
535
536                 rk818_ldo4_reg:regulator@7 {
537                         regulator-name= "rk818_ldo4";
538                         regulator-min-microvolt = <2800000>;
539                         regulator-max-microvolt = <2800000>;
540                         regulator-initial-state = <3>;
541                         regulator-state-mem {
542                                 regulator-state-enabled;
543                                 regulator-state-uv = <2500000>;
544                         };
545                 };
546
547                 rk818_ldo5_reg: regulator@8 {
548                         regulator-name= "rk818_ldo5";
549                         regulator-min-microvolt = <3000000>;
550                         regulator-max-microvolt = <3000000>;
551                         regulator-initial-state = <3>;
552                         regulator-state-mem {
553                                 regulator-state-enabled;
554                                 regulator-state-uv = <3000000>;
555                         };
556                 };
557
558                 rk818_ldo6_reg: regulator@9 {
559                         regulator-name= "rk818_ldo6";
560                         regulator-min-microvolt = <1200000>;
561                         regulator-max-microvolt = <1200000>;
562                         regulator-initial-state = <3>;
563                         regulator-state-mem {
564                                 regulator-state-enabled;
565                                 regulator-state-uv = <1200000>;
566                         };
567                 };
568
569                 rk818_ldo7_reg: regulator@10 {
570                         regulator-name= "rk818_ldo7";
571                         regulator-min-microvolt = <1800000>;
572                         regulator-max-microvolt = <1800000>;
573                         regulator-initial-state = <3>;
574                         regulator-state-mem {
575                                 regulator-state-enabled;
576                                 regulator-state-uv = <1800000>;
577                         };
578                 };
579
580                 rk818_ldo8_reg: regulator@11 {
581                         regulator-name= "rk818_ldo8";
582                         regulator-min-microvolt = <1800000>;
583                         regulator-max-microvolt = <1800000>;
584                         regulator-initial-state = <3>;
585                         regulator-state-mem {
586                                 regulator-state-enabled;
587                                 regulator-state-uv = <1800000>;
588                         };
589                 };
590                 rk818_ldo9_reg: regulator@12 {
591                         regulator-name= "vcc_sd";
592                         regulator-min-microvolt = <1800000>;
593                         regulator-max-microvolt = <3000000>;
594                         regulator-initial-state = <3>;
595                         regulator-state-mem {
596                                 regulator-state-enabled;
597                                 regulator-state-uv = <3000000>;
598                         };
599                 };
600                 rk818_ldo10_reg: regulator@13 {
601                         regulator-name= "rk818_ldo10";
602                         regulator-state-mem {
603                                 regulator-state-disabled;
604                         };
605                 };
606         };
607         battery {
608                 ocv_table = <3350 3677 3693 3719 3752 3770 3775 3778 3785 3796 3812 3839 3881 3907 3933 3958 3978 4033 4087 4123 4174>;
609                 design_capacity = <2100>;
610                 design_qmax = <2200>;
611                 max_overcharge = <100>;
612                 max_charge_currentmA = <1500>;
613                 max_charge_voltagemV = <4260>;
614                 max_bat_voltagemV = <4200>;
615         };
616
617 };
618 &clk_core_dvfs_table {
619         operating-points = <
620                 /* KHz    uV */
621                 408000 1300000
622                 600000 1300000
623                 696000 1300000
624                 816000 1300000
625                 1008000 1300000
626                 >;
627         status="okay";
628 };
629
630 &clk_gpu_dvfs_table {
631         operating-points = <
632                 /* KHz    uV */
633                 200000 1250000
634                 300000 1250000
635                 >;
636         status="okay";
637 };
638
639 &clk_ddr_dvfs_table {
640         operating-points = <
641                 /* KHz    uV */
642                 200000 950000
643                 300000 950000
644                 400000 1000000
645                 533000 1050000
646                 >;
647
648         freq-table = <
649                 /*status                freq(KHz)*/
650                 SYS_STATUS_NORMAL       400000
651                 SYS_STATUS_SUSPEND      200000
652                 SYS_STATUS_VIDEO_1080P  240000
653                 SYS_STATUS_VIDEO_4K     400000
654                 SYS_STATUS_PERFORMANCE  528000
655                 SYS_STATUS_DUALVIEW     400000
656                 SYS_STATUS_BOOST        324000
657                 SYS_STATUS_ISP          533000
658                 >;
659         auto-freq-table = <
660                 240000
661                 324000
662                 396000
663                 528000
664                 >;
665         auto-freq=<0>;
666         status="okay";
667 };
668
669 &pwm0 {
670         status = "okay";
671 };
672