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