Audio: add codec-of-node and cpu-of-node, delete CODEC_NAME_CMP, codec-name, cpu...
[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 #include <dt-bindings/clock/ddr.h>
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: codec-hdmi-i2s {
60                 compatible = "hdmi-i2s";
61         };
62
63         codec_hdmi_spdif: codec-hdmi-spdif {
64                 compatible = "hdmi-spdif";
65         };
66
67         rockchip-rt5631 {
68                 compatible = "rockchip-rt5631";
69                 dais {
70                         dai0 {
71                                 codec-of-node = <&rt5631>;
72                                 cpu-of-node = <&i2s0>;
73                                 format = "i2s";
74                                 //continuous-clock;
75                                 //bitclock-inversion;
76                                 //frame-inversion;
77                                 //bitclock-master;
78                                 //frame-master;
79                         };
80                 };
81         };
82
83         rockchip-rk610 {
84                 compatible = "rockchip-rk610";
85                 dais {
86                         dai0 {
87                                 codec-of-node = <&rk610_codec>;
88                                 cpu-of-node = <&i2s0>;
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-i2s {
100                 compatible = "rockchip-hdmi-i2s";
101                 dais {
102                         dai0 {
103                                 codec-of-node = <&codec_hdmi_i2s>;
104                                 cpu-of-node = <&i2s0>;
105                                 format = "i2s";
106                                 //continuous-clock;
107                                 //bitclock-inversion;
108                                 //frame-inversion;
109                                 //bitclock-master;
110                                 //frame-master;
111                         };
112                 };
113         };
114
115         rockchip-hdmi-spdif {
116                 compatible = "rockchip-hdmi-spdif";
117         };
118 };
119
120 &uart0 {
121         status = "okay";
122         dma-names = "!tx", "!rx";
123 };
124
125
126 &uart3 {
127         status = "okay";
128         dma-names = "!tx", "!rx";
129 };
130
131 &watchdog {
132                 rockchip,timeout = <50>;
133                 rockchip,debug = <1>;
134                 status = "disabled";
135 };
136
137 &i2c0 {
138         status = "okay";
139         rt5631: rt5631@1a {
140                 compatible = "rt5631";
141                 reg = <0x1a>;
142         };
143
144         rk610ctl@40 {
145                 compatible = "rk610_ctl";
146                 reg = <0x40>;
147                 rk610-reset-io = <&gpio3 GPIO_B2 GPIO_ACTIVE_HIGH>;
148                 clocks = <&clk_i2s>;
149                 clock-names = "i2s_clk";
150         };
151
152         rk610_codec: rk610codec@60 {//RK610_CODEC addr  from 0x60 to 0x80 (0x60~0x80)
153                 compatible = "rk610_codec";
154                 reg = <0x60>;
155                 spk_ctl_io = <&gpio2 GPIO_D7 GPIO_ACTIVE_HIGH>;
156                 boot_depop = <1>;
157                 pa_enable_time = <1000>;
158         };
159
160         sensor@1d {
161                 compatible = "gs_mma8452";
162                 reg = <0x1d>;
163                 type = <SENSOR_TYPE_ACCEL>;
164                 irq-gpio = <&gpio0 GPIO_B7 IRQ_TYPE_EDGE_FALLING>;              
165                 irq_enable = <1>;
166                 poll_delay_ms = <30>;
167                 layout = <1>;
168         };
169 };
170
171 &i2c1 {
172         status = "okay";
173         rtc@51 {
174                 compatible = "nxp,pcf8563";
175                 reg = <0x51>;
176         };
177         
178         act8846: act8846@5a {
179                 reg = <0x5a>;
180                 status = "okay";
181         };
182         rk808: rk808@1b {
183                 reg = <0x1b>;
184                 status = "okay";
185         };
186 };
187
188 &i2c2 {
189         status = "okay";
190         ts@55 {
191                 compatible = "goodix,gt8xx";
192                 reg = <0x55>;
193                 touch-gpio = <&gpio1 GPIO_B7 IRQ_TYPE_LEVEL_LOW>;
194                 reset-gpio = <&gpio0 GPIO_B6 GPIO_ACTIVE_LOW>;
195                 power-gpio = <&gpio0 GPIO_C5 GPIO_ACTIVE_LOW>;
196                 max-x = <1280>;
197                 max-y = <800>;
198         };
199 };
200
201 &i2c3 {
202         status = "okay";
203 };
204
205 &fb {
206         rockchip,disp-mode = <DUAL>;
207 };
208
209 &lcdc0 {
210         status = "okay";
211         power_ctr = <&disp_power_ctr>;
212         display-timings = <&disp_timings>;
213 };
214
215 &lcdc1 {
216         status = "okay";
217 };
218
219 &adc {
220         status = "okay";
221
222         key {
223                 compatible = "rockchip,key";
224                 io-channels = <&adc 1>; 
225
226                 vol-up-key {
227                         linux,code = <115>;
228                         label = "volume up";
229                         rockchip,adc_value = <1>;
230                 };
231
232                 vol-down-key {
233                         linux,code = <114>;
234                         label = "volume down";
235                         rockchip,adc_value = <170>;
236                 };
237
238                 power-key {
239                         gpios = <&gpio0 GPIO_A4 GPIO_ACTIVE_LOW>;
240                         linux,code = <116>;
241                         label = "power";
242                         gpio-key,wakeup;
243                 };
244
245                 menu-key {
246                         linux,code = <139>;
247                         label = "menu";
248                         rockchip,adc_value = <355>;
249                 };
250
251                 home-key {
252                         linux,code = <102>;
253                         label = "home";
254                         rockchip,adc_value = <746>;
255                 };
256
257                 back-key {
258                         linux,code = <158>;
259                         label = "back";
260                         rockchip,adc_value = <560>;
261                 };
262
263                 camera-key {
264                         linux,code = <212>;
265                         label = "camera";
266                         rockchip,adc_value = <450>;
267                 };       
268         };
269 };
270
271 &pwm3 {
272         status = "okay";
273 };
274
275 &clk_core_dvfs_table {
276         operating-points = <
277                 /* KHz    uV */
278                 312000 1100000
279                 504000 1100000
280                 816000 1100000
281                 1008000 1100000
282                 1200000 1200000
283                 1416000 1300000
284                 1608000 1350000
285                 >;
286 };
287
288 &clk_gpu_dvfs_table {
289         operating-points = <
290                 /* KHz    uV */
291                 200000 1200000
292                 300000 1200000
293                 400000 1200000
294                 >;
295 };
296
297 &clk_ddr_dvfs_table {
298         operating-points = <
299                 /* KHz    uV */
300                 200000 1200000
301                 300000 1200000
302                 400000 1200000
303                 >;
304
305         freq_table = <
306                 /*status                freq(KHz)*/
307                 SYS_STATUS_NORMAL       400000
308                 SYS_STATUS_SUSPEND      200000
309                 SYS_STATUS_VIDEO        300000
310                 SYS_STATUS_DUALVIEW     500000
311                 >;
312 };
313
314 /include/ "act8846.dtsi"
315 &act8846 {
316         gpios =<&gpio3 GPIO_D3 GPIO_ACTIVE_LOW>; 
317
318 regulators {
319                 
320                  dcdc1_reg: regulator@0{
321                         regulator-name= "act_dcdc1";
322                         regulator-min-microvolt = <1200000>;
323                         regulator-max-microvolt = <1200000>;
324                         regulator-always-on;
325                         regulator-boot-on;
326                 };
327
328                 dcdc2_reg: regulator@1 {
329                         regulator-name= "vdd_logic";
330                         regulator-always-on;
331                         regulator-boot-on;                      
332                 };
333
334                 dcdc3_reg: regulator@2 {
335                         regulator-name= "vdd_arm";
336                         regulator-always-on;
337                         regulator-boot-on;
338                 };
339
340                 dcdc4_reg: regulator@3 {
341                         regulator-name= "vccio";
342                         regulator-min-microvolt = <1800000>;
343                         regulator-max-microvolt = <3300000>;
344                         regulator-always-on;
345                         regulator-boot-on;
346                 };
347
348                 ldo1_reg: regulator@4 {
349                         regulator-name= "act_ldo1";
350                         regulator-min-microvolt = <1000000>;
351                         regulator-max-microvolt = <1000000>;
352                         regulator-always-on;
353                         regulator-boot-on;
354                 };
355
356                 ldo2_reg: regulator@5 {
357                         regulator-name= "act_ldo2";
358                         regulator-min-microvolt = <1200000>;
359                         regulator-max-microvolt = <1200000>;
360                         regulator-always-on;
361                         regulator-boot-on;
362                 };
363
364                 ldo3_reg: regulator@6 {
365                         regulator-name= "act_ldo3";
366                         regulator-min-microvolt = <1800000>;
367                         regulator-max-microvolt = <1800000>;
368                         regulator-always-on;
369                         regulator-boot-on;
370                 };
371
372                 ldo4_reg:regulator@7 {
373                         regulator-name= "act_ldo4";
374                         regulator-min-microvolt = <3300000>;
375                         regulator-max-microvolt = <3300000>;
376                         regulator-always-on;
377                         regulator-boot-on;
378                 };
379
380                 ldo5_reg: regulator@8 {
381                         regulator-name= "act_ldo5";
382                         regulator-min-microvolt = <3300000>;
383                         regulator-max-microvolt = <3300000>;
384                         regulator-always-on;
385                         regulator-boot-on;
386                 };
387
388                 ldo6_reg: regulator@9 {
389                         regulator-name= "act_ldo6";
390                         regulator-min-microvolt = <3300000>;
391                         regulator-max-microvolt = <3300000>;
392                         regulator-always-on;
393                         regulator-boot-on;
394                 };
395
396                 ldo7_reg: regulator@10 {
397                         regulator-name= "act_ldo7";
398                         regulator-min-microvolt = <1800000>;
399                         regulator-max-microvolt = <1800000>;
400                         regulator-always-on;
401                         regulator-boot-on;
402                 };
403
404                 ldo8_reg: regulator@11 {
405                         regulator-name= "act_ldo8";
406                         regulator-min-microvolt = <2800000>;
407                         regulator-max-microvolt = <2800000>;
408                         regulator-always-on;
409                         regulator-boot-on;
410                 };
411         };
412 };
413 /include/ "rk808.dtsi"
414 &rk808{
415         gpios =<&gpio0 GPIO_B3 GPIO_ACTIVE_HIGH>,<&gpio0 GPIO_A1 GPIO_ACTIVE_LOW>; 
416
417 regulators {
418                 
419                  rk808_dcdc1_reg: regulator@0{
420                         regulator-name= "vdd_arm";      
421                         regulator-always-on;
422                         regulator-boot-on;
423                 };
424
425                 rk808_dcdc2_reg: regulator@1 {
426                         regulator-name= "vdd_logic";
427                         regulator-always-on;
428                         regulator-boot-on;              
429                 };
430
431                 rk808_dcdc3_reg: regulator@2 {
432                         regulator-name= "rk_dcdc3";
433                         regulator-min-microvolt = <1200000>;
434                         regulator-max-microvolt = <1200000>;
435                         regulator-always-on;
436                         regulator-boot-on;
437                 };
438
439                 rk808_dcdc4_reg: regulator@3 {
440                         regulator-name= "vccio";
441                         regulator-min-microvolt = <1800000>;
442                         regulator-max-microvolt = <3300000>;
443                         regulator-always-on;
444                         regulator-boot-on;
445                 };
446
447                 rk808_ldo1_reg: regulator@4 {
448                         regulator-name= "rk_ldo1";
449                         regulator-min-microvolt = <3300000>;
450                         regulator-max-microvolt = <3300000>;
451                         regulator-always-on;
452                         regulator-boot-on;
453                 };
454
455                 rk808_ldo2_reg: regulator@5 {
456                         regulator-name= "rk_ldo2";
457                         regulator-min-microvolt = <3300000>;
458                         regulator-max-microvolt = <3300000>;
459                         regulator-always-on;
460                         regulator-boot-on;
461                 };
462
463                 rk808_ldo3_reg: regulator@6 {
464                         regulator-name= "rk_ldo3";
465                         regulator-min-microvolt = <1000000>;
466                         regulator-max-microvolt = <1000000>;
467                         regulator-always-on;
468                         regulator-boot-on;
469                 };
470
471                 rk808_ldo4_reg:regulator@7 {
472                         regulator-name= "rk_ldo4";
473                         regulator-min-microvolt = <1800000>;
474                         regulator-max-microvolt = <1800000>;
475                         regulator-always-on;
476                         regulator-boot-on;
477                 };
478
479                 rk808_ldo5_reg: regulator@8 {
480                         regulator-name= "rk_ldo5";
481                         regulator-min-microvolt = <2800000>;
482                         regulator-max-microvolt = <2800000>;
483                         regulator-always-on;
484                         regulator-boot-on;
485                 };
486
487                 rk808_ldo6_reg: regulator@9 {
488                         regulator-name= "rk_ldo6";
489                         regulator-min-microvolt = <1200000>;
490                         regulator-max-microvolt = <1200000>;
491                         regulator-always-on;
492                         regulator-boot-on;
493                 };
494
495                 rk808_ldo7_reg: regulator@10 {
496                         regulator-name= "rk_ldo7";
497                         regulator-min-microvolt = <1800000>;
498                         regulator-max-microvolt = <1800000>;
499                         regulator-always-on;
500                         regulator-boot-on;
501                 };
502
503                 rk808_ldo8_reg: regulator@11 {
504                         regulator-name= "rk_ldo8";
505                         regulator-min-microvolt = <1800000>;
506                         regulator-max-microvolt = <1800000>;
507                         regulator-always-on;
508                         regulator-boot-on;
509                 };
510         };
511 };
512
513