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