Merge remote-tracking branch 'origin/develop-3.10' into develop-3.10-next
[firefly-linux-kernel-4.4.55.git] / arch / arm / boot / dts / rk312x-sdk.dtsi
1 /dts-v1/;
2
3 #include "rk312x.dtsi"
4
5 / {
6         fiq-debugger {
7                 status = "okay";
8         };
9
10         chosen {
11                 bootargs = "vmalloc=512M clk_ignore_unused";
12         };
13
14         pwm_regulator1:pwm-regulator1 {
15                 compatible = "rockchip_pwm_regulator";
16                 pwms = <&pwm1 0 25000>;
17                 rockchip,pwm_id= <1>;
18                 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>;
19                 rockchip,pwm_voltage= <1250000>;
20                 rockchip,pwm_min_voltage= <950000>;
21                 rockchip,pwm_max_voltage= <1450000>;
22                 rockchip,pwm_suspend_voltage= <1250000>;
23                 rockchip,pwm_coefficient= <550>;
24                 status = "disabled";
25                 regulators {
26                         #address-cells = <1>;
27                         #size-cells = <0>;
28                         pwm_reg0: regulator@0 {
29                                 regulator-compatible = "pwm_dcdc1";
30                                 regulator-name= "vdd_arm";
31                                 regulator-min-microvolt = <950000>;
32                                 regulator-max-microvolt = <1450000>;
33                                 regulator-always-on;
34                                 regulator-boot-on;
35                         };
36                 };
37         };
38
39         pwm_regulator2:pwm-regulator2 {
40                 compatible = "rockchip_pwm_regulator";
41                 pwms = <&pwm2 0 25000>;
42                 rockchip,pwm_id= <2>;
43                 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>;
44                 rockchip,pwm_voltage= <1200000>;
45                 rockchip,pwm_min_voltage= <950000>;
46                 rockchip,pwm_max_voltage= <1450000>;
47                 rockchip,pwm_suspend_voltage= <1250000>;
48                 rockchip,pwm_coefficient= <550>;
49                 status = "disabled";
50                 regulators {
51                         #address-cells = <1>;
52                         #size-cells = <0>;
53                         pwm_reg1: regulator@1 {
54                                 regulator-compatible = "pwm_dcdc2";
55                                 regulator-name= "vdd_logic";
56                                 regulator-min-microvolt = <950000>;
57                                 regulator-max-microvolt = <1450000>;
58                                 regulator-always-on;
59                                 regulator-boot-on;
60                         };
61                 };
62         };
63
64 };
65
66 &nandc {
67         status = "okay"; // used nand set "okay" ,used emmc set "disabled"
68 };
69
70 &nandc0reg {
71         status = "disabled"; // used nand set "disabled" ,used emmc set "okay"
72 };
73
74 &emmc {
75         clock-frequency = <100000000>;
76         clock-freq-min-max = <400000 100000000>;
77         supports-highspeed;
78         supports-emmc;
79         bootpart-no-access;
80         supports-DDR_MODE;
81         //caps2-mmc-hs200;
82         ignore-pm-notify;
83         keep-power-in-suspend;
84         //poll-hw-reset
85         status = "disabled";
86 };
87
88 &sdmmc {
89         clock-frequency = <50000000>;
90         clock-freq-min-max = <400000 50000000>;
91         supports-highspeed;
92         supports-sd;
93         cd-gpios = <&gpio2 GPIO_A7 GPIO_ACTIVE_HIGH>;/*CD GPIO*/
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 = <50000000>;
104         clock-freq-min-max = <200000 50000000>;
105         supports-highspeed;
106         supports-sdio;
107         ignore-pm-notify;
108         keep-power-in-suspend;
109         //cap-sdio-irq;
110         status = "disabled";
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 = <327>;
124                 };
125
126                 vol-down-key {
127                         linux,code = <114>;
128                         label = "volume down";
129                         rockchip,adc_value = <426>;
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 = <746>;
149                 };
150
151                 back-key {
152                         linux,code = <158>;
153                         label = "back";
154                         rockchip,adc_value = <103>;
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 };
173 &i2c2 {
174         status = "okay";
175         ts@55 {
176                 compatible = "goodix,gt8xx";
177                 reg = <0x55>;
178                 touch-gpio = <&gpio1 GPIO_B0 IRQ_TYPE_LEVEL_LOW>;
179                 reset-gpio = <&gpio2 GPIO_C1 GPIO_ACTIVE_LOW>;
180                 //power-gpio = <&gpio0 GPIO_C5 GPIO_ACTIVE_LOW>;
181                 max-x = <1280>;
182                 max-y = <800>;
183         };
184         /*
185         ts@01 {
186                 compatible = "ct,vtl_ts";
187                 reg = <0x01>;
188                 screen_max_x = <1280>;
189                 screen_max_y = <800>;
190                 irq_gpio_number = <&gpio1 GPIO_B0 IRQ_TYPE_LEVEL_LOW>;
191                 rst_gpio_number = <&gpio2 GPIO_C1 GPIO_ACTIVE_HIGH>;
192         };
193         */
194 };
195
196 &fb {
197         rockchip,disp-mode = <ONE_DUAL>;
198         rockchip,uboot-logo-on = <0>;
199 };
200
201 &hdmi {
202         status = "okay";
203 };
204
205 /include/ "rk818.dtsi"
206 &rk818 {
207         gpios =<&gpio1 GPIO_B1 GPIO_ACTIVE_HIGH>,<&gpio1 GPIO_A1 GPIO_ACTIVE_LOW>;
208         rk818,system-power-controller;
209         rk818,support_dc_chg = <1>;/*1: dc chg; 0:usb chg*/
210
211         regulators {
212
213                 rk818_dcdc1_reg: regulator@0{
214                         regulator-name= "vdd_arm";
215                         regulator-min-microvolt = <700000>;
216                         regulator-max-microvolt = <1500000>;
217                         regulator-initial-mode = <0x2>;
218                         regulator-initial-state = <3>;
219                         regulator-state-mem {
220                                 regulator-state-mode = <0x2>;
221                                 regulator-state-enabled;
222                                 regulator-state-uv = <900000>;
223                         };
224                 };
225
226                 rk818_dcdc2_reg: regulator@1 {
227                         regulator-name= "vdd_logic";
228                         regulator-min-microvolt = <700000>;
229                         regulator-max-microvolt = <1500000>;
230                         regulator-initial-mode = <0x2>;
231                         regulator-initial-state = <3>;
232                         regulator-state-mem {
233                                 regulator-state-mode = <0x2>;
234                                 regulator-state-enabled;
235                                 regulator-state-uv = <900000>;
236                         };
237                 };
238
239                 rk818_dcdc3_reg: regulator@2 {
240                         regulator-name= "rk818_dcdc3";
241                         regulator-min-microvolt = <1200000>;
242                         regulator-max-microvolt = <1200000>;
243                         regulator-initial-mode = <0x2>;
244                         regulator-initial-state = <3>;
245                         regulator-state-mem {
246                                 regulator-state-mode = <0x2>;
247                                 regulator-state-disabled;
248                                 regulator-state-uv = <1200000>;
249                         };
250                 };
251
252                 rk818_dcdc4_reg: regulator@3 {
253                         regulator-name= "vccio";
254                         regulator-min-microvolt = <1800000>;
255                         regulator-max-microvolt = <3300000>;
256                         regulator-initial-mode = <0x2>;
257                         regulator-initial-state = <3>;
258                         regulator-state-mem {
259                                 regulator-state-mode = <0x2>;
260                                 regulator-state-disabled;
261                                 regulator-state-uv = <2800000>;
262                         };
263                 };
264
265                 rk818_ldo1_reg: regulator@4 {
266                         regulator-name= "rk818_ldo1";
267                         regulator-min-microvolt = <3300000>;
268                         regulator-max-microvolt = <3300000>;
269                         regulator-initial-state = <3>;
270                         regulator-state-mem {
271                                 regulator-state-disabled;
272                                 regulator-state-uv = <3300000>;
273                         };
274                 };
275
276                 rk818_ldo2_reg: regulator@5 {
277                         regulator-name= "rk818_ldo2";
278                         regulator-min-microvolt = <3000000>;
279                         regulator-max-microvolt = <3000000>;
280                         regulator-initial-state = <3>;
281                         regulator-state-mem {
282                                 regulator-state-disabled;
283                                 regulator-state-uv = <3000000>;
284                         };
285                 };
286
287                 rk818_ldo3_reg: regulator@6 {
288                         regulator-name= "rk818_ldo3";
289                         regulator-min-microvolt = <1100000>;
290                         regulator-max-microvolt = <1100000>;
291                         regulator-initial-state = <3>;
292                         regulator-state-mem {
293                                 regulator-state-disabled;
294                                 regulator-state-uv = <1100000>;
295                         };
296                 };
297
298                 rk818_ldo4_reg:regulator@7 {
299                         regulator-name= "rk818_ldo4";
300                         regulator-min-microvolt = <2500000>;
301                         regulator-max-microvolt = <2500000>;
302                         regulator-initial-state = <3>;
303                         regulator-state-mem {
304                                 regulator-state-disabled;
305                                 regulator-state-uv = <2500000>;
306                         };
307                 };
308
309                 rk818_ldo5_reg: regulator@8 {
310                         regulator-name= "rk818_ldo5";
311                         regulator-min-microvolt = <3000000>;
312                         regulator-max-microvolt = <3000000>;
313                         regulator-initial-state = <3>;
314                         regulator-state-mem {
315                                 regulator-state-disabled;
316                                 regulator-state-uv = <3000000>;
317                         };
318                 };
319
320                 rk818_ldo6_reg: regulator@9 {
321                         regulator-name= "rk818_ldo6";
322                         regulator-min-microvolt = <1200000>;
323                         regulator-max-microvolt = <1200000>;
324                         regulator-initial-state = <3>;
325                         regulator-state-mem {
326                                 regulator-state-disabled;
327                                 regulator-state-uv = <1200000>;
328                         };
329                 };
330
331                 rk818_ldo7_reg: regulator@10 {
332                         regulator-name= "rk818_ldo7";
333                         regulator-min-microvolt = <1800000>;
334                         regulator-max-microvolt = <1800000>;
335                         regulator-initial-state = <3>;
336                         regulator-state-mem {
337                                 regulator-state-disabled;
338                                 regulator-state-uv = <1800000>;
339                         };
340                 };
341
342                 rk818_ldo8_reg: regulator@11 {
343                         regulator-name= "rk818_ldo8";
344                         regulator-min-microvolt = <1800000>;
345                         regulator-max-microvolt = <1800000>;
346                         regulator-initial-state = <3>;
347                         regulator-state-mem {
348                                 regulator-state-disabled;
349                                 regulator-state-uv = <1800000>;
350                         };
351                 };
352                 rk818_ldo9_reg: regulator@12 {
353                         regulator-name= "vcc_sd";
354                         regulator-min-microvolt = <1800000>;
355                         regulator-max-microvolt = <3000000>;
356                         regulator-initial-state = <3>;
357                         regulator-state-mem {
358                                 regulator-state-disabled;
359                                 regulator-state-uv = <3000000>;
360                         };
361                 };
362                 rk818_ldo10_reg: regulator@13 {
363                         regulator-name= "rk818_ldo10";
364                         regulator-state-mem {
365                                 regulator-state-disabled;
366                         };
367                 };
368         };
369         battery {
370                 ocv_table = <3350 3677 3693 3719 3752 3770 3775 3778 3785 3796 3812 3839 3881 3907 3933 3958 3978 4033 4087 4123 4174>;
371                 design_capacity = <2100>;
372                 design_qmax = <2200>;
373                 max_overcharge = <100>;
374                 max_charge_currentmA = <1500>;
375                 max_charge_voltagemV = <4260>;
376                 max_bat_voltagemV = <4200>;
377         };
378
379 };
380 &clk_core_dvfs_table {
381         operating-points = <
382                 /* KHz    uV */
383                 408000 1250000
384                 600000 1250000
385                 696000 1250000
386                 816000 1250000
387                 1008000 1250000
388                 >;
389         status="okay";
390 };
391
392 &clk_gpu_dvfs_table {
393         operating-points = <
394                 /* KHz    uV */
395                 200000 1250000
396                 300000 1250000
397                 >;
398         status="okay";
399 };
400
401 &clk_ddr_dvfs_table {
402         operating-points = <
403                 /* KHz    uV */
404                 200000 950000
405                 300000 950000
406                 400000 1000000
407                 533000 1050000
408                 >;
409
410         freq-table = <
411                 /*status                freq(KHz)*/
412                 SYS_STATUS_NORMAL       400000
413                 SYS_STATUS_SUSPEND      200000
414                 SYS_STATUS_VIDEO_1080P  240000
415                 SYS_STATUS_VIDEO_4K     400000
416                 SYS_STATUS_PERFORMANCE  528000
417                 SYS_STATUS_DUALVIEW     400000
418                 SYS_STATUS_BOOST        324000
419                 SYS_STATUS_ISP          533000
420                 >;
421         auto-freq-table = <
422                 240000
423                 324000
424                 396000
425                 528000
426                 >;
427         auto-freq=<0>;
428         status="disable";
429 };
430
431 &pwm0 {
432         status = "okay";
433 };