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