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