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