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