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		vdd-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	pins = "gpio67";
88};
89
90/* PINCTRL - board-specific pinctrl */
91
92&tlmm {
93	gpio-line-names = "TP_INT_ODL",
94			  "AP_RAM_ID0",
95			  "AP_SKU_ID2",
96			  "AP_RAM_ID1",
97			  "",
98			  "AP_RAM_ID2",
99			  "AP_TP_I2C_SDA",
100			  "AP_TP_I2C_SCL",
101			  "TS_RESET_L",
102			  "TS_INT_L",
103			  "",
104			  "EDP_BRIJ_IRQ",
105			  "AP_EDP_BKLTEN",
106			  "",
107			  "",
108			  "EDP_BRIJ_I2C_SDA",
109			  "EDP_BRIJ_I2C_SCL",
110			  "HUB_RST_L",
111			  "",
112			  "",
113			  "",
114			  "",
115			  "",
116			  "AMP_EN",
117			  "P_SENSOR_INT_L",
118			  "AP_SAR_SENSOR_SDA",
119			  "AP_SAR_SENSOR_SCL",
120			  "",
121			  "HP_IRQ",
122			  "",
123			  "",
124			  "AP_BRD_ID2",
125			  "BRIJ_SUSPEND",
126			  "AP_BRD_ID0",
127			  "AP_H1_SPI_MISO",
128			  "AP_H1_SPI_MOSI",
129			  "AP_H1_SPI_CLK",
130			  "AP_H1_SPI_CS_L",
131			  "",
132			  "",
133			  "",
134			  "",
135			  "H1_AP_INT_ODL",
136			  "",
137			  "UART_AP_TX_DBG_RX",
138			  "UART_DBG_TX_AP_RX",
139			  "HP_I2C_SDA",
140			  "HP_I2C_SCL",
141			  "FORCED_USB_BOOT",
142			  "AMP_BCLK",
143			  "AMP_LRCLK",
144			  "AMP_DIN",
145			  "",
146			  "HP_BCLK",
147			  "HP_LRCLK",
148			  "HP_DOUT",
149			  "HP_DIN",
150			  "HP_MCLK",
151			  "AP_SKU_ID0",
152			  "AP_EC_SPI_MISO",
153			  "AP_EC_SPI_MOSI",
154			  "AP_EC_SPI_CLK",
155			  "AP_EC_SPI_CS_L",
156			  "AP_SPI_CLK",
157			  "AP_SPI_MOSI",
158			  "AP_SPI_MISO",
159			  /*
160			   * AP_FLASH_WP_L is crossystem ABI. Schematics
161			   * call it BIOS_FLASH_WP_L.
162			   */
163			  "AP_FLASH_WP_L",
164			  "EN_PP3300_DX_EDP",
165			  "AP_SPI_CS0_L",
166			  "",
167			  "",
168			  "",
169			  "",
170			  "",
171			  "",
172			  "UIM2_DATA",
173			  "UIM2_CLK",
174			  "UIM2_RST",
175			  "UIM2_PRESENT",
176			  "UIM1_DATA",
177			  "UIM1_CLK",
178			  "UIM1_RST",
179			  "",
180			  "CODEC_PWR_EN",
181			  "HUB_EN",
182			  "",
183			  "",
184			  "",
185			  "",
186			  "",
187			  "AP_SKU_ID1",
188			  "AP_RST_REQ",
189			  "",
190			  "AP_BRD_ID1",
191			  "AP_EC_INT_L",
192			  "",
193			  "",
194			  "",
195			  "",
196			  "",
197			  "",
198			  "",
199			  "",
200			  "",
201			  "EDP_BRIJ_EN",
202			  "",
203			  "",
204			  "",
205			  "",
206			  "",
207			  "",
208			  "",
209			  "",
210			  "",
211			  "",
212			  "AP_TS_PEN_I2C_SDA",
213			  "AP_TS_PEN_I2C_SCL",
214			  "DP_HOT_PLUG_DET",
215			  "EC_IN_RW_ODL";
216};
217