162306a36Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0 262306a36Sopenharmony_ci/* 362306a36Sopenharmony_ci * Intel Emmitsburg PCH pinctrl/GPIO driver 462306a36Sopenharmony_ci * 562306a36Sopenharmony_ci * Copyright (C) 2020, Intel Corporation 662306a36Sopenharmony_ci * Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com> 762306a36Sopenharmony_ci */ 862306a36Sopenharmony_ci 962306a36Sopenharmony_ci#include <linux/mod_devicetable.h> 1062306a36Sopenharmony_ci#include <linux/module.h> 1162306a36Sopenharmony_ci#include <linux/platform_device.h> 1262306a36Sopenharmony_ci 1362306a36Sopenharmony_ci#include <linux/pinctrl/pinctrl.h> 1462306a36Sopenharmony_ci 1562306a36Sopenharmony_ci#include "pinctrl-intel.h" 1662306a36Sopenharmony_ci 1762306a36Sopenharmony_ci#define EBG_PAD_OWN 0x0a0 1862306a36Sopenharmony_ci#define EBG_PADCFGLOCK 0x100 1962306a36Sopenharmony_ci#define EBG_HOSTSW_OWN 0x130 2062306a36Sopenharmony_ci#define EBG_GPI_IS 0x200 2162306a36Sopenharmony_ci#define EBG_GPI_IE 0x210 2262306a36Sopenharmony_ci 2362306a36Sopenharmony_ci#define EBG_GPP(r, s, e) \ 2462306a36Sopenharmony_ci { \ 2562306a36Sopenharmony_ci .reg_num = (r), \ 2662306a36Sopenharmony_ci .base = (s), \ 2762306a36Sopenharmony_ci .size = ((e) - (s) + 1), \ 2862306a36Sopenharmony_ci } 2962306a36Sopenharmony_ci 3062306a36Sopenharmony_ci#define EBG_COMMUNITY(b, s, e, g) \ 3162306a36Sopenharmony_ci INTEL_COMMUNITY_GPPS(b, s, e, g, EBG) 3262306a36Sopenharmony_ci 3362306a36Sopenharmony_ci/* Emmitsburg */ 3462306a36Sopenharmony_cistatic const struct pinctrl_pin_desc ebg_pins[] = { 3562306a36Sopenharmony_ci /* GPP_A */ 3662306a36Sopenharmony_ci PINCTRL_PIN(0, "ESPI_ALERT0B"), 3762306a36Sopenharmony_ci PINCTRL_PIN(1, "ESPI_ALERT1B"), 3862306a36Sopenharmony_ci PINCTRL_PIN(2, "ESPI_IO_0"), 3962306a36Sopenharmony_ci PINCTRL_PIN(3, "ESPI_IO_1"), 4062306a36Sopenharmony_ci PINCTRL_PIN(4, "ESPI_IO_2"), 4162306a36Sopenharmony_ci PINCTRL_PIN(5, "ESPI_IO_3"), 4262306a36Sopenharmony_ci PINCTRL_PIN(6, "ESPI_CS0B"), 4362306a36Sopenharmony_ci PINCTRL_PIN(7, "ESPI_CS1B"), 4462306a36Sopenharmony_ci PINCTRL_PIN(8, "ESPI_RESETB"), 4562306a36Sopenharmony_ci PINCTRL_PIN(9, "ESPI_CLK"), 4662306a36Sopenharmony_ci PINCTRL_PIN(10, "SRCCLKREQB_0"), 4762306a36Sopenharmony_ci PINCTRL_PIN(11, "SRCCLKREQB_1"), 4862306a36Sopenharmony_ci PINCTRL_PIN(12, "SRCCLKREQB_2"), 4962306a36Sopenharmony_ci PINCTRL_PIN(13, "SRCCLKREQB_3"), 5062306a36Sopenharmony_ci PINCTRL_PIN(14, "SRCCLKREQB_4"), 5162306a36Sopenharmony_ci PINCTRL_PIN(15, "SRCCLKREQB_5"), 5262306a36Sopenharmony_ci PINCTRL_PIN(16, "SRCCLKREQB_6"), 5362306a36Sopenharmony_ci PINCTRL_PIN(17, "SRCCLKREQB_7"), 5462306a36Sopenharmony_ci PINCTRL_PIN(18, "SRCCLKREQB_8"), 5562306a36Sopenharmony_ci PINCTRL_PIN(19, "SRCCLKREQB_9"), 5662306a36Sopenharmony_ci PINCTRL_PIN(20, "ESPI_CLK_LOOPBK"), 5762306a36Sopenharmony_ci /* GPP_B */ 5862306a36Sopenharmony_ci PINCTRL_PIN(21, "GSXDOUT"), 5962306a36Sopenharmony_ci PINCTRL_PIN(22, "GSXSLOAD"), 6062306a36Sopenharmony_ci PINCTRL_PIN(23, "GSXDIN"), 6162306a36Sopenharmony_ci PINCTRL_PIN(24, "GSXSRESETB"), 6262306a36Sopenharmony_ci PINCTRL_PIN(25, "GSXCLK"), 6362306a36Sopenharmony_ci PINCTRL_PIN(26, "USB2_OCB_0"), 6462306a36Sopenharmony_ci PINCTRL_PIN(27, "USB2_OCB_1"), 6562306a36Sopenharmony_ci PINCTRL_PIN(28, "USB2_OCB_2"), 6662306a36Sopenharmony_ci PINCTRL_PIN(29, "USB2_OCB_3"), 6762306a36Sopenharmony_ci PINCTRL_PIN(30, "USB2_OCB_4"), 6862306a36Sopenharmony_ci PINCTRL_PIN(31, "USB2_OCB_5"), 6962306a36Sopenharmony_ci PINCTRL_PIN(32, "USB2_OCB_6"), 7062306a36Sopenharmony_ci PINCTRL_PIN(33, "HS_UART0_RXD"), 7162306a36Sopenharmony_ci PINCTRL_PIN(34, "HS_UART0_TXD"), 7262306a36Sopenharmony_ci PINCTRL_PIN(35, "HS_UART0_RTSB"), 7362306a36Sopenharmony_ci PINCTRL_PIN(36, "HS_UART0_CTSB"), 7462306a36Sopenharmony_ci PINCTRL_PIN(37, "HS_UART1_RXD"), 7562306a36Sopenharmony_ci PINCTRL_PIN(38, "HS_UART1_TXD"), 7662306a36Sopenharmony_ci PINCTRL_PIN(39, "HS_UART1_RTSB"), 7762306a36Sopenharmony_ci PINCTRL_PIN(40, "HS_UART1_CTSB"), 7862306a36Sopenharmony_ci PINCTRL_PIN(41, "GPPC_B_20"), 7962306a36Sopenharmony_ci PINCTRL_PIN(42, "GPPC_B_21"), 8062306a36Sopenharmony_ci PINCTRL_PIN(43, "GPPC_B_22"), 8162306a36Sopenharmony_ci PINCTRL_PIN(44, "PS_ONB"), 8262306a36Sopenharmony_ci /* SPI */ 8362306a36Sopenharmony_ci PINCTRL_PIN(45, "SPI0_IO_2"), 8462306a36Sopenharmony_ci PINCTRL_PIN(46, "SPI0_IO_3"), 8562306a36Sopenharmony_ci PINCTRL_PIN(47, "SPI0_MOSI_IO_0"), 8662306a36Sopenharmony_ci PINCTRL_PIN(48, "SPI0_MISO_IO_1"), 8762306a36Sopenharmony_ci PINCTRL_PIN(49, "SPI0_TPM_CSB"), 8862306a36Sopenharmony_ci PINCTRL_PIN(50, "SPI0_FLASH_0_CSB"), 8962306a36Sopenharmony_ci PINCTRL_PIN(51, "SPI0_FLASH_1_CSB"), 9062306a36Sopenharmony_ci PINCTRL_PIN(52, "SPI0_CLK"), 9162306a36Sopenharmony_ci PINCTRL_PIN(53, "TIME_SYNC_0"), 9262306a36Sopenharmony_ci PINCTRL_PIN(54, "SPKR"), 9362306a36Sopenharmony_ci PINCTRL_PIN(55, "CPU_GP_0"), 9462306a36Sopenharmony_ci PINCTRL_PIN(56, "CPU_GP_1"), 9562306a36Sopenharmony_ci PINCTRL_PIN(57, "CPU_GP_2"), 9662306a36Sopenharmony_ci PINCTRL_PIN(58, "CPU_GP_3"), 9762306a36Sopenharmony_ci PINCTRL_PIN(59, "SUSWARNB_SUSPWRDNACK"), 9862306a36Sopenharmony_ci PINCTRL_PIN(60, "SUSACKB"), 9962306a36Sopenharmony_ci PINCTRL_PIN(61, "NMIB"), 10062306a36Sopenharmony_ci PINCTRL_PIN(62, "SMIB"), 10162306a36Sopenharmony_ci PINCTRL_PIN(63, "GPPC_S_10"), 10262306a36Sopenharmony_ci PINCTRL_PIN(64, "GPPC_S_11"), 10362306a36Sopenharmony_ci PINCTRL_PIN(65, "SPI_CLK_LOOPBK"), 10462306a36Sopenharmony_ci /* GPP_C */ 10562306a36Sopenharmony_ci PINCTRL_PIN(66, "ME_SML0CLK"), 10662306a36Sopenharmony_ci PINCTRL_PIN(67, "ME_SML0DATA"), 10762306a36Sopenharmony_ci PINCTRL_PIN(68, "ME_SML0ALERTB"), 10862306a36Sopenharmony_ci PINCTRL_PIN(69, "ME_SML0BDATA"), 10962306a36Sopenharmony_ci PINCTRL_PIN(70, "ME_SML0BCLK"), 11062306a36Sopenharmony_ci PINCTRL_PIN(71, "ME_SML0BALERTB"), 11162306a36Sopenharmony_ci PINCTRL_PIN(72, "ME_SML1CLK"), 11262306a36Sopenharmony_ci PINCTRL_PIN(73, "ME_SML1DATA"), 11362306a36Sopenharmony_ci PINCTRL_PIN(74, "ME_SML1ALERTB"), 11462306a36Sopenharmony_ci PINCTRL_PIN(75, "ME_SML2CLK"), 11562306a36Sopenharmony_ci PINCTRL_PIN(76, "ME_SML2DATA"), 11662306a36Sopenharmony_ci PINCTRL_PIN(77, "ME_SML2ALERTB"), 11762306a36Sopenharmony_ci PINCTRL_PIN(78, "ME_SML3CLK"), 11862306a36Sopenharmony_ci PINCTRL_PIN(79, "ME_SML3DATA"), 11962306a36Sopenharmony_ci PINCTRL_PIN(80, "ME_SML3ALERTB"), 12062306a36Sopenharmony_ci PINCTRL_PIN(81, "ME_SML4CLK"), 12162306a36Sopenharmony_ci PINCTRL_PIN(82, "ME_SML4DATA"), 12262306a36Sopenharmony_ci PINCTRL_PIN(83, "ME_SML4ALERTB"), 12362306a36Sopenharmony_ci PINCTRL_PIN(84, "GPPC_C_18"), 12462306a36Sopenharmony_ci PINCTRL_PIN(85, "MC_SMBCLK"), 12562306a36Sopenharmony_ci PINCTRL_PIN(86, "MC_SMBDATA"), 12662306a36Sopenharmony_ci PINCTRL_PIN(87, "MC_SMBALERTB"), 12762306a36Sopenharmony_ci /* GPP_D */ 12862306a36Sopenharmony_ci PINCTRL_PIN(88, "HS_SMBCLK"), 12962306a36Sopenharmony_ci PINCTRL_PIN(89, "HS_SMBDATA"), 13062306a36Sopenharmony_ci PINCTRL_PIN(90, "HS_SMBALERTB"), 13162306a36Sopenharmony_ci PINCTRL_PIN(91, "GBE_SMB_ALRT_N"), 13262306a36Sopenharmony_ci PINCTRL_PIN(92, "GBE_SMB_CLK"), 13362306a36Sopenharmony_ci PINCTRL_PIN(93, "GBE_SMB_DATA"), 13462306a36Sopenharmony_ci PINCTRL_PIN(94, "GBE_GPIO10"), 13562306a36Sopenharmony_ci PINCTRL_PIN(95, "GBE_GPIO11"), 13662306a36Sopenharmony_ci PINCTRL_PIN(96, "CRASHLOG_TRIG_N"), 13762306a36Sopenharmony_ci PINCTRL_PIN(97, "PMEB"), 13862306a36Sopenharmony_ci PINCTRL_PIN(98, "BM_BUSYB"), 13962306a36Sopenharmony_ci PINCTRL_PIN(99, "PLTRSTB"), 14062306a36Sopenharmony_ci PINCTRL_PIN(100, "PCHHOTB"), 14162306a36Sopenharmony_ci PINCTRL_PIN(101, "ADR_COMPLETE"), 14262306a36Sopenharmony_ci PINCTRL_PIN(102, "ADR_TRIGGER_N"), 14362306a36Sopenharmony_ci PINCTRL_PIN(103, "VRALERTB"), 14462306a36Sopenharmony_ci PINCTRL_PIN(104, "ADR_ACK"), 14562306a36Sopenharmony_ci PINCTRL_PIN(105, "THERMTRIP_N"), 14662306a36Sopenharmony_ci PINCTRL_PIN(106, "MEMTRIP_N"), 14762306a36Sopenharmony_ci PINCTRL_PIN(107, "MSMI_N"), 14862306a36Sopenharmony_ci PINCTRL_PIN(108, "CATERR_N"), 14962306a36Sopenharmony_ci PINCTRL_PIN(109, "GLB_RST_WARN_B"), 15062306a36Sopenharmony_ci PINCTRL_PIN(110, "USB2_OCB_7"), 15162306a36Sopenharmony_ci PINCTRL_PIN(111, "GPP_D_23"), 15262306a36Sopenharmony_ci /* GPP_E */ 15362306a36Sopenharmony_ci PINCTRL_PIN(112, "SATA1_XPCIE_0"), 15462306a36Sopenharmony_ci PINCTRL_PIN(113, "SATA1_XPCIE_1"), 15562306a36Sopenharmony_ci PINCTRL_PIN(114, "SATA1_XPCIE_2"), 15662306a36Sopenharmony_ci PINCTRL_PIN(115, "SATA1_XPCIE_3"), 15762306a36Sopenharmony_ci PINCTRL_PIN(116, "SATA0_XPCIE_2"), 15862306a36Sopenharmony_ci PINCTRL_PIN(117, "SATA0_XPCIE_3"), 15962306a36Sopenharmony_ci PINCTRL_PIN(118, "SATA0_USB3_XPCIE_0"), 16062306a36Sopenharmony_ci PINCTRL_PIN(119, "SATA0_USB3_XPCIE_1"), 16162306a36Sopenharmony_ci PINCTRL_PIN(120, "SATA0_SCLOCK"), 16262306a36Sopenharmony_ci PINCTRL_PIN(121, "SATA0_SLOAD"), 16362306a36Sopenharmony_ci PINCTRL_PIN(122, "SATA0_SDATAOUT"), 16462306a36Sopenharmony_ci PINCTRL_PIN(123, "SATA1_SCLOCK"), 16562306a36Sopenharmony_ci PINCTRL_PIN(124, "SATA1_SLOAD"), 16662306a36Sopenharmony_ci PINCTRL_PIN(125, "SATA1_SDATAOUT"), 16762306a36Sopenharmony_ci PINCTRL_PIN(126, "SATA2_SCLOCK"), 16862306a36Sopenharmony_ci PINCTRL_PIN(127, "SATA2_SLOAD"), 16962306a36Sopenharmony_ci PINCTRL_PIN(128, "SATA2_SDATAOUT"), 17062306a36Sopenharmony_ci PINCTRL_PIN(129, "ERR0_N"), 17162306a36Sopenharmony_ci PINCTRL_PIN(130, "ERR1_N"), 17262306a36Sopenharmony_ci PINCTRL_PIN(131, "ERR2_N"), 17362306a36Sopenharmony_ci PINCTRL_PIN(132, "GBE_UART_RXD"), 17462306a36Sopenharmony_ci PINCTRL_PIN(133, "GBE_UART_TXD"), 17562306a36Sopenharmony_ci PINCTRL_PIN(134, "GBE_UART_RTSB"), 17662306a36Sopenharmony_ci PINCTRL_PIN(135, "GBE_UART_CTSB"), 17762306a36Sopenharmony_ci /* JTAG */ 17862306a36Sopenharmony_ci PINCTRL_PIN(136, "JTAG_TDO"), 17962306a36Sopenharmony_ci PINCTRL_PIN(137, "JTAG_TDI"), 18062306a36Sopenharmony_ci PINCTRL_PIN(138, "JTAG_TCK"), 18162306a36Sopenharmony_ci PINCTRL_PIN(139, "JTAG_TMS"), 18262306a36Sopenharmony_ci PINCTRL_PIN(140, "JTAGX"), 18362306a36Sopenharmony_ci PINCTRL_PIN(141, "PRDYB"), 18462306a36Sopenharmony_ci PINCTRL_PIN(142, "PREQB"), 18562306a36Sopenharmony_ci PINCTRL_PIN(143, "GLB_PC_DISABLE"), 18662306a36Sopenharmony_ci PINCTRL_PIN(144, "DBG_PMODE"), 18762306a36Sopenharmony_ci PINCTRL_PIN(145, "GLB_EXT_ACC_DISABLE"), 18862306a36Sopenharmony_ci /* GPP_H */ 18962306a36Sopenharmony_ci PINCTRL_PIN(146, "GBE_GPIO12"), 19062306a36Sopenharmony_ci PINCTRL_PIN(147, "GBE_GPIO13"), 19162306a36Sopenharmony_ci PINCTRL_PIN(148, "GBE_SDP_TIMESYNC0_S2N"), 19262306a36Sopenharmony_ci PINCTRL_PIN(149, "GBE_SDP_TIMESYNC1_S2N"), 19362306a36Sopenharmony_ci PINCTRL_PIN(150, "GBE_SDP_TIMESYNC2_S2N"), 19462306a36Sopenharmony_ci PINCTRL_PIN(151, "GBE_SDP_TIMESYNC3_S2N"), 19562306a36Sopenharmony_ci PINCTRL_PIN(152, "GPPC_H_6"), 19662306a36Sopenharmony_ci PINCTRL_PIN(153, "GPPC_H_7"), 19762306a36Sopenharmony_ci PINCTRL_PIN(154, "NCSI_CLK_IN"), 19862306a36Sopenharmony_ci PINCTRL_PIN(155, "NCSI_CRS_DV"), 19962306a36Sopenharmony_ci PINCTRL_PIN(156, "NCSI_RXD0"), 20062306a36Sopenharmony_ci PINCTRL_PIN(157, "NCSI_RXD1"), 20162306a36Sopenharmony_ci PINCTRL_PIN(158, "NCSI_TX_EN"), 20262306a36Sopenharmony_ci PINCTRL_PIN(159, "NCSI_TXD0"), 20362306a36Sopenharmony_ci PINCTRL_PIN(160, "NCSI_TXD1"), 20462306a36Sopenharmony_ci PINCTRL_PIN(161, "NAC_NCSI_CLK_OUT_0"), 20562306a36Sopenharmony_ci PINCTRL_PIN(162, "NAC_NCSI_CLK_OUT_1"), 20662306a36Sopenharmony_ci PINCTRL_PIN(163, "NAC_NCSI_CLK_OUT_2"), 20762306a36Sopenharmony_ci PINCTRL_PIN(164, "PMCALERTB"), 20862306a36Sopenharmony_ci PINCTRL_PIN(165, "GPPC_H_19"), 20962306a36Sopenharmony_ci /* GPP_J */ 21062306a36Sopenharmony_ci PINCTRL_PIN(166, "CPUPWRGD"), 21162306a36Sopenharmony_ci PINCTRL_PIN(167, "CPU_THRMTRIP_N"), 21262306a36Sopenharmony_ci PINCTRL_PIN(168, "PLTRST_CPUB"), 21362306a36Sopenharmony_ci PINCTRL_PIN(169, "TRIGGER0_N"), 21462306a36Sopenharmony_ci PINCTRL_PIN(170, "TRIGGER1_N"), 21562306a36Sopenharmony_ci PINCTRL_PIN(171, "CPU_PWR_DEBUG_N"), 21662306a36Sopenharmony_ci PINCTRL_PIN(172, "CPU_MEMTRIP_N"), 21762306a36Sopenharmony_ci PINCTRL_PIN(173, "CPU_MSMI_N"), 21862306a36Sopenharmony_ci PINCTRL_PIN(174, "ME_PECI"), 21962306a36Sopenharmony_ci PINCTRL_PIN(175, "NAC_SPARE0"), 22062306a36Sopenharmony_ci PINCTRL_PIN(176, "NAC_SPARE1"), 22162306a36Sopenharmony_ci PINCTRL_PIN(177, "NAC_SPARE2"), 22262306a36Sopenharmony_ci PINCTRL_PIN(178, "CPU_ERR0_N"), 22362306a36Sopenharmony_ci PINCTRL_PIN(179, "CPU_CATERR_N"), 22462306a36Sopenharmony_ci PINCTRL_PIN(180, "CPU_ERR1_N"), 22562306a36Sopenharmony_ci PINCTRL_PIN(181, "CPU_ERR2_N"), 22662306a36Sopenharmony_ci PINCTRL_PIN(182, "GPP_J_16"), 22762306a36Sopenharmony_ci PINCTRL_PIN(183, "GPP_J_17"), 22862306a36Sopenharmony_ci /* GPP_I */ 22962306a36Sopenharmony_ci PINCTRL_PIN(184, "GBE_GPIO4"), 23062306a36Sopenharmony_ci PINCTRL_PIN(185, "GBE_GPIO5"), 23162306a36Sopenharmony_ci PINCTRL_PIN(186, "GBE_GPIO6"), 23262306a36Sopenharmony_ci PINCTRL_PIN(187, "GBE_GPIO7"), 23362306a36Sopenharmony_ci PINCTRL_PIN(188, "GBE1_LED1"), 23462306a36Sopenharmony_ci PINCTRL_PIN(189, "GBE1_LED2"), 23562306a36Sopenharmony_ci PINCTRL_PIN(190, "GBE2_LED0"), 23662306a36Sopenharmony_ci PINCTRL_PIN(191, "GBE2_LED1"), 23762306a36Sopenharmony_ci PINCTRL_PIN(192, "GBE2_LED2"), 23862306a36Sopenharmony_ci PINCTRL_PIN(193, "GBE3_LED0"), 23962306a36Sopenharmony_ci PINCTRL_PIN(194, "GBE3_LED1"), 24062306a36Sopenharmony_ci PINCTRL_PIN(195, "GBE3_LED2"), 24162306a36Sopenharmony_ci PINCTRL_PIN(196, "GBE0_I2C_CLK"), 24262306a36Sopenharmony_ci PINCTRL_PIN(197, "GBE0_I2C_DATA"), 24362306a36Sopenharmony_ci PINCTRL_PIN(198, "GBE1_I2C_CLK"), 24462306a36Sopenharmony_ci PINCTRL_PIN(199, "GBE1_I2C_DATA"), 24562306a36Sopenharmony_ci PINCTRL_PIN(200, "GBE2_I2C_CLK"), 24662306a36Sopenharmony_ci PINCTRL_PIN(201, "GBE2_I2C_DATA"), 24762306a36Sopenharmony_ci PINCTRL_PIN(202, "GBE3_I2C_CLK"), 24862306a36Sopenharmony_ci PINCTRL_PIN(203, "GBE3_I2C_DATA"), 24962306a36Sopenharmony_ci PINCTRL_PIN(204, "GBE4_I2C_CLK"), 25062306a36Sopenharmony_ci PINCTRL_PIN(205, "GBE4_I2C_DATA"), 25162306a36Sopenharmony_ci PINCTRL_PIN(206, "GBE_GPIO8"), 25262306a36Sopenharmony_ci PINCTRL_PIN(207, "GBE_GPIO9"), 25362306a36Sopenharmony_ci /* GPP_L */ 25462306a36Sopenharmony_ci PINCTRL_PIN(208, "PM_SYNC_0"), 25562306a36Sopenharmony_ci PINCTRL_PIN(209, "PM_DOWN_0"), 25662306a36Sopenharmony_ci PINCTRL_PIN(210, "PM_SYNC_CLK_0"), 25762306a36Sopenharmony_ci PINCTRL_PIN(211, "GPP_L_3"), 25862306a36Sopenharmony_ci PINCTRL_PIN(212, "GPP_L_4"), 25962306a36Sopenharmony_ci PINCTRL_PIN(213, "GPP_L_5"), 26062306a36Sopenharmony_ci PINCTRL_PIN(214, "GPP_L_6"), 26162306a36Sopenharmony_ci PINCTRL_PIN(215, "GPP_L_7"), 26262306a36Sopenharmony_ci PINCTRL_PIN(216, "GPP_L_8"), 26362306a36Sopenharmony_ci PINCTRL_PIN(217, "NAC_GBE_GPIO0_S2N"), 26462306a36Sopenharmony_ci PINCTRL_PIN(218, "NAC_GBE_GPIO1_S2N"), 26562306a36Sopenharmony_ci PINCTRL_PIN(219, "NAC_GBE_GPIO2_S2N"), 26662306a36Sopenharmony_ci PINCTRL_PIN(220, "NAC_GBE_GPIO3_S2N"), 26762306a36Sopenharmony_ci PINCTRL_PIN(221, "NAC_GBE_SMB_DATA_IN"), 26862306a36Sopenharmony_ci PINCTRL_PIN(222, "NAC_GBE_SMB_DATA_OUT"), 26962306a36Sopenharmony_ci PINCTRL_PIN(223, "NAC_GBE_SMB_ALRT_N"), 27062306a36Sopenharmony_ci PINCTRL_PIN(224, "NAC_GBE_SMB_CLK_IN"), 27162306a36Sopenharmony_ci PINCTRL_PIN(225, "NAC_GBE_SMB_CLK_OUT"), 27262306a36Sopenharmony_ci /* GPP_M */ 27362306a36Sopenharmony_ci PINCTRL_PIN(226, "GPP_M_0"), 27462306a36Sopenharmony_ci PINCTRL_PIN(227, "GPP_M_1"), 27562306a36Sopenharmony_ci PINCTRL_PIN(228, "GPP_M_2"), 27662306a36Sopenharmony_ci PINCTRL_PIN(229, "GPP_M_3"), 27762306a36Sopenharmony_ci PINCTRL_PIN(230, "NAC_WAKE_N"), 27862306a36Sopenharmony_ci PINCTRL_PIN(231, "GPP_M_5"), 27962306a36Sopenharmony_ci PINCTRL_PIN(232, "GPP_M_6"), 28062306a36Sopenharmony_ci PINCTRL_PIN(233, "GPP_M_7"), 28162306a36Sopenharmony_ci PINCTRL_PIN(234, "GPP_M_8"), 28262306a36Sopenharmony_ci PINCTRL_PIN(235, "NAC_SBLINK_S2N"), 28362306a36Sopenharmony_ci PINCTRL_PIN(236, "NAC_SBLINK_N2S"), 28462306a36Sopenharmony_ci PINCTRL_PIN(237, "NAC_SBLINK_CLK_N2S"), 28562306a36Sopenharmony_ci PINCTRL_PIN(238, "NAC_SBLINK_CLK_S2N"), 28662306a36Sopenharmony_ci PINCTRL_PIN(239, "NAC_XTAL_VALID"), 28762306a36Sopenharmony_ci PINCTRL_PIN(240, "NAC_RESET_NAC_N"), 28862306a36Sopenharmony_ci PINCTRL_PIN(241, "GPP_M_15"), 28962306a36Sopenharmony_ci PINCTRL_PIN(242, "GPP_M_16"), 29062306a36Sopenharmony_ci PINCTRL_PIN(243, "GPP_M_17"), 29162306a36Sopenharmony_ci /* GPP_N */ 29262306a36Sopenharmony_ci PINCTRL_PIN(244, "GPP_N_0"), 29362306a36Sopenharmony_ci PINCTRL_PIN(245, "NAC_NCSI_TXD0"), 29462306a36Sopenharmony_ci PINCTRL_PIN(246, "GPP_N_2"), 29562306a36Sopenharmony_ci PINCTRL_PIN(247, "GPP_N_3"), 29662306a36Sopenharmony_ci PINCTRL_PIN(248, "NAC_NCSI_REFCLK_IN"), 29762306a36Sopenharmony_ci PINCTRL_PIN(249, "GPP_N_5"), 29862306a36Sopenharmony_ci PINCTRL_PIN(250, "GPP_N_6"), 29962306a36Sopenharmony_ci PINCTRL_PIN(251, "GPP_N_7"), 30062306a36Sopenharmony_ci PINCTRL_PIN(252, "NAC_NCSI_RXD0"), 30162306a36Sopenharmony_ci PINCTRL_PIN(253, "NAC_NCSI_RXD1"), 30262306a36Sopenharmony_ci PINCTRL_PIN(254, "NAC_NCSI_CRS_DV"), 30362306a36Sopenharmony_ci PINCTRL_PIN(255, "NAC_NCSI_CLK_IN"), 30462306a36Sopenharmony_ci PINCTRL_PIN(256, "NAC_NCSI_REFCLK_OUT"), 30562306a36Sopenharmony_ci PINCTRL_PIN(257, "NAC_NCSI_TX_EN"), 30662306a36Sopenharmony_ci PINCTRL_PIN(258, "NAC_NCSI_TXD1"), 30762306a36Sopenharmony_ci PINCTRL_PIN(259, "NAC_NCSI_OE_N"), 30862306a36Sopenharmony_ci PINCTRL_PIN(260, "NAC_GR_N"), 30962306a36Sopenharmony_ci PINCTRL_PIN(261, "NAC_INIT_SX_WAKE_N"), 31062306a36Sopenharmony_ci}; 31162306a36Sopenharmony_ci 31262306a36Sopenharmony_cistatic const struct intel_padgroup ebg_community0_gpps[] = { 31362306a36Sopenharmony_ci EBG_GPP(0, 0, 20), /* GPP_A */ 31462306a36Sopenharmony_ci EBG_GPP(1, 21, 44), /* GPP_B */ 31562306a36Sopenharmony_ci EBG_GPP(2, 45, 65), /* SPI */ 31662306a36Sopenharmony_ci}; 31762306a36Sopenharmony_ci 31862306a36Sopenharmony_cistatic const struct intel_padgroup ebg_community1_gpps[] = { 31962306a36Sopenharmony_ci EBG_GPP(0, 66, 87), /* GPP_C */ 32062306a36Sopenharmony_ci EBG_GPP(1, 88, 111), /* GPP_D */ 32162306a36Sopenharmony_ci}; 32262306a36Sopenharmony_ci 32362306a36Sopenharmony_cistatic const struct intel_padgroup ebg_community3_gpps[] = { 32462306a36Sopenharmony_ci EBG_GPP(0, 112, 135), /* GPP_E */ 32562306a36Sopenharmony_ci EBG_GPP(1, 136, 145), /* JTAG */ 32662306a36Sopenharmony_ci}; 32762306a36Sopenharmony_ci 32862306a36Sopenharmony_cistatic const struct intel_padgroup ebg_community4_gpps[] = { 32962306a36Sopenharmony_ci EBG_GPP(0, 146, 165), /* GPP_H */ 33062306a36Sopenharmony_ci EBG_GPP(1, 166, 183), /* GPP_J */ 33162306a36Sopenharmony_ci}; 33262306a36Sopenharmony_ci 33362306a36Sopenharmony_cistatic const struct intel_padgroup ebg_community5_gpps[] = { 33462306a36Sopenharmony_ci EBG_GPP(0, 184, 207), /* GPP_I */ 33562306a36Sopenharmony_ci EBG_GPP(1, 208, 225), /* GPP_L */ 33662306a36Sopenharmony_ci EBG_GPP(2, 226, 243), /* GPP_M */ 33762306a36Sopenharmony_ci EBG_GPP(3, 244, 261), /* GPP_N */ 33862306a36Sopenharmony_ci}; 33962306a36Sopenharmony_ci 34062306a36Sopenharmony_cistatic const struct intel_community ebg_communities[] = { 34162306a36Sopenharmony_ci EBG_COMMUNITY(0, 0, 65, ebg_community0_gpps), 34262306a36Sopenharmony_ci EBG_COMMUNITY(1, 66, 111, ebg_community1_gpps), 34362306a36Sopenharmony_ci EBG_COMMUNITY(2, 112, 145, ebg_community3_gpps), 34462306a36Sopenharmony_ci EBG_COMMUNITY(3, 146, 183, ebg_community4_gpps), 34562306a36Sopenharmony_ci EBG_COMMUNITY(4, 184, 261, ebg_community5_gpps), 34662306a36Sopenharmony_ci}; 34762306a36Sopenharmony_ci 34862306a36Sopenharmony_cistatic const struct intel_pinctrl_soc_data ebg_soc_data = { 34962306a36Sopenharmony_ci .pins = ebg_pins, 35062306a36Sopenharmony_ci .npins = ARRAY_SIZE(ebg_pins), 35162306a36Sopenharmony_ci .communities = ebg_communities, 35262306a36Sopenharmony_ci .ncommunities = ARRAY_SIZE(ebg_communities), 35362306a36Sopenharmony_ci}; 35462306a36Sopenharmony_ci 35562306a36Sopenharmony_cistatic const struct acpi_device_id ebg_pinctrl_acpi_match[] = { 35662306a36Sopenharmony_ci { "INTC1071", (kernel_ulong_t)&ebg_soc_data }, 35762306a36Sopenharmony_ci { } 35862306a36Sopenharmony_ci}; 35962306a36Sopenharmony_ciMODULE_DEVICE_TABLE(acpi, ebg_pinctrl_acpi_match); 36062306a36Sopenharmony_ci 36162306a36Sopenharmony_cistatic INTEL_PINCTRL_PM_OPS(ebg_pinctrl_pm_ops); 36262306a36Sopenharmony_ci 36362306a36Sopenharmony_cistatic struct platform_driver ebg_pinctrl_driver = { 36462306a36Sopenharmony_ci .probe = intel_pinctrl_probe_by_hid, 36562306a36Sopenharmony_ci .driver = { 36662306a36Sopenharmony_ci .name = "emmitsburg-pinctrl", 36762306a36Sopenharmony_ci .acpi_match_table = ebg_pinctrl_acpi_match, 36862306a36Sopenharmony_ci .pm = &ebg_pinctrl_pm_ops, 36962306a36Sopenharmony_ci }, 37062306a36Sopenharmony_ci}; 37162306a36Sopenharmony_cimodule_platform_driver(ebg_pinctrl_driver); 37262306a36Sopenharmony_ci 37362306a36Sopenharmony_ciMODULE_AUTHOR("Andy Shevchenko <andriy.shevchenko@linux.intel.com>"); 37462306a36Sopenharmony_ciMODULE_DESCRIPTION("Intel Emmitsburg PCH pinctrl/GPIO driver"); 37562306a36Sopenharmony_ciMODULE_LICENSE("GPL v2"); 37662306a36Sopenharmony_ciMODULE_IMPORT_NS(PINCTRL_INTEL); 377