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&i2c4 {
114	status = "okay";
115	clock-frequency = <400000>;
116
117	ap_ts: touchscreen@1 {
118		compatible = "hid-over-i2c";
119		reg = <0x01>;
120		pinctrl-names = "default";
121		pinctrl-0 = <&ts_int_l>;
122
123		interrupt-parent = <&tlmm>;
124		interrupts = <9 IRQ_TYPE_EDGE_FALLING>;
125
126		post-power-on-delay-ms = <70>;
127		hid-descr-addr = <0x0001>;
128
129		vdd-supply = <&pp3300_ts>;
130		vddl-supply = <&pp1800_ts>;
131	};
132};
133
134&mdss_dsi0 {
135
136	panel: panel@0 {
137		reg = <0>;
138		enable-gpios = <&tlmm 87 GPIO_ACTIVE_HIGH>;
139		pinctrl-names = "default";
140		pinctrl-0 = <&vdd_reset_1800>;
141		avdd-supply = <&avdd_lcd>;
142		avee-supply = <&avee_lcd>;
143		pp1800-supply = <&v1p8_mipi>;
144		pp3300-supply = <&pp3300_dx_edp>;
145		backlight = <&backlight>;
146		rotation = <270>;
147
148		port {
149			panel_in: endpoint {
150				remote-endpoint = <&mdss_dsi0_out>;
151			};
152		};
153	};
154
155	ports {
156		port@1 {
157			endpoint {
158				remote-endpoint = <&panel_in>;
159				data-lanes = <0 1 2 3>;
160			};
161		};
162	};
163};
164
165&pm6150_adc {
166	channel@4d {
167		reg = <ADC5_AMUX_THM1_100K_PU>;
168		qcom,ratiometric;
169		qcom,hw-settle-time = <200>;
170		label = "skin_therm";
171	};
172};
173
174&pm6150_adc_tm {
175	status = "okay";
176
177	skin-temp-thermistor@1 {
178		reg = <1>;
179		io-channels = <&pm6150_adc ADC5_AMUX_THM1_100K_PU>;
180		qcom,ratiometric;
181		qcom,hw-settle-time-us = <200>;
182	};
183};
184
185&pp1800_uf_cam {
186	status = "okay";
187};
188
189&pp1800_wf_cam {
190	status = "okay";
191};
192
193&pp2800_uf_cam {
194	status = "okay";
195};
196
197&pp2800_wf_cam {
198	status = "okay";
199};
200
201&wifi {
202	qcom,ath10k-calibration-variant = "GO_WORMDINGLER";
203};
204
205/*
206 * No eDP on this board but it's logically the same signal so just give it
207 * a new name and assign the proper GPIO.
208 */
209pp3300_disp_on: &pp3300_dx_edp {
210	gpio = <&tlmm 85 GPIO_ACTIVE_HIGH>;
211};
212
213/* PINCTRL - modifications to sc7180-trogdor.dtsi */
214
215/*
216 * No eDP on this board but it's logically the same signal so just give it
217 * a new name and assign the proper GPIO.
218 */
219
220tp_en: &en_pp3300_dx_edp {
221	pins = "gpio85";
222};
223
224/* PINCTRL - board-specific pinctrl */
225
226&tlmm {
227	gpio-line-names = "HUB_RST_L",
228			  "AP_RAM_ID0",
229			  "AP_SKU_ID2",
230			  "AP_RAM_ID1",
231			  "",
232			  "AP_RAM_ID2",
233			  "UF_CAM_EN",
234			  "WF_CAM_EN",
235			  "TS_RESET_L",
236			  "TS_INT_L",
237			  "",
238			  "",
239			  "AP_EDP_BKLTEN",
240			  "UF_CAM_MCLK",
241			  "WF_CAM_CLK",
242			  "",
243			  "",
244			  "UF_CAM_SDA",
245			  "UF_CAM_SCL",
246			  "WF_CAM_SDA",
247			  "WF_CAM_SCL",
248			  "AVEE_LCD_EN",
249			  "",
250			  "AMP_EN",
251			  "",
252			  "",
253			  "",
254			  "",
255			  "HP_IRQ",
256			  "WF_CAM_RST_L",
257			  "UF_CAM_RST_L",
258			  "AP_BRD_ID2",
259			  "",
260			  "AP_BRD_ID0",
261			  "AP_H1_SPI_MISO",
262			  "AP_H1_SPI_MOSI",
263			  "AP_H1_SPI_CLK",
264			  "AP_H1_SPI_CS_L",
265			  "BT_UART_CTS",
266			  "BT_UART_RTS",
267			  "BT_UART_TXD",
268			  "BT_UART_RXD",
269			  "H1_AP_INT_ODL",
270			  "",
271			  "UART_AP_TX_DBG_RX",
272			  "UART_DBG_TX_AP_RX",
273			  "HP_I2C_SDA",
274			  "HP_I2C_SCL",
275			  "FORCED_USB_BOOT",
276			  "AMP_BCLK",
277			  "AMP_LRCLK",
278			  "AMP_DIN",
279			  "",
280			  "HP_BCLK",
281			  "HP_LRCLK",
282			  "HP_DOUT",
283			  "HP_DIN",
284			  "HP_MCLK",
285			  "AP_SKU_ID0",
286			  "AP_EC_SPI_MISO",
287			  "AP_EC_SPI_MOSI",
288			  "AP_EC_SPI_CLK",
289			  "AP_EC_SPI_CS_L",
290			  "AP_SPI_CLK",
291			  "AP_SPI_MOSI",
292			  "AP_SPI_MISO",
293			  /*
294			   * AP_FLASH_WP_L is crossystem ABI. Schematics
295			   * call it BIOS_FLASH_WP_L.
296			   */
297			  "AP_FLASH_WP_L",
298			  "",
299			  "AP_SPI_CS0_L",
300			  "",
301			  "",
302			  "",
303			  "",
304			  "WLAN_SW_CTRL",
305			  "",
306			  "REPORT_E",
307			  "",
308			  "ID0",
309			  "",
310			  "ID1",
311			  "",
312			  "",
313			  "",
314			  "CODEC_PWR_EN",
315			  "HUB_EN",
316			  "TP_EN",
317			  "MIPI_1.8V_EN",
318			  "VDD_RESET_1.8V",
319			  "AVDD_LCD_EN",
320			  "",
321			  "AP_SKU_ID1",
322			  "AP_RST_REQ",
323			  "",
324			  "AP_BRD_ID1",
325			  "AP_EC_INT_L",
326			  "SDM_GRFC_3",
327			  "",
328			  "",
329			  "BOOT_CONFIG_4",
330			  "BOOT_CONFIG_2",
331			  "",
332			  "",
333			  "",
334			  "",
335			  "",
336			  "",
337			  "",
338			  "BOOT_CONFIG_3",
339			  "WCI2_LTE_COEX_TXD",
340			  "WCI2_LTE_COEX_RXD",
341			  "",
342			  "",
343			  "",
344			  "",
345			  "FORCED_USB_BOOT_POL",
346			  "AP_TS_PEN_I2C_SDA",
347			  "AP_TS_PEN_I2C_SCL",
348			  "DP_HOT_PLUG_DET",
349			  "EC_IN_RW_ODL";
350
351	avdd_lcd_en: avdd-lcd-en-state {
352		pins = "gpio88";
353		function = "gpio";
354		drive-strength = <2>;
355		bias-disable;
356	};
357
358	avee_lcd_en: avee-lcd-en-state {
359		pins = "gpio21";
360		function = "gpio";
361		drive-strength = <2>;
362		bias-disable;
363	};
364
365	mipi_1800_en: mipi-1800-en-state {
366		pins = "gpio86";
367		function = "gpio";
368		drive-strength = <2>;
369		bias-disable;
370	};
371
372	vdd_reset_1800: vdd-reset-1800-state {
373		pins = "gpio87";
374		function = "gpio";
375		drive-strength = <2>;
376		bias-disable;
377	};
378};
379