xref: /openbmc/linux/drivers/pinctrl/intel/pinctrl-cannonlake.c (revision c900529f3d9161bfde5cca0754f83b4d3c3e0220)
1875a92b3SAndy Shevchenko // SPDX-License-Identifier: GPL-2.0
219a8a777SMika Westerberg /*
319a8a777SMika Westerberg  * Intel Cannon Lake PCH pinctrl/GPIO driver
419a8a777SMika Westerberg  *
519a8a777SMika Westerberg  * Copyright (C) 2017, Intel Corporation
6a663ccf0SMika Westerberg  * Authors: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
7a663ccf0SMika Westerberg  *          Mika Westerberg <mika.westerberg@linux.intel.com>
819a8a777SMika Westerberg  */
919a8a777SMika Westerberg 
10c98a9667SAndy Shevchenko #include <linux/mod_devicetable.h>
1119a8a777SMika Westerberg #include <linux/module.h>
1219a8a777SMika Westerberg #include <linux/platform_device.h>
13c98a9667SAndy Shevchenko 
1419a8a777SMika Westerberg #include <linux/pinctrl/pinctrl.h>
1519a8a777SMika Westerberg 
1619a8a777SMika Westerberg #include "pinctrl-intel.h"
1719a8a777SMika Westerberg 
1831044d8eSAndy Shevchenko #define CNL_LP_PAD_OWN		0x020
1931044d8eSAndy Shevchenko #define CNL_LP_PADCFGLOCK	0x080
20e50d95e2SMika Westerberg #define CNL_LP_HOSTSW_OWN	0x0b0
2131044d8eSAndy Shevchenko #define CNL_LP_GPI_IS		0x100
2231044d8eSAndy Shevchenko #define CNL_LP_GPI_IE		0x120
2331044d8eSAndy Shevchenko 
2431044d8eSAndy Shevchenko #define CNL_H_PAD_OWN		0x020
2531044d8eSAndy Shevchenko #define CNL_H_PADCFGLOCK	0x080
26e50d95e2SMika Westerberg #define CNL_H_HOSTSW_OWN	0x0c0
2731044d8eSAndy Shevchenko #define CNL_H_GPI_IS		0x100
2831044d8eSAndy Shevchenko #define CNL_H_GPI_IE		0x120
2919a8a777SMika Westerberg 
30cb5fda41SMika Westerberg #define CNL_GPP(r, s, e, g)				\
3119a8a777SMika Westerberg 	{						\
3219a8a777SMika Westerberg 		.reg_num = (r),				\
3319a8a777SMika Westerberg 		.base = (s),				\
3419a8a777SMika Westerberg 		.size = ((e) - (s) + 1),		\
35cb5fda41SMika Westerberg 		.gpio_base = (g),			\
3619a8a777SMika Westerberg 	}
3719a8a777SMika Westerberg 
38701372c7SAndy Shevchenko #define CNL_LP_COMMUNITY(b, s, e, g)			\
3931044d8eSAndy Shevchenko 	INTEL_COMMUNITY_GPPS(b, s, e, g, CNL_LP)
40e50d95e2SMika Westerberg 
41701372c7SAndy Shevchenko #define CNL_H_COMMUNITY(b, s, e, g)			\
4231044d8eSAndy Shevchenko 	INTEL_COMMUNITY_GPPS(b, s, e, g, CNL_H)
43e50d95e2SMika Westerberg 
44a663ccf0SMika Westerberg /* Cannon Lake-H */
45a663ccf0SMika Westerberg static const struct pinctrl_pin_desc cnlh_pins[] = {
46a663ccf0SMika Westerberg 	/* GPP_A */
47a663ccf0SMika Westerberg 	PINCTRL_PIN(0, "RCINB"),
48a663ccf0SMika Westerberg 	PINCTRL_PIN(1, "LAD_0"),
49a663ccf0SMika Westerberg 	PINCTRL_PIN(2, "LAD_1"),
50a663ccf0SMika Westerberg 	PINCTRL_PIN(3, "LAD_2"),
51a663ccf0SMika Westerberg 	PINCTRL_PIN(4, "LAD_3"),
52a663ccf0SMika Westerberg 	PINCTRL_PIN(5, "LFRAMEB"),
53a663ccf0SMika Westerberg 	PINCTRL_PIN(6, "SERIRQ"),
54a663ccf0SMika Westerberg 	PINCTRL_PIN(7, "PIRQAB"),
55a663ccf0SMika Westerberg 	PINCTRL_PIN(8, "CLKRUNB"),
56a663ccf0SMika Westerberg 	PINCTRL_PIN(9, "CLKOUT_LPC_0"),
57a663ccf0SMika Westerberg 	PINCTRL_PIN(10, "CLKOUT_LPC_1"),
58a663ccf0SMika Westerberg 	PINCTRL_PIN(11, "PMEB"),
59a663ccf0SMika Westerberg 	PINCTRL_PIN(12, "BM_BUSYB"),
60a663ccf0SMika Westerberg 	PINCTRL_PIN(13, "SUSWARNB_SUSPWRDNACK"),
61a663ccf0SMika Westerberg 	PINCTRL_PIN(14, "SUS_STATB"),
62a663ccf0SMika Westerberg 	PINCTRL_PIN(15, "SUSACKB"),
63a663ccf0SMika Westerberg 	PINCTRL_PIN(16, "CLKOUT_48"),
64a663ccf0SMika Westerberg 	PINCTRL_PIN(17, "SD_VDD1_PWR_EN_B"),
65a663ccf0SMika Westerberg 	PINCTRL_PIN(18, "ISH_GP_0"),
66a663ccf0SMika Westerberg 	PINCTRL_PIN(19, "ISH_GP_1"),
67a663ccf0SMika Westerberg 	PINCTRL_PIN(20, "ISH_GP_2"),
68a663ccf0SMika Westerberg 	PINCTRL_PIN(21, "ISH_GP_3"),
69a663ccf0SMika Westerberg 	PINCTRL_PIN(22, "ISH_GP_4"),
70a663ccf0SMika Westerberg 	PINCTRL_PIN(23, "ISH_GP_5"),
71a663ccf0SMika Westerberg 	PINCTRL_PIN(24, "ESPI_CLK_LOOPBK"),
72a663ccf0SMika Westerberg 	/* GPP_B */
73a663ccf0SMika Westerberg 	PINCTRL_PIN(25, "GSPI0_CS1B"),
74a663ccf0SMika Westerberg 	PINCTRL_PIN(26, "GSPI1_CS1B"),
75a663ccf0SMika Westerberg 	PINCTRL_PIN(27, "VRALERTB"),
76a663ccf0SMika Westerberg 	PINCTRL_PIN(28, "CPU_GP_2"),
77a663ccf0SMika Westerberg 	PINCTRL_PIN(29, "CPU_GP_3"),
78a663ccf0SMika Westerberg 	PINCTRL_PIN(30, "SRCCLKREQB_0"),
79a663ccf0SMika Westerberg 	PINCTRL_PIN(31, "SRCCLKREQB_1"),
80a663ccf0SMika Westerberg 	PINCTRL_PIN(32, "SRCCLKREQB_2"),
81a663ccf0SMika Westerberg 	PINCTRL_PIN(33, "SRCCLKREQB_3"),
82a663ccf0SMika Westerberg 	PINCTRL_PIN(34, "SRCCLKREQB_4"),
83a663ccf0SMika Westerberg 	PINCTRL_PIN(35, "SRCCLKREQB_5"),
84a663ccf0SMika Westerberg 	PINCTRL_PIN(36, "SSP_MCLK"),
85a663ccf0SMika Westerberg 	PINCTRL_PIN(37, "SLP_S0B"),
86a663ccf0SMika Westerberg 	PINCTRL_PIN(38, "PLTRSTB"),
87a663ccf0SMika Westerberg 	PINCTRL_PIN(39, "SPKR"),
88a663ccf0SMika Westerberg 	PINCTRL_PIN(40, "GSPI0_CS0B"),
89a663ccf0SMika Westerberg 	PINCTRL_PIN(41, "GSPI0_CLK"),
90a663ccf0SMika Westerberg 	PINCTRL_PIN(42, "GSPI0_MISO"),
91a663ccf0SMika Westerberg 	PINCTRL_PIN(43, "GSPI0_MOSI"),
92a663ccf0SMika Westerberg 	PINCTRL_PIN(44, "GSPI1_CS0B"),
93a663ccf0SMika Westerberg 	PINCTRL_PIN(45, "GSPI1_CLK"),
94a663ccf0SMika Westerberg 	PINCTRL_PIN(46, "GSPI1_MISO"),
95a663ccf0SMika Westerberg 	PINCTRL_PIN(47, "GSPI1_MOSI"),
96a663ccf0SMika Westerberg 	PINCTRL_PIN(48, "SML1ALERTB"),
97a663ccf0SMika Westerberg 	PINCTRL_PIN(49, "GSPI0_CLK_LOOPBK"),
98a663ccf0SMika Westerberg 	PINCTRL_PIN(50, "GSPI1_CLK_LOOPBK"),
99a663ccf0SMika Westerberg 	/* GPP_C */
100a663ccf0SMika Westerberg 	PINCTRL_PIN(51, "SMBCLK"),
101a663ccf0SMika Westerberg 	PINCTRL_PIN(52, "SMBDATA"),
102a663ccf0SMika Westerberg 	PINCTRL_PIN(53, "SMBALERTB"),
103a663ccf0SMika Westerberg 	PINCTRL_PIN(54, "SML0CLK"),
104a663ccf0SMika Westerberg 	PINCTRL_PIN(55, "SML0DATA"),
105a663ccf0SMika Westerberg 	PINCTRL_PIN(56, "SML0ALERTB"),
106a663ccf0SMika Westerberg 	PINCTRL_PIN(57, "SML1CLK"),
107a663ccf0SMika Westerberg 	PINCTRL_PIN(58, "SML1DATA"),
108a663ccf0SMika Westerberg 	PINCTRL_PIN(59, "UART0_RXD"),
109a663ccf0SMika Westerberg 	PINCTRL_PIN(60, "UART0_TXD"),
110a663ccf0SMika Westerberg 	PINCTRL_PIN(61, "UART0_RTSB"),
111a663ccf0SMika Westerberg 	PINCTRL_PIN(62, "UART0_CTSB"),
112a663ccf0SMika Westerberg 	PINCTRL_PIN(63, "UART1_RXD"),
113a663ccf0SMika Westerberg 	PINCTRL_PIN(64, "UART1_TXD"),
114a663ccf0SMika Westerberg 	PINCTRL_PIN(65, "UART1_RTSB"),
115a663ccf0SMika Westerberg 	PINCTRL_PIN(66, "UART1_CTSB"),
116a663ccf0SMika Westerberg 	PINCTRL_PIN(67, "I2C0_SDA"),
117a663ccf0SMika Westerberg 	PINCTRL_PIN(68, "I2C0_SCL"),
118a663ccf0SMika Westerberg 	PINCTRL_PIN(69, "I2C1_SDA"),
119a663ccf0SMika Westerberg 	PINCTRL_PIN(70, "I2C1_SCL"),
120a663ccf0SMika Westerberg 	PINCTRL_PIN(71, "UART2_RXD"),
121a663ccf0SMika Westerberg 	PINCTRL_PIN(72, "UART2_TXD"),
122a663ccf0SMika Westerberg 	PINCTRL_PIN(73, "UART2_RTSB"),
123a663ccf0SMika Westerberg 	PINCTRL_PIN(74, "UART2_CTSB"),
124a663ccf0SMika Westerberg 	/* GPP_D */
125a663ccf0SMika Westerberg 	PINCTRL_PIN(75, "SPI1_CSB"),
126a663ccf0SMika Westerberg 	PINCTRL_PIN(76, "SPI1_CLK"),
127a663ccf0SMika Westerberg 	PINCTRL_PIN(77, "SPI1_MISO_IO_1"),
128a663ccf0SMika Westerberg 	PINCTRL_PIN(78, "SPI1_MOSI_IO_0"),
129a663ccf0SMika Westerberg 	PINCTRL_PIN(79, "ISH_I2C2_SDA"),
130a663ccf0SMika Westerberg 	PINCTRL_PIN(80, "SSP2_SFRM"),
131a663ccf0SMika Westerberg 	PINCTRL_PIN(81, "SSP2_TXD"),
132a663ccf0SMika Westerberg 	PINCTRL_PIN(82, "SSP2_RXD"),
133a663ccf0SMika Westerberg 	PINCTRL_PIN(83, "SSP2_SCLK"),
134a663ccf0SMika Westerberg 	PINCTRL_PIN(84, "ISH_SPI_CSB"),
135a663ccf0SMika Westerberg 	PINCTRL_PIN(85, "ISH_SPI_CLK"),
136a663ccf0SMika Westerberg 	PINCTRL_PIN(86, "ISH_SPI_MISO"),
137a663ccf0SMika Westerberg 	PINCTRL_PIN(87, "ISH_SPI_MOSI"),
138a663ccf0SMika Westerberg 	PINCTRL_PIN(88, "ISH_UART0_RXD"),
139a663ccf0SMika Westerberg 	PINCTRL_PIN(89, "ISH_UART0_TXD"),
140a663ccf0SMika Westerberg 	PINCTRL_PIN(90, "ISH_UART0_RTSB"),
141a663ccf0SMika Westerberg 	PINCTRL_PIN(91, "ISH_UART0_CTSB"),
142a663ccf0SMika Westerberg 	PINCTRL_PIN(92, "DMIC_CLK_1"),
143a663ccf0SMika Westerberg 	PINCTRL_PIN(93, "DMIC_DATA_1"),
144a663ccf0SMika Westerberg 	PINCTRL_PIN(94, "DMIC_CLK_0"),
145a663ccf0SMika Westerberg 	PINCTRL_PIN(95, "DMIC_DATA_0"),
146a663ccf0SMika Westerberg 	PINCTRL_PIN(96, "SPI1_IO_2"),
147a663ccf0SMika Westerberg 	PINCTRL_PIN(97, "SPI1_IO_3"),
148a663ccf0SMika Westerberg 	PINCTRL_PIN(98, "ISH_I2C2_SCL"),
149a663ccf0SMika Westerberg 	/* GPP_G */
150a663ccf0SMika Westerberg 	PINCTRL_PIN(99, "SD3_CMD"),
151a663ccf0SMika Westerberg 	PINCTRL_PIN(100, "SD3_D0"),
152a663ccf0SMika Westerberg 	PINCTRL_PIN(101, "SD3_D1"),
153a663ccf0SMika Westerberg 	PINCTRL_PIN(102, "SD3_D2"),
154a663ccf0SMika Westerberg 	PINCTRL_PIN(103, "SD3_D3"),
155a663ccf0SMika Westerberg 	PINCTRL_PIN(104, "SD3_CDB"),
156a663ccf0SMika Westerberg 	PINCTRL_PIN(105, "SD3_CLK"),
157a663ccf0SMika Westerberg 	PINCTRL_PIN(106, "SD3_WP"),
158a663ccf0SMika Westerberg 	/* AZA */
159a663ccf0SMika Westerberg 	PINCTRL_PIN(107, "HDA_BCLK"),
160a663ccf0SMika Westerberg 	PINCTRL_PIN(108, "HDA_RSTB"),
161a663ccf0SMika Westerberg 	PINCTRL_PIN(109, "HDA_SYNC"),
162a663ccf0SMika Westerberg 	PINCTRL_PIN(110, "HDA_SDO"),
163a663ccf0SMika Westerberg 	PINCTRL_PIN(111, "HDA_SDI_0"),
164a663ccf0SMika Westerberg 	PINCTRL_PIN(112, "HDA_SDI_1"),
165a663ccf0SMika Westerberg 	PINCTRL_PIN(113, "SSP1_SFRM"),
166a663ccf0SMika Westerberg 	PINCTRL_PIN(114, "SSP1_TXD"),
167a663ccf0SMika Westerberg 	/* vGPIO */
168a663ccf0SMika Westerberg 	PINCTRL_PIN(115, "CNV_BTEN"),
169a663ccf0SMika Westerberg 	PINCTRL_PIN(116, "CNV_GNEN"),
170a663ccf0SMika Westerberg 	PINCTRL_PIN(117, "CNV_WFEN"),
171a663ccf0SMika Westerberg 	PINCTRL_PIN(118, "CNV_WCEN"),
172a663ccf0SMika Westerberg 	PINCTRL_PIN(119, "CNV_BT_HOST_WAKEB"),
173a663ccf0SMika Westerberg 	PINCTRL_PIN(120, "vCNV_GNSS_HOST_WAKEB"),
174a663ccf0SMika Westerberg 	PINCTRL_PIN(121, "vSD3_CD_B"),
175a663ccf0SMika Westerberg 	PINCTRL_PIN(122, "CNV_BT_IF_SELECT"),
176a663ccf0SMika Westerberg 	PINCTRL_PIN(123, "vCNV_BT_UART_TXD"),
177a663ccf0SMika Westerberg 	PINCTRL_PIN(124, "vCNV_BT_UART_RXD"),
178a663ccf0SMika Westerberg 	PINCTRL_PIN(125, "vCNV_BT_UART_CTS_B"),
179a663ccf0SMika Westerberg 	PINCTRL_PIN(126, "vCNV_BT_UART_RTS_B"),
180a663ccf0SMika Westerberg 	PINCTRL_PIN(127, "vCNV_MFUART1_TXD"),
181a663ccf0SMika Westerberg 	PINCTRL_PIN(128, "vCNV_MFUART1_RXD"),
182a663ccf0SMika Westerberg 	PINCTRL_PIN(129, "vCNV_MFUART1_CTS_B"),
183a663ccf0SMika Westerberg 	PINCTRL_PIN(130, "vCNV_MFUART1_RTS_B"),
184a663ccf0SMika Westerberg 	PINCTRL_PIN(131, "vCNV_GNSS_UART_TXD"),
185a663ccf0SMika Westerberg 	PINCTRL_PIN(132, "vCNV_GNSS_UART_RXD"),
186a663ccf0SMika Westerberg 	PINCTRL_PIN(133, "vCNV_GNSS_UART_CTS_B"),
187a663ccf0SMika Westerberg 	PINCTRL_PIN(134, "vCNV_GNSS_UART_RTS_B"),
188a663ccf0SMika Westerberg 	PINCTRL_PIN(135, "vUART0_TXD"),
189a663ccf0SMika Westerberg 	PINCTRL_PIN(136, "vUART0_RXD"),
190a663ccf0SMika Westerberg 	PINCTRL_PIN(137, "vUART0_CTS_B"),
191a663ccf0SMika Westerberg 	PINCTRL_PIN(138, "vUART0_RTSB"),
192a663ccf0SMika Westerberg 	PINCTRL_PIN(139, "vISH_UART0_TXD"),
193a663ccf0SMika Westerberg 	PINCTRL_PIN(140, "vISH_UART0_RXD"),
194a663ccf0SMika Westerberg 	PINCTRL_PIN(141, "vISH_UART0_CTS_B"),
195a663ccf0SMika Westerberg 	PINCTRL_PIN(142, "vISH_UART0_RTSB"),
196a663ccf0SMika Westerberg 	PINCTRL_PIN(143, "vISH_UART1_TXD"),
197a663ccf0SMika Westerberg 	PINCTRL_PIN(144, "vISH_UART1_RXD"),
198a663ccf0SMika Westerberg 	PINCTRL_PIN(145, "vISH_UART1_CTS_B"),
199a663ccf0SMika Westerberg 	PINCTRL_PIN(146, "vISH_UART1_RTS_B"),
200a663ccf0SMika Westerberg 	PINCTRL_PIN(147, "vCNV_BT_I2S_BCLK"),
201a663ccf0SMika Westerberg 	PINCTRL_PIN(148, "vCNV_BT_I2S_WS_SYNC"),
202a663ccf0SMika Westerberg 	PINCTRL_PIN(149, "vCNV_BT_I2S_SDO"),
203a663ccf0SMika Westerberg 	PINCTRL_PIN(150, "vCNV_BT_I2S_SDI"),
204a663ccf0SMika Westerberg 	PINCTRL_PIN(151, "vSSP2_SCLK"),
205a663ccf0SMika Westerberg 	PINCTRL_PIN(152, "vSSP2_SFRM"),
206a663ccf0SMika Westerberg 	PINCTRL_PIN(153, "vSSP2_TXD"),
207a663ccf0SMika Westerberg 	PINCTRL_PIN(154, "vSSP2_RXD"),
208a663ccf0SMika Westerberg 	/* GPP_K */
209a663ccf0SMika Westerberg 	PINCTRL_PIN(155, "FAN_TACH_0"),
210a663ccf0SMika Westerberg 	PINCTRL_PIN(156, "FAN_TACH_1"),
211a663ccf0SMika Westerberg 	PINCTRL_PIN(157, "FAN_TACH_2"),
212a663ccf0SMika Westerberg 	PINCTRL_PIN(158, "FAN_TACH_3"),
213a663ccf0SMika Westerberg 	PINCTRL_PIN(159, "FAN_TACH_4"),
214a663ccf0SMika Westerberg 	PINCTRL_PIN(160, "FAN_TACH_5"),
215a663ccf0SMika Westerberg 	PINCTRL_PIN(161, "FAN_TACH_6"),
216a663ccf0SMika Westerberg 	PINCTRL_PIN(162, "FAN_TACH_7"),
217a663ccf0SMika Westerberg 	PINCTRL_PIN(163, "FAN_PWM_0"),
218a663ccf0SMika Westerberg 	PINCTRL_PIN(164, "FAN_PWM_1"),
219a663ccf0SMika Westerberg 	PINCTRL_PIN(165, "FAN_PWM_2"),
220a663ccf0SMika Westerberg 	PINCTRL_PIN(166, "FAN_PWM_3"),
221a663ccf0SMika Westerberg 	PINCTRL_PIN(167, "GSXDOUT"),
222a663ccf0SMika Westerberg 	PINCTRL_PIN(168, "GSXSLOAD"),
223a663ccf0SMika Westerberg 	PINCTRL_PIN(169, "GSXDIN"),
224a663ccf0SMika Westerberg 	PINCTRL_PIN(170, "GSXSRESETB"),
225a663ccf0SMika Westerberg 	PINCTRL_PIN(171, "GSXCLK"),
226a663ccf0SMika Westerberg 	PINCTRL_PIN(172, "ADR_COMPLETE"),
227a663ccf0SMika Westerberg 	PINCTRL_PIN(173, "NMIB"),
228a663ccf0SMika Westerberg 	PINCTRL_PIN(174, "SMIB"),
229a663ccf0SMika Westerberg 	PINCTRL_PIN(175, "CORE_VID_0"),
230a663ccf0SMika Westerberg 	PINCTRL_PIN(176, "CORE_VID_1"),
231a663ccf0SMika Westerberg 	PINCTRL_PIN(177, "IMGCLKOUT_0"),
232a663ccf0SMika Westerberg 	PINCTRL_PIN(178, "IMGCLKOUT_1"),
233a663ccf0SMika Westerberg 	/* GPP_H */
234a663ccf0SMika Westerberg 	PINCTRL_PIN(179, "SRCCLKREQB_6"),
235a663ccf0SMika Westerberg 	PINCTRL_PIN(180, "SRCCLKREQB_7"),
236a663ccf0SMika Westerberg 	PINCTRL_PIN(181, "SRCCLKREQB_8"),
237a663ccf0SMika Westerberg 	PINCTRL_PIN(182, "SRCCLKREQB_9"),
238a663ccf0SMika Westerberg 	PINCTRL_PIN(183, "SRCCLKREQB_10"),
239a663ccf0SMika Westerberg 	PINCTRL_PIN(184, "SRCCLKREQB_11"),
240a663ccf0SMika Westerberg 	PINCTRL_PIN(185, "SRCCLKREQB_12"),
241a663ccf0SMika Westerberg 	PINCTRL_PIN(186, "SRCCLKREQB_13"),
242a663ccf0SMika Westerberg 	PINCTRL_PIN(187, "SRCCLKREQB_14"),
243a663ccf0SMika Westerberg 	PINCTRL_PIN(188, "SRCCLKREQB_15"),
244a663ccf0SMika Westerberg 	PINCTRL_PIN(189, "SML2CLK"),
245a663ccf0SMika Westerberg 	PINCTRL_PIN(190, "SML2DATA"),
246a663ccf0SMika Westerberg 	PINCTRL_PIN(191, "SML2ALERTB"),
247a663ccf0SMika Westerberg 	PINCTRL_PIN(192, "SML3CLK"),
248a663ccf0SMika Westerberg 	PINCTRL_PIN(193, "SML3DATA"),
249a663ccf0SMika Westerberg 	PINCTRL_PIN(194, "SML3ALERTB"),
250a663ccf0SMika Westerberg 	PINCTRL_PIN(195, "SML4CLK"),
251a663ccf0SMika Westerberg 	PINCTRL_PIN(196, "SML4DATA"),
252a663ccf0SMika Westerberg 	PINCTRL_PIN(197, "SML4ALERTB"),
253a663ccf0SMika Westerberg 	PINCTRL_PIN(198, "ISH_I2C0_SDA"),
254a663ccf0SMika Westerberg 	PINCTRL_PIN(199, "ISH_I2C0_SCL"),
255a663ccf0SMika Westerberg 	PINCTRL_PIN(200, "ISH_I2C1_SDA"),
256a663ccf0SMika Westerberg 	PINCTRL_PIN(201, "ISH_I2C1_SCL"),
257a663ccf0SMika Westerberg 	PINCTRL_PIN(202, "TIME_SYNC_0"),
258a663ccf0SMika Westerberg 	/* GPP_E */
259a663ccf0SMika Westerberg 	PINCTRL_PIN(203, "SATAXPCIE_0"),
260a663ccf0SMika Westerberg 	PINCTRL_PIN(204, "SATAXPCIE_1"),
261a663ccf0SMika Westerberg 	PINCTRL_PIN(205, "SATAXPCIE_2"),
262a663ccf0SMika Westerberg 	PINCTRL_PIN(206, "CPU_GP_0"),
263a663ccf0SMika Westerberg 	PINCTRL_PIN(207, "SATA_DEVSLP_0"),
264a663ccf0SMika Westerberg 	PINCTRL_PIN(208, "SATA_DEVSLP_1"),
265a663ccf0SMika Westerberg 	PINCTRL_PIN(209, "SATA_DEVSLP_2"),
266a663ccf0SMika Westerberg 	PINCTRL_PIN(210, "CPU_GP_1"),
267a663ccf0SMika Westerberg 	PINCTRL_PIN(211, "SATA_LEDB"),
268a663ccf0SMika Westerberg 	PINCTRL_PIN(212, "USB2_OCB_0"),
269a663ccf0SMika Westerberg 	PINCTRL_PIN(213, "USB2_OCB_1"),
270a663ccf0SMika Westerberg 	PINCTRL_PIN(214, "USB2_OCB_2"),
271a663ccf0SMika Westerberg 	PINCTRL_PIN(215, "USB2_OCB_3"),
272a663ccf0SMika Westerberg 	/* GPP_F */
273a663ccf0SMika Westerberg 	PINCTRL_PIN(216, "SATAXPCIE_3"),
274a663ccf0SMika Westerberg 	PINCTRL_PIN(217, "SATAXPCIE_4"),
275a663ccf0SMika Westerberg 	PINCTRL_PIN(218, "SATAXPCIE_5"),
276a663ccf0SMika Westerberg 	PINCTRL_PIN(219, "SATAXPCIE_6"),
277a663ccf0SMika Westerberg 	PINCTRL_PIN(220, "SATAXPCIE_7"),
278a663ccf0SMika Westerberg 	PINCTRL_PIN(221, "SATA_DEVSLP_3"),
279a663ccf0SMika Westerberg 	PINCTRL_PIN(222, "SATA_DEVSLP_4"),
280a663ccf0SMika Westerberg 	PINCTRL_PIN(223, "SATA_DEVSLP_5"),
281a663ccf0SMika Westerberg 	PINCTRL_PIN(224, "SATA_DEVSLP_6"),
282a663ccf0SMika Westerberg 	PINCTRL_PIN(225, "SATA_DEVSLP_7"),
283a663ccf0SMika Westerberg 	PINCTRL_PIN(226, "SATA_SCLOCK"),
284a663ccf0SMika Westerberg 	PINCTRL_PIN(227, "SATA_SLOAD"),
285a663ccf0SMika Westerberg 	PINCTRL_PIN(228, "SATA_SDATAOUT1"),
286a663ccf0SMika Westerberg 	PINCTRL_PIN(229, "SATA_SDATAOUT0"),
287a663ccf0SMika Westerberg 	PINCTRL_PIN(230, "EXT_PWR_GATEB"),
288a663ccf0SMika Westerberg 	PINCTRL_PIN(231, "USB2_OCB_4"),
289a663ccf0SMika Westerberg 	PINCTRL_PIN(232, "USB2_OCB_5"),
290a663ccf0SMika Westerberg 	PINCTRL_PIN(233, "USB2_OCB_6"),
291a663ccf0SMika Westerberg 	PINCTRL_PIN(234, "USB2_OCB_7"),
292a663ccf0SMika Westerberg 	PINCTRL_PIN(235, "L_VDDEN"),
293a663ccf0SMika Westerberg 	PINCTRL_PIN(236, "L_BKLTEN"),
294a663ccf0SMika Westerberg 	PINCTRL_PIN(237, "L_BKLTCTL"),
295a663ccf0SMika Westerberg 	PINCTRL_PIN(238, "DDPF_CTRLCLK"),
296a663ccf0SMika Westerberg 	PINCTRL_PIN(239, "DDPF_CTRLDATA"),
297a663ccf0SMika Westerberg 	/* SPI */
298a663ccf0SMika Westerberg 	PINCTRL_PIN(240, "SPI0_IO_2"),
299a663ccf0SMika Westerberg 	PINCTRL_PIN(241, "SPI0_IO_3"),
300a663ccf0SMika Westerberg 	PINCTRL_PIN(242, "SPI0_MOSI_IO_0"),
301a663ccf0SMika Westerberg 	PINCTRL_PIN(243, "SPI0_MISO_IO_1"),
302a663ccf0SMika Westerberg 	PINCTRL_PIN(244, "SPI0_TPM_CSB"),
303a663ccf0SMika Westerberg 	PINCTRL_PIN(245, "SPI0_FLASH_0_CSB"),
304a663ccf0SMika Westerberg 	PINCTRL_PIN(246, "SPI0_FLASH_1_CSB"),
305a663ccf0SMika Westerberg 	PINCTRL_PIN(247, "SPI0_CLK"),
306a663ccf0SMika Westerberg 	PINCTRL_PIN(248, "SPI0_CLK_LOOPBK"),
307a663ccf0SMika Westerberg 	/* CPU */
308a663ccf0SMika Westerberg 	PINCTRL_PIN(249, "HDACPU_SDI"),
309a663ccf0SMika Westerberg 	PINCTRL_PIN(250, "HDACPU_SDO"),
310a663ccf0SMika Westerberg 	PINCTRL_PIN(251, "HDACPU_SCLK"),
311a663ccf0SMika Westerberg 	PINCTRL_PIN(252, "PM_SYNC"),
312a663ccf0SMika Westerberg 	PINCTRL_PIN(253, "PECI"),
313a663ccf0SMika Westerberg 	PINCTRL_PIN(254, "CPUPWRGD"),
314a663ccf0SMika Westerberg 	PINCTRL_PIN(255, "THRMTRIPB"),
315a663ccf0SMika Westerberg 	PINCTRL_PIN(256, "PLTRST_CPUB"),
316a663ccf0SMika Westerberg 	PINCTRL_PIN(257, "PM_DOWN"),
317a663ccf0SMika Westerberg 	PINCTRL_PIN(258, "TRIGGER_IN"),
318a663ccf0SMika Westerberg 	PINCTRL_PIN(259, "TRIGGER_OUT"),
319a663ccf0SMika Westerberg 	/* JTAG */
320a663ccf0SMika Westerberg 	PINCTRL_PIN(260, "JTAG_TDO"),
321a663ccf0SMika Westerberg 	PINCTRL_PIN(261, "JTAGX"),
322a663ccf0SMika Westerberg 	PINCTRL_PIN(262, "PRDYB"),
323a663ccf0SMika Westerberg 	PINCTRL_PIN(263, "PREQB"),
324a663ccf0SMika Westerberg 	PINCTRL_PIN(264, "CPU_TRSTB"),
325a663ccf0SMika Westerberg 	PINCTRL_PIN(265, "JTAG_TDI"),
326a663ccf0SMika Westerberg 	PINCTRL_PIN(266, "JTAG_TMS"),
327a663ccf0SMika Westerberg 	PINCTRL_PIN(267, "JTAG_TCK"),
328a663ccf0SMika Westerberg 	PINCTRL_PIN(268, "ITP_PMODE"),
329a663ccf0SMika Westerberg 	/* GPP_I */
330a663ccf0SMika Westerberg 	PINCTRL_PIN(269, "DDSP_HPD_0"),
331a663ccf0SMika Westerberg 	PINCTRL_PIN(270, "DDSP_HPD_1"),
332a663ccf0SMika Westerberg 	PINCTRL_PIN(271, "DDSP_HPD_2"),
333a663ccf0SMika Westerberg 	PINCTRL_PIN(272, "DDSP_HPD_3"),
334a663ccf0SMika Westerberg 	PINCTRL_PIN(273, "EDP_HPD"),
335a663ccf0SMika Westerberg 	PINCTRL_PIN(274, "DDPB_CTRLCLK"),
336a663ccf0SMika Westerberg 	PINCTRL_PIN(275, "DDPB_CTRLDATA"),
337a663ccf0SMika Westerberg 	PINCTRL_PIN(276, "DDPC_CTRLCLK"),
338a663ccf0SMika Westerberg 	PINCTRL_PIN(277, "DDPC_CTRLDATA"),
339a663ccf0SMika Westerberg 	PINCTRL_PIN(278, "DDPD_CTRLCLK"),
340a663ccf0SMika Westerberg 	PINCTRL_PIN(279, "DDPD_CTRLDATA"),
341a663ccf0SMika Westerberg 	PINCTRL_PIN(280, "M2_SKT2_CFG_0"),
342a663ccf0SMika Westerberg 	PINCTRL_PIN(281, "M2_SKT2_CFG_1"),
343a663ccf0SMika Westerberg 	PINCTRL_PIN(282, "M2_SKT2_CFG_2"),
344a663ccf0SMika Westerberg 	PINCTRL_PIN(283, "M2_SKT2_CFG_3"),
345a663ccf0SMika Westerberg 	PINCTRL_PIN(284, "SYS_PWROK"),
346a663ccf0SMika Westerberg 	PINCTRL_PIN(285, "SYS_RESETB"),
347a663ccf0SMika Westerberg 	PINCTRL_PIN(286, "MLK_RSTB"),
348a663ccf0SMika Westerberg 	/* GPP_J */
349a663ccf0SMika Westerberg 	PINCTRL_PIN(287, "CNV_PA_BLANKING"),
350a663ccf0SMika Westerberg 	PINCTRL_PIN(288, "CNV_GNSS_FTA"),
351a663ccf0SMika Westerberg 	PINCTRL_PIN(289, "CNV_GNSS_SYSCK"),
352a663ccf0SMika Westerberg 	PINCTRL_PIN(290, "CNV_RF_RESET_B"),
353a663ccf0SMika Westerberg 	PINCTRL_PIN(291, "CNV_BRI_DT"),
354a663ccf0SMika Westerberg 	PINCTRL_PIN(292, "CNV_BRI_RSP"),
355a663ccf0SMika Westerberg 	PINCTRL_PIN(293, "CNV_RGI_DT"),
356a663ccf0SMika Westerberg 	PINCTRL_PIN(294, "CNV_RGI_RSP"),
357a663ccf0SMika Westerberg 	PINCTRL_PIN(295, "CNV_MFUART2_RXD"),
358a663ccf0SMika Westerberg 	PINCTRL_PIN(296, "CNV_MFUART2_TXD"),
359a663ccf0SMika Westerberg 	PINCTRL_PIN(297, "CNV_MODEM_CLKREQ"),
360a663ccf0SMika Westerberg 	PINCTRL_PIN(298, "A4WP_PRESENT"),
361a663ccf0SMika Westerberg };
362a663ccf0SMika Westerberg 
363a663ccf0SMika Westerberg static const struct intel_padgroup cnlh_community0_gpps[] = {
364cb5fda41SMika Westerberg 	CNL_GPP(0, 0, 24, 0),			/* GPP_A */
365cb5fda41SMika Westerberg 	CNL_GPP(1, 25, 50, 32),			/* GPP_B */
366a663ccf0SMika Westerberg };
367a663ccf0SMika Westerberg 
368a663ccf0SMika Westerberg static const struct intel_padgroup cnlh_community1_gpps[] = {
369cb5fda41SMika Westerberg 	CNL_GPP(0, 51, 74, 64),				/* GPP_C */
370cb5fda41SMika Westerberg 	CNL_GPP(1, 75, 98, 96),				/* GPP_D */
371cb5fda41SMika Westerberg 	CNL_GPP(2, 99, 106, 128),			/* GPP_G */
3725ba092edSAndy Shevchenko 	CNL_GPP(3, 107, 114, INTEL_GPIO_BASE_NOMAP),	/* AZA */
373cb5fda41SMika Westerberg 	CNL_GPP(4, 115, 146, 160),			/* vGPIO_0 */
3745ba092edSAndy Shevchenko 	CNL_GPP(5, 147, 154, INTEL_GPIO_BASE_NOMAP),	/* vGPIO_1 */
375a663ccf0SMika Westerberg };
376a663ccf0SMika Westerberg 
377a663ccf0SMika Westerberg static const struct intel_padgroup cnlh_community3_gpps[] = {
378cb5fda41SMika Westerberg 	CNL_GPP(0, 155, 178, 192),			/* GPP_K */
379cb5fda41SMika Westerberg 	CNL_GPP(1, 179, 202, 224),			/* GPP_H */
3808e2aac33SSimon Detheridge 	CNL_GPP(2, 203, 215, 256),			/* GPP_E */
381cb5fda41SMika Westerberg 	CNL_GPP(3, 216, 239, 288),			/* GPP_F */
3825ba092edSAndy Shevchenko 	CNL_GPP(4, 240, 248, INTEL_GPIO_BASE_NOMAP),	/* SPI */
383a663ccf0SMika Westerberg };
384a663ccf0SMika Westerberg 
385a663ccf0SMika Westerberg static const struct intel_padgroup cnlh_community4_gpps[] = {
3865ba092edSAndy Shevchenko 	CNL_GPP(0, 249, 259, INTEL_GPIO_BASE_NOMAP),	/* CPU */
3875ba092edSAndy Shevchenko 	CNL_GPP(1, 260, 268, INTEL_GPIO_BASE_NOMAP),	/* JTAG */
388cb5fda41SMika Westerberg 	CNL_GPP(2, 269, 286, 320),			/* GPP_I */
389cb5fda41SMika Westerberg 	CNL_GPP(3, 287, 298, 352),			/* GPP_J */
390a663ccf0SMika Westerberg };
391a663ccf0SMika Westerberg 
392a663ccf0SMika Westerberg static const unsigned int cnlh_spi0_pins[] = { 40, 41, 42, 43 };
393a663ccf0SMika Westerberg static const unsigned int cnlh_spi1_pins[] = { 44, 45, 46, 47 };
394a663ccf0SMika Westerberg static const unsigned int cnlh_spi2_pins[] = { 84, 85, 86, 87 };
395a663ccf0SMika Westerberg 
396a663ccf0SMika Westerberg static const unsigned int cnlh_uart0_pins[] = { 59, 60, 61, 62 };
397a663ccf0SMika Westerberg static const unsigned int cnlh_uart1_pins[] = { 63, 64, 65, 66 };
398a663ccf0SMika Westerberg static const unsigned int cnlh_uart2_pins[] = { 71, 72, 73, 74 };
399a663ccf0SMika Westerberg 
400a663ccf0SMika Westerberg static const unsigned int cnlh_i2c0_pins[] = { 67, 68 };
401a663ccf0SMika Westerberg static const unsigned int cnlh_i2c1_pins[] = { 69, 70 };
402a663ccf0SMika Westerberg static const unsigned int cnlh_i2c2_pins[] = { 88, 89 };
403a663ccf0SMika Westerberg static const unsigned int cnlh_i2c3_pins[] = { 79, 98 };
404a663ccf0SMika Westerberg 
405a663ccf0SMika Westerberg static const struct intel_pingroup cnlh_groups[] = {
406a663ccf0SMika Westerberg 	PIN_GROUP("spi0_grp", cnlh_spi0_pins, 1),
407a663ccf0SMika Westerberg 	PIN_GROUP("spi1_grp", cnlh_spi1_pins, 1),
408a663ccf0SMika Westerberg 	PIN_GROUP("spi2_grp", cnlh_spi2_pins, 3),
409a663ccf0SMika Westerberg 	PIN_GROUP("uart0_grp", cnlh_uart0_pins, 1),
410a663ccf0SMika Westerberg 	PIN_GROUP("uart1_grp", cnlh_uart1_pins, 1),
411a663ccf0SMika Westerberg 	PIN_GROUP("uart2_grp", cnlh_uart2_pins, 1),
412a663ccf0SMika Westerberg 	PIN_GROUP("i2c0_grp", cnlh_i2c0_pins, 1),
413a663ccf0SMika Westerberg 	PIN_GROUP("i2c1_grp", cnlh_i2c1_pins, 1),
414a663ccf0SMika Westerberg 	PIN_GROUP("i2c2_grp", cnlh_i2c2_pins, 3),
415a663ccf0SMika Westerberg 	PIN_GROUP("i2c3_grp", cnlh_i2c3_pins, 2),
416a663ccf0SMika Westerberg };
417a663ccf0SMika Westerberg 
418a663ccf0SMika Westerberg static const char * const cnlh_spi0_groups[] = { "spi0_grp" };
419a663ccf0SMika Westerberg static const char * const cnlh_spi1_groups[] = { "spi1_grp" };
420a663ccf0SMika Westerberg static const char * const cnlh_spi2_groups[] = { "spi2_grp" };
421a663ccf0SMika Westerberg static const char * const cnlh_uart0_groups[] = { "uart0_grp" };
422a663ccf0SMika Westerberg static const char * const cnlh_uart1_groups[] = { "uart1_grp" };
423a663ccf0SMika Westerberg static const char * const cnlh_uart2_groups[] = { "uart2_grp" };
424a663ccf0SMika Westerberg static const char * const cnlh_i2c0_groups[] = { "i2c0_grp" };
425a663ccf0SMika Westerberg static const char * const cnlh_i2c1_groups[] = { "i2c1_grp" };
426a663ccf0SMika Westerberg static const char * const cnlh_i2c2_groups[] = { "i2c2_grp" };
427a663ccf0SMika Westerberg static const char * const cnlh_i2c3_groups[] = { "i2c3_grp" };
428a663ccf0SMika Westerberg 
429a663ccf0SMika Westerberg static const struct intel_function cnlh_functions[] = {
430a663ccf0SMika Westerberg 	FUNCTION("spi0", cnlh_spi0_groups),
431a663ccf0SMika Westerberg 	FUNCTION("spi1", cnlh_spi1_groups),
432a663ccf0SMika Westerberg 	FUNCTION("spi2", cnlh_spi2_groups),
433a663ccf0SMika Westerberg 	FUNCTION("uart0", cnlh_uart0_groups),
434a663ccf0SMika Westerberg 	FUNCTION("uart1", cnlh_uart1_groups),
435a663ccf0SMika Westerberg 	FUNCTION("uart2", cnlh_uart2_groups),
436a663ccf0SMika Westerberg 	FUNCTION("i2c0", cnlh_i2c0_groups),
437a663ccf0SMika Westerberg 	FUNCTION("i2c1", cnlh_i2c1_groups),
438a663ccf0SMika Westerberg 	FUNCTION("i2c2", cnlh_i2c2_groups),
439a663ccf0SMika Westerberg 	FUNCTION("i2c3", cnlh_i2c3_groups),
440a663ccf0SMika Westerberg };
441a663ccf0SMika Westerberg 
442a663ccf0SMika Westerberg static const struct intel_community cnlh_communities[] = {
443701372c7SAndy Shevchenko 	CNL_H_COMMUNITY(0, 0, 50, cnlh_community0_gpps),
444701372c7SAndy Shevchenko 	CNL_H_COMMUNITY(1, 51, 154, cnlh_community1_gpps),
445701372c7SAndy Shevchenko 	CNL_H_COMMUNITY(2, 155, 248, cnlh_community3_gpps),
446701372c7SAndy Shevchenko 	CNL_H_COMMUNITY(3, 249, 298, cnlh_community4_gpps),
447a663ccf0SMika Westerberg };
448a663ccf0SMika Westerberg 
449a663ccf0SMika Westerberg static const struct intel_pinctrl_soc_data cnlh_soc_data = {
450a663ccf0SMika Westerberg 	.pins = cnlh_pins,
451a663ccf0SMika Westerberg 	.npins = ARRAY_SIZE(cnlh_pins),
452a663ccf0SMika Westerberg 	.groups = cnlh_groups,
453a663ccf0SMika Westerberg 	.ngroups = ARRAY_SIZE(cnlh_groups),
454a663ccf0SMika Westerberg 	.functions = cnlh_functions,
455a663ccf0SMika Westerberg 	.nfunctions = ARRAY_SIZE(cnlh_functions),
456a663ccf0SMika Westerberg 	.communities = cnlh_communities,
457a663ccf0SMika Westerberg 	.ncommunities = ARRAY_SIZE(cnlh_communities),
458a663ccf0SMika Westerberg };
459a663ccf0SMika Westerberg 
46019a8a777SMika Westerberg /* Cannon Lake-LP */
46119a8a777SMika Westerberg static const struct pinctrl_pin_desc cnllp_pins[] = {
46219a8a777SMika Westerberg 	/* GPP_A */
46319a8a777SMika Westerberg 	PINCTRL_PIN(0, "RCINB"),
46419a8a777SMika Westerberg 	PINCTRL_PIN(1, "LAD_0"),
46519a8a777SMika Westerberg 	PINCTRL_PIN(2, "LAD_1"),
46619a8a777SMika Westerberg 	PINCTRL_PIN(3, "LAD_2"),
46719a8a777SMika Westerberg 	PINCTRL_PIN(4, "LAD_3"),
46819a8a777SMika Westerberg 	PINCTRL_PIN(5, "LFRAMEB"),
46919a8a777SMika Westerberg 	PINCTRL_PIN(6, "SERIRQ"),
47019a8a777SMika Westerberg 	PINCTRL_PIN(7, "PIRQAB"),
47119a8a777SMika Westerberg 	PINCTRL_PIN(8, "CLKRUNB"),
47219a8a777SMika Westerberg 	PINCTRL_PIN(9, "CLKOUT_LPC_0"),
47319a8a777SMika Westerberg 	PINCTRL_PIN(10, "CLKOUT_LPC_1"),
47419a8a777SMika Westerberg 	PINCTRL_PIN(11, "PMEB"),
47519a8a777SMika Westerberg 	PINCTRL_PIN(12, "BM_BUSYB"),
47619a8a777SMika Westerberg 	PINCTRL_PIN(13, "SUSWARNB_SUSPWRDNACK"),
47719a8a777SMika Westerberg 	PINCTRL_PIN(14, "SUS_STATB"),
47819a8a777SMika Westerberg 	PINCTRL_PIN(15, "SUSACKB"),
47919a8a777SMika Westerberg 	PINCTRL_PIN(16, "SD_1P8_SEL"),
48019a8a777SMika Westerberg 	PINCTRL_PIN(17, "SD_PWR_EN_B"),
48119a8a777SMika Westerberg 	PINCTRL_PIN(18, "ISH_GP_0"),
48219a8a777SMika Westerberg 	PINCTRL_PIN(19, "ISH_GP_1"),
48319a8a777SMika Westerberg 	PINCTRL_PIN(20, "ISH_GP_2"),
48419a8a777SMika Westerberg 	PINCTRL_PIN(21, "ISH_GP_3"),
48519a8a777SMika Westerberg 	PINCTRL_PIN(22, "ISH_GP_4"),
48619a8a777SMika Westerberg 	PINCTRL_PIN(23, "ISH_GP_5"),
48719a8a777SMika Westerberg 	PINCTRL_PIN(24, "ESPI_CLK_LOOPBK"),
48819a8a777SMika Westerberg 	/* GPP_B */
48919a8a777SMika Westerberg 	PINCTRL_PIN(25, "CORE_VID_0"),
49019a8a777SMika Westerberg 	PINCTRL_PIN(26, "CORE_VID_1"),
49119a8a777SMika Westerberg 	PINCTRL_PIN(27, "VRALERTB"),
49219a8a777SMika Westerberg 	PINCTRL_PIN(28, "CPU_GP_2"),
49319a8a777SMika Westerberg 	PINCTRL_PIN(29, "CPU_GP_3"),
49419a8a777SMika Westerberg 	PINCTRL_PIN(30, "SRCCLKREQB_0"),
49519a8a777SMika Westerberg 	PINCTRL_PIN(31, "SRCCLKREQB_1"),
49619a8a777SMika Westerberg 	PINCTRL_PIN(32, "SRCCLKREQB_2"),
49719a8a777SMika Westerberg 	PINCTRL_PIN(33, "SRCCLKREQB_3"),
49819a8a777SMika Westerberg 	PINCTRL_PIN(34, "SRCCLKREQB_4"),
49919a8a777SMika Westerberg 	PINCTRL_PIN(35, "SRCCLKREQB_5"),
50019a8a777SMika Westerberg 	PINCTRL_PIN(36, "EXT_PWR_GATEB"),
50119a8a777SMika Westerberg 	PINCTRL_PIN(37, "SLP_S0B"),
50219a8a777SMika Westerberg 	PINCTRL_PIN(38, "PLTRSTB"),
50319a8a777SMika Westerberg 	PINCTRL_PIN(39, "SPKR"),
50419a8a777SMika Westerberg 	PINCTRL_PIN(40, "GSPI0_CS0B"),
50519a8a777SMika Westerberg 	PINCTRL_PIN(41, "GSPI0_CLK"),
50619a8a777SMika Westerberg 	PINCTRL_PIN(42, "GSPI0_MISO"),
50719a8a777SMika Westerberg 	PINCTRL_PIN(43, "GSPI0_MOSI"),
50819a8a777SMika Westerberg 	PINCTRL_PIN(44, "GSPI1_CS0B"),
50919a8a777SMika Westerberg 	PINCTRL_PIN(45, "GSPI1_CLK"),
51019a8a777SMika Westerberg 	PINCTRL_PIN(46, "GSPI1_MISO"),
51119a8a777SMika Westerberg 	PINCTRL_PIN(47, "GSPI1_MOSI"),
51219a8a777SMika Westerberg 	PINCTRL_PIN(48, "SML1ALERTB"),
51319a8a777SMika Westerberg 	PINCTRL_PIN(49, "GSPI0_CLK_LOOPBK"),
51419a8a777SMika Westerberg 	PINCTRL_PIN(50, "GSPI1_CLK_LOOPBK"),
51519a8a777SMika Westerberg 	/* GPP_G */
51619a8a777SMika Westerberg 	PINCTRL_PIN(51, "SD3_CMD"),
51719a8a777SMika Westerberg 	PINCTRL_PIN(52, "SD3_D0_SD4_RCLK_P"),
51819a8a777SMika Westerberg 	PINCTRL_PIN(53, "SD3_D1_SD4_RCLK_N"),
51919a8a777SMika Westerberg 	PINCTRL_PIN(54, "SD3_D2"),
52019a8a777SMika Westerberg 	PINCTRL_PIN(55, "SD3_D3"),
52119a8a777SMika Westerberg 	PINCTRL_PIN(56, "SD3_CDB"),
52219a8a777SMika Westerberg 	PINCTRL_PIN(57, "SD3_CLK"),
52319a8a777SMika Westerberg 	PINCTRL_PIN(58, "SD3_WP"),
52419a8a777SMika Westerberg 	/* SPI */
52519a8a777SMika Westerberg 	PINCTRL_PIN(59, "SPI0_IO_2"),
52619a8a777SMika Westerberg 	PINCTRL_PIN(60, "SPI0_IO_3"),
52719a8a777SMika Westerberg 	PINCTRL_PIN(61, "SPI0_MOSI_IO_0"),
52819a8a777SMika Westerberg 	PINCTRL_PIN(62, "SPI0_MISO_IO_1"),
52919a8a777SMika Westerberg 	PINCTRL_PIN(63, "SPI0_TPM_CSB"),
53019a8a777SMika Westerberg 	PINCTRL_PIN(64, "SPI0_FLASH_0_CSB"),
53119a8a777SMika Westerberg 	PINCTRL_PIN(65, "SPI0_FLASH_1_CSB"),
53219a8a777SMika Westerberg 	PINCTRL_PIN(66, "SPI0_CLK"),
53319a8a777SMika Westerberg 	PINCTRL_PIN(67, "SPI0_CLK_LOOPBK"),
53419a8a777SMika Westerberg 	/* GPP_D */
53519a8a777SMika Westerberg 	PINCTRL_PIN(68, "SPI1_CSB"),
53619a8a777SMika Westerberg 	PINCTRL_PIN(69, "SPI1_CLK"),
53719a8a777SMika Westerberg 	PINCTRL_PIN(70, "SPI1_MISO_IO_1"),
53819a8a777SMika Westerberg 	PINCTRL_PIN(71, "SPI1_MOSI_IO_0"),
53919a8a777SMika Westerberg 	PINCTRL_PIN(72, "IMGCLKOUT_0"),
54019a8a777SMika Westerberg 	PINCTRL_PIN(73, "ISH_I2C0_SDA"),
54119a8a777SMika Westerberg 	PINCTRL_PIN(74, "ISH_I2C0_SCL"),
54219a8a777SMika Westerberg 	PINCTRL_PIN(75, "ISH_I2C1_SDA"),
54319a8a777SMika Westerberg 	PINCTRL_PIN(76, "ISH_I2C1_SCL"),
54419a8a777SMika Westerberg 	PINCTRL_PIN(77, "ISH_SPI_CSB"),
54519a8a777SMika Westerberg 	PINCTRL_PIN(78, "ISH_SPI_CLK"),
54619a8a777SMika Westerberg 	PINCTRL_PIN(79, "ISH_SPI_MISO"),
54719a8a777SMika Westerberg 	PINCTRL_PIN(80, "ISH_SPI_MOSI"),
54819a8a777SMika Westerberg 	PINCTRL_PIN(81, "ISH_UART0_RXD"),
54919a8a777SMika Westerberg 	PINCTRL_PIN(82, "ISH_UART0_TXD"),
55019a8a777SMika Westerberg 	PINCTRL_PIN(83, "ISH_UART0_RTSB"),
55119a8a777SMika Westerberg 	PINCTRL_PIN(84, "ISH_UART0_CTSB"),
55219a8a777SMika Westerberg 	PINCTRL_PIN(85, "DMIC_CLK_1"),
55319a8a777SMika Westerberg 	PINCTRL_PIN(86, "DMIC_DATA_1"),
55419a8a777SMika Westerberg 	PINCTRL_PIN(87, "DMIC_CLK_0"),
55519a8a777SMika Westerberg 	PINCTRL_PIN(88, "DMIC_DATA_0"),
55619a8a777SMika Westerberg 	PINCTRL_PIN(89, "SPI1_IO_2"),
55719a8a777SMika Westerberg 	PINCTRL_PIN(90, "SPI1_IO_3"),
55819a8a777SMika Westerberg 	PINCTRL_PIN(91, "SSP_MCLK"),
55919a8a777SMika Westerberg 	PINCTRL_PIN(92, "GSPI2_CLK_LOOPBK"),
56019a8a777SMika Westerberg 	/* GPP_F */
56119a8a777SMika Westerberg 	PINCTRL_PIN(93, "CNV_GNSS_PA_BLANKING"),
56219a8a777SMika Westerberg 	PINCTRL_PIN(94, "CNV_GNSS_FTA"),
56319a8a777SMika Westerberg 	PINCTRL_PIN(95, "CNV_GNSS_SYSCK"),
56419a8a777SMika Westerberg 	PINCTRL_PIN(96, "EMMC_HIP_MON"),
56519a8a777SMika Westerberg 	PINCTRL_PIN(97, "CNV_BRI_DT"),
56619a8a777SMika Westerberg 	PINCTRL_PIN(98, "CNV_BRI_RSP"),
56719a8a777SMika Westerberg 	PINCTRL_PIN(99, "CNV_RGI_DT"),
56819a8a777SMika Westerberg 	PINCTRL_PIN(100, "CNV_RGI_RSP"),
56919a8a777SMika Westerberg 	PINCTRL_PIN(101, "CNV_MFUART2_RXD"),
57019a8a777SMika Westerberg 	PINCTRL_PIN(102, "CNV_MFUART2_TXD"),
57119a8a777SMika Westerberg 	PINCTRL_PIN(103, "GPP_F_10"),
57219a8a777SMika Westerberg 	PINCTRL_PIN(104, "EMMC_CMD"),
57319a8a777SMika Westerberg 	PINCTRL_PIN(105, "EMMC_DATA_0"),
57419a8a777SMika Westerberg 	PINCTRL_PIN(106, "EMMC_DATA_1"),
57519a8a777SMika Westerberg 	PINCTRL_PIN(107, "EMMC_DATA_2"),
57619a8a777SMika Westerberg 	PINCTRL_PIN(108, "EMMC_DATA_3"),
57719a8a777SMika Westerberg 	PINCTRL_PIN(109, "EMMC_DATA_4"),
57819a8a777SMika Westerberg 	PINCTRL_PIN(110, "EMMC_DATA_5"),
57919a8a777SMika Westerberg 	PINCTRL_PIN(111, "EMMC_DATA_6"),
58019a8a777SMika Westerberg 	PINCTRL_PIN(112, "EMMC_DATA_7"),
58119a8a777SMika Westerberg 	PINCTRL_PIN(113, "EMMC_RCLK"),
58219a8a777SMika Westerberg 	PINCTRL_PIN(114, "EMMC_CLK"),
58319a8a777SMika Westerberg 	PINCTRL_PIN(115, "EMMC_RESETB"),
58419a8a777SMika Westerberg 	PINCTRL_PIN(116, "A4WP_PRESENT"),
58519a8a777SMika Westerberg 	/* GPP_H */
58619a8a777SMika Westerberg 	PINCTRL_PIN(117, "SSP2_SCLK"),
58719a8a777SMika Westerberg 	PINCTRL_PIN(118, "SSP2_SFRM"),
58819a8a777SMika Westerberg 	PINCTRL_PIN(119, "SSP2_TXD"),
58919a8a777SMika Westerberg 	PINCTRL_PIN(120, "SSP2_RXD"),
59019a8a777SMika Westerberg 	PINCTRL_PIN(121, "I2C2_SDA"),
59119a8a777SMika Westerberg 	PINCTRL_PIN(122, "I2C2_SCL"),
59219a8a777SMika Westerberg 	PINCTRL_PIN(123, "I2C3_SDA"),
59319a8a777SMika Westerberg 	PINCTRL_PIN(124, "I2C3_SCL"),
59419a8a777SMika Westerberg 	PINCTRL_PIN(125, "I2C4_SDA"),
59519a8a777SMika Westerberg 	PINCTRL_PIN(126, "I2C4_SCL"),
59619a8a777SMika Westerberg 	PINCTRL_PIN(127, "I2C5_SDA"),
59719a8a777SMika Westerberg 	PINCTRL_PIN(128, "I2C5_SCL"),
59819a8a777SMika Westerberg 	PINCTRL_PIN(129, "M2_SKT2_CFG_0"),
59919a8a777SMika Westerberg 	PINCTRL_PIN(130, "M2_SKT2_CFG_1"),
60019a8a777SMika Westerberg 	PINCTRL_PIN(131, "M2_SKT2_CFG_2"),
60119a8a777SMika Westerberg 	PINCTRL_PIN(132, "M2_SKT2_CFG_3"),
60219a8a777SMika Westerberg 	PINCTRL_PIN(133, "DDPF_CTRLCLK"),
60319a8a777SMika Westerberg 	PINCTRL_PIN(134, "DDPF_CTRLDATA"),
60419a8a777SMika Westerberg 	PINCTRL_PIN(135, "CPU_VCCIO_PWR_GATEB"),
60519a8a777SMika Westerberg 	PINCTRL_PIN(136, "TIMESYNC_0"),
60619a8a777SMika Westerberg 	PINCTRL_PIN(137, "IMGCLKOUT_1"),
60719a8a777SMika Westerberg 	PINCTRL_PIN(138, "GPPC_H_21"),
60819a8a777SMika Westerberg 	PINCTRL_PIN(139, "GPPC_H_22"),
60919a8a777SMika Westerberg 	PINCTRL_PIN(140, "GPPC_H_23"),
61019a8a777SMika Westerberg 	/* vGPIO */
61119a8a777SMika Westerberg 	PINCTRL_PIN(141, "CNV_BTEN"),
61219a8a777SMika Westerberg 	PINCTRL_PIN(142, "CNV_GNEN"),
61319a8a777SMika Westerberg 	PINCTRL_PIN(143, "CNV_WFEN"),
61419a8a777SMika Westerberg 	PINCTRL_PIN(144, "CNV_WCEN"),
61519a8a777SMika Westerberg 	PINCTRL_PIN(145, "CNV_BT_HOST_WAKEB"),
61619a8a777SMika Westerberg 	PINCTRL_PIN(146, "CNV_BT_IF_SELECT"),
61719a8a777SMika Westerberg 	PINCTRL_PIN(147, "vCNV_BT_UART_TXD"),
61819a8a777SMika Westerberg 	PINCTRL_PIN(148, "vCNV_BT_UART_RXD"),
61919a8a777SMika Westerberg 	PINCTRL_PIN(149, "vCNV_BT_UART_CTS_B"),
62019a8a777SMika Westerberg 	PINCTRL_PIN(150, "vCNV_BT_UART_RTS_B"),
62119a8a777SMika Westerberg 	PINCTRL_PIN(151, "vCNV_MFUART1_TXD"),
62219a8a777SMika Westerberg 	PINCTRL_PIN(152, "vCNV_MFUART1_RXD"),
62319a8a777SMika Westerberg 	PINCTRL_PIN(153, "vCNV_MFUART1_CTS_B"),
62419a8a777SMika Westerberg 	PINCTRL_PIN(154, "vCNV_MFUART1_RTS_B"),
62519a8a777SMika Westerberg 	PINCTRL_PIN(155, "vCNV_GNSS_UART_TXD"),
62619a8a777SMika Westerberg 	PINCTRL_PIN(156, "vCNV_GNSS_UART_RXD"),
62719a8a777SMika Westerberg 	PINCTRL_PIN(157, "vCNV_GNSS_UART_CTS_B"),
62819a8a777SMika Westerberg 	PINCTRL_PIN(158, "vCNV_GNSS_UART_RTS_B"),
62919a8a777SMika Westerberg 	PINCTRL_PIN(159, "vUART0_TXD"),
63019a8a777SMika Westerberg 	PINCTRL_PIN(160, "vUART0_RXD"),
63119a8a777SMika Westerberg 	PINCTRL_PIN(161, "vUART0_CTS_B"),
63219a8a777SMika Westerberg 	PINCTRL_PIN(162, "vUART0_RTS_B"),
63319a8a777SMika Westerberg 	PINCTRL_PIN(163, "vISH_UART0_TXD"),
63419a8a777SMika Westerberg 	PINCTRL_PIN(164, "vISH_UART0_RXD"),
63519a8a777SMika Westerberg 	PINCTRL_PIN(165, "vISH_UART0_CTS_B"),
63619a8a777SMika Westerberg 	PINCTRL_PIN(166, "vISH_UART0_RTS_B"),
63719a8a777SMika Westerberg 	PINCTRL_PIN(167, "vISH_UART1_TXD"),
63819a8a777SMika Westerberg 	PINCTRL_PIN(168, "vISH_UART1_RXD"),
63919a8a777SMika Westerberg 	PINCTRL_PIN(169, "vISH_UART1_CTS_B"),
64019a8a777SMika Westerberg 	PINCTRL_PIN(170, "vISH_UART1_RTS_B"),
64119a8a777SMika Westerberg 	PINCTRL_PIN(171, "vCNV_BT_I2S_BCLK"),
64219a8a777SMika Westerberg 	PINCTRL_PIN(172, "vCNV_BT_I2S_WS_SYNC"),
64319a8a777SMika Westerberg 	PINCTRL_PIN(173, "vCNV_BT_I2S_SDO"),
64419a8a777SMika Westerberg 	PINCTRL_PIN(174, "vCNV_BT_I2S_SDI"),
64519a8a777SMika Westerberg 	PINCTRL_PIN(175, "vSSP2_SCLK"),
64619a8a777SMika Westerberg 	PINCTRL_PIN(176, "vSSP2_SFRM"),
64719a8a777SMika Westerberg 	PINCTRL_PIN(177, "vSSP2_TXD"),
64819a8a777SMika Westerberg 	PINCTRL_PIN(178, "vSSP2_RXD"),
64919a8a777SMika Westerberg 	PINCTRL_PIN(179, "vCNV_GNSS_HOST_WAKEB"),
65019a8a777SMika Westerberg 	PINCTRL_PIN(180, "vSD3_CD_B"),
65119a8a777SMika Westerberg 	/* GPP_C */
65219a8a777SMika Westerberg 	PINCTRL_PIN(181, "SMBCLK"),
65319a8a777SMika Westerberg 	PINCTRL_PIN(182, "SMBDATA"),
65419a8a777SMika Westerberg 	PINCTRL_PIN(183, "SMBALERTB"),
65519a8a777SMika Westerberg 	PINCTRL_PIN(184, "SML0CLK"),
65619a8a777SMika Westerberg 	PINCTRL_PIN(185, "SML0DATA"),
65719a8a777SMika Westerberg 	PINCTRL_PIN(186, "SML0ALERTB"),
65819a8a777SMika Westerberg 	PINCTRL_PIN(187, "SML1CLK"),
65919a8a777SMika Westerberg 	PINCTRL_PIN(188, "SML1DATA"),
66019a8a777SMika Westerberg 	PINCTRL_PIN(189, "UART0_RXD"),
66119a8a777SMika Westerberg 	PINCTRL_PIN(190, "UART0_TXD"),
66219a8a777SMika Westerberg 	PINCTRL_PIN(191, "UART0_RTSB"),
66319a8a777SMika Westerberg 	PINCTRL_PIN(192, "UART0_CTSB"),
66419a8a777SMika Westerberg 	PINCTRL_PIN(193, "UART1_RXD"),
66519a8a777SMika Westerberg 	PINCTRL_PIN(194, "UART1_TXD"),
66619a8a777SMika Westerberg 	PINCTRL_PIN(195, "UART1_RTSB"),
66719a8a777SMika Westerberg 	PINCTRL_PIN(196, "UART1_CTSB"),
66819a8a777SMika Westerberg 	PINCTRL_PIN(197, "I2C0_SDA"),
66919a8a777SMika Westerberg 	PINCTRL_PIN(198, "I2C0_SCL"),
67019a8a777SMika Westerberg 	PINCTRL_PIN(199, "I2C1_SDA"),
67119a8a777SMika Westerberg 	PINCTRL_PIN(200, "I2C1_SCL"),
67219a8a777SMika Westerberg 	PINCTRL_PIN(201, "UART2_RXD"),
67319a8a777SMika Westerberg 	PINCTRL_PIN(202, "UART2_TXD"),
67419a8a777SMika Westerberg 	PINCTRL_PIN(203, "UART2_RTSB"),
67519a8a777SMika Westerberg 	PINCTRL_PIN(204, "UART2_CTSB"),
67619a8a777SMika Westerberg 	/* GPP_E */
67719a8a777SMika Westerberg 	PINCTRL_PIN(205, "SATAXPCIE_0"),
67819a8a777SMika Westerberg 	PINCTRL_PIN(206, "SATAXPCIE_1"),
67919a8a777SMika Westerberg 	PINCTRL_PIN(207, "SATAXPCIE_2"),
68019a8a777SMika Westerberg 	PINCTRL_PIN(208, "CPU_GP_0"),
68119a8a777SMika Westerberg 	PINCTRL_PIN(209, "SATA_DEVSLP_0"),
68219a8a777SMika Westerberg 	PINCTRL_PIN(210, "SATA_DEVSLP_1"),
68319a8a777SMika Westerberg 	PINCTRL_PIN(211, "SATA_DEVSLP_2"),
68419a8a777SMika Westerberg 	PINCTRL_PIN(212, "CPU_GP_1"),
68519a8a777SMika Westerberg 	PINCTRL_PIN(213, "SATA_LEDB"),
68619a8a777SMika Westerberg 	PINCTRL_PIN(214, "USB2_OCB_0"),
68719a8a777SMika Westerberg 	PINCTRL_PIN(215, "USB2_OCB_1"),
68819a8a777SMika Westerberg 	PINCTRL_PIN(216, "USB2_OCB_2"),
68919a8a777SMika Westerberg 	PINCTRL_PIN(217, "USB2_OCB_3"),
69019a8a777SMika Westerberg 	PINCTRL_PIN(218, "DDSP_HPD_0"),
69119a8a777SMika Westerberg 	PINCTRL_PIN(219, "DDSP_HPD_1"),
69219a8a777SMika Westerberg 	PINCTRL_PIN(220, "DDSP_HPD_2"),
69319a8a777SMika Westerberg 	PINCTRL_PIN(221, "DDSP_HPD_3"),
69419a8a777SMika Westerberg 	PINCTRL_PIN(222, "EDP_HPD"),
69519a8a777SMika Westerberg 	PINCTRL_PIN(223, "DDPB_CTRLCLK"),
69619a8a777SMika Westerberg 	PINCTRL_PIN(224, "DDPB_CTRLDATA"),
69719a8a777SMika Westerberg 	PINCTRL_PIN(225, "DDPC_CTRLCLK"),
69819a8a777SMika Westerberg 	PINCTRL_PIN(226, "DDPC_CTRLDATA"),
69919a8a777SMika Westerberg 	PINCTRL_PIN(227, "DDPD_CTRLCLK"),
70019a8a777SMika Westerberg 	PINCTRL_PIN(228, "DDPD_CTRLDATA"),
70119a8a777SMika Westerberg 	/* JTAG */
70219a8a777SMika Westerberg 	PINCTRL_PIN(229, "JTAG_TDO"),
70319a8a777SMika Westerberg 	PINCTRL_PIN(230, "JTAGX"),
70419a8a777SMika Westerberg 	PINCTRL_PIN(231, "PRDYB"),
70519a8a777SMika Westerberg 	PINCTRL_PIN(232, "PREQB"),
70619a8a777SMika Westerberg 	PINCTRL_PIN(233, "CPU_TRSTB"),
70719a8a777SMika Westerberg 	PINCTRL_PIN(234, "JTAG_TDI"),
70819a8a777SMika Westerberg 	PINCTRL_PIN(235, "JTAG_TMS"),
70919a8a777SMika Westerberg 	PINCTRL_PIN(236, "JTAG_TCK"),
71019a8a777SMika Westerberg 	PINCTRL_PIN(237, "ITP_PMODE"),
71119a8a777SMika Westerberg 	/* HVCMOS */
71219a8a777SMika Westerberg 	PINCTRL_PIN(238, "L_BKLTEN"),
71319a8a777SMika Westerberg 	PINCTRL_PIN(239, "L_BKLTCTL"),
71419a8a777SMika Westerberg 	PINCTRL_PIN(240, "L_VDDEN"),
71519a8a777SMika Westerberg 	PINCTRL_PIN(241, "SYS_PWROK"),
71619a8a777SMika Westerberg 	PINCTRL_PIN(242, "SYS_RESETB"),
71719a8a777SMika Westerberg 	PINCTRL_PIN(243, "MLK_RSTB"),
71819a8a777SMika Westerberg };
71919a8a777SMika Westerberg 
72019a8a777SMika Westerberg static const unsigned int cnllp_spi0_pins[] = { 40, 41, 42, 43, 7 };
72119a8a777SMika Westerberg static const unsigned int cnllp_spi0_modes[] = { 1, 1, 1, 1, 2 };
72219a8a777SMika Westerberg static const unsigned int cnllp_spi1_pins[] = { 44, 45, 46, 47, 11 };
72319a8a777SMika Westerberg static const unsigned int cnllp_spi1_modes[] = { 1, 1, 1, 1, 2 };
72419a8a777SMika Westerberg static const unsigned int cnllp_spi2_pins[] = { 77, 78, 79, 80, 83 };
72519a8a777SMika Westerberg static const unsigned int cnllp_spi2_modes[] = { 3, 3, 3, 3, 2 };
72619a8a777SMika Westerberg 
72719a8a777SMika Westerberg static const unsigned int cnllp_i2c0_pins[] = { 197, 198 };
72819a8a777SMika Westerberg static const unsigned int cnllp_i2c1_pins[] = { 199, 200 };
72919a8a777SMika Westerberg static const unsigned int cnllp_i2c2_pins[] = { 121, 122 };
73019a8a777SMika Westerberg static const unsigned int cnllp_i2c3_pins[] = { 123, 124 };
73119a8a777SMika Westerberg static const unsigned int cnllp_i2c4_pins[] = { 125, 126 };
73219a8a777SMika Westerberg static const unsigned int cnllp_i2c5_pins[] = { 127, 128 };
73319a8a777SMika Westerberg 
73419a8a777SMika Westerberg static const unsigned int cnllp_uart0_pins[] = { 189, 190, 191, 192 };
73519a8a777SMika Westerberg static const unsigned int cnllp_uart1_pins[] = { 193, 194, 195, 196 };
73619a8a777SMika Westerberg static const unsigned int cnllp_uart2_pins[] = { 201, 202, 203, 204 };
73719a8a777SMika Westerberg 
73819a8a777SMika Westerberg static const struct intel_pingroup cnllp_groups[] = {
73919a8a777SMika Westerberg 	PIN_GROUP("spi0_grp", cnllp_spi0_pins, cnllp_spi0_modes),
74019a8a777SMika Westerberg 	PIN_GROUP("spi1_grp", cnllp_spi1_pins, cnllp_spi1_modes),
74119a8a777SMika Westerberg 	PIN_GROUP("spi2_grp", cnllp_spi2_pins, cnllp_spi2_modes),
74219a8a777SMika Westerberg 	PIN_GROUP("i2c0_grp", cnllp_i2c0_pins, 1),
74319a8a777SMika Westerberg 	PIN_GROUP("i2c1_grp", cnllp_i2c1_pins, 1),
74419a8a777SMika Westerberg 	PIN_GROUP("i2c2_grp", cnllp_i2c2_pins, 1),
74519a8a777SMika Westerberg 	PIN_GROUP("i2c3_grp", cnllp_i2c3_pins, 1),
74619a8a777SMika Westerberg 	PIN_GROUP("i2c4_grp", cnllp_i2c4_pins, 1),
74719a8a777SMika Westerberg 	PIN_GROUP("i2c5_grp", cnllp_i2c5_pins, 1),
74819a8a777SMika Westerberg 	PIN_GROUP("uart0_grp", cnllp_uart0_pins, 1),
74919a8a777SMika Westerberg 	PIN_GROUP("uart1_grp", cnllp_uart1_pins, 1),
75019a8a777SMika Westerberg 	PIN_GROUP("uart2_grp", cnllp_uart2_pins, 1),
75119a8a777SMika Westerberg };
75219a8a777SMika Westerberg 
75319a8a777SMika Westerberg static const char * const cnllp_spi0_groups[] = { "spi0_grp" };
75419a8a777SMika Westerberg static const char * const cnllp_spi1_groups[] = { "spi1_grp" };
75519a8a777SMika Westerberg static const char * const cnllp_spi2_groups[] = { "spi2_grp" };
75619a8a777SMika Westerberg static const char * const cnllp_i2c0_groups[] = { "i2c0_grp" };
75719a8a777SMika Westerberg static const char * const cnllp_i2c1_groups[] = { "i2c1_grp" };
75819a8a777SMika Westerberg static const char * const cnllp_i2c2_groups[] = { "i2c2_grp" };
75919a8a777SMika Westerberg static const char * const cnllp_i2c3_groups[] = { "i2c3_grp" };
76019a8a777SMika Westerberg static const char * const cnllp_i2c4_groups[] = { "i2c4_grp" };
76119a8a777SMika Westerberg static const char * const cnllp_i2c5_groups[] = { "i2c5_grp" };
76219a8a777SMika Westerberg static const char * const cnllp_uart0_groups[] = { "uart0_grp" };
76319a8a777SMika Westerberg static const char * const cnllp_uart1_groups[] = { "uart1_grp" };
76419a8a777SMika Westerberg static const char * const cnllp_uart2_groups[] = { "uart2_grp" };
76519a8a777SMika Westerberg 
76619a8a777SMika Westerberg static const struct intel_function cnllp_functions[] = {
76719a8a777SMika Westerberg 	FUNCTION("spi0", cnllp_spi0_groups),
76819a8a777SMika Westerberg 	FUNCTION("spi1", cnllp_spi1_groups),
76919a8a777SMika Westerberg 	FUNCTION("spi2", cnllp_spi2_groups),
77019a8a777SMika Westerberg 	FUNCTION("i2c0", cnllp_i2c0_groups),
77119a8a777SMika Westerberg 	FUNCTION("i2c1", cnllp_i2c1_groups),
77219a8a777SMika Westerberg 	FUNCTION("i2c2", cnllp_i2c2_groups),
77319a8a777SMika Westerberg 	FUNCTION("i2c3", cnllp_i2c3_groups),
77419a8a777SMika Westerberg 	FUNCTION("i2c4", cnllp_i2c4_groups),
77519a8a777SMika Westerberg 	FUNCTION("i2c5", cnllp_i2c5_groups),
77619a8a777SMika Westerberg 	FUNCTION("uart0", cnllp_uart0_groups),
77719a8a777SMika Westerberg 	FUNCTION("uart1", cnllp_uart1_groups),
77819a8a777SMika Westerberg 	FUNCTION("uart2", cnllp_uart2_groups),
77919a8a777SMika Westerberg };
78019a8a777SMika Westerberg 
78119a8a777SMika Westerberg static const struct intel_padgroup cnllp_community0_gpps[] = {
782cb5fda41SMika Westerberg 	CNL_GPP(0, 0, 24, 0),				/* GPP_A */
783cb5fda41SMika Westerberg 	CNL_GPP(1, 25, 50, 32),				/* GPP_B */
784cb5fda41SMika Westerberg 	CNL_GPP(2, 51, 58, 64),				/* GPP_G */
7855ba092edSAndy Shevchenko 	CNL_GPP(3, 59, 67, INTEL_GPIO_BASE_NOMAP),	/* SPI */
78619a8a777SMika Westerberg };
78719a8a777SMika Westerberg 
78819a8a777SMika Westerberg static const struct intel_padgroup cnllp_community1_gpps[] = {
789cb5fda41SMika Westerberg 	CNL_GPP(0, 68, 92, 96),				/* GPP_D */
790cb5fda41SMika Westerberg 	CNL_GPP(1, 93, 116, 128),			/* GPP_F */
791cb5fda41SMika Westerberg 	CNL_GPP(2, 117, 140, 160),			/* GPP_H */
792cb5fda41SMika Westerberg 	CNL_GPP(3, 141, 172, 192),			/* vGPIO */
793cb5fda41SMika Westerberg 	CNL_GPP(4, 173, 180, 224),			/* vGPIO */
79419a8a777SMika Westerberg };
79519a8a777SMika Westerberg 
79619a8a777SMika Westerberg static const struct intel_padgroup cnllp_community4_gpps[] = {
797cb5fda41SMika Westerberg 	CNL_GPP(0, 181, 204, 256),			/* GPP_C */
798cb5fda41SMika Westerberg 	CNL_GPP(1, 205, 228, 288),			/* GPP_E */
7995ba092edSAndy Shevchenko 	CNL_GPP(2, 229, 237, INTEL_GPIO_BASE_NOMAP),	/* JTAG */
8005ba092edSAndy Shevchenko 	CNL_GPP(3, 238, 243, INTEL_GPIO_BASE_NOMAP),	/* HVCMOS */
80119a8a777SMika Westerberg };
80219a8a777SMika Westerberg 
80319a8a777SMika Westerberg static const struct intel_community cnllp_communities[] = {
804701372c7SAndy Shevchenko 	CNL_LP_COMMUNITY(0, 0, 67, cnllp_community0_gpps),
805701372c7SAndy Shevchenko 	CNL_LP_COMMUNITY(1, 68, 180, cnllp_community1_gpps),
806701372c7SAndy Shevchenko 	CNL_LP_COMMUNITY(2, 181, 243, cnllp_community4_gpps),
80719a8a777SMika Westerberg };
80819a8a777SMika Westerberg 
80919a8a777SMika Westerberg static const struct intel_pinctrl_soc_data cnllp_soc_data = {
81019a8a777SMika Westerberg 	.pins = cnllp_pins,
81119a8a777SMika Westerberg 	.npins = ARRAY_SIZE(cnllp_pins),
81219a8a777SMika Westerberg 	.groups = cnllp_groups,
81319a8a777SMika Westerberg 	.ngroups = ARRAY_SIZE(cnllp_groups),
81419a8a777SMika Westerberg 	.functions = cnllp_functions,
81519a8a777SMika Westerberg 	.nfunctions = ARRAY_SIZE(cnllp_functions),
81619a8a777SMika Westerberg 	.communities = cnllp_communities,
81719a8a777SMika Westerberg 	.ncommunities = ARRAY_SIZE(cnllp_communities),
81819a8a777SMika Westerberg };
81919a8a777SMika Westerberg 
82019a8a777SMika Westerberg static const struct acpi_device_id cnl_pinctrl_acpi_match[] = {
821a663ccf0SMika Westerberg 	{ "INT3450", (kernel_ulong_t)&cnlh_soc_data },
82219a8a777SMika Westerberg 	{ "INT34BB", (kernel_ulong_t)&cnllp_soc_data },
8233d5d096eSAndy Shevchenko 	{ }
82419a8a777SMika Westerberg };
82519a8a777SMika Westerberg MODULE_DEVICE_TABLE(acpi, cnl_pinctrl_acpi_match);
82619a8a777SMika Westerberg 
82705a100e4SAndy Shevchenko static INTEL_PINCTRL_PM_OPS(cnl_pinctrl_pm_ops);
82819a8a777SMika Westerberg 
82919a8a777SMika Westerberg static struct platform_driver cnl_pinctrl_driver = {
8309080e77bSAndy Shevchenko 	.probe = intel_pinctrl_probe_by_hid,
83119a8a777SMika Westerberg 	.driver = {
83219a8a777SMika Westerberg 		.name = "cannonlake-pinctrl",
83319a8a777SMika Westerberg 		.acpi_match_table = cnl_pinctrl_acpi_match,
83419a8a777SMika Westerberg 		.pm = &cnl_pinctrl_pm_ops,
83519a8a777SMika Westerberg 	},
83619a8a777SMika Westerberg };
83719a8a777SMika Westerberg module_platform_driver(cnl_pinctrl_driver);
83819a8a777SMika Westerberg 
83919a8a777SMika Westerberg MODULE_AUTHOR("Mika Westerberg <mika.westerberg@linux.intel.com>");
84019a8a777SMika Westerberg MODULE_DESCRIPTION("Intel Cannon Lake PCH pinctrl/GPIO driver");
84119a8a777SMika Westerberg MODULE_LICENSE("GPL v2");
842*34393c36SAndy Shevchenko MODULE_IMPORT_NS(PINCTRL_INTEL);
843