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