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/* This file must be included after sc7180-trogdor.dtsi */
9
10/ {
11	/* BOARD-SPECIFIC TOP LEVEL NODES */
12
13	max98360a_1: amplifier-1 {
14		compatible = "maxim,max98360a";
15		#sound-dai-cells = <0>;
16	};
17
18	max98360a_2: amplifier-2 {
19		compatible = "maxim,max98360a";
20		#sound-dai-cells = <0>;
21	};
22
23	max98360a_3: amplifier-3 {
24		compatible = "maxim,max98360a";
25		#sound-dai-cells = <0>;
26	};
27
28	pp3300_touch: pp3300-touch-regulator {
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
88/*
89 * ADDITIONS TO FIXED REGULATORS DEFINED IN PARENT DEVICE TREE FILES
90 *
91 * Sort order matches the order in the parent files (parents before children).
92 */
93
94&pp3300_dx_edp {
95	/*
96	 * The atna33xc20 really likes to be power cycled to keep it from
97	 * getting in a bad state. This is the reason that the touchscreen
98	 * rail and eDP rails are separate from each other on homestar (but
99	 * not other trogdor devices) Make sure it starts "off" at bootup.
100	 */
101	/delete-property/ regulator-boot-on;
102};
103
104/* ADDITIONS TO NODES DEFINED IN PARENT DEVICE TREE FILES */
105
106ap_ts_pen_1v8: &i2c4 {
107	status = "okay";
108	clock-frequency = <400000>;
109
110	ap_ts: touchscreen@14 {
111		compatible = "goodix,gt7375p";
112		reg = <0x14>;
113		pinctrl-names = "default";
114		pinctrl-0 = <&ts_int_l>, <&ts_reset_l>;
115
116		interrupt-parent = <&tlmm>;
117		interrupts = <9 IRQ_TYPE_LEVEL_LOW>;
118
119		reset-gpios = <&tlmm 8 GPIO_ACTIVE_LOW>;
120
121		vdd-supply = <&pp3300_touch>;
122	};
123};
124
125/* Panel controls backlight over aux channel */
126
127&backlight {
128	status = "disabled";
129};
130
131&camcc {
132	status = "okay";
133};
134
135&cros_ec {
136	keyboard-controller {
137		compatible = "google,cros-ec-keyb-switches";
138	};
139};
140
141&panel {
142	compatible = "samsung,atna33xc20";
143	enable-gpios = <&tlmm 12 GPIO_ACTIVE_HIGH>;
144	/delete-property/ backlight;
145};
146
147&pm6150_adc {
148	channel@4d {
149		reg = <ADC5_AMUX_THM1_100K_PU>;
150		qcom,ratiometric;
151		qcom,hw-settle-time = <200>;
152		label = "skin_therm";
153	};
154};
155
156&pm6150_adc_tm {
157	status = "okay";
158
159	skin-temp-thermistor@1 {
160		reg = <1>;
161		io-channels = <&pm6150_adc ADC5_AMUX_THM1_100K_PU>;
162		qcom,ratiometric;
163		qcom,hw-settle-time-us = <200>;
164	};
165};
166
167&pp1800_uf_cam {
168	status = "okay";
169};
170
171&pp1800_wf_cam {
172	status = "okay";
173};
174
175&pp2800_uf_cam {
176	status = "okay";
177};
178
179&pp2800_wf_cam {
180	status = "okay";
181};
182
183&pp3300_dx_edp {
184	gpio = <&tlmm 67 GPIO_ACTIVE_HIGH>;
185};
186
187&secondary_mi2s {
188	qcom,playback-sd-lines = <0 1>;
189};
190
191&sound_multimedia1_codec {
192	sound-dai = <&max98360a>, <&max98360a_1>, <&max98360a_2>, <&max98360a_3> ;
193};
194
195&wifi {
196	qcom,ath10k-calibration-variant = "GO_HOMESTAR";
197};
198
199/* PINCTRL - modifications to sc7180-trogdor.dtsi */
200
201&en_pp3300_dx_edp {
202	pins = "gpio67";
203};
204
205&sec_mi2s_active {
206	pins = "gpio49", "gpio50", "gpio51", "gpio52";
207};
208
209&ts_reset_l {
210	/*
211	 * We want reset state by default and it will be up to the
212	 * driver to disable this when it's ready.
213	 */
214	output-low;
215};
216
217/* PINCTRL - board-specific pinctrl */
218
219&tlmm {
220	gpio-line-names = "HUB_RST_L",
221			  "AP_RAM_ID0",
222			  "AP_SKU_ID2",
223			  "AP_RAM_ID1",
224			  "",
225			  "AP_RAM_ID2",
226			  "UF_CAM_EN",
227			  "WF_CAM_EN",
228			  "TS_RESET_L",
229			  "TS_INT_L",
230			  "",
231			  "EDP_BRIJ_IRQ",
232			  "AP_EDP_BKLTEN",
233			  "UF_CAM_MCLK",
234			  "WF_CAM_CLK",
235			  "EDP_BRIJ_I2C_SDA",
236			  "EDP_BRIJ_I2C_SCL",
237			  "UF_CAM_SDA",
238			  "UF_CAM_SCL",
239			  "WF_CAM_SDA",
240			  "WF_CAM_SCL",
241			  "AVEE_LCD_EN",
242			  "",
243			  "AMP_EN",
244			  "AMP_EN2",
245			  "AP_SAR_SENSOR_SDA",
246			  "AP_SAR_SENSOR_SCL",
247			  "SEL_LCM",
248			  "HP_IRQ",
249			  "WF_CAM_RST_L",
250			  "UF_CAM_RST_L",
251			  "AP_BRD_ID2",
252			  "BRIJ_SUSPEND",
253			  "AP_BRD_ID0",
254			  "AP_H1_SPI_MISO",
255			  "AP_H1_SPI_MOSI",
256			  "AP_H1_SPI_CLK",
257			  "AP_H1_SPI_CS_L",
258			  "BT_UART_CTS",
259			  "BT_UART_RTS",
260			  "BT_UART_TXD",
261			  "BT_UART_RXD",
262			  "H1_AP_INT_ODL",
263			  "",
264			  "UART_AP_TX_DBG_RX",
265			  "UART_DBG_TX_AP_RX",
266			  "HP_I2C_SDA",
267			  "HP_I2C_SCL",
268			  "FORCED_USB_BOOT",
269			  "AMP_BCLK",
270			  "AMP_LRCLK",
271			  "AMP_DIN",
272			  "AMP_DIN_2",
273			  "HP_BCLK",
274			  "HP_LRCLK",
275			  "HP_DOUT",
276			  "HP_DIN",
277			  "HP_MCLK",
278			  "AP_SKU_ID0",
279			  "AP_EC_SPI_MISO",
280			  "AP_EC_SPI_MOSI",
281			  "AP_EC_SPI_CLK",
282			  "AP_EC_SPI_CS_L",
283			  "AP_SPI_CLK",
284			  "AP_SPI_MOSI",
285			  "AP_SPI_MISO",
286			  /*
287			   * AP_FLASH_WP_L is crossystem ABI. Schematics
288			   * call it BIOS_FLASH_WP_L.
289			   */
290			  "AP_FLASH_WP_L",
291			  "EN_PP3300_DX_EDP",
292			  "AP_SPI_CS0_L",
293			  "SD_CD_ODL",
294			  "",
295			  "",
296			  "",
297			  "WLAN_SW_CTRL",
298			  "",
299			  "REPORT_E",
300			  "VDD_RESET_1.8V",
301			  "ID0",
302			  "",
303			  "ID1",
304			  "AVDD_LCD_EN",
305			  "MIPI_1.8V_EN",
306			  "",
307			  "CODEC_PWR_EN",
308			  "HUB_EN",
309			  "",
310			  "PP1800_MIPI_SW_EN",
311			  "EN_PP3300_TOUCH",
312			  "",
313			  "",
314			  "AP_SKU_ID1",
315			  "AP_RST_REQ",
316			  "",
317			  "AP_BRD_ID1",
318			  "AP_EC_INT_L",
319			  "SDM_GRFC_3",
320			  "",
321			  "",
322			  "BOOT_CONFIG_4",
323			  "BOOT_CONFIG_2",
324			  "",
325			  "",
326			  "",
327			  "",
328			  "EDP_BRIJ_EN",
329			  "",
330			  "",
331			  "BOOT_CONFIG_3",
332			  "WCI2_LTE_COEX_TXD",
333			  "WCI2_LTE_COEX_RXD",
334			  "",
335			  "",
336			  "",
337			  "",
338			  "FORCED_USB_BOOT_POL",
339			  "AP_TS_PEN_I2C_SDA",
340			  "AP_TS_PEN_I2C_SCL",
341			  "DP_HOT_PLUG_DET",
342			  "EC_IN_RW_ODL";
343
344	en_pp3300_touch: en-pp3300-touch-state {
345		pins = "gpio87";
346		function = "gpio";
347		drive-strength = <2>;
348		bias-disable;
349	};
350};
351