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