1// SPDX-License-Identifier: (GPL-2.0 OR MIT)
2/*
3 * Copyright 2021 Google LLC
4 */
5
6#include "mt8183-kukui.dtsi"
7
8/ {
9	panel: panel {
10		compatible = "auo,b116xw03";
11		power-supply = <&pp3300_panel>;
12		backlight = <&backlight_lcd0>;
13
14		port {
15			panel_in: endpoint {
16				remote-endpoint = <&anx7625_out>;
17			};
18		};
19	};
20
21	pp1200_mipibrdg: pp1200-mipibrdg {
22		compatible = "regulator-fixed";
23		regulator-name = "pp1200_mipibrdg";
24		pinctrl-names = "default";
25		pinctrl-0 = <&pp1200_mipibrdg_en>;
26
27		enable-active-high;
28		regulator-boot-on;
29
30		gpio = <&pio 54 GPIO_ACTIVE_HIGH>;
31	};
32
33	pp1800_mipibrdg: pp1800-mipibrdg {
34		compatible = "regulator-fixed";
35		regulator-name = "pp1800_mipibrdg";
36		pinctrl-names = "default";
37		pinctrl-0 = <&pp1800_lcd_en>;
38
39		enable-active-high;
40		regulator-boot-on;
41
42		gpio = <&pio 36 GPIO_ACTIVE_HIGH>;
43	};
44
45	pp3300_panel: pp3300-panel {
46		compatible = "regulator-fixed";
47		regulator-name = "pp3300_panel";
48		regulator-min-microvolt = <3300000>;
49		regulator-max-microvolt = <3300000>;
50		pinctrl-names = "default";
51		pinctrl-0 = <&pp3300_panel_pins>;
52
53		enable-active-high;
54		regulator-boot-on;
55
56		gpio = <&pio 35 GPIO_ACTIVE_HIGH>;
57	};
58
59	vddio_mipibrdg: vddio-mipibrdg {
60		compatible = "regulator-fixed";
61		regulator-name = "vddio_mipibrdg";
62		pinctrl-names = "default";
63		pinctrl-0 = <&vddio_mipibrdg_en>;
64
65		enable-active-high;
66		regulator-boot-on;
67
68		gpio = <&pio 37 GPIO_ACTIVE_HIGH>;
69	};
70
71	volume_buttons: volume-buttons {
72		compatible = "gpio-keys";
73		pinctrl-names = "default";
74		pinctrl-0 = <&volume_button_pins>;
75
76		volume_down {
77			label = "Volume Down";
78			linux,code = <KEY_VOLUMEDOWN>;
79			debounce-interval = <100>;
80
81			gpios = <&pio 6 GPIO_ACTIVE_LOW>;
82		};
83
84		volume_up {
85			label = "Volume Up";
86			linux,code = <KEY_VOLUMEUP>;
87			debounce-interval = <100>;
88
89			gpios = <&pio 5 GPIO_ACTIVE_LOW>;
90		};
91	};
92};
93
94&cros_ec {
95	cros_ec_pwm: ec-pwm {
96		compatible = "google,cros-ec-pwm";
97		#pwm-cells = <1>;
98		status = "disabled";
99	};
100};
101
102&dsi0 {
103	status = "okay";
104	/delete-node/panel@0;
105	ports {
106		port {
107			dsi_out: endpoint {
108				remote-endpoint = <&anx7625_in>;
109			};
110		};
111	};
112};
113
114&i2c0 {
115	status = "okay";
116
117	touchscreen: touchscreen@10 {
118		compatible = "elan,ekth3500";
119		reg = <0x10>;
120
121		pinctrl-names = "default";
122		pinctrl-0 = <&touchscreen_pins>;
123
124		interrupts-extended = <&pio 155 IRQ_TYPE_LEVEL_LOW>;
125
126		reset-gpios = <&pio 156 GPIO_ACTIVE_LOW>;
127	};
128};
129
130&i2c2 {
131	pinctrl-names = "default";
132	pinctrl-0 = <&i2c2_pins>;
133	status = "okay";
134	clock-frequency = <400000>;
135
136	trackpad@15 {
137		compatible = "elan,ekth3000";
138		reg = <0x15>;
139
140		pinctrl-names = "default";
141		pinctrl-0 = <&trackpad_pins>;
142
143		interrupts-extended = <&pio 7 IRQ_TYPE_LEVEL_LOW>;
144
145		wakeup-source;
146	};
147};
148
149&i2c4 {
150	pinctrl-names = "default";
151	pinctrl-0 = <&i2c4_pins>;
152	status = "okay";
153	clock-frequency = <100000>;
154
155	anx_bridge: anx7625@58 {
156		compatible = "analogix,anx7625";
157		reg = <0x58>;
158		pinctrl-names = "default";
159		pinctrl-0 = <&anx7625_pins>;
160		panel_flags = <1>;
161		enable-gpios = <&pio 45 GPIO_ACTIVE_HIGH>;
162		reset-gpios = <&pio 73 GPIO_ACTIVE_HIGH>;
163		vdd10-supply = <&pp1200_mipibrdg>;
164		vdd18-supply = <&pp1800_mipibrdg>;
165		vdd33-supply = <&vddio_mipibrdg>;
166
167		#address-cells = <1>;
168		#size-cells = <0>;
169		port@0 {
170			reg = <0>;
171
172			anx7625_in: endpoint {
173				remote-endpoint = <&dsi_out>;
174			};
175		};
176
177		port@1 {
178			reg = <1>;
179
180			anx7625_out: endpoint {
181				remote-endpoint = <&panel_in>;
182			};
183		};
184	};
185};
186
187&i2c_tunnel {
188	google,remote-bus = <2>;
189};
190
191&pio {
192	/* 192 lines */
193	gpio-line-names =
194		"SPI_AP_EC_CS_L",
195		"SPI_AP_EC_MOSI",
196		"SPI_AP_EC_CLK",
197		"I2S3_DO",
198		"USB_PD_INT_ODL",
199		"",
200		"",
201		"",
202		"",
203		"IT6505_HPD_L",
204		"I2S3_TDM_D3",
205		"SOC_I2C6_1V8_SCL",
206		"SOC_I2C6_1V8_SDA",
207		"DPI_D0",
208		"DPI_D1",
209		"DPI_D2",
210		"DPI_D3",
211		"DPI_D4",
212		"DPI_D5",
213		"DPI_D6",
214		"DPI_D7",
215		"DPI_D8",
216		"DPI_D9",
217		"DPI_D10",
218		"DPI_D11",
219		"DPI_HSYNC",
220		"DPI_VSYNC",
221		"DPI_DE",
222		"DPI_CK",
223		"AP_MSDC1_CLK",
224		"AP_MSDC1_DAT3",
225		"AP_MSDC1_CMD",
226		"AP_MSDC1_DAT0",
227		"AP_MSDC1_DAT2",
228		"AP_MSDC1_DAT1",
229		"",
230		"",
231		"",
232		"",
233		"",
234		"",
235		"OTG_EN",
236		"DRVBUS",
237		"DISP_PWM",
238		"DSI_TE",
239		"LCM_RST_1V8",
240		"AP_CTS_WIFI_RTS",
241		"AP_RTS_WIFI_CTS",
242		"SOC_I2C5_1V8_SCL",
243		"SOC_I2C5_1V8_SDA",
244		"SOC_I2C3_1V8_SCL",
245		"SOC_I2C3_1V8_SDA",
246		"",
247		"",
248		"",
249		"",
250		"",
251		"",
252		"",
253		"",
254		"",
255		"",
256		"",
257		"",
258		"",
259		"",
260		"",
261		"",
262		"",
263		"",
264		"",
265		"",
266		"",
267		"",
268		"",
269		"",
270		"",
271		"",
272		"",
273		"",
274		"",
275		"SOC_I2C1_1V8_SDA",
276		"SOC_I2C0_1V8_SDA",
277		"SOC_I2C0_1V8_SCL",
278		"SOC_I2C1_1V8_SCL",
279		"AP_SPI_H1_MISO",
280		"AP_SPI_H1_CS_L",
281		"AP_SPI_H1_MOSI",
282		"AP_SPI_H1_CLK",
283		"I2S5_BCK",
284		"I2S5_LRCK",
285		"I2S5_DO",
286		"BOOTBLOCK_EN_L",
287		"MT8183_KPCOL0",
288		"SPI_AP_EC_MISO",
289		"UART_DBG_TX_AP_RX",
290		"UART_AP_TX_DBG_RX",
291		"I2S2_MCK",
292		"I2S2_BCK",
293		"CLK_5M_WCAM",
294		"CLK_2M_UCAM",
295		"I2S2_LRCK",
296		"I2S2_DI",
297		"SOC_I2C2_1V8_SCL",
298		"SOC_I2C2_1V8_SDA",
299		"SOC_I2C4_1V8_SCL",
300		"SOC_I2C4_1V8_SDA",
301		"",
302		"SCL8",
303		"SDA8",
304		"FCAM_PWDN_L",
305		"",
306		"",
307		"",
308		"",
309		"",
310		"",
311		"",
312		"",
313		"",
314		"",
315		"",
316		"",
317		"",
318		"",
319		"",
320		"",
321		"",
322		"",
323		"",
324		"",
325		"",
326		"",
327		"",
328		"",
329		"",
330		"I2S_PMIC",
331		"I2S_PMIC",
332		"I2S_PMIC",
333		"I2S_PMIC",
334		"I2S_PMIC",
335		"I2S_PMIC",
336		"I2S_PMIC",
337		"I2S_PMIC",
338		"",
339		"",
340		"",
341		"",
342		"",
343		"",
344		/*
345		 * AP_FLASH_WP_L is crossystem ABI. Rev1 schematics
346		 * call it BIOS_FLASH_WP_R_L.
347		 */
348		"AP_FLASH_WP_L",
349		"EC_AP_INT_ODL",
350		"IT6505_INT_ODL",
351		"H1_INT_OD_L",
352		"",
353		"",
354		"",
355		"",
356		"",
357		"",
358		"",
359		"AP_SPI_FLASH_MISO",
360		"AP_SPI_FLASH_CS_L",
361		"AP_SPI_FLASH_MOSI",
362		"AP_SPI_FLASH_CLK",
363		"DA7219_IRQ",
364		"",
365		"",
366		"",
367		"",
368		"",
369		"",
370		"",
371		"",
372		"",
373		"",
374		"",
375		"",
376		"",
377		"",
378		"",
379		"",
380		"",
381		"",
382		"",
383		"",
384		"",
385		"",
386		"",
387		"",
388		"",
389		"";
390
391	pp1200_mipibrdg_en: pp1200-mipibrdg-en {
392		pins1 {
393			pinmux = <PINMUX_GPIO54__FUNC_GPIO54>;
394			output-low;
395		};
396	};
397
398	pp1800_lcd_en: pp1800-lcd-en {
399		pins1 {
400			pinmux = <PINMUX_GPIO36__FUNC_GPIO36>;
401			output-low;
402		};
403	};
404
405	pp3300_panel_pins: pp3300-panel-pins {
406		panel_3v3_enable: panel-3v3-enable {
407			pinmux = <PINMUX_GPIO35__FUNC_GPIO35>;
408			output-low;
409		};
410	};
411
412	ppvarp_lcd_en: ppvarp-lcd-en {
413		pins1 {
414			pinmux = <PINMUX_GPIO66__FUNC_GPIO66>;
415			output-low;
416		};
417	};
418
419	ppvarn_lcd_en: ppvarn-lcd-en {
420		pins1 {
421			pinmux = <PINMUX_GPIO166__FUNC_GPIO166>;
422			output-low;
423		};
424	};
425
426	anx7625_pins: anx7625-pins {
427		pins1 {
428			pinmux = <PINMUX_GPIO45__FUNC_GPIO45>,
429				 <PINMUX_GPIO73__FUNC_GPIO73>;
430			output-low;
431		};
432		pins2 {
433			pinmux = <PINMUX_GPIO4__FUNC_GPIO4>;
434			input-enable;
435			bias-pull-up;
436		};
437	};
438
439	touchscreen_pins: touchscreen-pins {
440		touch_int_odl {
441			pinmux = <PINMUX_GPIO155__FUNC_GPIO155>;
442			input-enable;
443			bias-pull-up;
444		};
445
446		touch_rst_l {
447			pinmux = <PINMUX_GPIO156__FUNC_GPIO156>;
448			output-high;
449		};
450	};
451
452	trackpad_pins: trackpad-pins {
453		trackpad_int {
454			pinmux = <PINMUX_GPIO7__FUNC_GPIO7>;
455			input-enable;
456			bias-disable; /* pulled externally */
457		};
458	};
459
460	vddio_mipibrdg_en: vddio-mipibrdg-en {
461		pins1 {
462			pinmux = <PINMUX_GPIO37__FUNC_GPIO37>;
463			output-low;
464		};
465	};
466
467	volume_button_pins: volume-button-pins {
468		voldn-btn-odl {
469			pinmux = <PINMUX_GPIO6__FUNC_GPIO6>;
470			input-enable;
471			bias-pull-up;
472		};
473
474		volup-btn-odl {
475			pinmux = <PINMUX_GPIO5__FUNC_GPIO5>;
476			input-enable;
477			bias-pull-up;
478		};
479	};
480};
481
482