162306a36Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0
262306a36Sopenharmony_ci/*
362306a36Sopenharmony_ci * Intel Ice Lake PCH pinctrl/GPIO driver
462306a36Sopenharmony_ci *
562306a36Sopenharmony_ci * Copyright (C) 2018, 2022 Intel Corporation
662306a36Sopenharmony_ci * Authors: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
762306a36Sopenharmony_ci *	    Mika Westerberg <mika.westerberg@linux.intel.com>
862306a36Sopenharmony_ci */
962306a36Sopenharmony_ci
1062306a36Sopenharmony_ci#include <linux/acpi.h>
1162306a36Sopenharmony_ci#include <linux/module.h>
1262306a36Sopenharmony_ci#include <linux/platform_device.h>
1362306a36Sopenharmony_ci
1462306a36Sopenharmony_ci#include <linux/pinctrl/pinctrl.h>
1562306a36Sopenharmony_ci
1662306a36Sopenharmony_ci#include "pinctrl-intel.h"
1762306a36Sopenharmony_ci
1862306a36Sopenharmony_ci#define ICL_LP_PAD_OWN		0x020
1962306a36Sopenharmony_ci#define ICL_LP_PADCFGLOCK	0x080
2062306a36Sopenharmony_ci#define ICL_LP_HOSTSW_OWN	0x0b0
2162306a36Sopenharmony_ci#define ICL_LP_GPI_IS		0x100
2262306a36Sopenharmony_ci#define ICL_LP_GPI_IE		0x110
2362306a36Sopenharmony_ci
2462306a36Sopenharmony_ci#define ICL_N_PAD_OWN		0x020
2562306a36Sopenharmony_ci#define ICL_N_PADCFGLOCK	0x080
2662306a36Sopenharmony_ci#define ICL_N_HOSTSW_OWN	0x0b0
2762306a36Sopenharmony_ci#define ICL_N_GPI_IS		0x100
2862306a36Sopenharmony_ci#define ICL_N_GPI_IE		0x120
2962306a36Sopenharmony_ci
3062306a36Sopenharmony_ci#define ICL_GPP(r, s, e, g)				\
3162306a36Sopenharmony_ci	{						\
3262306a36Sopenharmony_ci		.reg_num = (r),				\
3362306a36Sopenharmony_ci		.base = (s),				\
3462306a36Sopenharmony_ci		.size = ((e) - (s) + 1),		\
3562306a36Sopenharmony_ci		.gpio_base = (g),			\
3662306a36Sopenharmony_ci	}
3762306a36Sopenharmony_ci
3862306a36Sopenharmony_ci#define ICL_LP_COMMUNITY(b, s, e, g)			\
3962306a36Sopenharmony_ci	INTEL_COMMUNITY_GPPS(b, s, e, g, ICL_LP)
4062306a36Sopenharmony_ci
4162306a36Sopenharmony_ci#define ICL_N_COMMUNITY(b, s, e, g)			\
4262306a36Sopenharmony_ci	INTEL_COMMUNITY_GPPS(b, s, e, g, ICL_N)
4362306a36Sopenharmony_ci
4462306a36Sopenharmony_ci/* Ice Lake-LP */
4562306a36Sopenharmony_cistatic const struct pinctrl_pin_desc icllp_pins[] = {
4662306a36Sopenharmony_ci	/* GPP_G */
4762306a36Sopenharmony_ci	PINCTRL_PIN(0, "SD3_CMD"),
4862306a36Sopenharmony_ci	PINCTRL_PIN(1, "SD3_D0"),
4962306a36Sopenharmony_ci	PINCTRL_PIN(2, "SD3_D1"),
5062306a36Sopenharmony_ci	PINCTRL_PIN(3, "SD3_D2"),
5162306a36Sopenharmony_ci	PINCTRL_PIN(4, "SD3_D3"),
5262306a36Sopenharmony_ci	PINCTRL_PIN(5, "SD3_CDB"),
5362306a36Sopenharmony_ci	PINCTRL_PIN(6, "SD3_CLK"),
5462306a36Sopenharmony_ci	PINCTRL_PIN(7, "SD3_WP"),
5562306a36Sopenharmony_ci	/* GPP_B */
5662306a36Sopenharmony_ci	PINCTRL_PIN(8, "CORE_VID_0"),
5762306a36Sopenharmony_ci	PINCTRL_PIN(9, "CORE_VID_1"),
5862306a36Sopenharmony_ci	PINCTRL_PIN(10, "VRALERTB"),
5962306a36Sopenharmony_ci	PINCTRL_PIN(11, "CPU_GP_2"),
6062306a36Sopenharmony_ci	PINCTRL_PIN(12, "CPU_GP_3"),
6162306a36Sopenharmony_ci	PINCTRL_PIN(13, "ISH_I2C0_SDA"),
6262306a36Sopenharmony_ci	PINCTRL_PIN(14, "ISH_I2C0_SCL"),
6362306a36Sopenharmony_ci	PINCTRL_PIN(15, "ISH_I2C1_SDA"),
6462306a36Sopenharmony_ci	PINCTRL_PIN(16, "ISH_I2C1_SCL"),
6562306a36Sopenharmony_ci	PINCTRL_PIN(17, "I2C5_SDA"),
6662306a36Sopenharmony_ci	PINCTRL_PIN(18, "I2C5_SCL"),
6762306a36Sopenharmony_ci	PINCTRL_PIN(19, "PMCALERTB"),
6862306a36Sopenharmony_ci	PINCTRL_PIN(20, "SLP_S0B"),
6962306a36Sopenharmony_ci	PINCTRL_PIN(21, "PLTRSTB"),
7062306a36Sopenharmony_ci	PINCTRL_PIN(22, "SPKR"),
7162306a36Sopenharmony_ci	PINCTRL_PIN(23, "GSPI0_CS0B"),
7262306a36Sopenharmony_ci	PINCTRL_PIN(24, "GSPI0_CLK"),
7362306a36Sopenharmony_ci	PINCTRL_PIN(25, "GSPI0_MISO"),
7462306a36Sopenharmony_ci	PINCTRL_PIN(26, "GSPI0_MOSI"),
7562306a36Sopenharmony_ci	PINCTRL_PIN(27, "GSPI1_CS0B"),
7662306a36Sopenharmony_ci	PINCTRL_PIN(28, "GSPI1_CLK"),
7762306a36Sopenharmony_ci	PINCTRL_PIN(29, "GSPI1_MISO"),
7862306a36Sopenharmony_ci	PINCTRL_PIN(30, "GSPI1_MOSI"),
7962306a36Sopenharmony_ci	PINCTRL_PIN(31, "SML1ALERTB"),
8062306a36Sopenharmony_ci	PINCTRL_PIN(32, "GSPI0_CLK_LOOPBK"),
8162306a36Sopenharmony_ci	PINCTRL_PIN(33, "GSPI1_CLK_LOOPBK"),
8262306a36Sopenharmony_ci	/* GPP_A */
8362306a36Sopenharmony_ci	PINCTRL_PIN(34, "ESPI_IO_0"),
8462306a36Sopenharmony_ci	PINCTRL_PIN(35, "ESPI_IO_1"),
8562306a36Sopenharmony_ci	PINCTRL_PIN(36, "ESPI_IO_2"),
8662306a36Sopenharmony_ci	PINCTRL_PIN(37, "ESPI_IO_3"),
8762306a36Sopenharmony_ci	PINCTRL_PIN(38, "ESPI_CSB"),
8862306a36Sopenharmony_ci	PINCTRL_PIN(39, "ESPI_CLK"),
8962306a36Sopenharmony_ci	PINCTRL_PIN(40, "ESPI_RESETB"),
9062306a36Sopenharmony_ci	PINCTRL_PIN(41, "I2S2_SCLK"),
9162306a36Sopenharmony_ci	PINCTRL_PIN(42, "I2S2_SFRM"),
9262306a36Sopenharmony_ci	PINCTRL_PIN(43, "I2S2_TXD"),
9362306a36Sopenharmony_ci	PINCTRL_PIN(44, "I2S2_RXD"),
9462306a36Sopenharmony_ci	PINCTRL_PIN(45, "SATA_DEVSLP_2"),
9562306a36Sopenharmony_ci	PINCTRL_PIN(46, "SATAXPCIE_1"),
9662306a36Sopenharmony_ci	PINCTRL_PIN(47, "SATAXPCIE_2"),
9762306a36Sopenharmony_ci	PINCTRL_PIN(48, "USB2_OCB_1"),
9862306a36Sopenharmony_ci	PINCTRL_PIN(49, "USB2_OCB_2"),
9962306a36Sopenharmony_ci	PINCTRL_PIN(50, "USB2_OCB_3"),
10062306a36Sopenharmony_ci	PINCTRL_PIN(51, "DDSP_HPD_C"),
10162306a36Sopenharmony_ci	PINCTRL_PIN(52, "DDSP_HPD_B"),
10262306a36Sopenharmony_ci	PINCTRL_PIN(53, "DDSP_HPD_1"),
10362306a36Sopenharmony_ci	PINCTRL_PIN(54, "DDSP_HPD_2"),
10462306a36Sopenharmony_ci	PINCTRL_PIN(55, "I2S5_TXD"),
10562306a36Sopenharmony_ci	PINCTRL_PIN(56, "I2S5_RXD"),
10662306a36Sopenharmony_ci	PINCTRL_PIN(57, "I2S1_SCLK"),
10762306a36Sopenharmony_ci	PINCTRL_PIN(58, "ESPI_CLK_LOOPBK"),
10862306a36Sopenharmony_ci	/* GPP_H */
10962306a36Sopenharmony_ci	PINCTRL_PIN(59, "SD_1P8_SEL"),
11062306a36Sopenharmony_ci	PINCTRL_PIN(60, "SD_PWR_EN_B"),
11162306a36Sopenharmony_ci	PINCTRL_PIN(61, "GPPC_H_2"),
11262306a36Sopenharmony_ci	PINCTRL_PIN(62, "SX_EXIT_HOLDOFFB"),
11362306a36Sopenharmony_ci	PINCTRL_PIN(63, "I2C2_SDA"),
11462306a36Sopenharmony_ci	PINCTRL_PIN(64, "I2C2_SCL"),
11562306a36Sopenharmony_ci	PINCTRL_PIN(65, "I2C3_SDA"),
11662306a36Sopenharmony_ci	PINCTRL_PIN(66, "I2C3_SCL"),
11762306a36Sopenharmony_ci	PINCTRL_PIN(67, "I2C4_SDA"),
11862306a36Sopenharmony_ci	PINCTRL_PIN(68, "I2C4_SCL"),
11962306a36Sopenharmony_ci	PINCTRL_PIN(69, "SRCCLKREQB_4"),
12062306a36Sopenharmony_ci	PINCTRL_PIN(70, "SRCCLKREQB_5"),
12162306a36Sopenharmony_ci	PINCTRL_PIN(71, "M2_SKT2_CFG_0"),
12262306a36Sopenharmony_ci	PINCTRL_PIN(72, "M2_SKT2_CFG_1"),
12362306a36Sopenharmony_ci	PINCTRL_PIN(73, "M2_SKT2_CFG_2"),
12462306a36Sopenharmony_ci	PINCTRL_PIN(74, "M2_SKT2_CFG_3"),
12562306a36Sopenharmony_ci	PINCTRL_PIN(75, "DDPB_CTRLCLK"),
12662306a36Sopenharmony_ci	PINCTRL_PIN(76, "DDPB_CTRLDATA"),
12762306a36Sopenharmony_ci	PINCTRL_PIN(77, "CPU_VCCIO_PWR_GATEB"),
12862306a36Sopenharmony_ci	PINCTRL_PIN(78, "TIME_SYNC_0"),
12962306a36Sopenharmony_ci	PINCTRL_PIN(79, "IMGCLKOUT_1"),
13062306a36Sopenharmony_ci	PINCTRL_PIN(80, "IMGCLKOUT_2"),
13162306a36Sopenharmony_ci	PINCTRL_PIN(81, "IMGCLKOUT_3"),
13262306a36Sopenharmony_ci	PINCTRL_PIN(82, "IMGCLKOUT_4"),
13362306a36Sopenharmony_ci	/* GPP_D */
13462306a36Sopenharmony_ci	PINCTRL_PIN(83, "ISH_GP_0"),
13562306a36Sopenharmony_ci	PINCTRL_PIN(84, "ISH_GP_1"),
13662306a36Sopenharmony_ci	PINCTRL_PIN(85, "ISH_GP_2"),
13762306a36Sopenharmony_ci	PINCTRL_PIN(86, "ISH_GP_3"),
13862306a36Sopenharmony_ci	PINCTRL_PIN(87, "IMGCLKOUT_0"),
13962306a36Sopenharmony_ci	PINCTRL_PIN(88, "SRCCLKREQB_0"),
14062306a36Sopenharmony_ci	PINCTRL_PIN(89, "SRCCLKREQB_1"),
14162306a36Sopenharmony_ci	PINCTRL_PIN(90, "SRCCLKREQB_2"),
14262306a36Sopenharmony_ci	PINCTRL_PIN(91, "SRCCLKREQB_3"),
14362306a36Sopenharmony_ci	PINCTRL_PIN(92, "ISH_SPI_CSB"),
14462306a36Sopenharmony_ci	PINCTRL_PIN(93, "ISH_SPI_CLK"),
14562306a36Sopenharmony_ci	PINCTRL_PIN(94, "ISH_SPI_MISO"),
14662306a36Sopenharmony_ci	PINCTRL_PIN(95, "ISH_SPI_MOSI"),
14762306a36Sopenharmony_ci	PINCTRL_PIN(96, "ISH_UART0_RXD"),
14862306a36Sopenharmony_ci	PINCTRL_PIN(97, "ISH_UART0_TXD"),
14962306a36Sopenharmony_ci	PINCTRL_PIN(98, "ISH_UART0_RTSB"),
15062306a36Sopenharmony_ci	PINCTRL_PIN(99, "ISH_UART0_CTSB"),
15162306a36Sopenharmony_ci	PINCTRL_PIN(100, "ISH_GP_4"),
15262306a36Sopenharmony_ci	PINCTRL_PIN(101, "ISH_GP_5"),
15362306a36Sopenharmony_ci	PINCTRL_PIN(102, "I2S_MCLK"),
15462306a36Sopenharmony_ci	PINCTRL_PIN(103, "GSPI2_CLK_LOOPBK"),
15562306a36Sopenharmony_ci	/* GPP_F */
15662306a36Sopenharmony_ci	PINCTRL_PIN(104, "CNV_BRI_DT"),
15762306a36Sopenharmony_ci	PINCTRL_PIN(105, "CNV_BRI_RSP"),
15862306a36Sopenharmony_ci	PINCTRL_PIN(106, "CNV_RGI_DT"),
15962306a36Sopenharmony_ci	PINCTRL_PIN(107, "CNV_RGI_RSP"),
16062306a36Sopenharmony_ci	PINCTRL_PIN(108, "CNV_RF_RESET_B"),
16162306a36Sopenharmony_ci	PINCTRL_PIN(109, "EMMC_HIP_MON"),
16262306a36Sopenharmony_ci	PINCTRL_PIN(110, "CNV_PA_BLANKING"),
16362306a36Sopenharmony_ci	PINCTRL_PIN(111, "EMMC_CMD"),
16462306a36Sopenharmony_ci	PINCTRL_PIN(112, "EMMC_DATA0"),
16562306a36Sopenharmony_ci	PINCTRL_PIN(113, "EMMC_DATA1"),
16662306a36Sopenharmony_ci	PINCTRL_PIN(114, "EMMC_DATA2"),
16762306a36Sopenharmony_ci	PINCTRL_PIN(115, "EMMC_DATA3"),
16862306a36Sopenharmony_ci	PINCTRL_PIN(116, "EMMC_DATA4"),
16962306a36Sopenharmony_ci	PINCTRL_PIN(117, "EMMC_DATA5"),
17062306a36Sopenharmony_ci	PINCTRL_PIN(118, "EMMC_DATA6"),
17162306a36Sopenharmony_ci	PINCTRL_PIN(119, "EMMC_DATA7"),
17262306a36Sopenharmony_ci	PINCTRL_PIN(120, "EMMC_RCLK"),
17362306a36Sopenharmony_ci	PINCTRL_PIN(121, "EMMC_CLK"),
17462306a36Sopenharmony_ci	PINCTRL_PIN(122, "EMMC_RESETB"),
17562306a36Sopenharmony_ci	PINCTRL_PIN(123, "A4WP_PRESENT"),
17662306a36Sopenharmony_ci	/* vGPIO */
17762306a36Sopenharmony_ci	PINCTRL_PIN(124, "CNV_BTEN"),
17862306a36Sopenharmony_ci	PINCTRL_PIN(125, "CNV_WCEN"),
17962306a36Sopenharmony_ci	PINCTRL_PIN(126, "CNV_BT_HOST_WAKEB"),
18062306a36Sopenharmony_ci	PINCTRL_PIN(127, "CNV_BT_IF_SELECT"),
18162306a36Sopenharmony_ci	PINCTRL_PIN(128, "vCNV_BT_UART_TXD"),
18262306a36Sopenharmony_ci	PINCTRL_PIN(129, "vCNV_BT_UART_RXD"),
18362306a36Sopenharmony_ci	PINCTRL_PIN(130, "vCNV_BT_UART_CTS_B"),
18462306a36Sopenharmony_ci	PINCTRL_PIN(131, "vCNV_BT_UART_RTS_B"),
18562306a36Sopenharmony_ci	PINCTRL_PIN(132, "vCNV_MFUART1_TXD"),
18662306a36Sopenharmony_ci	PINCTRL_PIN(133, "vCNV_MFUART1_RXD"),
18762306a36Sopenharmony_ci	PINCTRL_PIN(134, "vCNV_MFUART1_CTS_B"),
18862306a36Sopenharmony_ci	PINCTRL_PIN(135, "vCNV_MFUART1_RTS_B"),
18962306a36Sopenharmony_ci	PINCTRL_PIN(136, "vUART0_TXD"),
19062306a36Sopenharmony_ci	PINCTRL_PIN(137, "vUART0_RXD"),
19162306a36Sopenharmony_ci	PINCTRL_PIN(138, "vUART0_CTS_B"),
19262306a36Sopenharmony_ci	PINCTRL_PIN(139, "vUART0_RTS_B"),
19362306a36Sopenharmony_ci	PINCTRL_PIN(140, "vISH_UART0_TXD"),
19462306a36Sopenharmony_ci	PINCTRL_PIN(141, "vISH_UART0_RXD"),
19562306a36Sopenharmony_ci	PINCTRL_PIN(142, "vISH_UART0_CTS_B"),
19662306a36Sopenharmony_ci	PINCTRL_PIN(143, "vISH_UART0_RTS_B"),
19762306a36Sopenharmony_ci	PINCTRL_PIN(144, "vCNV_BT_I2S_BCLK"),
19862306a36Sopenharmony_ci	PINCTRL_PIN(145, "vCNV_BT_I2S_WS_SYNC"),
19962306a36Sopenharmony_ci	PINCTRL_PIN(146, "vCNV_BT_I2S_SDO"),
20062306a36Sopenharmony_ci	PINCTRL_PIN(147, "vCNV_BT_I2S_SDI"),
20162306a36Sopenharmony_ci	PINCTRL_PIN(148, "vI2S2_SCLK"),
20262306a36Sopenharmony_ci	PINCTRL_PIN(149, "vI2S2_SFRM"),
20362306a36Sopenharmony_ci	PINCTRL_PIN(150, "vI2S2_TXD"),
20462306a36Sopenharmony_ci	PINCTRL_PIN(151, "vI2S2_RXD"),
20562306a36Sopenharmony_ci	PINCTRL_PIN(152, "vSD3_CD_B"),
20662306a36Sopenharmony_ci	/* GPP_C */
20762306a36Sopenharmony_ci	PINCTRL_PIN(153, "SMBCLK"),
20862306a36Sopenharmony_ci	PINCTRL_PIN(154, "SMBDATA"),
20962306a36Sopenharmony_ci	PINCTRL_PIN(155, "SMBALERTB"),
21062306a36Sopenharmony_ci	PINCTRL_PIN(156, "SML0CLK"),
21162306a36Sopenharmony_ci	PINCTRL_PIN(157, "SML0DATA"),
21262306a36Sopenharmony_ci	PINCTRL_PIN(158, "SML0ALERTB"),
21362306a36Sopenharmony_ci	PINCTRL_PIN(159, "SML1CLK"),
21462306a36Sopenharmony_ci	PINCTRL_PIN(160, "SML1DATA"),
21562306a36Sopenharmony_ci	PINCTRL_PIN(161, "UART0_RXD"),
21662306a36Sopenharmony_ci	PINCTRL_PIN(162, "UART0_TXD"),
21762306a36Sopenharmony_ci	PINCTRL_PIN(163, "UART0_RTSB"),
21862306a36Sopenharmony_ci	PINCTRL_PIN(164, "UART0_CTSB"),
21962306a36Sopenharmony_ci	PINCTRL_PIN(165, "UART1_RXD"),
22062306a36Sopenharmony_ci	PINCTRL_PIN(166, "UART1_TXD"),
22162306a36Sopenharmony_ci	PINCTRL_PIN(167, "UART1_RTSB"),
22262306a36Sopenharmony_ci	PINCTRL_PIN(168, "UART1_CTSB"),
22362306a36Sopenharmony_ci	PINCTRL_PIN(169, "I2C0_SDA"),
22462306a36Sopenharmony_ci	PINCTRL_PIN(170, "I2C0_SCL"),
22562306a36Sopenharmony_ci	PINCTRL_PIN(171, "I2C1_SDA"),
22662306a36Sopenharmony_ci	PINCTRL_PIN(172, "I2C1_SCL"),
22762306a36Sopenharmony_ci	PINCTRL_PIN(173, "UART2_RXD"),
22862306a36Sopenharmony_ci	PINCTRL_PIN(174, "UART2_TXD"),
22962306a36Sopenharmony_ci	PINCTRL_PIN(175, "UART2_RTSB"),
23062306a36Sopenharmony_ci	PINCTRL_PIN(176, "UART2_CTSB"),
23162306a36Sopenharmony_ci	/* HVCMOS */
23262306a36Sopenharmony_ci	PINCTRL_PIN(177, "L_BKLTEN"),
23362306a36Sopenharmony_ci	PINCTRL_PIN(178, "L_BKLTCTL"),
23462306a36Sopenharmony_ci	PINCTRL_PIN(179, "L_VDDEN"),
23562306a36Sopenharmony_ci	PINCTRL_PIN(180, "SYS_PWROK"),
23662306a36Sopenharmony_ci	PINCTRL_PIN(181, "SYS_RESETB"),
23762306a36Sopenharmony_ci	PINCTRL_PIN(182, "MLK_RSTB"),
23862306a36Sopenharmony_ci	/* GPP_E */
23962306a36Sopenharmony_ci	PINCTRL_PIN(183, "SATAXPCIE_0"),
24062306a36Sopenharmony_ci	PINCTRL_PIN(184, "SPI1_IO_2"),
24162306a36Sopenharmony_ci	PINCTRL_PIN(185, "SPI1_IO_3"),
24262306a36Sopenharmony_ci	PINCTRL_PIN(186, "CPU_GP_0"),
24362306a36Sopenharmony_ci	PINCTRL_PIN(187, "SATA_DEVSLP_0"),
24462306a36Sopenharmony_ci	PINCTRL_PIN(188, "SATA_DEVSLP_1"),
24562306a36Sopenharmony_ci	PINCTRL_PIN(189, "GPPC_E_6"),
24662306a36Sopenharmony_ci	PINCTRL_PIN(190, "CPU_GP_1"),
24762306a36Sopenharmony_ci	PINCTRL_PIN(191, "SATA_LEDB"),
24862306a36Sopenharmony_ci	PINCTRL_PIN(192, "USB2_OCB_0"),
24962306a36Sopenharmony_ci	PINCTRL_PIN(193, "SPI1_CSB"),
25062306a36Sopenharmony_ci	PINCTRL_PIN(194, "SPI1_CLK"),
25162306a36Sopenharmony_ci	PINCTRL_PIN(195, "SPI1_MISO_IO_1"),
25262306a36Sopenharmony_ci	PINCTRL_PIN(196, "SPI1_MOSI_IO_0"),
25362306a36Sopenharmony_ci	PINCTRL_PIN(197, "DDSP_HPD_A"),
25462306a36Sopenharmony_ci	PINCTRL_PIN(198, "ISH_GP_6"),
25562306a36Sopenharmony_ci	PINCTRL_PIN(199, "ISH_GP_7"),
25662306a36Sopenharmony_ci	PINCTRL_PIN(200, "DISP_MISC_4"),
25762306a36Sopenharmony_ci	PINCTRL_PIN(201, "DDP1_CTRLCLK"),
25862306a36Sopenharmony_ci	PINCTRL_PIN(202, "DDP1_CTRLDATA"),
25962306a36Sopenharmony_ci	PINCTRL_PIN(203, "DDP2_CTRLCLK"),
26062306a36Sopenharmony_ci	PINCTRL_PIN(204, "DDP2_CTRLDATA"),
26162306a36Sopenharmony_ci	PINCTRL_PIN(205, "DDPA_CTRLCLK"),
26262306a36Sopenharmony_ci	PINCTRL_PIN(206, "DDPA_CTRLDATA"),
26362306a36Sopenharmony_ci	/* JTAG */
26462306a36Sopenharmony_ci	PINCTRL_PIN(207, "JTAG_TDO"),
26562306a36Sopenharmony_ci	PINCTRL_PIN(208, "JTAGX"),
26662306a36Sopenharmony_ci	PINCTRL_PIN(209, "PRDYB"),
26762306a36Sopenharmony_ci	PINCTRL_PIN(210, "PREQB"),
26862306a36Sopenharmony_ci	PINCTRL_PIN(211, "CPU_TRSTB"),
26962306a36Sopenharmony_ci	PINCTRL_PIN(212, "JTAG_TDI"),
27062306a36Sopenharmony_ci	PINCTRL_PIN(213, "JTAG_TMS"),
27162306a36Sopenharmony_ci	PINCTRL_PIN(214, "JTAG_TCK"),
27262306a36Sopenharmony_ci	PINCTRL_PIN(215, "ITP_PMODE"),
27362306a36Sopenharmony_ci	/* GPP_R */
27462306a36Sopenharmony_ci	PINCTRL_PIN(216, "HDA_BCLK"),
27562306a36Sopenharmony_ci	PINCTRL_PIN(217, "HDA_SYNC"),
27662306a36Sopenharmony_ci	PINCTRL_PIN(218, "HDA_SDO"),
27762306a36Sopenharmony_ci	PINCTRL_PIN(219, "HDA_SDI_0"),
27862306a36Sopenharmony_ci	PINCTRL_PIN(220, "HDA_RSTB"),
27962306a36Sopenharmony_ci	PINCTRL_PIN(221, "HDA_SDI_1"),
28062306a36Sopenharmony_ci	PINCTRL_PIN(222, "I2S1_TXD"),
28162306a36Sopenharmony_ci	PINCTRL_PIN(223, "I2S1_RXD"),
28262306a36Sopenharmony_ci	/* GPP_S */
28362306a36Sopenharmony_ci	PINCTRL_PIN(224, "SNDW1_CLK"),
28462306a36Sopenharmony_ci	PINCTRL_PIN(225, "SNDW1_DATA"),
28562306a36Sopenharmony_ci	PINCTRL_PIN(226, "SNDW2_CLK"),
28662306a36Sopenharmony_ci	PINCTRL_PIN(227, "SNDW2_DATA"),
28762306a36Sopenharmony_ci	PINCTRL_PIN(228, "SNDW3_CLK"),
28862306a36Sopenharmony_ci	PINCTRL_PIN(229, "SNDW3_DATA"),
28962306a36Sopenharmony_ci	PINCTRL_PIN(230, "SNDW4_CLK"),
29062306a36Sopenharmony_ci	PINCTRL_PIN(231, "SNDW4_DATA"),
29162306a36Sopenharmony_ci	/* SPI */
29262306a36Sopenharmony_ci	PINCTRL_PIN(232, "SPI0_IO_2"),
29362306a36Sopenharmony_ci	PINCTRL_PIN(233, "SPI0_IO_3"),
29462306a36Sopenharmony_ci	PINCTRL_PIN(234, "SPI0_MOSI_IO_0"),
29562306a36Sopenharmony_ci	PINCTRL_PIN(235, "SPI0_MISO_IO_1"),
29662306a36Sopenharmony_ci	PINCTRL_PIN(236, "SPI0_TPM_CSB"),
29762306a36Sopenharmony_ci	PINCTRL_PIN(237, "SPI0_FLASH_0_CSB"),
29862306a36Sopenharmony_ci	PINCTRL_PIN(238, "SPI0_FLASH_1_CSB"),
29962306a36Sopenharmony_ci	PINCTRL_PIN(239, "SPI0_CLK"),
30062306a36Sopenharmony_ci	PINCTRL_PIN(240, "SPI0_CLK_LOOPBK"),
30162306a36Sopenharmony_ci};
30262306a36Sopenharmony_ci
30362306a36Sopenharmony_cistatic const struct intel_padgroup icllp_community0_gpps[] = {
30462306a36Sopenharmony_ci	ICL_GPP(0, 0, 7, 0),				/* GPP_G */
30562306a36Sopenharmony_ci	ICL_GPP(1, 8, 33, 32),				/* GPP_B */
30662306a36Sopenharmony_ci	ICL_GPP(2, 34, 58, 64),				/* GPP_A */
30762306a36Sopenharmony_ci};
30862306a36Sopenharmony_ci
30962306a36Sopenharmony_cistatic const struct intel_padgroup icllp_community1_gpps[] = {
31062306a36Sopenharmony_ci	ICL_GPP(0, 59, 82, 96),				/* GPP_H */
31162306a36Sopenharmony_ci	ICL_GPP(1, 83, 103, 128),			/* GPP_D */
31262306a36Sopenharmony_ci	ICL_GPP(2, 104, 123, 160),			/* GPP_F */
31362306a36Sopenharmony_ci	ICL_GPP(3, 124, 152, 192),			/* vGPIO */
31462306a36Sopenharmony_ci};
31562306a36Sopenharmony_ci
31662306a36Sopenharmony_cistatic const struct intel_padgroup icllp_community4_gpps[] = {
31762306a36Sopenharmony_ci	ICL_GPP(0, 153, 176, 224),			/* GPP_C */
31862306a36Sopenharmony_ci	ICL_GPP(1, 177, 182, INTEL_GPIO_BASE_NOMAP),	/* HVCMOS */
31962306a36Sopenharmony_ci	ICL_GPP(2, 183, 206, 256),			/* GPP_E */
32062306a36Sopenharmony_ci	ICL_GPP(3, 207, 215, INTEL_GPIO_BASE_NOMAP),	/* JTAG */
32162306a36Sopenharmony_ci};
32262306a36Sopenharmony_ci
32362306a36Sopenharmony_cistatic const struct intel_padgroup icllp_community5_gpps[] = {
32462306a36Sopenharmony_ci	ICL_GPP(0, 216, 223, 288),			/* GPP_R */
32562306a36Sopenharmony_ci	ICL_GPP(1, 224, 231, 320),			/* GPP_S */
32662306a36Sopenharmony_ci	ICL_GPP(2, 232, 240, INTEL_GPIO_BASE_NOMAP),	/* SPI */
32762306a36Sopenharmony_ci};
32862306a36Sopenharmony_ci
32962306a36Sopenharmony_cistatic const struct intel_community icllp_communities[] = {
33062306a36Sopenharmony_ci	ICL_LP_COMMUNITY(0, 0, 58, icllp_community0_gpps),
33162306a36Sopenharmony_ci	ICL_LP_COMMUNITY(1, 59, 152, icllp_community1_gpps),
33262306a36Sopenharmony_ci	ICL_LP_COMMUNITY(2, 153, 215, icllp_community4_gpps),
33362306a36Sopenharmony_ci	ICL_LP_COMMUNITY(3, 216, 240, icllp_community5_gpps),
33462306a36Sopenharmony_ci};
33562306a36Sopenharmony_ci
33662306a36Sopenharmony_cistatic const unsigned int icllp_spi0_pins[] = { 22, 23, 24, 25, 26 };
33762306a36Sopenharmony_cistatic const unsigned int icllp_spi0_modes[] = { 3, 1, 1, 1, 1 };
33862306a36Sopenharmony_cistatic const unsigned int icllp_spi1_pins[] = { 27, 28, 29, 30, 31 };
33962306a36Sopenharmony_cistatic const unsigned int icllp_spi1_modes[] = { 1, 1, 1, 1, 3 };
34062306a36Sopenharmony_cistatic const unsigned int icllp_spi2_pins[] = { 92, 93, 94, 95, 98 };
34162306a36Sopenharmony_cistatic const unsigned int icllp_spi2_modes[] = { 3, 3, 3, 3, 2 };
34262306a36Sopenharmony_ci
34362306a36Sopenharmony_cistatic const unsigned int icllp_i2c0_pins[] = { 169, 170 };
34462306a36Sopenharmony_cistatic const unsigned int icllp_i2c1_pins[] = { 171, 172 };
34562306a36Sopenharmony_cistatic const unsigned int icllp_i2c2_pins[] = { 63, 64 };
34662306a36Sopenharmony_cistatic const unsigned int icllp_i2c3_pins[] = { 65, 66 };
34762306a36Sopenharmony_cistatic const unsigned int icllp_i2c4_pins[] = { 67, 68 };
34862306a36Sopenharmony_ci
34962306a36Sopenharmony_cistatic const unsigned int icllp_uart0_pins[] = { 161, 162, 163, 164 };
35062306a36Sopenharmony_cistatic const unsigned int icllp_uart1_pins[] = { 165, 166, 167, 168 };
35162306a36Sopenharmony_cistatic const unsigned int icllp_uart2_pins[] = { 173, 174, 175, 176 };
35262306a36Sopenharmony_ci
35362306a36Sopenharmony_cistatic const struct intel_pingroup icllp_groups[] = {
35462306a36Sopenharmony_ci	PIN_GROUP("spi0_grp", icllp_spi0_pins, icllp_spi0_modes),
35562306a36Sopenharmony_ci	PIN_GROUP("spi1_grp", icllp_spi1_pins, icllp_spi1_modes),
35662306a36Sopenharmony_ci	PIN_GROUP("spi2_grp", icllp_spi2_pins, icllp_spi2_modes),
35762306a36Sopenharmony_ci	PIN_GROUP("i2c0_grp", icllp_i2c0_pins, 1),
35862306a36Sopenharmony_ci	PIN_GROUP("i2c1_grp", icllp_i2c1_pins, 1),
35962306a36Sopenharmony_ci	PIN_GROUP("i2c2_grp", icllp_i2c2_pins, 1),
36062306a36Sopenharmony_ci	PIN_GROUP("i2c3_grp", icllp_i2c3_pins, 1),
36162306a36Sopenharmony_ci	PIN_GROUP("i2c4_grp", icllp_i2c4_pins, 1),
36262306a36Sopenharmony_ci	PIN_GROUP("uart0_grp", icllp_uart0_pins, 1),
36362306a36Sopenharmony_ci	PIN_GROUP("uart1_grp", icllp_uart1_pins, 1),
36462306a36Sopenharmony_ci	PIN_GROUP("uart2_grp", icllp_uart2_pins, 1),
36562306a36Sopenharmony_ci};
36662306a36Sopenharmony_ci
36762306a36Sopenharmony_cistatic const char * const icllp_spi0_groups[] = { "spi0_grp" };
36862306a36Sopenharmony_cistatic const char * const icllp_spi1_groups[] = { "spi1_grp" };
36962306a36Sopenharmony_cistatic const char * const icllp_spi2_groups[] = { "spi2_grp" };
37062306a36Sopenharmony_cistatic const char * const icllp_i2c0_groups[] = { "i2c0_grp" };
37162306a36Sopenharmony_cistatic const char * const icllp_i2c1_groups[] = { "i2c1_grp" };
37262306a36Sopenharmony_cistatic const char * const icllp_i2c2_groups[] = { "i2c2_grp" };
37362306a36Sopenharmony_cistatic const char * const icllp_i2c3_groups[] = { "i2c3_grp" };
37462306a36Sopenharmony_cistatic const char * const icllp_i2c4_groups[] = { "i2c4_grp" };
37562306a36Sopenharmony_cistatic const char * const icllp_uart0_groups[] = { "uart0_grp" };
37662306a36Sopenharmony_cistatic const char * const icllp_uart1_groups[] = { "uart1_grp" };
37762306a36Sopenharmony_cistatic const char * const icllp_uart2_groups[] = { "uart2_grp" };
37862306a36Sopenharmony_ci
37962306a36Sopenharmony_cistatic const struct intel_function icllp_functions[] = {
38062306a36Sopenharmony_ci	FUNCTION("spi0", icllp_spi0_groups),
38162306a36Sopenharmony_ci	FUNCTION("spi1", icllp_spi1_groups),
38262306a36Sopenharmony_ci	FUNCTION("spi2", icllp_spi2_groups),
38362306a36Sopenharmony_ci	FUNCTION("i2c0", icllp_i2c0_groups),
38462306a36Sopenharmony_ci	FUNCTION("i2c1", icllp_i2c1_groups),
38562306a36Sopenharmony_ci	FUNCTION("i2c2", icllp_i2c2_groups),
38662306a36Sopenharmony_ci	FUNCTION("i2c3", icllp_i2c3_groups),
38762306a36Sopenharmony_ci	FUNCTION("i2c4", icllp_i2c4_groups),
38862306a36Sopenharmony_ci	FUNCTION("uart0", icllp_uart0_groups),
38962306a36Sopenharmony_ci	FUNCTION("uart1", icllp_uart1_groups),
39062306a36Sopenharmony_ci	FUNCTION("uart2", icllp_uart2_groups),
39162306a36Sopenharmony_ci};
39262306a36Sopenharmony_ci
39362306a36Sopenharmony_cistatic const struct intel_pinctrl_soc_data icllp_soc_data = {
39462306a36Sopenharmony_ci	.pins = icllp_pins,
39562306a36Sopenharmony_ci	.npins = ARRAY_SIZE(icllp_pins),
39662306a36Sopenharmony_ci	.groups = icllp_groups,
39762306a36Sopenharmony_ci	.ngroups = ARRAY_SIZE(icllp_groups),
39862306a36Sopenharmony_ci	.functions = icllp_functions,
39962306a36Sopenharmony_ci	.nfunctions = ARRAY_SIZE(icllp_functions),
40062306a36Sopenharmony_ci	.communities = icllp_communities,
40162306a36Sopenharmony_ci	.ncommunities = ARRAY_SIZE(icllp_communities),
40262306a36Sopenharmony_ci};
40362306a36Sopenharmony_ci
40462306a36Sopenharmony_ci/* Ice Lake-N */
40562306a36Sopenharmony_cistatic const struct pinctrl_pin_desc icln_pins[] = {
40662306a36Sopenharmony_ci	/* SPI */
40762306a36Sopenharmony_ci	PINCTRL_PIN(0, "SPI0_IO_2"),
40862306a36Sopenharmony_ci	PINCTRL_PIN(1, "SPI0_IO_3"),
40962306a36Sopenharmony_ci	PINCTRL_PIN(2, "SPI0_MOSI_IO_0"),
41062306a36Sopenharmony_ci	PINCTRL_PIN(3, "SPI0_MISO_IO_1"),
41162306a36Sopenharmony_ci	PINCTRL_PIN(4, "SPI0_TPM_CSB"),
41262306a36Sopenharmony_ci	PINCTRL_PIN(5, "SPI0_FLASH_0_CSB"),
41362306a36Sopenharmony_ci	PINCTRL_PIN(6, "SPI0_FLASH_1_CSB"),
41462306a36Sopenharmony_ci	PINCTRL_PIN(7, "SPI0_CLK"),
41562306a36Sopenharmony_ci	PINCTRL_PIN(8, "SPI0_CLK_LOOPBK"),
41662306a36Sopenharmony_ci	/* GPP_B */
41762306a36Sopenharmony_ci	PINCTRL_PIN(9, "CORE_VID_0"),
41862306a36Sopenharmony_ci	PINCTRL_PIN(10, "CORE_VID_1"),
41962306a36Sopenharmony_ci	PINCTRL_PIN(11, "VRALERTB"),
42062306a36Sopenharmony_ci	PINCTRL_PIN(12, "CPU_GP_2"),
42162306a36Sopenharmony_ci	PINCTRL_PIN(13, "CPU_GP_3"),
42262306a36Sopenharmony_ci	PINCTRL_PIN(14, "SRCCLKREQB_0"),
42362306a36Sopenharmony_ci	PINCTRL_PIN(15, "SRCCLKREQB_1"),
42462306a36Sopenharmony_ci	PINCTRL_PIN(16, "SRCCLKREQB_2"),
42562306a36Sopenharmony_ci	PINCTRL_PIN(17, "SRCCLKREQB_3"),
42662306a36Sopenharmony_ci	PINCTRL_PIN(18, "SRCCLKREQB_4"),
42762306a36Sopenharmony_ci	PINCTRL_PIN(19, "SRCCLKREQB_5"),
42862306a36Sopenharmony_ci	PINCTRL_PIN(20, "EXT_PWR_GATEB"),
42962306a36Sopenharmony_ci	PINCTRL_PIN(21, "SLP_S0B"),
43062306a36Sopenharmony_ci	PINCTRL_PIN(22, "PLTRSTB"),
43162306a36Sopenharmony_ci	PINCTRL_PIN(23, "SPKR_GSPI0_CS1B"),
43262306a36Sopenharmony_ci	PINCTRL_PIN(24, "GSPI0_CS0B"),
43362306a36Sopenharmony_ci	PINCTRL_PIN(25, "GSPI0_CLK"),
43462306a36Sopenharmony_ci	PINCTRL_PIN(26, "GSPI0_MISO_TBT_LSX3_A"),
43562306a36Sopenharmony_ci	PINCTRL_PIN(27, "GSPI0_MOSI_TBT_LSX3_B"),
43662306a36Sopenharmony_ci	PINCTRL_PIN(28, "GSPI1_CS0B"),
43762306a36Sopenharmony_ci	PINCTRL_PIN(29, "GSPI1_CLK_NFC_CLK"),
43862306a36Sopenharmony_ci	PINCTRL_PIN(30, "GSPI1_MISO_NFC_CLKREQ"),
43962306a36Sopenharmony_ci	PINCTRL_PIN(31, "GSPI1_MOSI"),
44062306a36Sopenharmony_ci	PINCTRL_PIN(32, "GSPI1_CS1B"),
44162306a36Sopenharmony_ci	PINCTRL_PIN(33, "GSPI0_CLK_LOOPBK"),
44262306a36Sopenharmony_ci	PINCTRL_PIN(34, "GSPI1_CLK_LOOPBK"),
44362306a36Sopenharmony_ci	/* GPP_A */
44462306a36Sopenharmony_ci	PINCTRL_PIN(35, "ESPI_IO_0"),
44562306a36Sopenharmony_ci	PINCTRL_PIN(36, "ESPI_IO_1"),
44662306a36Sopenharmony_ci	PINCTRL_PIN(37, "ESPI_IO_2"),
44762306a36Sopenharmony_ci	PINCTRL_PIN(38, "ESPI_IO_3"),
44862306a36Sopenharmony_ci	PINCTRL_PIN(39, "ESPI_CSB"),
44962306a36Sopenharmony_ci	PINCTRL_PIN(40, "ESPI_CLK"),
45062306a36Sopenharmony_ci	PINCTRL_PIN(41, "ESPI_RESETB"),
45162306a36Sopenharmony_ci	PINCTRL_PIN(42, "SMBCLK"),
45262306a36Sopenharmony_ci	PINCTRL_PIN(43, "SMBDATA"),
45362306a36Sopenharmony_ci	PINCTRL_PIN(44, "SMBALERTB"),
45462306a36Sopenharmony_ci	PINCTRL_PIN(45, "CPU_GP_0"),
45562306a36Sopenharmony_ci	PINCTRL_PIN(46, "CPU_GP_1"),
45662306a36Sopenharmony_ci	PINCTRL_PIN(47, "USB2_OCB_1"),
45762306a36Sopenharmony_ci	PINCTRL_PIN(48, "USB2_OCB_2"),
45862306a36Sopenharmony_ci	PINCTRL_PIN(49, "USB2_OCB_3"),
45962306a36Sopenharmony_ci	PINCTRL_PIN(50, "DDSP_HPD_A_TIME_SYNC_0"),
46062306a36Sopenharmony_ci	PINCTRL_PIN(51, "DDSP_HPD_B_TIME_SYNC_1"),
46162306a36Sopenharmony_ci	PINCTRL_PIN(52, "DDSP_HPD_C"),
46262306a36Sopenharmony_ci	PINCTRL_PIN(53, "USB2_OCB_0"),
46362306a36Sopenharmony_ci	PINCTRL_PIN(54, "PCHHOTB"),
46462306a36Sopenharmony_ci	PINCTRL_PIN(55, "ESPI_CLK_LOOPBK"),
46562306a36Sopenharmony_ci	/* GPP_S */
46662306a36Sopenharmony_ci	PINCTRL_PIN(56, "SNDW1_CLK"),
46762306a36Sopenharmony_ci	PINCTRL_PIN(57, "SNDW1_DATA"),
46862306a36Sopenharmony_ci	PINCTRL_PIN(58, "SNDW2_CLK"),
46962306a36Sopenharmony_ci	PINCTRL_PIN(59, "SNDW2_DATA"),
47062306a36Sopenharmony_ci	PINCTRL_PIN(60, "SNDW3_CLK_DMIC_CLK_1"),
47162306a36Sopenharmony_ci	PINCTRL_PIN(61, "SNDW3_DATA_DMIC_DATA_1"),
47262306a36Sopenharmony_ci	PINCTRL_PIN(62, "SNDW4_CLK_DMIC_CLK_0"),
47362306a36Sopenharmony_ci	PINCTRL_PIN(63, "SNDW4_DATA_DMIC_DATA_0"),
47462306a36Sopenharmony_ci	/* GPP_R */
47562306a36Sopenharmony_ci	PINCTRL_PIN(64, "HDA_BCLK"),
47662306a36Sopenharmony_ci	PINCTRL_PIN(65, "HDA_SYNC"),
47762306a36Sopenharmony_ci	PINCTRL_PIN(66, "HDA_SDO"),
47862306a36Sopenharmony_ci	PINCTRL_PIN(67, "HDA_SDI_0"),
47962306a36Sopenharmony_ci	PINCTRL_PIN(68, "HDA_RSTB"),
48062306a36Sopenharmony_ci	PINCTRL_PIN(69, "HDA_SDI_1_I2S1_RXD"),
48162306a36Sopenharmony_ci	PINCTRL_PIN(70, "I2S1_SFRM"),
48262306a36Sopenharmony_ci	PINCTRL_PIN(71, "I2S1_TXD"),
48362306a36Sopenharmony_ci	/* GPP_H */
48462306a36Sopenharmony_ci	PINCTRL_PIN(72, "GPPC_H_0"),
48562306a36Sopenharmony_ci	PINCTRL_PIN(73, "CNV_RF_RESET_B"),
48662306a36Sopenharmony_ci	PINCTRL_PIN(74, "MODEM_CLKREQ"),
48762306a36Sopenharmony_ci	PINCTRL_PIN(75, "SX_EXIT_HOLDOFFB"),
48862306a36Sopenharmony_ci	PINCTRL_PIN(76, "I2C2_SDA"),
48962306a36Sopenharmony_ci	PINCTRL_PIN(77, "I2C2_SCL"),
49062306a36Sopenharmony_ci	PINCTRL_PIN(78, "I2C3_SDA"),
49162306a36Sopenharmony_ci	PINCTRL_PIN(79, "I2C3_SCL"),
49262306a36Sopenharmony_ci	PINCTRL_PIN(80, "I2C4_SDA"),
49362306a36Sopenharmony_ci	PINCTRL_PIN(81, "I2C4_SCL"),
49462306a36Sopenharmony_ci	PINCTRL_PIN(82, "CPU_VCCIO_PWR_GATEB"),
49562306a36Sopenharmony_ci	PINCTRL_PIN(83, "I2S2_SCLK"),
49662306a36Sopenharmony_ci	PINCTRL_PIN(84, "CNV_RF_RESET_B"),
49762306a36Sopenharmony_ci	PINCTRL_PIN(85, "MODEM_CLKREQ"),
49862306a36Sopenharmony_ci	PINCTRL_PIN(86, "I2S2_RXD"),
49962306a36Sopenharmony_ci	PINCTRL_PIN(87, "I2S1_SCLK"),
50062306a36Sopenharmony_ci	PINCTRL_PIN(88, "GPPC_H_16"),
50162306a36Sopenharmony_ci	PINCTRL_PIN(89, "GPPC_H_17"),
50262306a36Sopenharmony_ci	PINCTRL_PIN(90, "GPPC_H_18"),
50362306a36Sopenharmony_ci	PINCTRL_PIN(91, "GPPC_H_19"),
50462306a36Sopenharmony_ci	PINCTRL_PIN(92, "GPPC_H_20"),
50562306a36Sopenharmony_ci	PINCTRL_PIN(93, "GPPC_H_21"),
50662306a36Sopenharmony_ci	PINCTRL_PIN(94, "GPPC_H_22"),
50762306a36Sopenharmony_ci	PINCTRL_PIN(95, "GPPC_H_23"),
50862306a36Sopenharmony_ci	/* GPP_D */
50962306a36Sopenharmony_ci	PINCTRL_PIN(96, "SPI1_CSB_BK_0_SBK_0"),
51062306a36Sopenharmony_ci	PINCTRL_PIN(97, "SPI1_CLK_BK_1_SBK_1"),
51162306a36Sopenharmony_ci	PINCTRL_PIN(98, "SPI1_MISO_IO_1_BK_2_SBK_2"),
51262306a36Sopenharmony_ci	PINCTRL_PIN(99, "SPI1_MOSI_IO_0_BK_3_SBK_3"),
51362306a36Sopenharmony_ci	PINCTRL_PIN(100, "ISH_I2C0_SDA"),
51462306a36Sopenharmony_ci	PINCTRL_PIN(101, "ISH_I2C0_SCL"),
51562306a36Sopenharmony_ci	PINCTRL_PIN(102, "ISH_I2C1_SDA"),
51662306a36Sopenharmony_ci	PINCTRL_PIN(103, "ISH_I2C1_SCL"),
51762306a36Sopenharmony_ci	PINCTRL_PIN(104, "ISH_SPI_CSB_GSPI2_CS0B_TBT_LSX4_A"),
51862306a36Sopenharmony_ci	PINCTRL_PIN(105, "ISH_SPI_CLK_GSPI2_CLK_TBT_LSX4_B"),
51962306a36Sopenharmony_ci	PINCTRL_PIN(106, "ISH_SPI_MISO_GSPI2_MISO_TBT_LSX5_A"),
52062306a36Sopenharmony_ci	PINCTRL_PIN(107, "ISH_SPI_MOSI_GSPI2_MOSI_TBT_LSX5_B"),
52162306a36Sopenharmony_ci	PINCTRL_PIN(108, "ISH_UART0_RXD_I2C4B_SDA"),
52262306a36Sopenharmony_ci	PINCTRL_PIN(109, "ISH_UART0_TXD_I2C4B_SCL"),
52362306a36Sopenharmony_ci	PINCTRL_PIN(110, "ISH_UART0_RTSB_GSPI2_CS1B"),
52462306a36Sopenharmony_ci	PINCTRL_PIN(111, "ISH_UART0_CTSB_CNV_WCEN"),
52562306a36Sopenharmony_ci	PINCTRL_PIN(112, "SPI1_IO_2"),
52662306a36Sopenharmony_ci	PINCTRL_PIN(113, "SPI1_IO_3"),
52762306a36Sopenharmony_ci	PINCTRL_PIN(114, "I2S_MCLK"),
52862306a36Sopenharmony_ci	PINCTRL_PIN(115, "CNV_MFUART2_RXD"),
52962306a36Sopenharmony_ci	PINCTRL_PIN(116, "CNV_MFUART2_TXD"),
53062306a36Sopenharmony_ci	PINCTRL_PIN(117, "CNV_PA_BLANKING"),
53162306a36Sopenharmony_ci	PINCTRL_PIN(118, "I2C5_SDA_ISH_I2C2_SDA"),
53262306a36Sopenharmony_ci	PINCTRL_PIN(119, "I2C5_SCL_ISH_I2C2_SCL"),
53362306a36Sopenharmony_ci	PINCTRL_PIN(120, "GSPI2_CLK_LOOPBK"),
53462306a36Sopenharmony_ci	PINCTRL_PIN(121, "SPI1_CLK_LOOPBK"),
53562306a36Sopenharmony_ci	/* vGPIO */
53662306a36Sopenharmony_ci	PINCTRL_PIN(122, "CNV_BTEN"),
53762306a36Sopenharmony_ci	PINCTRL_PIN(123, "CNV_WCEN"),
53862306a36Sopenharmony_ci	PINCTRL_PIN(124, "CNV_BT_HOST_WAKEB"),
53962306a36Sopenharmony_ci	PINCTRL_PIN(125, "CNV_BT_IF_SELECT"),
54062306a36Sopenharmony_ci	PINCTRL_PIN(126, "vCNV_BT_UART_TXD"),
54162306a36Sopenharmony_ci	PINCTRL_PIN(127, "vCNV_BT_UART_RXD"),
54262306a36Sopenharmony_ci	PINCTRL_PIN(128, "vCNV_BT_UART_CTS_B"),
54362306a36Sopenharmony_ci	PINCTRL_PIN(129, "vCNV_BT_UART_RTS_B"),
54462306a36Sopenharmony_ci	PINCTRL_PIN(130, "vCNV_MFUART1_TXD"),
54562306a36Sopenharmony_ci	PINCTRL_PIN(131, "vCNV_MFUART1_RXD"),
54662306a36Sopenharmony_ci	PINCTRL_PIN(132, "vCNV_MFUART1_CTS_B"),
54762306a36Sopenharmony_ci	PINCTRL_PIN(133, "vCNV_MFUART1_RTS_B"),
54862306a36Sopenharmony_ci	PINCTRL_PIN(134, "vUART0_TXD"),
54962306a36Sopenharmony_ci	PINCTRL_PIN(135, "vUART0_RXD"),
55062306a36Sopenharmony_ci	PINCTRL_PIN(136, "vUART0_CTS_B"),
55162306a36Sopenharmony_ci	PINCTRL_PIN(137, "vUART0_RTS_B"),
55262306a36Sopenharmony_ci	PINCTRL_PIN(138, "vISH_UART0_TXD"),
55362306a36Sopenharmony_ci	PINCTRL_PIN(139, "vISH_UART0_RXD"),
55462306a36Sopenharmony_ci	PINCTRL_PIN(140, "vISH_UART0_CTS_B"),
55562306a36Sopenharmony_ci	PINCTRL_PIN(141, "vISH_UART0_RTS_B"),
55662306a36Sopenharmony_ci	PINCTRL_PIN(142, "vCNV_BT_I2S_BCLK"),
55762306a36Sopenharmony_ci	PINCTRL_PIN(143, "vCNV_BT_I2S_WS_SYNC"),
55862306a36Sopenharmony_ci	PINCTRL_PIN(144, "vCNV_BT_I2S_SDO"),
55962306a36Sopenharmony_ci	PINCTRL_PIN(145, "vCNV_BT_I2S_SDI"),
56062306a36Sopenharmony_ci	PINCTRL_PIN(146, "vI2S2_SCLK"),
56162306a36Sopenharmony_ci	PINCTRL_PIN(147, "vI2S2_SFRM"),
56262306a36Sopenharmony_ci	PINCTRL_PIN(148, "vI2S2_TXD"),
56362306a36Sopenharmony_ci	PINCTRL_PIN(149, "vI2S2_RXD"),
56462306a36Sopenharmony_ci	PINCTRL_PIN(150, "vSD3_CD_B"),
56562306a36Sopenharmony_ci	/* GPP_C */
56662306a36Sopenharmony_ci	PINCTRL_PIN(151, "GPPC_C_0"),
56762306a36Sopenharmony_ci	PINCTRL_PIN(152, "GPPC_C_1"),
56862306a36Sopenharmony_ci	PINCTRL_PIN(153, "GPPC_C_2"),
56962306a36Sopenharmony_ci	PINCTRL_PIN(154, "GPPC_C_3"),
57062306a36Sopenharmony_ci	PINCTRL_PIN(155, "GPPC_C_4"),
57162306a36Sopenharmony_ci	PINCTRL_PIN(156, "GPPC_C_5"),
57262306a36Sopenharmony_ci	PINCTRL_PIN(157, "SUSWARNB_SUSPWRDNACK"),
57362306a36Sopenharmony_ci	PINCTRL_PIN(158, "SUSACKB"),
57462306a36Sopenharmony_ci	PINCTRL_PIN(159, "UART0_RXD"),
57562306a36Sopenharmony_ci	PINCTRL_PIN(160, "UART0_TXD"),
57662306a36Sopenharmony_ci	PINCTRL_PIN(161, "UART0_RTSB"),
57762306a36Sopenharmony_ci	PINCTRL_PIN(162, "UART0_CTSB"),
57862306a36Sopenharmony_ci	PINCTRL_PIN(163, "UART1_RXD_ISH_UART1_RXD"),
57962306a36Sopenharmony_ci	PINCTRL_PIN(164, "UART1_TXD_ISH_UART1_TXD"),
58062306a36Sopenharmony_ci	PINCTRL_PIN(165, "UART1_RTSB_ISH_UART1_RTSB"),
58162306a36Sopenharmony_ci	PINCTRL_PIN(166, "UART1_CTSB_ISH_UART1_CTSB"),
58262306a36Sopenharmony_ci	PINCTRL_PIN(167, "I2C0_SDA"),
58362306a36Sopenharmony_ci	PINCTRL_PIN(168, "I2C0_SCL"),
58462306a36Sopenharmony_ci	PINCTRL_PIN(169, "I2C1_SDA"),
58562306a36Sopenharmony_ci	PINCTRL_PIN(170, "I2C1_SCL"),
58662306a36Sopenharmony_ci	PINCTRL_PIN(171, "UART2_RXD_CNV_MFUART0_RXD"),
58762306a36Sopenharmony_ci	PINCTRL_PIN(172, "UART2_TXD_CNV_MFUART0_TXD"),
58862306a36Sopenharmony_ci	PINCTRL_PIN(173, "UART2_RTSB_CNV_MFUART0_RTS_B"),
58962306a36Sopenharmony_ci	PINCTRL_PIN(174, "UART2_CTSB_CNV_MFUART0_CTS_B"),
59062306a36Sopenharmony_ci	/* HVCMOS */
59162306a36Sopenharmony_ci	PINCTRL_PIN(175, "L_BKLTEN"),
59262306a36Sopenharmony_ci	PINCTRL_PIN(176, "L_BKLTCTL"),
59362306a36Sopenharmony_ci	PINCTRL_PIN(177, "L_VDDEN"),
59462306a36Sopenharmony_ci	PINCTRL_PIN(178, "SYS_PWROK"),
59562306a36Sopenharmony_ci	PINCTRL_PIN(179, "SYS_RESETB"),
59662306a36Sopenharmony_ci	PINCTRL_PIN(180, "MLK_RSTB"),
59762306a36Sopenharmony_ci	/* GPP_E */
59862306a36Sopenharmony_ci	PINCTRL_PIN(181, "ISH_GP_0_IMGCLKOUT_0"),
59962306a36Sopenharmony_ci	PINCTRL_PIN(182, "ISH_GP_1"),
60062306a36Sopenharmony_ci	PINCTRL_PIN(183, "IMGCLKOUT_1"),
60162306a36Sopenharmony_ci	PINCTRL_PIN(184, "ISH_GP_2_SATA_DEVSLP_0"),
60262306a36Sopenharmony_ci	PINCTRL_PIN(185, "IMGCLKOUT_2"),
60362306a36Sopenharmony_ci	PINCTRL_PIN(186, "SATA_LEDB_SPI1_CS1B"),
60462306a36Sopenharmony_ci	PINCTRL_PIN(187, "IMGCLKOUT_3"),
60562306a36Sopenharmony_ci	PINCTRL_PIN(188, "ISH_GP_3_SATA_DEVSLP_1"),
60662306a36Sopenharmony_ci	PINCTRL_PIN(189, "FIVR_DIGPB_0"),
60762306a36Sopenharmony_ci	PINCTRL_PIN(190, "SML0CLK"),
60862306a36Sopenharmony_ci	PINCTRL_PIN(191, "SML0DATA"),
60962306a36Sopenharmony_ci	PINCTRL_PIN(192, "BSSB_LS3_RX"),
61062306a36Sopenharmony_ci	PINCTRL_PIN(193, "BSSB_LS3_TX"),
61162306a36Sopenharmony_ci	PINCTRL_PIN(194, "BSSB_LS0_RX"),
61262306a36Sopenharmony_ci	PINCTRL_PIN(195, "BSSB_LS0_TX"),
61362306a36Sopenharmony_ci	PINCTRL_PIN(196, "BSSB_LS1_RX"),
61462306a36Sopenharmony_ci	PINCTRL_PIN(197, "BSSB_LS1_TX"),
61562306a36Sopenharmony_ci	PINCTRL_PIN(198, "BSSB_LS2_RX"),
61662306a36Sopenharmony_ci	PINCTRL_PIN(199, "BSSB_LS2_TX"),
61762306a36Sopenharmony_ci	PINCTRL_PIN(200, "FIVR_DIGPB_1"),
61862306a36Sopenharmony_ci	PINCTRL_PIN(201, "CNV_BRI_DT"),
61962306a36Sopenharmony_ci	PINCTRL_PIN(202, "CNV_BRI_RSP"),
62062306a36Sopenharmony_ci	PINCTRL_PIN(203, "CNV_RGI_DT"),
62162306a36Sopenharmony_ci	PINCTRL_PIN(204, "CNV_RGI_RSP"),
62262306a36Sopenharmony_ci	/* GPP_G */
62362306a36Sopenharmony_ci	PINCTRL_PIN(205, "SD3_CMD"),
62462306a36Sopenharmony_ci	PINCTRL_PIN(206, "SD3_D0"),
62562306a36Sopenharmony_ci	PINCTRL_PIN(207, "SD3_D1"),
62662306a36Sopenharmony_ci	PINCTRL_PIN(208, "SD3_D2"),
62762306a36Sopenharmony_ci	PINCTRL_PIN(209, "SD3_D3"),
62862306a36Sopenharmony_ci	PINCTRL_PIN(210, "SD3_CDB"),
62962306a36Sopenharmony_ci	PINCTRL_PIN(211, "SD3_CLK"),
63062306a36Sopenharmony_ci	PINCTRL_PIN(212, "SD3_WP"),
63162306a36Sopenharmony_ci};
63262306a36Sopenharmony_ci
63362306a36Sopenharmony_cistatic const struct intel_padgroup icln_community0_gpps[] = {
63462306a36Sopenharmony_ci	ICL_GPP(0, 0, 8, INTEL_GPIO_BASE_NOMAP),	/* SPI */
63562306a36Sopenharmony_ci	ICL_GPP(1, 9, 34, 32),				/* GPP_B */
63662306a36Sopenharmony_ci	ICL_GPP(2, 35, 55, 64),				/* GPP_A */
63762306a36Sopenharmony_ci	ICL_GPP(3, 56, 63, 96),				/* GPP_S */
63862306a36Sopenharmony_ci	ICL_GPP(4, 64, 71, 128),			/* GPP_R */
63962306a36Sopenharmony_ci};
64062306a36Sopenharmony_ci
64162306a36Sopenharmony_cistatic const struct intel_padgroup icln_community1_gpps[] = {
64262306a36Sopenharmony_ci	ICL_GPP(0, 72, 95, 160),			/* GPP_H */
64362306a36Sopenharmony_ci	ICL_GPP(1, 96, 121, 192),			/* GPP_D */
64462306a36Sopenharmony_ci	ICL_GPP(2, 122, 150, 224),			/* vGPIO */
64562306a36Sopenharmony_ci	ICL_GPP(3, 151, 174, 256),			/* GPP_C */
64662306a36Sopenharmony_ci};
64762306a36Sopenharmony_ci
64862306a36Sopenharmony_cistatic const struct intel_padgroup icln_community4_gpps[] = {
64962306a36Sopenharmony_ci	ICL_GPP(0, 175, 180, INTEL_GPIO_BASE_NOMAP),	/* HVCMOS */
65062306a36Sopenharmony_ci	ICL_GPP(1, 181, 204, 288),			/* GPP_E */
65162306a36Sopenharmony_ci};
65262306a36Sopenharmony_ci
65362306a36Sopenharmony_cistatic const struct intel_padgroup icln_community5_gpps[] = {
65462306a36Sopenharmony_ci	ICL_GPP(0, 205, 212, INTEL_GPIO_BASE_ZERO),	/* GPP_G */
65562306a36Sopenharmony_ci};
65662306a36Sopenharmony_ci
65762306a36Sopenharmony_cistatic const struct intel_community icln_communities[] = {
65862306a36Sopenharmony_ci	ICL_N_COMMUNITY(0, 0, 71, icln_community0_gpps),
65962306a36Sopenharmony_ci	ICL_N_COMMUNITY(1, 72, 174, icln_community1_gpps),
66062306a36Sopenharmony_ci	ICL_N_COMMUNITY(2, 175, 204, icln_community4_gpps),
66162306a36Sopenharmony_ci	ICL_N_COMMUNITY(3, 205, 212, icln_community5_gpps),
66262306a36Sopenharmony_ci};
66362306a36Sopenharmony_ci
66462306a36Sopenharmony_cistatic const struct intel_pinctrl_soc_data icln_soc_data = {
66562306a36Sopenharmony_ci	.pins = icln_pins,
66662306a36Sopenharmony_ci	.npins = ARRAY_SIZE(icln_pins),
66762306a36Sopenharmony_ci	.communities = icln_communities,
66862306a36Sopenharmony_ci	.ncommunities = ARRAY_SIZE(icln_communities),
66962306a36Sopenharmony_ci};
67062306a36Sopenharmony_ci
67162306a36Sopenharmony_cistatic INTEL_PINCTRL_PM_OPS(icl_pinctrl_pm_ops);
67262306a36Sopenharmony_ci
67362306a36Sopenharmony_cistatic const struct acpi_device_id icl_pinctrl_acpi_match[] = {
67462306a36Sopenharmony_ci	{ "INT3455", (kernel_ulong_t)&icllp_soc_data },
67562306a36Sopenharmony_ci	{ "INT34C3", (kernel_ulong_t)&icln_soc_data },
67662306a36Sopenharmony_ci	{ }
67762306a36Sopenharmony_ci};
67862306a36Sopenharmony_ciMODULE_DEVICE_TABLE(acpi, icl_pinctrl_acpi_match);
67962306a36Sopenharmony_ci
68062306a36Sopenharmony_cistatic struct platform_driver icl_pinctrl_driver = {
68162306a36Sopenharmony_ci	.probe = intel_pinctrl_probe_by_hid,
68262306a36Sopenharmony_ci	.driver = {
68362306a36Sopenharmony_ci		.name = "icelake-pinctrl",
68462306a36Sopenharmony_ci		.acpi_match_table = icl_pinctrl_acpi_match,
68562306a36Sopenharmony_ci		.pm = &icl_pinctrl_pm_ops,
68662306a36Sopenharmony_ci	},
68762306a36Sopenharmony_ci};
68862306a36Sopenharmony_cimodule_platform_driver(icl_pinctrl_driver);
68962306a36Sopenharmony_ci
69062306a36Sopenharmony_ciMODULE_AUTHOR("Andy Shevchenko <andriy.shevchenko@linux.intel.com>");
69162306a36Sopenharmony_ciMODULE_AUTHOR("Mika Westerberg <mika.westerberg@linux.intel.com>");
69262306a36Sopenharmony_ciMODULE_DESCRIPTION("Intel Ice Lake PCH pinctrl/GPIO driver");
69362306a36Sopenharmony_ciMODULE_LICENSE("GPL v2");
69462306a36Sopenharmony_ciMODULE_IMPORT_NS(PINCTRL_INTEL);
695