blob: 143eaae26db554dbafe249490c6499351579cb37 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0
Simon Glass9d5d1cc2015-08-30 16:55:42 -06002/*
3 * Google Veyron (and derivatives) board device tree source
4 *
5 * Copyright 2014 Google, Inc
Simon Glass9d5d1cc2015-08-30 16:55:42 -06006 */
7
8#include <dt-bindings/clock/rockchip,rk808.h>
9#include <dt-bindings/input/input.h>
10#include "rk3288-veyron.dtsi"
11
12/ {
13 aliases {
14 i2c20 = &i2c_tunnel;
Simon Glass86ad1b62016-11-13 14:22:08 -070015 video0 = &vopl;
16 video1 = &vopb;
Simon Glass9d5d1cc2015-08-30 16:55:42 -060017 };
18
19 gpio_keys: gpio-keys {
20 pinctrl-0 = <&pwr_key_h &ap_lid_int_l>;
21 lid {
22 label = "Lid";
23 gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
24 linux,code = <0>; /* SW_LID */
25 linux,input-type = <5>; /* EV_SW */
26 debounce-interval = <1>;
27 gpio-key,wakeup;
28 };
29 };
30
31 gpio-charger {
32 compatible = "gpio-charger";
33 gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>;
34 pinctrl-names = "default";
35 pinctrl-0 = <&ac_present_ap>;
36 charger-type = "mains";
37 };
38
39 /* A non-regulated voltage from power supply or battery */
40 vccsys: vccsys {
41 compatible = "regulator-fixed";
42 regulator-name = "vccsys";
43 regulator-boot-on;
44 regulator-always-on;
45 };
46
47 vcc33_sys: vcc33-sys {
48 vin-supply = <&vccsys>;
49 };
50
51 vcc_5v: vcc-5v {
52 vin-supply = <&vccsys>;
53 };
54
55 /* This turns on vbus for host1 (dwc2) */
56 vcc5_host1: vcc5-host1-regulator {
57 compatible = "regulator-fixed";
58 enable-active-high;
59 gpio = <&gpio0 11 GPIO_ACTIVE_HIGH>;
60 pinctrl-names = "default";
61 pinctrl-0 = <&host1_pwr_en>;
62 regulator-name = "vcc5_host1";
63 regulator-always-on;
64 regulator-boot-on;
65 };
66
67 /* This turns on vbus for otg for host mode (dwc2) */
68 vcc5v_otg: vcc5v-otg-regulator {
69 compatible = "regulator-fixed";
70 enable-active-high;
71 gpio = <&gpio0 12 GPIO_ACTIVE_HIGH>;
72 pinctrl-names = "default";
73 pinctrl-0 = <&usbotg_pwren_h>;
74 regulator-name = "vcc5_host2";
75 regulator-always-on;
76 regulator-boot-on;
77 };
78};
79
80&rk808 {
81 regulators {
82 vcc33_ccd: LDO_REG8 {
83 regulator-always-on;
84 regulator-boot-on;
85 regulator-min-microvolt = <3300000>;
86 regulator-max-microvolt = <3300000>;
87 regulator-name = "vcc33_ccd";
88 regulator-suspend-mem-disabled;
89 };
90 };
91};
92
93&spi0 {
94 status = "okay";
Simon Glasscf88b7c2016-01-21 19:44:13 -070095 spi-activate-delay = <100>;
96 spi-max-frequency = <3000000>;
97 spi-deactivate-delay = <200>;
Simon Glass9d5d1cc2015-08-30 16:55:42 -060098
99 cros_ec: ec@0 {
100 compatible = "google,cros-ec-spi";
101 spi-max-frequency = <3000000>;
102 interrupt-parent = <&gpio7>;
103 interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
Simon Glasscf88b7c2016-01-21 19:44:13 -0700104 ec-interrupt = <&gpio7 7 GPIO_ACTIVE_LOW>;
Simon Glass9d5d1cc2015-08-30 16:55:42 -0600105 pinctrl-names = "default";
106 pinctrl-0 = <&ec_int>;
107 reg = <0>;
108 google,cros-ec-spi-pre-delay = <30>;
109
110 i2c_tunnel: i2c-tunnel {
111 compatible = "google,cros-ec-i2c-tunnel";
112 google,remote-bus = <0>;
113 #address-cells = <1>;
114 #size-cells = <0>;
115 };
116 };
117};
118
119&i2c4 {
120 trackpad@15 {
121 compatible = "elan,i2c_touchpad";
122 interrupt-parent = <&gpio7>;
123 interrupts = <3 IRQ_TYPE_EDGE_FALLING>;
124 pinctrl-names = "default";
125 pinctrl-0 = <&trackpad_int>;
126 reg = <0x15>;
127 vcc-supply = <&vcc33_io>;
128 wakeup-source;
129 };
130};
131
132&pinctrl {
133 pinctrl-0 = <
134 /* Common for sleep and wake, but no owners */
135 &ddr0_retention
136 &ddrio_pwroff
137 &global_pwroff
138
139 /* Wake only */
140 &suspend_l_wake
141 &bt_dev_wake_awake
142 >;
143 pinctrl-1 = <
144 /* Common for sleep and wake, but no owners */
145 &ddr0_retention
146 &ddrio_pwroff
147 &global_pwroff
148
149 /* Sleep only */
150 &suspend_l_sleep
151 &bt_dev_wake_sleep
152 >;
153
154 buttons {
155 ap_lid_int_l: ap-lid-int-l {
156 rockchip,pins = <0 6 RK_FUNC_GPIO &pcfg_pull_up>;
157 };
158 };
159
160 charger {
161 ac_present_ap: ac-present-ap {
162 rockchip,pins = <0 8 RK_FUNC_GPIO &pcfg_pull_up>;
163 };
164 };
165
166 cros-ec {
167 ec_int: ec-int {
168 rockchip,pins = <7 7 RK_FUNC_GPIO &pcfg_pull_none>;
169 };
170 };
171
172 sdmmc {
173 sdmmc_wp_gpio: sdmmc-wp-gpio {
174 rockchip,pins = <7 10 RK_FUNC_GPIO &pcfg_pull_up>;
175 };
176 };
177
178 suspend {
179 suspend_l_wake: suspend-l-wake {
180 rockchip,pins = <0 17 RK_FUNC_GPIO &pcfg_output_low>;
181 };
182
183 suspend_l_sleep: suspend-l-sleep {
184 rockchip,pins = <0 17 RK_FUNC_GPIO &pcfg_output_high>;
185 };
186 };
187
188 trackpad {
189 trackpad_int: trackpad-int {
190 rockchip,pins = <7 3 RK_FUNC_GPIO &pcfg_pull_up>;
191 };
192 };
193
194 usb-host {
195 host1_pwr_en: host1-pwr-en {
196 rockchip,pins = <0 11 RK_FUNC_GPIO &pcfg_pull_none>;
197 };
198
199 usbotg_pwren_h: usbotg-pwren-h {
200 rockchip,pins = <0 12 RK_FUNC_GPIO &pcfg_pull_none>;
201 };
202 };
203};
204
205#include "cros-ec-keyboard.dtsi"