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