xref: /openbmc/linux/drivers/pinctrl/intel/pinctrl-lewisburg.c (revision c900529f3d9161bfde5cca0754f83b4d3c3e0220)
1875a92b3SAndy Shevchenko // SPDX-License-Identifier: GPL-2.0
2e480b745SMika Westerberg /*
3e480b745SMika Westerberg  * Intel Lewisburg pinctrl/GPIO driver
4e480b745SMika Westerberg  *
5e480b745SMika Westerberg  * Copyright (C) 2017, Intel Corporation
6e480b745SMika Westerberg  * Author: Mika Westerberg <mika.westerberg@linux.intel.com>
7e480b745SMika Westerberg  */
8e480b745SMika Westerberg 
91068934cSAndy Shevchenko #include <linux/mod_devicetable.h>
10e480b745SMika Westerberg #include <linux/module.h>
11e480b745SMika Westerberg #include <linux/platform_device.h>
12677506eeSAndy Shevchenko 
13e480b745SMika Westerberg #include <linux/pinctrl/pinctrl.h>
14e480b745SMika Westerberg 
15e480b745SMika Westerberg #include "pinctrl-intel.h"
16e480b745SMika Westerberg 
17e480b745SMika Westerberg #define LBG_PAD_OWN	0x020
18e480b745SMika Westerberg #define LBG_PADCFGLOCK	0x060
19e480b745SMika Westerberg #define LBG_HOSTSW_OWN	0x080
203b1e9188SAndy Shevchenko #define LBG_GPI_IS	0x100
21e480b745SMika Westerberg #define LBG_GPI_IE	0x110
22e480b745SMika Westerberg 
23e480b745SMika Westerberg #define LBG_COMMUNITY(b, s, e)				\
246a066263SAndy Shevchenko 	INTEL_COMMUNITY_SIZE(b, s, e, 24, 3, LBG)
25e480b745SMika Westerberg 
26e66ff71fSAndy Shevchenko /* Lewisburg */
27e480b745SMika Westerberg static const struct pinctrl_pin_desc lbg_pins[] = {
28e480b745SMika Westerberg 	/* GPP_A */
29e480b745SMika Westerberg 	PINCTRL_PIN(0, "RCINB"),
30e480b745SMika Westerberg 	PINCTRL_PIN(1, "LAD_0"),
31e480b745SMika Westerberg 	PINCTRL_PIN(2, "LAD_1"),
32e480b745SMika Westerberg 	PINCTRL_PIN(3, "LAD_2"),
33e480b745SMika Westerberg 	PINCTRL_PIN(4, "LAD_3"),
34e480b745SMika Westerberg 	PINCTRL_PIN(5, "LFRAMEB"),
35e480b745SMika Westerberg 	PINCTRL_PIN(6, "SERIRQ"),
36e480b745SMika Westerberg 	PINCTRL_PIN(7, "PIRQAB"),
37e480b745SMika Westerberg 	PINCTRL_PIN(8, "CLKRUNB"),
38e480b745SMika Westerberg 	PINCTRL_PIN(9, "CLKOUT_LPC_0"),
39e480b745SMika Westerberg 	PINCTRL_PIN(10, "CLKOUT_LPC_1"),
40e480b745SMika Westerberg 	PINCTRL_PIN(11, "PMEB"),
41e480b745SMika Westerberg 	PINCTRL_PIN(12, "BM_BUSYB"),
42e480b745SMika Westerberg 	PINCTRL_PIN(13, "SUSWARNB_SUSPWRDNACK"),
43e480b745SMika Westerberg 	PINCTRL_PIN(14, "ESPI_RESETB"),
44e480b745SMika Westerberg 	PINCTRL_PIN(15, "SUSACKB"),
45e480b745SMika Westerberg 	PINCTRL_PIN(16, "CLKOUT_LPC_2"),
46e480b745SMika Westerberg 	PINCTRL_PIN(17, "GPP_A_17"),
47e480b745SMika Westerberg 	PINCTRL_PIN(18, "GPP_A_18"),
48e480b745SMika Westerberg 	PINCTRL_PIN(19, "GPP_A_19"),
49e480b745SMika Westerberg 	PINCTRL_PIN(20, "GPP_A_20"),
50e480b745SMika Westerberg 	PINCTRL_PIN(21, "GPP_A_21"),
51e480b745SMika Westerberg 	PINCTRL_PIN(22, "GPP_A_22"),
52e480b745SMika Westerberg 	PINCTRL_PIN(23, "GPP_A_23"),
53e480b745SMika Westerberg 	/* GPP_B */
54e480b745SMika Westerberg 	PINCTRL_PIN(24, "CORE_VID_0"),
55e480b745SMika Westerberg 	PINCTRL_PIN(25, "CORE_VID_1"),
56e480b745SMika Westerberg 	PINCTRL_PIN(26, "VRALERTB"),
57e480b745SMika Westerberg 	PINCTRL_PIN(27, "CPU_GP_2"),
58e480b745SMika Westerberg 	PINCTRL_PIN(28, "CPU_GP_3"),
59e480b745SMika Westerberg 	PINCTRL_PIN(29, "SRCCLKREQB_0"),
60e480b745SMika Westerberg 	PINCTRL_PIN(30, "SRCCLKREQB_1"),
61e480b745SMika Westerberg 	PINCTRL_PIN(31, "SRCCLKREQB_2"),
62e480b745SMika Westerberg 	PINCTRL_PIN(32, "SRCCLKREQB_3"),
63e480b745SMika Westerberg 	PINCTRL_PIN(33, "SRCCLKREQB_4"),
64e480b745SMika Westerberg 	PINCTRL_PIN(34, "SRCCLKREQB_5"),
65e480b745SMika Westerberg 	PINCTRL_PIN(35, "GPP_B_11"),
66e66ff71fSAndy Shevchenko 	PINCTRL_PIN(36, "SLP_S0B"),
67e480b745SMika Westerberg 	PINCTRL_PIN(37, "PLTRSTB"),
68e480b745SMika Westerberg 	PINCTRL_PIN(38, "SPKR"),
69e480b745SMika Westerberg 	PINCTRL_PIN(39, "GPP_B_15"),
70e480b745SMika Westerberg 	PINCTRL_PIN(40, "GPP_B_16"),
71e480b745SMika Westerberg 	PINCTRL_PIN(41, "GPP_B_17"),
72e480b745SMika Westerberg 	PINCTRL_PIN(42, "GPP_B_18"),
73e480b745SMika Westerberg 	PINCTRL_PIN(43, "GPP_B_19"),
74e480b745SMika Westerberg 	PINCTRL_PIN(44, "GPP_B_20"),
75e480b745SMika Westerberg 	PINCTRL_PIN(45, "GPP_B_21"),
76e480b745SMika Westerberg 	PINCTRL_PIN(46, "GPP_B_22"),
77e480b745SMika Westerberg 	PINCTRL_PIN(47, "SML1ALERTB"),
78e480b745SMika Westerberg 	/* GPP_F */
79e480b745SMika Westerberg 	PINCTRL_PIN(48, "SATAXPCIE_3"),
80e480b745SMika Westerberg 	PINCTRL_PIN(49, "SATAXPCIE_4"),
81e480b745SMika Westerberg 	PINCTRL_PIN(50, "SATAXPCIE_5"),
82e480b745SMika Westerberg 	PINCTRL_PIN(51, "SATAXPCIE_6"),
83e480b745SMika Westerberg 	PINCTRL_PIN(52, "SATAXPCIE_7"),
84e480b745SMika Westerberg 	PINCTRL_PIN(53, "SATA_DEVSLP_3"),
85e480b745SMika Westerberg 	PINCTRL_PIN(54, "SATA_DEVSLP_4"),
86e480b745SMika Westerberg 	PINCTRL_PIN(55, "SATA_DEVSLP_5"),
87e480b745SMika Westerberg 	PINCTRL_PIN(56, "SATA_DEVSLP_6"),
88e480b745SMika Westerberg 	PINCTRL_PIN(57, "SATA_DEVSLP_7"),
89e480b745SMika Westerberg 	PINCTRL_PIN(58, "SATA_SCLOCK"),
90e480b745SMika Westerberg 	PINCTRL_PIN(59, "SATA_SLOAD"),
91e480b745SMika Westerberg 	PINCTRL_PIN(60, "SATA_SDATAOUT1"),
92e480b745SMika Westerberg 	PINCTRL_PIN(61, "SATA_SDATAOUT0"),
93e480b745SMika Westerberg 	PINCTRL_PIN(62, "SSATA_LEDB"),
94e480b745SMika Westerberg 	PINCTRL_PIN(63, "USB2_OCB_4"),
95e480b745SMika Westerberg 	PINCTRL_PIN(64, "USB2_OCB_5"),
96e480b745SMika Westerberg 	PINCTRL_PIN(65, "USB2_OCB_6"),
97e480b745SMika Westerberg 	PINCTRL_PIN(66, "USB2_OCB_7"),
98e480b745SMika Westerberg 	PINCTRL_PIN(67, "GBE_SMBUS_CLK"),
99e480b745SMika Westerberg 	PINCTRL_PIN(68, "GBE_SMBDATA"),
100e480b745SMika Westerberg 	PINCTRL_PIN(69, "GBE_SMBALRTN"),
101e480b745SMika Westerberg 	PINCTRL_PIN(70, "SSATA_SCLOCK"),
102e480b745SMika Westerberg 	PINCTRL_PIN(71, "SSATA_SLOAD"),
103e480b745SMika Westerberg 	/* GPP_C */
104e480b745SMika Westerberg 	PINCTRL_PIN(72, "SMBCLK"),
105e480b745SMika Westerberg 	PINCTRL_PIN(73, "SMBDATA"),
106e480b745SMika Westerberg 	PINCTRL_PIN(74, "SMBALERTB"),
107e480b745SMika Westerberg 	PINCTRL_PIN(75, "SML0CLK"),
108e480b745SMika Westerberg 	PINCTRL_PIN(76, "SML0DATA"),
109e480b745SMika Westerberg 	PINCTRL_PIN(77, "SML0ALERTB"),
110e480b745SMika Westerberg 	PINCTRL_PIN(78, "SML1CLK"),
111e480b745SMika Westerberg 	PINCTRL_PIN(79, "SML1DATA"),
112e480b745SMika Westerberg 	PINCTRL_PIN(80, "GPP_C_8"),
113e480b745SMika Westerberg 	PINCTRL_PIN(81, "GPP_C_9"),
114e480b745SMika Westerberg 	PINCTRL_PIN(82, "GPP_C_10"),
115e480b745SMika Westerberg 	PINCTRL_PIN(83, "GPP_C_11"),
116e480b745SMika Westerberg 	PINCTRL_PIN(84, "GPP_C_12"),
117e480b745SMika Westerberg 	PINCTRL_PIN(85, "GPP_C_13"),
118e480b745SMika Westerberg 	PINCTRL_PIN(86, "GPP_C_14"),
119e480b745SMika Westerberg 	PINCTRL_PIN(87, "GPP_C_15"),
120e480b745SMika Westerberg 	PINCTRL_PIN(88, "GPP_C_16"),
121e480b745SMika Westerberg 	PINCTRL_PIN(89, "GPP_C_17"),
122e480b745SMika Westerberg 	PINCTRL_PIN(90, "GPP_C_18"),
123e480b745SMika Westerberg 	PINCTRL_PIN(91, "GPP_C_19"),
124e480b745SMika Westerberg 	PINCTRL_PIN(92, "GPP_C_20"),
125e480b745SMika Westerberg 	PINCTRL_PIN(93, "GPP_C_21"),
126e480b745SMika Westerberg 	PINCTRL_PIN(94, "GPP_C_22"),
127e480b745SMika Westerberg 	PINCTRL_PIN(95, "GPP_C_23"),
128e480b745SMika Westerberg 	/* GPP_D */
129e480b745SMika Westerberg 	PINCTRL_PIN(96, "GPP_D_0"),
130e480b745SMika Westerberg 	PINCTRL_PIN(97, "GPP_D_1"),
131e480b745SMika Westerberg 	PINCTRL_PIN(98, "GPP_D_2"),
132e480b745SMika Westerberg 	PINCTRL_PIN(99, "GPP_D_3"),
133e480b745SMika Westerberg 	PINCTRL_PIN(100, "GPP_D_4"),
134e480b745SMika Westerberg 	PINCTRL_PIN(101, "SSP0_SFRM"),
135e480b745SMika Westerberg 	PINCTRL_PIN(102, "SSP0_TXD"),
136e480b745SMika Westerberg 	PINCTRL_PIN(103, "SSP0_RXD"),
137e480b745SMika Westerberg 	PINCTRL_PIN(104, "SSP0_SCLK"),
138e480b745SMika Westerberg 	PINCTRL_PIN(105, "SSATA_DEVSLP_3"),
139e480b745SMika Westerberg 	PINCTRL_PIN(106, "SSATA_DEVSLP_4"),
140e480b745SMika Westerberg 	PINCTRL_PIN(107, "SSATA_DEVSLP_5"),
141e480b745SMika Westerberg 	PINCTRL_PIN(108, "SSATA_SDATAOUT1"),
142e480b745SMika Westerberg 	PINCTRL_PIN(109, "SML0BCLK_SML0BCLKIE"),
143e480b745SMika Westerberg 	PINCTRL_PIN(110, "SML0BDATA_SML0BDATAIE"),
144e480b745SMika Westerberg 	PINCTRL_PIN(111, "SSATA_SDATAOUT0"),
145e480b745SMika Westerberg 	PINCTRL_PIN(112, "SML0BALERTB_SML0BALERTBIE"),
146e480b745SMika Westerberg 	PINCTRL_PIN(113, "DMIC_CLK_1"),
147e480b745SMika Westerberg 	PINCTRL_PIN(114, "DMIC_DATA_1"),
148e480b745SMika Westerberg 	PINCTRL_PIN(115, "DMIC_CLK_0"),
149e480b745SMika Westerberg 	PINCTRL_PIN(116, "DMIC_DATA_0"),
150e480b745SMika Westerberg 	PINCTRL_PIN(117, "IE_UART_RXD"),
151e480b745SMika Westerberg 	PINCTRL_PIN(118, "IE_UART_TXD"),
152e480b745SMika Westerberg 	PINCTRL_PIN(119, "GPP_D_23"),
153e480b745SMika Westerberg 	/* GPP_E */
154e480b745SMika Westerberg 	PINCTRL_PIN(120, "SATAXPCIE_0"),
155e480b745SMika Westerberg 	PINCTRL_PIN(121, "SATAXPCIE_1"),
156e480b745SMika Westerberg 	PINCTRL_PIN(122, "SATAXPCIE_2"),
157e480b745SMika Westerberg 	PINCTRL_PIN(123, "CPU_GP_0"),
158e480b745SMika Westerberg 	PINCTRL_PIN(124, "SATA_DEVSLP_0"),
159e480b745SMika Westerberg 	PINCTRL_PIN(125, "SATA_DEVSLP_1"),
160e480b745SMika Westerberg 	PINCTRL_PIN(126, "SATA_DEVSLP_2"),
161e480b745SMika Westerberg 	PINCTRL_PIN(127, "CPU_GP_1"),
162e480b745SMika Westerberg 	PINCTRL_PIN(128, "SATA_LEDB"),
163e480b745SMika Westerberg 	PINCTRL_PIN(129, "USB2_OCB_0"),
164e480b745SMika Westerberg 	PINCTRL_PIN(130, "USB2_OCB_1"),
165e480b745SMika Westerberg 	PINCTRL_PIN(131, "USB2_OCB_2"),
166e480b745SMika Westerberg 	PINCTRL_PIN(132, "USB2_OCB_3"),
167e480b745SMika Westerberg 	/* GPP_I */
168e480b745SMika Westerberg 	PINCTRL_PIN(133, "GBE_TDO"),
169e480b745SMika Westerberg 	PINCTRL_PIN(134, "GBE_TCK"),
170e480b745SMika Westerberg 	PINCTRL_PIN(135, "GBE_TMS"),
171e480b745SMika Westerberg 	PINCTRL_PIN(136, "GBE_TDI"),
172e480b745SMika Westerberg 	PINCTRL_PIN(137, "DO_RESET_INB"),
173e480b745SMika Westerberg 	PINCTRL_PIN(138, "DO_RESET_OUTB"),
174e480b745SMika Westerberg 	PINCTRL_PIN(139, "RESET_DONE"),
175e480b745SMika Westerberg 	PINCTRL_PIN(140, "GBE_TRST_N"),
176e480b745SMika Westerberg 	PINCTRL_PIN(141, "GBE_PCI_DIS"),
177e480b745SMika Westerberg 	PINCTRL_PIN(142, "GBE_LAN_DIS"),
178e480b745SMika Westerberg 	PINCTRL_PIN(143, "GPP_I_10"),
179e480b745SMika Westerberg 	/* GPP_J */
180e66ff71fSAndy Shevchenko 	PINCTRL_PIN(144, "GBE_LED_0_0"),
181e66ff71fSAndy Shevchenko 	PINCTRL_PIN(145, "GBE_LED_0_1"),
182e66ff71fSAndy Shevchenko 	PINCTRL_PIN(146, "GBE_LED_1_0"),
183e66ff71fSAndy Shevchenko 	PINCTRL_PIN(147, "GBE_LED_1_1"),
184e66ff71fSAndy Shevchenko 	PINCTRL_PIN(148, "GBE_LED_2_0"),
185e66ff71fSAndy Shevchenko 	PINCTRL_PIN(149, "GBE_LED_2_1"),
186e66ff71fSAndy Shevchenko 	PINCTRL_PIN(150, "GBE_LED_3_0"),
187e66ff71fSAndy Shevchenko 	PINCTRL_PIN(151, "GBE_LED_3_1"),
188e66ff71fSAndy Shevchenko 	PINCTRL_PIN(152, "GBE_SCL_0"),
189e66ff71fSAndy Shevchenko 	PINCTRL_PIN(153, "GBE_SDA_0"),
190e66ff71fSAndy Shevchenko 	PINCTRL_PIN(154, "GBE_SCL_1"),
191e66ff71fSAndy Shevchenko 	PINCTRL_PIN(155, "GBE_SDA_1"),
192e66ff71fSAndy Shevchenko 	PINCTRL_PIN(156, "GBE_SCL_2"),
193e66ff71fSAndy Shevchenko 	PINCTRL_PIN(157, "GBE_SDA_2"),
194e66ff71fSAndy Shevchenko 	PINCTRL_PIN(158, "GBE_SCL_3"),
195e66ff71fSAndy Shevchenko 	PINCTRL_PIN(159, "GBE_SDA_3"),
196e66ff71fSAndy Shevchenko 	PINCTRL_PIN(160, "GBE_SDP_0_0"),
197e66ff71fSAndy Shevchenko 	PINCTRL_PIN(161, "GBE_SDP_0_1"),
198e66ff71fSAndy Shevchenko 	PINCTRL_PIN(162, "GBE_SDP_1_0"),
199e66ff71fSAndy Shevchenko 	PINCTRL_PIN(163, "GBE_SDP_1_1"),
200e66ff71fSAndy Shevchenko 	PINCTRL_PIN(164, "GBE_SDP_2_0"),
201e66ff71fSAndy Shevchenko 	PINCTRL_PIN(165, "GBE_SDP_2_1"),
202e66ff71fSAndy Shevchenko 	PINCTRL_PIN(166, "GBE_SDP_3_0"),
203e66ff71fSAndy Shevchenko 	PINCTRL_PIN(167, "GBE_SDP_3_1"),
204e480b745SMika Westerberg 	/* GPP_K */
205e66ff71fSAndy Shevchenko 	PINCTRL_PIN(168, "GBE_RMIICLK"),
206e66ff71fSAndy Shevchenko 	PINCTRL_PIN(169, "GBE_RMII_RXD_0"),
207e66ff71fSAndy Shevchenko 	PINCTRL_PIN(170, "GBE_RMII_RXD_1"),
208e66ff71fSAndy Shevchenko 	PINCTRL_PIN(171, "GBE_RMII_CRS_DV"),
209e480b745SMika Westerberg 	PINCTRL_PIN(172, "GBE_RMII_TX_EN"),
210e66ff71fSAndy Shevchenko 	PINCTRL_PIN(173, "GBE_RMII_TXD_0"),
211e66ff71fSAndy Shevchenko 	PINCTRL_PIN(174, "GBE_RMII_TXD_1"),
212e66ff71fSAndy Shevchenko 	PINCTRL_PIN(175, "GBE_RMII_RX_ER"),
213e66ff71fSAndy Shevchenko 	PINCTRL_PIN(176, "GBE_RMII_ARBIN"),
214e66ff71fSAndy Shevchenko 	PINCTRL_PIN(177, "GBE_RMII_ARB_OUT"),
215e66ff71fSAndy Shevchenko 	PINCTRL_PIN(178, "PE_RST_N"),
216e480b745SMika Westerberg 	/* GPP_G */
217e66ff71fSAndy Shevchenko 	PINCTRL_PIN(179, "FAN_TACH_0"),
218e66ff71fSAndy Shevchenko 	PINCTRL_PIN(180, "FAN_TACH_1"),
219e66ff71fSAndy Shevchenko 	PINCTRL_PIN(181, "FAN_TACH_2"),
220e66ff71fSAndy Shevchenko 	PINCTRL_PIN(182, "FAN_TACH_3"),
221e66ff71fSAndy Shevchenko 	PINCTRL_PIN(183, "FAN_TACH_4"),
222e66ff71fSAndy Shevchenko 	PINCTRL_PIN(184, "FAN_TACH_5"),
223e66ff71fSAndy Shevchenko 	PINCTRL_PIN(185, "FAN_TACH_6"),
224e66ff71fSAndy Shevchenko 	PINCTRL_PIN(186, "FAN_TACH_7"),
225e66ff71fSAndy Shevchenko 	PINCTRL_PIN(187, "FAN_PWM_0"),
226e66ff71fSAndy Shevchenko 	PINCTRL_PIN(188, "FAN_PWM_1"),
227e66ff71fSAndy Shevchenko 	PINCTRL_PIN(189, "FAN_PWM_2"),
228e66ff71fSAndy Shevchenko 	PINCTRL_PIN(190, "FAN_PWM_3"),
229e66ff71fSAndy Shevchenko 	PINCTRL_PIN(191, "GSXDOUT"),
230e66ff71fSAndy Shevchenko 	PINCTRL_PIN(192, "GSXSLOAD"),
231e66ff71fSAndy Shevchenko 	PINCTRL_PIN(193, "GSXDIN"),
232e66ff71fSAndy Shevchenko 	PINCTRL_PIN(194, "GSXSRESETB"),
233e66ff71fSAndy Shevchenko 	PINCTRL_PIN(195, "GSXCLK"),
234e66ff71fSAndy Shevchenko 	PINCTRL_PIN(196, "ADR_COMPLETE"),
235e66ff71fSAndy Shevchenko 	PINCTRL_PIN(197, "NMIB"),
236e66ff71fSAndy Shevchenko 	PINCTRL_PIN(198, "SMIB"),
237e66ff71fSAndy Shevchenko 	PINCTRL_PIN(199, "SSATA_DEVSLP_0"),
238e66ff71fSAndy Shevchenko 	PINCTRL_PIN(200, "SSATA_DEVSLP_1"),
239e66ff71fSAndy Shevchenko 	PINCTRL_PIN(201, "SSATA_DEVSLP_2"),
240e66ff71fSAndy Shevchenko 	PINCTRL_PIN(202, "SSATAXPCIE0_SSATAGP0"),
241e480b745SMika Westerberg 	/* GPP_H */
242e66ff71fSAndy Shevchenko 	PINCTRL_PIN(203, "SRCCLKREQB_6"),
243e66ff71fSAndy Shevchenko 	PINCTRL_PIN(204, "SRCCLKREQB_7"),
244e66ff71fSAndy Shevchenko 	PINCTRL_PIN(205, "SRCCLKREQB_8"),
245e66ff71fSAndy Shevchenko 	PINCTRL_PIN(206, "SRCCLKREQB_9"),
246e66ff71fSAndy Shevchenko 	PINCTRL_PIN(207, "SRCCLKREQB_10"),
247e66ff71fSAndy Shevchenko 	PINCTRL_PIN(208, "SRCCLKREQB_11"),
248e66ff71fSAndy Shevchenko 	PINCTRL_PIN(209, "SRCCLKREQB_12"),
249e66ff71fSAndy Shevchenko 	PINCTRL_PIN(210, "SRCCLKREQB_13"),
250e66ff71fSAndy Shevchenko 	PINCTRL_PIN(211, "SRCCLKREQB_14"),
251e66ff71fSAndy Shevchenko 	PINCTRL_PIN(212, "SRCCLKREQB_15"),
252e66ff71fSAndy Shevchenko 	PINCTRL_PIN(213, "SML2CLK"),
253e66ff71fSAndy Shevchenko 	PINCTRL_PIN(214, "SML2DATA"),
254e66ff71fSAndy Shevchenko 	PINCTRL_PIN(215, "SML2ALERTB"),
255e66ff71fSAndy Shevchenko 	PINCTRL_PIN(216, "SML3CLK"),
256e66ff71fSAndy Shevchenko 	PINCTRL_PIN(217, "SML3DATA"),
257e66ff71fSAndy Shevchenko 	PINCTRL_PIN(218, "SML3ALERTB"),
258e66ff71fSAndy Shevchenko 	PINCTRL_PIN(219, "SML4CLK"),
259e66ff71fSAndy Shevchenko 	PINCTRL_PIN(220, "SML4DATA"),
260e66ff71fSAndy Shevchenko 	PINCTRL_PIN(221, "SML4ALERTB"),
261e66ff71fSAndy Shevchenko 	PINCTRL_PIN(222, "SSATAXPCIE1_SSATAGP1"),
262e66ff71fSAndy Shevchenko 	PINCTRL_PIN(223, "SSATAXPCIE2_SSATAGP2"),
263e66ff71fSAndy Shevchenko 	PINCTRL_PIN(224, "SSATAXPCIE3_SSATAGP3"),
264e66ff71fSAndy Shevchenko 	PINCTRL_PIN(225, "SSATAXPCIE4_SSATAGP4"),
265e66ff71fSAndy Shevchenko 	PINCTRL_PIN(226, "SSATAXPCIE5_SSATAGP5"),
266e480b745SMika Westerberg 	/* GPP_L */
267e66ff71fSAndy Shevchenko 	PINCTRL_PIN(227, "GPP_L_0"),
268e66ff71fSAndy Shevchenko 	PINCTRL_PIN(228, "EC_CSME_INTR_OUT"),
269e480b745SMika Westerberg 	PINCTRL_PIN(229, "VISA2CH0_D0"),
270e480b745SMika Westerberg 	PINCTRL_PIN(230, "VISA2CH0_D1"),
271e480b745SMika Westerberg 	PINCTRL_PIN(231, "VISA2CH0_D2"),
272e480b745SMika Westerberg 	PINCTRL_PIN(232, "VISA2CH0_D3"),
273e480b745SMika Westerberg 	PINCTRL_PIN(233, "VISA2CH0_D4"),
274e480b745SMika Westerberg 	PINCTRL_PIN(234, "VISA2CH0_D5"),
275e480b745SMika Westerberg 	PINCTRL_PIN(235, "VISA2CH0_D6"),
276e480b745SMika Westerberg 	PINCTRL_PIN(236, "VISA2CH0_D7"),
277e480b745SMika Westerberg 	PINCTRL_PIN(237, "VISA2CH0_CLK"),
278e480b745SMika Westerberg 	PINCTRL_PIN(238, "VISA2CH1_D0"),
279e480b745SMika Westerberg 	PINCTRL_PIN(239, "VISA2CH1_D1"),
280e480b745SMika Westerberg 	PINCTRL_PIN(240, "VISA2CH1_D2"),
281e480b745SMika Westerberg 	PINCTRL_PIN(241, "VISA2CH1_D3"),
282e480b745SMika Westerberg 	PINCTRL_PIN(242, "VISA2CH1_D4"),
283e480b745SMika Westerberg 	PINCTRL_PIN(243, "VISA2CH1_D5"),
284e480b745SMika Westerberg 	PINCTRL_PIN(244, "VISA2CH1_D6"),
285e480b745SMika Westerberg 	PINCTRL_PIN(245, "VISA2CH1_D7"),
286e480b745SMika Westerberg 	PINCTRL_PIN(246, "VISA2CH1_CLK"),
287e480b745SMika Westerberg };
288e480b745SMika Westerberg 
289e480b745SMika Westerberg static const struct intel_community lbg_communities[] = {
290e480b745SMika Westerberg 	LBG_COMMUNITY(0, 0, 71),
291e480b745SMika Westerberg 	LBG_COMMUNITY(1, 72, 132),
292196d9417SYuanyuan Zhong 	LBG_COMMUNITY(3, 133, 143),
293196d9417SYuanyuan Zhong 	LBG_COMMUNITY(4, 144, 178),
294196d9417SYuanyuan Zhong 	LBG_COMMUNITY(5, 179, 246),
295e480b745SMika Westerberg };
296e480b745SMika Westerberg 
297e480b745SMika Westerberg static const struct intel_pinctrl_soc_data lbg_soc_data = {
298e480b745SMika Westerberg 	.pins = lbg_pins,
299e480b745SMika Westerberg 	.npins = ARRAY_SIZE(lbg_pins),
300e480b745SMika Westerberg 	.communities = lbg_communities,
301e480b745SMika Westerberg 	.ncommunities = ARRAY_SIZE(lbg_communities),
302e480b745SMika Westerberg };
303e480b745SMika Westerberg 
304ae461087SAndy Shevchenko static INTEL_PINCTRL_PM_OPS(lbg_pinctrl_pm_ops);
305e480b745SMika Westerberg 
306e480b745SMika Westerberg static const struct acpi_device_id lbg_pinctrl_acpi_match[] = {
307883a60dfSAndy Shevchenko 	{ "INT3536", (kernel_ulong_t)&lbg_soc_data },
308e480b745SMika Westerberg 	{ }
309e480b745SMika Westerberg };
310e480b745SMika Westerberg MODULE_DEVICE_TABLE(acpi, lbg_pinctrl_acpi_match);
311e480b745SMika Westerberg 
312e480b745SMika Westerberg static struct platform_driver lbg_pinctrl_driver = {
313883a60dfSAndy Shevchenko 	.probe = intel_pinctrl_probe_by_hid,
314e480b745SMika Westerberg 	.driver = {
315e480b745SMika Westerberg 		.name = "lewisburg-pinctrl",
316e480b745SMika Westerberg 		.acpi_match_table = lbg_pinctrl_acpi_match,
317e480b745SMika Westerberg 		.pm = &lbg_pinctrl_pm_ops,
318e480b745SMika Westerberg 	},
319e480b745SMika Westerberg };
320e480b745SMika Westerberg module_platform_driver(lbg_pinctrl_driver);
321e480b745SMika Westerberg 
322e480b745SMika Westerberg MODULE_AUTHOR("Mika Westerberg <mika.westerberg@linux.intel.com>");
323e480b745SMika Westerberg MODULE_DESCRIPTION("Intel Lewisburg pinctrl/GPIO driver");
324e480b745SMika Westerberg MODULE_LICENSE("GPL v2");
325*34393c36SAndy Shevchenko MODULE_IMPORT_NS(PINCTRL_INTEL);
326