1// SPDX-License-Identifier: (GPL-2.0 OR MIT)
2/*
3 * Copyright 2020 Google LLC
4 */
5
6#include "mt8183-kukui.dtsi"
7#include <dt-bindings/input/gpio-keys.h>
8
9/ {
10	ppvarn_lcd: ppvarn-lcd {
11		compatible = "regulator-fixed";
12		regulator-name = "ppvarn_lcd";
13		pinctrl-names = "default";
14		pinctrl-0 = <&ppvarn_lcd_en>;
15
16		enable-active-high;
17
18		gpio = <&pio 66 GPIO_ACTIVE_HIGH>;
19	};
20
21	ppvarp_lcd: ppvarp-lcd {
22		compatible = "regulator-fixed";
23		regulator-name = "ppvarp_lcd";
24		pinctrl-names = "default";
25		pinctrl-0 = <&ppvarp_lcd_en>;
26
27		enable-active-high;
28
29		gpio = <&pio 166 GPIO_ACTIVE_HIGH>;
30	};
31
32	pp1800_lcd: pp1800-lcd {
33		compatible = "regulator-fixed";
34		regulator-name = "pp1800_lcd";
35		pinctrl-names = "default";
36		pinctrl-0 = <&pp1800_lcd_en>;
37
38		enable-active-high;
39
40		gpio = <&pio 36 GPIO_ACTIVE_HIGH>;
41	};
42
43	gpio-keys {
44		compatible = "gpio-keys";
45		pinctrl-names = "default";
46		pinctrl-0 = <&pen_eject>;
47
48		pen-insert {
49			label = "Pen Insert";
50			/* Insert = low, eject = high */
51			gpios = <&pio 6 GPIO_ACTIVE_LOW>;
52			linux,code = <SW_PEN_INSERTED>;
53			linux,input-type = <EV_SW>;
54			wakeup-event-action = <EV_ACT_DEASSERTED>;
55			wakeup-source;
56		};
57	};
58};
59
60&bluetooth {
61	firmware-name = "nvm_00440302_i2s_eu.bin";
62};
63
64&i2c0 {
65	status = "okay";
66
67	touchscreen: touchscreen@10 {
68		compatible = "hid-over-i2c";
69		reg = <0x10>;
70		pinctrl-names = "default";
71		pinctrl-0 = <&open_touch>;
72
73		interrupt-parent = <&pio>;
74		interrupts = <155 IRQ_TYPE_EDGE_FALLING>;
75
76		post-power-on-delay-ms = <10>;
77		hid-descr-addr = <0x0001>;
78	};
79};
80
81&mt6358_vcama2_reg {
82	regulator-min-microvolt = <2800000>;
83	regulator-max-microvolt = <2800000>;
84};
85
86&i2c2 {
87	pinctrl-names = "default";
88	pinctrl-0 = <&i2c2_pins>;
89	status = "okay";
90	clock-frequency = <400000>;
91
92	eeprom@58 {
93		compatible = "atmel,24c32";
94		reg = <0x58>;
95		pagesize = <32>;
96	};
97};
98
99&i2c4 {
100	pinctrl-names = "default";
101	pinctrl-0 = <&i2c4_pins>;
102	status = "okay";
103	clock-frequency = <400000>;
104
105	eeprom@54 {
106		compatible = "atmel,24c32";
107		reg = <0x54>;
108		pagesize = <32>;
109	};
110};
111
112&mipi_tx0 {
113	drive-strength-microamp = <5800>;
114};
115
116&pio {
117	/* 192 lines */
118	gpio-line-names =
119		"SPI_AP_EC_CS_L",
120		"SPI_AP_EC_MOSI",
121		"SPI_AP_EC_CLK",
122		"I2S3_DO",
123		"USB_PD_INT_ODL",
124		"",
125		"",
126		"",
127		"",
128		"IT6505_HPD_L",
129		"I2S3_TDM_D3",
130		"SOC_I2C6_1V8_SCL",
131		"SOC_I2C6_1V8_SDA",
132		"DPI_D0",
133		"DPI_D1",
134		"DPI_D2",
135		"DPI_D3",
136		"DPI_D4",
137		"DPI_D5",
138		"DPI_D6",
139		"DPI_D7",
140		"DPI_D8",
141		"DPI_D9",
142		"DPI_D10",
143		"DPI_D11",
144		"DPI_HSYNC",
145		"DPI_VSYNC",
146		"DPI_DE",
147		"DPI_CK",
148		"AP_MSDC1_CLK",
149		"AP_MSDC1_DAT3",
150		"AP_MSDC1_CMD",
151		"AP_MSDC1_DAT0",
152		"AP_MSDC1_DAT2",
153		"AP_MSDC1_DAT1",
154		"",
155		"",
156		"",
157		"",
158		"",
159		"",
160		"OTG_EN",
161		"DRVBUS",
162		"DISP_PWM",
163		"DSI_TE",
164		"LCM_RST_1V8",
165		"AP_CTS_WIFI_RTS",
166		"AP_RTS_WIFI_CTS",
167		"SOC_I2C5_1V8_SCL",
168		"SOC_I2C5_1V8_SDA",
169		"SOC_I2C3_1V8_SCL",
170		"SOC_I2C3_1V8_SDA",
171		"",
172		"",
173		"",
174		"",
175		"",
176		"",
177		"",
178		"",
179		"",
180		"",
181		"",
182		"",
183		"",
184		"",
185		"",
186		"",
187		"",
188		"",
189		"",
190		"",
191		"",
192		"",
193		"",
194		"",
195		"",
196		"",
197		"",
198		"",
199		"",
200		"SOC_I2C1_1V8_SDA",
201		"SOC_I2C0_1V8_SDA",
202		"SOC_I2C0_1V8_SCL",
203		"SOC_I2C1_1V8_SCL",
204		"AP_SPI_H1_MISO",
205		"AP_SPI_H1_CS_L",
206		"AP_SPI_H1_MOSI",
207		"AP_SPI_H1_CLK",
208		"I2S5_BCK",
209		"I2S5_LRCK",
210		"I2S5_DO",
211		"BOOTBLOCK_EN_L",
212		"MT8183_KPCOL0",
213		"SPI_AP_EC_MISO",
214		"UART_DBG_TX_AP_RX",
215		"UART_AP_TX_DBG_RX",
216		"I2S2_MCK",
217		"I2S2_BCK",
218		"CLK_5M_WCAM",
219		"CLK_2M_UCAM",
220		"I2S2_LRCK",
221		"I2S2_DI",
222		"SOC_I2C2_1V8_SCL",
223		"SOC_I2C2_1V8_SDA",
224		"SOC_I2C4_1V8_SCL",
225		"SOC_I2C4_1V8_SDA",
226		"",
227		"SCL8",
228		"SDA8",
229		"FCAM_PWDN_L",
230		"",
231		"",
232		"",
233		"",
234		"",
235		"",
236		"",
237		"",
238		"",
239		"",
240		"",
241		"",
242		"",
243		"",
244		"",
245		"",
246		"",
247		"",
248		"",
249		"",
250		"",
251		"",
252		"",
253		"",
254		"",
255		"I2S_PMIC",
256		"I2S_PMIC",
257		"I2S_PMIC",
258		"I2S_PMIC",
259		"I2S_PMIC",
260		"I2S_PMIC",
261		"I2S_PMIC",
262		"I2S_PMIC",
263		"",
264		"",
265		"",
266		"",
267		"",
268		"",
269		/*
270		 * AP_FLASH_WP_L is crossystem ABI. Rev1 schematics
271		 * call it BIOS_FLASH_WP_R_L.
272		 */
273		"AP_FLASH_WP_L",
274		"EC_AP_INT_ODL",
275		"IT6505_INT_ODL",
276		"H1_INT_OD_L",
277		"",
278		"",
279		"",
280		"",
281		"",
282		"",
283		"",
284		"AP_SPI_FLASH_MISO",
285		"AP_SPI_FLASH_CS_L",
286		"AP_SPI_FLASH_MOSI",
287		"AP_SPI_FLASH_CLK",
288		"DA7219_IRQ",
289		"",
290		"",
291		"",
292		"",
293		"",
294		"",
295		"",
296		"",
297		"",
298		"",
299		"",
300		"",
301		"",
302		"",
303		"",
304		"",
305		"",
306		"",
307		"",
308		"",
309		"",
310		"",
311		"",
312		"",
313		"",
314		"";
315
316	ppvarp_lcd_en: ppvarp-lcd-en {
317		pins1 {
318			pinmux = <PINMUX_GPIO66__FUNC_GPIO66>;
319			output-low;
320		};
321	};
322
323	ppvarn_lcd_en: ppvarn-lcd-en {
324		pins1 {
325			pinmux = <PINMUX_GPIO166__FUNC_GPIO166>;
326			output-low;
327		};
328	};
329
330	pp1800_lcd_en: pp1800-lcd-en {
331		pins1 {
332			pinmux = <PINMUX_GPIO36__FUNC_GPIO36>;
333			output-low;
334		};
335	};
336
337	open_touch: open_touch {
338		irq_pin {
339			pinmux = <PINMUX_GPIO155__FUNC_GPIO155>;
340			input-enable;
341			bias-pull-up;
342		};
343
344		rst_pin {
345			pinmux = <PINMUX_GPIO156__FUNC_GPIO156>;
346
347			/*
348			 * The pen driver doesn't currently support  driving
349			 * this reset line.  By specifying output-high here
350			 * we're relying on the fact that this pin has a default
351			 * pulldown at boot (which makes sure the pen was in
352			 * reset if it was powered) and then we set it high here
353			 * to take it out of reset.  Better would be if the pen
354			 * driver could control this and we could remove
355			 * "output-high" here.
356			 */
357			output-high;
358		};
359	};
360
361	pen_eject: peneject {
362		pen_eject {
363			pinmux = <PINMUX_GPIO6__FUNC_GPIO6>;
364			input-enable;
365			/* External pull-up. */
366			bias-disable;
367		};
368	};
369};
370
371&qca_wifi {
372	qcom,ath10k-calibration-variant = "GO_KAKADU";
373};
374
375&panel {
376	status = "okay";
377	compatible = "boe,tv105wum-nw0";
378};
379