18c2ecf20Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * Intel Denverton SoC pinctrl/GPIO driver 48c2ecf20Sopenharmony_ci * 58c2ecf20Sopenharmony_ci * Copyright (C) 2017, Intel Corporation 68c2ecf20Sopenharmony_ci * Author: Mika Westerberg <mika.westerberg@linux.intel.com> 78c2ecf20Sopenharmony_ci */ 88c2ecf20Sopenharmony_ci 98c2ecf20Sopenharmony_ci#include <linux/mod_devicetable.h> 108c2ecf20Sopenharmony_ci#include <linux/module.h> 118c2ecf20Sopenharmony_ci#include <linux/platform_device.h> 128c2ecf20Sopenharmony_ci 138c2ecf20Sopenharmony_ci#include <linux/pinctrl/pinctrl.h> 148c2ecf20Sopenharmony_ci 158c2ecf20Sopenharmony_ci#include "pinctrl-intel.h" 168c2ecf20Sopenharmony_ci 178c2ecf20Sopenharmony_ci#define DNV_PAD_OWN 0x020 188c2ecf20Sopenharmony_ci#define DNV_PADCFGLOCK 0x090 198c2ecf20Sopenharmony_ci#define DNV_HOSTSW_OWN 0x0C0 208c2ecf20Sopenharmony_ci#define DNV_GPI_IS 0x100 218c2ecf20Sopenharmony_ci#define DNV_GPI_IE 0x120 228c2ecf20Sopenharmony_ci 238c2ecf20Sopenharmony_ci#define DNV_GPP(n, s, e) \ 248c2ecf20Sopenharmony_ci { \ 258c2ecf20Sopenharmony_ci .reg_num = (n), \ 268c2ecf20Sopenharmony_ci .base = (s), \ 278c2ecf20Sopenharmony_ci .size = ((e) - (s) + 1), \ 288c2ecf20Sopenharmony_ci } 298c2ecf20Sopenharmony_ci 308c2ecf20Sopenharmony_ci#define DNV_COMMUNITY(b, s, e, g) \ 318c2ecf20Sopenharmony_ci { \ 328c2ecf20Sopenharmony_ci .barno = (b), \ 338c2ecf20Sopenharmony_ci .padown_offset = DNV_PAD_OWN, \ 348c2ecf20Sopenharmony_ci .padcfglock_offset = DNV_PADCFGLOCK, \ 358c2ecf20Sopenharmony_ci .hostown_offset = DNV_HOSTSW_OWN, \ 368c2ecf20Sopenharmony_ci .is_offset = DNV_GPI_IS, \ 378c2ecf20Sopenharmony_ci .ie_offset = DNV_GPI_IE, \ 388c2ecf20Sopenharmony_ci .pin_base = (s), \ 398c2ecf20Sopenharmony_ci .npins = ((e) - (s) + 1), \ 408c2ecf20Sopenharmony_ci .gpps = (g), \ 418c2ecf20Sopenharmony_ci .ngpps = ARRAY_SIZE(g), \ 428c2ecf20Sopenharmony_ci } 438c2ecf20Sopenharmony_ci 448c2ecf20Sopenharmony_ci/* Denverton */ 458c2ecf20Sopenharmony_cistatic const struct pinctrl_pin_desc dnv_pins[] = { 468c2ecf20Sopenharmony_ci /* North ALL */ 478c2ecf20Sopenharmony_ci PINCTRL_PIN(0, "GBE0_SDP0"), 488c2ecf20Sopenharmony_ci PINCTRL_PIN(1, "GBE1_SDP0"), 498c2ecf20Sopenharmony_ci PINCTRL_PIN(2, "GBE0_SDP1"), 508c2ecf20Sopenharmony_ci PINCTRL_PIN(3, "GBE1_SDP1"), 518c2ecf20Sopenharmony_ci PINCTRL_PIN(4, "GBE0_SDP2"), 528c2ecf20Sopenharmony_ci PINCTRL_PIN(5, "GBE1_SDP2"), 538c2ecf20Sopenharmony_ci PINCTRL_PIN(6, "GBE0_SDP3"), 548c2ecf20Sopenharmony_ci PINCTRL_PIN(7, "GBE1_SDP3"), 558c2ecf20Sopenharmony_ci PINCTRL_PIN(8, "GBE2_LED0"), 568c2ecf20Sopenharmony_ci PINCTRL_PIN(9, "GBE2_LED1"), 578c2ecf20Sopenharmony_ci PINCTRL_PIN(10, "GBE0_I2C_CLK"), 588c2ecf20Sopenharmony_ci PINCTRL_PIN(11, "GBE0_I2C_DATA"), 598c2ecf20Sopenharmony_ci PINCTRL_PIN(12, "GBE1_I2C_CLK"), 608c2ecf20Sopenharmony_ci PINCTRL_PIN(13, "GBE1_I2C_DATA"), 618c2ecf20Sopenharmony_ci PINCTRL_PIN(14, "NCSI_RXD0"), 628c2ecf20Sopenharmony_ci PINCTRL_PIN(15, "NCSI_CLK_IN"), 638c2ecf20Sopenharmony_ci PINCTRL_PIN(16, "NCSI_RXD1"), 648c2ecf20Sopenharmony_ci PINCTRL_PIN(17, "NCSI_CRS_DV"), 658c2ecf20Sopenharmony_ci PINCTRL_PIN(18, "IDSLDO_VID_TICKLE"), 668c2ecf20Sopenharmony_ci PINCTRL_PIN(19, "NCSI_TX_EN"), 678c2ecf20Sopenharmony_ci PINCTRL_PIN(20, "NCSI_TXD0"), 688c2ecf20Sopenharmony_ci PINCTRL_PIN(21, "NCSI_TXD1"), 698c2ecf20Sopenharmony_ci PINCTRL_PIN(22, "NCSI_ARB_OUT"), 708c2ecf20Sopenharmony_ci PINCTRL_PIN(23, "GBE0_LED0"), 718c2ecf20Sopenharmony_ci PINCTRL_PIN(24, "GBE0_LED1"), 728c2ecf20Sopenharmony_ci PINCTRL_PIN(25, "GBE1_LED0"), 738c2ecf20Sopenharmony_ci PINCTRL_PIN(26, "GBE1_LED1"), 748c2ecf20Sopenharmony_ci PINCTRL_PIN(27, "SPARE_0"), 758c2ecf20Sopenharmony_ci PINCTRL_PIN(28, "PCIE_CLKREQ0_N"), 768c2ecf20Sopenharmony_ci PINCTRL_PIN(29, "PCIE_CLKREQ1_N"), 778c2ecf20Sopenharmony_ci PINCTRL_PIN(30, "PCIE_CLKREQ2_N"), 788c2ecf20Sopenharmony_ci PINCTRL_PIN(31, "PCIE_CLKREQ3_N"), 798c2ecf20Sopenharmony_ci PINCTRL_PIN(32, "PCIE_CLKREQ4_N"), 808c2ecf20Sopenharmony_ci PINCTRL_PIN(33, "GBE_MDC"), 818c2ecf20Sopenharmony_ci PINCTRL_PIN(34, "GBE_MDIO"), 828c2ecf20Sopenharmony_ci PINCTRL_PIN(35, "SVID_ALERT_N"), 838c2ecf20Sopenharmony_ci PINCTRL_PIN(36, "SVID_DATA"), 848c2ecf20Sopenharmony_ci PINCTRL_PIN(37, "SVID_CLK"), 858c2ecf20Sopenharmony_ci PINCTRL_PIN(38, "THERMTRIP_N"), 868c2ecf20Sopenharmony_ci PINCTRL_PIN(39, "PROCHOT_N"), 878c2ecf20Sopenharmony_ci PINCTRL_PIN(40, "MEMHOT_N"), 888c2ecf20Sopenharmony_ci /* South DFX */ 898c2ecf20Sopenharmony_ci PINCTRL_PIN(41, "DFX_PORT_CLK0"), 908c2ecf20Sopenharmony_ci PINCTRL_PIN(42, "DFX_PORT_CLK1"), 918c2ecf20Sopenharmony_ci PINCTRL_PIN(43, "DFX_PORT0"), 928c2ecf20Sopenharmony_ci PINCTRL_PIN(44, "DFX_PORT1"), 938c2ecf20Sopenharmony_ci PINCTRL_PIN(45, "DFX_PORT2"), 948c2ecf20Sopenharmony_ci PINCTRL_PIN(46, "DFX_PORT3"), 958c2ecf20Sopenharmony_ci PINCTRL_PIN(47, "DFX_PORT4"), 968c2ecf20Sopenharmony_ci PINCTRL_PIN(48, "DFX_PORT5"), 978c2ecf20Sopenharmony_ci PINCTRL_PIN(49, "DFX_PORT6"), 988c2ecf20Sopenharmony_ci PINCTRL_PIN(50, "DFX_PORT7"), 998c2ecf20Sopenharmony_ci PINCTRL_PIN(51, "DFX_PORT8"), 1008c2ecf20Sopenharmony_ci PINCTRL_PIN(52, "DFX_PORT9"), 1018c2ecf20Sopenharmony_ci PINCTRL_PIN(53, "DFX_PORT10"), 1028c2ecf20Sopenharmony_ci PINCTRL_PIN(54, "DFX_PORT11"), 1038c2ecf20Sopenharmony_ci PINCTRL_PIN(55, "DFX_PORT12"), 1048c2ecf20Sopenharmony_ci PINCTRL_PIN(56, "DFX_PORT13"), 1058c2ecf20Sopenharmony_ci PINCTRL_PIN(57, "DFX_PORT14"), 1068c2ecf20Sopenharmony_ci PINCTRL_PIN(58, "DFX_PORT15"), 1078c2ecf20Sopenharmony_ci /* South GPP0 */ 1088c2ecf20Sopenharmony_ci PINCTRL_PIN(59, "SPI_TPM_CS_N"), 1098c2ecf20Sopenharmony_ci PINCTRL_PIN(60, "UART2_CTS"), 1108c2ecf20Sopenharmony_ci PINCTRL_PIN(61, "PCIE_CLKREQ5_N"), 1118c2ecf20Sopenharmony_ci PINCTRL_PIN(62, "PCIE_CLKREQ6_N"), 1128c2ecf20Sopenharmony_ci PINCTRL_PIN(63, "PCIE_CLKREQ7_N"), 1138c2ecf20Sopenharmony_ci PINCTRL_PIN(64, "UART0_RXD"), 1148c2ecf20Sopenharmony_ci PINCTRL_PIN(65, "UART0_TXD"), 1158c2ecf20Sopenharmony_ci PINCTRL_PIN(66, "CPU_RESET_N"), 1168c2ecf20Sopenharmony_ci PINCTRL_PIN(67, "NMI"), 1178c2ecf20Sopenharmony_ci PINCTRL_PIN(68, "ERROR2_N"), 1188c2ecf20Sopenharmony_ci PINCTRL_PIN(69, "ERROR1_N"), 1198c2ecf20Sopenharmony_ci PINCTRL_PIN(70, "ERROR0_N"), 1208c2ecf20Sopenharmony_ci PINCTRL_PIN(71, "IERR_N"), 1218c2ecf20Sopenharmony_ci PINCTRL_PIN(72, "MCERR_N"), 1228c2ecf20Sopenharmony_ci PINCTRL_PIN(73, "SMB0_LEG_CLK"), 1238c2ecf20Sopenharmony_ci PINCTRL_PIN(74, "SMB0_LEG_DATA"), 1248c2ecf20Sopenharmony_ci PINCTRL_PIN(75, "SMB0_LEG_ALRT_N"), 1258c2ecf20Sopenharmony_ci PINCTRL_PIN(76, "SMB1_HOST_DATA"), 1268c2ecf20Sopenharmony_ci PINCTRL_PIN(77, "SMB1_HOST_CLK"), 1278c2ecf20Sopenharmony_ci PINCTRL_PIN(78, "SMB2_PECI_DATA"), 1288c2ecf20Sopenharmony_ci PINCTRL_PIN(79, "SMB2_PECI_CLK"), 1298c2ecf20Sopenharmony_ci PINCTRL_PIN(80, "SMB4_CSME0_DATA"), 1308c2ecf20Sopenharmony_ci PINCTRL_PIN(81, "SMB4_CSME0_CLK"), 1318c2ecf20Sopenharmony_ci PINCTRL_PIN(82, "SMB4_CSME0_ALRT_N"), 1328c2ecf20Sopenharmony_ci PINCTRL_PIN(83, "USB_OC0_N"), 1338c2ecf20Sopenharmony_ci PINCTRL_PIN(84, "FLEX_CLK_SE0"), 1348c2ecf20Sopenharmony_ci PINCTRL_PIN(85, "FLEX_CLK_SE1"), 1358c2ecf20Sopenharmony_ci PINCTRL_PIN(86, "SPARE_4"), 1368c2ecf20Sopenharmony_ci PINCTRL_PIN(87, "SMB3_IE0_CLK"), 1378c2ecf20Sopenharmony_ci PINCTRL_PIN(88, "SMB3_IE0_DATA"), 1388c2ecf20Sopenharmony_ci PINCTRL_PIN(89, "SMB3_IE0_ALRT_N"), 1398c2ecf20Sopenharmony_ci PINCTRL_PIN(90, "SATA0_LED_N"), 1408c2ecf20Sopenharmony_ci PINCTRL_PIN(91, "SATA1_LED_N"), 1418c2ecf20Sopenharmony_ci PINCTRL_PIN(92, "SATA_PDETECT0"), 1428c2ecf20Sopenharmony_ci PINCTRL_PIN(93, "SATA_PDETECT1"), 1438c2ecf20Sopenharmony_ci PINCTRL_PIN(94, "UART1_RTS"), 1448c2ecf20Sopenharmony_ci PINCTRL_PIN(95, "UART1_CTS"), 1458c2ecf20Sopenharmony_ci PINCTRL_PIN(96, "UART1_RXD"), 1468c2ecf20Sopenharmony_ci PINCTRL_PIN(97, "UART1_TXD"), 1478c2ecf20Sopenharmony_ci PINCTRL_PIN(98, "SPARE_8"), 1488c2ecf20Sopenharmony_ci PINCTRL_PIN(99, "SPARE_9"), 1498c2ecf20Sopenharmony_ci PINCTRL_PIN(100, "TCK"), 1508c2ecf20Sopenharmony_ci PINCTRL_PIN(101, "TRST_N"), 1518c2ecf20Sopenharmony_ci PINCTRL_PIN(102, "TMS"), 1528c2ecf20Sopenharmony_ci PINCTRL_PIN(103, "TDI"), 1538c2ecf20Sopenharmony_ci PINCTRL_PIN(104, "TDO"), 1548c2ecf20Sopenharmony_ci PINCTRL_PIN(105, "CX_PRDY_N"), 1558c2ecf20Sopenharmony_ci PINCTRL_PIN(106, "CX_PREQ_N"), 1568c2ecf20Sopenharmony_ci PINCTRL_PIN(107, "TAP1_TCK"), 1578c2ecf20Sopenharmony_ci PINCTRL_PIN(108, "TAP1_TRST_N"), 1588c2ecf20Sopenharmony_ci PINCTRL_PIN(109, "TAP1_TMS"), 1598c2ecf20Sopenharmony_ci PINCTRL_PIN(110, "TAP1_TDI"), 1608c2ecf20Sopenharmony_ci PINCTRL_PIN(111, "TAP1_TDO"), 1618c2ecf20Sopenharmony_ci /* South GPP1 */ 1628c2ecf20Sopenharmony_ci PINCTRL_PIN(112, "SUSPWRDNACK"), 1638c2ecf20Sopenharmony_ci PINCTRL_PIN(113, "PMU_SUSCLK"), 1648c2ecf20Sopenharmony_ci PINCTRL_PIN(114, "ADR_TRIGGER"), 1658c2ecf20Sopenharmony_ci PINCTRL_PIN(115, "PMU_SLP_S45_N"), 1668c2ecf20Sopenharmony_ci PINCTRL_PIN(116, "PMU_SLP_S3_N"), 1678c2ecf20Sopenharmony_ci PINCTRL_PIN(117, "PMU_WAKE_N"), 1688c2ecf20Sopenharmony_ci PINCTRL_PIN(118, "PMU_PWRBTN_N"), 1698c2ecf20Sopenharmony_ci PINCTRL_PIN(119, "PMU_RESETBUTTON_N"), 1708c2ecf20Sopenharmony_ci PINCTRL_PIN(120, "PMU_PLTRST_N"), 1718c2ecf20Sopenharmony_ci PINCTRL_PIN(121, "SUS_STAT_N"), 1728c2ecf20Sopenharmony_ci PINCTRL_PIN(122, "SLP_S0IX_N"), 1738c2ecf20Sopenharmony_ci PINCTRL_PIN(123, "SPI_CS0_N"), 1748c2ecf20Sopenharmony_ci PINCTRL_PIN(124, "SPI_CS1_N"), 1758c2ecf20Sopenharmony_ci PINCTRL_PIN(125, "SPI_MOSI_IO0"), 1768c2ecf20Sopenharmony_ci PINCTRL_PIN(126, "SPI_MISO_IO1"), 1778c2ecf20Sopenharmony_ci PINCTRL_PIN(127, "SPI_IO2"), 1788c2ecf20Sopenharmony_ci PINCTRL_PIN(128, "SPI_IO3"), 1798c2ecf20Sopenharmony_ci PINCTRL_PIN(129, "SPI_CLK"), 1808c2ecf20Sopenharmony_ci PINCTRL_PIN(130, "SPI_CLK_LOOPBK"), 1818c2ecf20Sopenharmony_ci PINCTRL_PIN(131, "ESPI_IO0"), 1828c2ecf20Sopenharmony_ci PINCTRL_PIN(132, "ESPI_IO1"), 1838c2ecf20Sopenharmony_ci PINCTRL_PIN(133, "ESPI_IO2"), 1848c2ecf20Sopenharmony_ci PINCTRL_PIN(134, "ESPI_IO3"), 1858c2ecf20Sopenharmony_ci PINCTRL_PIN(135, "ESPI_CS0_N"), 1868c2ecf20Sopenharmony_ci PINCTRL_PIN(136, "ESPI_CLK"), 1878c2ecf20Sopenharmony_ci PINCTRL_PIN(137, "ESPI_RST_N"), 1888c2ecf20Sopenharmony_ci PINCTRL_PIN(138, "ESPI_ALRT0_N"), 1898c2ecf20Sopenharmony_ci PINCTRL_PIN(139, "ESPI_CS1_N"), 1908c2ecf20Sopenharmony_ci PINCTRL_PIN(140, "ESPI_ALRT1_N"), 1918c2ecf20Sopenharmony_ci PINCTRL_PIN(141, "ESPI_CLK_LOOPBK"), 1928c2ecf20Sopenharmony_ci PINCTRL_PIN(142, "EMMC_CMD"), 1938c2ecf20Sopenharmony_ci PINCTRL_PIN(143, "EMMC_STROBE"), 1948c2ecf20Sopenharmony_ci PINCTRL_PIN(144, "EMMC_CLK"), 1958c2ecf20Sopenharmony_ci PINCTRL_PIN(145, "EMMC_D0"), 1968c2ecf20Sopenharmony_ci PINCTRL_PIN(146, "EMMC_D1"), 1978c2ecf20Sopenharmony_ci PINCTRL_PIN(147, "EMMC_D2"), 1988c2ecf20Sopenharmony_ci PINCTRL_PIN(148, "EMMC_D3"), 1998c2ecf20Sopenharmony_ci PINCTRL_PIN(149, "EMMC_D4"), 2008c2ecf20Sopenharmony_ci PINCTRL_PIN(150, "EMMC_D5"), 2018c2ecf20Sopenharmony_ci PINCTRL_PIN(151, "EMMC_D6"), 2028c2ecf20Sopenharmony_ci PINCTRL_PIN(152, "EMMC_D7"), 2038c2ecf20Sopenharmony_ci PINCTRL_PIN(153, "SPARE_3"), 2048c2ecf20Sopenharmony_ci}; 2058c2ecf20Sopenharmony_ci 2068c2ecf20Sopenharmony_cistatic const unsigned int dnv_uart0_pins[] = { 60, 61, 64, 65 }; 2078c2ecf20Sopenharmony_cistatic const unsigned int dnv_uart0_modes[] = { 2, 3, 1, 1 }; 2088c2ecf20Sopenharmony_cistatic const unsigned int dnv_uart1_pins[] = { 94, 95, 96, 97 }; 2098c2ecf20Sopenharmony_cistatic const unsigned int dnv_uart2_pins[] = { 60, 61, 62, 63 }; 2108c2ecf20Sopenharmony_cistatic const unsigned int dnv_uart2_modes[] = { 1, 2, 2, 2 }; 2118c2ecf20Sopenharmony_cistatic const unsigned int dnv_emmc_pins[] = { 2128c2ecf20Sopenharmony_ci 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 2138c2ecf20Sopenharmony_ci}; 2148c2ecf20Sopenharmony_ci 2158c2ecf20Sopenharmony_cistatic const struct intel_pingroup dnv_groups[] = { 2168c2ecf20Sopenharmony_ci PIN_GROUP("uart0_grp", dnv_uart0_pins, dnv_uart0_modes), 2178c2ecf20Sopenharmony_ci PIN_GROUP("uart1_grp", dnv_uart1_pins, 1), 2188c2ecf20Sopenharmony_ci PIN_GROUP("uart2_grp", dnv_uart2_pins, dnv_uart2_modes), 2198c2ecf20Sopenharmony_ci PIN_GROUP("emmc_grp", dnv_emmc_pins, 1), 2208c2ecf20Sopenharmony_ci}; 2218c2ecf20Sopenharmony_ci 2228c2ecf20Sopenharmony_cistatic const char * const dnv_uart0_groups[] = { "uart0_grp" }; 2238c2ecf20Sopenharmony_cistatic const char * const dnv_uart1_groups[] = { "uart1_grp" }; 2248c2ecf20Sopenharmony_cistatic const char * const dnv_uart2_groups[] = { "uart2_grp" }; 2258c2ecf20Sopenharmony_cistatic const char * const dnv_emmc_groups[] = { "emmc_grp" }; 2268c2ecf20Sopenharmony_ci 2278c2ecf20Sopenharmony_cistatic const struct intel_function dnv_functions[] = { 2288c2ecf20Sopenharmony_ci FUNCTION("uart0", dnv_uart0_groups), 2298c2ecf20Sopenharmony_ci FUNCTION("uart1", dnv_uart1_groups), 2308c2ecf20Sopenharmony_ci FUNCTION("uart2", dnv_uart2_groups), 2318c2ecf20Sopenharmony_ci FUNCTION("emmc", dnv_emmc_groups), 2328c2ecf20Sopenharmony_ci}; 2338c2ecf20Sopenharmony_ci 2348c2ecf20Sopenharmony_cistatic const struct intel_padgroup dnv_north_gpps[] = { 2358c2ecf20Sopenharmony_ci DNV_GPP(0, 0, 31), /* North ALL_0 */ 2368c2ecf20Sopenharmony_ci DNV_GPP(1, 32, 40), /* North ALL_1 */ 2378c2ecf20Sopenharmony_ci}; 2388c2ecf20Sopenharmony_ci 2398c2ecf20Sopenharmony_cistatic const struct intel_padgroup dnv_south_gpps[] = { 2408c2ecf20Sopenharmony_ci DNV_GPP(0, 41, 58), /* South DFX */ 2418c2ecf20Sopenharmony_ci DNV_GPP(1, 59, 90), /* South GPP0_0 */ 2428c2ecf20Sopenharmony_ci DNV_GPP(2, 91, 111), /* South GPP0_1 */ 2438c2ecf20Sopenharmony_ci DNV_GPP(3, 112, 143), /* South GPP1_0 */ 2448c2ecf20Sopenharmony_ci DNV_GPP(4, 144, 153), /* South GPP1_1 */ 2458c2ecf20Sopenharmony_ci}; 2468c2ecf20Sopenharmony_ci 2478c2ecf20Sopenharmony_cistatic const struct intel_community dnv_communities[] = { 2488c2ecf20Sopenharmony_ci DNV_COMMUNITY(0, 0, 40, dnv_north_gpps), 2498c2ecf20Sopenharmony_ci DNV_COMMUNITY(1, 41, 153, dnv_south_gpps), 2508c2ecf20Sopenharmony_ci}; 2518c2ecf20Sopenharmony_ci 2528c2ecf20Sopenharmony_cistatic const struct intel_pinctrl_soc_data dnv_soc_data = { 2538c2ecf20Sopenharmony_ci .pins = dnv_pins, 2548c2ecf20Sopenharmony_ci .npins = ARRAY_SIZE(dnv_pins), 2558c2ecf20Sopenharmony_ci .groups = dnv_groups, 2568c2ecf20Sopenharmony_ci .ngroups = ARRAY_SIZE(dnv_groups), 2578c2ecf20Sopenharmony_ci .functions = dnv_functions, 2588c2ecf20Sopenharmony_ci .nfunctions = ARRAY_SIZE(dnv_functions), 2598c2ecf20Sopenharmony_ci .communities = dnv_communities, 2608c2ecf20Sopenharmony_ci .ncommunities = ARRAY_SIZE(dnv_communities), 2618c2ecf20Sopenharmony_ci}; 2628c2ecf20Sopenharmony_ci 2638c2ecf20Sopenharmony_cistatic INTEL_PINCTRL_PM_OPS(dnv_pinctrl_pm_ops); 2648c2ecf20Sopenharmony_ci 2658c2ecf20Sopenharmony_cistatic const struct acpi_device_id dnv_pinctrl_acpi_match[] = { 2668c2ecf20Sopenharmony_ci { "INTC3000", (kernel_ulong_t)&dnv_soc_data }, 2678c2ecf20Sopenharmony_ci { } 2688c2ecf20Sopenharmony_ci}; 2698c2ecf20Sopenharmony_ciMODULE_DEVICE_TABLE(acpi, dnv_pinctrl_acpi_match); 2708c2ecf20Sopenharmony_ci 2718c2ecf20Sopenharmony_cistatic struct platform_driver dnv_pinctrl_driver = { 2728c2ecf20Sopenharmony_ci .probe = intel_pinctrl_probe_by_hid, 2738c2ecf20Sopenharmony_ci .driver = { 2748c2ecf20Sopenharmony_ci .name = "denverton-pinctrl", 2758c2ecf20Sopenharmony_ci .acpi_match_table = dnv_pinctrl_acpi_match, 2768c2ecf20Sopenharmony_ci .pm = &dnv_pinctrl_pm_ops, 2778c2ecf20Sopenharmony_ci }, 2788c2ecf20Sopenharmony_ci}; 2798c2ecf20Sopenharmony_ci 2808c2ecf20Sopenharmony_cistatic int __init dnv_pinctrl_init(void) 2818c2ecf20Sopenharmony_ci{ 2828c2ecf20Sopenharmony_ci return platform_driver_register(&dnv_pinctrl_driver); 2838c2ecf20Sopenharmony_ci} 2848c2ecf20Sopenharmony_cisubsys_initcall(dnv_pinctrl_init); 2858c2ecf20Sopenharmony_ci 2868c2ecf20Sopenharmony_cistatic void __exit dnv_pinctrl_exit(void) 2878c2ecf20Sopenharmony_ci{ 2888c2ecf20Sopenharmony_ci platform_driver_unregister(&dnv_pinctrl_driver); 2898c2ecf20Sopenharmony_ci} 2908c2ecf20Sopenharmony_cimodule_exit(dnv_pinctrl_exit); 2918c2ecf20Sopenharmony_ci 2928c2ecf20Sopenharmony_ciMODULE_AUTHOR("Mika Westerberg <mika.westerberg@linux.intel.com>"); 2938c2ecf20Sopenharmony_ciMODULE_DESCRIPTION("Intel Denverton SoC pinctrl/GPIO driver"); 2948c2ecf20Sopenharmony_ciMODULE_LICENSE("GPL v2"); 295