CHROMIUM: ARM: exynos: snow: add lid switch to dts
[cascardo/linux.git] / arch / arm / boot / dts / cros5250-common.dtsi
1 /*
2  * Common device tree include for all Exynos 5250 boards based off of Daisy.
3  *
4  * Copyright (c) 2012 Google, Inc
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License version 2 as
8  * published by the Free Software Foundation.
9 */
10
11 / {
12         memory {
13                 reg = <0x40000000 0x80000000>;
14         };
15
16         chosen {
17         };
18
19         aliases {
20                 sysmmu2 = &sysmmu_2;
21                 sysmmu3 = &sysmmu_3;
22                 sysmmu4 = &sysmmu_4;
23                 sysmmu27 = &sysmmu_27;
24                 sysmmu28 = &sysmmu_28;
25                 sysmmu23 = &sysmmu_23;
26                 sysmmu24 = &sysmmu_24;
27                 sysmmu25 = &sysmmu_25;
28                 sysmmu26 = &sysmmu_26;
29                 gsc0 = &gsc_0;
30                 gsc1 = &gsc_1;
31                 gsc2 = &gsc_2;
32                 gsc3 = &gsc_3;
33                 i2s0 = &i2s_0;
34         };
35
36         i2c@12C60000 {
37                 samsung,i2c-sda-delay = <100>;
38                 samsung,i2c-max-bus-freq = <66000>;
39                 gpios = <&gpb3 0 2 3 0>,
40                         <&gpb3 1 2 3 0>;
41
42                 max77686_pmic@9 {
43                         compatible = "maxim,max77686-pmic";
44                         interrupt-parent = <&wakeup_eint>;
45                         interrupts = <26 0>;
46                         reg = <0x9>;
47
48                         max77686,buck_ramp_delay = <2>;         /* default */
49
50                         voltage-regulators {
51                                 ldo11_reg: LDO11 {
52                                         regulator-name = "vdd_ldo11";
53                                         regulator-min-microvolt = <1900000>;
54                                         regulator-max-microvolt = <1900000>;
55                                         regulator-always-on;
56                                 };
57
58                                 ldo14_reg: LDO14 {
59                                         regulator-name = "vdd_ldo14";
60                                         regulator-min-microvolt = <1900000>;
61                                         regulator-max-microvolt = <1900000>;
62                                         regulator-always-on;
63                                 };
64
65                                 buck1_reg: BUCK1 {
66                                         regulator-name = "vdd_mif";
67                                         regulator-min-microvolt = <950000>;
68                                         regulator-max-microvolt = <1300000>;
69                                         regulator-always-on;
70                                         regulator-boot-on;
71                                 };
72
73                                 buck2_reg: BUCK2 {
74                                         regulator-name = "vdd_arm";
75                                         regulator-min-microvolt = <850000>;
76                                         regulator-max-microvolt = <1350000>;
77                                         regulator-always-on;
78                                         regulator-boot-on;
79                                 };
80
81                                 buck3_reg: BUCK3 {
82                                         regulator-name = "vdd_int";
83                                         regulator-min-microvolt = <900000>;
84                                         regulator-max-microvolt = <1200000>;
85                                         regulator-always-on;
86                                         regulator-boot-on;
87                                 };
88
89                                 buck4_reg: BUCK4 {
90                                         regulator-name = "vdd_g3d";
91                                         regulator-min-microvolt = <850000>;
92                                         regulator-max-microvolt = <1300000>;
93                                         regulator-boot-on;
94                                 };
95
96                                 buck8_reg: BUCK8 {
97                                         regulator-name = "vdd_ummc";
98                                         regulator-min-microvolt = <900000>;
99                                         regulator-max-microvolt = <3000000>;
100                                         regulator-always-on;
101                                         regulator-boot-on;
102                                 };
103
104                                 en32khz_ap: EN32KHZ_AP {
105                                         regulator-name = "en32khz_ap";
106                                         regulator-boot-on;
107                                 };
108
109                                 en32khz_cp: EN32KHZ_CP {
110                                         regulator-name = "en32khz_cp";
111                                         regulator-boot-on;
112                                 };
113
114                                 enp32kh: ENP32KHZ {
115                                         regulator-name = "enp32khz";
116                                         regulator-boot-on;
117                                 };
118                         };
119                 };
120         };
121
122         i2c@12C70000 {
123                 samsung,i2c-sda-delay = <100>;
124                 samsung,i2c-max-bus-freq = <66000>;
125                 gpios = <&gpb3 2 2 3 0>,
126                         <&gpb3 3 2 3 0>;
127
128                 trackpad {
129                         reg = <0x67>;
130                         compatible = "cypress,cyapa";
131                         interrupts = <10 0>;
132                         interrupt-parent = <&wakeup_eint>;
133                 };
134         };
135
136         i2c@12C80000 {
137                 samsung,i2c-sda-delay = <100>;
138                 samsung,i2c-max-bus-freq = <66000>;
139                 gpios = <&gpa0 6 3 3 0>,
140                         <&gpa0 7 3 3 0>;
141
142                 exynos_hdcp@3a {
143                         compatible = "samsung,exynos_hdcp";
144                         reg = <0x3a>;
145                 };
146         };
147
148         i2c@12C90000 {
149                 samsung,i2c-sda-delay = <100>;
150                 samsung,i2c-max-bus-freq = <66000>;
151                 gpios = <&gpa1 2 3 3 0>,
152                         <&gpa1 3 3 3 0>;
153
154                 tpm {
155                         compatible = "infineon,slb9635tt";
156                         reg = <0x20>;
157                 };
158         };
159
160         i2c@12CA0000 {
161                 samsung,i2c-sda-delay = <100>;
162                 samsung,i2c-max-bus-freq = <66000>;
163                 gpios = <&gpa2 0 3 3 0>,
164                         <&gpa2 1 3 3 0>;
165
166                 power-regulator {
167                         compatible = "ti,tps65090";
168                         reg = <0x48>;
169
170                         voltage-regulators {
171                                 VFET1 {
172                                         tps65090-control-reg-offset = <15>;
173                                         regulator-name = "vcd_led";
174                                         regulator-min-microvolt = <12000000>;
175                                         regulator-max-microvolt = <12000000>;
176                                 };
177                                 VFET2 {
178                                         tps65090-control-reg-offset = <16>;
179                                         regulator-name = "video_mid";
180                                         regulator-min-microvolt = <5000000>;
181                                         regulator-max-microvolt = <5000000>;
182                                 };
183                                 VFET3 {
184                                         tps65090-control-reg-offset = <17>;
185                                         regulator-name = "wwan_r";
186                                         regulator-min-microvolt = <3300000>;
187                                         regulator-max-microvolt = <3300000>;
188                                         regulator-always-on;
189                                 };
190                                 VFET4 {
191                                         tps65090-control-reg-offset = <18>;
192                                         regulator-name = "sdcard";
193                                         regulator-min-microvolt = <3300000>;
194                                         regulator-max-microvolt = <3300000>;
195                                 };
196                                 VFET5 {
197                                         tps65090-control-reg-offset = <19>;
198                                         regulator-name = "camout";
199                                         regulator-min-microvolt = <3300000>;
200                                         regulator-max-microvolt = <3300000>;
201                                         regulator-always-on;
202                                 };
203                                 VFET6 {
204                                         tps65090-control-reg-offset = <20>;
205                                         regulator-name = "lcd_vdd";
206                                         regulator-min-microvolt = <3300000>;
207                                         regulator-max-microvolt = <3300000>;
208                                 };
209                                 VFET7 {
210                                         tps65090-control-reg-offset = <21>;
211                                         regulator-name = "ts";
212                                         regulator-min-microvolt = <5000000>;
213                                         regulator-max-microvolt = <5000000>;
214                                 };
215                         };
216                 };
217
218                 ec {
219                         compatible = "google,chromeos-ec";
220                         reg = <0x1e>;
221                         interrupts = <14 0>;
222                         interrupt-parent = <&wakeup_eint>;
223                 };
224
225                 // i2c4 hsic hub @0x8, eeprom @0x50, batt @0xb
226         };
227
228         i2c@12CB0000 {
229                 samsung,i2c-sda-delay = <100>;
230                 samsung,i2c-max-bus-freq = <66000>;
231                 gpios = <&gpa2 2 3 3 0>,
232                         <&gpa2 3 3 3 0>;
233
234                 // i2c5 conn? ts?
235         };
236
237         i2c@12CC0000 {
238                 status = "disabled";
239
240                 // i2c6 is not used on any cros5250 boards
241         };
242
243         i2c@12CD0000 {
244                 samsung,i2c-sda-delay = <100>;
245                 samsung,i2c-max-bus-freq = <66000>;
246                 gpios = <&gpb2 2 3 3 0>,
247                         <&gpb2 3 3 3 0>;
248
249                 codec {
250                         compatible = "maxim,max98095";
251                         reg = <0x11>;
252                 };
253
254                 light-sensor {
255                         compatible = "invn,isl29018";
256                         reg = <0x44>;
257                 };
258
259                 // i2c7
260                 // mipi cam  codec 0x11 gyro @0x68
261                 // LCD @0x50-57 ALS @? mic-detect @0x3b
262         };
263
264         spi_0: spi@12d20000 {
265                 status = "disabled";
266         };
267
268         spi_1: spi@12d30000 {
269                 gpios = <&gpa2 4 2 3 0>,
270                         <&gpa2 6 2 3 0>,
271                         <&gpa2 7 2 3 0>;
272                 samsung,spi-src-clk = <0>;
273                 num-cs = <1>;
274         };
275
276         spi_2: spi@12d40000 {
277                 status = "disabled";
278         };
279
280         dwmmc0@12200000 {
281                 supports-highspeed;
282                 card-detection-broken;
283                 no-write-protect;
284                 fifo-depth = <0x80>;
285                 card-detect-delay = <200>;
286                 samsung,dw-mshc-sdr-timing = <2 3 3>;
287                 samsung,dw-mshc-ddr-timing = <1 2 3>;
288
289                 slot0 {
290                         bus-width = <8>;
291                         cd-gpios = <&gpc0 2 2 3 3>;
292                         gpios = <&gpc0 0 2 0 3>, <&gpc0 1 2 0 3>,
293                                 <&gpc1 0 2 3 3>, <&gpc1 1 2 3 3>,
294                                 <&gpc1 2 2 3 3>, <&gpc1 3 2 3 3>,
295                                 <&gpc0 3 2 3 3>, <&gpc0 4 2 3 3>,
296                                 <&gpc0 5 2 3 3>, <&gpc0 6 2 3 3>;
297                 };
298         };
299
300         dwmmc1@12210000 {
301                 status = "disabled";
302         };
303
304         dwmmc2@12220000 {
305                 supports-highspeed;
306                 card-detection-broken;
307                 no-write-protect;
308                 fifo-depth = <0x80>;
309                 card-detect-delay = <200>;
310                 samsung,dw-mshc-sdr-timing = <2 3 3>;
311                 samsung,dw-mshc-ddr-timing = <1 2 3>;
312
313                 slot0 {
314                         bus-width = <4>;
315                         cd-gpios = <&gpc3 2 2 3 3>;
316                         gpios = <&gpc3 1 2 0 3>, <&gpc3 0 2 0 3>,
317                                 <&gpc3 3 2 3 3>, <&gpc3 4 2 3 3>,
318                                 <&gpc3 5 2 3 3>, <&gpc3 6 2 3 3>;
319                 };
320         };
321
322         dwmmc3@12230000 {
323                 supports-highspeed;
324                 card-detection-broken;
325                 no-write-protect;
326                 fifo-depth = <0x80>;
327                 card-detect-delay = <200>;
328                 samsung,dw-mshc-sdr-timing = <2 3 3>;
329                 samsung,dw-mshc-ddr-timing = <1 2 3>;
330
331                 slot0 {
332                         bus-width = <4>;
333                         gpios = <&gpc4 1 2 3 3>, <&gpc4 0 2 0 3>,
334                                 <&gpc4 3 2 3 3>, <&gpc4 4 2 3 3>,
335                                 <&gpc4 5 2 3 3>, <&gpc4 6 2 3 3>;
336                 };
337         };
338
339         i2c@12CE0000 {
340                 samsung,i2c-sda-delay = <100>;
341                 samsung,i2c-max-bus-freq = <66000>;
342         };
343
344         ehci {
345                 samsung,vbus-gpio = <&gpx1 1 1 3 3>;
346         };
347
348         xhci {
349                 samsung,vbus-gpio = <&gpx2 7 1 3 3>;
350         };
351
352         fixed-regulator {
353                 compatible = "regulator-fixed";
354                 regulator-name = "hsichub-reset-l";
355                 gpio = <&gpe1 0 1 0 0>;
356                 enable-active-high;
357                 regulator-always-on;
358         };
359
360         // NB: nodes must be at root for regulator-fixed to probe
361         // NB: must set regulator-boot-on for enable-active-high to be used
362         // NB: set regulator-always-on to suppress complaints
363         //     "incomplete constraints, leaving on"
364         wifi-en {
365                 compatible = "regulator-fixed";
366                 regulator-name = "wifi-en";
367                 gpio = <&gpx0 1 0 0 0>;
368                 enable-active-high;
369                 regulator-boot-on;
370                 regulator-always-on;
371         };
372         wifi-rst {
373                 compatible = "regulator-fixed";
374                 regulator-name = "wifi-rst-l";
375                 gpio = <&gpx0 2 0 0 0>;
376                 enable-active-high;
377                 regulator-boot-on;
378                 regulator-always-on;
379         };
380         bt-rst {
381                 compatible = "regulator-fixed";
382                 regulator-name = "bt-reset-l";
383                 gpio = <&gpx3 2 0 0 0>;
384                 enable-active-high;
385                 regulator-boot-on;
386                 regulator-always-on;
387         };
388         wwan-en {
389                 compatible = "regulator-fixed";
390                 regulator-name = "wwan-en";
391                 gpio = <&gpe0 0 0 0 0>;
392                 enable-active-high;
393                 regulator-boot-on;
394                 regulator-always-on;
395         };
396         max98095-en {
397                 compatible = "regulator-fixed";
398                 regulator-name = "codec-en";
399                 gpio = <&gpx1 7 0 0 0>;
400                 enable-active-high;
401                 regulator-boot-on;
402                 regulator-always-on;
403         };
404
405         gpio-keys {
406                 compatible = "gpio-keys";
407
408                 power {
409                         label = "Power";
410                         gpios = <&gpx1 3 0 0 0>;
411                         linux,code = <116>; /* KEY_POWER */
412                         gpio-key,wakeup;
413                 };
414
415                 lid-switch {
416                         label = "Lid";
417                         gpios = <&gpx3 5 0 0x10000 0>;
418                         linux,input-type = <5>; /* EV_SW */
419                         linux,code = <0>; /* SW_LID */
420                         debounce-interval = <1>;
421                         gpio-key,wakeup;
422                 };
423         };
424 };