Linux Audio

Check our new training course

Loading...
v6.2
  1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
  2/*
  3 * Google Veyron (and derivatives) board device tree source
  4 * Chromebook specific parts
  5 *
  6 * Copyright 2015 Google, Inc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
  7 */
  8
  9#include <dt-bindings/clock/rockchip,rk808.h>
 10#include <dt-bindings/input/input.h>
 11#include "rk3288-veyron.dtsi"
 12#include "rk3288-veyron-analog-audio.dtsi"
 13#include "rk3288-veyron-edp.dtsi"
 14#include "rk3288-veyron-sdmmc.dtsi"
 15
 16/ {
 17	aliases {
 18		/* Assign 20 so we don't get confused w/ builtin ones */
 19		i2c20 = &i2c_tunnel;
 20	};
 21
 22	gpio-charger {
 23		compatible = "gpio-charger";
 24		charger-type = "mains";
 25		gpios = <&gpio0 RK_PB0 GPIO_ACTIVE_HIGH>;
 26		pinctrl-names = "default";
 27		pinctrl-0 = <&ac_present_ap>;
 28	};
 29
 30	lid_switch: lid-switch {
 31		compatible = "gpio-keys";
 32		pinctrl-names = "default";
 33		pinctrl-0 = <&ap_lid_int_l>;
 34
 35		switch-lid {
 36			label = "Lid";
 37			gpios = <&gpio0 RK_PA6 GPIO_ACTIVE_LOW>;
 38			wakeup-source;
 39			linux,code = <SW_LID>;
 40			linux,input-type = <EV_SW>;
 41			debounce-interval = <1>;
 42		};
 43	};
 44
 45	/* A non-regulated voltage from power supply or battery */
 46	vccsys: vccsys {
 47		compatible = "regulator-fixed";
 48		regulator-name = "vccsys";
 49		regulator-boot-on;
 50		regulator-always-on;
 51	};
 52
 53	vcc33_sys: vcc33-sys {
 54		vin-supply = <&vccsys>;
 55	};
 56
 57	vcc_5v: vcc-5v {
 58		vin-supply = <&vccsys>;
 59	};
 60
 61	/* This turns on vbus for host1 (dwc2) */
 62	vcc5_host1: vcc5-host1-regulator {
 63		compatible = "regulator-fixed";
 64		enable-active-high;
 65		gpio = <&gpio0 RK_PB3 GPIO_ACTIVE_HIGH>;
 66		pinctrl-names = "default";
 67		pinctrl-0 = <&host1_pwr_en>;
 68		regulator-name = "vcc5_host1";
 69		regulator-always-on;
 70		regulator-boot-on;
 71	};
 72
 73	/* This turns on vbus for otg for host mode (dwc2) */
 74	vcc5v_otg: vcc5v-otg-regulator {
 75		compatible = "regulator-fixed";
 76		enable-active-high;
 77		gpio = <&gpio0 RK_PB4 GPIO_ACTIVE_HIGH>;
 78		pinctrl-names = "default";
 79		pinctrl-0 = <&usbotg_pwren_h>;
 80		regulator-name = "vcc5_host2";
 81		regulator-always-on;
 82		regulator-boot-on;
 83	};
 84};
 85
 
 
 
 
 
 
 
 
 
 
 
 
 86&rk808 {
 87	vcc11-supply = <&vcc_5v>;
 88
 89	regulators {
 90		vcc33_ccd: LDO_REG8 {
 91			regulator-name = "vcc33_ccd";
 92			regulator-always-on;
 93			regulator-boot-on;
 94			regulator-min-microvolt = <3300000>;
 95			regulator-max-microvolt = <3300000>;
 96			regulator-state-mem {
 97				regulator-off-in-suspend;
 
 98			};
 99		};
100	};
101};
102
103&spi0 {
104	status = "okay";
105
106	cros_ec: ec@0 {
107		compatible = "google,cros-ec-spi";
108		reg = <0>;
109		google,cros-ec-spi-pre-delay = <30>;
110		interrupt-parent = <&gpio7>;
111		interrupts = <RK_PA7 IRQ_TYPE_LEVEL_LOW>;
112		pinctrl-names = "default";
113		pinctrl-0 = <&ec_int>;
114		spi-max-frequency = <3000000>;
115
116		i2c_tunnel: i2c-tunnel {
117			compatible = "google,cros-ec-i2c-tunnel";
118			google,remote-bus = <0>;
119			#address-cells = <1>;
120			#size-cells = <0>;
121		};
122	};
123};
124
125&i2c4 {
126	trackpad@15 {
127		compatible = "elan,ekth3000";
128		reg = <0x15>;
129		interrupt-parent = <&gpio7>;
130		interrupts = <RK_PA3 IRQ_TYPE_EDGE_FALLING>;
131		pinctrl-names = "default";
132		pinctrl-0 = <&trackpad_int>;
133		vcc-supply = <&vcc33_io>;
134		wakeup-source;
135	};
136};
137
138&pinctrl {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
139	buttons {
140		ap_lid_int_l: ap-lid-int-l {
141			rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>;
142		};
143	};
144
145	charger {
146		ac_present_ap: ac-present-ap {
147			rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_up>;
148		};
149	};
150
151	cros-ec {
152		ec_int: ec-int {
153			rockchip,pins = <7 RK_PA7 RK_FUNC_GPIO &pcfg_pull_none>;
154		};
155	};
156
157	suspend {
158		suspend_l_wake: suspend-l-wake {
159			rockchip,pins = <0 RK_PC1 RK_FUNC_GPIO &pcfg_output_low>;
160		};
161
162		suspend_l_sleep: suspend-l-sleep {
163			rockchip,pins = <0 RK_PC1 RK_FUNC_GPIO &pcfg_output_high>;
164		};
165	};
166
167	trackpad {
168		trackpad_int: trackpad-int {
169			rockchip,pins = <7 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
170		};
171	};
172
173	usb-host {
174		host1_pwr_en: host1-pwr-en {
175			rockchip,pins = <0 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
176		};
177
178		usbotg_pwren_h: usbotg-pwren-h {
179			rockchip,pins = <0 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>;
180		};
181	};
182};
183
184#include "cros-ec-keyboard.dtsi"
v4.6
 
  1/*
  2 * Google Veyron (and derivatives) board device tree source
  3 * Chromebook specific parts
  4 *
  5 * Copyright 2015 Google, Inc
  6 *
  7 * This file is dual-licensed: you can use it either under the terms
  8 * of the GPL or the X11 license, at your option. Note that this dual
  9 * licensing only applies to this file, and not this project as a
 10 * whole.
 11 *
 12 *  a) This file is free software; you can redistribute it and/or
 13 *     modify it under the terms of the GNU General Public License as
 14 *     published by the Free Software Foundation; either version 2 of the
 15 *     License, or (at your option) any later version.
 16 *
 17 *     This file is distributed in the hope that it will be useful,
 18 *     but WITHOUT ANY WARRANTY; without even the implied warranty of
 19 *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 20 *     GNU General Public License for more details.
 21 *
 22 *  Or, alternatively,
 23 *
 24 *  b) Permission is hereby granted, free of charge, to any person
 25 *     obtaining a copy of this software and associated documentation
 26 *     files (the "Software"), to deal in the Software without
 27 *     restriction, including without limitation the rights to use,
 28 *     copy, modify, merge, publish, distribute, sublicense, and/or
 29 *     sell copies of the Software, and to permit persons to whom the
 30 *     Software is furnished to do so, subject to the following
 31 *     conditions:
 32 *
 33 *     The above copyright notice and this permission notice shall be
 34 *     included in all copies or substantial portions of the Software.
 35 *
 36 *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 37 *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
 38 *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 39 *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 40 *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
 41 *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 42 *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 43 *     OTHER DEALINGS IN THE SOFTWARE.
 44 */
 45
 46#include <dt-bindings/clock/rockchip,rk808.h>
 47#include <dt-bindings/input/input.h>
 48#include "rk3288-veyron.dtsi"
 
 
 49#include "rk3288-veyron-sdmmc.dtsi"
 50
 51/ {
 52	aliases {
 53		/* Assign 20 so we don't get confused w/ builtin ones */
 54		i2c20 = &i2c_tunnel;
 55	};
 56
 57	gpio-charger {
 58		compatible = "gpio-charger";
 59		charger-type = "mains";
 60		gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>;
 61		pinctrl-names = "default";
 62		pinctrl-0 = <&ac_present_ap>;
 63	};
 64
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 65	/* A non-regulated voltage from power supply or battery */
 66	vccsys: vccsys {
 67		compatible = "regulator-fixed";
 68		regulator-name = "vccsys";
 69		regulator-boot-on;
 70		regulator-always-on;
 71	};
 72
 73	vcc33_sys: vcc33-sys {
 74		vin-supply = <&vccsys>;
 75	};
 76
 77	vcc_5v: vcc-5v {
 78		vin-supply = <&vccsys>;
 79	};
 80
 81	/* This turns on vbus for host1 (dwc2) */
 82	vcc5_host1: vcc5-host1-regulator {
 83		compatible = "regulator-fixed";
 84		enable-active-high;
 85		gpio = <&gpio0 11 GPIO_ACTIVE_HIGH>;
 86		pinctrl-names = "default";
 87		pinctrl-0 = <&host1_pwr_en>;
 88		regulator-name = "vcc5_host1";
 89		regulator-always-on;
 90		regulator-boot-on;
 91	};
 92
 93	/* This turns on vbus for otg for host mode (dwc2) */
 94	vcc5v_otg: vcc5v-otg-regulator {
 95		compatible = "regulator-fixed";
 96		enable-active-high;
 97		gpio = <&gpio0 12 GPIO_ACTIVE_HIGH>;
 98		pinctrl-names = "default";
 99		pinctrl-0 = <&usbotg_pwren_h>;
100		regulator-name = "vcc5_host2";
101		regulator-always-on;
102		regulator-boot-on;
103	};
104};
105
106&gpio_keys {
107	pinctrl-0 = <&pwr_key_l &ap_lid_int_l>;
108	lid {
109		label = "Lid";
110		gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
111		wakeup-source;
112		linux,code = <0>; /* SW_LID */
113		linux,input-type = <5>; /* EV_SW */
114		debounce-interval = <1>;
115	};
116};
117
118&rk808 {
119	vcc11-supply = <&vcc_5v>;
120
121	regulators {
122		vcc33_ccd: LDO_REG8 {
123			regulator-name = "vcc33_ccd";
124			regulator-always-on;
125			regulator-boot-on;
126			regulator-min-microvolt = <3300000>;
127			regulator-max-microvolt = <3300000>;
128			regulator-state-mem {
129				regulator-on-in-suspend;
130				regulator-suspend-microvolt = <3300000>;
131			};
132		};
133	};
134};
135
136&spi0 {
137	status = "okay";
138
139	cros_ec: ec@0 {
140		compatible = "google,cros-ec-spi";
141		reg = <0>;
142		google,cros-ec-spi-pre-delay = <30>;
143		interrupt-parent = <&gpio7>;
144		interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
145		pinctrl-names = "default";
146		pinctrl-0 = <&ec_int>;
147		spi-max-frequency = <3000000>;
148
149		i2c_tunnel: i2c-tunnel {
150			compatible = "google,cros-ec-i2c-tunnel";
151			google,remote-bus = <0>;
152			#address-cells = <1>;
153			#size-cells = <0>;
154		};
155	};
156};
157
158&i2c4 {
159	trackpad@15 {
160		compatible = "elan,ekth3000";
161		reg = <0x15>;
162		interrupt-parent = <&gpio7>;
163		interrupts = <3 IRQ_TYPE_EDGE_FALLING>;
164		pinctrl-names = "default";
165		pinctrl-0 = <&trackpad_int>;
166		vcc-supply = <&vcc33_io>;
167		wakeup-source;
168	};
169};
170
171&pinctrl {
172	pinctrl-0 = <
173		/* Common for sleep and wake, but no owners */
174		&global_pwroff
175
176		/* Wake only */
177		&suspend_l_wake
178	>;
179	pinctrl-1 = <
180		/* Common for sleep and wake, but no owners */
181		&global_pwroff
182
183		/* Sleep only */
184		&suspend_l_sleep
185	>;
186
187	buttons {
188		ap_lid_int_l: ap-lid-int-l {
189			rockchip,pins = <0 6 RK_FUNC_GPIO &pcfg_pull_up>;
190		};
191	};
192
193	charger {
194		ac_present_ap: ac-present-ap {
195			rockchip,pins = <0 8 RK_FUNC_GPIO &pcfg_pull_up>;
196		};
197	};
198
199	cros-ec {
200		ec_int: ec-int {
201			rockchip,pins = <7 7 RK_FUNC_GPIO &pcfg_pull_none>;
202		};
203	};
204
205	suspend {
206		suspend_l_wake: suspend-l-wake {
207			rockchip,pins = <0 17 RK_FUNC_GPIO &pcfg_output_low>;
208		};
209
210		suspend_l_sleep: suspend-l-sleep {
211			rockchip,pins = <0 17 RK_FUNC_GPIO &pcfg_output_high>;
212		};
213	};
214
215	trackpad {
216		trackpad_int: trackpad-int {
217			rockchip,pins = <7 3 RK_FUNC_GPIO &pcfg_pull_up>;
218		};
219	};
220
221	usb-host {
222		host1_pwr_en: host1-pwr-en {
223			rockchip,pins = <0 11 RK_FUNC_GPIO &pcfg_pull_none>;
224		};
225
226		usbotg_pwren_h: usbotg-pwren-h {
227			rockchip,pins = <0 12 RK_FUNC_GPIO &pcfg_pull_none>;
228		};
229	};
230};
231
232#include "cros-ec-keyboard.dtsi"