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-regulator {
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-regulator {
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-regulator {
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	pins = "gpio85";
226};
227
228/* PINCTRL - board-specific pinctrl */
229
230&tlmm {
231	gpio-line-names = "HUB_RST_L",
232			  "AP_RAM_ID0",
233			  "AP_SKU_ID2",
234			  "AP_RAM_ID1",
235			  "",
236			  "AP_RAM_ID2",
237			  "UF_CAM_EN",
238			  "WF_CAM_EN",
239			  "TS_RESET_L",
240			  "TS_INT_L",
241			  "",
242			  "",
243			  "AP_EDP_BKLTEN",
244			  "UF_CAM_MCLK",
245			  "WF_CAM_CLK",
246			  "",
247			  "",
248			  "UF_CAM_SDA",
249			  "UF_CAM_SCL",
250			  "WF_CAM_SDA",
251			  "WF_CAM_SCL",
252			  "AVEE_LCD_EN",
253			  "",
254			  "AMP_EN",
255			  "",
256			  "",
257			  "",
258			  "",
259			  "HP_IRQ",
260			  "WF_CAM_RST_L",
261			  "UF_CAM_RST_L",
262			  "AP_BRD_ID2",
263			  "",
264			  "AP_BRD_ID0",
265			  "AP_H1_SPI_MISO",
266			  "AP_H1_SPI_MOSI",
267			  "AP_H1_SPI_CLK",
268			  "AP_H1_SPI_CS_L",
269			  "BT_UART_CTS",
270			  "BT_UART_RTS",
271			  "BT_UART_TXD",
272			  "BT_UART_RXD",
273			  "H1_AP_INT_ODL",
274			  "",
275			  "UART_AP_TX_DBG_RX",
276			  "UART_DBG_TX_AP_RX",
277			  "HP_I2C_SDA",
278			  "HP_I2C_SCL",
279			  "FORCED_USB_BOOT",
280			  "AMP_BCLK",
281			  "AMP_LRCLK",
282			  "AMP_DIN",
283			  "",
284			  "HP_BCLK",
285			  "HP_LRCLK",
286			  "HP_DOUT",
287			  "HP_DIN",
288			  "HP_MCLK",
289			  "AP_SKU_ID0",
290			  "AP_EC_SPI_MISO",
291			  "AP_EC_SPI_MOSI",
292			  "AP_EC_SPI_CLK",
293			  "AP_EC_SPI_CS_L",
294			  "AP_SPI_CLK",
295			  "AP_SPI_MOSI",
296			  "AP_SPI_MISO",
297			  /*
298			   * AP_FLASH_WP_L is crossystem ABI. Schematics
299			   * call it BIOS_FLASH_WP_L.
300			   */
301			  "AP_FLASH_WP_L",
302			  "",
303			  "AP_SPI_CS0_L",
304			  "",
305			  "",
306			  "",
307			  "",
308			  "WLAN_SW_CTRL",
309			  "",
310			  "REPORT_E",
311			  "",
312			  "ID0",
313			  "",
314			  "ID1",
315			  "",
316			  "",
317			  "",
318			  "CODEC_PWR_EN",
319			  "HUB_EN",
320			  "TP_EN",
321			  "MIPI_1.8V_EN",
322			  "VDD_RESET_1.8V",
323			  "AVDD_LCD_EN",
324			  "",
325			  "AP_SKU_ID1",
326			  "AP_RST_REQ",
327			  "",
328			  "AP_BRD_ID1",
329			  "AP_EC_INT_L",
330			  "SDM_GRFC_3",
331			  "",
332			  "",
333			  "BOOT_CONFIG_4",
334			  "BOOT_CONFIG_2",
335			  "",
336			  "",
337			  "",
338			  "",
339			  "",
340			  "",
341			  "",
342			  "BOOT_CONFIG_3",
343			  "WCI2_LTE_COEX_TXD",
344			  "WCI2_LTE_COEX_RXD",
345			  "",
346			  "",
347			  "",
348			  "",
349			  "FORCED_USB_BOOT_POL",
350			  "AP_TS_PEN_I2C_SDA",
351			  "AP_TS_PEN_I2C_SCL",
352			  "DP_HOT_PLUG_DET",
353			  "EC_IN_RW_ODL";
354
355	avdd_lcd_en: avdd-lcd-en-state {
356		pins = "gpio88";
357		function = "gpio";
358		drive-strength = <2>;
359		bias-disable;
360	};
361
362	avee_lcd_en: avee-lcd-en-state {
363		pins = "gpio21";
364		function = "gpio";
365		drive-strength = <2>;
366		bias-disable;
367	};
368
369	mipi_1800_en: mipi-1800-en-state {
370		pins = "gpio86";
371		function = "gpio";
372		drive-strength = <2>;
373		bias-disable;
374	};
375
376	vdd_reset_1800: vdd-reset-1800-state {
377		pins = "gpio87";
378		function = "gpio";
379		drive-strength = <2>;
380		bias-disable;
381	};
382};
383