xref: /freebsd-src/sys/contrib/device-tree/src/arm64/qcom/sc7180-trogdor-quackingstick.dtsi (revision 0e8011faf58b743cc652e3b2ad0f7671227610df)
1b97ee269SEmmanuel Vadot// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2b97ee269SEmmanuel Vadot/*
3b97ee269SEmmanuel Vadot * Google Quackingstick board device tree source
4b97ee269SEmmanuel Vadot *
5b97ee269SEmmanuel Vadot * Copyright 2021 Google LLC.
6b97ee269SEmmanuel Vadot */
7b97ee269SEmmanuel Vadot
8b97ee269SEmmanuel Vadot/dts-v1/;
9b97ee269SEmmanuel Vadot
10b97ee269SEmmanuel Vadot#include "sc7180-trogdor.dtsi"
1184943d6fSEmmanuel Vadot#include "sc7180-trogdor-rt5682i-sku.dtsi"
12*0e8011faSEmmanuel Vadot#include "sc7180-trogdor-detachable.dtsi"
13b97ee269SEmmanuel Vadot
14b97ee269SEmmanuel Vadot/ {
158bab661aSEmmanuel Vadot	ppvar_lcd: ppvar-lcd-regulator {
16b97ee269SEmmanuel Vadot		compatible = "regulator-fixed";
17b97ee269SEmmanuel Vadot		regulator-name = "ppvar_lcd";
18b97ee269SEmmanuel Vadot
19b97ee269SEmmanuel Vadot		gpio = <&tlmm 88 GPIO_ACTIVE_HIGH>;
20b97ee269SEmmanuel Vadot		enable-active-high;
21b97ee269SEmmanuel Vadot		pinctrl-names = "default";
22b97ee269SEmmanuel Vadot		pinctrl-0 = <&ppvar_lcd_en>;
23b97ee269SEmmanuel Vadot
24b97ee269SEmmanuel Vadot		vin-supply = <&pp5000_a>;
25b97ee269SEmmanuel Vadot	};
26b97ee269SEmmanuel Vadot
278bab661aSEmmanuel Vadot	v1p8_disp: v1p8-disp-regulator {
28b97ee269SEmmanuel Vadot		compatible = "regulator-fixed";
29b97ee269SEmmanuel Vadot		regulator-name = "v1p8_disp";
30b97ee269SEmmanuel Vadot
31b97ee269SEmmanuel Vadot		gpio = <&tlmm 86 GPIO_ACTIVE_HIGH>;
32b97ee269SEmmanuel Vadot		enable-active-high;
33b97ee269SEmmanuel Vadot		pinctrl-names = "default";
34b97ee269SEmmanuel Vadot		pinctrl-0 = <&pp1800_disp_on>;
35b97ee269SEmmanuel Vadot
36b97ee269SEmmanuel Vadot		vin-supply = <&pp3300_a>;
37b97ee269SEmmanuel Vadot	};
38b97ee269SEmmanuel Vadot};
39b97ee269SEmmanuel Vadot
40b97ee269SEmmanuel Vadot&backlight {
41b97ee269SEmmanuel Vadot	pwms = <&cros_ec_pwm 0>;
42b97ee269SEmmanuel Vadot};
43b97ee269SEmmanuel Vadot
44b97ee269SEmmanuel Vadot&camcc {
45b97ee269SEmmanuel Vadot	status = "okay";
46b97ee269SEmmanuel Vadot};
47b97ee269SEmmanuel Vadot
48b97ee269SEmmanuel Vadot&gpio_keys {
49b97ee269SEmmanuel Vadot	status = "okay";
50b97ee269SEmmanuel Vadot};
51b97ee269SEmmanuel Vadot
52b97ee269SEmmanuel Vadot&i2c4 {
53b97ee269SEmmanuel Vadot	status = "okay";
54b97ee269SEmmanuel Vadot	clock-frequency = <400000>;
55b97ee269SEmmanuel Vadot
56b97ee269SEmmanuel Vadot	ap_ts: touchscreen@10 {
57b97ee269SEmmanuel Vadot		compatible = "hid-over-i2c";
58b97ee269SEmmanuel Vadot		reg = <0x10>;
59b97ee269SEmmanuel Vadot		pinctrl-names = "default";
60b97ee269SEmmanuel Vadot		pinctrl-0 = <&ts_int_l>, <&ts_reset_l>;
61b97ee269SEmmanuel Vadot
62b97ee269SEmmanuel Vadot		interrupt-parent = <&tlmm>;
63b97ee269SEmmanuel Vadot		interrupts = <9 IRQ_TYPE_LEVEL_LOW>;
64b97ee269SEmmanuel Vadot
6584943d6fSEmmanuel Vadot		panel = <&panel>;
66b97ee269SEmmanuel Vadot		post-power-on-delay-ms = <20>;
67b97ee269SEmmanuel Vadot		hid-descr-addr = <0x0001>;
68b97ee269SEmmanuel Vadot
69b97ee269SEmmanuel Vadot		vdd-supply = <&pp3300_ts>;
70b97ee269SEmmanuel Vadot	};
71b97ee269SEmmanuel Vadot};
72b97ee269SEmmanuel Vadot
73f126890aSEmmanuel Vadot&mdss_dsi0 {
74f126890aSEmmanuel Vadot	panel: panel@0 {
75f126890aSEmmanuel Vadot		/* Compatible will be filled in per-board */
76f126890aSEmmanuel Vadot		reg = <0>;
77f126890aSEmmanuel Vadot		enable-gpios = <&tlmm 87 GPIO_ACTIVE_HIGH>;
78f126890aSEmmanuel Vadot		pinctrl-names = "default";
79f126890aSEmmanuel Vadot		pinctrl-0 = <&lcd_rst>;
80f126890aSEmmanuel Vadot		avdd-supply = <&ppvar_lcd>;
81f126890aSEmmanuel Vadot		pp1800-supply = <&v1p8_disp>;
82f126890aSEmmanuel Vadot		pp3300-supply = <&pp3300_dx_edp>;
83f126890aSEmmanuel Vadot		backlight = <&backlight>;
84f126890aSEmmanuel Vadot		rotation = <270>;
85f126890aSEmmanuel Vadot
86f126890aSEmmanuel Vadot		port {
87f126890aSEmmanuel Vadot			panel_in: endpoint {
88f126890aSEmmanuel Vadot				remote-endpoint = <&mdss_dsi0_out>;
89f126890aSEmmanuel Vadot			};
90f126890aSEmmanuel Vadot		};
91f126890aSEmmanuel Vadot	};
92f126890aSEmmanuel Vadot
93f126890aSEmmanuel Vadot	ports {
94f126890aSEmmanuel Vadot		port@1 {
95f126890aSEmmanuel Vadot			endpoint {
96f126890aSEmmanuel Vadot				remote-endpoint = <&panel_in>;
97f126890aSEmmanuel Vadot				data-lanes = <0 1 2 3>;
98f126890aSEmmanuel Vadot			};
99f126890aSEmmanuel Vadot		};
100f126890aSEmmanuel Vadot	};
101f126890aSEmmanuel Vadot};
102f126890aSEmmanuel Vadot
103b97ee269SEmmanuel Vadot&sdhc_2 {
104b97ee269SEmmanuel Vadot	status = "okay";
105b97ee269SEmmanuel Vadot};
106b97ee269SEmmanuel Vadot
107b97ee269SEmmanuel Vadot&pp1800_uf_cam {
108b97ee269SEmmanuel Vadot	status = "okay";
109b97ee269SEmmanuel Vadot};
110b97ee269SEmmanuel Vadot
111b97ee269SEmmanuel Vadot&pp1800_wf_cam {
112b97ee269SEmmanuel Vadot	status = "okay";
113b97ee269SEmmanuel Vadot};
114b97ee269SEmmanuel Vadot
115b97ee269SEmmanuel Vadot&pp2800_uf_cam {
116b97ee269SEmmanuel Vadot	status = "okay";
117b97ee269SEmmanuel Vadot};
118b97ee269SEmmanuel Vadot
119b97ee269SEmmanuel Vadot&pp2800_wf_cam {
120b97ee269SEmmanuel Vadot	status = "okay";
121b97ee269SEmmanuel Vadot};
122b97ee269SEmmanuel Vadot
123b97ee269SEmmanuel Vadot/*
124b97ee269SEmmanuel Vadot * No eDP on this board but it's logically the same signal so just give it
125b97ee269SEmmanuel Vadot * a new name and assign the proper GPIO.
126b97ee269SEmmanuel Vadot */
127b97ee269SEmmanuel Vadotpp3300_disp_on: &pp3300_dx_edp {
128b97ee269SEmmanuel Vadot	gpio = <&tlmm 67 GPIO_ACTIVE_HIGH>;
129b97ee269SEmmanuel Vadot};
130b97ee269SEmmanuel Vadot
131*0e8011faSEmmanuel Vadot/* This board only has 1 USB Type-C port. */
132*0e8011faSEmmanuel Vadot&usb_c1 {
133*0e8011faSEmmanuel Vadot	status = "disabled";
134*0e8011faSEmmanuel Vadot};
135*0e8011faSEmmanuel Vadot
136b97ee269SEmmanuel Vadot/* PINCTRL - modifications to sc7180-trogdor.dtsi */
137b97ee269SEmmanuel Vadot
138b97ee269SEmmanuel Vadot/*
139b97ee269SEmmanuel Vadot * No eDP on this board but it's logically the same signal so just give it
140b97ee269SEmmanuel Vadot * a new name and assign the proper GPIO.
141b97ee269SEmmanuel Vadot */
142b97ee269SEmmanuel Vadot
143b97ee269SEmmanuel Vadottp_en: &en_pp3300_dx_edp {
144b97ee269SEmmanuel Vadot	pins = "gpio67";
145b97ee269SEmmanuel Vadot};
146b97ee269SEmmanuel Vadot
147b97ee269SEmmanuel Vadot/* PINCTRL - board-specific pinctrl */
148b97ee269SEmmanuel Vadot
149b97ee269SEmmanuel Vadot&tlmm {
150b97ee269SEmmanuel Vadot	gpio-line-names = "HUB_RST_L",
151b97ee269SEmmanuel Vadot			  "AP_RAM_ID0",
152b97ee269SEmmanuel Vadot			  "AP_SKU_ID2",
153b97ee269SEmmanuel Vadot			  "AP_RAM_ID1",
154b97ee269SEmmanuel Vadot			  "",
155b97ee269SEmmanuel Vadot			  "AP_RAM_ID2",
156b97ee269SEmmanuel Vadot			  "UF_CAM_EN",
157b97ee269SEmmanuel Vadot			  "WF_CAM_EN",
158b97ee269SEmmanuel Vadot			  "TS_RESET_L",
159b97ee269SEmmanuel Vadot			  "TS_INT_L",
160b97ee269SEmmanuel Vadot			  "",
161b97ee269SEmmanuel Vadot			  "",
162b97ee269SEmmanuel Vadot			  "AP_EDP_BKLTEN",
163b97ee269SEmmanuel Vadot			  "UF_CAM_MCLK",
164b97ee269SEmmanuel Vadot			  "WF_CAM_CLK",
165b97ee269SEmmanuel Vadot			  "EDP_BRIJ_I2C_SDA",
166b97ee269SEmmanuel Vadot			  "EDP_BRIJ_I2C_SCL",
167b97ee269SEmmanuel Vadot			  "UF_CAM_SDA",
168b97ee269SEmmanuel Vadot			  "UF_CAM_SCL",
169b97ee269SEmmanuel Vadot			  "WF_CAM_SDA",
170b97ee269SEmmanuel Vadot			  "WF_CAM_SCL",
171b97ee269SEmmanuel Vadot			  "",
172b97ee269SEmmanuel Vadot			  "",
173b97ee269SEmmanuel Vadot			  "AMP_EN",
174b97ee269SEmmanuel Vadot			  "P_SENSOR_INT_L",
175b97ee269SEmmanuel Vadot			  "AP_SAR_SENSOR_SDA",
176b97ee269SEmmanuel Vadot			  "AP_SAR_SENSOR_SCL",
177b97ee269SEmmanuel Vadot			  "",
178b97ee269SEmmanuel Vadot			  "HP_IRQ",
179b97ee269SEmmanuel Vadot			  "WF_CAM_RST_L",
180b97ee269SEmmanuel Vadot			  "UF_CAM_RST_L",
181b97ee269SEmmanuel Vadot			  "AP_BRD_ID2",
182b97ee269SEmmanuel Vadot			  "",
183b97ee269SEmmanuel Vadot			  "AP_BRD_ID0",
184b97ee269SEmmanuel Vadot			  "AP_H1_SPI_MISO",
185b97ee269SEmmanuel Vadot			  "AP_H1_SPI_MOSI",
186b97ee269SEmmanuel Vadot			  "AP_H1_SPI_CLK",
187b97ee269SEmmanuel Vadot			  "AP_H1_SPI_CS_L",
188b97ee269SEmmanuel Vadot			  "",
189b97ee269SEmmanuel Vadot			  "",
190b97ee269SEmmanuel Vadot			  "",
191b97ee269SEmmanuel Vadot			  "",
192b97ee269SEmmanuel Vadot			  "H1_AP_INT_ODL",
193b97ee269SEmmanuel Vadot			  "",
194b97ee269SEmmanuel Vadot			  "UART_AP_TX_DBG_RX",
195b97ee269SEmmanuel Vadot			  "UART_DBG_TX_AP_RX",
196b97ee269SEmmanuel Vadot			  "HP_I2C_SDA",
197b97ee269SEmmanuel Vadot			  "HP_I2C_SCL",
198b97ee269SEmmanuel Vadot			  "FORCED_USB_BOOT",
199b97ee269SEmmanuel Vadot			  "",
200b97ee269SEmmanuel Vadot			  "",
201b97ee269SEmmanuel Vadot			  "AMP_DIN",
202b97ee269SEmmanuel Vadot			  "PEN_DET_ODL",
203b97ee269SEmmanuel Vadot			  "HP_BCLK",
204b97ee269SEmmanuel Vadot			  "HP_LRCLK",
205b97ee269SEmmanuel Vadot			  "HP_DOUT",
206b97ee269SEmmanuel Vadot			  "HP_DIN",
207b97ee269SEmmanuel Vadot			  "HP_MCLK",
208b97ee269SEmmanuel Vadot			  "AP_SKU_ID0",
209b97ee269SEmmanuel Vadot			  "AP_EC_SPI_MISO",
210b97ee269SEmmanuel Vadot			  "AP_EC_SPI_MOSI",
211b97ee269SEmmanuel Vadot			  "AP_EC_SPI_CLK",
212b97ee269SEmmanuel Vadot			  "AP_EC_SPI_CS_L",
213b97ee269SEmmanuel Vadot			  "AP_SPI_CLK",
214b97ee269SEmmanuel Vadot			  "AP_SPI_MOSI",
215b97ee269SEmmanuel Vadot			  "AP_SPI_MISO",
216b97ee269SEmmanuel Vadot			  /*
217b97ee269SEmmanuel Vadot			   * AP_FLASH_WP_L is crossystem ABI. Schematics
218b97ee269SEmmanuel Vadot			   * call it BIOS_FLASH_WP_L.
219b97ee269SEmmanuel Vadot			   */
220b97ee269SEmmanuel Vadot			  "AP_FLASH_WP_L",
221b97ee269SEmmanuel Vadot			  "EN_PP3300_DX_EDP",
222b97ee269SEmmanuel Vadot			  "AP_SPI_CS0_L",
223b97ee269SEmmanuel Vadot			  "SD_CD_ODL",
224b97ee269SEmmanuel Vadot			  "",
225b97ee269SEmmanuel Vadot			  "",
226b97ee269SEmmanuel Vadot			  "",
227b97ee269SEmmanuel Vadot			  "",
228b97ee269SEmmanuel Vadot			  "",
229b97ee269SEmmanuel Vadot			  "UIM2_DATA",
230b97ee269SEmmanuel Vadot			  "UIM2_CLK",
231b97ee269SEmmanuel Vadot			  "UIM2_RST",
232b97ee269SEmmanuel Vadot			  "UIM2_PRESENT_L",
233b97ee269SEmmanuel Vadot			  "UIM1_DATA",
234b97ee269SEmmanuel Vadot			  "UIM1_CLK",
235b97ee269SEmmanuel Vadot			  "UIM1_RST",
236b97ee269SEmmanuel Vadot			  "",
237b97ee269SEmmanuel Vadot			  "CODEC_PWR_EN",
238b97ee269SEmmanuel Vadot			  "HUB_EN",
239b97ee269SEmmanuel Vadot			  "",
240b97ee269SEmmanuel Vadot			  "PP1800_DISP_ON",
241b97ee269SEmmanuel Vadot			  "LCD_RST",
242b97ee269SEmmanuel Vadot			  "PPVAR_LCD_EN",
243b97ee269SEmmanuel Vadot			  "",
244b97ee269SEmmanuel Vadot			  "AP_SKU_ID1",
245b97ee269SEmmanuel Vadot			  "AP_RST_REQ",
246b97ee269SEmmanuel Vadot			  "",
247b97ee269SEmmanuel Vadot			  "AP_BRD_ID1",
248b97ee269SEmmanuel Vadot			  "AP_EC_INT_L",
249b97ee269SEmmanuel Vadot			  "",
250b97ee269SEmmanuel Vadot			  "",
251b97ee269SEmmanuel Vadot			  "",
252b97ee269SEmmanuel Vadot			  "",
253b97ee269SEmmanuel Vadot			  "",
254b97ee269SEmmanuel Vadot			  "",
255b97ee269SEmmanuel Vadot			  "",
256b97ee269SEmmanuel Vadot			  "",
257b97ee269SEmmanuel Vadot			  "",
258b97ee269SEmmanuel Vadot			  "",
259b97ee269SEmmanuel Vadot			  "",
260b97ee269SEmmanuel Vadot			  "",
261b97ee269SEmmanuel Vadot			  "",
262b97ee269SEmmanuel Vadot			  "",
263b97ee269SEmmanuel Vadot			  "",
264b97ee269SEmmanuel Vadot			  "",
265b97ee269SEmmanuel Vadot			  "",
266b97ee269SEmmanuel Vadot			  "",
267b97ee269SEmmanuel Vadot			  "",
268b97ee269SEmmanuel Vadot			  "",
269b97ee269SEmmanuel Vadot			  "AP_TS_I2C_SDA",
270b97ee269SEmmanuel Vadot			  "AP_TS_I2C_SCL",
271b97ee269SEmmanuel Vadot			  "DP_HOT_PLUG_DET",
272b97ee269SEmmanuel Vadot			  "EC_IN_RW_ODL";
273b97ee269SEmmanuel Vadot
2748bab661aSEmmanuel Vadot	lcd_rst: lcd-rst-state {
275b97ee269SEmmanuel Vadot		pins = "gpio87";
276b97ee269SEmmanuel Vadot		function = "gpio";
277b97ee269SEmmanuel Vadot		drive-strength = <2>;
278b97ee269SEmmanuel Vadot		bias-disable;
279b97ee269SEmmanuel Vadot	};
280b97ee269SEmmanuel Vadot
2818bab661aSEmmanuel Vadot	ppvar_lcd_en: ppvar-lcd-en-state {
282b97ee269SEmmanuel Vadot		pins = "gpio88";
283b97ee269SEmmanuel Vadot		function = "gpio";
284b97ee269SEmmanuel Vadot		drive-strength = <2>;
285b97ee269SEmmanuel Vadot		bias-disable;
286b97ee269SEmmanuel Vadot	};
287b97ee269SEmmanuel Vadot
2888bab661aSEmmanuel Vadot	pp1800_disp_on: pp1800-disp-on-state {
289b97ee269SEmmanuel Vadot		pins = "gpio86";
290b97ee269SEmmanuel Vadot		function = "gpio";
291b97ee269SEmmanuel Vadot		drive-strength = <2>;
292b97ee269SEmmanuel Vadot		bias-disable;
293b97ee269SEmmanuel Vadot	};
294b97ee269SEmmanuel Vadot};
295