1*866c9c55SAndy Shevchenko // SPDX-License-Identifier: GPL-2.0 2*866c9c55SAndy Shevchenko /* 3*866c9c55SAndy Shevchenko * Intel Lakefield PCH pinctrl/GPIO driver 4*866c9c55SAndy Shevchenko * 5*866c9c55SAndy Shevchenko * Copyright (C) 2020, Intel Corporation 6*866c9c55SAndy Shevchenko * Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com> 7*866c9c55SAndy Shevchenko */ 8*866c9c55SAndy Shevchenko 9*866c9c55SAndy Shevchenko #include <linux/mod_devicetable.h> 10*866c9c55SAndy Shevchenko #include <linux/module.h> 11*866c9c55SAndy Shevchenko #include <linux/platform_device.h> 12*866c9c55SAndy Shevchenko 13*866c9c55SAndy Shevchenko #include <linux/pinctrl/pinctrl.h> 14*866c9c55SAndy Shevchenko 15*866c9c55SAndy Shevchenko #include "pinctrl-intel.h" 16*866c9c55SAndy Shevchenko 17*866c9c55SAndy Shevchenko #define LKF_PAD_OWN 0x020 18*866c9c55SAndy Shevchenko #define LKF_PADCFGLOCK 0x070 19*866c9c55SAndy Shevchenko #define LKF_HOSTSW_OWN 0x090 20*866c9c55SAndy Shevchenko #define LKF_GPI_IS 0x100 21*866c9c55SAndy Shevchenko #define LKF_GPI_IE 0x110 22*866c9c55SAndy Shevchenko 23*866c9c55SAndy Shevchenko #define LKF_GPP(r, s, e, g) \ 24*866c9c55SAndy Shevchenko { \ 25*866c9c55SAndy Shevchenko .reg_num = (r), \ 26*866c9c55SAndy Shevchenko .base = (s), \ 27*866c9c55SAndy Shevchenko .size = ((e) - (s) + 1), \ 28*866c9c55SAndy Shevchenko .gpio_base = (g), \ 29*866c9c55SAndy Shevchenko } 30*866c9c55SAndy Shevchenko 31*866c9c55SAndy Shevchenko #define LKF_COMMUNITY(b, s, e, g) \ 32*866c9c55SAndy Shevchenko { \ 33*866c9c55SAndy Shevchenko .barno = (b), \ 34*866c9c55SAndy Shevchenko .padown_offset = LKF_PAD_OWN, \ 35*866c9c55SAndy Shevchenko .padcfglock_offset = LKF_PADCFGLOCK, \ 36*866c9c55SAndy Shevchenko .hostown_offset = LKF_HOSTSW_OWN, \ 37*866c9c55SAndy Shevchenko .is_offset = LKF_GPI_IS, \ 38*866c9c55SAndy Shevchenko .ie_offset = LKF_GPI_IE, \ 39*866c9c55SAndy Shevchenko .pin_base = (s), \ 40*866c9c55SAndy Shevchenko .npins = ((e) - (s) + 1), \ 41*866c9c55SAndy Shevchenko .gpps = (g), \ 42*866c9c55SAndy Shevchenko .ngpps = ARRAY_SIZE(g), \ 43*866c9c55SAndy Shevchenko } 44*866c9c55SAndy Shevchenko 45*866c9c55SAndy Shevchenko /* Lakefield */ 46*866c9c55SAndy Shevchenko static const struct pinctrl_pin_desc lkf_pins[] = { 47*866c9c55SAndy Shevchenko /* EAST */ 48*866c9c55SAndy Shevchenko PINCTRL_PIN(0, "MDSI_A_TE0"), 49*866c9c55SAndy Shevchenko PINCTRL_PIN(1, "MDSI_A_TE1"), 50*866c9c55SAndy Shevchenko PINCTRL_PIN(2, "PANEL0_AVDD_EN"), 51*866c9c55SAndy Shevchenko PINCTRL_PIN(3, "PANEL0_BKLTEN"), 52*866c9c55SAndy Shevchenko PINCTRL_PIN(4, "PANEL0_BKLTCTL"), 53*866c9c55SAndy Shevchenko PINCTRL_PIN(5, "PANEL1_AVDD_EN"), 54*866c9c55SAndy Shevchenko PINCTRL_PIN(6, "PANEL1_BKLTEN"), 55*866c9c55SAndy Shevchenko PINCTRL_PIN(7, "PANEL1_BKLTCTL"), 56*866c9c55SAndy Shevchenko PINCTRL_PIN(8, "THC0_SPI1_IO_0"), 57*866c9c55SAndy Shevchenko PINCTRL_PIN(9, "THC0_SPI1_IO_1"), 58*866c9c55SAndy Shevchenko PINCTRL_PIN(10, "THC0_SPI1_IO_2"), 59*866c9c55SAndy Shevchenko PINCTRL_PIN(11, "THC0_SPI1_IO_3"), 60*866c9c55SAndy Shevchenko PINCTRL_PIN(12, "THC0_SPI1_CSB"), 61*866c9c55SAndy Shevchenko PINCTRL_PIN(13, "THC0_SPI1_CLK"), 62*866c9c55SAndy Shevchenko PINCTRL_PIN(14, "THC0_SPI1_RESETB"), 63*866c9c55SAndy Shevchenko PINCTRL_PIN(15, "THC0_SPI1_CLK_FB"), 64*866c9c55SAndy Shevchenko PINCTRL_PIN(16, "SPI_TOUCH_CLK_FB"), 65*866c9c55SAndy Shevchenko PINCTRL_PIN(17, "THC1_SPI2_IO_0"), 66*866c9c55SAndy Shevchenko PINCTRL_PIN(18, "THC1_SPI2_IO_1"), 67*866c9c55SAndy Shevchenko PINCTRL_PIN(19, "THC1_SPI2_IO_2"), 68*866c9c55SAndy Shevchenko PINCTRL_PIN(20, "THC1_SPI2_IO_3"), 69*866c9c55SAndy Shevchenko PINCTRL_PIN(21, "THC1_SPI2_CSB"), 70*866c9c55SAndy Shevchenko PINCTRL_PIN(22, "THC1_SPI2_CLK"), 71*866c9c55SAndy Shevchenko PINCTRL_PIN(23, "THC1_SPI2_RESETB"), 72*866c9c55SAndy Shevchenko PINCTRL_PIN(24, "THC1_SPI2_CLK_FB"), 73*866c9c55SAndy Shevchenko PINCTRL_PIN(25, "eSPI_IO_0"), 74*866c9c55SAndy Shevchenko PINCTRL_PIN(26, "eSPI_IO_1"), 75*866c9c55SAndy Shevchenko PINCTRL_PIN(27, "eSPI_IO_2"), 76*866c9c55SAndy Shevchenko PINCTRL_PIN(28, "eSPI_IO_3"), 77*866c9c55SAndy Shevchenko PINCTRL_PIN(29, "eSPI_CSB"), 78*866c9c55SAndy Shevchenko PINCTRL_PIN(30, "eSPI_RESETB"), 79*866c9c55SAndy Shevchenko PINCTRL_PIN(31, "eSPI_CLK"), 80*866c9c55SAndy Shevchenko PINCTRL_PIN(32, "eSPI_CLK_FB"), 81*866c9c55SAndy Shevchenko PINCTRL_PIN(33, "FAST_SPI0_IO_0"), 82*866c9c55SAndy Shevchenko PINCTRL_PIN(34, "FAST_SPI0_IO_1"), 83*866c9c55SAndy Shevchenko PINCTRL_PIN(35, "FAST_SPI0_IO_2"), 84*866c9c55SAndy Shevchenko PINCTRL_PIN(36, "FAST_SPI0_IO_3"), 85*866c9c55SAndy Shevchenko PINCTRL_PIN(37, "FAST_SPI0_CSB_0"), 86*866c9c55SAndy Shevchenko PINCTRL_PIN(38, "FAST_SPI0_CSB_2"), 87*866c9c55SAndy Shevchenko PINCTRL_PIN(39, "FAST_SPI0_CLK"), 88*866c9c55SAndy Shevchenko PINCTRL_PIN(40, "FAST_SPI_CLK_FB"), 89*866c9c55SAndy Shevchenko PINCTRL_PIN(41, "FAST_SPI0_CSB_1"), 90*866c9c55SAndy Shevchenko PINCTRL_PIN(42, "ISH_GP_12"), 91*866c9c55SAndy Shevchenko PINCTRL_PIN(43, "THC0_SPI1_INTB"), 92*866c9c55SAndy Shevchenko PINCTRL_PIN(44, "THC1_SPI2_INTB"), 93*866c9c55SAndy Shevchenko PINCTRL_PIN(45, "PANEL0_AVEE_EN"), 94*866c9c55SAndy Shevchenko PINCTRL_PIN(46, "PANEL0_VIO_EN"), 95*866c9c55SAndy Shevchenko PINCTRL_PIN(47, "PANEL1_AVEE_EN"), 96*866c9c55SAndy Shevchenko PINCTRL_PIN(48, "PANEL1_VIO_EN"), 97*866c9c55SAndy Shevchenko PINCTRL_PIN(49, "PANEL0_RESET"), 98*866c9c55SAndy Shevchenko PINCTRL_PIN(50, "PANEL1_RESET"), 99*866c9c55SAndy Shevchenko PINCTRL_PIN(51, "ISH_GP_15"), 100*866c9c55SAndy Shevchenko PINCTRL_PIN(52, "ISH_GP_16"), 101*866c9c55SAndy Shevchenko PINCTRL_PIN(53, "ISH_GP_17"), 102*866c9c55SAndy Shevchenko PINCTRL_PIN(54, "ISH_GP_18"), 103*866c9c55SAndy Shevchenko PINCTRL_PIN(55, "ISH_GP_19"), 104*866c9c55SAndy Shevchenko PINCTRL_PIN(56, "ISH_GP_20"), 105*866c9c55SAndy Shevchenko PINCTRL_PIN(57, "ISH_GP_21"), 106*866c9c55SAndy Shevchenko PINCTRL_PIN(58, "ISH_GP_22"), 107*866c9c55SAndy Shevchenko PINCTRL_PIN(59, "ISH_GP_23"), 108*866c9c55SAndy Shevchenko /* NORTHWEST */ 109*866c9c55SAndy Shevchenko PINCTRL_PIN(60, "MCSI_GPIO_0"), 110*866c9c55SAndy Shevchenko PINCTRL_PIN(61, "MCSI_GPIO_1"), 111*866c9c55SAndy Shevchenko PINCTRL_PIN(62, "MCSI_GPIO_2"), 112*866c9c55SAndy Shevchenko PINCTRL_PIN(63, "MCSI_GPIO_3"), 113*866c9c55SAndy Shevchenko PINCTRL_PIN(64, "LPSS_I2C0_SDA"), 114*866c9c55SAndy Shevchenko PINCTRL_PIN(65, "LPSS_I2C0_SCL"), 115*866c9c55SAndy Shevchenko PINCTRL_PIN(66, "LPSS_I2C1_SDA"), 116*866c9c55SAndy Shevchenko PINCTRL_PIN(67, "LPSS_I2C1_SCL"), 117*866c9c55SAndy Shevchenko PINCTRL_PIN(68, "LPSS_I2C2_SDA"), 118*866c9c55SAndy Shevchenko PINCTRL_PIN(69, "LPSS_I2C2_SCL"), 119*866c9c55SAndy Shevchenko PINCTRL_PIN(70, "LPSS_I2C3_SDA"), 120*866c9c55SAndy Shevchenko PINCTRL_PIN(71, "LPSS_I2C3_SCL"), 121*866c9c55SAndy Shevchenko PINCTRL_PIN(72, "LPSS_I2C4_SDA"), 122*866c9c55SAndy Shevchenko PINCTRL_PIN(73, "LPSS_I2C4_SCL"), 123*866c9c55SAndy Shevchenko PINCTRL_PIN(74, "LPSS_I2C5_SDA"), 124*866c9c55SAndy Shevchenko PINCTRL_PIN(75, "LPSS_I2C5_SCL"), 125*866c9c55SAndy Shevchenko PINCTRL_PIN(76, "LPSS_I3C0_SDA"), 126*866c9c55SAndy Shevchenko PINCTRL_PIN(77, "LPSS_I3C0_SCL"), 127*866c9c55SAndy Shevchenko PINCTRL_PIN(78, "LPSS_I3C0_SCL_FB"), 128*866c9c55SAndy Shevchenko PINCTRL_PIN(79, "LPSS_I3C1_SDA"), 129*866c9c55SAndy Shevchenko PINCTRL_PIN(80, "LPSS_I3C1_SCL"), 130*866c9c55SAndy Shevchenko PINCTRL_PIN(81, "LPSS_I3C1_SCL_FB"), 131*866c9c55SAndy Shevchenko PINCTRL_PIN(82, "ISH_I2C0_SDA"), 132*866c9c55SAndy Shevchenko PINCTRL_PIN(83, "ISH_I2C0_SCL"), 133*866c9c55SAndy Shevchenko PINCTRL_PIN(84, "ISH_I2C1_SCL"), 134*866c9c55SAndy Shevchenko PINCTRL_PIN(85, "ISH_I2C1_SDA"), 135*866c9c55SAndy Shevchenko PINCTRL_PIN(86, "DBG_PMODE"), 136*866c9c55SAndy Shevchenko PINCTRL_PIN(87, "BJTAG_TCK"), 137*866c9c55SAndy Shevchenko PINCTRL_PIN(88, "BJTAG_TDI"), 138*866c9c55SAndy Shevchenko PINCTRL_PIN(89, "BJTAGX"), 139*866c9c55SAndy Shevchenko PINCTRL_PIN(90, "BPREQ_B"), 140*866c9c55SAndy Shevchenko PINCTRL_PIN(91, "BJTAG_TMS"), 141*866c9c55SAndy Shevchenko PINCTRL_PIN(92, "BPRDY_B"), 142*866c9c55SAndy Shevchenko PINCTRL_PIN(93, "BJTAG_TDO"), 143*866c9c55SAndy Shevchenko PINCTRL_PIN(94, "BJTAG_TRST_B_0"), 144*866c9c55SAndy Shevchenko PINCTRL_PIN(95, "ISH_I3C0_SDA"), 145*866c9c55SAndy Shevchenko PINCTRL_PIN(96, "ISH_I3C0_SCL"), 146*866c9c55SAndy Shevchenko PINCTRL_PIN(97, "ISH_I3C0_SCL_FB"), 147*866c9c55SAndy Shevchenko PINCTRL_PIN(98, "AVS_I2S_BCLK_0"), 148*866c9c55SAndy Shevchenko PINCTRL_PIN(99, "AVS_I2S_MCLK_0"), 149*866c9c55SAndy Shevchenko PINCTRL_PIN(100, "AVS_I2S_SFRM_0"), 150*866c9c55SAndy Shevchenko PINCTRL_PIN(101, "AVS_I2S_RXD_0"), 151*866c9c55SAndy Shevchenko PINCTRL_PIN(102, "AVS_I2S_TXD_0"), 152*866c9c55SAndy Shevchenko PINCTRL_PIN(103, "AVS_I2S_BCLK_1"), 153*866c9c55SAndy Shevchenko PINCTRL_PIN(104, "AVS_I2S_SFRM_1"), 154*866c9c55SAndy Shevchenko PINCTRL_PIN(105, "AVS_I2S_RXD_1"), 155*866c9c55SAndy Shevchenko PINCTRL_PIN(106, "AVS_I2S_TXD_1"), 156*866c9c55SAndy Shevchenko PINCTRL_PIN(107, "AVS_I2S_BCLK_2"), 157*866c9c55SAndy Shevchenko PINCTRL_PIN(108, "AVS_I2S_SFRM_2"), 158*866c9c55SAndy Shevchenko PINCTRL_PIN(109, "AVS_I2S_RXD_2"), 159*866c9c55SAndy Shevchenko PINCTRL_PIN(110, "AVS_I2S_TXD_2"), 160*866c9c55SAndy Shevchenko PINCTRL_PIN(111, "AVS_I2S_BCLK_3"), 161*866c9c55SAndy Shevchenko PINCTRL_PIN(112, "AVS_I2S_SFRM_3"), 162*866c9c55SAndy Shevchenko PINCTRL_PIN(113, "AVS_I2S_RXD_3"), 163*866c9c55SAndy Shevchenko PINCTRL_PIN(114, "AVS_I2S_TXD_3"), 164*866c9c55SAndy Shevchenko PINCTRL_PIN(115, "AVS_I2S_BCLK_4"), 165*866c9c55SAndy Shevchenko PINCTRL_PIN(116, "AVS_I2S_SFRM_4"), 166*866c9c55SAndy Shevchenko PINCTRL_PIN(117, "AVS_I2S_RXD_4"), 167*866c9c55SAndy Shevchenko PINCTRL_PIN(118, "AVS_I2S_TXD_4"), 168*866c9c55SAndy Shevchenko PINCTRL_PIN(119, "AVS_I2S_SFRM_5"), 169*866c9c55SAndy Shevchenko PINCTRL_PIN(120, "AVS_I2S_RXD_5"), 170*866c9c55SAndy Shevchenko PINCTRL_PIN(121, "AVS_I2S_TXD_5"), 171*866c9c55SAndy Shevchenko PINCTRL_PIN(122, "AVS_I2S_BCLK_5"), 172*866c9c55SAndy Shevchenko PINCTRL_PIN(123, "AVS_SNDW_CLK_0"), 173*866c9c55SAndy Shevchenko PINCTRL_PIN(124, "AVS_SNDW_DATA_0"), 174*866c9c55SAndy Shevchenko PINCTRL_PIN(125, "AVS_SNDW_CLK_1"), 175*866c9c55SAndy Shevchenko PINCTRL_PIN(126, "AVS_SNDW_DATA_1"), 176*866c9c55SAndy Shevchenko PINCTRL_PIN(127, "AVS_SNDW_CLK_2"), 177*866c9c55SAndy Shevchenko PINCTRL_PIN(128, "AVS_SNDW_DATA_2"), 178*866c9c55SAndy Shevchenko PINCTRL_PIN(129, "AVS_SNDW_CLK_3"), 179*866c9c55SAndy Shevchenko PINCTRL_PIN(130, "AVS_SNDW_DATA_3"), 180*866c9c55SAndy Shevchenko PINCTRL_PIN(131, "VISA_PTI_CH0_D0_internal"), 181*866c9c55SAndy Shevchenko PINCTRL_PIN(132, "VISA_PTI_CH0_D1_internal"), 182*866c9c55SAndy Shevchenko PINCTRL_PIN(133, "VISA_PTI_CH0_D2_internal"), 183*866c9c55SAndy Shevchenko PINCTRL_PIN(134, "VISA_PTI_CH0_D3_internal"), 184*866c9c55SAndy Shevchenko PINCTRL_PIN(135, "VISA_PTI_CH0_D4_internal"), 185*866c9c55SAndy Shevchenko PINCTRL_PIN(136, "VISA_PTI_CH0_D5_internal"), 186*866c9c55SAndy Shevchenko PINCTRL_PIN(137, "VISA_PTI_CH0_D6_internal"), 187*866c9c55SAndy Shevchenko PINCTRL_PIN(138, "VISA_PTI_CH0_D7_internal"), 188*866c9c55SAndy Shevchenko PINCTRL_PIN(139, "VISA_PTI_CH0_CLK_internal"), 189*866c9c55SAndy Shevchenko PINCTRL_PIN(140, "VISA_PTI_CH1_D0_internal"), 190*866c9c55SAndy Shevchenko PINCTRL_PIN(141, "VISA_PTI_CH1_D1_internal"), 191*866c9c55SAndy Shevchenko PINCTRL_PIN(142, "VISA_PTI_CH1_D2_internal"), 192*866c9c55SAndy Shevchenko PINCTRL_PIN(143, "VISA_PTI_CH1_D3_internal"), 193*866c9c55SAndy Shevchenko PINCTRL_PIN(144, "VISA_PTI_CH1_D4_internal"), 194*866c9c55SAndy Shevchenko PINCTRL_PIN(145, "VISA_PTI_CH1_D5_internal"), 195*866c9c55SAndy Shevchenko PINCTRL_PIN(146, "VISA_PTI_CH1_D6_internal"), 196*866c9c55SAndy Shevchenko PINCTRL_PIN(147, "VISA_PTI_CH1_D7_internal"), 197*866c9c55SAndy Shevchenko PINCTRL_PIN(148, "VISA_PTI_CH1_CLK_internal"), 198*866c9c55SAndy Shevchenko /* WEST */ 199*866c9c55SAndy Shevchenko PINCTRL_PIN(149, "LPSS_UART0_TXD"), 200*866c9c55SAndy Shevchenko PINCTRL_PIN(150, "LPSS_UART0_RXD"), 201*866c9c55SAndy Shevchenko PINCTRL_PIN(151, "LPSS_UART0_RTS_B"), 202*866c9c55SAndy Shevchenko PINCTRL_PIN(152, "LPSS_UART0_CTS_B"), 203*866c9c55SAndy Shevchenko PINCTRL_PIN(153, "LPSS_UART1_RXD"), 204*866c9c55SAndy Shevchenko PINCTRL_PIN(154, "LPSS_UART1_TXD"), 205*866c9c55SAndy Shevchenko PINCTRL_PIN(155, "LPSS_UART1_RTS_B"), 206*866c9c55SAndy Shevchenko PINCTRL_PIN(156, "LPSS_UART1_CTS_B"), 207*866c9c55SAndy Shevchenko PINCTRL_PIN(157, "ISH_UART0_RXD"), 208*866c9c55SAndy Shevchenko PINCTRL_PIN(158, "ISH_UART0_TXD"), 209*866c9c55SAndy Shevchenko PINCTRL_PIN(159, "ISH_UART0_RTSB"), 210*866c9c55SAndy Shevchenko PINCTRL_PIN(160, "ISH_UART0_CTSB"), 211*866c9c55SAndy Shevchenko PINCTRL_PIN(161, "LPSS_SSP_0_CLK"), 212*866c9c55SAndy Shevchenko PINCTRL_PIN(162, "LPSS_SSP_0_CLK_FB"), 213*866c9c55SAndy Shevchenko PINCTRL_PIN(163, "LPSS_SSP_0_FS0"), 214*866c9c55SAndy Shevchenko PINCTRL_PIN(164, "LPSS_SSP_0_FS1"), 215*866c9c55SAndy Shevchenko PINCTRL_PIN(165, "LPSS_SSP_0_RXD"), 216*866c9c55SAndy Shevchenko PINCTRL_PIN(166, "LPSS_SSP_0_TXD"), 217*866c9c55SAndy Shevchenko PINCTRL_PIN(167, "ISH_UART1_RXD"), 218*866c9c55SAndy Shevchenko PINCTRL_PIN(168, "ISH_UART1_TXD"), 219*866c9c55SAndy Shevchenko PINCTRL_PIN(169, "ISH_UART1_RTSB"), 220*866c9c55SAndy Shevchenko PINCTRL_PIN(170, "ISH_UART1_CTSB"), 221*866c9c55SAndy Shevchenko PINCTRL_PIN(171, "LPSS_SSP_1_FS0"), 222*866c9c55SAndy Shevchenko PINCTRL_PIN(172, "LPSS_SSP_1_FS1"), 223*866c9c55SAndy Shevchenko PINCTRL_PIN(173, "LPSS_SSP_1_CLK"), 224*866c9c55SAndy Shevchenko PINCTRL_PIN(174, "LPSS_SSP_1_CLK_FB"), 225*866c9c55SAndy Shevchenko PINCTRL_PIN(175, "LPSS_SSP_1_RXD"), 226*866c9c55SAndy Shevchenko PINCTRL_PIN(176, "LPSS_SSP_1_TXD"), 227*866c9c55SAndy Shevchenko PINCTRL_PIN(177, "LPSS_SSP_2_CLK"), 228*866c9c55SAndy Shevchenko PINCTRL_PIN(178, "LPSS_SSP_2_CLK_FB"), 229*866c9c55SAndy Shevchenko PINCTRL_PIN(179, "LPSS_SSP_2_FS0"), 230*866c9c55SAndy Shevchenko PINCTRL_PIN(180, "LPSS_SSP_2_FS1"), 231*866c9c55SAndy Shevchenko PINCTRL_PIN(181, "LPSS_SSP_2_RXD"), 232*866c9c55SAndy Shevchenko PINCTRL_PIN(182, "LPSS_SSP_2_TXD"), 233*866c9c55SAndy Shevchenko PINCTRL_PIN(183, "ISH_SPI0_CSB0"), 234*866c9c55SAndy Shevchenko PINCTRL_PIN(184, "ISH_SPI0_CSB1"), 235*866c9c55SAndy Shevchenko PINCTRL_PIN(185, "ISH_SPI0_CLK"), 236*866c9c55SAndy Shevchenko PINCTRL_PIN(186, "ISH_SPI0_MISO"), 237*866c9c55SAndy Shevchenko PINCTRL_PIN(187, "ISH_SPI0_MOSI"), 238*866c9c55SAndy Shevchenko PINCTRL_PIN(188, "ISH_GP_0"), 239*866c9c55SAndy Shevchenko PINCTRL_PIN(189, "ISH_GP_1"), 240*866c9c55SAndy Shevchenko PINCTRL_PIN(190, "ISH_GP_2"), 241*866c9c55SAndy Shevchenko PINCTRL_PIN(191, "ISH_GP_13"), 242*866c9c55SAndy Shevchenko PINCTRL_PIN(192, "ISH_GP_3"), 243*866c9c55SAndy Shevchenko PINCTRL_PIN(193, "ISH_GP_4"), 244*866c9c55SAndy Shevchenko PINCTRL_PIN(194, "ISH_GP_5"), 245*866c9c55SAndy Shevchenko PINCTRL_PIN(195, "ISH_GP_6"), 246*866c9c55SAndy Shevchenko PINCTRL_PIN(196, "ISH_GP_7"), 247*866c9c55SAndy Shevchenko PINCTRL_PIN(197, "ISH_GP_8"), 248*866c9c55SAndy Shevchenko PINCTRL_PIN(198, "ISH_GP_9"), 249*866c9c55SAndy Shevchenko PINCTRL_PIN(199, "ISH_GP_10"), 250*866c9c55SAndy Shevchenko PINCTRL_PIN(200, "ISH_GP_11"), 251*866c9c55SAndy Shevchenko PINCTRL_PIN(201, "ISH_GP_14"), 252*866c9c55SAndy Shevchenko PINCTRL_PIN(202, "ISH_GP_15"), 253*866c9c55SAndy Shevchenko PINCTRL_PIN(203, "ISH_GP_22"), 254*866c9c55SAndy Shevchenko PINCTRL_PIN(204, "ISH_GP_12"), 255*866c9c55SAndy Shevchenko PINCTRL_PIN(205, "ISH_GP_30_USB_OC"), 256*866c9c55SAndy Shevchenko PINCTRL_PIN(206, "LPDDRx_RESET0_n"), 257*866c9c55SAndy Shevchenko PINCTRL_PIN(207, "UFS_RESET_B"), 258*866c9c55SAndy Shevchenko PINCTRL_PIN(208, "UFS_REFCLK0"), 259*866c9c55SAndy Shevchenko PINCTRL_PIN(209, "EMMC_SD_CLK"), 260*866c9c55SAndy Shevchenko PINCTRL_PIN(210, "EMMC_SD_D0"), 261*866c9c55SAndy Shevchenko PINCTRL_PIN(211, "EMMC_SD_D1"), 262*866c9c55SAndy Shevchenko PINCTRL_PIN(212, "EMMC_SD_D2"), 263*866c9c55SAndy Shevchenko PINCTRL_PIN(213, "EMMC_SD_D3"), 264*866c9c55SAndy Shevchenko PINCTRL_PIN(214, "EMMC_D4"), 265*866c9c55SAndy Shevchenko PINCTRL_PIN(215, "EMMC_D5"), 266*866c9c55SAndy Shevchenko PINCTRL_PIN(216, "EMMC_D6"), 267*866c9c55SAndy Shevchenko PINCTRL_PIN(217, "EMMC_D7"), 268*866c9c55SAndy Shevchenko PINCTRL_PIN(218, "EMMC_SD_CMD"), 269*866c9c55SAndy Shevchenko PINCTRL_PIN(219, "EMMC_RCLK"), 270*866c9c55SAndy Shevchenko PINCTRL_PIN(220, "SDCARD_CLK_FB"), 271*866c9c55SAndy Shevchenko PINCTRL_PIN(221, "SD_Virtual_GPIO"), 272*866c9c55SAndy Shevchenko PINCTRL_PIN(222, "OSC_CLK_OUT_NFC"), 273*866c9c55SAndy Shevchenko PINCTRL_PIN(223, "OSC_CLK_OUT_CAM_0"), 274*866c9c55SAndy Shevchenko PINCTRL_PIN(224, "OSC_CLK_OUT_CAM_1"), 275*866c9c55SAndy Shevchenko PINCTRL_PIN(225, "OSC_CLK_OUT_CAM_2"), 276*866c9c55SAndy Shevchenko PINCTRL_PIN(226, "OSC_CLK_OUT_CAM_3"), 277*866c9c55SAndy Shevchenko PINCTRL_PIN(227, "PCIe_LINKDOWN"), 278*866c9c55SAndy Shevchenko PINCTRL_PIN(228, "NFC_CLK_REQ"), 279*866c9c55SAndy Shevchenko PINCTRL_PIN(229, "PCIE_CLKREQ_N_DEV2"), 280*866c9c55SAndy Shevchenko PINCTRL_PIN(230, "PCIE_CLKREQ_N_DEV3"), 281*866c9c55SAndy Shevchenko PINCTRL_PIN(231, "PCIE_CLKREQ_N_DEV4"), 282*866c9c55SAndy Shevchenko PINCTRL_PIN(232, "PCIE_CLKREQ_N_DEV1"), 283*866c9c55SAndy Shevchenko PINCTRL_PIN(233, "PCIE_CLKREQ_N_DEV0"), 284*866c9c55SAndy Shevchenko PINCTRL_PIN(234, "GMBUS_1_SCL"), 285*866c9c55SAndy Shevchenko PINCTRL_PIN(235, "GMBUS_1_SDA"), 286*866c9c55SAndy Shevchenko PINCTRL_PIN(236, "GMBUS_0_SCL"), 287*866c9c55SAndy Shevchenko PINCTRL_PIN(237, "GMBUS_0_SDA"), 288*866c9c55SAndy Shevchenko /* SOUTHEAST */ 289*866c9c55SAndy Shevchenko PINCTRL_PIN(238, "COMPUTE_PMIC_SVID_DATA"), 290*866c9c55SAndy Shevchenko PINCTRL_PIN(239, "COMPUTE_PMIC_SVID_CLK"), 291*866c9c55SAndy Shevchenko PINCTRL_PIN(240, "COMPUTE_PMIC_SVID_ALERT_B"), 292*866c9c55SAndy Shevchenko PINCTRL_PIN(241, "ROP_PMIC_I2C_SCL"), 293*866c9c55SAndy Shevchenko PINCTRL_PIN(242, "ROP_PMIC_I2C_SDA"), 294*866c9c55SAndy Shevchenko PINCTRL_PIN(243, "ISH_TYPEC_I2C2_SDA"), 295*866c9c55SAndy Shevchenko PINCTRL_PIN(244, "ISH_TYPEC_I2C2_SCL"), 296*866c9c55SAndy Shevchenko PINCTRL_PIN(245, "COMPUTE_PMU_PROCHOT_B"), 297*866c9c55SAndy Shevchenko PINCTRL_PIN(246, "PMU_CATERR_B"), 298*866c9c55SAndy Shevchenko PINCTRL_PIN(247, "COMPUTE_PMIC_VR_READY"), 299*866c9c55SAndy Shevchenko PINCTRL_PIN(248, "FORCE_FW_RELOAD"), 300*866c9c55SAndy Shevchenko PINCTRL_PIN(249, "ROP_PMIC_IRQ_ISH_GPIO31_TPC_ALERT_B"), 301*866c9c55SAndy Shevchenko PINCTRL_PIN(250, "ROP_PMIC_RESET_B"), 302*866c9c55SAndy Shevchenko PINCTRL_PIN(251, "ROP_PMIC_STNBY_SLP_S0_B"), 303*866c9c55SAndy Shevchenko PINCTRL_PIN(252, "ROP_PMIC_THERMTRIP_B"), 304*866c9c55SAndy Shevchenko PINCTRL_PIN(253, "MODEM_CLKREQ"), 305*866c9c55SAndy Shevchenko PINCTRL_PIN(254, "TPC0_BSSB_SBU1"), 306*866c9c55SAndy Shevchenko PINCTRL_PIN(255, "TPC0_BSSB_SBU2"), 307*866c9c55SAndy Shevchenko PINCTRL_PIN(256, "OSC_CLK_OUT_CAM_4"), 308*866c9c55SAndy Shevchenko PINCTRL_PIN(257, "HPD1"), 309*866c9c55SAndy Shevchenko PINCTRL_PIN(258, "HPD0"), 310*866c9c55SAndy Shevchenko PINCTRL_PIN(259, "PMC_TIME_SYNC_0"), 311*866c9c55SAndy Shevchenko PINCTRL_PIN(260, "PMC_TIME_SYNC_1"), 312*866c9c55SAndy Shevchenko PINCTRL_PIN(261, "OSC_CLK_OUT_CAM_5"), 313*866c9c55SAndy Shevchenko PINCTRL_PIN(262, "ISH_GP_20"), 314*866c9c55SAndy Shevchenko PINCTRL_PIN(263, "ISH_GP_16"), 315*866c9c55SAndy Shevchenko PINCTRL_PIN(264, "ISH_GP_17"), 316*866c9c55SAndy Shevchenko PINCTRL_PIN(265, "ISH_GP_18"), 317*866c9c55SAndy Shevchenko PINCTRL_PIN(266, "ISH_GP_19"), 318*866c9c55SAndy Shevchenko }; 319*866c9c55SAndy Shevchenko 320*866c9c55SAndy Shevchenko static const struct intel_padgroup lkf_community0_gpps[] = { 321*866c9c55SAndy Shevchenko LKF_GPP(0, 0, 31, 0), /* EAST_0 */ 322*866c9c55SAndy Shevchenko LKF_GPP(1, 32, 59, 32), /* EAST_1 */ 323*866c9c55SAndy Shevchenko }; 324*866c9c55SAndy Shevchenko 325*866c9c55SAndy Shevchenko static const struct intel_padgroup lkf_community1_gpps[] = { 326*866c9c55SAndy Shevchenko LKF_GPP(0, 60, 91, 64), /* NORTHWEST_0 */ 327*866c9c55SAndy Shevchenko LKF_GPP(1, 92, 123, 96), /* NORTHWEST_1 */ 328*866c9c55SAndy Shevchenko LKF_GPP(2, 124, 148, 128), /* NORTHWEST_2 */ 329*866c9c55SAndy Shevchenko }; 330*866c9c55SAndy Shevchenko 331*866c9c55SAndy Shevchenko static const struct intel_padgroup lkf_community2_gpps[] = { 332*866c9c55SAndy Shevchenko LKF_GPP(0, 149, 180, 160), /* WEST_0 */ 333*866c9c55SAndy Shevchenko LKF_GPP(1, 181, 212, 192), /* WEST_1 */ 334*866c9c55SAndy Shevchenko LKF_GPP(2, 213, 237, 224), /* WEST_2 */ 335*866c9c55SAndy Shevchenko }; 336*866c9c55SAndy Shevchenko 337*866c9c55SAndy Shevchenko static const struct intel_padgroup lkf_community3_gpps[] = { 338*866c9c55SAndy Shevchenko LKF_GPP(0, 238, 266, 256), /* SOUTHEAST */ 339*866c9c55SAndy Shevchenko }; 340*866c9c55SAndy Shevchenko 341*866c9c55SAndy Shevchenko static const struct intel_community lkf_communities[] = { 342*866c9c55SAndy Shevchenko LKF_COMMUNITY(0, 0, 59, lkf_community0_gpps), /* EAST */ 343*866c9c55SAndy Shevchenko LKF_COMMUNITY(1, 60, 148, lkf_community1_gpps), /* NORTHWEST */ 344*866c9c55SAndy Shevchenko LKF_COMMUNITY(2, 149, 237, lkf_community2_gpps), /* WEST */ 345*866c9c55SAndy Shevchenko LKF_COMMUNITY(3, 238, 266, lkf_community3_gpps), /* SOUTHEAST */ 346*866c9c55SAndy Shevchenko }; 347*866c9c55SAndy Shevchenko 348*866c9c55SAndy Shevchenko static const struct intel_pinctrl_soc_data lkf_soc_data = { 349*866c9c55SAndy Shevchenko .pins = lkf_pins, 350*866c9c55SAndy Shevchenko .npins = ARRAY_SIZE(lkf_pins), 351*866c9c55SAndy Shevchenko .communities = lkf_communities, 352*866c9c55SAndy Shevchenko .ncommunities = ARRAY_SIZE(lkf_communities), 353*866c9c55SAndy Shevchenko }; 354*866c9c55SAndy Shevchenko 355*866c9c55SAndy Shevchenko static const struct acpi_device_id lkf_pinctrl_acpi_match[] = { 356*866c9c55SAndy Shevchenko { "INT34C4", (kernel_ulong_t)&lkf_soc_data }, 357*866c9c55SAndy Shevchenko { } 358*866c9c55SAndy Shevchenko }; 359*866c9c55SAndy Shevchenko MODULE_DEVICE_TABLE(acpi, lkf_pinctrl_acpi_match); 360*866c9c55SAndy Shevchenko 361*866c9c55SAndy Shevchenko static INTEL_PINCTRL_PM_OPS(lkf_pinctrl_pm_ops); 362*866c9c55SAndy Shevchenko 363*866c9c55SAndy Shevchenko static struct platform_driver lkf_pinctrl_driver = { 364*866c9c55SAndy Shevchenko .probe = intel_pinctrl_probe_by_hid, 365*866c9c55SAndy Shevchenko .driver = { 366*866c9c55SAndy Shevchenko .name = "lakefield-pinctrl", 367*866c9c55SAndy Shevchenko .acpi_match_table = lkf_pinctrl_acpi_match, 368*866c9c55SAndy Shevchenko .pm = &lkf_pinctrl_pm_ops, 369*866c9c55SAndy Shevchenko }, 370*866c9c55SAndy Shevchenko }; 371*866c9c55SAndy Shevchenko module_platform_driver(lkf_pinctrl_driver); 372*866c9c55SAndy Shevchenko 373*866c9c55SAndy Shevchenko MODULE_AUTHOR("Andy Shevchenko <andriy.shevchenko@linux.intel.com>"); 374*866c9c55SAndy Shevchenko MODULE_DESCRIPTION("Intel Lakefield PCH pinctrl/GPIO driver"); 375*866c9c55SAndy Shevchenko MODULE_LICENSE("GPL v2"); 376