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