1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Google Pompom board device tree source
4 *
5 * Copyright 2020 Google LLC.
6 */
7
8#include "sc7180.dtsi"
9
10ap_ec_spi: &spi6 {};
11ap_h1_spi: &spi0 {};
12
13#include "sc7180-trogdor.dtsi"
14#include "sc7180-trogdor-ti-sn65dsi86.dtsi"
15
16/ {
17	thermal-zones {
18		5v-choke-thermal {
19			polling-delay-passive = <0>;
20			polling-delay = <250>;
21
22			thermal-sensors = <&pm6150_adc_tm 1>;
23
24			trips {
25				5v-choke-crit {
26					temperature = <125000>;
27					hysteresis = <1000>;
28					type = "critical";
29				};
30			};
31		};
32	};
33};
34
35&alc5682 {
36	realtek,dmic-clk-driving-high = "true";
37};
38
39&cpu6_alert0 {
40	temperature = <60000>;
41};
42
43&cpu6_alert1 {
44	temperature = <65000>;
45};
46
47&cpu6_thermal {
48	sustainable-power = <1124>;
49};
50
51&cpu7_alert0 {
52	temperature = <60000>;
53};
54
55&cpu7_alert1 {
56	temperature = <65000>;
57};
58
59&cpu7_thermal {
60	sustainable-power = <1124>;
61};
62
63&cpu8_alert0 {
64	temperature = <60000>;
65};
66
67&cpu8_alert1 {
68	temperature = <65000>;
69};
70
71&cpu8_thermal {
72	sustainable-power = <1124>;
73};
74
75&cpu9_alert0 {
76	temperature = <60000>;
77};
78
79&cpu9_alert1 {
80	temperature = <65000>;
81};
82
83&cpu9_thermal {
84	sustainable-power = <1124>;
85};
86
87&gpio_keys {
88	status = "okay";
89};
90
91ap_ts_pen_1v8: &i2c4 {
92	status = "okay";
93	clock-frequency = <400000>;
94
95	ap_ts: touchscreen@10 {
96		compatible = "hid-over-i2c";
97		reg = <0x10>;
98		pinctrl-names = "default";
99		pinctrl-0 = <&ts_int_l>, <&ts_reset_l>;
100
101		interrupt-parent = <&tlmm>;
102		interrupts = <9 IRQ_TYPE_LEVEL_LOW>;
103
104		post-power-on-delay-ms = <20>;
105		hid-descr-addr = <0x0001>;
106
107		vdd-supply = <&pp3300_ts>;
108	};
109};
110
111&keyboard_controller {
112	function-row-physmap = <
113		MATRIX_KEY(0x00, 0x02, 0)	/* T1 */
114		MATRIX_KEY(0x03, 0x02, 0)	/* T2 */
115		MATRIX_KEY(0x02, 0x02, 0)	/* T3 */
116		MATRIX_KEY(0x01, 0x02, 0)	/* T4 */
117		MATRIX_KEY(0x03, 0x04, 0)	/* T5 */
118		MATRIX_KEY(0x02, 0x04, 0)	/* T6 */
119		MATRIX_KEY(0x01, 0x04, 0)	/* T7 */
120		MATRIX_KEY(0x02, 0x09, 0)	/* T8 */
121		MATRIX_KEY(0x01, 0x09, 0)	/* T9 */
122		MATRIX_KEY(0x00, 0x04, 0)	/* T10 */
123	>;
124	linux,keymap = <
125		MATRIX_KEY(0x00, 0x02, KEY_BACK)
126		MATRIX_KEY(0x03, 0x02, KEY_REFRESH)
127		MATRIX_KEY(0x02, 0x02, KEY_ZOOM)
128		MATRIX_KEY(0x01, 0x02, KEY_SCALE)
129		MATRIX_KEY(0x03, 0x04, KEY_SYSRQ)
130		MATRIX_KEY(0x02, 0x04, KEY_BRIGHTNESSDOWN)
131		MATRIX_KEY(0x01, 0x04, KEY_BRIGHTNESSUP)
132		MATRIX_KEY(0x02, 0x09, KEY_MUTE)
133		MATRIX_KEY(0x01, 0x09, KEY_VOLUMEDOWN)
134		MATRIX_KEY(0x00, 0x04, KEY_VOLUMEUP)
135
136		CROS_STD_MAIN_KEYMAP
137	>;
138};
139
140&panel {
141	compatible = "kingdisplay,kd116n21-30nv-a010";
142};
143
144&pen_insert {
145	/* Insert = high, eject = low */
146	gpios = <&tlmm 52 GPIO_ACTIVE_HIGH>;
147};
148
149&pm6150_adc {
150	5v-choke-thermistor@4e {
151		reg = <ADC5_AMUX_THM2_100K_PU>;
152		qcom,ratiometric;
153		qcom,hw-settle-time = <200>;
154	};
155};
156
157&pm6150_adc_tm {
158	status = "okay";
159
160	5v-choke-thermistor@1 {
161		reg = <1>;
162		io-channels = <&pm6150_adc ADC5_AMUX_THM2_100K_PU>;
163		qcom,ratiometric;
164		qcom,hw-settle-time-us = <200>;
165	};
166};
167
168&sdhc_2 {
169	status = "okay";
170};
171
172&sound {
173	model = "sc7180-rt5682-max98357a-2mic";
174	pinctrl-names = "default";
175	pinctrl-0 = <&dmic_sel>;
176	dmic-gpios = <&tlmm 86 GPIO_ACTIVE_HIGH>;
177};
178
179&usb_c1 {
180	status = "disabled";
181};
182
183&wifi {
184	qcom,ath10k-calibration-variant = "GO_POMPOM";
185};
186
187/* PINCTRL - board-specific pinctrl */
188
189&tlmm {
190	gpio-line-names = "TP_INT_ODL",
191			  "AP_RAM_ID0",
192			  "AP_SKU_ID2",
193			  "AP_RAM_ID1",
194			  "",
195			  "AP_RAM_ID2",
196			  "AP_TP_I2C_SDA",
197			  "AP_TP_I2C_SCL",
198			  "TS_RESET_L",
199			  "TS_INT_L",
200			  "",
201			  "EDP_BRIJ_IRQ",
202			  "AP_EDP_BKLTEN",
203			  "",
204			  "",
205			  "EDP_BRIJ_I2C_SDA",
206			  "EDP_BRIJ_I2C_SCL",
207			  "HUB_RST_L",
208			  "",
209			  "",
210			  "",
211			  "",
212			  "",
213			  "AMP_EN",
214			  "P_SENSOR_INT_L",
215			  "AP_SAR_SENSOR_SDA",
216			  "AP_SAR_SENSOR_SCL",
217			  "",
218			  "HP_IRQ",
219			  "",
220			  "EN_PP3300_DX_EDP",
221			  "AP_BRD_ID2",
222			  "BRIJ_SUSPEND",
223			  "AP_BRD_ID0",
224			  "AP_H1_SPI_MISO",
225			  "AP_H1_SPI_MOSI",
226			  "AP_H1_SPI_CLK",
227			  "AP_H1_SPI_CS_L",
228			  "",
229			  "",
230			  "",
231			  "",
232			  "H1_AP_INT_ODL",
233			  "",
234			  "UART_AP_TX_DBG_RX",
235			  "UART_DBG_TX_AP_RX",
236			  "HP_I2C_SDA",
237			  "HP_I2C_SCL",
238			  "FORCED_USB_BOOT",
239			  "AMP_BCLK",
240			  "AMP_LRCLK",
241			  "AMP_DIN",
242			  "PEN_PDCT_L",
243			  "HP_BCLK",
244			  "HP_LRCLK",
245			  "HP_DOUT",
246			  "HP_DIN",
247			  "HP_MCLK",
248			  "AP_SKU_ID0",
249			  "AP_EC_SPI_MISO",
250			  "AP_EC_SPI_MOSI",
251			  "AP_EC_SPI_CLK",
252			  "AP_EC_SPI_CS_L",
253			  "AP_SPI_CLK",
254			  "AP_SPI_MOSI",
255			  "AP_SPI_MISO",
256			  /*
257			   * AP_FLASH_WP_L is crossystem ABI. Schematics
258			   * call it BIOS_FLASH_WP_L.
259			   */
260			  "AP_FLASH_WP_L",
261			  "",
262			  "AP_SPI_CS0_L",
263			  "SD_CD_ODL",
264			  "",
265			  "",
266			  "",
267			  "",
268			  "",
269			  "UIM2_DATA",
270			  "UIM2_CLK",
271			  "UIM2_RST",
272			  "UIM2_PRESENT",
273			  "UIM1_DATA",
274			  "UIM1_CLK",
275			  "UIM1_RST",
276			  "",
277			  "EN_PP3300_CODEC",
278			  "EN_PP3300_HUB",
279			  "",
280			  "DMIC_SEL",
281			  "",
282			  "",
283			  "",
284			  "AP_SKU_ID1",
285			  "AP_RST_REQ",
286			  "",
287			  "AP_BRD_ID1",
288			  "AP_EC_INT_R_L",
289			  "",
290			  "",
291			  "",
292			  "",
293			  "",
294			  "",
295			  "",
296			  "",
297			  "",
298			  "EDP_BRIJ_EN",
299			  "",
300			  "",
301			  "",
302			  "",
303			  "",
304			  "",
305			  "",
306			  "",
307			  "",
308			  "",
309			  "AP_TS_PEN_I2C_SDA",
310			  "AP_TS_PEN_I2C_SCL",
311			  "DP_HOT_PLUG_DET",
312			  "EC_IN_RW_ODL";
313
314	dmic_sel: dmic-sel {
315		pinmux {
316			pins = "gpio86";
317			function = "gpio";
318		};
319
320		pinconf {
321			pins = "gpio86";
322			bias-pull-down;
323		};
324	};
325};
326