1e6800d26SAndy Shevchenko // SPDX-License-Identifier: GPL-2.0 2e6800d26SAndy Shevchenko /* 3e6800d26SAndy Shevchenko * Intel Ice Lake PCH pinctrl/GPIO driver 4e6800d26SAndy Shevchenko * 5d25478e1SAndy Shevchenko * Copyright (C) 2018, 2022 Intel Corporation 6e6800d26SAndy Shevchenko * Authors: Andy Shevchenko <andriy.shevchenko@linux.intel.com> 7e6800d26SAndy Shevchenko * Mika Westerberg <mika.westerberg@linux.intel.com> 8e6800d26SAndy Shevchenko */ 9e6800d26SAndy Shevchenko 10e6800d26SAndy Shevchenko #include <linux/acpi.h> 11e6800d26SAndy Shevchenko #include <linux/module.h> 12e6800d26SAndy Shevchenko #include <linux/platform_device.h> 13677506eeSAndy Shevchenko 14e6800d26SAndy Shevchenko #include <linux/pinctrl/pinctrl.h> 15e6800d26SAndy Shevchenko 16e6800d26SAndy Shevchenko #include "pinctrl-intel.h" 17e6800d26SAndy Shevchenko 183df5f004SAndy Shevchenko #define ICL_LP_PAD_OWN 0x020 193df5f004SAndy Shevchenko #define ICL_LP_PADCFGLOCK 0x080 203df5f004SAndy Shevchenko #define ICL_LP_HOSTSW_OWN 0x0b0 213df5f004SAndy Shevchenko #define ICL_LP_GPI_IS 0x100 22d25478e1SAndy Shevchenko #define ICL_LP_GPI_IE 0x110 233df5f004SAndy Shevchenko 243df5f004SAndy Shevchenko #define ICL_N_PAD_OWN 0x020 253df5f004SAndy Shevchenko #define ICL_N_PADCFGLOCK 0x080 263df5f004SAndy Shevchenko #define ICL_N_HOSTSW_OWN 0x0b0 273df5f004SAndy Shevchenko #define ICL_N_GPI_IS 0x100 28d25478e1SAndy Shevchenko #define ICL_N_GPI_IE 0x120 29e6800d26SAndy Shevchenko 30e6800d26SAndy Shevchenko #define ICL_GPP(r, s, e, g) \ 31e6800d26SAndy Shevchenko { \ 32e6800d26SAndy Shevchenko .reg_num = (r), \ 33e6800d26SAndy Shevchenko .base = (s), \ 34e6800d26SAndy Shevchenko .size = ((e) - (s) + 1), \ 35e6800d26SAndy Shevchenko .gpio_base = (g), \ 36e6800d26SAndy Shevchenko } 37e6800d26SAndy Shevchenko 38d25478e1SAndy Shevchenko #define ICL_LP_COMMUNITY(b, s, e, g) \ 393df5f004SAndy Shevchenko INTEL_COMMUNITY_GPPS(b, s, e, g, ICL_LP) 40d25478e1SAndy Shevchenko 41d25478e1SAndy Shevchenko #define ICL_N_COMMUNITY(b, s, e, g) \ 423df5f004SAndy Shevchenko INTEL_COMMUNITY_GPPS(b, s, e, g, ICL_N) 43d25478e1SAndy Shevchenko 44e6800d26SAndy Shevchenko /* Ice Lake-LP */ 45e6800d26SAndy Shevchenko static const struct pinctrl_pin_desc icllp_pins[] = { 46e6800d26SAndy Shevchenko /* GPP_G */ 47e6800d26SAndy Shevchenko PINCTRL_PIN(0, "SD3_CMD"), 48e6800d26SAndy Shevchenko PINCTRL_PIN(1, "SD3_D0"), 49e6800d26SAndy Shevchenko PINCTRL_PIN(2, "SD3_D1"), 50e6800d26SAndy Shevchenko PINCTRL_PIN(3, "SD3_D2"), 51e6800d26SAndy Shevchenko PINCTRL_PIN(4, "SD3_D3"), 52e6800d26SAndy Shevchenko PINCTRL_PIN(5, "SD3_CDB"), 53e6800d26SAndy Shevchenko PINCTRL_PIN(6, "SD3_CLK"), 54e6800d26SAndy Shevchenko PINCTRL_PIN(7, "SD3_WP"), 55e6800d26SAndy Shevchenko /* GPP_B */ 56e6800d26SAndy Shevchenko PINCTRL_PIN(8, "CORE_VID_0"), 57e6800d26SAndy Shevchenko PINCTRL_PIN(9, "CORE_VID_1"), 58e6800d26SAndy Shevchenko PINCTRL_PIN(10, "VRALERTB"), 59e6800d26SAndy Shevchenko PINCTRL_PIN(11, "CPU_GP_2"), 60e6800d26SAndy Shevchenko PINCTRL_PIN(12, "CPU_GP_3"), 61e6800d26SAndy Shevchenko PINCTRL_PIN(13, "ISH_I2C0_SDA"), 62e6800d26SAndy Shevchenko PINCTRL_PIN(14, "ISH_I2C0_SCL"), 63e6800d26SAndy Shevchenko PINCTRL_PIN(15, "ISH_I2C1_SDA"), 64e6800d26SAndy Shevchenko PINCTRL_PIN(16, "ISH_I2C1_SCL"), 65e6800d26SAndy Shevchenko PINCTRL_PIN(17, "I2C5_SDA"), 66e6800d26SAndy Shevchenko PINCTRL_PIN(18, "I2C5_SCL"), 67e6800d26SAndy Shevchenko PINCTRL_PIN(19, "PMCALERTB"), 68e6800d26SAndy Shevchenko PINCTRL_PIN(20, "SLP_S0B"), 69e6800d26SAndy Shevchenko PINCTRL_PIN(21, "PLTRSTB"), 70e6800d26SAndy Shevchenko PINCTRL_PIN(22, "SPKR"), 71e6800d26SAndy Shevchenko PINCTRL_PIN(23, "GSPI0_CS0B"), 72e6800d26SAndy Shevchenko PINCTRL_PIN(24, "GSPI0_CLK"), 73e6800d26SAndy Shevchenko PINCTRL_PIN(25, "GSPI0_MISO"), 74e6800d26SAndy Shevchenko PINCTRL_PIN(26, "GSPI0_MOSI"), 75e6800d26SAndy Shevchenko PINCTRL_PIN(27, "GSPI1_CS0B"), 76e6800d26SAndy Shevchenko PINCTRL_PIN(28, "GSPI1_CLK"), 77e6800d26SAndy Shevchenko PINCTRL_PIN(29, "GSPI1_MISO"), 78e6800d26SAndy Shevchenko PINCTRL_PIN(30, "GSPI1_MOSI"), 79e6800d26SAndy Shevchenko PINCTRL_PIN(31, "SML1ALERTB"), 80e6800d26SAndy Shevchenko PINCTRL_PIN(32, "GSPI0_CLK_LOOPBK"), 81e6800d26SAndy Shevchenko PINCTRL_PIN(33, "GSPI1_CLK_LOOPBK"), 82e6800d26SAndy Shevchenko /* GPP_A */ 83e6800d26SAndy Shevchenko PINCTRL_PIN(34, "ESPI_IO_0"), 84e6800d26SAndy Shevchenko PINCTRL_PIN(35, "ESPI_IO_1"), 85e6800d26SAndy Shevchenko PINCTRL_PIN(36, "ESPI_IO_2"), 86e6800d26SAndy Shevchenko PINCTRL_PIN(37, "ESPI_IO_3"), 87e6800d26SAndy Shevchenko PINCTRL_PIN(38, "ESPI_CSB"), 88e6800d26SAndy Shevchenko PINCTRL_PIN(39, "ESPI_CLK"), 89e6800d26SAndy Shevchenko PINCTRL_PIN(40, "ESPI_RESETB"), 90e6800d26SAndy Shevchenko PINCTRL_PIN(41, "I2S2_SCLK"), 91e6800d26SAndy Shevchenko PINCTRL_PIN(42, "I2S2_SFRM"), 92e6800d26SAndy Shevchenko PINCTRL_PIN(43, "I2S2_TXD"), 93e6800d26SAndy Shevchenko PINCTRL_PIN(44, "I2S2_RXD"), 94e6800d26SAndy Shevchenko PINCTRL_PIN(45, "SATA_DEVSLP_2"), 95e6800d26SAndy Shevchenko PINCTRL_PIN(46, "SATAXPCIE_1"), 96e6800d26SAndy Shevchenko PINCTRL_PIN(47, "SATAXPCIE_2"), 97e6800d26SAndy Shevchenko PINCTRL_PIN(48, "USB2_OCB_1"), 98e6800d26SAndy Shevchenko PINCTRL_PIN(49, "USB2_OCB_2"), 99e6800d26SAndy Shevchenko PINCTRL_PIN(50, "USB2_OCB_3"), 100e6800d26SAndy Shevchenko PINCTRL_PIN(51, "DDSP_HPD_C"), 101e6800d26SAndy Shevchenko PINCTRL_PIN(52, "DDSP_HPD_B"), 102e6800d26SAndy Shevchenko PINCTRL_PIN(53, "DDSP_HPD_1"), 103e6800d26SAndy Shevchenko PINCTRL_PIN(54, "DDSP_HPD_2"), 104e6800d26SAndy Shevchenko PINCTRL_PIN(55, "I2S5_TXD"), 105e6800d26SAndy Shevchenko PINCTRL_PIN(56, "I2S5_RXD"), 106e6800d26SAndy Shevchenko PINCTRL_PIN(57, "I2S1_SCLK"), 107e6800d26SAndy Shevchenko PINCTRL_PIN(58, "ESPI_CLK_LOOPBK"), 108e6800d26SAndy Shevchenko /* GPP_H */ 109e6800d26SAndy Shevchenko PINCTRL_PIN(59, "SD_1P8_SEL"), 110e6800d26SAndy Shevchenko PINCTRL_PIN(60, "SD_PWR_EN_B"), 111e6800d26SAndy Shevchenko PINCTRL_PIN(61, "GPPC_H_2"), 112e6800d26SAndy Shevchenko PINCTRL_PIN(62, "SX_EXIT_HOLDOFFB"), 113e6800d26SAndy Shevchenko PINCTRL_PIN(63, "I2C2_SDA"), 114e6800d26SAndy Shevchenko PINCTRL_PIN(64, "I2C2_SCL"), 115e6800d26SAndy Shevchenko PINCTRL_PIN(65, "I2C3_SDA"), 116e6800d26SAndy Shevchenko PINCTRL_PIN(66, "I2C3_SCL"), 117e6800d26SAndy Shevchenko PINCTRL_PIN(67, "I2C4_SDA"), 118e6800d26SAndy Shevchenko PINCTRL_PIN(68, "I2C4_SCL"), 119e6800d26SAndy Shevchenko PINCTRL_PIN(69, "SRCCLKREQB_4"), 120e6800d26SAndy Shevchenko PINCTRL_PIN(70, "SRCCLKREQB_5"), 121e6800d26SAndy Shevchenko PINCTRL_PIN(71, "M2_SKT2_CFG_0"), 122e6800d26SAndy Shevchenko PINCTRL_PIN(72, "M2_SKT2_CFG_1"), 123e6800d26SAndy Shevchenko PINCTRL_PIN(73, "M2_SKT2_CFG_2"), 124e6800d26SAndy Shevchenko PINCTRL_PIN(74, "M2_SKT2_CFG_3"), 125e6800d26SAndy Shevchenko PINCTRL_PIN(75, "DDPB_CTRLCLK"), 126e6800d26SAndy Shevchenko PINCTRL_PIN(76, "DDPB_CTRLDATA"), 127e6800d26SAndy Shevchenko PINCTRL_PIN(77, "CPU_VCCIO_PWR_GATEB"), 128e6800d26SAndy Shevchenko PINCTRL_PIN(78, "TIME_SYNC_0"), 129e6800d26SAndy Shevchenko PINCTRL_PIN(79, "IMGCLKOUT_1"), 130e6800d26SAndy Shevchenko PINCTRL_PIN(80, "IMGCLKOUT_2"), 131e6800d26SAndy Shevchenko PINCTRL_PIN(81, "IMGCLKOUT_3"), 132e6800d26SAndy Shevchenko PINCTRL_PIN(82, "IMGCLKOUT_4"), 133e6800d26SAndy Shevchenko /* GPP_D */ 134e6800d26SAndy Shevchenko PINCTRL_PIN(83, "ISH_GP_0"), 135e6800d26SAndy Shevchenko PINCTRL_PIN(84, "ISH_GP_1"), 136e6800d26SAndy Shevchenko PINCTRL_PIN(85, "ISH_GP_2"), 137e6800d26SAndy Shevchenko PINCTRL_PIN(86, "ISH_GP_3"), 138e6800d26SAndy Shevchenko PINCTRL_PIN(87, "IMGCLKOUT_0"), 139e6800d26SAndy Shevchenko PINCTRL_PIN(88, "SRCCLKREQB_0"), 140e6800d26SAndy Shevchenko PINCTRL_PIN(89, "SRCCLKREQB_1"), 141e6800d26SAndy Shevchenko PINCTRL_PIN(90, "SRCCLKREQB_2"), 142e6800d26SAndy Shevchenko PINCTRL_PIN(91, "SRCCLKREQB_3"), 143e6800d26SAndy Shevchenko PINCTRL_PIN(92, "ISH_SPI_CSB"), 144e6800d26SAndy Shevchenko PINCTRL_PIN(93, "ISH_SPI_CLK"), 145e6800d26SAndy Shevchenko PINCTRL_PIN(94, "ISH_SPI_MISO"), 146e6800d26SAndy Shevchenko PINCTRL_PIN(95, "ISH_SPI_MOSI"), 147e6800d26SAndy Shevchenko PINCTRL_PIN(96, "ISH_UART0_RXD"), 148e6800d26SAndy Shevchenko PINCTRL_PIN(97, "ISH_UART0_TXD"), 149e6800d26SAndy Shevchenko PINCTRL_PIN(98, "ISH_UART0_RTSB"), 150e6800d26SAndy Shevchenko PINCTRL_PIN(99, "ISH_UART0_CTSB"), 151e6800d26SAndy Shevchenko PINCTRL_PIN(100, "ISH_GP_4"), 152e6800d26SAndy Shevchenko PINCTRL_PIN(101, "ISH_GP_5"), 153e6800d26SAndy Shevchenko PINCTRL_PIN(102, "I2S_MCLK"), 154e6800d26SAndy Shevchenko PINCTRL_PIN(103, "GSPI2_CLK_LOOPBK"), 155e6800d26SAndy Shevchenko /* GPP_F */ 156e6800d26SAndy Shevchenko PINCTRL_PIN(104, "CNV_BRI_DT"), 157e6800d26SAndy Shevchenko PINCTRL_PIN(105, "CNV_BRI_RSP"), 158e6800d26SAndy Shevchenko PINCTRL_PIN(106, "CNV_RGI_DT"), 159e6800d26SAndy Shevchenko PINCTRL_PIN(107, "CNV_RGI_RSP"), 160e6800d26SAndy Shevchenko PINCTRL_PIN(108, "CNV_RF_RESET_B"), 161e6800d26SAndy Shevchenko PINCTRL_PIN(109, "EMMC_HIP_MON"), 162e6800d26SAndy Shevchenko PINCTRL_PIN(110, "CNV_PA_BLANKING"), 163e6800d26SAndy Shevchenko PINCTRL_PIN(111, "EMMC_CMD"), 164e6800d26SAndy Shevchenko PINCTRL_PIN(112, "EMMC_DATA0"), 165e6800d26SAndy Shevchenko PINCTRL_PIN(113, "EMMC_DATA1"), 166e6800d26SAndy Shevchenko PINCTRL_PIN(114, "EMMC_DATA2"), 167e6800d26SAndy Shevchenko PINCTRL_PIN(115, "EMMC_DATA3"), 168e6800d26SAndy Shevchenko PINCTRL_PIN(116, "EMMC_DATA4"), 169e6800d26SAndy Shevchenko PINCTRL_PIN(117, "EMMC_DATA5"), 170e6800d26SAndy Shevchenko PINCTRL_PIN(118, "EMMC_DATA6"), 171e6800d26SAndy Shevchenko PINCTRL_PIN(119, "EMMC_DATA7"), 172e6800d26SAndy Shevchenko PINCTRL_PIN(120, "EMMC_RCLK"), 173e6800d26SAndy Shevchenko PINCTRL_PIN(121, "EMMC_CLK"), 174e6800d26SAndy Shevchenko PINCTRL_PIN(122, "EMMC_RESETB"), 175e6800d26SAndy Shevchenko PINCTRL_PIN(123, "A4WP_PRESENT"), 176e6800d26SAndy Shevchenko /* vGPIO */ 177e6800d26SAndy Shevchenko PINCTRL_PIN(124, "CNV_BTEN"), 178e6800d26SAndy Shevchenko PINCTRL_PIN(125, "CNV_WCEN"), 179e6800d26SAndy Shevchenko PINCTRL_PIN(126, "CNV_BT_HOST_WAKEB"), 180e6800d26SAndy Shevchenko PINCTRL_PIN(127, "CNV_BT_IF_SELECT"), 181e6800d26SAndy Shevchenko PINCTRL_PIN(128, "vCNV_BT_UART_TXD"), 182e6800d26SAndy Shevchenko PINCTRL_PIN(129, "vCNV_BT_UART_RXD"), 183e6800d26SAndy Shevchenko PINCTRL_PIN(130, "vCNV_BT_UART_CTS_B"), 184e6800d26SAndy Shevchenko PINCTRL_PIN(131, "vCNV_BT_UART_RTS_B"), 185e6800d26SAndy Shevchenko PINCTRL_PIN(132, "vCNV_MFUART1_TXD"), 186e6800d26SAndy Shevchenko PINCTRL_PIN(133, "vCNV_MFUART1_RXD"), 187e6800d26SAndy Shevchenko PINCTRL_PIN(134, "vCNV_MFUART1_CTS_B"), 188e6800d26SAndy Shevchenko PINCTRL_PIN(135, "vCNV_MFUART1_RTS_B"), 189e6800d26SAndy Shevchenko PINCTRL_PIN(136, "vUART0_TXD"), 190e6800d26SAndy Shevchenko PINCTRL_PIN(137, "vUART0_RXD"), 191e6800d26SAndy Shevchenko PINCTRL_PIN(138, "vUART0_CTS_B"), 192e6800d26SAndy Shevchenko PINCTRL_PIN(139, "vUART0_RTS_B"), 193e6800d26SAndy Shevchenko PINCTRL_PIN(140, "vISH_UART0_TXD"), 194e6800d26SAndy Shevchenko PINCTRL_PIN(141, "vISH_UART0_RXD"), 195e6800d26SAndy Shevchenko PINCTRL_PIN(142, "vISH_UART0_CTS_B"), 196e6800d26SAndy Shevchenko PINCTRL_PIN(143, "vISH_UART0_RTS_B"), 197e6800d26SAndy Shevchenko PINCTRL_PIN(144, "vCNV_BT_I2S_BCLK"), 198e6800d26SAndy Shevchenko PINCTRL_PIN(145, "vCNV_BT_I2S_WS_SYNC"), 199e6800d26SAndy Shevchenko PINCTRL_PIN(146, "vCNV_BT_I2S_SDO"), 200e6800d26SAndy Shevchenko PINCTRL_PIN(147, "vCNV_BT_I2S_SDI"), 201e6800d26SAndy Shevchenko PINCTRL_PIN(148, "vI2S2_SCLK"), 202e6800d26SAndy Shevchenko PINCTRL_PIN(149, "vI2S2_SFRM"), 203e6800d26SAndy Shevchenko PINCTRL_PIN(150, "vI2S2_TXD"), 204e6800d26SAndy Shevchenko PINCTRL_PIN(151, "vI2S2_RXD"), 205e6800d26SAndy Shevchenko PINCTRL_PIN(152, "vSD3_CD_B"), 206e6800d26SAndy Shevchenko /* GPP_C */ 207e6800d26SAndy Shevchenko PINCTRL_PIN(153, "SMBCLK"), 208e6800d26SAndy Shevchenko PINCTRL_PIN(154, "SMBDATA"), 209e6800d26SAndy Shevchenko PINCTRL_PIN(155, "SMBALERTB"), 210e6800d26SAndy Shevchenko PINCTRL_PIN(156, "SML0CLK"), 211e6800d26SAndy Shevchenko PINCTRL_PIN(157, "SML0DATA"), 212e6800d26SAndy Shevchenko PINCTRL_PIN(158, "SML0ALERTB"), 213e6800d26SAndy Shevchenko PINCTRL_PIN(159, "SML1CLK"), 214e6800d26SAndy Shevchenko PINCTRL_PIN(160, "SML1DATA"), 215e6800d26SAndy Shevchenko PINCTRL_PIN(161, "UART0_RXD"), 216e6800d26SAndy Shevchenko PINCTRL_PIN(162, "UART0_TXD"), 217e6800d26SAndy Shevchenko PINCTRL_PIN(163, "UART0_RTSB"), 218e6800d26SAndy Shevchenko PINCTRL_PIN(164, "UART0_CTSB"), 219e6800d26SAndy Shevchenko PINCTRL_PIN(165, "UART1_RXD"), 220e6800d26SAndy Shevchenko PINCTRL_PIN(166, "UART1_TXD"), 221e6800d26SAndy Shevchenko PINCTRL_PIN(167, "UART1_RTSB"), 222e6800d26SAndy Shevchenko PINCTRL_PIN(168, "UART1_CTSB"), 223e6800d26SAndy Shevchenko PINCTRL_PIN(169, "I2C0_SDA"), 224e6800d26SAndy Shevchenko PINCTRL_PIN(170, "I2C0_SCL"), 225e6800d26SAndy Shevchenko PINCTRL_PIN(171, "I2C1_SDA"), 226e6800d26SAndy Shevchenko PINCTRL_PIN(172, "I2C1_SCL"), 227e6800d26SAndy Shevchenko PINCTRL_PIN(173, "UART2_RXD"), 228e6800d26SAndy Shevchenko PINCTRL_PIN(174, "UART2_TXD"), 229e6800d26SAndy Shevchenko PINCTRL_PIN(175, "UART2_RTSB"), 230e6800d26SAndy Shevchenko PINCTRL_PIN(176, "UART2_CTSB"), 231e6800d26SAndy Shevchenko /* HVCMOS */ 232e6800d26SAndy Shevchenko PINCTRL_PIN(177, "L_BKLTEN"), 233e6800d26SAndy Shevchenko PINCTRL_PIN(178, "L_BKLTCTL"), 234e6800d26SAndy Shevchenko PINCTRL_PIN(179, "L_VDDEN"), 235e6800d26SAndy Shevchenko PINCTRL_PIN(180, "SYS_PWROK"), 236e6800d26SAndy Shevchenko PINCTRL_PIN(181, "SYS_RESETB"), 237e6800d26SAndy Shevchenko PINCTRL_PIN(182, "MLK_RSTB"), 238e6800d26SAndy Shevchenko /* GPP_E */ 239e6800d26SAndy Shevchenko PINCTRL_PIN(183, "SATAXPCIE_0"), 240e6800d26SAndy Shevchenko PINCTRL_PIN(184, "SPI1_IO_2"), 241e6800d26SAndy Shevchenko PINCTRL_PIN(185, "SPI1_IO_3"), 242e6800d26SAndy Shevchenko PINCTRL_PIN(186, "CPU_GP_0"), 243e6800d26SAndy Shevchenko PINCTRL_PIN(187, "SATA_DEVSLP_0"), 244e6800d26SAndy Shevchenko PINCTRL_PIN(188, "SATA_DEVSLP_1"), 245e6800d26SAndy Shevchenko PINCTRL_PIN(189, "GPPC_E_6"), 246e6800d26SAndy Shevchenko PINCTRL_PIN(190, "CPU_GP_1"), 247e6800d26SAndy Shevchenko PINCTRL_PIN(191, "SATA_LEDB"), 248e6800d26SAndy Shevchenko PINCTRL_PIN(192, "USB2_OCB_0"), 249e6800d26SAndy Shevchenko PINCTRL_PIN(193, "SPI1_CSB"), 250e6800d26SAndy Shevchenko PINCTRL_PIN(194, "SPI1_CLK"), 251e6800d26SAndy Shevchenko PINCTRL_PIN(195, "SPI1_MISO_IO_1"), 252e6800d26SAndy Shevchenko PINCTRL_PIN(196, "SPI1_MOSI_IO_0"), 253e6800d26SAndy Shevchenko PINCTRL_PIN(197, "DDSP_HPD_A"), 254e6800d26SAndy Shevchenko PINCTRL_PIN(198, "ISH_GP_6"), 255e6800d26SAndy Shevchenko PINCTRL_PIN(199, "ISH_GP_7"), 256e6800d26SAndy Shevchenko PINCTRL_PIN(200, "DISP_MISC_4"), 257e6800d26SAndy Shevchenko PINCTRL_PIN(201, "DDP1_CTRLCLK"), 258e6800d26SAndy Shevchenko PINCTRL_PIN(202, "DDP1_CTRLDATA"), 259e6800d26SAndy Shevchenko PINCTRL_PIN(203, "DDP2_CTRLCLK"), 260e6800d26SAndy Shevchenko PINCTRL_PIN(204, "DDP2_CTRLDATA"), 261e6800d26SAndy Shevchenko PINCTRL_PIN(205, "DDPA_CTRLCLK"), 262e6800d26SAndy Shevchenko PINCTRL_PIN(206, "DDPA_CTRLDATA"), 263e6800d26SAndy Shevchenko /* JTAG */ 264e6800d26SAndy Shevchenko PINCTRL_PIN(207, "JTAG_TDO"), 265e6800d26SAndy Shevchenko PINCTRL_PIN(208, "JTAGX"), 266e6800d26SAndy Shevchenko PINCTRL_PIN(209, "PRDYB"), 267e6800d26SAndy Shevchenko PINCTRL_PIN(210, "PREQB"), 268e6800d26SAndy Shevchenko PINCTRL_PIN(211, "CPU_TRSTB"), 269e6800d26SAndy Shevchenko PINCTRL_PIN(212, "JTAG_TDI"), 270e6800d26SAndy Shevchenko PINCTRL_PIN(213, "JTAG_TMS"), 271e6800d26SAndy Shevchenko PINCTRL_PIN(214, "JTAG_TCK"), 272e6800d26SAndy Shevchenko PINCTRL_PIN(215, "ITP_PMODE"), 273e6800d26SAndy Shevchenko /* GPP_R */ 274e6800d26SAndy Shevchenko PINCTRL_PIN(216, "HDA_BCLK"), 275e6800d26SAndy Shevchenko PINCTRL_PIN(217, "HDA_SYNC"), 276e6800d26SAndy Shevchenko PINCTRL_PIN(218, "HDA_SDO"), 277e6800d26SAndy Shevchenko PINCTRL_PIN(219, "HDA_SDI_0"), 278e6800d26SAndy Shevchenko PINCTRL_PIN(220, "HDA_RSTB"), 279e6800d26SAndy Shevchenko PINCTRL_PIN(221, "HDA_SDI_1"), 280e6800d26SAndy Shevchenko PINCTRL_PIN(222, "I2S1_TXD"), 281e6800d26SAndy Shevchenko PINCTRL_PIN(223, "I2S1_RXD"), 282e6800d26SAndy Shevchenko /* GPP_S */ 283e6800d26SAndy Shevchenko PINCTRL_PIN(224, "SNDW1_CLK"), 284e6800d26SAndy Shevchenko PINCTRL_PIN(225, "SNDW1_DATA"), 285e6800d26SAndy Shevchenko PINCTRL_PIN(226, "SNDW2_CLK"), 286e6800d26SAndy Shevchenko PINCTRL_PIN(227, "SNDW2_DATA"), 287e6800d26SAndy Shevchenko PINCTRL_PIN(228, "SNDW3_CLK"), 288e6800d26SAndy Shevchenko PINCTRL_PIN(229, "SNDW3_DATA"), 289e6800d26SAndy Shevchenko PINCTRL_PIN(230, "SNDW4_CLK"), 290e6800d26SAndy Shevchenko PINCTRL_PIN(231, "SNDW4_DATA"), 291e6800d26SAndy Shevchenko /* SPI */ 292e6800d26SAndy Shevchenko PINCTRL_PIN(232, "SPI0_IO_2"), 293e6800d26SAndy Shevchenko PINCTRL_PIN(233, "SPI0_IO_3"), 294e6800d26SAndy Shevchenko PINCTRL_PIN(234, "SPI0_MOSI_IO_0"), 295e6800d26SAndy Shevchenko PINCTRL_PIN(235, "SPI0_MISO_IO_1"), 296e6800d26SAndy Shevchenko PINCTRL_PIN(236, "SPI0_TPM_CSB"), 297e6800d26SAndy Shevchenko PINCTRL_PIN(237, "SPI0_FLASH_0_CSB"), 298e6800d26SAndy Shevchenko PINCTRL_PIN(238, "SPI0_FLASH_1_CSB"), 299e6800d26SAndy Shevchenko PINCTRL_PIN(239, "SPI0_CLK"), 300e6800d26SAndy Shevchenko PINCTRL_PIN(240, "SPI0_CLK_LOOPBK"), 301e6800d26SAndy Shevchenko }; 302e6800d26SAndy Shevchenko 303e6800d26SAndy Shevchenko static const struct intel_padgroup icllp_community0_gpps[] = { 304e6800d26SAndy Shevchenko ICL_GPP(0, 0, 7, 0), /* GPP_G */ 305e6800d26SAndy Shevchenko ICL_GPP(1, 8, 33, 32), /* GPP_B */ 306e6800d26SAndy Shevchenko ICL_GPP(2, 34, 58, 64), /* GPP_A */ 307e6800d26SAndy Shevchenko }; 308e6800d26SAndy Shevchenko 309e6800d26SAndy Shevchenko static const struct intel_padgroup icllp_community1_gpps[] = { 310e6800d26SAndy Shevchenko ICL_GPP(0, 59, 82, 96), /* GPP_H */ 311e6800d26SAndy Shevchenko ICL_GPP(1, 83, 103, 128), /* GPP_D */ 312e6800d26SAndy Shevchenko ICL_GPP(2, 104, 123, 160), /* GPP_F */ 313e6800d26SAndy Shevchenko ICL_GPP(3, 124, 152, 192), /* vGPIO */ 314e6800d26SAndy Shevchenko }; 315e6800d26SAndy Shevchenko 316e6800d26SAndy Shevchenko static const struct intel_padgroup icllp_community4_gpps[] = { 317e6800d26SAndy Shevchenko ICL_GPP(0, 153, 176, 224), /* GPP_C */ 318cf2f2c3aSAndy Shevchenko ICL_GPP(1, 177, 182, INTEL_GPIO_BASE_NOMAP), /* HVCMOS */ 319e6800d26SAndy Shevchenko ICL_GPP(2, 183, 206, 256), /* GPP_E */ 320cf2f2c3aSAndy Shevchenko ICL_GPP(3, 207, 215, INTEL_GPIO_BASE_NOMAP), /* JTAG */ 321e6800d26SAndy Shevchenko }; 322e6800d26SAndy Shevchenko 323e6800d26SAndy Shevchenko static const struct intel_padgroup icllp_community5_gpps[] = { 324e6800d26SAndy Shevchenko ICL_GPP(0, 216, 223, 288), /* GPP_R */ 325e6800d26SAndy Shevchenko ICL_GPP(1, 224, 231, 320), /* GPP_S */ 326cf2f2c3aSAndy Shevchenko ICL_GPP(2, 232, 240, INTEL_GPIO_BASE_NOMAP), /* SPI */ 327e6800d26SAndy Shevchenko }; 328e6800d26SAndy Shevchenko 329e6800d26SAndy Shevchenko static const struct intel_community icllp_communities[] = { 330d25478e1SAndy Shevchenko ICL_LP_COMMUNITY(0, 0, 58, icllp_community0_gpps), 331d25478e1SAndy Shevchenko ICL_LP_COMMUNITY(1, 59, 152, icllp_community1_gpps), 332d25478e1SAndy Shevchenko ICL_LP_COMMUNITY(2, 153, 215, icllp_community4_gpps), 333d25478e1SAndy Shevchenko ICL_LP_COMMUNITY(3, 216, 240, icllp_community5_gpps), 334e6800d26SAndy Shevchenko }; 335e6800d26SAndy Shevchenko 336e6800d26SAndy Shevchenko static const unsigned int icllp_spi0_pins[] = { 22, 23, 24, 25, 26 }; 337e6800d26SAndy Shevchenko static const unsigned int icllp_spi0_modes[] = { 3, 1, 1, 1, 1 }; 338e6800d26SAndy Shevchenko static const unsigned int icllp_spi1_pins[] = { 27, 28, 29, 30, 31 }; 339e6800d26SAndy Shevchenko static const unsigned int icllp_spi1_modes[] = { 1, 1, 1, 1, 3 }; 340e6800d26SAndy Shevchenko static const unsigned int icllp_spi2_pins[] = { 92, 93, 94, 95, 98 }; 341e6800d26SAndy Shevchenko static const unsigned int icllp_spi2_modes[] = { 3, 3, 3, 3, 2 }; 342e6800d26SAndy Shevchenko 343e6800d26SAndy Shevchenko static const unsigned int icllp_i2c0_pins[] = { 169, 170 }; 344e6800d26SAndy Shevchenko static const unsigned int icllp_i2c1_pins[] = { 171, 172 }; 345e6800d26SAndy Shevchenko static const unsigned int icllp_i2c2_pins[] = { 63, 64 }; 346e6800d26SAndy Shevchenko static const unsigned int icllp_i2c3_pins[] = { 65, 66 }; 347e6800d26SAndy Shevchenko static const unsigned int icllp_i2c4_pins[] = { 67, 68 }; 348e6800d26SAndy Shevchenko 349e6800d26SAndy Shevchenko static const unsigned int icllp_uart0_pins[] = { 161, 162, 163, 164 }; 350e6800d26SAndy Shevchenko static const unsigned int icllp_uart1_pins[] = { 165, 166, 167, 168 }; 351e6800d26SAndy Shevchenko static const unsigned int icllp_uart2_pins[] = { 173, 174, 175, 176 }; 352e6800d26SAndy Shevchenko 353e6800d26SAndy Shevchenko static const struct intel_pingroup icllp_groups[] = { 354e6800d26SAndy Shevchenko PIN_GROUP("spi0_grp", icllp_spi0_pins, icllp_spi0_modes), 355e6800d26SAndy Shevchenko PIN_GROUP("spi1_grp", icllp_spi1_pins, icllp_spi1_modes), 356e6800d26SAndy Shevchenko PIN_GROUP("spi2_grp", icllp_spi2_pins, icllp_spi2_modes), 357e6800d26SAndy Shevchenko PIN_GROUP("i2c0_grp", icllp_i2c0_pins, 1), 358e6800d26SAndy Shevchenko PIN_GROUP("i2c1_grp", icllp_i2c1_pins, 1), 359e6800d26SAndy Shevchenko PIN_GROUP("i2c2_grp", icllp_i2c2_pins, 1), 360e6800d26SAndy Shevchenko PIN_GROUP("i2c3_grp", icllp_i2c3_pins, 1), 361e6800d26SAndy Shevchenko PIN_GROUP("i2c4_grp", icllp_i2c4_pins, 1), 362e6800d26SAndy Shevchenko PIN_GROUP("uart0_grp", icllp_uart0_pins, 1), 363e6800d26SAndy Shevchenko PIN_GROUP("uart1_grp", icllp_uart1_pins, 1), 364e6800d26SAndy Shevchenko PIN_GROUP("uart2_grp", icllp_uart2_pins, 1), 365e6800d26SAndy Shevchenko }; 366e6800d26SAndy Shevchenko 367e6800d26SAndy Shevchenko static const char * const icllp_spi0_groups[] = { "spi0_grp" }; 368e6800d26SAndy Shevchenko static const char * const icllp_spi1_groups[] = { "spi1_grp" }; 369e6800d26SAndy Shevchenko static const char * const icllp_spi2_groups[] = { "spi2_grp" }; 370e6800d26SAndy Shevchenko static const char * const icllp_i2c0_groups[] = { "i2c0_grp" }; 371e6800d26SAndy Shevchenko static const char * const icllp_i2c1_groups[] = { "i2c1_grp" }; 372e6800d26SAndy Shevchenko static const char * const icllp_i2c2_groups[] = { "i2c2_grp" }; 373e6800d26SAndy Shevchenko static const char * const icllp_i2c3_groups[] = { "i2c3_grp" }; 374e6800d26SAndy Shevchenko static const char * const icllp_i2c4_groups[] = { "i2c4_grp" }; 375e6800d26SAndy Shevchenko static const char * const icllp_uart0_groups[] = { "uart0_grp" }; 376e6800d26SAndy Shevchenko static const char * const icllp_uart1_groups[] = { "uart1_grp" }; 377e6800d26SAndy Shevchenko static const char * const icllp_uart2_groups[] = { "uart2_grp" }; 378e6800d26SAndy Shevchenko 379e6800d26SAndy Shevchenko static const struct intel_function icllp_functions[] = { 380e6800d26SAndy Shevchenko FUNCTION("spi0", icllp_spi0_groups), 381e6800d26SAndy Shevchenko FUNCTION("spi1", icllp_spi1_groups), 382e6800d26SAndy Shevchenko FUNCTION("spi2", icllp_spi2_groups), 383e6800d26SAndy Shevchenko FUNCTION("i2c0", icllp_i2c0_groups), 384e6800d26SAndy Shevchenko FUNCTION("i2c1", icllp_i2c1_groups), 385e6800d26SAndy Shevchenko FUNCTION("i2c2", icllp_i2c2_groups), 386e6800d26SAndy Shevchenko FUNCTION("i2c3", icllp_i2c3_groups), 387e6800d26SAndy Shevchenko FUNCTION("i2c4", icllp_i2c4_groups), 388e6800d26SAndy Shevchenko FUNCTION("uart0", icllp_uart0_groups), 389e6800d26SAndy Shevchenko FUNCTION("uart1", icllp_uart1_groups), 390e6800d26SAndy Shevchenko FUNCTION("uart2", icllp_uart2_groups), 391e6800d26SAndy Shevchenko }; 392e6800d26SAndy Shevchenko 393e6800d26SAndy Shevchenko static const struct intel_pinctrl_soc_data icllp_soc_data = { 394e6800d26SAndy Shevchenko .pins = icllp_pins, 395e6800d26SAndy Shevchenko .npins = ARRAY_SIZE(icllp_pins), 396e6800d26SAndy Shevchenko .groups = icllp_groups, 397e6800d26SAndy Shevchenko .ngroups = ARRAY_SIZE(icllp_groups), 398e6800d26SAndy Shevchenko .functions = icllp_functions, 399e6800d26SAndy Shevchenko .nfunctions = ARRAY_SIZE(icllp_functions), 400e6800d26SAndy Shevchenko .communities = icllp_communities, 401e6800d26SAndy Shevchenko .ncommunities = ARRAY_SIZE(icllp_communities), 402e6800d26SAndy Shevchenko }; 403e6800d26SAndy Shevchenko 404d25478e1SAndy Shevchenko /* Ice Lake-N */ 405d25478e1SAndy Shevchenko static const struct pinctrl_pin_desc icln_pins[] = { 406d25478e1SAndy Shevchenko /* SPI */ 407d25478e1SAndy Shevchenko PINCTRL_PIN(0, "SPI0_IO_2"), 408d25478e1SAndy Shevchenko PINCTRL_PIN(1, "SPI0_IO_3"), 409d25478e1SAndy Shevchenko PINCTRL_PIN(2, "SPI0_MOSI_IO_0"), 410d25478e1SAndy Shevchenko PINCTRL_PIN(3, "SPI0_MISO_IO_1"), 411d25478e1SAndy Shevchenko PINCTRL_PIN(4, "SPI0_TPM_CSB"), 412d25478e1SAndy Shevchenko PINCTRL_PIN(5, "SPI0_FLASH_0_CSB"), 413d25478e1SAndy Shevchenko PINCTRL_PIN(6, "SPI0_FLASH_1_CSB"), 414d25478e1SAndy Shevchenko PINCTRL_PIN(7, "SPI0_CLK"), 415d25478e1SAndy Shevchenko PINCTRL_PIN(8, "SPI0_CLK_LOOPBK"), 416d25478e1SAndy Shevchenko /* GPP_B */ 417d25478e1SAndy Shevchenko PINCTRL_PIN(9, "CORE_VID_0"), 418d25478e1SAndy Shevchenko PINCTRL_PIN(10, "CORE_VID_1"), 419d25478e1SAndy Shevchenko PINCTRL_PIN(11, "VRALERTB"), 420d25478e1SAndy Shevchenko PINCTRL_PIN(12, "CPU_GP_2"), 421d25478e1SAndy Shevchenko PINCTRL_PIN(13, "CPU_GP_3"), 422d25478e1SAndy Shevchenko PINCTRL_PIN(14, "SRCCLKREQB_0"), 423d25478e1SAndy Shevchenko PINCTRL_PIN(15, "SRCCLKREQB_1"), 424d25478e1SAndy Shevchenko PINCTRL_PIN(16, "SRCCLKREQB_2"), 425d25478e1SAndy Shevchenko PINCTRL_PIN(17, "SRCCLKREQB_3"), 426d25478e1SAndy Shevchenko PINCTRL_PIN(18, "SRCCLKREQB_4"), 427d25478e1SAndy Shevchenko PINCTRL_PIN(19, "SRCCLKREQB_5"), 428d25478e1SAndy Shevchenko PINCTRL_PIN(20, "EXT_PWR_GATEB"), 429d25478e1SAndy Shevchenko PINCTRL_PIN(21, "SLP_S0B"), 430d25478e1SAndy Shevchenko PINCTRL_PIN(22, "PLTRSTB"), 431d25478e1SAndy Shevchenko PINCTRL_PIN(23, "SPKR_GSPI0_CS1B"), 432d25478e1SAndy Shevchenko PINCTRL_PIN(24, "GSPI0_CS0B"), 433d25478e1SAndy Shevchenko PINCTRL_PIN(25, "GSPI0_CLK"), 434d25478e1SAndy Shevchenko PINCTRL_PIN(26, "GSPI0_MISO_TBT_LSX3_A"), 435d25478e1SAndy Shevchenko PINCTRL_PIN(27, "GSPI0_MOSI_TBT_LSX3_B"), 436d25478e1SAndy Shevchenko PINCTRL_PIN(28, "GSPI1_CS0B"), 437d25478e1SAndy Shevchenko PINCTRL_PIN(29, "GSPI1_CLK_NFC_CLK"), 438d25478e1SAndy Shevchenko PINCTRL_PIN(30, "GSPI1_MISO_NFC_CLKREQ"), 439d25478e1SAndy Shevchenko PINCTRL_PIN(31, "GSPI1_MOSI"), 440d25478e1SAndy Shevchenko PINCTRL_PIN(32, "GSPI1_CS1B"), 441d25478e1SAndy Shevchenko PINCTRL_PIN(33, "GSPI0_CLK_LOOPBK"), 442d25478e1SAndy Shevchenko PINCTRL_PIN(34, "GSPI1_CLK_LOOPBK"), 443d25478e1SAndy Shevchenko /* GPP_A */ 444d25478e1SAndy Shevchenko PINCTRL_PIN(35, "ESPI_IO_0"), 445d25478e1SAndy Shevchenko PINCTRL_PIN(36, "ESPI_IO_1"), 446d25478e1SAndy Shevchenko PINCTRL_PIN(37, "ESPI_IO_2"), 447d25478e1SAndy Shevchenko PINCTRL_PIN(38, "ESPI_IO_3"), 448d25478e1SAndy Shevchenko PINCTRL_PIN(39, "ESPI_CSB"), 449d25478e1SAndy Shevchenko PINCTRL_PIN(40, "ESPI_CLK"), 450d25478e1SAndy Shevchenko PINCTRL_PIN(41, "ESPI_RESETB"), 451d25478e1SAndy Shevchenko PINCTRL_PIN(42, "SMBCLK"), 452d25478e1SAndy Shevchenko PINCTRL_PIN(43, "SMBDATA"), 453d25478e1SAndy Shevchenko PINCTRL_PIN(44, "SMBALERTB"), 454d25478e1SAndy Shevchenko PINCTRL_PIN(45, "CPU_GP_0"), 455d25478e1SAndy Shevchenko PINCTRL_PIN(46, "CPU_GP_1"), 456d25478e1SAndy Shevchenko PINCTRL_PIN(47, "USB2_OCB_1"), 457d25478e1SAndy Shevchenko PINCTRL_PIN(48, "USB2_OCB_2"), 458d25478e1SAndy Shevchenko PINCTRL_PIN(49, "USB2_OCB_3"), 459d25478e1SAndy Shevchenko PINCTRL_PIN(50, "DDSP_HPD_A_TIME_SYNC_0"), 460d25478e1SAndy Shevchenko PINCTRL_PIN(51, "DDSP_HPD_B_TIME_SYNC_1"), 461d25478e1SAndy Shevchenko PINCTRL_PIN(52, "DDSP_HPD_C"), 462d25478e1SAndy Shevchenko PINCTRL_PIN(53, "USB2_OCB_0"), 463d25478e1SAndy Shevchenko PINCTRL_PIN(54, "PCHHOTB"), 464d25478e1SAndy Shevchenko PINCTRL_PIN(55, "ESPI_CLK_LOOPBK"), 465d25478e1SAndy Shevchenko /* GPP_S */ 466d25478e1SAndy Shevchenko PINCTRL_PIN(56, "SNDW1_CLK"), 467d25478e1SAndy Shevchenko PINCTRL_PIN(57, "SNDW1_DATA"), 468d25478e1SAndy Shevchenko PINCTRL_PIN(58, "SNDW2_CLK"), 469d25478e1SAndy Shevchenko PINCTRL_PIN(59, "SNDW2_DATA"), 470d25478e1SAndy Shevchenko PINCTRL_PIN(60, "SNDW3_CLK_DMIC_CLK_1"), 471d25478e1SAndy Shevchenko PINCTRL_PIN(61, "SNDW3_DATA_DMIC_DATA_1"), 472d25478e1SAndy Shevchenko PINCTRL_PIN(62, "SNDW4_CLK_DMIC_CLK_0"), 473d25478e1SAndy Shevchenko PINCTRL_PIN(63, "SNDW4_DATA_DMIC_DATA_0"), 474d25478e1SAndy Shevchenko /* GPP_R */ 475d25478e1SAndy Shevchenko PINCTRL_PIN(64, "HDA_BCLK"), 476d25478e1SAndy Shevchenko PINCTRL_PIN(65, "HDA_SYNC"), 477d25478e1SAndy Shevchenko PINCTRL_PIN(66, "HDA_SDO"), 478d25478e1SAndy Shevchenko PINCTRL_PIN(67, "HDA_SDI_0"), 479d25478e1SAndy Shevchenko PINCTRL_PIN(68, "HDA_RSTB"), 480d25478e1SAndy Shevchenko PINCTRL_PIN(69, "HDA_SDI_1_I2S1_RXD"), 481d25478e1SAndy Shevchenko PINCTRL_PIN(70, "I2S1_SFRM"), 482d25478e1SAndy Shevchenko PINCTRL_PIN(71, "I2S1_TXD"), 483d25478e1SAndy Shevchenko /* GPP_H */ 484d25478e1SAndy Shevchenko PINCTRL_PIN(72, "GPPC_H_0"), 485d25478e1SAndy Shevchenko PINCTRL_PIN(73, "CNV_RF_RESET_B"), 486d25478e1SAndy Shevchenko PINCTRL_PIN(74, "MODEM_CLKREQ"), 487d25478e1SAndy Shevchenko PINCTRL_PIN(75, "SX_EXIT_HOLDOFFB"), 488d25478e1SAndy Shevchenko PINCTRL_PIN(76, "I2C2_SDA"), 489d25478e1SAndy Shevchenko PINCTRL_PIN(77, "I2C2_SCL"), 490d25478e1SAndy Shevchenko PINCTRL_PIN(78, "I2C3_SDA"), 491d25478e1SAndy Shevchenko PINCTRL_PIN(79, "I2C3_SCL"), 492d25478e1SAndy Shevchenko PINCTRL_PIN(80, "I2C4_SDA"), 493d25478e1SAndy Shevchenko PINCTRL_PIN(81, "I2C4_SCL"), 494d25478e1SAndy Shevchenko PINCTRL_PIN(82, "CPU_VCCIO_PWR_GATEB"), 495d25478e1SAndy Shevchenko PINCTRL_PIN(83, "I2S2_SCLK"), 496d25478e1SAndy Shevchenko PINCTRL_PIN(84, "CNV_RF_RESET_B"), 497d25478e1SAndy Shevchenko PINCTRL_PIN(85, "MODEM_CLKREQ"), 498d25478e1SAndy Shevchenko PINCTRL_PIN(86, "I2S2_RXD"), 499d25478e1SAndy Shevchenko PINCTRL_PIN(87, "I2S1_SCLK"), 500d25478e1SAndy Shevchenko PINCTRL_PIN(88, "GPPC_H_16"), 501d25478e1SAndy Shevchenko PINCTRL_PIN(89, "GPPC_H_17"), 502d25478e1SAndy Shevchenko PINCTRL_PIN(90, "GPPC_H_18"), 503d25478e1SAndy Shevchenko PINCTRL_PIN(91, "GPPC_H_19"), 504d25478e1SAndy Shevchenko PINCTRL_PIN(92, "GPPC_H_20"), 505d25478e1SAndy Shevchenko PINCTRL_PIN(93, "GPPC_H_21"), 506d25478e1SAndy Shevchenko PINCTRL_PIN(94, "GPPC_H_22"), 507d25478e1SAndy Shevchenko PINCTRL_PIN(95, "GPPC_H_23"), 508d25478e1SAndy Shevchenko /* GPP_D */ 509d25478e1SAndy Shevchenko PINCTRL_PIN(96, "SPI1_CSB_BK_0_SBK_0"), 510d25478e1SAndy Shevchenko PINCTRL_PIN(97, "SPI1_CLK_BK_1_SBK_1"), 511d25478e1SAndy Shevchenko PINCTRL_PIN(98, "SPI1_MISO_IO_1_BK_2_SBK_2"), 512d25478e1SAndy Shevchenko PINCTRL_PIN(99, "SPI1_MOSI_IO_0_BK_3_SBK_3"), 513d25478e1SAndy Shevchenko PINCTRL_PIN(100, "ISH_I2C0_SDA"), 514d25478e1SAndy Shevchenko PINCTRL_PIN(101, "ISH_I2C0_SCL"), 515d25478e1SAndy Shevchenko PINCTRL_PIN(102, "ISH_I2C1_SDA"), 516d25478e1SAndy Shevchenko PINCTRL_PIN(103, "ISH_I2C1_SCL"), 517d25478e1SAndy Shevchenko PINCTRL_PIN(104, "ISH_SPI_CSB_GSPI2_CS0B_TBT_LSX4_A"), 518d25478e1SAndy Shevchenko PINCTRL_PIN(105, "ISH_SPI_CLK_GSPI2_CLK_TBT_LSX4_B"), 519d25478e1SAndy Shevchenko PINCTRL_PIN(106, "ISH_SPI_MISO_GSPI2_MISO_TBT_LSX5_A"), 520d25478e1SAndy Shevchenko PINCTRL_PIN(107, "ISH_SPI_MOSI_GSPI2_MOSI_TBT_LSX5_B"), 521d25478e1SAndy Shevchenko PINCTRL_PIN(108, "ISH_UART0_RXD_I2C4B_SDA"), 522d25478e1SAndy Shevchenko PINCTRL_PIN(109, "ISH_UART0_TXD_I2C4B_SCL"), 523d25478e1SAndy Shevchenko PINCTRL_PIN(110, "ISH_UART0_RTSB_GSPI2_CS1B"), 524d25478e1SAndy Shevchenko PINCTRL_PIN(111, "ISH_UART0_CTSB_CNV_WCEN"), 525d25478e1SAndy Shevchenko PINCTRL_PIN(112, "SPI1_IO_2"), 526d25478e1SAndy Shevchenko PINCTRL_PIN(113, "SPI1_IO_3"), 527d25478e1SAndy Shevchenko PINCTRL_PIN(114, "I2S_MCLK"), 528d25478e1SAndy Shevchenko PINCTRL_PIN(115, "CNV_MFUART2_RXD"), 529d25478e1SAndy Shevchenko PINCTRL_PIN(116, "CNV_MFUART2_TXD"), 530d25478e1SAndy Shevchenko PINCTRL_PIN(117, "CNV_PA_BLANKING"), 531d25478e1SAndy Shevchenko PINCTRL_PIN(118, "I2C5_SDA_ISH_I2C2_SDA"), 532d25478e1SAndy Shevchenko PINCTRL_PIN(119, "I2C5_SCL_ISH_I2C2_SCL"), 533d25478e1SAndy Shevchenko PINCTRL_PIN(120, "GSPI2_CLK_LOOPBK"), 534d25478e1SAndy Shevchenko PINCTRL_PIN(121, "SPI1_CLK_LOOPBK"), 535d25478e1SAndy Shevchenko /* vGPIO */ 536d25478e1SAndy Shevchenko PINCTRL_PIN(122, "CNV_BTEN"), 537d25478e1SAndy Shevchenko PINCTRL_PIN(123, "CNV_WCEN"), 538d25478e1SAndy Shevchenko PINCTRL_PIN(124, "CNV_BT_HOST_WAKEB"), 539d25478e1SAndy Shevchenko PINCTRL_PIN(125, "CNV_BT_IF_SELECT"), 540d25478e1SAndy Shevchenko PINCTRL_PIN(126, "vCNV_BT_UART_TXD"), 541d25478e1SAndy Shevchenko PINCTRL_PIN(127, "vCNV_BT_UART_RXD"), 542d25478e1SAndy Shevchenko PINCTRL_PIN(128, "vCNV_BT_UART_CTS_B"), 543d25478e1SAndy Shevchenko PINCTRL_PIN(129, "vCNV_BT_UART_RTS_B"), 544d25478e1SAndy Shevchenko PINCTRL_PIN(130, "vCNV_MFUART1_TXD"), 545d25478e1SAndy Shevchenko PINCTRL_PIN(131, "vCNV_MFUART1_RXD"), 546d25478e1SAndy Shevchenko PINCTRL_PIN(132, "vCNV_MFUART1_CTS_B"), 547d25478e1SAndy Shevchenko PINCTRL_PIN(133, "vCNV_MFUART1_RTS_B"), 548d25478e1SAndy Shevchenko PINCTRL_PIN(134, "vUART0_TXD"), 549d25478e1SAndy Shevchenko PINCTRL_PIN(135, "vUART0_RXD"), 550d25478e1SAndy Shevchenko PINCTRL_PIN(136, "vUART0_CTS_B"), 551d25478e1SAndy Shevchenko PINCTRL_PIN(137, "vUART0_RTS_B"), 552d25478e1SAndy Shevchenko PINCTRL_PIN(138, "vISH_UART0_TXD"), 553d25478e1SAndy Shevchenko PINCTRL_PIN(139, "vISH_UART0_RXD"), 554d25478e1SAndy Shevchenko PINCTRL_PIN(140, "vISH_UART0_CTS_B"), 555d25478e1SAndy Shevchenko PINCTRL_PIN(141, "vISH_UART0_RTS_B"), 556d25478e1SAndy Shevchenko PINCTRL_PIN(142, "vCNV_BT_I2S_BCLK"), 557d25478e1SAndy Shevchenko PINCTRL_PIN(143, "vCNV_BT_I2S_WS_SYNC"), 558d25478e1SAndy Shevchenko PINCTRL_PIN(144, "vCNV_BT_I2S_SDO"), 559d25478e1SAndy Shevchenko PINCTRL_PIN(145, "vCNV_BT_I2S_SDI"), 560d25478e1SAndy Shevchenko PINCTRL_PIN(146, "vI2S2_SCLK"), 561d25478e1SAndy Shevchenko PINCTRL_PIN(147, "vI2S2_SFRM"), 562d25478e1SAndy Shevchenko PINCTRL_PIN(148, "vI2S2_TXD"), 563d25478e1SAndy Shevchenko PINCTRL_PIN(149, "vI2S2_RXD"), 564d25478e1SAndy Shevchenko PINCTRL_PIN(150, "vSD3_CD_B"), 565d25478e1SAndy Shevchenko /* GPP_C */ 566d25478e1SAndy Shevchenko PINCTRL_PIN(151, "GPPC_C_0"), 567d25478e1SAndy Shevchenko PINCTRL_PIN(152, "GPPC_C_1"), 568d25478e1SAndy Shevchenko PINCTRL_PIN(153, "GPPC_C_2"), 569d25478e1SAndy Shevchenko PINCTRL_PIN(154, "GPPC_C_3"), 570d25478e1SAndy Shevchenko PINCTRL_PIN(155, "GPPC_C_4"), 571d25478e1SAndy Shevchenko PINCTRL_PIN(156, "GPPC_C_5"), 572d25478e1SAndy Shevchenko PINCTRL_PIN(157, "SUSWARNB_SUSPWRDNACK"), 573d25478e1SAndy Shevchenko PINCTRL_PIN(158, "SUSACKB"), 574d25478e1SAndy Shevchenko PINCTRL_PIN(159, "UART0_RXD"), 575d25478e1SAndy Shevchenko PINCTRL_PIN(160, "UART0_TXD"), 576d25478e1SAndy Shevchenko PINCTRL_PIN(161, "UART0_RTSB"), 577d25478e1SAndy Shevchenko PINCTRL_PIN(162, "UART0_CTSB"), 578d25478e1SAndy Shevchenko PINCTRL_PIN(163, "UART1_RXD_ISH_UART1_RXD"), 579d25478e1SAndy Shevchenko PINCTRL_PIN(164, "UART1_TXD_ISH_UART1_TXD"), 580d25478e1SAndy Shevchenko PINCTRL_PIN(165, "UART1_RTSB_ISH_UART1_RTSB"), 581d25478e1SAndy Shevchenko PINCTRL_PIN(166, "UART1_CTSB_ISH_UART1_CTSB"), 582d25478e1SAndy Shevchenko PINCTRL_PIN(167, "I2C0_SDA"), 583d25478e1SAndy Shevchenko PINCTRL_PIN(168, "I2C0_SCL"), 584d25478e1SAndy Shevchenko PINCTRL_PIN(169, "I2C1_SDA"), 585d25478e1SAndy Shevchenko PINCTRL_PIN(170, "I2C1_SCL"), 586d25478e1SAndy Shevchenko PINCTRL_PIN(171, "UART2_RXD_CNV_MFUART0_RXD"), 587d25478e1SAndy Shevchenko PINCTRL_PIN(172, "UART2_TXD_CNV_MFUART0_TXD"), 588d25478e1SAndy Shevchenko PINCTRL_PIN(173, "UART2_RTSB_CNV_MFUART0_RTS_B"), 589d25478e1SAndy Shevchenko PINCTRL_PIN(174, "UART2_CTSB_CNV_MFUART0_CTS_B"), 590d25478e1SAndy Shevchenko /* HVCMOS */ 591d25478e1SAndy Shevchenko PINCTRL_PIN(175, "L_BKLTEN"), 592d25478e1SAndy Shevchenko PINCTRL_PIN(176, "L_BKLTCTL"), 593d25478e1SAndy Shevchenko PINCTRL_PIN(177, "L_VDDEN"), 594d25478e1SAndy Shevchenko PINCTRL_PIN(178, "SYS_PWROK"), 595d25478e1SAndy Shevchenko PINCTRL_PIN(179, "SYS_RESETB"), 596d25478e1SAndy Shevchenko PINCTRL_PIN(180, "MLK_RSTB"), 597d25478e1SAndy Shevchenko /* GPP_E */ 598d25478e1SAndy Shevchenko PINCTRL_PIN(181, "ISH_GP_0_IMGCLKOUT_0"), 599d25478e1SAndy Shevchenko PINCTRL_PIN(182, "ISH_GP_1"), 600d25478e1SAndy Shevchenko PINCTRL_PIN(183, "IMGCLKOUT_1"), 601d25478e1SAndy Shevchenko PINCTRL_PIN(184, "ISH_GP_2_SATA_DEVSLP_0"), 602d25478e1SAndy Shevchenko PINCTRL_PIN(185, "IMGCLKOUT_2"), 603d25478e1SAndy Shevchenko PINCTRL_PIN(186, "SATA_LEDB_SPI1_CS1B"), 604d25478e1SAndy Shevchenko PINCTRL_PIN(187, "IMGCLKOUT_3"), 605d25478e1SAndy Shevchenko PINCTRL_PIN(188, "ISH_GP_3_SATA_DEVSLP_1"), 606d25478e1SAndy Shevchenko PINCTRL_PIN(189, "FIVR_DIGPB_0"), 607d25478e1SAndy Shevchenko PINCTRL_PIN(190, "SML0CLK"), 608d25478e1SAndy Shevchenko PINCTRL_PIN(191, "SML0DATA"), 609d25478e1SAndy Shevchenko PINCTRL_PIN(192, "BSSB_LS3_RX"), 610d25478e1SAndy Shevchenko PINCTRL_PIN(193, "BSSB_LS3_TX"), 611d25478e1SAndy Shevchenko PINCTRL_PIN(194, "BSSB_LS0_RX"), 612d25478e1SAndy Shevchenko PINCTRL_PIN(195, "BSSB_LS0_TX"), 613d25478e1SAndy Shevchenko PINCTRL_PIN(196, "BSSB_LS1_RX"), 614d25478e1SAndy Shevchenko PINCTRL_PIN(197, "BSSB_LS1_TX"), 615d25478e1SAndy Shevchenko PINCTRL_PIN(198, "BSSB_LS2_RX"), 616d25478e1SAndy Shevchenko PINCTRL_PIN(199, "BSSB_LS2_TX"), 617d25478e1SAndy Shevchenko PINCTRL_PIN(200, "FIVR_DIGPB_1"), 618d25478e1SAndy Shevchenko PINCTRL_PIN(201, "CNV_BRI_DT"), 619d25478e1SAndy Shevchenko PINCTRL_PIN(202, "CNV_BRI_RSP"), 620d25478e1SAndy Shevchenko PINCTRL_PIN(203, "CNV_RGI_DT"), 621d25478e1SAndy Shevchenko PINCTRL_PIN(204, "CNV_RGI_RSP"), 622d25478e1SAndy Shevchenko /* GPP_G */ 623d25478e1SAndy Shevchenko PINCTRL_PIN(205, "SD3_CMD"), 624d25478e1SAndy Shevchenko PINCTRL_PIN(206, "SD3_D0"), 625d25478e1SAndy Shevchenko PINCTRL_PIN(207, "SD3_D1"), 626d25478e1SAndy Shevchenko PINCTRL_PIN(208, "SD3_D2"), 627d25478e1SAndy Shevchenko PINCTRL_PIN(209, "SD3_D3"), 628d25478e1SAndy Shevchenko PINCTRL_PIN(210, "SD3_CDB"), 629d25478e1SAndy Shevchenko PINCTRL_PIN(211, "SD3_CLK"), 630d25478e1SAndy Shevchenko PINCTRL_PIN(212, "SD3_WP"), 631d25478e1SAndy Shevchenko }; 632d25478e1SAndy Shevchenko 633d25478e1SAndy Shevchenko static const struct intel_padgroup icln_community0_gpps[] = { 634d25478e1SAndy Shevchenko ICL_GPP(0, 0, 8, INTEL_GPIO_BASE_NOMAP), /* SPI */ 635d25478e1SAndy Shevchenko ICL_GPP(1, 9, 34, 32), /* GPP_B */ 636d25478e1SAndy Shevchenko ICL_GPP(2, 35, 55, 64), /* GPP_A */ 637d25478e1SAndy Shevchenko ICL_GPP(3, 56, 63, 96), /* GPP_S */ 638d25478e1SAndy Shevchenko ICL_GPP(4, 64, 71, 128), /* GPP_R */ 639d25478e1SAndy Shevchenko }; 640d25478e1SAndy Shevchenko 641d25478e1SAndy Shevchenko static const struct intel_padgroup icln_community1_gpps[] = { 642d25478e1SAndy Shevchenko ICL_GPP(0, 72, 95, 160), /* GPP_H */ 643d25478e1SAndy Shevchenko ICL_GPP(1, 96, 121, 192), /* GPP_D */ 644d25478e1SAndy Shevchenko ICL_GPP(2, 122, 150, 224), /* vGPIO */ 645d25478e1SAndy Shevchenko ICL_GPP(3, 151, 174, 256), /* GPP_C */ 646d25478e1SAndy Shevchenko }; 647d25478e1SAndy Shevchenko 648d25478e1SAndy Shevchenko static const struct intel_padgroup icln_community4_gpps[] = { 649d25478e1SAndy Shevchenko ICL_GPP(0, 175, 180, INTEL_GPIO_BASE_NOMAP), /* HVCMOS */ 650d25478e1SAndy Shevchenko ICL_GPP(1, 181, 204, 288), /* GPP_E */ 651d25478e1SAndy Shevchenko }; 652d25478e1SAndy Shevchenko 653d25478e1SAndy Shevchenko static const struct intel_padgroup icln_community5_gpps[] = { 654d25478e1SAndy Shevchenko ICL_GPP(0, 205, 212, INTEL_GPIO_BASE_ZERO), /* GPP_G */ 655d25478e1SAndy Shevchenko }; 656d25478e1SAndy Shevchenko 657d25478e1SAndy Shevchenko static const struct intel_community icln_communities[] = { 658d25478e1SAndy Shevchenko ICL_N_COMMUNITY(0, 0, 71, icln_community0_gpps), 659d25478e1SAndy Shevchenko ICL_N_COMMUNITY(1, 72, 174, icln_community1_gpps), 660d25478e1SAndy Shevchenko ICL_N_COMMUNITY(2, 175, 204, icln_community4_gpps), 661d25478e1SAndy Shevchenko ICL_N_COMMUNITY(3, 205, 212, icln_community5_gpps), 662d25478e1SAndy Shevchenko }; 663d25478e1SAndy Shevchenko 664d25478e1SAndy Shevchenko static const struct intel_pinctrl_soc_data icln_soc_data = { 665d25478e1SAndy Shevchenko .pins = icln_pins, 666d25478e1SAndy Shevchenko .npins = ARRAY_SIZE(icln_pins), 667d25478e1SAndy Shevchenko .communities = icln_communities, 668d25478e1SAndy Shevchenko .ncommunities = ARRAY_SIZE(icln_communities), 669d25478e1SAndy Shevchenko }; 670d25478e1SAndy Shevchenko 6714ee73414SAndy Shevchenko static INTEL_PINCTRL_PM_OPS(icl_pinctrl_pm_ops); 672e6800d26SAndy Shevchenko 673e6800d26SAndy Shevchenko static const struct acpi_device_id icl_pinctrl_acpi_match[] = { 674ec7cf5c5SAndy Shevchenko { "INT3455", (kernel_ulong_t)&icllp_soc_data }, 675d25478e1SAndy Shevchenko { "INT34C3", (kernel_ulong_t)&icln_soc_data }, 6765c20a022SAndy Shevchenko { } 677e6800d26SAndy Shevchenko }; 678e6800d26SAndy Shevchenko MODULE_DEVICE_TABLE(acpi, icl_pinctrl_acpi_match); 679e6800d26SAndy Shevchenko 680e6800d26SAndy Shevchenko static struct platform_driver icl_pinctrl_driver = { 681ec7cf5c5SAndy Shevchenko .probe = intel_pinctrl_probe_by_hid, 682e6800d26SAndy Shevchenko .driver = { 683e6800d26SAndy Shevchenko .name = "icelake-pinctrl", 684e6800d26SAndy Shevchenko .acpi_match_table = icl_pinctrl_acpi_match, 685e6800d26SAndy Shevchenko .pm = &icl_pinctrl_pm_ops, 686e6800d26SAndy Shevchenko }, 687e6800d26SAndy Shevchenko }; 688e6800d26SAndy Shevchenko module_platform_driver(icl_pinctrl_driver); 689e6800d26SAndy Shevchenko 690e6800d26SAndy Shevchenko MODULE_AUTHOR("Andy Shevchenko <andriy.shevchenko@linux.intel.com>"); 691e6800d26SAndy Shevchenko MODULE_AUTHOR("Mika Westerberg <mika.westerberg@linux.intel.com>"); 692e6800d26SAndy Shevchenko MODULE_DESCRIPTION("Intel Ice Lake PCH pinctrl/GPIO driver"); 693e6800d26SAndy Shevchenko MODULE_LICENSE("GPL v2"); 694*34393c36SAndy Shevchenko MODULE_IMPORT_NS(PINCTRL_INTEL); 695