xref: /freebsd-src/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-kingoftown.dtsi (revision 8bab661a3316d8bd9b9fbd11a3b4371b91507bd2)
1b97ee269SEmmanuel Vadot// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2b97ee269SEmmanuel Vadot/*
3b97ee269SEmmanuel Vadot * Google Kingoftown board device tree source
4b97ee269SEmmanuel Vadot *
5b97ee269SEmmanuel Vadot * Copyright 2021 Google LLC.
6b97ee269SEmmanuel Vadot */
7b97ee269SEmmanuel Vadot
8b97ee269SEmmanuel Vadot/* This file must be included after sc7180-trogdor.dtsi */
9b97ee269SEmmanuel Vadot#include <arm/cros-ec-keyboard.dtsi>
10b97ee269SEmmanuel Vadot#include "sc7180-trogdor-lte-sku.dtsi"
11b97ee269SEmmanuel Vadot
12b97ee269SEmmanuel Vadot&alc5682 {
13b97ee269SEmmanuel Vadot	compatible = "realtek,rt5682s";
14*8bab661aSEmmanuel Vadot	/delete-property/ VBAT-supply;
15b97ee269SEmmanuel Vadot	realtek,dmic1-clk-pin = <2>;
16b97ee269SEmmanuel Vadot	realtek,dmic-clk-rate-hz = <2048000>;
17b97ee269SEmmanuel Vadot};
18b97ee269SEmmanuel Vadot
19b97ee269SEmmanuel Vadot&ap_tp_i2c {
20b97ee269SEmmanuel Vadot	status = "okay";
21b97ee269SEmmanuel Vadot};
22b97ee269SEmmanuel Vadot
23b97ee269SEmmanuel Vadotap_ts_pen_1v8: &i2c4 {
24b97ee269SEmmanuel Vadot	status = "okay";
25b97ee269SEmmanuel Vadot	clock-frequency = <400000>;
26b97ee269SEmmanuel Vadot
27b97ee269SEmmanuel Vadot	ap_ts: touchscreen@10 {
28b97ee269SEmmanuel Vadot		compatible = "elan,ekth3500";
29b97ee269SEmmanuel Vadot		reg = <0x10>;
30b97ee269SEmmanuel Vadot		pinctrl-names = "default";
31b97ee269SEmmanuel Vadot		pinctrl-0 = <&ts_int_l>, <&ts_reset_l>;
32b97ee269SEmmanuel Vadot
33b97ee269SEmmanuel Vadot		interrupt-parent = <&tlmm>;
34b97ee269SEmmanuel Vadot		interrupts = <9 IRQ_TYPE_LEVEL_LOW>;
35b97ee269SEmmanuel Vadot
36b97ee269SEmmanuel Vadot		vcc33-supply = <&pp3300_ts>;
37b97ee269SEmmanuel Vadot
38b97ee269SEmmanuel Vadot		reset-gpios = <&tlmm 8 GPIO_ACTIVE_LOW>;
39b97ee269SEmmanuel Vadot	};
40b97ee269SEmmanuel Vadot};
41b97ee269SEmmanuel Vadot
42b97ee269SEmmanuel Vadot&keyboard_controller {
43b97ee269SEmmanuel Vadot	function-row-physmap = <
44b97ee269SEmmanuel Vadot		MATRIX_KEY(0x00, 0x02, 0)       /* T1 */
45b97ee269SEmmanuel Vadot		MATRIX_KEY(0x03, 0x02, 0)       /* T2 */
46b97ee269SEmmanuel Vadot		MATRIX_KEY(0x02, 0x02, 0)       /* T3 */
47b97ee269SEmmanuel Vadot		MATRIX_KEY(0x01, 0x02, 0)       /* T4 */
48b97ee269SEmmanuel Vadot		MATRIX_KEY(0x03, 0x04, 0)       /* T5 */
49b97ee269SEmmanuel Vadot		MATRIX_KEY(0x02, 0x04, 0)       /* T6 */
50b97ee269SEmmanuel Vadot		MATRIX_KEY(0x01, 0x04, 0)       /* T7 */
51b97ee269SEmmanuel Vadot		MATRIX_KEY(0x02, 0x09, 0)       /* T8 */
52b97ee269SEmmanuel Vadot		MATRIX_KEY(0x01, 0x09, 0)       /* T9 */
53b97ee269SEmmanuel Vadot		MATRIX_KEY(0x00, 0x04, 0)       /* T10 */
54b97ee269SEmmanuel Vadot	>;
55b97ee269SEmmanuel Vadot	linux,keymap = <
56b97ee269SEmmanuel Vadot		MATRIX_KEY(0x00, 0x02, KEY_BACK)
57b97ee269SEmmanuel Vadot		MATRIX_KEY(0x03, 0x02, KEY_REFRESH)
58b97ee269SEmmanuel Vadot		MATRIX_KEY(0x02, 0x02, KEY_ZOOM)
59b97ee269SEmmanuel Vadot		MATRIX_KEY(0x01, 0x02, KEY_SCALE)
60b97ee269SEmmanuel Vadot		MATRIX_KEY(0x03, 0x04, KEY_SYSRQ)
61b97ee269SEmmanuel Vadot		MATRIX_KEY(0x02, 0x04, KEY_BRIGHTNESSDOWN)
62b97ee269SEmmanuel Vadot		MATRIX_KEY(0x01, 0x04, KEY_BRIGHTNESSUP)
63b97ee269SEmmanuel Vadot		MATRIX_KEY(0x02, 0x09, KEY_MUTE)
64b97ee269SEmmanuel Vadot		MATRIX_KEY(0x01, 0x09, KEY_VOLUMEDOWN)
65b97ee269SEmmanuel Vadot		MATRIX_KEY(0x00, 0x04, KEY_VOLUMEUP)
66b97ee269SEmmanuel Vadot
67b97ee269SEmmanuel Vadot		CROS_STD_MAIN_KEYMAP
68b97ee269SEmmanuel Vadot	>;
69b97ee269SEmmanuel Vadot};
70b97ee269SEmmanuel Vadot
71b97ee269SEmmanuel Vadot&panel {
72b97ee269SEmmanuel Vadot	compatible = "edp-panel";
73b97ee269SEmmanuel Vadot};
74b97ee269SEmmanuel Vadot
75b97ee269SEmmanuel Vadot&pp3300_dx_edp {
76b97ee269SEmmanuel Vadot	gpio = <&tlmm 67 GPIO_ACTIVE_HIGH>;
77b97ee269SEmmanuel Vadot};
78b97ee269SEmmanuel Vadot
79b97ee269SEmmanuel Vadot&sound {
80b97ee269SEmmanuel Vadot	compatible = "google,sc7180-trogdor";
81b97ee269SEmmanuel Vadot	model = "sc7180-rt5682s-max98357a-1mic";
82b97ee269SEmmanuel Vadot};
83b97ee269SEmmanuel Vadot
84b97ee269SEmmanuel Vadot&wifi {
85b97ee269SEmmanuel Vadot	qcom,ath10k-calibration-variant = "GO_KINGOFTOWN";
86b97ee269SEmmanuel Vadot};
87b97ee269SEmmanuel Vadot
88b97ee269SEmmanuel Vadot/* PINCTRL - modifications to sc7180-trogdor.dtsi */
89b97ee269SEmmanuel Vadot
90b97ee269SEmmanuel Vadot&en_pp3300_dx_edp {
91b97ee269SEmmanuel Vadot	pins = "gpio67";
92b97ee269SEmmanuel Vadot};
93b97ee269SEmmanuel Vadot
94b97ee269SEmmanuel Vadot/* PINCTRL - board-specific pinctrl */
95b97ee269SEmmanuel Vadot
96b97ee269SEmmanuel Vadot&tlmm {
97b97ee269SEmmanuel Vadot	gpio-line-names = "TP_INT_L",		/* 0 */
98b97ee269SEmmanuel Vadot			  "AP_RAM_ID0",
99b97ee269SEmmanuel Vadot			  "AP_SKU_ID2",
100b97ee269SEmmanuel Vadot			  "AP_RAM_ID1",
101b97ee269SEmmanuel Vadot			  "",
102b97ee269SEmmanuel Vadot			  "AP_RAM_ID2",
103b97ee269SEmmanuel Vadot			  "AP_TP_I2C_SDA",
104b97ee269SEmmanuel Vadot			  "AP_TP_I2C_SCL",
105b97ee269SEmmanuel Vadot			  "TS_RESET_L",
106b97ee269SEmmanuel Vadot			  "TS_INT_L",
107b97ee269SEmmanuel Vadot			  "",			/* 10 */
108b97ee269SEmmanuel Vadot			  "EDP_BRIJ_IRQ",
109b97ee269SEmmanuel Vadot			  "AP_EDP_BKLTEN",
110b97ee269SEmmanuel Vadot			  "",
111b97ee269SEmmanuel Vadot			  "",
112b97ee269SEmmanuel Vadot			  "EDP_BRIJ_I2C_SDA",
113b97ee269SEmmanuel Vadot			  "EDP_BRIJ_I2C_SCL",
114b97ee269SEmmanuel Vadot			  "HUB_RST_L",
115b97ee269SEmmanuel Vadot			  "",
116b97ee269SEmmanuel Vadot			  "",
117b97ee269SEmmanuel Vadot			  "",			/* 20 */
118b97ee269SEmmanuel Vadot			  "",
119b97ee269SEmmanuel Vadot			  "",
120b97ee269SEmmanuel Vadot			  "AMP_EN",
121b97ee269SEmmanuel Vadot			  "",
122b97ee269SEmmanuel Vadot			  "",
123b97ee269SEmmanuel Vadot			  "",
124b97ee269SEmmanuel Vadot			  "",
125b97ee269SEmmanuel Vadot			  "HP_IRQ",
126b97ee269SEmmanuel Vadot			  "",
127b97ee269SEmmanuel Vadot			  "",			/* 30 */
128b97ee269SEmmanuel Vadot			  "AP_BRD_ID2",
129b97ee269SEmmanuel Vadot			  "BRIJ_SUSPEND",
130b97ee269SEmmanuel Vadot			  "AP_BRD_ID0",
131b97ee269SEmmanuel Vadot			  "AP_H1_SPI_MISO",
132b97ee269SEmmanuel Vadot			  "AP_H1_SPI_MOSI",
133b97ee269SEmmanuel Vadot			  "AP_H1_SPI_CLK",
134b97ee269SEmmanuel Vadot			  "AP_H1_SPI_CS_L",
135b97ee269SEmmanuel Vadot			  "BT_UART_CTS",
136b97ee269SEmmanuel Vadot			  "BT_UART_RTS",
137b97ee269SEmmanuel Vadot			  "BT_UART_TXD",	/* 40 */
138b97ee269SEmmanuel Vadot			  "BT_UART_RXD",
139b97ee269SEmmanuel Vadot			  "H1_AP_INT_ODL",
140b97ee269SEmmanuel Vadot			  "",
141b97ee269SEmmanuel Vadot			  "UART_AP_TX_DBG_RX",
142b97ee269SEmmanuel Vadot			  "UART_DBG_TX_AP_RX",
143b97ee269SEmmanuel Vadot			  "HP_I2C_SDA",
144b97ee269SEmmanuel Vadot			  "HP_I2C_SCL",
145b97ee269SEmmanuel Vadot			  "FORCED_USB_BOOT",
146b97ee269SEmmanuel Vadot			  "AMP_BCLK",
147b97ee269SEmmanuel Vadot			  "AMP_LRCLK",		/* 50 */
148b97ee269SEmmanuel Vadot			  "AMP_DIN",
149b97ee269SEmmanuel Vadot			  "",
150b97ee269SEmmanuel Vadot			  "HP_BCLK",
151b97ee269SEmmanuel Vadot			  "HP_LRCLK",
152b97ee269SEmmanuel Vadot			  "HP_DOUT",
153b97ee269SEmmanuel Vadot			  "HP_DIN",
154b97ee269SEmmanuel Vadot			  "HP_MCLK",
155b97ee269SEmmanuel Vadot			  "AP_SKU_ID0",
156b97ee269SEmmanuel Vadot			  "AP_EC_SPI_MISO",
157b97ee269SEmmanuel Vadot			  "AP_EC_SPI_MOSI",	/* 60 */
158b97ee269SEmmanuel Vadot			  "AP_EC_SPI_CLK",
159b97ee269SEmmanuel Vadot			  "AP_EC_SPI_CS_L",
160b97ee269SEmmanuel Vadot			  "AP_SPI_CLK",
161b97ee269SEmmanuel Vadot			  "AP_SPI_MOSI",
162b97ee269SEmmanuel Vadot			  "AP_SPI_MISO",
163b97ee269SEmmanuel Vadot			  /*
164b97ee269SEmmanuel Vadot			   * AP_FLASH_WP_L is crossystem ABI. Schematics
165b97ee269SEmmanuel Vadot			   * call it BIOS_FLASH_WP_L.
166b97ee269SEmmanuel Vadot			   */
167b97ee269SEmmanuel Vadot			  "AP_FLASH_WP_L",
168b97ee269SEmmanuel Vadot			  "EN_PP3300_DX_EDP",
169b97ee269SEmmanuel Vadot			  "AP_SPI_CS0_L",
170b97ee269SEmmanuel Vadot			  "",
171b97ee269SEmmanuel Vadot			  "",			/* 70 */
172b97ee269SEmmanuel Vadot			  "",
173b97ee269SEmmanuel Vadot			  "",
174b97ee269SEmmanuel Vadot			  "",
175b97ee269SEmmanuel Vadot			  "EN_FP_RAILS",
176b97ee269SEmmanuel Vadot			  "UIM2_DATA",
177b97ee269SEmmanuel Vadot			  "UIM2_CLK",
178b97ee269SEmmanuel Vadot			  "UIM2_RST",
179b97ee269SEmmanuel Vadot			  "UIM2_PRESENT_L",
180b97ee269SEmmanuel Vadot			  "UIM1_DATA",
181b97ee269SEmmanuel Vadot			  "UIM1_CLK",		/* 80 */
182b97ee269SEmmanuel Vadot			  "UIM1_RST",
183b97ee269SEmmanuel Vadot			  "",
184b97ee269SEmmanuel Vadot			  "CODEC_PWR_EN",
185b97ee269SEmmanuel Vadot			  "HUB_EN",
186b97ee269SEmmanuel Vadot			  "",
187b97ee269SEmmanuel Vadot			  "",
188b97ee269SEmmanuel Vadot			  "",
189b97ee269SEmmanuel Vadot			  "",
190b97ee269SEmmanuel Vadot			  "",
191b97ee269SEmmanuel Vadot			  "AP_SKU_ID1",		/* 90 */
192b97ee269SEmmanuel Vadot			  "AP_RST_REQ",
193b97ee269SEmmanuel Vadot			  "",
194b97ee269SEmmanuel Vadot			  "AP_BRD_ID1",
195b97ee269SEmmanuel Vadot			  "AP_EC_INT_L",
196b97ee269SEmmanuel Vadot			  "",
197b97ee269SEmmanuel Vadot			  "",
198b97ee269SEmmanuel Vadot			  "",
199b97ee269SEmmanuel Vadot			  "",
200b97ee269SEmmanuel Vadot			  "",
201b97ee269SEmmanuel Vadot			  "",			/* 100 */
202b97ee269SEmmanuel Vadot			  "",
203b97ee269SEmmanuel Vadot			  "",
204b97ee269SEmmanuel Vadot			  "",
205b97ee269SEmmanuel Vadot			  "EDP_BRIJ_EN",
206b97ee269SEmmanuel Vadot			  "",
207b97ee269SEmmanuel Vadot			  "",
208b97ee269SEmmanuel Vadot			  "",
209b97ee269SEmmanuel Vadot			  "",
210b97ee269SEmmanuel Vadot			  "",
211b97ee269SEmmanuel Vadot			  "",			/* 110 */
212b97ee269SEmmanuel Vadot			  "",
213b97ee269SEmmanuel Vadot			  "",
214b97ee269SEmmanuel Vadot			  "",
215b97ee269SEmmanuel Vadot			  "",
216b97ee269SEmmanuel Vadot			  "AP_TS_PEN_I2C_SDA",
217b97ee269SEmmanuel Vadot			  "AP_TS_PEN_I2C_SCL",
218b97ee269SEmmanuel Vadot			  "DP_HOT_PLUG_DET",
219b97ee269SEmmanuel Vadot			  "EC_IN_RW_ODL";
220b97ee269SEmmanuel Vadot};
221