rk312x: enable core dvfs, fix gpu dvfs table error
[firefly-linux-kernel-4.4.55.git] / arch / arm / boot / dts / rk312x-sdk.dtsi
1 /dts-v1/;
2
3 #include "rk312x.dtsi"
4 #include "lcd-b101ew05.dtsi"
5
6 / {
7         fiq-debugger {
8                 status = "okay";
9         };
10
11         chosen {
12                 bootargs = "vmalloc=512M clk_ignore_unused";
13         };
14
15         usb_control {
16                 compatible = "rockchip,rk3126-usb-control";
17                 host_drv_gpio = <&gpio2 GPIO_B4 GPIO_ACTIVE_LOW>;
18                 otg_drv_gpio = <&gpio2 GPIO_B6 GPIO_ACTIVE_LOW>;
19
20                 rockchip,remote_wakeup;
21                 rockchip,usb_irq_wakeup;
22         };
23 };
24
25 &nandc {
26         status = "okay"; // used nand set "okay" ,used emmc set "disabled"
27 };
28
29 &nandc0reg {
30         status = "disabled"; // used nand set "disabled" ,used emmc set "okay"
31 };
32
33 &emmc {
34         clock-frequency = <100000000>;
35         clock-freq-min-max = <400000 100000000>;
36         supports-highspeed;
37         supports-emmc;
38         bootpart-no-access;
39         supports-DDR_MODE;
40         //caps2-mmc-hs200;
41         ignore-pm-notify;
42         keep-power-in-suspend;
43         //poll-hw-reset
44         status = "disabled";
45 };
46
47 &sdmmc {
48         clock-frequency = <50000000>;
49         clock-freq-min-max = <400000 50000000>;
50         supports-highspeed;
51         supports-sd;
52         broken-cd;
53         card-detect-delay = <200>;
54         ignore-pm-notify;
55         keep-power-in-suspend;
56         //vmmc-supply = <&rk808_ldo5_reg>;
57         status = "disabled";
58 };
59
60 &sdio {
61         clock-frequency = <50000000>;
62         clock-freq-min-max = <200000 50000000>;
63         supports-highspeed;
64         supports-sdio;
65         ignore-pm-notify;
66         keep-power-in-suspend;
67         //cap-sdio-irq;
68         status = "disabled";
69 };
70
71 &adc {
72         status = "okay";
73
74         key {
75                 compatible = "rockchip,key";
76                 io-channels = <&adc 1>;
77
78                 vol-up-key {
79                         linux,code = <115>;
80                         label = "volume up";
81                         rockchip,adc_value = <1>;
82                 };
83
84                 vol-down-key {
85                         linux,code = <114>;
86                         label = "volume down";
87                         rockchip,adc_value = <170>;
88                 };
89
90                 power-key {
91                         gpios = <&gpio0 GPIO_A5 GPIO_ACTIVE_LOW>;
92                         linux,code = <116>;
93                         label = "power";
94                         gpio-key,wakeup;
95                 };
96
97                 menu-key {
98                         linux,code = <59>;
99                         label = "menu";
100                         rockchip,adc_value = <355>;
101                 };
102
103                 home-key {
104                         linux,code = <102>;
105                         label = "home";
106                         rockchip,adc_value = <746>;
107                 };
108
109                 back-key {
110                         linux,code = <158>;
111                         label = "back";
112                         rockchip,adc_value = <560>;
113                 };
114
115                 camera-key {
116                         linux,code = <212>;
117                         label = "camera";
118                         rockchip,adc_value = <450>;
119                 };
120         };
121 };
122
123
124 &i2c0 {
125         status = "okay";
126         rk818: rk818@1c {
127                 reg = <0x1c>;
128                 status = "okay";
129         };
130 };
131 &i2c2 {
132         status = "okay";
133         ts@01 {
134                 compatible = "ct,vtl_ts";
135                 reg = <0x01>;
136                 screen_max_x = <1280>;
137                 screen_max_y = <800>;
138                 irq_gpio_number = <&gpio1 GPIO_B0 IRQ_TYPE_LEVEL_LOW>;
139                 rst_gpio_number = <&gpio2 GPIO_C1 GPIO_ACTIVE_HIGH>;
140         };
141 };
142
143 &fb {
144         rockchip,disp-mode = <ONE_DUAL>;
145         rockchip,uboot-logo-on = <0>;
146 };
147
148 &rk_screen {
149         display-timings = <&disp_timings>;
150 };
151
152 &hdmi {
153         status = "okay";
154 };
155
156 /include/ "rk818.dtsi"
157 &rk818 {
158         gpios =<&gpio1 GPIO_B1 GPIO_ACTIVE_HIGH>,<&gpio1 GPIO_A1 GPIO_ACTIVE_LOW>;
159         rk818,system-power-controller;
160
161         regulators {
162
163                 rk818_dcdc1_reg: regulator@0{
164                         regulator-name= "vdd_arm";
165                         regulator-min-microvolt = <700000>;
166                         regulator-max-microvolt = <1500000>;
167                         regulator-initial-mode = <0x2>;
168                         regulator-initial-state = <3>;
169                         regulator-state-mem {
170                                 regulator-state-mode = <0x2>;
171                                 regulator-state-enabled;
172                                 regulator-state-uv = <900000>;
173                         };
174                 };
175
176                 rk818_dcdc2_reg: regulator@1 {
177                         regulator-name= "vdd_logic";
178                         regulator-min-microvolt = <700000>;
179                         regulator-max-microvolt = <1500000>;
180                         regulator-initial-mode = <0x2>;
181                         regulator-initial-state = <3>;
182                         regulator-state-mem {
183                                 regulator-state-mode = <0x2>;
184                                 regulator-state-enabled;
185                                 regulator-state-uv = <900000>;
186                         };
187                 };
188
189                 rk818_dcdc3_reg: regulator@2 {
190                         regulator-name= "rk818_dcdc3";
191                         regulator-min-microvolt = <1200000>;
192                         regulator-max-microvolt = <1200000>;
193                         regulator-initial-mode = <0x2>;
194                         regulator-initial-state = <3>;
195                         regulator-state-mem {
196                                 regulator-state-mode = <0x2>;
197                                 regulator-state-disabled;
198                                 regulator-state-uv = <1200000>;
199                         };
200                 };
201
202                 rk818_dcdc4_reg: regulator@3 {
203                         regulator-name= "vccio";
204                         regulator-min-microvolt = <1800000>;
205                         regulator-max-microvolt = <3300000>;
206                         regulator-initial-mode = <0x2>;
207                         regulator-initial-state = <3>;
208                         regulator-state-mem {
209                                 regulator-state-mode = <0x2>;
210                                 regulator-state-disabled;
211                                 regulator-state-uv = <2800000>;
212                         };
213                 };
214
215                 rk818_ldo1_reg: regulator@4 {
216                         regulator-name= "rk818_ldo1";
217                         regulator-min-microvolt = <3300000>;
218                         regulator-max-microvolt = <3300000>;
219                         regulator-initial-state = <3>;
220                         regulator-state-mem {
221                                 regulator-state-disabled;
222                                 regulator-state-uv = <3300000>;
223                         };
224                 };
225
226                 rk818_ldo2_reg: regulator@5 {
227                         regulator-name= "rk818_ldo2";
228                         regulator-min-microvolt = <3000000>;
229                         regulator-max-microvolt = <3000000>;
230                         regulator-initial-state = <3>;
231                         regulator-state-mem {
232                                 regulator-state-disabled;
233                                 regulator-state-uv = <3000000>;
234                         };
235                 };
236
237                 rk818_ldo3_reg: regulator@6 {
238                         regulator-name= "rk818_ldo3";
239                         regulator-min-microvolt = <1100000>;
240                         regulator-max-microvolt = <1100000>;
241                         regulator-initial-state = <3>;
242                         regulator-state-mem {
243                                 regulator-state-disabled;
244                                 regulator-state-uv = <1100000>;
245                         };
246                 };
247
248                 rk818_ldo4_reg:regulator@7 {
249                         regulator-name= "rk818_ldo4";
250                         regulator-min-microvolt = <2500000>;
251                         regulator-max-microvolt = <2500000>;
252                         regulator-initial-state = <3>;
253                         regulator-state-mem {
254                                 regulator-state-disabled;
255                                 regulator-state-uv = <2500000>;
256                         };
257                 };
258
259                 rk818_ldo5_reg: regulator@8 {
260                         regulator-name= "rk818_ldo5";
261                         regulator-min-microvolt = <3000000>;
262                         regulator-max-microvolt = <3000000>;
263                         regulator-initial-state = <3>;
264                         regulator-state-mem {
265                                 regulator-state-disabled;
266                                 regulator-state-uv = <3000000>;
267                         };
268                 };
269
270                 rk818_ldo6_reg: regulator@9 {
271                         regulator-name= "rk818_ldo6";
272                         regulator-min-microvolt = <1200000>;
273                         regulator-max-microvolt = <1200000>;
274                         regulator-initial-state = <3>;
275                         regulator-state-mem {
276                                 regulator-state-disabled;
277                                 regulator-state-uv = <1200000>;
278                         };
279                 };
280
281                 rk818_ldo7_reg: regulator@10 {
282                         regulator-name= "rk818_ldo7";
283                         regulator-min-microvolt = <1800000>;
284                         regulator-max-microvolt = <1800000>;
285                         regulator-initial-state = <3>;
286                         regulator-state-mem {
287                                 regulator-state-disabled;
288                                 regulator-state-uv = <1800000>;
289                         };
290                 };
291
292                 rk818_ldo8_reg: regulator@11 {
293                         regulator-name= "rk818_ldo8";
294                         regulator-min-microvolt = <1800000>;
295                         regulator-max-microvolt = <1800000>;
296                         regulator-initial-state = <3>;
297                         regulator-state-mem {
298                                 regulator-state-disabled;
299                                 regulator-state-uv = <1800000>;
300                         };
301                 };
302                 rk818_ldo9_reg: regulator@12 {
303                         regulator-name= "vcc_sd";
304                         regulator-min-microvolt = <1800000>;
305                         regulator-max-microvolt = <3000000>;
306                         regulator-initial-state = <3>;
307                         regulator-state-mem {
308                                 regulator-state-disabled;
309                                 regulator-state-uv = <3000000>;
310                         };
311                 };
312                 rk818_ldo10_reg: regulator@13 {
313                         regulator-name= "rk818_ldo10";
314                         regulator-state-mem {
315                                 regulator-state-disabled;
316                         };
317                 };
318         };
319         battery {
320                 ocv_table = <3350 3677 3693 3719 3752 3770 3775 3778 3785 3796 3812 3839 3881 3907 3933 3958 3978 4033 4087 4123 4174>;
321                 design_capacity = <2100>;
322                 design_qmax = <2200>;
323                 max_overcharge = <100>;
324                 max_charge_currentmA = <1500>;
325                 max_charge_voltagemV = <4260>;
326                 max_bat_voltagemV = <4200>;
327         };
328
329 };
330 &clk_core_dvfs_table {
331         operating-points = <
332                 /* KHz    uV */
333                 408000 1250000
334                 600000 1250000
335                 696000 1250000
336                 816000 1250000
337                 1008000 1250000
338                 >;
339         status="okay";
340 };
341
342 &clk_gpu_dvfs_table {
343         operating-points = <
344                 /* KHz    uV */
345                 200000 1250000
346                 300000 1250000
347                 >;
348         status="okay";
349 };
350
351 &clk_ddr_dvfs_table {
352         operating-points = <
353                 /* KHz    uV */
354                 200000 950000
355                 300000 950000
356                 400000 1000000
357                 533000 1050000
358                 >;
359
360         freq-table = <
361                 /*status                freq(KHz)*/
362                 SYS_STATUS_NORMAL       400000
363                 SYS_STATUS_SUSPEND      200000
364                 SYS_STATUS_VIDEO_1080P  240000
365                 SYS_STATUS_VIDEO_4K     400000
366                 SYS_STATUS_PERFORMANCE  528000
367                 SYS_STATUS_DUALVIEW     400000
368                 SYS_STATUS_BOOST        324000
369                 SYS_STATUS_ISP          533000
370                 >;
371         auto-freq-table = <
372                 240000
373                 324000
374                 396000
375                 528000
376                 >;
377         auto-freq=<0>;
378         status="disable";
379 };
380
381 &pwm0 {
382         status = "okay";
383 };