wifi: enable sdio interface. add wifi resources into dts.
[firefly-linux-kernel-4.4.55.git] / arch / arm / boot / dts / rk3188-tb.dts
1 /dts-v1/;
2
3 #include "rk3188.dtsi"
4 #include "rk3188-clocks.dtsi"
5 #include "lcd-b101ew05.dtsi"
6 #include "rk3188-mmc.dtsi"
7
8 / {
9         memory {
10                 device_type = "memory";
11                 reg = <0x60000000 0x40000000>;
12         };
13
14         chosen {
15                 bootargs = "clk_ignore_unused";
16         };
17
18         fiq-debugger {
19                 status = "okay";
20         };
21
22     wireless-wlan {
23         compatible = "wlan-platdata";
24         wifi_chip_type = "";
25         sdio_vref = <28000>;
26
27         wlan_ctrl_pmic {
28            power_ctrl_by_pmu = "false";
29            pmu_regulator = "act_ldo3";
30            pmu_enable_level = <1>; //1->HIGH, 0->LOW
31         };
32
33         wlan_ctrl_gpios {
34             gpio0 {
35                 pin-func = "wlan_poweren";
36                 gpios = <&gpio3 GPIO_D0 GPIO_ACTIVE_HIGH>;
37             };
38
39             gpio1 {
40                 pin-func = "wlan_reset";
41                 #gpios = <&gpio0 GPIO_A2 GPIO_ACTIVE_LOW>;
42             };
43
44             gpio2 {
45                 pin-func = "wlan_wake_host_irq";
46                 gpios = <&gpio3 GPIO_D2 GPIO_ACTIVE_HIGH>;
47             };
48         };
49     };
50
51         backlight {
52                 compatible = "pwm-backlight";
53                 pwms = <&pwm3 0 25000>;
54                 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>;
55                 default-brightness-level = <128>;
56                 enable-gpios = <&gpio0 GPIO_A2 GPIO_ACTIVE_HIGH>;
57         };
58
59         codec-hdmi-i2s {
60                 compatible = "hdmi-i2s";
61         };
62
63         codec-hdmi-spdif {
64                 compatible = "hdmi-spdif";
65         };
66
67         rockchip-rt5631 {
68                 compatible = "rockchip-rt5631";
69                 dais {
70                         dai0 {
71                                 codec-name = "rt5631.0-001a";
72                                 cpu-dai-name = "rockchip-i2s.1";
73                                 format = "i2s";
74                                 //continuous-clock;
75                                 //bitclock-inversion;
76                                 //frame-inversion;
77                                 //bitclock-master;
78                                 //frame-master;
79                         };
80                 };
81         };
82
83         rockchip-hdmi-i2s {
84                 compatible = "rockchip-hdmi-i2s";
85                 dais {
86                         dai0 {
87                                 codec-name = "hdmi-i2s";
88                                 cpu-dai-name = "rockchip-i2s.1";
89                                 format = "i2s";
90                                 //continuous-clock;
91                                 //bitclock-inversion;
92                                 //frame-inversion;
93                                 //bitclock-master;
94                                 //frame-master;
95                         };
96                 };
97         };
98
99         rockchip-hdmi-spdif {
100                 compatible = "rockchip-hdmi-spdif";
101         };
102 };
103
104 &uart0 {
105         status = "okay";
106 };
107
108 &uart3 {
109         status = "okay";
110 };
111
112 &i2c0 {
113         status = "okay";
114         codec@1a {
115                 compatible = "rt5631";
116                 reg = <0x1a>;
117         };
118 };
119
120 &i2c1 {
121         status = "okay";
122         rtc@51 {
123                 compatible = "nxp,pcf8563";
124                 reg = <0x51>;
125         };
126         
127         act8846: act8846@5a {
128                 reg = <0x5a>;
129                 status = "okay";
130         };
131         rk808: rk808@1b {
132                 reg = <0x1b>;
133                 status = "okay";
134         };
135 };
136
137 &i2c2 {
138         status = "okay";
139         ts@55 {
140                 compatible = "goodix,gt8xx";
141                 reg = <0x55>;
142                 touch-gpio = <&gpio1 GPIO_B7 IRQ_TYPE_LEVEL_LOW>;
143                 reset-gpio = <&gpio0 GPIO_B6 GPIO_ACTIVE_LOW>;
144                 power-gpio = <&gpio0 GPIO_C5 GPIO_ACTIVE_LOW>;
145                 max-x = <1280>;
146                 max-y = <800>;
147         };
148 };
149
150 &i2c3 {
151         status = "okay";
152 };
153
154 &fb {
155         rockchip,disp-mode = <DUAL>;
156 };
157
158 &lcdc0 {
159         status = "okay";
160         power_ctr = <&disp_power_ctr>;
161         display-timings = <&disp_timings>;
162 };
163
164 &lcdc1 {
165         status = "okay";
166 };
167
168 &adc {
169         status = "okay";
170
171         key {
172                 compatible = "rockchip,key";
173                 io-channels = <&adc 1>; 
174
175                 vol-up-key {
176                         linux,code = <115>;
177                         label = "volume up";
178                         rockchip,adc_value = <1>;
179                 };
180
181                 vol-down-key {
182                         linux,code = <114>;
183                         label = "volume down";
184                         rockchip,adc_value = <170>;
185                 };
186
187                 power-key {
188                         gpios = <&gpio0 GPIO_A4 GPIO_ACTIVE_LOW>;
189                         linux,code = <116>;
190                         label = "power";
191                         gpio-key,wakeup;
192                 };
193
194                 menu-key {
195                         linux,code = <139>;
196                         label = "menu";
197                         rockchip,adc_value = <355>;
198                 };
199
200                 home-key {
201                         linux,code = <102>;
202                         label = "home";
203                         rockchip,adc_value = <746>;
204                 };
205
206                 back-key {
207                         linux,code = <158>;
208                         label = "back";
209                         rockchip,adc_value = <560>;
210                 };
211
212                 camera-key {
213                         linux,code = <212>;
214                         label = "camera";
215                         rockchip,adc_value = <450>;
216                 };       
217         };
218 };
219
220 &pwm3 {
221         status = "okay";
222 };
223
224 &clk_core_dvfs_table {
225         operating-points = <
226                 /* KHz    uV */
227                 312000 1100000
228                 504000 1100000
229                 816000 1100000
230                 1008000 1100000
231                 1200000 1200000
232                 1416000 1300000
233                 1608000 1350000
234                 >;
235 };
236
237 &clk_gpu_dvfs_table {
238         operating-points = <
239                 /* KHz    uV */
240                 200000 1200000
241                 300000 1200000
242                 400000 1300000
243                 >;
244 };
245
246 &clk_ddr_dvfs_table {
247         operating-points = <
248                 /* KHz    uV */
249                 200000 1200000
250                 300000 1200000
251                 400000 1300000
252                 >;
253 };
254
255 /include/ "act8846.dtsi"
256 &act8846 {
257         gpios =<&gpio3 GPIO_D3 GPIO_ACTIVE_LOW>; 
258
259 regulators {
260                 
261                  dcdc1_reg: regulator@0{
262                         regulator-name= "act_dcdc1";
263                         regulator-min-microvolt = <1200000>;
264                         regulator-max-microvolt = <1200000>;
265                         regulator-always-on;
266                         regulator-boot-on;
267                 };
268
269                 dcdc2_reg: regulator@1 {
270                         regulator-name= "vdd_logic";
271                         regulator-always-on;
272                         regulator-boot-on;                      
273                 };
274
275                 dcdc3_reg: regulator@2 {
276                         regulator-name= "vdd_arm";
277                         regulator-always-on;
278                         regulator-boot-on;
279                 };
280
281                 dcdc4_reg: regulator@3 {
282                         regulator-name= "act_dcdc4";
283                         regulator-min-microvolt = <3300000>;
284                         regulator-max-microvolt = <3300000>;
285                         regulator-always-on;
286                         regulator-boot-on;
287                 };
288
289                 ldo1_reg: regulator@4 {
290                         regulator-name= "act_ldo1";
291                         regulator-min-microvolt = <1000000>;
292                         regulator-max-microvolt = <1000000>;
293                         regulator-always-on;
294                         regulator-boot-on;
295                 };
296
297                 ldo2_reg: regulator@5 {
298                         regulator-name= "act_ldo2";
299                         regulator-min-microvolt = <1200000>;
300                         regulator-max-microvolt = <1200000>;
301                         regulator-always-on;
302                         regulator-boot-on;
303                 };
304
305                 ldo3_reg: regulator@6 {
306                         regulator-name= "act_ldo3";
307                         regulator-min-microvolt = <1800000>;
308                         regulator-max-microvolt = <1800000>;
309                         regulator-always-on;
310                         regulator-boot-on;
311                 };
312
313                 ldo4_reg:regulator@7 {
314                         regulator-name= "act_ldo4";
315                         regulator-min-microvolt = <3300000>;
316                         regulator-max-microvolt = <3300000>;
317                         regulator-always-on;
318                         regulator-boot-on;
319                 };
320
321                 ldo5_reg: regulator@8 {
322                         regulator-name= "act_ldo5";
323                         regulator-min-microvolt = <3300000>;
324                         regulator-max-microvolt = <3300000>;
325                         regulator-always-on;
326                         regulator-boot-on;
327                 };
328
329                 ldo6_reg: regulator@9 {
330                         regulator-name= "act_ldo6";
331                         regulator-min-microvolt = <3300000>;
332                         regulator-max-microvolt = <3300000>;
333                         regulator-always-on;
334                         regulator-boot-on;
335                 };
336
337                 ldo7_reg: regulator@10 {
338                         regulator-name= "act_ldo7";
339                         regulator-min-microvolt = <1800000>;
340                         regulator-max-microvolt = <1800000>;
341                         regulator-always-on;
342                         regulator-boot-on;
343                 };
344
345                 ldo8_reg: regulator@11 {
346                         regulator-name= "act_ldo8";
347                         regulator-min-microvolt = <2800000>;
348                         regulator-max-microvolt = <2800000>;
349                         regulator-always-on;
350                         regulator-boot-on;
351                 };
352         };
353 };
354 /include/ "rk808.dtsi"
355 &rk808{
356         gpios =<&gpio0 GPIO_B3 GPIO_ACTIVE_HIGH>,<&gpio0 GPIO_A1 GPIO_ACTIVE_LOW>; 
357
358 regulators {
359                 
360                  rk808_dcdc1_reg: regulator@0{
361                         regulator-name= "vdd_arm";      
362                         regulator-always-on;
363                         regulator-boot-on;
364                 };
365
366                 rk808_dcdc2_reg: regulator@1 {
367                         regulator-name= "vdd_logic";
368                         regulator-always-on;
369                         regulator-boot-on;              
370                 };
371
372                 rk808_dcdc3_reg: regulator@2 {
373                         regulator-name= "rk_dcdc3";
374                         regulator-min-microvolt = <1200000>;
375                         regulator-max-microvolt = <1200000>;
376                         regulator-always-on;
377                         regulator-boot-on;
378                 };
379
380                 rk808_dcdc4_reg: regulator@3 {
381                         regulator-name= "rk_dcdc4";
382                         regulator-min-microvolt = <3300000>;
383                         regulator-max-microvolt = <3300000>;
384                         regulator-always-on;
385                         regulator-boot-on;
386                 };
387
388                 rk808_ldo1_reg: regulator@4 {
389                         regulator-name= "rk_ldo1";
390                         regulator-min-microvolt = <3300000>;
391                         regulator-max-microvolt = <3300000>;
392                         regulator-always-on;
393                         regulator-boot-on;
394                 };
395
396                 rk808_ldo2_reg: regulator@5 {
397                         regulator-name= "rk_ldo2";
398                         regulator-min-microvolt = <3300000>;
399                         regulator-max-microvolt = <3300000>;
400                         regulator-always-on;
401                         regulator-boot-on;
402                 };
403
404                 rk808_ldo3_reg: regulator@6 {
405                         regulator-name= "rk_ldo3";
406                         regulator-min-microvolt = <1000000>;
407                         regulator-max-microvolt = <1000000>;
408                         regulator-always-on;
409                         regulator-boot-on;
410                 };
411
412                 rk808_ldo4_reg:regulator@7 {
413                         regulator-name= "rk_ldo4";
414                         regulator-min-microvolt = <1800000>;
415                         regulator-max-microvolt = <1800000>;
416                         regulator-always-on;
417                         regulator-boot-on;
418                 };
419
420                 rk808_ldo5_reg: regulator@8 {
421                         regulator-name= "rk_ldo5";
422                         regulator-min-microvolt = <2800000>;
423                         regulator-max-microvolt = <2800000>;
424                         regulator-always-on;
425                         regulator-boot-on;
426                 };
427
428                 rk808_ldo6_reg: regulator@9 {
429                         regulator-name= "rk_ldo6";
430                         regulator-min-microvolt = <1200000>;
431                         regulator-max-microvolt = <1200000>;
432                         regulator-always-on;
433                         regulator-boot-on;
434                 };
435
436                 rk808_ldo7_reg: regulator@10 {
437                         regulator-name= "rk_ldo7";
438                         regulator-min-microvolt = <1800000>;
439                         regulator-max-microvolt = <1800000>;
440                         regulator-always-on;
441                         regulator-boot-on;
442                 };
443
444                 rk808_ldo8_reg: regulator@11 {
445                         regulator-name= "rk_ldo8";
446                         regulator-min-microvolt = <1800000>;
447                         regulator-max-microvolt = <1800000>;
448                         regulator-always-on;
449                         regulator-boot-on;
450                 };
451         };
452 };
453
454