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