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		switch-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	vbus-supply = <&mt6358_vcamio_reg>;
92
93	eeprom@58 {
94		compatible = "atmel,24c32";
95		reg = <0x58>;
96		pagesize = <32>;
97		vcc-supply = <&mt6358_vcama2_reg>;
98	};
99};
100
101&i2c4 {
102	pinctrl-names = "default";
103	pinctrl-0 = <&i2c4_pins>;
104	status = "okay";
105	clock-frequency = <400000>;
106	vbus-supply = <&mt6358_vcn18_reg>;
107
108	eeprom@54 {
109		compatible = "atmel,24c32";
110		reg = <0x54>;
111		pagesize = <32>;
112		vcc-supply = <&mt6358_vcn18_reg>;
113	};
114};
115
116&mipi_tx0 {
117	drive-strength-microamp = <5800>;
118};
119
120&pio {
121	/* 192 lines */
122	gpio-line-names =
123		"SPI_AP_EC_CS_L",
124		"SPI_AP_EC_MOSI",
125		"SPI_AP_EC_CLK",
126		"I2S3_DO",
127		"USB_PD_INT_ODL",
128		"",
129		"",
130		"",
131		"",
132		"IT6505_HPD_L",
133		"I2S3_TDM_D3",
134		"SOC_I2C6_1V8_SCL",
135		"SOC_I2C6_1V8_SDA",
136		"DPI_D0",
137		"DPI_D1",
138		"DPI_D2",
139		"DPI_D3",
140		"DPI_D4",
141		"DPI_D5",
142		"DPI_D6",
143		"DPI_D7",
144		"DPI_D8",
145		"DPI_D9",
146		"DPI_D10",
147		"DPI_D11",
148		"DPI_HSYNC",
149		"DPI_VSYNC",
150		"DPI_DE",
151		"DPI_CK",
152		"AP_MSDC1_CLK",
153		"AP_MSDC1_DAT3",
154		"AP_MSDC1_CMD",
155		"AP_MSDC1_DAT0",
156		"AP_MSDC1_DAT2",
157		"AP_MSDC1_DAT1",
158		"",
159		"",
160		"",
161		"",
162		"",
163		"",
164		"OTG_EN",
165		"DRVBUS",
166		"DISP_PWM",
167		"DSI_TE",
168		"LCM_RST_1V8",
169		"AP_CTS_WIFI_RTS",
170		"AP_RTS_WIFI_CTS",
171		"SOC_I2C5_1V8_SCL",
172		"SOC_I2C5_1V8_SDA",
173		"SOC_I2C3_1V8_SCL",
174		"SOC_I2C3_1V8_SDA",
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		"",
201		"",
202		"",
203		"",
204		"SOC_I2C1_1V8_SDA",
205		"SOC_I2C0_1V8_SDA",
206		"SOC_I2C0_1V8_SCL",
207		"SOC_I2C1_1V8_SCL",
208		"AP_SPI_H1_MISO",
209		"AP_SPI_H1_CS_L",
210		"AP_SPI_H1_MOSI",
211		"AP_SPI_H1_CLK",
212		"I2S5_BCK",
213		"I2S5_LRCK",
214		"I2S5_DO",
215		"BOOTBLOCK_EN_L",
216		"MT8183_KPCOL0",
217		"SPI_AP_EC_MISO",
218		"UART_DBG_TX_AP_RX",
219		"UART_AP_TX_DBG_RX",
220		"I2S2_MCK",
221		"I2S2_BCK",
222		"CLK_5M_WCAM",
223		"CLK_2M_UCAM",
224		"I2S2_LRCK",
225		"I2S2_DI",
226		"SOC_I2C2_1V8_SCL",
227		"SOC_I2C2_1V8_SDA",
228		"SOC_I2C4_1V8_SCL",
229		"SOC_I2C4_1V8_SDA",
230		"",
231		"SCL8",
232		"SDA8",
233		"FCAM_PWDN_L",
234		"",
235		"",
236		"",
237		"",
238		"",
239		"",
240		"",
241		"",
242		"",
243		"",
244		"",
245		"",
246		"",
247		"",
248		"",
249		"",
250		"",
251		"",
252		"",
253		"",
254		"",
255		"",
256		"",
257		"",
258		"",
259		"I2S_PMIC",
260		"I2S_PMIC",
261		"I2S_PMIC",
262		"I2S_PMIC",
263		"I2S_PMIC",
264		"I2S_PMIC",
265		"I2S_PMIC",
266		"I2S_PMIC",
267		"",
268		"",
269		"",
270		"",
271		"",
272		"",
273		/*
274		 * AP_FLASH_WP_L is crossystem ABI. Rev1 schematics
275		 * call it BIOS_FLASH_WP_R_L.
276		 */
277		"AP_FLASH_WP_L",
278		"EC_AP_INT_ODL",
279		"IT6505_INT_ODL",
280		"H1_INT_OD_L",
281		"",
282		"",
283		"",
284		"",
285		"",
286		"",
287		"",
288		"AP_SPI_FLASH_MISO",
289		"AP_SPI_FLASH_CS_L",
290		"AP_SPI_FLASH_MOSI",
291		"AP_SPI_FLASH_CLK",
292		"DA7219_IRQ",
293		"",
294		"",
295		"",
296		"",
297		"",
298		"",
299		"",
300		"",
301		"",
302		"",
303		"",
304		"",
305		"",
306		"",
307		"",
308		"",
309		"",
310		"",
311		"",
312		"",
313		"",
314		"",
315		"",
316		"",
317		"",
318		"";
319
320	ppvarp_lcd_en: ppvarp-lcd-en {
321		pins1 {
322			pinmux = <PINMUX_GPIO66__FUNC_GPIO66>;
323			output-low;
324		};
325	};
326
327	ppvarn_lcd_en: ppvarn-lcd-en {
328		pins1 {
329			pinmux = <PINMUX_GPIO166__FUNC_GPIO166>;
330			output-low;
331		};
332	};
333
334	pp1800_lcd_en: pp1800-lcd-en {
335		pins1 {
336			pinmux = <PINMUX_GPIO36__FUNC_GPIO36>;
337			output-low;
338		};
339	};
340
341	open_touch: open_touch {
342		irq_pin {
343			pinmux = <PINMUX_GPIO155__FUNC_GPIO155>;
344			input-enable;
345			bias-pull-up;
346		};
347
348		rst_pin {
349			pinmux = <PINMUX_GPIO156__FUNC_GPIO156>;
350
351			/*
352			 * The pen driver doesn't currently support  driving
353			 * this reset line.  By specifying output-high here
354			 * we're relying on the fact that this pin has a default
355			 * pulldown at boot (which makes sure the pen was in
356			 * reset if it was powered) and then we set it high here
357			 * to take it out of reset.  Better would be if the pen
358			 * driver could control this and we could remove
359			 * "output-high" here.
360			 */
361			output-high;
362		};
363	};
364
365	pen_eject: peneject {
366		pen_eject {
367			pinmux = <PINMUX_GPIO6__FUNC_GPIO6>;
368			input-enable;
369			/* External pull-up. */
370			bias-disable;
371		};
372	};
373};
374
375&qca_wifi {
376	qcom,ath10k-calibration-variant = "GO_KAKADU";
377};
378
379&panel {
380	status = "okay";
381	compatible = "boe,tv105wum-nw0";
382};
383