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