1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Google Wormdingler board device tree source
4 *
5 * Copyright 2021 Google LLC.
6 */
7
8/dts-v1/;
9
10#include "sc7180-trogdor.dtsi"
11
12/ {
13	avdd_lcd: avdd-lcd {
14		compatible = "regulator-fixed";
15		regulator-name = "avdd_lcd";
16
17		gpio = <&tlmm 88 GPIO_ACTIVE_HIGH>;
18		enable-active-high;
19		pinctrl-names = "default";
20		pinctrl-0 = <&avdd_lcd_en>;
21
22		vin-supply = <&pp5000_a>;
23	};
24
25	avee_lcd: avee-lcd {
26		compatible = "regulator-fixed";
27		regulator-name = "avee_lcd";
28
29		gpio = <&tlmm 21 GPIO_ACTIVE_HIGH>;
30		enable-active-high;
31		pinctrl-names = "default";
32		pinctrl-0 = <&avee_lcd_en>;
33
34		vin-supply = <&pp5000_a>;
35	};
36
37	pp1800_ts:
38	v1p8_mipi: v1p8-mipi {
39		compatible = "regulator-fixed";
40		regulator-name = "v1p8_mipi";
41
42		gpio = <&tlmm 86 GPIO_ACTIVE_HIGH>;
43		enable-active-high;
44		pinctrl-names = "default";
45		pinctrl-0 = <&mipi_1800_en>;
46
47		vin-supply = <&pp3300_a>;
48	};
49
50	thermal-zones {
51		skin_temp_thermal: skin-temp-thermal {
52			polling-delay-passive = <250>;
53			polling-delay = <0>;
54
55			thermal-sensors = <&pm6150_adc_tm 1>;
56			sustainable-power = <574>;
57
58			trips {
59				skin_temp_alert0: trip-point0 {
60					temperature = <58000>;
61					hysteresis = <1000>;
62					type = "passive";
63				};
64
65				skin_temp_alert1: trip-point1 {
66					temperature = <62500>;
67					hysteresis = <1000>;
68					type = "passive";
69				};
70
71				skin-temp-crit {
72					temperature = <68000>;
73					hysteresis = <1000>;
74					type = "critical";
75				};
76			};
77
78			cooling-maps {
79				map0 {
80					trip = <&skin_temp_alert0>;
81					cooling-device = <&CPU6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
82							 <&CPU7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
83				};
84
85				map1 {
86					trip = <&skin_temp_alert1>;
87					cooling-device = <&CPU6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
88							 <&CPU7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
89				};
90			};
91		};
92	};
93};
94
95&backlight {
96	pwms = <&cros_ec_pwm 0>;
97};
98
99&camcc {
100	status = "okay";
101};
102
103&cros_ec {
104	base_detection: cbas {
105		compatible = "google,cros-cbas";
106	};
107
108	keyboard-controller {
109		compatible = "google,cros-ec-keyb-switches";
110	};
111};
112
113&dsi0 {
114
115	panel: panel@0 {
116		reg = <0>;
117		enable-gpios = <&tlmm 87 GPIO_ACTIVE_HIGH>;
118		pinctrl-names = "default";
119		pinctrl-0 = <&vdd_reset_1800>;
120		avdd-supply = <&avdd_lcd>;
121		avee-supply = <&avee_lcd>;
122		pp1800-supply = <&v1p8_mipi>;
123		pp3300-supply = <&pp3300_dx_edp>;
124		backlight = <&backlight>;
125		rotation = <270>;
126
127		ports {
128			#address-cells = <1>;
129			#size-cells = <0>;
130			port@0 {
131				reg = <0>;
132				panel_in: endpoint {
133					remote-endpoint = <&dsi0_out>;
134				};
135			};
136		};
137	};
138
139	ports {
140		port@1 {
141			endpoint {
142				remote-endpoint = <&panel_in>;
143				data-lanes = <0 1 2 3>;
144			};
145		};
146	};
147};
148
149&i2c4 {
150	status = "okay";
151	clock-frequency = <400000>;
152
153	ap_ts: touchscreen@1 {
154		compatible = "hid-over-i2c";
155		reg = <0x01>;
156		pinctrl-names = "default";
157		pinctrl-0 = <&ts_int_l>;
158
159		interrupt-parent = <&tlmm>;
160		interrupts = <9 IRQ_TYPE_EDGE_FALLING>;
161
162		post-power-on-delay-ms = <70>;
163		hid-descr-addr = <0x0001>;
164
165		vdd-supply = <&pp3300_ts>;
166		vddl-supply = <&pp1800_ts>;
167	};
168};
169
170&pm6150_adc {
171	skin-temp-thermistor@4d {
172		reg = <ADC5_AMUX_THM1_100K_PU>;
173		qcom,ratiometric;
174		qcom,hw-settle-time = <200>;
175	};
176};
177
178&pm6150_adc_tm {
179	status = "okay";
180
181	skin-temp-thermistor@1 {
182		reg = <1>;
183		io-channels = <&pm6150_adc ADC5_AMUX_THM1_100K_PU>;
184		qcom,ratiometric;
185		qcom,hw-settle-time-us = <200>;
186	};
187};
188
189&pp1800_uf_cam {
190	status = "okay";
191};
192
193&pp1800_wf_cam {
194	status = "okay";
195};
196
197&pp2800_uf_cam {
198	status = "okay";
199};
200
201&pp2800_wf_cam {
202	status = "okay";
203};
204
205&wifi {
206	qcom,ath10k-calibration-variant = "GO_WORMDINGLER";
207};
208
209/*
210 * No eDP on this board but it's logically the same signal so just give it
211 * a new name and assign the proper GPIO.
212 */
213pp3300_disp_on: &pp3300_dx_edp {
214	gpio = <&tlmm 85 GPIO_ACTIVE_HIGH>;
215};
216
217/* PINCTRL - modifications to sc7180-trogdor.dtsi */
218
219/*
220 * No eDP on this board but it's logically the same signal so just give it
221 * a new name and assign the proper GPIO.
222 */
223
224tp_en: &en_pp3300_dx_edp {
225	pinmux {
226		pins = "gpio85";
227	};
228
229	pinconf {
230		pins = "gpio85";
231	};
232};
233
234/* PINCTRL - board-specific pinctrl */
235
236&tlmm {
237	gpio-line-names = "HUB_RST_L",
238			  "AP_RAM_ID0",
239			  "AP_SKU_ID2",
240			  "AP_RAM_ID1",
241			  "",
242			  "AP_RAM_ID2",
243			  "UF_CAM_EN",
244			  "WF_CAM_EN",
245			  "TS_RESET_L",
246			  "TS_INT_L",
247			  "",
248			  "",
249			  "AP_EDP_BKLTEN",
250			  "UF_CAM_MCLK",
251			  "WF_CAM_CLK",
252			  "",
253			  "",
254			  "UF_CAM_SDA",
255			  "UF_CAM_SCL",
256			  "WF_CAM_SDA",
257			  "WF_CAM_SCL",
258			  "AVEE_LCD_EN",
259			  "",
260			  "AMP_EN",
261			  "",
262			  "",
263			  "",
264			  "",
265			  "HP_IRQ",
266			  "WF_CAM_RST_L",
267			  "UF_CAM_RST_L",
268			  "AP_BRD_ID2",
269			  "",
270			  "AP_BRD_ID0",
271			  "AP_H1_SPI_MISO",
272			  "AP_H1_SPI_MOSI",
273			  "AP_H1_SPI_CLK",
274			  "AP_H1_SPI_CS_L",
275			  "BT_UART_CTS",
276			  "BT_UART_RTS",
277			  "BT_UART_TXD",
278			  "BT_UART_RXD",
279			  "H1_AP_INT_ODL",
280			  "",
281			  "UART_AP_TX_DBG_RX",
282			  "UART_DBG_TX_AP_RX",
283			  "HP_I2C_SDA",
284			  "HP_I2C_SCL",
285			  "FORCED_USB_BOOT",
286			  "AMP_BCLK",
287			  "AMP_LRCLK",
288			  "AMP_DIN",
289			  "",
290			  "HP_BCLK",
291			  "HP_LRCLK",
292			  "HP_DOUT",
293			  "HP_DIN",
294			  "HP_MCLK",
295			  "AP_SKU_ID0",
296			  "AP_EC_SPI_MISO",
297			  "AP_EC_SPI_MOSI",
298			  "AP_EC_SPI_CLK",
299			  "AP_EC_SPI_CS_L",
300			  "AP_SPI_CLK",
301			  "AP_SPI_MOSI",
302			  "AP_SPI_MISO",
303			  /*
304			   * AP_FLASH_WP_L is crossystem ABI. Schematics
305			   * call it BIOS_FLASH_WP_L.
306			   */
307			  "AP_FLASH_WP_L",
308			  "",
309			  "AP_SPI_CS0_L",
310			  "",
311			  "",
312			  "",
313			  "",
314			  "WLAN_SW_CTRL",
315			  "",
316			  "REPORT_E",
317			  "",
318			  "ID0",
319			  "",
320			  "ID1",
321			  "",
322			  "",
323			  "",
324			  "CODEC_PWR_EN",
325			  "HUB_EN",
326			  "TP_EN",
327			  "MIPI_1.8V_EN",
328			  "VDD_RESET_1.8V",
329			  "AVDD_LCD_EN",
330			  "",
331			  "AP_SKU_ID1",
332			  "AP_RST_REQ",
333			  "",
334			  "AP_BRD_ID1",
335			  "AP_EC_INT_L",
336			  "SDM_GRFC_3",
337			  "",
338			  "",
339			  "BOOT_CONFIG_4",
340			  "BOOT_CONFIG_2",
341			  "",
342			  "",
343			  "",
344			  "",
345			  "",
346			  "",
347			  "",
348			  "BOOT_CONFIG_3",
349			  "WCI2_LTE_COEX_TXD",
350			  "WCI2_LTE_COEX_RXD",
351			  "",
352			  "",
353			  "",
354			  "",
355			  "FORCED_USB_BOOT_POL",
356			  "AP_TS_PEN_I2C_SDA",
357			  "AP_TS_PEN_I2C_SCL",
358			  "DP_HOT_PLUG_DET",
359			  "EC_IN_RW_ODL";
360
361	avdd_lcd_en: avdd-lcd-en {
362		pinmux {
363			pins = "gpio88";
364			function = "gpio";
365		};
366
367		pinconf {
368			pins = "gpio88";
369			drive-strength = <2>;
370			bias-disable;
371		};
372	};
373
374	avee_lcd_en: avee-lcd-en {
375		pinmux {
376			pins = "gpio21";
377			function = "gpio";
378		};
379
380		pinconf {
381			pins = "gpio21";
382			drive-strength = <2>;
383			bias-disable;
384		};
385	};
386
387	mipi_1800_en: mipi-1800-en {
388		pinmux {
389			pins = "gpio86";
390			function = "gpio";
391		};
392
393		pinconf {
394			pins = "gpio86";
395			drive-strength = <2>;
396			bias-disable;
397		};
398	};
399
400	vdd_reset_1800: vdd-reset-1800 {
401		pinmux {
402			pins = "gpio87";
403			function = "gpio";
404		};
405
406		pinconf {
407			pins = "gpio87";
408			drive-strength = <2>;
409			bias-disable;
410		};
411	};
412};
413