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