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