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