rk312x: mistaken commit of rk312x-sdk.dtsi file in commit 45023a37a5cb1955210838ee54...
[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=512M clk_ignore_unused";
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 = <100000000>;
77         clock-freq-min-max = <400000 100000000>;
78         supports-highspeed;
79         supports-emmc;
80         bootpart-no-access;
81         supports-DDR_MODE;
82         //caps2-mmc-hs200;
83         ignore-pm-notify;
84         keep-power-in-suspend;
85         //poll-hw-reset
86         status = "disabled";
87 };
88
89 &sdmmc {
90         clock-frequency = <50000000>;
91         clock-freq-min-max = <400000 50000000>;
92         supports-highspeed;
93         supports-sd;
94         cd-gpios = <&gpio2 GPIO_A7 GPIO_ACTIVE_HIGH>;/*CD GPIO*/
95         broken-cd;
96         card-detect-delay = <200>;
97         ignore-pm-notify;
98         keep-power-in-suspend;
99         vmmc-supply = <&rk818_ldo9_reg>;
100         status = "disabled";
101 };
102
103 &sdio {
104         clock-frequency = <50000000>;
105         clock-freq-min-max = <200000 50000000>;
106         supports-highspeed;
107         supports-sdio;
108         ignore-pm-notify;
109         keep-power-in-suspend;
110         //cap-sdio-irq;
111         status = "disabled";
112 };
113
114 &adc {
115         status = "okay";
116
117         key: key {
118                 compatible = "rockchip,key";
119                 io-channels = <&adc 1>;
120
121                 vol-up-key {
122                         linux,code = <115>;
123                         label = "volume up";
124                         rockchip,adc_value = <327>;
125                 };
126
127                 vol-down-key {
128                         linux,code = <114>;
129                         label = "volume down";
130                         rockchip,adc_value = <426>;
131                 };
132
133                 power-key {
134                         gpios = <&gpio0 GPIO_A5 GPIO_ACTIVE_LOW>;
135                         linux,code = <116>;
136                         label = "power";
137                         gpio-key,wakeup;
138                 };
139
140                 menu-key {
141                         linux,code = <59>;
142                         label = "menu";
143                         rockchip,adc_value = <1>;
144                 };
145
146                 home-key {
147                         linux,code = <102>;
148                         label = "home";
149                         rockchip,adc_value = <746>;
150                 };
151
152                 back-key {
153                         linux,code = <158>;
154                         label = "back";
155                         rockchip,adc_value = <103>;
156                 };
157
158                 camera-key {
159                         linux,code = <212>;
160                         label = "camera";
161                         rockchip,adc_value = <450>;
162                 };
163         };
164 };
165
166
167 &i2c0 {
168         status = "okay";
169         rk818: rk818@1c {
170                 reg = <0x1c>;
171                 status = "okay";
172         };
173 };
174 &i2c2 {
175         status = "okay";
176         ts@55 {
177                 compatible = "goodix,gt8xx";
178                 reg = <0x55>;
179                 touch-gpio = <&gpio1 GPIO_B0 IRQ_TYPE_LEVEL_LOW>;
180                 reset-gpio = <&gpio2 GPIO_C1 GPIO_ACTIVE_LOW>;
181                 //power-gpio = <&gpio0 GPIO_C5 GPIO_ACTIVE_LOW>;
182                 max-x = <1280>;
183                 max-y = <800>;
184         };
185         /*
186         ts@01 {
187                 compatible = "ct,vtl_ts";
188                 reg = <0x01>;
189                 screen_max_x = <1280>;
190                 screen_max_y = <800>;
191                 irq_gpio_number = <&gpio1 GPIO_B0 IRQ_TYPE_LEVEL_LOW>;
192                 rst_gpio_number = <&gpio2 GPIO_C1 GPIO_ACTIVE_HIGH>;
193         };
194         */
195 };
196
197 &fb {
198         rockchip,disp-mode = <ONE_DUAL>;
199         rockchip,uboot-logo-on = <0>;
200 };
201
202 &hdmi {
203         status = "okay";
204 };
205
206 /include/ "rk818.dtsi"
207 &rk818 {
208         gpios =<&gpio1 GPIO_B1 GPIO_ACTIVE_HIGH>,<&gpio1 GPIO_A1 GPIO_ACTIVE_LOW>;
209         rk818,system-power-controller;
210         rk818,support_dc_chg = <1>;/*1: dc chg; 0:usb chg*/
211
212         regulators {
213
214                 rk818_dcdc1_reg: regulator@0{
215                         regulator-name= "vdd_arm";
216                         regulator-min-microvolt = <700000>;
217                         regulator-max-microvolt = <1500000>;
218                         regulator-initial-mode = <0x2>;
219                         regulator-initial-state = <3>;
220                         regulator-state-mem {
221                                 regulator-state-mode = <0x2>;
222                                 regulator-state-disabled;
223                                 regulator-state-uv = <900000>;
224                         };
225                 };
226
227                 rk818_dcdc2_reg: regulator@1 {
228                         regulator-name= "vdd_logic";
229                         regulator-min-microvolt = <700000>;
230                         regulator-max-microvolt = <1500000>;
231                         regulator-initial-mode = <0x2>;
232                         regulator-initial-state = <3>;
233                         regulator-state-mem {
234                                 regulator-state-mode = <0x2>;
235                                 regulator-state-enabled;
236                                 regulator-state-uv = <900000>;
237                         };
238                 };
239
240                 rk818_dcdc3_reg: regulator@2 {
241                         regulator-name= "rk818_dcdc3";
242                         regulator-min-microvolt = <1200000>;
243                         regulator-max-microvolt = <1200000>;
244                         regulator-initial-mode = <0x2>;
245                         regulator-initial-state = <3>;
246                         regulator-state-mem {
247                                 regulator-state-mode = <0x2>;
248                                 regulator-state-enabled;
249                                 regulator-state-uv = <1200000>;
250                         };
251                 };
252
253                 rk818_dcdc4_reg: regulator@3 {
254                         regulator-name= "vccio";
255                         regulator-min-microvolt = <1800000>;
256                         regulator-max-microvolt = <3300000>;
257                         regulator-initial-mode = <0x2>;
258                         regulator-initial-state = <3>;
259                         regulator-state-mem {
260                                 regulator-state-mode = <0x2>;
261                                 regulator-state-enabled;
262                                 regulator-state-uv = <2800000>;
263                         };
264                 };
265
266                 rk818_ldo1_reg: regulator@4 {
267                         regulator-name= "rk818_ldo1";
268                         regulator-min-microvolt = <3300000>;
269                         regulator-max-microvolt = <3300000>;
270                         regulator-initial-state = <3>;
271                         regulator-state-mem {
272                                 regulator-state-enabled;
273                                 regulator-state-uv = <3300000>;
274                         };
275                 };
276
277                 rk818_ldo2_reg: regulator@5 {
278                         regulator-name= "rk818_ldo2";
279                         regulator-min-microvolt = <3000000>;
280                         regulator-max-microvolt = <3000000>;
281                         regulator-initial-state = <3>;
282                         regulator-state-mem {
283                                 regulator-state-enabled;
284                                 regulator-state-uv = <3000000>;
285                         };
286                 };
287
288                 rk818_ldo3_reg: regulator@6 {
289                         regulator-name= "rk818_ldo3";
290                         regulator-min-microvolt = <1100000>;
291                         regulator-max-microvolt = <1100000>;
292                         regulator-initial-state = <3>;
293                         regulator-state-mem {
294                                 regulator-state-enabled;
295                                 regulator-state-uv = <1100000>;
296                         };
297                 };
298
299                 rk818_ldo4_reg:regulator@7 {
300                         regulator-name= "rk818_ldo4";
301                         regulator-min-microvolt = <2500000>;
302                         regulator-max-microvolt = <2500000>;
303                         regulator-initial-state = <3>;
304                         regulator-state-mem {
305                                 regulator-state-enabled;
306                                 regulator-state-uv = <2500000>;
307                         };
308                 };
309
310                 rk818_ldo5_reg: regulator@8 {
311                         regulator-name= "rk818_ldo5";
312                         regulator-min-microvolt = <3000000>;
313                         regulator-max-microvolt = <3000000>;
314                         regulator-initial-state = <3>;
315                         regulator-state-mem {
316                                 regulator-state-enabled;
317                                 regulator-state-uv = <3000000>;
318                         };
319                 };
320
321                 rk818_ldo6_reg: regulator@9 {
322                         regulator-name= "rk818_ldo6";
323                         regulator-min-microvolt = <1200000>;
324                         regulator-max-microvolt = <1200000>;
325                         regulator-initial-state = <3>;
326                         regulator-state-mem {
327                                 regulator-state-enabled;
328                                 regulator-state-uv = <1200000>;
329                         };
330                 };
331
332                 rk818_ldo7_reg: regulator@10 {
333                         regulator-name= "rk818_ldo7";
334                         regulator-min-microvolt = <1800000>;
335                         regulator-max-microvolt = <1800000>;
336                         regulator-initial-state = <3>;
337                         regulator-state-mem {
338                                 regulator-state-enabled;
339                                 regulator-state-uv = <1800000>;
340                         };
341                 };
342
343                 rk818_ldo8_reg: regulator@11 {
344                         regulator-name= "rk818_ldo8";
345                         regulator-min-microvolt = <1800000>;
346                         regulator-max-microvolt = <1800000>;
347                         regulator-initial-state = <3>;
348                         regulator-state-mem {
349                                 regulator-state-enabled;
350                                 regulator-state-uv = <1800000>;
351                         };
352                 };
353                 rk818_ldo9_reg: regulator@12 {
354                         regulator-name= "vcc_sd";
355                         regulator-min-microvolt = <1800000>;
356                         regulator-max-microvolt = <3000000>;
357                         regulator-initial-state = <3>;
358                         regulator-state-mem {
359                                 regulator-state-enabled;
360                                 regulator-state-uv = <3000000>;
361                         };
362                 };
363                 rk818_ldo10_reg: regulator@13 {
364                         regulator-name= "rk818_ldo10";
365                         regulator-state-mem {
366                                 regulator-state-disabled;
367                         };
368                 };
369         };
370         battery {
371                 ocv_table = <3350 3677 3693 3719 3752 3770 3775 3778 3785 3796 3812 3839 3881 3907 3933 3958 3978 4033 4087 4123 4174>;
372                 design_capacity = <2100>;
373                 design_qmax = <2200>;
374                 max_overcharge = <100>;
375                 max_charge_currentmA = <1500>;
376                 max_charge_voltagemV = <4260>;
377                 max_bat_voltagemV = <4200>;
378         };
379
380 };
381 &clk_core_dvfs_table {
382         operating-points = <
383                 /* KHz    uV */
384                 408000 1250000
385                 600000 1250000
386                 696000 1250000
387                 816000 1250000
388                 1008000 1250000
389                 >;
390         status="okay";
391 };
392
393 &clk_gpu_dvfs_table {
394         operating-points = <
395                 /* KHz    uV */
396                 200000 1250000
397                 300000 1250000
398                 >;
399         status="okay";
400 };
401
402 &clk_ddr_dvfs_table {
403         operating-points = <
404                 /* KHz    uV */
405                 200000 950000
406                 300000 950000
407                 400000 1000000
408                 533000 1050000
409                 >;
410
411         freq-table = <
412                 /*status                freq(KHz)*/
413                 SYS_STATUS_NORMAL       400000
414                 SYS_STATUS_SUSPEND      200000
415                 SYS_STATUS_VIDEO_1080P  240000
416                 SYS_STATUS_VIDEO_4K     400000
417                 SYS_STATUS_PERFORMANCE  528000
418                 SYS_STATUS_DUALVIEW     400000
419                 SYS_STATUS_BOOST        324000
420                 SYS_STATUS_ISP          533000
421                 >;
422         auto-freq-table = <
423                 240000
424                 324000
425                 396000
426                 528000
427                 >;
428         auto-freq=<0>;
429         status="disable";
430 };
431
432 &pwm0 {
433         status = "okay";
434 };
435
436 &cif_sensor{
437         status = "okay";
438 };