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	skin-temp-thermistor@4d {
167		reg = <ADC5_AMUX_THM1_100K_PU>;
168		qcom,ratiometric;
169		qcom,hw-settle-time = <200>;
170	};
171};
172
173&pm6150_adc_tm {
174	status = "okay";
175
176	skin-temp-thermistor@1 {
177		reg = <1>;
178		io-channels = <&pm6150_adc ADC5_AMUX_THM1_100K_PU>;
179		qcom,ratiometric;
180		qcom,hw-settle-time-us = <200>;
181	};
182};
183
184&pp1800_uf_cam {
185	status = "okay";
186};
187
188&pp1800_wf_cam {
189	status = "okay";
190};
191
192&pp2800_uf_cam {
193	status = "okay";
194};
195
196&pp2800_wf_cam {
197	status = "okay";
198};
199
200&wifi {
201	qcom,ath10k-calibration-variant = "GO_WORMDINGLER";
202};
203
204/*
205 * No eDP on this board but it's logically the same signal so just give it
206 * a new name and assign the proper GPIO.
207 */
208pp3300_disp_on: &pp3300_dx_edp {
209	gpio = <&tlmm 85 GPIO_ACTIVE_HIGH>;
210};
211
212/* PINCTRL - modifications to sc7180-trogdor.dtsi */
213
214/*
215 * No eDP on this board but it's logically the same signal so just give it
216 * a new name and assign the proper GPIO.
217 */
218
219tp_en: &en_pp3300_dx_edp {
220	pins = "gpio85";
221};
222
223/* PINCTRL - board-specific pinctrl */
224
225&tlmm {
226	gpio-line-names = "HUB_RST_L",
227			  "AP_RAM_ID0",
228			  "AP_SKU_ID2",
229			  "AP_RAM_ID1",
230			  "",
231			  "AP_RAM_ID2",
232			  "UF_CAM_EN",
233			  "WF_CAM_EN",
234			  "TS_RESET_L",
235			  "TS_INT_L",
236			  "",
237			  "",
238			  "AP_EDP_BKLTEN",
239			  "UF_CAM_MCLK",
240			  "WF_CAM_CLK",
241			  "",
242			  "",
243			  "UF_CAM_SDA",
244			  "UF_CAM_SCL",
245			  "WF_CAM_SDA",
246			  "WF_CAM_SCL",
247			  "AVEE_LCD_EN",
248			  "",
249			  "AMP_EN",
250			  "",
251			  "",
252			  "",
253			  "",
254			  "HP_IRQ",
255			  "WF_CAM_RST_L",
256			  "UF_CAM_RST_L",
257			  "AP_BRD_ID2",
258			  "",
259			  "AP_BRD_ID0",
260			  "AP_H1_SPI_MISO",
261			  "AP_H1_SPI_MOSI",
262			  "AP_H1_SPI_CLK",
263			  "AP_H1_SPI_CS_L",
264			  "BT_UART_CTS",
265			  "BT_UART_RTS",
266			  "BT_UART_TXD",
267			  "BT_UART_RXD",
268			  "H1_AP_INT_ODL",
269			  "",
270			  "UART_AP_TX_DBG_RX",
271			  "UART_DBG_TX_AP_RX",
272			  "HP_I2C_SDA",
273			  "HP_I2C_SCL",
274			  "FORCED_USB_BOOT",
275			  "AMP_BCLK",
276			  "AMP_LRCLK",
277			  "AMP_DIN",
278			  "",
279			  "HP_BCLK",
280			  "HP_LRCLK",
281			  "HP_DOUT",
282			  "HP_DIN",
283			  "HP_MCLK",
284			  "AP_SKU_ID0",
285			  "AP_EC_SPI_MISO",
286			  "AP_EC_SPI_MOSI",
287			  "AP_EC_SPI_CLK",
288			  "AP_EC_SPI_CS_L",
289			  "AP_SPI_CLK",
290			  "AP_SPI_MOSI",
291			  "AP_SPI_MISO",
292			  /*
293			   * AP_FLASH_WP_L is crossystem ABI. Schematics
294			   * call it BIOS_FLASH_WP_L.
295			   */
296			  "AP_FLASH_WP_L",
297			  "",
298			  "AP_SPI_CS0_L",
299			  "",
300			  "",
301			  "",
302			  "",
303			  "WLAN_SW_CTRL",
304			  "",
305			  "REPORT_E",
306			  "",
307			  "ID0",
308			  "",
309			  "ID1",
310			  "",
311			  "",
312			  "",
313			  "CODEC_PWR_EN",
314			  "HUB_EN",
315			  "TP_EN",
316			  "MIPI_1.8V_EN",
317			  "VDD_RESET_1.8V",
318			  "AVDD_LCD_EN",
319			  "",
320			  "AP_SKU_ID1",
321			  "AP_RST_REQ",
322			  "",
323			  "AP_BRD_ID1",
324			  "AP_EC_INT_L",
325			  "SDM_GRFC_3",
326			  "",
327			  "",
328			  "BOOT_CONFIG_4",
329			  "BOOT_CONFIG_2",
330			  "",
331			  "",
332			  "",
333			  "",
334			  "",
335			  "",
336			  "",
337			  "BOOT_CONFIG_3",
338			  "WCI2_LTE_COEX_TXD",
339			  "WCI2_LTE_COEX_RXD",
340			  "",
341			  "",
342			  "",
343			  "",
344			  "FORCED_USB_BOOT_POL",
345			  "AP_TS_PEN_I2C_SDA",
346			  "AP_TS_PEN_I2C_SCL",
347			  "DP_HOT_PLUG_DET",
348			  "EC_IN_RW_ODL";
349
350	avdd_lcd_en: avdd-lcd-en-state {
351		pins = "gpio88";
352		function = "gpio";
353		drive-strength = <2>;
354		bias-disable;
355	};
356
357	avee_lcd_en: avee-lcd-en-state {
358		pins = "gpio21";
359		function = "gpio";
360		drive-strength = <2>;
361		bias-disable;
362	};
363
364	mipi_1800_en: mipi-1800-en-state {
365		pins = "gpio86";
366		function = "gpio";
367		drive-strength = <2>;
368		bias-disable;
369	};
370
371	vdd_reset_1800: vdd-reset-1800-state {
372		pins = "gpio87";
373		function = "gpio";
374		drive-strength = <2>;
375		bias-disable;
376	};
377};
378