1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Google Pazquel board device tree source
4 *
5 * Copyright 2021 Google LLC.
6 */
7
8/* This file must be included after sc7180-trogdor.dtsi */
9#include <arm/cros-ec-keyboard.dtsi>
10
11&ap_sar_sensor {
12	compatible = "semtech,sx9324";
13	semtech,ph0-pin = <1 3 3>;
14	semtech,ph1-pin = <3 1 3>;
15	semtech,ph2-pin = <1 3 3>;
16	semtech,ph3-pin = <0 0 0>;
17	semtech,ph01-resolution = <1024>;
18	semtech,ph23-resolution = <1024>;
19	semtech,startup-sensor = <1>;
20	semtech,ph01-proxraw-strength = <3>;
21	semtech,ph23-proxraw-strength = <1>;
22	semtech,avg-pos-strength = <128>;
23	semtech,input-analog-gain = <0>;
24	semtech,cs-idle-sleep = "gnd";
25
26	/delete-property/ svdd-supply;
27	vdd-supply = <&pp1800_prox>;
28};
29
30/delete-node/&trackpad;
31&ap_tp_i2c {
32	status = "okay";
33	trackpad: trackpad@15 {
34		compatible = "hid-over-i2c";
35		reg = <0x15>;
36		pinctrl-names = "default";
37		pinctrl-0 = <&tp_int_odl>;
38
39		interrupt-parent = <&tlmm>;
40		interrupts = <0 IRQ_TYPE_EDGE_FALLING>;
41
42		vcc-supply = <&pp3300_fp_tp>;
43		post-power-on-delay-ms = <100>;
44		hid-descr-addr = <0x0001>;
45
46		wakeup-source;
47	};
48};
49
50&keyboard_controller {
51	function-row-physmap = <
52		MATRIX_KEY(0x00, 0x02, 0)	/* T1 */
53		MATRIX_KEY(0x03, 0x02, 0)	/* T2 */
54		MATRIX_KEY(0x02, 0x02, 0)	/* T3 */
55		MATRIX_KEY(0x01, 0x02, 0)	/* T4 */
56		MATRIX_KEY(0x03, 0x04, 0)	/* T5 */
57		MATRIX_KEY(0x02, 0x04, 0)	/* T6 */
58		MATRIX_KEY(0x01, 0x04, 0)	/* T7 */
59		MATRIX_KEY(0x02, 0x09, 0)	/* T8 */
60		MATRIX_KEY(0x01, 0x09, 0)	/* T9 */
61		MATRIX_KEY(0x00, 0x04, 0)	/* T10 */
62	>;
63	linux,keymap = <
64		MATRIX_KEY(0x00, 0x02, KEY_BACK)
65		MATRIX_KEY(0x03, 0x02, KEY_REFRESH)
66		MATRIX_KEY(0x02, 0x02, KEY_ZOOM)
67		MATRIX_KEY(0x01, 0x02, KEY_SCALE)
68		MATRIX_KEY(0x03, 0x04, KEY_SYSRQ)
69		MATRIX_KEY(0x02, 0x04, KEY_BRIGHTNESSDOWN)
70		MATRIX_KEY(0x01, 0x04, KEY_BRIGHTNESSUP)
71		MATRIX_KEY(0x02, 0x09, KEY_MUTE)
72		MATRIX_KEY(0x01, 0x09, KEY_VOLUMEDOWN)
73		MATRIX_KEY(0x00, 0x04, KEY_VOLUMEUP)
74		CROS_STD_MAIN_KEYMAP
75	>;
76};
77
78&panel {
79	compatible = "edp-panel";
80};
81
82&pp3300_dx_edp {
83	gpio = <&tlmm 67 GPIO_ACTIVE_HIGH>;
84};
85
86&en_pp3300_dx_edp {
87	pinmux {
88		pins = "gpio67";
89	};
90
91	pinconf {
92		pins = "gpio67";
93	};
94};
95
96/* PINCTRL - board-specific pinctrl */
97
98&tlmm {
99	gpio-line-names = "TP_INT_ODL",
100			  "AP_RAM_ID0",
101			  "AP_SKU_ID2",
102			  "AP_RAM_ID1",
103			  "",
104			  "AP_RAM_ID2",
105			  "AP_TP_I2C_SDA",
106			  "AP_TP_I2C_SCL",
107			  "TS_RESET_L",
108			  "TS_INT_L",
109			  "",
110			  "EDP_BRIJ_IRQ",
111			  "AP_EDP_BKLTEN",
112			  "",
113			  "",
114			  "EDP_BRIJ_I2C_SDA",
115			  "EDP_BRIJ_I2C_SCL",
116			  "HUB_RST_L",
117			  "",
118			  "",
119			  "",
120			  "",
121			  "",
122			  "AMP_EN",
123			  "P_SENSOR_INT_L",
124			  "AP_SAR_SENSOR_SDA",
125			  "AP_SAR_SENSOR_SCL",
126			  "",
127			  "HP_IRQ",
128			  "",
129			  "",
130			  "AP_BRD_ID2",
131			  "BRIJ_SUSPEND",
132			  "AP_BRD_ID0",
133			  "AP_H1_SPI_MISO",
134			  "AP_H1_SPI_MOSI",
135			  "AP_H1_SPI_CLK",
136			  "AP_H1_SPI_CS_L",
137			  "",
138			  "",
139			  "",
140			  "",
141			  "H1_AP_INT_ODL",
142			  "",
143			  "UART_AP_TX_DBG_RX",
144			  "UART_DBG_TX_AP_RX",
145			  "HP_I2C_SDA",
146			  "HP_I2C_SCL",
147			  "FORCED_USB_BOOT",
148			  "AMP_BCLK",
149			  "AMP_LRCLK",
150			  "AMP_DIN",
151			  "",
152			  "HP_BCLK",
153			  "HP_LRCLK",
154			  "HP_DOUT",
155			  "HP_DIN",
156			  "HP_MCLK",
157			  "AP_SKU_ID0",
158			  "AP_EC_SPI_MISO",
159			  "AP_EC_SPI_MOSI",
160			  "AP_EC_SPI_CLK",
161			  "AP_EC_SPI_CS_L",
162			  "AP_SPI_CLK",
163			  "AP_SPI_MOSI",
164			  "AP_SPI_MISO",
165			  /*
166			   * AP_FLASH_WP_L is crossystem ABI. Schematics
167			   * call it BIOS_FLASH_WP_L.
168			   */
169			  "AP_FLASH_WP_L",
170			  "EN_PP3300_DX_EDP",
171			  "AP_SPI_CS0_L",
172			  "",
173			  "",
174			  "",
175			  "",
176			  "",
177			  "",
178			  "UIM2_DATA",
179			  "UIM2_CLK",
180			  "UIM2_RST",
181			  "UIM2_PRESENT",
182			  "UIM1_DATA",
183			  "UIM1_CLK",
184			  "UIM1_RST",
185			  "",
186			  "CODEC_PWR_EN",
187			  "HUB_EN",
188			  "",
189			  "",
190			  "",
191			  "",
192			  "",
193			  "AP_SKU_ID1",
194			  "AP_RST_REQ",
195			  "",
196			  "AP_BRD_ID1",
197			  "AP_EC_INT_L",
198			  "",
199			  "",
200			  "",
201			  "",
202			  "",
203			  "",
204			  "",
205			  "",
206			  "",
207			  "EDP_BRIJ_EN",
208			  "",
209			  "",
210			  "",
211			  "",
212			  "",
213			  "",
214			  "",
215			  "",
216			  "",
217			  "",
218			  "AP_TS_PEN_I2C_SDA",
219			  "AP_TS_PEN_I2C_SCL",
220			  "DP_HOT_PLUG_DET",
221			  "EC_IN_RW_ODL";
222};
223