1 // SPDX-License-Identifier: GPL-2.0
3 * Intel Elkhart Lake PCH pinctrl/GPIO driver
5 * Copyright (C) 2019, Intel Corporation
6 * Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
9 #include <linux/mod_devicetable.h>
10 #include <linux/module.h>
11 #include <linux/platform_device.h>
14 #include <linux/pinctrl/pinctrl.h>
16 #include "pinctrl-intel.h"
18 #define EHL_PAD_OWN 0x020
19 #define EHL_PADCFGLOCK 0x080
20 #define EHL_HOSTSW_OWN 0x0b0
21 #define EHL_GPI_IS 0x100
22 #define EHL_GPI_IE 0x120
24 #define EHL_GPP(r, s, e) \
28 .size = ((e) - (s) + 1), \
31 #define EHL_COMMUNITY(b, s, e, g) \
32 INTEL_COMMUNITY_GPPS(b, s, e, g, EHL)
35 static const struct pinctrl_pin_desc ehl_community0_pins
[] = {
37 PINCTRL_PIN(0, "CORE_VID_0"),
38 PINCTRL_PIN(1, "CORE_VID_1"),
39 PINCTRL_PIN(2, "VRALERTB"),
40 PINCTRL_PIN(3, "CPU_GP_2"),
41 PINCTRL_PIN(4, "CPU_GP_3"),
42 PINCTRL_PIN(5, "OSE_I2C0_SCLK"),
43 PINCTRL_PIN(6, "OSE_I2C0_SDAT"),
44 PINCTRL_PIN(7, "OSE_I2C1_SCLK"),
45 PINCTRL_PIN(8, "OSE_I2C1_SDAT"),
46 PINCTRL_PIN(9, "I2C5_SDA"),
47 PINCTRL_PIN(10, "I2C5_SCL"),
48 PINCTRL_PIN(11, "PMCALERTB"),
49 PINCTRL_PIN(12, "SLP_S0B"),
50 PINCTRL_PIN(13, "PLTRSTB"),
51 PINCTRL_PIN(14, "SPKR"),
52 PINCTRL_PIN(15, "GSPI0_CS0B"),
53 PINCTRL_PIN(16, "GSPI0_CLK"),
54 PINCTRL_PIN(17, "GSPI0_MISO"),
55 PINCTRL_PIN(18, "GSPI0_MOSI"),
56 PINCTRL_PIN(19, "GSPI1_CS0B"),
57 PINCTRL_PIN(20, "GSPI1_CLK"),
58 PINCTRL_PIN(21, "GSPI1_MISO"),
59 PINCTRL_PIN(22, "GSPI1_MOSI"),
60 PINCTRL_PIN(23, "GPPC_B_23"),
61 PINCTRL_PIN(24, "GSPI0_CLK_LOOPBK"),
62 PINCTRL_PIN(25, "GSPI1_CLK_LOOPBK"),
64 PINCTRL_PIN(26, "OSE_QEPA_2"),
65 PINCTRL_PIN(27, "OSE_QEPB_2"),
66 PINCTRL_PIN(28, "OSE_QEPI_2"),
67 PINCTRL_PIN(29, "GPPC_T_3"),
68 PINCTRL_PIN(30, "RGMII0_INT"),
69 PINCTRL_PIN(31, "RGMII0_RESETB"),
70 PINCTRL_PIN(32, "RGMII0_AUXTS"),
71 PINCTRL_PIN(33, "RGMII0_PPS"),
72 PINCTRL_PIN(34, "USB2_OCB_2"),
73 PINCTRL_PIN(35, "OSE_HSUART2_EN"),
74 PINCTRL_PIN(36, "OSE_HSUART2_RE"),
75 PINCTRL_PIN(37, "USB2_OCB_3"),
76 PINCTRL_PIN(38, "OSE_UART2_RXD"),
77 PINCTRL_PIN(39, "OSE_UART2_TXD"),
78 PINCTRL_PIN(40, "OSE_UART2_RTSB"),
79 PINCTRL_PIN(41, "OSE_UART2_CTSB"),
81 PINCTRL_PIN(42, "SD3_CMD"),
82 PINCTRL_PIN(43, "SD3_D0"),
83 PINCTRL_PIN(44, "SD3_D1"),
84 PINCTRL_PIN(45, "SD3_D2"),
85 PINCTRL_PIN(46, "SD3_D3"),
86 PINCTRL_PIN(47, "SD3_CDB"),
87 PINCTRL_PIN(48, "SD3_CLK"),
88 PINCTRL_PIN(49, "I2S2_SCLK"),
89 PINCTRL_PIN(50, "I2S2_SFRM"),
90 PINCTRL_PIN(51, "I2S2_TXD"),
91 PINCTRL_PIN(52, "I2S2_RXD"),
92 PINCTRL_PIN(53, "I2S3_SCLK"),
93 PINCTRL_PIN(54, "I2S3_SFRM"),
94 PINCTRL_PIN(55, "I2S3_TXD"),
95 PINCTRL_PIN(56, "I2S3_RXD"),
96 PINCTRL_PIN(57, "ESPI_IO_0"),
97 PINCTRL_PIN(58, "ESPI_IO_1"),
98 PINCTRL_PIN(59, "ESPI_IO_2"),
99 PINCTRL_PIN(60, "ESPI_IO_3"),
100 PINCTRL_PIN(61, "I2S1_SCLK"),
101 PINCTRL_PIN(62, "ESPI_CSB"),
102 PINCTRL_PIN(63, "ESPI_CLK"),
103 PINCTRL_PIN(64, "ESPI_RESETB"),
104 PINCTRL_PIN(65, "SD3_WP"),
105 PINCTRL_PIN(66, "ESPI_CLK_LOOPBK"),
108 static const struct intel_padgroup ehl_community0_gpps
[] = {
109 EHL_GPP(0, 0, 25), /* GPP_B */
110 EHL_GPP(1, 26, 41), /* GPP_T */
111 EHL_GPP(2, 42, 66), /* GPP_G */
114 static const struct intel_community ehl_community0
[] = {
115 EHL_COMMUNITY(0, 0, 66, ehl_community0_gpps
),
118 static const struct intel_pinctrl_soc_data ehl_community0_soc_data
= {
120 .pins
= ehl_community0_pins
,
121 .npins
= ARRAY_SIZE(ehl_community0_pins
),
122 .communities
= ehl_community0
,
123 .ncommunities
= ARRAY_SIZE(ehl_community0
),
126 static const struct pinctrl_pin_desc ehl_community1_pins
[] = {
128 PINCTRL_PIN(0, "EMMC_CMD"),
129 PINCTRL_PIN(1, "EMMC_DATA0"),
130 PINCTRL_PIN(2, "EMMC_DATA1"),
131 PINCTRL_PIN(3, "EMMC_DATA2"),
132 PINCTRL_PIN(4, "EMMC_DATA3"),
133 PINCTRL_PIN(5, "EMMC_DATA4"),
134 PINCTRL_PIN(6, "EMMC_DATA5"),
135 PINCTRL_PIN(7, "EMMC_DATA6"),
136 PINCTRL_PIN(8, "EMMC_DATA7"),
137 PINCTRL_PIN(9, "EMMC_RCLK"),
138 PINCTRL_PIN(10, "EMMC_CLK"),
139 PINCTRL_PIN(11, "EMMC_RESETB"),
140 PINCTRL_PIN(12, "OSE_TGPIO0"),
141 PINCTRL_PIN(13, "OSE_TGPIO1"),
142 PINCTRL_PIN(14, "OSE_TGPIO2"),
143 PINCTRL_PIN(15, "OSE_TGPIO3"),
145 PINCTRL_PIN(16, "RGMII1_INT"),
146 PINCTRL_PIN(17, "RGMII1_RESETB"),
147 PINCTRL_PIN(18, "RGMII1_AUXTS"),
148 PINCTRL_PIN(19, "RGMII1_PPS"),
149 PINCTRL_PIN(20, "I2C2_SDA"),
150 PINCTRL_PIN(21, "I2C2_SCL"),
151 PINCTRL_PIN(22, "I2C3_SDA"),
152 PINCTRL_PIN(23, "I2C3_SCL"),
153 PINCTRL_PIN(24, "I2C4_SDA"),
154 PINCTRL_PIN(25, "I2C4_SCL"),
155 PINCTRL_PIN(26, "SRCCLKREQB_4"),
156 PINCTRL_PIN(27, "SRCCLKREQB_5"),
157 PINCTRL_PIN(28, "OSE_UART1_RXD"),
158 PINCTRL_PIN(29, "OSE_UART1_TXD"),
159 PINCTRL_PIN(30, "GPPC_H_14"),
160 PINCTRL_PIN(31, "OSE_UART1_CTSB"),
161 PINCTRL_PIN(32, "PCIE_LNK_DOWN"),
162 PINCTRL_PIN(33, "SD_PWR_EN_B"),
163 PINCTRL_PIN(34, "CPU_C10_GATEB"),
164 PINCTRL_PIN(35, "GPPC_H_19"),
165 PINCTRL_PIN(36, "OSE_PWM7"),
166 PINCTRL_PIN(37, "OSE_HSUART1_DE"),
167 PINCTRL_PIN(38, "OSE_HSUART1_RE"),
168 PINCTRL_PIN(39, "OSE_HSUART1_EN"),
170 PINCTRL_PIN(40, "OSE_QEPA_0"),
171 PINCTRL_PIN(41, "OSE_QEPB_0"),
172 PINCTRL_PIN(42, "OSE_QEPI_0"),
173 PINCTRL_PIN(43, "OSE_PWM6"),
174 PINCTRL_PIN(44, "OSE_PWM2"),
175 PINCTRL_PIN(45, "SRCCLKREQB_0"),
176 PINCTRL_PIN(46, "SRCCLKREQB_1"),
177 PINCTRL_PIN(47, "SRCCLKREQB_2"),
178 PINCTRL_PIN(48, "SRCCLKREQB_3"),
179 PINCTRL_PIN(49, "OSE_SPI0_CSB"),
180 PINCTRL_PIN(50, "OSE_SPI0_SCLK"),
181 PINCTRL_PIN(51, "OSE_SPI0_MISO"),
182 PINCTRL_PIN(52, "OSE_SPI0_MOSI"),
183 PINCTRL_PIN(53, "OSE_QEPA_1"),
184 PINCTRL_PIN(54, "OSE_QEPB_1"),
185 PINCTRL_PIN(55, "OSE_PWM3"),
186 PINCTRL_PIN(56, "OSE_QEPI_1"),
187 PINCTRL_PIN(57, "OSE_PWM4"),
188 PINCTRL_PIN(58, "OSE_PWM5"),
189 PINCTRL_PIN(59, "I2S_MCLK1_OUT"),
190 PINCTRL_PIN(60, "GSPI2_CLK_LOOPBK"),
192 PINCTRL_PIN(61, "RGMII2_INT"),
193 PINCTRL_PIN(62, "RGMII2_RESETB"),
194 PINCTRL_PIN(63, "RGMII2_PPS"),
195 PINCTRL_PIN(64, "RGMII2_AUXTS"),
196 PINCTRL_PIN(65, "ISI_SPIM_CS"),
197 PINCTRL_PIN(66, "ISI_SPIM_SCLK"),
198 PINCTRL_PIN(67, "ISI_SPIM_MISO"),
199 PINCTRL_PIN(68, "OSE_QEPA_3"),
200 PINCTRL_PIN(69, "ISI_SPIS_CS"),
201 PINCTRL_PIN(70, "ISI_SPIS_SCLK"),
202 PINCTRL_PIN(71, "ISI_SPIS_MISO"),
203 PINCTRL_PIN(72, "OSE_QEPB_3"),
204 PINCTRL_PIN(73, "ISI_CHX_OKNOK_0"),
205 PINCTRL_PIN(74, "ISI_CHX_OKNOK_1"),
206 PINCTRL_PIN(75, "ISI_CHX_RLY_SWTCH"),
207 PINCTRL_PIN(76, "ISI_CHX_PMIC_EN"),
208 PINCTRL_PIN(77, "ISI_OKNOK_0"),
209 PINCTRL_PIN(78, "ISI_OKNOK_1"),
210 PINCTRL_PIN(79, "ISI_ALERT"),
211 PINCTRL_PIN(80, "OSE_QEPI_3"),
212 PINCTRL_PIN(81, "GSPI3_CLK_LOOPBK"),
213 PINCTRL_PIN(82, "GSPI4_CLK_LOOPBK"),
214 PINCTRL_PIN(83, "GSPI5_CLK_LOOPBK"),
215 PINCTRL_PIN(84, "GSPI6_CLK_LOOPBK"),
217 PINCTRL_PIN(85, "CNV_BTEN"),
218 PINCTRL_PIN(86, "CNV_BT_HOST_WAKEB"),
219 PINCTRL_PIN(87, "CNV_BT_IF_SELECT"),
220 PINCTRL_PIN(88, "vCNV_BT_UART_TXD"),
221 PINCTRL_PIN(89, "vCNV_BT_UART_RXD"),
222 PINCTRL_PIN(90, "vCNV_BT_UART_CTS_B"),
223 PINCTRL_PIN(91, "vCNV_BT_UART_RTS_B"),
224 PINCTRL_PIN(92, "vCNV_MFUART1_TXD"),
225 PINCTRL_PIN(93, "vCNV_MFUART1_RXD"),
226 PINCTRL_PIN(94, "vCNV_MFUART1_CTS_B"),
227 PINCTRL_PIN(95, "vCNV_MFUART1_RTS_B"),
228 PINCTRL_PIN(96, "vUART0_TXD"),
229 PINCTRL_PIN(97, "vUART0_RXD"),
230 PINCTRL_PIN(98, "vUART0_CTS_B"),
231 PINCTRL_PIN(99, "vUART0_RTS_B"),
232 PINCTRL_PIN(100, "vOSE_UART0_TXD"),
233 PINCTRL_PIN(101, "vOSE_UART0_RXD"),
234 PINCTRL_PIN(102, "vOSE_UART0_CTS_B"),
235 PINCTRL_PIN(103, "vOSE_UART0_RTS_B"),
236 PINCTRL_PIN(104, "vCNV_BT_I2S_BCLK"),
237 PINCTRL_PIN(105, "vCNV_BT_I2S_WS_SYNC"),
238 PINCTRL_PIN(106, "vCNV_BT_I2S_SDO"),
239 PINCTRL_PIN(107, "vCNV_BT_I2S_SDI"),
240 PINCTRL_PIN(108, "vI2S2_SCLK"),
241 PINCTRL_PIN(109, "vI2S2_SFRM"),
242 PINCTRL_PIN(110, "vI2S2_TXD"),
243 PINCTRL_PIN(111, "vI2S2_RXD"),
244 PINCTRL_PIN(112, "vSD3_CD_B"),
247 static const struct intel_padgroup ehl_community1_gpps
[] = {
248 EHL_GPP(0, 0, 15), /* GPP_V */
249 EHL_GPP(1, 16, 39), /* GPP_H */
250 EHL_GPP(2, 40, 60), /* GPP_D */
251 EHL_GPP(3, 61, 84), /* GPP_U */
252 EHL_GPP(4, 85, 112), /* vGPIO */
255 static const struct intel_community ehl_community1
[] = {
256 EHL_COMMUNITY(0, 0, 112, ehl_community1_gpps
),
259 static const struct intel_pinctrl_soc_data ehl_community1_soc_data
= {
261 .pins
= ehl_community1_pins
,
262 .npins
= ARRAY_SIZE(ehl_community1_pins
),
263 .communities
= ehl_community1
,
264 .ncommunities
= ARRAY_SIZE(ehl_community1
),
267 static const struct pinctrl_pin_desc ehl_community2_pins
[] = {
269 PINCTRL_PIN(0, "BATLOWB"),
270 PINCTRL_PIN(1, "ACPRESENT"),
271 PINCTRL_PIN(2, "LAN_WAKEB"),
272 PINCTRL_PIN(3, "PWRBTNB"),
273 PINCTRL_PIN(4, "SLP_S3B"),
274 PINCTRL_PIN(5, "SLP_S4B"),
275 PINCTRL_PIN(6, "SLP_AB"),
276 PINCTRL_PIN(7, "GPD_7"),
277 PINCTRL_PIN(8, "SUSCLK"),
278 PINCTRL_PIN(9, "SLP_WLANB"),
279 PINCTRL_PIN(10, "SLP_S5B"),
280 PINCTRL_PIN(11, "LANPHYPC"),
281 PINCTRL_PIN(12, "INPUT3VSEL"),
282 PINCTRL_PIN(13, "SLP_LANB"),
283 PINCTRL_PIN(14, "SLP_SUSB"),
284 PINCTRL_PIN(15, "WAKEB"),
285 PINCTRL_PIN(16, "DRAM_RESETB"),
288 static const struct intel_padgroup ehl_community2_gpps
[] = {
289 EHL_GPP(0, 0, 16), /* DSW */
292 static const struct intel_community ehl_community2
[] = {
293 EHL_COMMUNITY(0, 0, 16, ehl_community2_gpps
),
296 static const struct intel_pinctrl_soc_data ehl_community2_soc_data
= {
298 .pins
= ehl_community2_pins
,
299 .npins
= ARRAY_SIZE(ehl_community2_pins
),
300 .communities
= ehl_community2
,
301 .ncommunities
= ARRAY_SIZE(ehl_community2
),
304 static const struct pinctrl_pin_desc ehl_community3_pins
[] = {
306 PINCTRL_PIN(0, "HDACPU_SDI"),
307 PINCTRL_PIN(1, "HDACPU_SDO"),
308 PINCTRL_PIN(2, "HDACPU_BCLK"),
309 PINCTRL_PIN(3, "PM_SYNC"),
310 PINCTRL_PIN(4, "PECI"),
311 PINCTRL_PIN(5, "CPUPWRGD"),
312 PINCTRL_PIN(6, "THRMTRIPB"),
313 PINCTRL_PIN(7, "PLTRST_CPUB"),
314 PINCTRL_PIN(8, "PM_DOWN"),
315 PINCTRL_PIN(9, "TRIGGER_IN"),
316 PINCTRL_PIN(10, "TRIGGER_OUT"),
317 PINCTRL_PIN(11, "UFS_RESETB"),
318 PINCTRL_PIN(12, "CLKOUT_CPURTC"),
319 PINCTRL_PIN(13, "VCCST_OVERRIDE"),
320 PINCTRL_PIN(14, "C10_WAKE"),
321 PINCTRL_PIN(15, "PROCHOTB"),
322 PINCTRL_PIN(16, "CATERRB"),
324 PINCTRL_PIN(17, "UFS_REF_CLK_0"),
325 PINCTRL_PIN(18, "UFS_REF_CLK_1"),
327 PINCTRL_PIN(19, "RGMII0_TXDATA_3"),
328 PINCTRL_PIN(20, "RGMII0_TXDATA_2"),
329 PINCTRL_PIN(21, "RGMII0_TXDATA_1"),
330 PINCTRL_PIN(22, "RGMII0_TXDATA_0"),
331 PINCTRL_PIN(23, "RGMII0_TXCLK"),
332 PINCTRL_PIN(24, "RGMII0_TXCTL"),
333 PINCTRL_PIN(25, "RGMII0_RXCLK"),
334 PINCTRL_PIN(26, "RGMII0_RXDATA_3"),
335 PINCTRL_PIN(27, "RGMII0_RXDATA_2"),
336 PINCTRL_PIN(28, "RGMII0_RXDATA_1"),
337 PINCTRL_PIN(29, "RGMII0_RXDATA_0"),
338 PINCTRL_PIN(30, "RGMII1_TXDATA_3"),
339 PINCTRL_PIN(31, "RGMII1_TXDATA_2"),
340 PINCTRL_PIN(32, "RGMII1_TXDATA_1"),
341 PINCTRL_PIN(33, "RGMII1_TXDATA_0"),
342 PINCTRL_PIN(34, "RGMII1_TXCLK"),
343 PINCTRL_PIN(35, "RGMII1_TXCTL"),
344 PINCTRL_PIN(36, "RGMII1_RXCLK"),
345 PINCTRL_PIN(37, "RGMII1_RXCTL"),
346 PINCTRL_PIN(38, "RGMII1_RXDATA_3"),
347 PINCTRL_PIN(39, "RGMII1_RXDATA_2"),
348 PINCTRL_PIN(40, "RGMII1_RXDATA_1"),
349 PINCTRL_PIN(41, "RGMII1_RXDATA_0"),
350 PINCTRL_PIN(42, "RGMII0_RXCTL"),
352 PINCTRL_PIN(43, "ESPI_USB_OCB_0"),
353 PINCTRL_PIN(44, "ESPI_USB_OCB_1"),
354 PINCTRL_PIN(45, "ESPI_USB_OCB_2"),
355 PINCTRL_PIN(46, "ESPI_USB_OCB_3"),
358 static const struct intel_padgroup ehl_community3_gpps
[] = {
359 EHL_GPP(0, 0, 16), /* CPU */
360 EHL_GPP(1, 17, 18), /* GPP_S */
361 EHL_GPP(2, 19, 42), /* GPP_A */
362 EHL_GPP(3, 43, 46), /* vGPIO_3 */
365 static const struct intel_community ehl_community3
[] = {
366 EHL_COMMUNITY(0, 0, 46, ehl_community3_gpps
),
369 static const struct intel_pinctrl_soc_data ehl_community3_soc_data
= {
371 .pins
= ehl_community3_pins
,
372 .npins
= ARRAY_SIZE(ehl_community3_pins
),
373 .communities
= ehl_community3
,
374 .ncommunities
= ARRAY_SIZE(ehl_community3
),
377 static const struct pinctrl_pin_desc ehl_community4_pins
[] = {
379 PINCTRL_PIN(0, "SMBCLK"),
380 PINCTRL_PIN(1, "SMBDATA"),
381 PINCTRL_PIN(2, "OSE_PWM0"),
382 PINCTRL_PIN(3, "RGMII0_MDC"),
383 PINCTRL_PIN(4, "RGMII0_MDIO"),
384 PINCTRL_PIN(5, "OSE_PWM1"),
385 PINCTRL_PIN(6, "RGMII1_MDC"),
386 PINCTRL_PIN(7, "RGMII1_MDIO"),
387 PINCTRL_PIN(8, "OSE_TGPIO4"),
388 PINCTRL_PIN(9, "OSE_HSUART0_EN"),
389 PINCTRL_PIN(10, "OSE_TGPIO5"),
390 PINCTRL_PIN(11, "OSE_HSUART0_RE"),
391 PINCTRL_PIN(12, "OSE_UART0_RXD"),
392 PINCTRL_PIN(13, "OSE_UART0_TXD"),
393 PINCTRL_PIN(14, "OSE_UART0_RTSB"),
394 PINCTRL_PIN(15, "OSE_UART0_CTSB"),
395 PINCTRL_PIN(16, "RGMII2_MDIO"),
396 PINCTRL_PIN(17, "RGMII2_MDC"),
397 PINCTRL_PIN(18, "OSE_I2C4_SDAT"),
398 PINCTRL_PIN(19, "OSE_I2C4_SCLK"),
399 PINCTRL_PIN(20, "OSE_UART4_RXD"),
400 PINCTRL_PIN(21, "OSE_UART4_TXD"),
401 PINCTRL_PIN(22, "OSE_UART4_RTSB"),
402 PINCTRL_PIN(23, "OSE_UART4_CTSB"),
404 PINCTRL_PIN(24, "CNV_BRI_DT"),
405 PINCTRL_PIN(25, "CNV_BRI_RSP"),
406 PINCTRL_PIN(26, "CNV_RGI_DT"),
407 PINCTRL_PIN(27, "CNV_RGI_RSP"),
408 PINCTRL_PIN(28, "CNV_RF_RESET_B"),
409 PINCTRL_PIN(29, "EMMC_HIP_MON"),
410 PINCTRL_PIN(30, "CNV_PA_BLANKING"),
411 PINCTRL_PIN(31, "OSE_I2S1_SCLK"),
412 PINCTRL_PIN(32, "I2S_MCLK2_INOUT"),
413 PINCTRL_PIN(33, "BOOTMPC"),
414 PINCTRL_PIN(34, "OSE_I2S1_SFRM"),
415 PINCTRL_PIN(35, "GPPC_F_11"),
416 PINCTRL_PIN(36, "GSXDOUT"),
417 PINCTRL_PIN(37, "GSXSLOAD"),
418 PINCTRL_PIN(38, "GSXDIN"),
419 PINCTRL_PIN(39, "GSXSRESETB"),
420 PINCTRL_PIN(40, "GSXCLK"),
421 PINCTRL_PIN(41, "GPPC_F_17"),
422 PINCTRL_PIN(42, "OSE_I2S1_TXD"),
423 PINCTRL_PIN(43, "OSE_I2S1_RXD"),
424 PINCTRL_PIN(44, "EXT_PWR_GATEB"),
425 PINCTRL_PIN(45, "EXT_PWR_GATE2B"),
426 PINCTRL_PIN(46, "VNN_CTRL"),
427 PINCTRL_PIN(47, "V1P05_CTRL"),
428 PINCTRL_PIN(48, "GPPF_CLK_LOOPBACK"),
430 PINCTRL_PIN(49, "L_BKLTEN"),
431 PINCTRL_PIN(50, "L_BKLTCTL"),
432 PINCTRL_PIN(51, "L_VDDEN"),
433 PINCTRL_PIN(52, "SYS_PWROK"),
434 PINCTRL_PIN(53, "SYS_RESETB"),
435 PINCTRL_PIN(54, "MLK_RSTB"),
437 PINCTRL_PIN(55, "SATA_LEDB"),
438 PINCTRL_PIN(56, "GPPC_E_1"),
439 PINCTRL_PIN(57, "GPPC_E_2"),
440 PINCTRL_PIN(58, "DDSP_HPD_B"),
441 PINCTRL_PIN(59, "SATA_DEVSLP_0"),
442 PINCTRL_PIN(60, "DDPB_CTRLDATA"),
443 PINCTRL_PIN(61, "GPPC_E_6"),
444 PINCTRL_PIN(62, "DDPB_CTRLCLK"),
445 PINCTRL_PIN(63, "GPPC_E_8"),
446 PINCTRL_PIN(64, "USB2_OCB_0"),
447 PINCTRL_PIN(65, "GPPC_E_10"),
448 PINCTRL_PIN(66, "GPPC_E_11"),
449 PINCTRL_PIN(67, "GPPC_E_12"),
450 PINCTRL_PIN(68, "GPPC_E_13"),
451 PINCTRL_PIN(69, "DDSP_HPD_A"),
452 PINCTRL_PIN(70, "OSE_I2S0_RXD"),
453 PINCTRL_PIN(71, "OSE_I2S0_TXD"),
454 PINCTRL_PIN(72, "DDSP_HPD_C"),
455 PINCTRL_PIN(73, "DDPA_CTRLDATA"),
456 PINCTRL_PIN(74, "DDPA_CTRLCLK"),
457 PINCTRL_PIN(75, "OSE_I2S0_SCLK"),
458 PINCTRL_PIN(76, "OSE_I2S0_SFRM"),
459 PINCTRL_PIN(77, "DDPC_CTRLDATA"),
460 PINCTRL_PIN(78, "DDPC_CTRLCLK"),
461 PINCTRL_PIN(79, "SPI1_CLK_LOOPBK"),
464 static const struct intel_padgroup ehl_community4_gpps
[] = {
465 EHL_GPP(0, 0, 23), /* GPP_C */
466 EHL_GPP(1, 24, 48), /* GPP_F */
467 EHL_GPP(2, 49, 54), /* HVCMOS */
468 EHL_GPP(3, 55, 79), /* GPP_E */
471 static const struct intel_community ehl_community4
[] = {
472 EHL_COMMUNITY(0, 0, 79, ehl_community4_gpps
),
475 static const struct intel_pinctrl_soc_data ehl_community4_soc_data
= {
477 .pins
= ehl_community4_pins
,
478 .npins
= ARRAY_SIZE(ehl_community4_pins
),
479 .communities
= ehl_community4
,
480 .ncommunities
= ARRAY_SIZE(ehl_community4
),
483 static const struct pinctrl_pin_desc ehl_community5_pins
[] = {
485 PINCTRL_PIN(0, "HDA_BCLK"),
486 PINCTRL_PIN(1, "HDA_SYNC"),
487 PINCTRL_PIN(2, "HDA_SDO"),
488 PINCTRL_PIN(3, "HDA_SDI_0"),
489 PINCTRL_PIN(4, "HDA_RSTB"),
490 PINCTRL_PIN(5, "HDA_SDI_1"),
491 PINCTRL_PIN(6, "GPP_R_6"),
492 PINCTRL_PIN(7, "GPP_R_7"),
495 static const struct intel_padgroup ehl_community5_gpps
[] = {
496 EHL_GPP(0, 0, 7), /* GPP_R */
499 static const struct intel_community ehl_community5
[] = {
500 EHL_COMMUNITY(0, 0, 7, ehl_community5_gpps
),
503 static const struct intel_pinctrl_soc_data ehl_community5_soc_data
= {
505 .pins
= ehl_community5_pins
,
506 .npins
= ARRAY_SIZE(ehl_community5_pins
),
507 .communities
= ehl_community5
,
508 .ncommunities
= ARRAY_SIZE(ehl_community5
),
511 static const struct intel_pinctrl_soc_data
*ehl_soc_data_array
[] = {
512 &ehl_community0_soc_data
,
513 &ehl_community1_soc_data
,
514 &ehl_community2_soc_data
,
515 &ehl_community3_soc_data
,
516 &ehl_community4_soc_data
,
517 &ehl_community5_soc_data
,
521 static const struct acpi_device_id ehl_pinctrl_acpi_match
[] = {
522 { "INTC1020", (kernel_ulong_t
)ehl_soc_data_array
},
525 MODULE_DEVICE_TABLE(acpi
, ehl_pinctrl_acpi_match
);
527 static struct platform_driver ehl_pinctrl_driver
= {
528 .probe
= intel_pinctrl_probe_by_uid
,
530 .name
= "elkhartlake-pinctrl",
531 .acpi_match_table
= ehl_pinctrl_acpi_match
,
532 .pm
= pm_sleep_ptr(&intel_pinctrl_pm_ops
),
535 module_platform_driver(ehl_pinctrl_driver
);
537 MODULE_AUTHOR("Andy Shevchenko <andriy.shevchenko@linux.intel.com>");
538 MODULE_DESCRIPTION("Intel Elkhart Lake PCH pinctrl/GPIO driver");
539 MODULE_LICENSE("GPL v2");
540 MODULE_IMPORT_NS("PINCTRL_INTEL");