ARM: dts: add pinctrl for EC irq of exynos5250-snow
[cascardo/linux.git] / arch / arm / boot / dts / exynos5250-snow.dts
1 /*
2  * Google Snow board device tree source
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 /dts-v1/;
12 #include "exynos5250.dtsi"
13 #include "exynos5250-cros-common.dtsi"
14
15 / {
16         model = "Google Snow";
17         compatible = "google,snow", "samsung,exynos5250", "samsung,exynos5";
18
19         aliases {
20                 i2c104 = &i2c_104;
21         };
22
23         rtc@101E0000 {
24                 status = "okay";
25         };
26
27         pinctrl@11400000 {
28                 ec_irq: ec-irq {
29                         samsung,pins = "gpx1-6";
30                         samsung,pin-function = <0>;
31                         samsung,pin-pud = <0>;
32                         samsung,pin-drv = <0>;
33                 };
34
35                 sd3_clk: sd3-clk {
36                         samsung,pin-drv = <0>;
37                 };
38
39                 sd3_cmd: sd3-cmd {
40                         samsung,pin-pud = <3>;
41                         samsung,pin-drv = <0>;
42                 };
43
44                 sd3_bus4: sd3-bus-width4 {
45                         samsung,pin-drv = <0>;
46                 };
47         };
48
49         pinctrl@13400000 {
50                 arb_their_claim: arb-their-claim {
51                         samsung,pins = "gpe0-4";
52                         samsung,pin-function = <0>;
53                         samsung,pin-pud = <3>;
54                         samsung,pin-drv = <0>;
55                 };
56
57                 arb_our_claim: arb-our-claim {
58                         samsung,pins = "gpf0-3";
59                         samsung,pin-function = <1>;
60                         samsung,pin-pud = <0>;
61                         samsung,pin-drv = <0>;
62                 };
63         };
64
65         gpio-keys {
66                 compatible = "gpio-keys";
67
68                 lid-switch {
69                         label = "Lid";
70                         gpios = <&gpx3 5 1>;
71                         linux,input-type = <5>; /* EV_SW */
72                         linux,code = <0>; /* SW_LID */
73                         debounce-interval = <1>;
74                         gpio-key,wakeup;
75                 };
76         };
77
78         i2c-arbitrator {
79                 compatible = "i2c-arb-gpio-challenge";
80                 #address-cells = <1>;
81                 #size-cells = <0>;
82
83                 i2c-parent = <&{/i2c@12CA0000}>;
84
85                 our-claim-gpio = <&gpf0 3 1>;
86                 their-claim-gpios = <&gpe0 4 1>;
87                 slew-delay-us = <10>;
88                 wait-retry-us = <3000>;
89                 wait-free-us = <50000>;
90
91                 pinctrl-names = "default";
92                 pinctrl-0 = <&arb_our_claim &arb_their_claim>;
93
94                 /* Use ID 104 as a hint that we're on physical bus 4 */
95                 i2c_104: i2c@0 {
96                         reg = <0>;
97                         #address-cells = <1>;
98                         #size-cells = <0>;
99
100                         battery: sbs-battery@b {
101                                 compatible = "sbs,sbs-battery";
102                                 reg = <0xb>;
103                                 sbs,poll-retry-count = <1>;
104                         };
105
106                         ec: embedded-controller {
107                                 compatible = "google,cros-ec-i2c";
108                                 reg = <0x1e>;
109                                 interrupts = <6 0>;
110                                 interrupt-parent = <&gpx1>;
111                                 pinctrl-names = "default";
112                                 pinctrl-0 = <&ec_irq>;
113                                 wakeup-source;
114
115                                 keyboard-controller {
116                                         compatible = "google,cros-ec-keyb";
117                                         keypad,num-rows = <8>;
118                                         keypad,num-columns = <13>;
119                                         google,needs-ghost-filter;
120                                         linux,keymap = <0x0001007d      /* L_META */
121                                                         0x0002003b      /* F1 */
122                                                         0x00030030      /* B */
123                                                         0x00040044      /* F10 */
124                                                         0x00060031      /* N */
125                                                         0x0008000d      /* = */
126                                                         0x000a0064      /* R_ALT */
127
128                                                         0x01010001      /* ESC */
129                                                         0x0102003e      /* F4 */
130                                                         0x01030022      /* G */
131                                                         0x01040041      /* F7 */
132                                                         0x01060023      /* H */
133                                                         0x01080028      /* ' */
134                                                         0x01090043      /* F9 */
135                                                         0x010b000e      /* BKSPACE */
136
137                                                         0x0200001d      /* L_CTRL */
138                                                         0x0201000f      /* TAB */
139                                                         0x0202003d      /* F3 */
140                                                         0x02030014      /* T */
141                                                         0x02040040      /* F6 */
142                                                         0x0205001b      /* ] */
143                                                         0x02060015      /* Y */
144                                                         0x02070056      /* 102ND */
145                                                         0x0208001a      /* [ */
146                                                         0x02090042      /* F8 */
147
148                                                         0x03010029      /* GRAVE */
149                                                         0x0302003c      /* F2 */
150                                                         0x03030006      /* 5 */
151                                                         0x0304003f      /* F5 */
152                                                         0x03060007      /* 6 */
153                                                         0x0308000c      /* - */
154                                                         0x030b002b      /* \ */
155
156                                                         0x04000061      /* R_CTRL */
157                                                         0x0401001e      /* A */
158                                                         0x04020020      /* D */
159                                                         0x04030021      /* F */
160                                                         0x0404001f      /* S */
161                                                         0x04050025      /* K */
162                                                         0x04060024      /* J */
163                                                         0x04080027      /* ; */
164                                                         0x04090026      /* L */
165                                                         0x040a002b      /* \ */
166                                                         0x040b001c      /* ENTER */
167
168                                                         0x0501002c      /* Z */
169                                                         0x0502002e      /* C */
170                                                         0x0503002f      /* V */
171                                                         0x0504002d      /* X */
172                                                         0x05050033      /* , */
173                                                         0x05060032      /* M */
174                                                         0x0507002a      /* L_SHIFT */
175                                                         0x05080035      /* / */
176                                                         0x05090034      /* . */
177                                                         0x050B0039      /* SPACE */
178
179                                                         0x06010002      /* 1 */
180                                                         0x06020004      /* 3 */
181                                                         0x06030005      /* 4 */
182                                                         0x06040003      /* 2 */
183                                                         0x06050009      /* 8 */
184                                                         0x06060008      /* 7 */
185                                                         0x0608000b      /* 0 */
186                                                         0x0609000a      /* 9 */
187                                                         0x060a0038      /* L_ALT */
188                                                         0x060b006c      /* DOWN */
189                                                         0x060c006a      /* RIGHT */
190
191                                                         0x07010010      /* Q */
192                                                         0x07020012      /* E */
193                                                         0x07030013      /* R */
194                                                         0x07040011      /* W */
195                                                         0x07050017      /* I */
196                                                         0x07060016      /* U */
197                                                         0x07070036      /* R_SHIFT */
198                                                         0x07080019      /* P */
199                                                         0x07090018      /* O */
200                                                         0x070b0067      /* UP */
201                                                         0x070c0069>;    /* LEFT */
202                                 };
203                         };
204                 };
205         };
206
207         mmc@12200000 {
208                 status = "okay";
209         };
210
211         mmc@12220000 {
212                 status = "okay";
213         };
214
215         /*
216          * On Snow we've got SIP WiFi and so can keep drive strengths low to
217          * reduce EMI.
218          */
219         mmc@12230000 {
220                 status = "okay";
221                 slot@0 {
222                         pinctrl-names = "default";
223                         pinctrl-0 = <&sd3_clk &sd3_cmd &sd3_bus4>;
224                 };
225         };
226
227         usb@12110000 {
228                 samsung,vbus-gpio = <&gpx1 1 0>;
229         };
230
231         fixed-rate-clocks {
232                 xxti {
233                         compatible = "samsung,clock-xxti";
234                         clock-frequency = <24000000>;
235                 };
236         };
237 };