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