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