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