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