]>
Commit | Line | Data |
---|---|---|
6ce0562a | 1 | /* |
cdcc8b6b HS |
2 | * This file is dual-licensed: you can use it either under the terms |
3 | * of the GPL or the X11 license, at your option. Note that this dual | |
4 | * licensing only applies to this file, and not this project as a | |
5 | * whole. | |
6ce0562a | 6 | * |
cdcc8b6b HS |
7 | * a) This file is free software; you can redistribute it and/or |
8 | * modify it under the terms of the GNU General Public License as | |
9 | * published by the Free Software Foundation; either version 2 of the | |
10 | * License, or (at your option) any later version. | |
11 | * | |
12 | * This file is distributed in the hope that it will be useful, | |
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 | * GNU General Public License for more details. | |
16 | * | |
17 | * Or, alternatively, | |
18 | * | |
19 | * b) Permission is hereby granted, free of charge, to any person | |
20 | * obtaining a copy of this software and associated documentation | |
21 | * files (the "Software"), to deal in the Software without | |
22 | * restriction, including without limitation the rights to use, | |
23 | * copy, modify, merge, publish, distribute, sublicense, and/or | |
24 | * sell copies of the Software, and to permit persons to whom the | |
25 | * Software is furnished to do so, subject to the following | |
26 | * conditions: | |
27 | * | |
28 | * The above copyright notice and this permission notice shall be | |
29 | * included in all copies or substantial portions of the Software. | |
30 | * | |
31 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | |
32 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES | |
33 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | |
34 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT | |
35 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | |
36 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | |
37 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | |
38 | * OTHER DEALINGS IN THE SOFTWARE. | |
6ce0562a HS |
39 | */ |
40 | ||
8b30c899 | 41 | #include <dt-bindings/input/input.h> |
0541f94f | 42 | #include <dt-bindings/pwm/pwm.h> |
6ce0562a HS |
43 | #include "rk3288.dtsi" |
44 | ||
45 | / { | |
0b639b81 | 46 | memory@0 { |
6158e6d0 | 47 | device_type = "memory"; |
79db45be | 48 | reg = <0x0 0x0 0x0 0x80000000>; |
6ce0562a HS |
49 | }; |
50 | ||
ef93f751 JC |
51 | adc-keys { |
52 | compatible = "adc-keys"; | |
53 | io-channels = <&saradc 1>; | |
54 | io-channel-names = "buttons"; | |
55 | keyup-threshold-microvolt = <1800000>; | |
56 | ||
57 | button-up { | |
58 | label = "Volume Up"; | |
59 | linux,code = <KEY_VOLUMEUP>; | |
60 | press-threshold-microvolt = <100000>; | |
61 | }; | |
62 | ||
63 | button-down { | |
64 | label = "Volume Down"; | |
65 | linux,code = <KEY_VOLUMEDOWN>; | |
66 | press-threshold-microvolt = <300000>; | |
67 | }; | |
68 | ||
69 | menu { | |
70 | label = "Menu"; | |
71 | linux,code = <KEY_MENU>; | |
72 | press-threshold-microvolt = <640000>; | |
73 | }; | |
74 | ||
75 | esc { | |
76 | label = "Esc"; | |
77 | linux,code = <KEY_ESC>; | |
78 | press-threshold-microvolt = <1000000>; | |
79 | }; | |
80 | ||
81 | home { | |
82 | label = "Home"; | |
83 | linux,code = <KEY_HOME>; | |
84 | press-threshold-microvolt = <1300000>; | |
85 | }; | |
86 | }; | |
87 | ||
d4da5121 | 88 | backlight: backlight { |
0541f94f DA |
89 | compatible = "pwm-backlight"; |
90 | brightness-levels = < | |
91 | 0 1 2 3 4 5 6 7 | |
92 | 8 9 10 11 12 13 14 15 | |
93 | 16 17 18 19 20 21 22 23 | |
94 | 24 25 26 27 28 29 30 31 | |
95 | 32 33 34 35 36 37 38 39 | |
96 | 40 41 42 43 44 45 46 47 | |
97 | 48 49 50 51 52 53 54 55 | |
98 | 56 57 58 59 60 61 62 63 | |
99 | 64 65 66 67 68 69 70 71 | |
100 | 72 73 74 75 76 77 78 79 | |
101 | 80 81 82 83 84 85 86 87 | |
102 | 88 89 90 91 92 93 94 95 | |
103 | 96 97 98 99 100 101 102 103 | |
104 | 104 105 106 107 108 109 110 111 | |
105 | 112 113 114 115 116 117 118 119 | |
106 | 120 121 122 123 124 125 126 127 | |
107 | 128 129 130 131 132 133 134 135 | |
108 | 136 137 138 139 140 141 142 143 | |
109 | 144 145 146 147 148 149 150 151 | |
110 | 152 153 154 155 156 157 158 159 | |
111 | 160 161 162 163 164 165 166 167 | |
112 | 168 169 170 171 172 173 174 175 | |
113 | 176 177 178 179 180 181 182 183 | |
114 | 184 185 186 187 188 189 190 191 | |
115 | 192 193 194 195 196 197 198 199 | |
116 | 200 201 202 203 204 205 206 207 | |
117 | 208 209 210 211 212 213 214 215 | |
118 | 216 217 218 219 220 221 222 223 | |
119 | 224 225 226 227 228 229 230 231 | |
120 | 232 233 234 235 236 237 238 239 | |
121 | 240 241 242 243 244 245 246 247 | |
122 | 248 249 250 251 252 253 254 255>; | |
123 | default-brightness-level = <128>; | |
e9e79d53 | 124 | enable-gpios = <&gpio7 RK_PA2 GPIO_ACTIVE_HIGH>; |
0541f94f DA |
125 | pinctrl-names = "default"; |
126 | pinctrl-0 = <&bl_en>; | |
127 | pwms = <&pwm0 0 1000000 PWM_POLARITY_INVERTED>; | |
128 | }; | |
129 | ||
b04061e6 CZ |
130 | ext_gmac: external-gmac-clock { |
131 | compatible = "fixed-clock"; | |
132 | clock-frequency = <125000000>; | |
133 | clock-output-names = "ext_gmac"; | |
134 | #clock-cells = <0>; | |
135 | }; | |
136 | ||
d4da5121 YY |
137 | panel: panel { |
138 | compatible ="lg,lp079qx1-sp0v", "simple-panel"; | |
139 | backlight = <&backlight>; | |
e9e79d53 | 140 | enable-gpios = <&gpio7 RK_PA4 GPIO_ACTIVE_HIGH>; |
d4da5121 YY |
141 | pinctrl-0 = <&lcd_cs>; |
142 | ||
143 | ports { | |
144 | panel_in: port { | |
145 | panel_in_edp: endpoint { | |
146 | remote-endpoint = <&edp_out_panel>; | |
147 | }; | |
148 | }; | |
149 | }; | |
150 | }; | |
151 | ||
6ce0562a HS |
152 | gpio-keys { |
153 | compatible = "gpio-keys"; | |
6ce0562a HS |
154 | autorepeat; |
155 | ||
156 | pinctrl-names = "default"; | |
157 | pinctrl-0 = <&pwrbtn>; | |
158 | ||
8b30c899 | 159 | power { |
e9e79d53 | 160 | gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>; |
8b30c899 | 161 | linux,code = <KEY_POWER>; |
6ce0562a HS |
162 | label = "GPIO Key Power"; |
163 | linux,input-type = <1>; | |
4f66f247 | 164 | wakeup-source; |
6ce0562a HS |
165 | debounce-interval = <100>; |
166 | }; | |
167 | }; | |
83a742b4 DA |
168 | |
169 | /* This turns on USB vbus for both host0 (ehci) and host1 (dwc2) */ | |
170 | vcc_host: vcc-host-regulator { | |
171 | compatible = "regulator-fixed"; | |
172 | enable-active-high; | |
e9e79d53 | 173 | gpio = <&gpio0 RK_PB6 GPIO_ACTIVE_HIGH>; |
83a742b4 DA |
174 | pinctrl-names = "default"; |
175 | pinctrl-0 = <&host_vbus_drv>; | |
176 | regulator-name = "vcc_host"; | |
177 | regulator-always-on; | |
178 | regulator-boot-on; | |
179 | }; | |
e35e47ac RC |
180 | |
181 | vcc_phy: vcc-phy-regulator { | |
182 | compatible = "regulator-fixed"; | |
183 | enable-active-high; | |
e9e79d53 | 184 | gpio = <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>; |
e35e47ac RC |
185 | pinctrl-names = "default"; |
186 | pinctrl-0 = <ð_phy_pwr>; | |
187 | regulator-name = "vcc_phy"; | |
68c3a884 RP |
188 | regulator-min-microvolt = <3300000>; |
189 | regulator-max-microvolt = <3300000>; | |
e35e47ac RC |
190 | regulator-always-on; |
191 | regulator-boot-on; | |
192 | }; | |
91d5cb73 HS |
193 | |
194 | vcc_sys: vsys-regulator { | |
195 | compatible = "regulator-fixed"; | |
196 | regulator-name = "vcc_sys"; | |
197 | regulator-min-microvolt = <5000000>; | |
198 | regulator-max-microvolt = <5000000>; | |
199 | regulator-always-on; | |
200 | regulator-boot-on; | |
201 | }; | |
e565abe1 DA |
202 | |
203 | /* | |
204 | * NOTE: vcc_sd isn't hooked up on v1.0 boards where power comes from | |
205 | * vcc_io directly. Those boards won't be able to power cycle SD cards | |
206 | * but it shouldn't hurt to toggle this pin there anyway. | |
207 | */ | |
208 | vcc_sd: sdmmc-regulator { | |
209 | compatible = "regulator-fixed"; | |
e9e79d53 | 210 | gpio = <&gpio7 RK_PB3 GPIO_ACTIVE_LOW>; |
e565abe1 DA |
211 | pinctrl-names = "default"; |
212 | pinctrl-0 = <&sdmmc_pwr>; | |
213 | regulator-name = "vcc_sd"; | |
214 | regulator-min-microvolt = <3300000>; | |
215 | regulator-max-microvolt = <3300000>; | |
216 | startup-delay-us = <100000>; | |
217 | vin-supply = <&vcc_io>; | |
218 | }; | |
6ce0562a HS |
219 | }; |
220 | ||
b04061e6 CZ |
221 | &cpu0 { |
222 | cpu0-supply = <&vdd_cpu>; | |
223 | }; | |
224 | ||
d4da5121 YY |
225 | &edp { |
226 | force-hpd; | |
227 | status = "okay"; | |
228 | ||
229 | ports { | |
230 | edp_out: port@1 { | |
231 | reg = <1>; | |
232 | #address-cells = <1>; | |
233 | #size-cells = <0>; | |
234 | ||
235 | edp_out_panel: endpoint { | |
236 | reg = <0>; | |
237 | remote-endpoint = <&panel_in_edp>; | |
238 | }; | |
239 | }; | |
240 | }; | |
241 | }; | |
242 | ||
243 | &edp_phy { | |
244 | status = "okay"; | |
245 | }; | |
246 | ||
2c31d949 | 247 | &emmc { |
2c31d949 DA |
248 | bus-width = <8>; |
249 | cap-mmc-highspeed; | |
250 | disable-wp; | |
251 | non-removable; | |
2c31d949 DA |
252 | pinctrl-names = "default"; |
253 | pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_pwr &emmc_bus8>; | |
254 | status = "okay"; | |
255 | }; | |
256 | ||
849f0553 JC |
257 | &saradc { |
258 | vref-supply = <&vcc_18>; | |
259 | status = "okay"; | |
260 | }; | |
261 | ||
2c31d949 DA |
262 | &sdmmc { |
263 | bus-width = <4>; | |
264 | cap-mmc-highspeed; | |
265 | cap-sd-highspeed; | |
266 | card-detect-delay = <200>; | |
267 | disable-wp; /* wp not hooked up */ | |
2c31d949 DA |
268 | pinctrl-names = "default"; |
269 | pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>; | |
270 | status = "okay"; | |
e565abe1 DA |
271 | vmmc-supply = <&vcc_sd>; |
272 | vqmmc-supply = <&vccio_sd>; | |
2c31d949 DA |
273 | }; |
274 | ||
b04061e6 CZ |
275 | &gmac { |
276 | phy-supply = <&vcc_phy>; | |
277 | phy-mode = "rgmii"; | |
278 | clock_in_out = "input"; | |
e9e79d53 | 279 | snps,reset-gpio = <&gpio4 RK_PA7 GPIO_ACTIVE_HIGH>; |
b04061e6 CZ |
280 | snps,reset-active-low; |
281 | snps,reset-delays-us = <0 10000 1000000>; | |
282 | assigned-clocks = <&cru SCLK_MAC>; | |
283 | assigned-clock-parents = <&ext_gmac>; | |
284 | pinctrl-names = "default"; | |
285 | pinctrl-0 = <&rgmii_pins>; | |
286 | tx_delay = <0x30>; | |
287 | rx_delay = <0x10>; | |
288 | status = "ok"; | |
289 | }; | |
290 | ||
02b12d6a JC |
291 | &gpu { |
292 | mali-supply = <&vdd_gpu>; | |
293 | status = "okay"; | |
294 | }; | |
295 | ||
b04061e6 CZ |
296 | &hdmi { |
297 | ddc-i2c-bus = <&i2c5>; | |
298 | status = "okay"; | |
299 | }; | |
300 | ||
6ce0562a HS |
301 | &i2c0 { |
302 | status = "okay"; | |
303 | }; | |
304 | ||
863b76b2 HS |
305 | &i2c5 { |
306 | status = "okay"; | |
307 | }; | |
308 | ||
6ce0562a HS |
309 | &wdt { |
310 | status = "okay"; | |
311 | }; | |
312 | ||
0541f94f DA |
313 | &pwm0 { |
314 | status = "okay"; | |
315 | }; | |
316 | ||
6ce0562a HS |
317 | &uart0 { |
318 | status = "okay"; | |
319 | }; | |
320 | ||
321 | &uart1 { | |
322 | status = "okay"; | |
323 | }; | |
324 | ||
325 | &uart2 { | |
326 | status = "okay"; | |
327 | }; | |
328 | ||
329 | &uart3 { | |
330 | status = "okay"; | |
331 | }; | |
332 | ||
333 | &uart4 { | |
334 | status = "okay"; | |
335 | }; | |
336 | ||
ff9d0ecb CW |
337 | &tsadc { |
338 | rockchip,hw-tshut-mode = <0>; /* tshut mode 0:CRU 1:GPIO */ | |
339 | rockchip,hw-tshut-polarity = <0>; /* tshut polarity 0:LOW 1:HIGH */ | |
340 | status = "okay"; | |
341 | }; | |
342 | ||
6ce0562a | 343 | &pinctrl { |
6618e478 DA |
344 | pcfg_pull_none_drv_8ma: pcfg-pull-none-drv-8ma { |
345 | drive-strength = <8>; | |
346 | }; | |
347 | ||
348 | pcfg_pull_up_drv_8ma: pcfg-pull-up-drv-8ma { | |
349 | bias-pull-up; | |
350 | drive-strength = <8>; | |
351 | }; | |
352 | ||
0541f94f DA |
353 | backlight { |
354 | bl_en: bl-en { | |
355 | rockchip,pins = <7 2 RK_FUNC_GPIO &pcfg_pull_none>; | |
356 | }; | |
357 | }; | |
358 | ||
6ce0562a HS |
359 | buttons { |
360 | pwrbtn: pwrbtn { | |
361 | rockchip,pins = <0 5 RK_FUNC_GPIO &pcfg_pull_up>; | |
362 | }; | |
363 | }; | |
83a742b4 | 364 | |
d4da5121 YY |
365 | lcd { |
366 | lcd_cs: lcd-cs { | |
367 | rockchip,pins = <7 4 RK_FUNC_GPIO &pcfg_pull_none>; | |
368 | }; | |
369 | }; | |
370 | ||
91ff8cd8 DA |
371 | pmic { |
372 | pmic_int: pmic-int { | |
373 | rockchip,pins = <RK_GPIO0 4 RK_FUNC_GPIO &pcfg_pull_up>; | |
374 | }; | |
375 | }; | |
376 | ||
6618e478 DA |
377 | sdmmc { |
378 | /* | |
379 | * Default drive strength isn't enough to achieve even | |
380 | * high-speed mode on EVB board so bump up to 8ma. | |
381 | */ | |
382 | sdmmc_bus4: sdmmc-bus4 { | |
383 | rockchip,pins = <6 16 RK_FUNC_1 &pcfg_pull_up_drv_8ma>, | |
384 | <6 17 RK_FUNC_1 &pcfg_pull_up_drv_8ma>, | |
385 | <6 18 RK_FUNC_1 &pcfg_pull_up_drv_8ma>, | |
386 | <6 19 RK_FUNC_1 &pcfg_pull_up_drv_8ma>; | |
387 | }; | |
388 | ||
389 | sdmmc_clk: sdmmc-clk { | |
390 | rockchip,pins = <6 20 RK_FUNC_1 &pcfg_pull_none_drv_8ma>; | |
391 | }; | |
392 | ||
393 | sdmmc_cmd: sdmmc-cmd { | |
394 | rockchip,pins = <6 21 RK_FUNC_1 &pcfg_pull_up_drv_8ma>; | |
395 | }; | |
e565abe1 DA |
396 | |
397 | sdmmc_pwr: sdmmc-pwr { | |
398 | rockchip,pins = <7 11 RK_FUNC_GPIO &pcfg_pull_none>; | |
399 | }; | |
6618e478 DA |
400 | }; |
401 | ||
83a742b4 DA |
402 | usb { |
403 | host_vbus_drv: host-vbus-drv { | |
404 | rockchip,pins = <0 14 RK_FUNC_GPIO &pcfg_pull_none>; | |
405 | }; | |
406 | }; | |
e35e47ac RC |
407 | |
408 | eth_phy { | |
409 | eth_phy_pwr: eth-phy-pwr { | |
410 | rockchip,pins = <0 6 RK_FUNC_GPIO &pcfg_pull_none>; | |
411 | }; | |
412 | }; | |
6ce0562a | 413 | }; |
163cb917 | 414 | |
e537c9cc YL |
415 | &usbphy { |
416 | status = "okay"; | |
417 | }; | |
418 | ||
163cb917 DA |
419 | &usb_host0_ehci { |
420 | status = "okay"; | |
421 | }; | |
ddf8303f KY |
422 | |
423 | &usb_host1 { | |
424 | status = "okay"; | |
425 | }; | |
863b76b2 HS |
426 | |
427 | &vopb { | |
428 | status = "okay"; | |
429 | }; | |
430 | ||
431 | &vopb_mmu { | |
432 | status = "okay"; | |
433 | }; | |
434 | ||
435 | &vopl { | |
436 | status = "okay"; | |
437 | }; | |
438 | ||
439 | &vopl_mmu { | |
440 | status = "okay"; | |
441 | }; |