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