1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Google Homestar board device tree source
4 *
5 * Copyright 2021 Google LLC.
6 */
7
8#include "sc7180-trogdor.dtsi"
9
10/ {
11	/* BOARD-SPECIFIC TOP LEVEL NODES */
12
13	max98360a_1: max98360a_1 {
14		compatible = "maxim,max98360a";
15		#sound-dai-cells = <0>;
16	};
17
18	max98360a_2: max98360a_2 {
19		compatible = "maxim,max98360a";
20		#sound-dai-cells = <0>;
21	};
22
23	max98360a_3: max98360a_3 {
24		compatible = "maxim,max98360a";
25		#sound-dai-cells = <0>;
26	};
27
28	pp3300_touch: pp3300-touch {
29		compatible = "regulator-fixed";
30		regulator-name = "pp3300_touch";
31
32		regulator-min-microvolt = <3300000>;
33		regulator-max-microvolt = <3300000>;
34
35		gpio = <&tlmm 87 GPIO_ACTIVE_HIGH>;
36		enable-active-high;
37		pinctrl-names = "default";
38		pinctrl-0 = <&en_pp3300_touch>;
39
40		vin-supply = <&pp3300_a>;
41	};
42
43	thermal-zones {
44		skin_temp_thermal: skin-temp-thermal {
45			polling-delay-passive = <250>;
46			polling-delay = <0>;
47
48			thermal-sensors = <&pm6150_adc_tm 1>;
49			sustainable-power = <965>;
50
51			trips {
52				skin_temp_alert0: trip-point0 {
53					temperature = <55000>;
54					hysteresis = <1000>;
55					type = "passive";
56				};
57
58				skin_temp_alert1: trip-point1 {
59					temperature = <58000>;
60					hysteresis = <1000>;
61					type = "passive";
62				};
63
64				skin-temp-crit {
65					temperature = <73000>;
66					hysteresis = <1000>;
67					type = "critical";
68				};
69			};
70
71			cooling-maps {
72				map0 {
73					trip = <&skin_temp_alert0>;
74					cooling-device = <&CPU6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
75							 <&CPU7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
76				};
77
78				map1 {
79					trip = <&skin_temp_alert1>;
80					cooling-device = <&CPU6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
81							 <&CPU7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
82				};
83			};
84		};
85	};
86};
87
88ap_ts_pen_1v8: &i2c4 {
89	status = "okay";
90	clock-frequency = <400000>;
91
92	ap_ts: touchscreen@14 {
93		compatible = "goodix,gt7375p";
94		reg = <0x14>;
95		pinctrl-names = "default";
96		pinctrl-0 = <&ts_int_l>, <&ts_reset_l>;
97
98		interrupt-parent = <&tlmm>;
99		interrupts = <9 IRQ_TYPE_LEVEL_LOW>;
100
101		reset-gpios = <&tlmm 8 GPIO_ACTIVE_LOW>;
102
103		vdd-supply = <&pp3300_touch>;
104	};
105};
106
107/* Panel controls backlight over aux channel */
108
109&backlight {
110	status = "disabled";
111};
112
113&camcc {
114	status = "okay";
115};
116
117&panel {
118	compatible = "samsung,atna33xc20";
119	enable-gpios = <&tlmm 12 GPIO_ACTIVE_HIGH>;
120	/delete-property/ backlight;
121};
122
123&pm6150_adc {
124	skin-temp-thermistor@4d {
125		reg = <ADC5_AMUX_THM1_100K_PU>;
126		qcom,ratiometric;
127		qcom,hw-settle-time = <200>;
128	};
129};
130
131&pm6150_adc_tm {
132	status = "okay";
133
134	skin-temp-thermistor@1 {
135		reg = <1>;
136		io-channels = <&pm6150_adc ADC5_AMUX_THM1_100K_PU>;
137		qcom,ratiometric;
138		qcom,hw-settle-time-us = <200>;
139	};
140};
141
142&pp1800_uf_cam {
143	status = "okay";
144};
145
146&pp1800_wf_cam {
147	status = "okay";
148};
149
150&pp2800_uf_cam {
151	status = "okay";
152};
153
154&pp2800_wf_cam {
155	status = "okay";
156};
157
158&pp3300_dx_edp {
159	gpio = <&tlmm 67 GPIO_ACTIVE_HIGH>;
160};
161
162&secondary_mi2s {
163	qcom,playback-sd-lines = <0 1>;
164};
165
166&sound_multimedia1_codec {
167	sound-dai = <&max98360a>, <&max98360a_1>, <&max98360a_2>, <&max98360a_3> ;
168};
169
170&wifi {
171	qcom,ath10k-calibration-variant = "GO_HOMESTAR";
172};
173
174/* PINCTRL - modifications to sc7180-trogdor.dtsi */
175
176&en_pp3300_dx_edp {
177	pinmux {
178		pins = "gpio67";
179	};
180
181	pinconf {
182		pins = "gpio67";
183	};
184};
185
186&sec_mi2s_active{
187	pinmux {
188		pins = "gpio49", "gpio50", "gpio51", "gpio52";
189		function = "mi2s_1";
190	};
191};
192
193&ts_reset_l {
194	pinconf {
195		/*
196		 * We want reset state by default and it will be up to the
197		 * driver to disable this when it's ready.
198		 */
199		output-low;
200	};
201};
202
203/* PINCTRL - board-specific pinctrl */
204
205&tlmm {
206	gpio-line-names = "HUB_RST_L",
207			  "AP_RAM_ID0",
208			  "AP_SKU_ID2",
209			  "AP_RAM_ID1",
210			  "",
211			  "AP_RAM_ID2",
212			  "UF_CAM_EN",
213			  "WF_CAM_EN",
214			  "TS_RESET_L",
215			  "TS_INT_L",
216			  "",
217			  "EDP_BRIJ_IRQ",
218			  "AP_EDP_BKLTEN",
219			  "UF_CAM_MCLK",
220			  "WF_CAM_CLK",
221			  "EDP_BRIJ_I2C_SDA",
222			  "EDP_BRIJ_I2C_SCL",
223			  "UF_CAM_SDA",
224			  "UF_CAM_SCL",
225			  "WF_CAM_SDA",
226			  "WF_CAM_SCL",
227			  "AVEE_LCD_EN",
228			  "",
229			  "AMP_EN",
230			  "AMP_EN2",
231			  "AP_SAR_SENSOR_SDA",
232			  "AP_SAR_SENSOR_SCL",
233			  "SEL_LCM",
234			  "HP_IRQ",
235			  "WF_CAM_RST_L",
236			  "UF_CAM_RST_L",
237			  "AP_BRD_ID2",
238			  "BRIJ_SUSPEND",
239			  "AP_BRD_ID0",
240			  "AP_H1_SPI_MISO",
241			  "AP_H1_SPI_MOSI",
242			  "AP_H1_SPI_CLK",
243			  "AP_H1_SPI_CS_L",
244			  "BT_UART_CTS",
245			  "BT_UART_RTS",
246			  "BT_UART_TXD",
247			  "BT_UART_RXD",
248			  "H1_AP_INT_ODL",
249			  "",
250			  "UART_AP_TX_DBG_RX",
251			  "UART_DBG_TX_AP_RX",
252			  "HP_I2C_SDA",
253			  "HP_I2C_SCL",
254			  "FORCED_USB_BOOT",
255			  "AMP_BCLK",
256			  "AMP_LRCLK",
257			  "AMP_DIN",
258			  "AMP_DIN_2",
259			  "HP_BCLK",
260			  "HP_LRCLK",
261			  "HP_DOUT",
262			  "HP_DIN",
263			  "HP_MCLK",
264			  "AP_SKU_ID0",
265			  "AP_EC_SPI_MISO",
266			  "AP_EC_SPI_MOSI",
267			  "AP_EC_SPI_CLK",
268			  "AP_EC_SPI_CS_L",
269			  "AP_SPI_CLK",
270			  "AP_SPI_MOSI",
271			  "AP_SPI_MISO",
272			  /*
273			   * AP_FLASH_WP_L is crossystem ABI. Schematics
274			   * call it BIOS_FLASH_WP_L.
275			   */
276			  "AP_FLASH_WP_L",
277			  "EN_PP3300_DX_EDP",
278			  "AP_SPI_CS0_L",
279			  "SD_CD_ODL",
280			  "",
281			  "",
282			  "",
283			  "WLAN_SW_CTRL",
284			  "",
285			  "REPORT_E",
286			  "VDD_RESET_1.8V",
287			  "ID0",
288			  "",
289			  "ID1",
290			  "AVDD_LCD_EN",
291			  "MIPI_1.8V_EN",
292			  "",
293			  "CODEC_PWR_EN",
294			  "HUB_EN",
295			  "",
296			  "PP1800_MIPI_SW_EN",
297			  "EN_PP3300_TOUCH",
298			  "",
299			  "",
300			  "AP_SKU_ID1",
301			  "AP_RST_REQ",
302			  "",
303			  "AP_BRD_ID1",
304			  "AP_EC_INT_L",
305			  "SDM_GRFC_3",
306			  "",
307			  "",
308			  "BOOT_CONFIG_4",
309			  "BOOT_CONFIG_2",
310			  "",
311			  "",
312			  "",
313			  "",
314			  "EDP_BRIJ_EN",
315			  "",
316			  "",
317			  "BOOT_CONFIG_3",
318			  "WCI2_LTE_COEX_TXD",
319			  "WCI2_LTE_COEX_RXD",
320			  "",
321			  "",
322			  "",
323			  "",
324			  "FORCED_USB_BOOT_POL",
325			  "AP_TS_PEN_I2C_SDA",
326			  "AP_TS_PEN_I2C_SCL",
327			  "DP_HOT_PLUG_DET",
328			  "EC_IN_RW_ODL";
329
330	en_pp3300_touch: en-pp3300-touch {
331		pinmux {
332			pins = "gpio87";
333			function = "gpio";
334		};
335
336		pinconf {
337			pins = "gpio87";
338			drive-strength = <2>;
339			bias-disable;
340		};
341	};
342};
343