Commit | Line | Data |
---|---|---|
e28ea9db AS |
1 | /* |
2 | * Google Veyron (and derivatives) board device tree source | |
3 | * Chromebook specific parts | |
4 | * | |
5 | * Copyright 2015 Google, Inc | |
6 | * | |
7 | * This file is dual-licensed: you can use it either under the terms | |
8 | * of the GPL or the X11 license, at your option. Note that this dual | |
9 | * licensing only applies to this file, and not this project as a | |
10 | * whole. | |
11 | * | |
12 | * a) This file is free software; you can redistribute it and/or | |
13 | * modify it under the terms of the GNU General Public License as | |
14 | * published by the Free Software Foundation; either version 2 of the | |
15 | * License, or (at your option) any later version. | |
16 | * | |
17 | * This file is distributed in the hope that it will be useful, | |
18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
20 | * GNU General Public License for more details. | |
21 | * | |
22 | * Or, alternatively, | |
23 | * | |
24 | * b) Permission is hereby granted, free of charge, to any person | |
25 | * obtaining a copy of this software and associated documentation | |
26 | * files (the "Software"), to deal in the Software without | |
27 | * restriction, including without limitation the rights to use, | |
28 | * copy, modify, merge, publish, distribute, sublicense, and/or | |
29 | * sell copies of the Software, and to permit persons to whom the | |
30 | * Software is furnished to do so, subject to the following | |
31 | * conditions: | |
32 | * | |
33 | * The above copyright notice and this permission notice shall be | |
34 | * included in all copies or substantial portions of the Software. | |
35 | * | |
36 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | |
37 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES | |
38 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | |
39 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT | |
40 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | |
41 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | |
42 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | |
43 | * OTHER DEALINGS IN THE SOFTWARE. | |
44 | */ | |
45 | ||
46 | #include <dt-bindings/clock/rockchip,rk808.h> | |
47 | #include <dt-bindings/input/input.h> | |
48 | #include "rk3288-veyron.dtsi" | |
49 | #include "rk3288-veyron-sdmmc.dtsi" | |
50 | ||
51 | / { | |
52 | aliases { | |
53 | /* Assign 20 so we don't get confused w/ builtin ones */ | |
54 | i2c20 = &i2c_tunnel; | |
55 | }; | |
56 | ||
dfb2146e HS |
57 | backlight: backlight { |
58 | compatible = "pwm-backlight"; | |
59 | brightness-levels = < | |
60 | 0 1 2 3 4 5 6 7 | |
61 | 8 9 10 11 12 13 14 15 | |
62 | 16 17 18 19 20 21 22 23 | |
63 | 24 25 26 27 28 29 30 31 | |
64 | 32 33 34 35 36 37 38 39 | |
65 | 40 41 42 43 44 45 46 47 | |
66 | 48 49 50 51 52 53 54 55 | |
67 | 56 57 58 59 60 61 62 63 | |
68 | 64 65 66 67 68 69 70 71 | |
69 | 72 73 74 75 76 77 78 79 | |
70 | 80 81 82 83 84 85 86 87 | |
71 | 88 89 90 91 92 93 94 95 | |
72 | 96 97 98 99 100 101 102 103 | |
73 | 104 105 106 107 108 109 110 111 | |
74 | 112 113 114 115 116 117 118 119 | |
75 | 120 121 122 123 124 125 126 127 | |
76 | 128 129 130 131 132 133 134 135 | |
77 | 136 137 138 139 140 141 142 143 | |
78 | 144 145 146 147 148 149 150 151 | |
79 | 152 153 154 155 156 157 158 159 | |
80 | 160 161 162 163 164 165 166 167 | |
81 | 168 169 170 171 172 173 174 175 | |
82 | 176 177 178 179 180 181 182 183 | |
83 | 184 185 186 187 188 189 190 191 | |
84 | 192 193 194 195 196 197 198 199 | |
85 | 200 201 202 203 204 205 206 207 | |
86 | 208 209 210 211 212 213 214 215 | |
87 | 216 217 218 219 220 221 222 223 | |
88 | 224 225 226 227 228 229 230 231 | |
89 | 232 233 234 235 236 237 238 239 | |
90 | 240 241 242 243 244 245 246 247 | |
91 | 248 249 250 251 252 253 254 255>; | |
92 | default-brightness-level = <128>; | |
93 | enable-gpios = <&gpio7 2 GPIO_ACTIVE_HIGH>; | |
94 | backlight-boot-off; | |
95 | pinctrl-names = "default"; | |
96 | pinctrl-0 = <&bl_en>; | |
97 | pwms = <&pwm0 0 1000000 0>; | |
98 | pwm-delay-us = <10000>; | |
99 | }; | |
100 | ||
e28ea9db AS |
101 | gpio-charger { |
102 | compatible = "gpio-charger"; | |
103 | charger-type = "mains"; | |
104 | gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>; | |
105 | pinctrl-names = "default"; | |
106 | pinctrl-0 = <&ac_present_ap>; | |
107 | }; | |
108 | ||
dfb2146e HS |
109 | panel: panel { |
110 | compatible ="innolux,n116bge", "simple-panel"; | |
111 | status = "okay"; | |
112 | power-supply = <&vcc33_lcd>; | |
113 | backlight = <&backlight>; | |
37aedb29 HS |
114 | |
115 | ports { | |
116 | panel_in: port { | |
117 | panel_in_edp: endpoint { | |
118 | remote-endpoint = <&edp_out_panel>; | |
119 | }; | |
120 | }; | |
121 | }; | |
dfb2146e HS |
122 | }; |
123 | ||
e28ea9db AS |
124 | /* A non-regulated voltage from power supply or battery */ |
125 | vccsys: vccsys { | |
126 | compatible = "regulator-fixed"; | |
127 | regulator-name = "vccsys"; | |
128 | regulator-boot-on; | |
129 | regulator-always-on; | |
130 | }; | |
131 | ||
132 | vcc33_sys: vcc33-sys { | |
133 | vin-supply = <&vccsys>; | |
134 | }; | |
135 | ||
136 | vcc_5v: vcc-5v { | |
137 | vin-supply = <&vccsys>; | |
138 | }; | |
139 | ||
140 | /* This turns on vbus for host1 (dwc2) */ | |
141 | vcc5_host1: vcc5-host1-regulator { | |
142 | compatible = "regulator-fixed"; | |
143 | enable-active-high; | |
144 | gpio = <&gpio0 11 GPIO_ACTIVE_HIGH>; | |
145 | pinctrl-names = "default"; | |
146 | pinctrl-0 = <&host1_pwr_en>; | |
147 | regulator-name = "vcc5_host1"; | |
148 | regulator-always-on; | |
149 | regulator-boot-on; | |
150 | }; | |
151 | ||
152 | /* This turns on vbus for otg for host mode (dwc2) */ | |
153 | vcc5v_otg: vcc5v-otg-regulator { | |
154 | compatible = "regulator-fixed"; | |
155 | enable-active-high; | |
156 | gpio = <&gpio0 12 GPIO_ACTIVE_HIGH>; | |
157 | pinctrl-names = "default"; | |
158 | pinctrl-0 = <&usbotg_pwren_h>; | |
159 | regulator-name = "vcc5_host2"; | |
160 | regulator-always-on; | |
161 | regulator-boot-on; | |
162 | }; | |
163 | }; | |
164 | ||
37aedb29 HS |
165 | &edp { |
166 | status = "okay"; | |
167 | ||
168 | pinctrl-names = "default"; | |
169 | pinctrl-0 = <&edp_hpd>; | |
170 | ||
171 | ports { | |
172 | edp_out: port@1 { | |
173 | reg = <1>; | |
174 | #address-cells = <1>; | |
175 | #size-cells = <0>; | |
176 | edp_out_panel: endpoint { | |
177 | reg = <0>; | |
178 | remote-endpoint = <&panel_in_edp>; | |
179 | }; | |
180 | }; | |
181 | }; | |
182 | }; | |
183 | ||
184 | &edp_phy { | |
185 | status = "okay"; | |
186 | }; | |
187 | ||
e28ea9db AS |
188 | &gpio_keys { |
189 | pinctrl-0 = <&pwr_key_l &ap_lid_int_l>; | |
190 | lid { | |
191 | label = "Lid"; | |
192 | gpios = <&gpio0 6 GPIO_ACTIVE_LOW>; | |
4f66f247 | 193 | wakeup-source; |
e28ea9db AS |
194 | linux,code = <0>; /* SW_LID */ |
195 | linux,input-type = <5>; /* EV_SW */ | |
196 | debounce-interval = <1>; | |
197 | }; | |
198 | }; | |
199 | ||
37aedb29 HS |
200 | &pwm0 { |
201 | status = "okay"; | |
202 | }; | |
203 | ||
e28ea9db AS |
204 | &rk808 { |
205 | vcc11-supply = <&vcc_5v>; | |
206 | ||
207 | regulators { | |
208 | vcc33_ccd: LDO_REG8 { | |
209 | regulator-name = "vcc33_ccd"; | |
210 | regulator-always-on; | |
211 | regulator-boot-on; | |
212 | regulator-min-microvolt = <3300000>; | |
213 | regulator-max-microvolt = <3300000>; | |
214 | regulator-state-mem { | |
215 | regulator-on-in-suspend; | |
216 | regulator-suspend-microvolt = <3300000>; | |
217 | }; | |
218 | }; | |
219 | }; | |
220 | }; | |
221 | ||
222 | &spi0 { | |
223 | status = "okay"; | |
224 | ||
225 | cros_ec: ec@0 { | |
226 | compatible = "google,cros-ec-spi"; | |
227 | reg = <0>; | |
228 | google,cros-ec-spi-pre-delay = <30>; | |
229 | interrupt-parent = <&gpio7>; | |
230 | interrupts = <7 IRQ_TYPE_LEVEL_LOW>; | |
231 | pinctrl-names = "default"; | |
232 | pinctrl-0 = <&ec_int>; | |
233 | spi-max-frequency = <3000000>; | |
234 | ||
235 | i2c_tunnel: i2c-tunnel { | |
236 | compatible = "google,cros-ec-i2c-tunnel"; | |
237 | google,remote-bus = <0>; | |
238 | #address-cells = <1>; | |
239 | #size-cells = <0>; | |
240 | }; | |
241 | }; | |
242 | }; | |
243 | ||
244 | &i2c4 { | |
245 | trackpad@15 { | |
246 | compatible = "elan,ekth3000"; | |
247 | reg = <0x15>; | |
248 | interrupt-parent = <&gpio7>; | |
249 | interrupts = <3 IRQ_TYPE_EDGE_FALLING>; | |
250 | pinctrl-names = "default"; | |
251 | pinctrl-0 = <&trackpad_int>; | |
252 | vcc-supply = <&vcc33_io>; | |
253 | wakeup-source; | |
254 | }; | |
255 | }; | |
256 | ||
37aedb29 HS |
257 | &vopl { |
258 | status = "okay"; | |
259 | }; | |
260 | ||
261 | &vopl_mmu { | |
262 | status = "okay"; | |
263 | }; | |
264 | ||
e28ea9db AS |
265 | &pinctrl { |
266 | pinctrl-0 = < | |
267 | /* Common for sleep and wake, but no owners */ | |
268 | &global_pwroff | |
269 | ||
270 | /* Wake only */ | |
271 | &suspend_l_wake | |
272 | >; | |
273 | pinctrl-1 = < | |
274 | /* Common for sleep and wake, but no owners */ | |
275 | &global_pwroff | |
276 | ||
277 | /* Sleep only */ | |
278 | &suspend_l_sleep | |
279 | >; | |
280 | ||
dfb2146e HS |
281 | backlight { |
282 | bl_en: bl-en { | |
283 | rockchip,pins = <7 2 RK_FUNC_GPIO &pcfg_pull_none>; | |
284 | }; | |
285 | }; | |
286 | ||
e28ea9db AS |
287 | buttons { |
288 | ap_lid_int_l: ap-lid-int-l { | |
289 | rockchip,pins = <0 6 RK_FUNC_GPIO &pcfg_pull_up>; | |
290 | }; | |
291 | }; | |
292 | ||
293 | charger { | |
294 | ac_present_ap: ac-present-ap { | |
295 | rockchip,pins = <0 8 RK_FUNC_GPIO &pcfg_pull_up>; | |
296 | }; | |
297 | }; | |
298 | ||
299 | cros-ec { | |
300 | ec_int: ec-int { | |
301 | rockchip,pins = <7 7 RK_FUNC_GPIO &pcfg_pull_none>; | |
302 | }; | |
303 | }; | |
304 | ||
305 | suspend { | |
306 | suspend_l_wake: suspend-l-wake { | |
307 | rockchip,pins = <0 17 RK_FUNC_GPIO &pcfg_output_low>; | |
308 | }; | |
309 | ||
310 | suspend_l_sleep: suspend-l-sleep { | |
311 | rockchip,pins = <0 17 RK_FUNC_GPIO &pcfg_output_high>; | |
312 | }; | |
313 | }; | |
314 | ||
315 | trackpad { | |
316 | trackpad_int: trackpad-int { | |
317 | rockchip,pins = <7 3 RK_FUNC_GPIO &pcfg_pull_up>; | |
318 | }; | |
319 | }; | |
320 | ||
321 | usb-host { | |
322 | host1_pwr_en: host1-pwr-en { | |
323 | rockchip,pins = <0 11 RK_FUNC_GPIO &pcfg_pull_none>; | |
324 | }; | |
325 | ||
326 | usbotg_pwren_h: usbotg-pwren-h { | |
327 | rockchip,pins = <0 12 RK_FUNC_GPIO &pcfg_pull_none>; | |
328 | }; | |
329 | }; | |
330 | }; | |
331 | ||
332 | #include "cros-ec-keyboard.dtsi" |