162306a36Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0
262306a36Sopenharmony_ci/*
362306a36Sopenharmony_ci * Intel Tiger Lake PCH pinctrl/GPIO driver
462306a36Sopenharmony_ci *
562306a36Sopenharmony_ci * Copyright (C) 2019 - 2020, 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/mod_devicetable.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 TGL_LP_PAD_OWN		0x020
1962306a36Sopenharmony_ci#define TGL_LP_PADCFGLOCK	0x080
2062306a36Sopenharmony_ci#define TGL_LP_HOSTSW_OWN	0x0b0
2162306a36Sopenharmony_ci#define TGL_LP_GPI_IS		0x100
2262306a36Sopenharmony_ci#define TGL_LP_GPI_IE		0x120
2362306a36Sopenharmony_ci
2462306a36Sopenharmony_ci#define TGL_H_PAD_OWN		0x020
2562306a36Sopenharmony_ci#define TGL_H_PADCFGLOCK	0x090
2662306a36Sopenharmony_ci#define TGL_H_HOSTSW_OWN	0x0c0
2762306a36Sopenharmony_ci#define TGL_H_GPI_IS		0x100
2862306a36Sopenharmony_ci#define TGL_H_GPI_IE		0x120
2962306a36Sopenharmony_ci
3062306a36Sopenharmony_ci#define TGL_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 TGL_LP_COMMUNITY(b, s, e, g)			\
3962306a36Sopenharmony_ci	INTEL_COMMUNITY_GPPS(b, s, e, g, TGL_LP)
4062306a36Sopenharmony_ci
4162306a36Sopenharmony_ci#define TGL_H_COMMUNITY(b, s, e, g)			\
4262306a36Sopenharmony_ci	INTEL_COMMUNITY_GPPS(b, s, e, g, TGL_H)
4362306a36Sopenharmony_ci
4462306a36Sopenharmony_ci/* Tiger Lake-LP */
4562306a36Sopenharmony_cistatic const struct pinctrl_pin_desc tgllp_pins[] = {
4662306a36Sopenharmony_ci	/* GPP_B */
4762306a36Sopenharmony_ci	PINCTRL_PIN(0, "CORE_VID_0"),
4862306a36Sopenharmony_ci	PINCTRL_PIN(1, "CORE_VID_1"),
4962306a36Sopenharmony_ci	PINCTRL_PIN(2, "VRALERTB"),
5062306a36Sopenharmony_ci	PINCTRL_PIN(3, "CPU_GP_2"),
5162306a36Sopenharmony_ci	PINCTRL_PIN(4, "CPU_GP_3"),
5262306a36Sopenharmony_ci	PINCTRL_PIN(5, "ISH_I2C0_SDA"),
5362306a36Sopenharmony_ci	PINCTRL_PIN(6, "ISH_I2C0_SCL"),
5462306a36Sopenharmony_ci	PINCTRL_PIN(7, "ISH_I2C1_SDA"),
5562306a36Sopenharmony_ci	PINCTRL_PIN(8, "ISH_I2C1_SCL"),
5662306a36Sopenharmony_ci	PINCTRL_PIN(9, "I2C5_SDA"),
5762306a36Sopenharmony_ci	PINCTRL_PIN(10, "I2C5_SCL"),
5862306a36Sopenharmony_ci	PINCTRL_PIN(11, "PMCALERTB"),
5962306a36Sopenharmony_ci	PINCTRL_PIN(12, "SLP_S0B"),
6062306a36Sopenharmony_ci	PINCTRL_PIN(13, "PLTRSTB"),
6162306a36Sopenharmony_ci	PINCTRL_PIN(14, "SPKR"),
6262306a36Sopenharmony_ci	PINCTRL_PIN(15, "GSPI0_CS0B"),
6362306a36Sopenharmony_ci	PINCTRL_PIN(16, "GSPI0_CLK"),
6462306a36Sopenharmony_ci	PINCTRL_PIN(17, "GSPI0_MISO"),
6562306a36Sopenharmony_ci	PINCTRL_PIN(18, "GSPI0_MOSI"),
6662306a36Sopenharmony_ci	PINCTRL_PIN(19, "GSPI1_CS0B"),
6762306a36Sopenharmony_ci	PINCTRL_PIN(20, "GSPI1_CLK"),
6862306a36Sopenharmony_ci	PINCTRL_PIN(21, "GSPI1_MISO"),
6962306a36Sopenharmony_ci	PINCTRL_PIN(22, "GSPI1_MOSI"),
7062306a36Sopenharmony_ci	PINCTRL_PIN(23, "SML1ALERTB"),
7162306a36Sopenharmony_ci	PINCTRL_PIN(24, "GSPI0_CLK_LOOPBK"),
7262306a36Sopenharmony_ci	PINCTRL_PIN(25, "GSPI1_CLK_LOOPBK"),
7362306a36Sopenharmony_ci	/* GPP_T */
7462306a36Sopenharmony_ci	PINCTRL_PIN(26, "I2C6_SDA"),
7562306a36Sopenharmony_ci	PINCTRL_PIN(27, "I2C6_SCL"),
7662306a36Sopenharmony_ci	PINCTRL_PIN(28, "I2C7_SDA"),
7762306a36Sopenharmony_ci	PINCTRL_PIN(29, "I2C7_SCL"),
7862306a36Sopenharmony_ci	PINCTRL_PIN(30, "UART4_RXD"),
7962306a36Sopenharmony_ci	PINCTRL_PIN(31, "UART4_TXD"),
8062306a36Sopenharmony_ci	PINCTRL_PIN(32, "UART4_RTSB"),
8162306a36Sopenharmony_ci	PINCTRL_PIN(33, "UART4_CTSB"),
8262306a36Sopenharmony_ci	PINCTRL_PIN(34, "UART5_RXD"),
8362306a36Sopenharmony_ci	PINCTRL_PIN(35, "UART5_TXD"),
8462306a36Sopenharmony_ci	PINCTRL_PIN(36, "UART5_RTSB"),
8562306a36Sopenharmony_ci	PINCTRL_PIN(37, "UART5_CTSB"),
8662306a36Sopenharmony_ci	PINCTRL_PIN(38, "UART6_RXD"),
8762306a36Sopenharmony_ci	PINCTRL_PIN(39, "UART6_TXD"),
8862306a36Sopenharmony_ci	PINCTRL_PIN(40, "UART6_RTSB"),
8962306a36Sopenharmony_ci	PINCTRL_PIN(41, "UART6_CTSB"),
9062306a36Sopenharmony_ci	/* GPP_A */
9162306a36Sopenharmony_ci	PINCTRL_PIN(42, "ESPI_IO_0"),
9262306a36Sopenharmony_ci	PINCTRL_PIN(43, "ESPI_IO_1"),
9362306a36Sopenharmony_ci	PINCTRL_PIN(44, "ESPI_IO_2"),
9462306a36Sopenharmony_ci	PINCTRL_PIN(45, "ESPI_IO_3"),
9562306a36Sopenharmony_ci	PINCTRL_PIN(46, "ESPI_CSB"),
9662306a36Sopenharmony_ci	PINCTRL_PIN(47, "ESPI_CLK"),
9762306a36Sopenharmony_ci	PINCTRL_PIN(48, "ESPI_RESETB"),
9862306a36Sopenharmony_ci	PINCTRL_PIN(49, "I2S2_SCLK"),
9962306a36Sopenharmony_ci	PINCTRL_PIN(50, "I2S2_SFRM"),
10062306a36Sopenharmony_ci	PINCTRL_PIN(51, "I2S2_TXD"),
10162306a36Sopenharmony_ci	PINCTRL_PIN(52, "I2S2_RXD"),
10262306a36Sopenharmony_ci	PINCTRL_PIN(53, "PMC_I2C_SDA"),
10362306a36Sopenharmony_ci	PINCTRL_PIN(54, "SATAXPCIE_1"),
10462306a36Sopenharmony_ci	PINCTRL_PIN(55, "PMC_I2C_SCL"),
10562306a36Sopenharmony_ci	PINCTRL_PIN(56, "USB2_OCB_1"),
10662306a36Sopenharmony_ci	PINCTRL_PIN(57, "USB2_OCB_2"),
10762306a36Sopenharmony_ci	PINCTRL_PIN(58, "USB2_OCB_3"),
10862306a36Sopenharmony_ci	PINCTRL_PIN(59, "DDSP_HPD_C"),
10962306a36Sopenharmony_ci	PINCTRL_PIN(60, "DDSP_HPD_B"),
11062306a36Sopenharmony_ci	PINCTRL_PIN(61, "DDSP_HPD_1"),
11162306a36Sopenharmony_ci	PINCTRL_PIN(62, "DDSP_HPD_2"),
11262306a36Sopenharmony_ci	PINCTRL_PIN(63, "GPPC_A_21"),
11362306a36Sopenharmony_ci	PINCTRL_PIN(64, "GPPC_A_22"),
11462306a36Sopenharmony_ci	PINCTRL_PIN(65, "I2S1_SCLK"),
11562306a36Sopenharmony_ci	PINCTRL_PIN(66, "ESPI_CLK_LOOPBK"),
11662306a36Sopenharmony_ci	/* GPP_S */
11762306a36Sopenharmony_ci	PINCTRL_PIN(67, "SNDW0_CLK"),
11862306a36Sopenharmony_ci	PINCTRL_PIN(68, "SNDW0_DATA"),
11962306a36Sopenharmony_ci	PINCTRL_PIN(69, "SNDW1_CLK"),
12062306a36Sopenharmony_ci	PINCTRL_PIN(70, "SNDW1_DATA"),
12162306a36Sopenharmony_ci	PINCTRL_PIN(71, "SNDW2_CLK"),
12262306a36Sopenharmony_ci	PINCTRL_PIN(72, "SNDW2_DATA"),
12362306a36Sopenharmony_ci	PINCTRL_PIN(73, "SNDW3_CLK"),
12462306a36Sopenharmony_ci	PINCTRL_PIN(74, "SNDW3_DATA"),
12562306a36Sopenharmony_ci	/* GPP_H */
12662306a36Sopenharmony_ci	PINCTRL_PIN(75, "GPPC_H_0"),
12762306a36Sopenharmony_ci	PINCTRL_PIN(76, "GPPC_H_1"),
12862306a36Sopenharmony_ci	PINCTRL_PIN(77, "GPPC_H_2"),
12962306a36Sopenharmony_ci	PINCTRL_PIN(78, "SX_EXIT_HOLDOFFB"),
13062306a36Sopenharmony_ci	PINCTRL_PIN(79, "I2C2_SDA"),
13162306a36Sopenharmony_ci	PINCTRL_PIN(80, "I2C2_SCL"),
13262306a36Sopenharmony_ci	PINCTRL_PIN(81, "I2C3_SDA"),
13362306a36Sopenharmony_ci	PINCTRL_PIN(82, "I2C3_SCL"),
13462306a36Sopenharmony_ci	PINCTRL_PIN(83, "I2C4_SDA"),
13562306a36Sopenharmony_ci	PINCTRL_PIN(84, "I2C4_SCL"),
13662306a36Sopenharmony_ci	PINCTRL_PIN(85, "SRCCLKREQB_4"),
13762306a36Sopenharmony_ci	PINCTRL_PIN(86, "SRCCLKREQB_5"),
13862306a36Sopenharmony_ci	PINCTRL_PIN(87, "M2_SKT2_CFG_0"),
13962306a36Sopenharmony_ci	PINCTRL_PIN(88, "M2_SKT2_CFG_1"),
14062306a36Sopenharmony_ci	PINCTRL_PIN(89, "M2_SKT2_CFG_2"),
14162306a36Sopenharmony_ci	PINCTRL_PIN(90, "M2_SKT2_CFG_3"),
14262306a36Sopenharmony_ci	PINCTRL_PIN(91, "DDPB_CTRLCLK"),
14362306a36Sopenharmony_ci	PINCTRL_PIN(92, "DDPB_CTRLDATA"),
14462306a36Sopenharmony_ci	PINCTRL_PIN(93, "CPU_C10_GATEB"),
14562306a36Sopenharmony_ci	PINCTRL_PIN(94, "TIME_SYNC_0"),
14662306a36Sopenharmony_ci	PINCTRL_PIN(95, "IMGCLKOUT_1"),
14762306a36Sopenharmony_ci	PINCTRL_PIN(96, "IMGCLKOUT_2"),
14862306a36Sopenharmony_ci	PINCTRL_PIN(97, "IMGCLKOUT_3"),
14962306a36Sopenharmony_ci	PINCTRL_PIN(98, "IMGCLKOUT_4"),
15062306a36Sopenharmony_ci	/* GPP_D */
15162306a36Sopenharmony_ci	PINCTRL_PIN(99, "ISH_GP_0"),
15262306a36Sopenharmony_ci	PINCTRL_PIN(100, "ISH_GP_1"),
15362306a36Sopenharmony_ci	PINCTRL_PIN(101, "ISH_GP_2"),
15462306a36Sopenharmony_ci	PINCTRL_PIN(102, "ISH_GP_3"),
15562306a36Sopenharmony_ci	PINCTRL_PIN(103, "IMGCLKOUT_0"),
15662306a36Sopenharmony_ci	PINCTRL_PIN(104, "SRCCLKREQB_0"),
15762306a36Sopenharmony_ci	PINCTRL_PIN(105, "SRCCLKREQB_1"),
15862306a36Sopenharmony_ci	PINCTRL_PIN(106, "SRCCLKREQB_2"),
15962306a36Sopenharmony_ci	PINCTRL_PIN(107, "SRCCLKREQB_3"),
16062306a36Sopenharmony_ci	PINCTRL_PIN(108, "ISH_SPI_CSB"),
16162306a36Sopenharmony_ci	PINCTRL_PIN(109, "ISH_SPI_CLK"),
16262306a36Sopenharmony_ci	PINCTRL_PIN(110, "ISH_SPI_MISO"),
16362306a36Sopenharmony_ci	PINCTRL_PIN(111, "ISH_SPI_MOSI"),
16462306a36Sopenharmony_ci	PINCTRL_PIN(112, "ISH_UART0_RXD"),
16562306a36Sopenharmony_ci	PINCTRL_PIN(113, "ISH_UART0_TXD"),
16662306a36Sopenharmony_ci	PINCTRL_PIN(114, "ISH_UART0_RTSB"),
16762306a36Sopenharmony_ci	PINCTRL_PIN(115, "ISH_UART0_CTSB"),
16862306a36Sopenharmony_ci	PINCTRL_PIN(116, "ISH_GP_4"),
16962306a36Sopenharmony_ci	PINCTRL_PIN(117, "ISH_GP_5"),
17062306a36Sopenharmony_ci	PINCTRL_PIN(118, "I2S_MCLK1_OUT"),
17162306a36Sopenharmony_ci	PINCTRL_PIN(119, "GSPI2_CLK_LOOPBK"),
17262306a36Sopenharmony_ci	/* GPP_U */
17362306a36Sopenharmony_ci	PINCTRL_PIN(120, "UART3_RXD"),
17462306a36Sopenharmony_ci	PINCTRL_PIN(121, "UART3_TXD"),
17562306a36Sopenharmony_ci	PINCTRL_PIN(122, "UART3_RTSB"),
17662306a36Sopenharmony_ci	PINCTRL_PIN(123, "UART3_CTSB"),
17762306a36Sopenharmony_ci	PINCTRL_PIN(124, "GSPI3_CS0B"),
17862306a36Sopenharmony_ci	PINCTRL_PIN(125, "GSPI3_CLK"),
17962306a36Sopenharmony_ci	PINCTRL_PIN(126, "GSPI3_MISO"),
18062306a36Sopenharmony_ci	PINCTRL_PIN(127, "GSPI3_MOSI"),
18162306a36Sopenharmony_ci	PINCTRL_PIN(128, "GSPI4_CS0B"),
18262306a36Sopenharmony_ci	PINCTRL_PIN(129, "GSPI4_CLK"),
18362306a36Sopenharmony_ci	PINCTRL_PIN(130, "GSPI4_MISO"),
18462306a36Sopenharmony_ci	PINCTRL_PIN(131, "GSPI4_MOSI"),
18562306a36Sopenharmony_ci	PINCTRL_PIN(132, "GSPI5_CS0B"),
18662306a36Sopenharmony_ci	PINCTRL_PIN(133, "GSPI5_CLK"),
18762306a36Sopenharmony_ci	PINCTRL_PIN(134, "GSPI5_MISO"),
18862306a36Sopenharmony_ci	PINCTRL_PIN(135, "GSPI5_MOSI"),
18962306a36Sopenharmony_ci	PINCTRL_PIN(136, "GSPI6_CS0B"),
19062306a36Sopenharmony_ci	PINCTRL_PIN(137, "GSPI6_CLK"),
19162306a36Sopenharmony_ci	PINCTRL_PIN(138, "GSPI6_MISO"),
19262306a36Sopenharmony_ci	PINCTRL_PIN(139, "GSPI6_MOSI"),
19362306a36Sopenharmony_ci	PINCTRL_PIN(140, "GSPI3_CLK_LOOPBK"),
19462306a36Sopenharmony_ci	PINCTRL_PIN(141, "GSPI4_CLK_LOOPBK"),
19562306a36Sopenharmony_ci	PINCTRL_PIN(142, "GSPI5_CLK_LOOPBK"),
19662306a36Sopenharmony_ci	PINCTRL_PIN(143, "GSPI6_CLK_LOOPBK"),
19762306a36Sopenharmony_ci	/* vGPIO */
19862306a36Sopenharmony_ci	PINCTRL_PIN(144, "CNV_BTEN"),
19962306a36Sopenharmony_ci	PINCTRL_PIN(145, "CNV_BT_HOST_WAKEB"),
20062306a36Sopenharmony_ci	PINCTRL_PIN(146, "CNV_BT_IF_SELECT"),
20162306a36Sopenharmony_ci	PINCTRL_PIN(147, "vCNV_BT_UART_TXD"),
20262306a36Sopenharmony_ci	PINCTRL_PIN(148, "vCNV_BT_UART_RXD"),
20362306a36Sopenharmony_ci	PINCTRL_PIN(149, "vCNV_BT_UART_CTS_B"),
20462306a36Sopenharmony_ci	PINCTRL_PIN(150, "vCNV_BT_UART_RTS_B"),
20562306a36Sopenharmony_ci	PINCTRL_PIN(151, "vCNV_MFUART1_TXD"),
20662306a36Sopenharmony_ci	PINCTRL_PIN(152, "vCNV_MFUART1_RXD"),
20762306a36Sopenharmony_ci	PINCTRL_PIN(153, "vCNV_MFUART1_CTS_B"),
20862306a36Sopenharmony_ci	PINCTRL_PIN(154, "vCNV_MFUART1_RTS_B"),
20962306a36Sopenharmony_ci	PINCTRL_PIN(155, "vUART0_TXD"),
21062306a36Sopenharmony_ci	PINCTRL_PIN(156, "vUART0_RXD"),
21162306a36Sopenharmony_ci	PINCTRL_PIN(157, "vUART0_CTS_B"),
21262306a36Sopenharmony_ci	PINCTRL_PIN(158, "vUART0_RTS_B"),
21362306a36Sopenharmony_ci	PINCTRL_PIN(159, "vISH_UART0_TXD"),
21462306a36Sopenharmony_ci	PINCTRL_PIN(160, "vISH_UART0_RXD"),
21562306a36Sopenharmony_ci	PINCTRL_PIN(161, "vISH_UART0_CTS_B"),
21662306a36Sopenharmony_ci	PINCTRL_PIN(162, "vISH_UART0_RTS_B"),
21762306a36Sopenharmony_ci	PINCTRL_PIN(163, "vCNV_BT_I2S_BCLK"),
21862306a36Sopenharmony_ci	PINCTRL_PIN(164, "vCNV_BT_I2S_WS_SYNC"),
21962306a36Sopenharmony_ci	PINCTRL_PIN(165, "vCNV_BT_I2S_SDO"),
22062306a36Sopenharmony_ci	PINCTRL_PIN(166, "vCNV_BT_I2S_SDI"),
22162306a36Sopenharmony_ci	PINCTRL_PIN(167, "vI2S2_SCLK"),
22262306a36Sopenharmony_ci	PINCTRL_PIN(168, "vI2S2_SFRM"),
22362306a36Sopenharmony_ci	PINCTRL_PIN(169, "vI2S2_TXD"),
22462306a36Sopenharmony_ci	PINCTRL_PIN(170, "vI2S2_RXD"),
22562306a36Sopenharmony_ci	/* GPP_C */
22662306a36Sopenharmony_ci	PINCTRL_PIN(171, "SMBCLK"),
22762306a36Sopenharmony_ci	PINCTRL_PIN(172, "SMBDATA"),
22862306a36Sopenharmony_ci	PINCTRL_PIN(173, "SMBALERTB"),
22962306a36Sopenharmony_ci	PINCTRL_PIN(174, "SML0CLK"),
23062306a36Sopenharmony_ci	PINCTRL_PIN(175, "SML0DATA"),
23162306a36Sopenharmony_ci	PINCTRL_PIN(176, "SML0ALERTB"),
23262306a36Sopenharmony_ci	PINCTRL_PIN(177, "SML1CLK"),
23362306a36Sopenharmony_ci	PINCTRL_PIN(178, "SML1DATA"),
23462306a36Sopenharmony_ci	PINCTRL_PIN(179, "UART0_RXD"),
23562306a36Sopenharmony_ci	PINCTRL_PIN(180, "UART0_TXD"),
23662306a36Sopenharmony_ci	PINCTRL_PIN(181, "UART0_RTSB"),
23762306a36Sopenharmony_ci	PINCTRL_PIN(182, "UART0_CTSB"),
23862306a36Sopenharmony_ci	PINCTRL_PIN(183, "UART1_RXD"),
23962306a36Sopenharmony_ci	PINCTRL_PIN(184, "UART1_TXD"),
24062306a36Sopenharmony_ci	PINCTRL_PIN(185, "UART1_RTSB"),
24162306a36Sopenharmony_ci	PINCTRL_PIN(186, "UART1_CTSB"),
24262306a36Sopenharmony_ci	PINCTRL_PIN(187, "I2C0_SDA"),
24362306a36Sopenharmony_ci	PINCTRL_PIN(188, "I2C0_SCL"),
24462306a36Sopenharmony_ci	PINCTRL_PIN(189, "I2C1_SDA"),
24562306a36Sopenharmony_ci	PINCTRL_PIN(190, "I2C1_SCL"),
24662306a36Sopenharmony_ci	PINCTRL_PIN(191, "UART2_RXD"),
24762306a36Sopenharmony_ci	PINCTRL_PIN(192, "UART2_TXD"),
24862306a36Sopenharmony_ci	PINCTRL_PIN(193, "UART2_RTSB"),
24962306a36Sopenharmony_ci	PINCTRL_PIN(194, "UART2_CTSB"),
25062306a36Sopenharmony_ci	/* GPP_F */
25162306a36Sopenharmony_ci	PINCTRL_PIN(195, "CNV_BRI_DT"),
25262306a36Sopenharmony_ci	PINCTRL_PIN(196, "CNV_BRI_RSP"),
25362306a36Sopenharmony_ci	PINCTRL_PIN(197, "CNV_RGI_DT"),
25462306a36Sopenharmony_ci	PINCTRL_PIN(198, "CNV_RGI_RSP"),
25562306a36Sopenharmony_ci	PINCTRL_PIN(199, "CNV_RF_RESET_B"),
25662306a36Sopenharmony_ci	PINCTRL_PIN(200, "GPPC_F_5"),
25762306a36Sopenharmony_ci	PINCTRL_PIN(201, "CNV_PA_BLANKING"),
25862306a36Sopenharmony_ci	PINCTRL_PIN(202, "GPPC_F_7"),
25962306a36Sopenharmony_ci	PINCTRL_PIN(203, "I2S_MCLK2_INOUT"),
26062306a36Sopenharmony_ci	PINCTRL_PIN(204, "BOOTMPC"),
26162306a36Sopenharmony_ci	PINCTRL_PIN(205, "GPPC_F_10"),
26262306a36Sopenharmony_ci	PINCTRL_PIN(206, "GPPC_F_11"),
26362306a36Sopenharmony_ci	PINCTRL_PIN(207, "GSXDOUT"),
26462306a36Sopenharmony_ci	PINCTRL_PIN(208, "GSXSLOAD"),
26562306a36Sopenharmony_ci	PINCTRL_PIN(209, "GSXDIN"),
26662306a36Sopenharmony_ci	PINCTRL_PIN(210, "GSXSRESETB"),
26762306a36Sopenharmony_ci	PINCTRL_PIN(211, "GSXCLK"),
26862306a36Sopenharmony_ci	PINCTRL_PIN(212, "GMII_MDC"),
26962306a36Sopenharmony_ci	PINCTRL_PIN(213, "GMII_MDIO"),
27062306a36Sopenharmony_ci	PINCTRL_PIN(214, "SRCCLKREQB_6"),
27162306a36Sopenharmony_ci	PINCTRL_PIN(215, "EXT_PWR_GATEB"),
27262306a36Sopenharmony_ci	PINCTRL_PIN(216, "EXT_PWR_GATE2B"),
27362306a36Sopenharmony_ci	PINCTRL_PIN(217, "VNN_CTRL"),
27462306a36Sopenharmony_ci	PINCTRL_PIN(218, "V1P05_CTRL"),
27562306a36Sopenharmony_ci	PINCTRL_PIN(219, "GPPF_CLK_LOOPBACK"),
27662306a36Sopenharmony_ci	/* HVCMOS */
27762306a36Sopenharmony_ci	PINCTRL_PIN(220, "L_BKLTEN"),
27862306a36Sopenharmony_ci	PINCTRL_PIN(221, "L_BKLTCTL"),
27962306a36Sopenharmony_ci	PINCTRL_PIN(222, "L_VDDEN"),
28062306a36Sopenharmony_ci	PINCTRL_PIN(223, "SYS_PWROK"),
28162306a36Sopenharmony_ci	PINCTRL_PIN(224, "SYS_RESETB"),
28262306a36Sopenharmony_ci	PINCTRL_PIN(225, "MLK_RSTB"),
28362306a36Sopenharmony_ci	/* GPP_E */
28462306a36Sopenharmony_ci	PINCTRL_PIN(226, "SATAXPCIE_0"),
28562306a36Sopenharmony_ci	PINCTRL_PIN(227, "SPI1_IO_2"),
28662306a36Sopenharmony_ci	PINCTRL_PIN(228, "SPI1_IO_3"),
28762306a36Sopenharmony_ci	PINCTRL_PIN(229, "CPU_GP_0"),
28862306a36Sopenharmony_ci	PINCTRL_PIN(230, "SATA_DEVSLP_0"),
28962306a36Sopenharmony_ci	PINCTRL_PIN(231, "SATA_DEVSLP_1"),
29062306a36Sopenharmony_ci	PINCTRL_PIN(232, "GPPC_E_6"),
29162306a36Sopenharmony_ci	PINCTRL_PIN(233, "CPU_GP_1"),
29262306a36Sopenharmony_ci	PINCTRL_PIN(234, "SPI1_CS1B"),
29362306a36Sopenharmony_ci	PINCTRL_PIN(235, "USB2_OCB_0"),
29462306a36Sopenharmony_ci	PINCTRL_PIN(236, "SPI1_CSB"),
29562306a36Sopenharmony_ci	PINCTRL_PIN(237, "SPI1_CLK"),
29662306a36Sopenharmony_ci	PINCTRL_PIN(238, "SPI1_MISO_IO_1"),
29762306a36Sopenharmony_ci	PINCTRL_PIN(239, "SPI1_MOSI_IO_0"),
29862306a36Sopenharmony_ci	PINCTRL_PIN(240, "DDSP_HPD_A"),
29962306a36Sopenharmony_ci	PINCTRL_PIN(241, "ISH_GP_6"),
30062306a36Sopenharmony_ci	PINCTRL_PIN(242, "ISH_GP_7"),
30162306a36Sopenharmony_ci	PINCTRL_PIN(243, "GPPC_E_17"),
30262306a36Sopenharmony_ci	PINCTRL_PIN(244, "DDP1_CTRLCLK"),
30362306a36Sopenharmony_ci	PINCTRL_PIN(245, "DDP1_CTRLDATA"),
30462306a36Sopenharmony_ci	PINCTRL_PIN(246, "DDP2_CTRLCLK"),
30562306a36Sopenharmony_ci	PINCTRL_PIN(247, "DDP2_CTRLDATA"),
30662306a36Sopenharmony_ci	PINCTRL_PIN(248, "DDPA_CTRLCLK"),
30762306a36Sopenharmony_ci	PINCTRL_PIN(249, "DDPA_CTRLDATA"),
30862306a36Sopenharmony_ci	PINCTRL_PIN(250, "SPI1_CLK_LOOPBK"),
30962306a36Sopenharmony_ci	/* JTAG */
31062306a36Sopenharmony_ci	PINCTRL_PIN(251, "JTAG_TDO"),
31162306a36Sopenharmony_ci	PINCTRL_PIN(252, "JTAGX"),
31262306a36Sopenharmony_ci	PINCTRL_PIN(253, "PRDYB"),
31362306a36Sopenharmony_ci	PINCTRL_PIN(254, "PREQB"),
31462306a36Sopenharmony_ci	PINCTRL_PIN(255, "CPU_TRSTB"),
31562306a36Sopenharmony_ci	PINCTRL_PIN(256, "JTAG_TDI"),
31662306a36Sopenharmony_ci	PINCTRL_PIN(257, "JTAG_TMS"),
31762306a36Sopenharmony_ci	PINCTRL_PIN(258, "JTAG_TCK"),
31862306a36Sopenharmony_ci	PINCTRL_PIN(259, "DBG_PMODE"),
31962306a36Sopenharmony_ci	/* GPP_R */
32062306a36Sopenharmony_ci	PINCTRL_PIN(260, "HDA_BCLK"),
32162306a36Sopenharmony_ci	PINCTRL_PIN(261, "HDA_SYNC"),
32262306a36Sopenharmony_ci	PINCTRL_PIN(262, "HDA_SDO"),
32362306a36Sopenharmony_ci	PINCTRL_PIN(263, "HDA_SDI_0"),
32462306a36Sopenharmony_ci	PINCTRL_PIN(264, "HDA_RSTB"),
32562306a36Sopenharmony_ci	PINCTRL_PIN(265, "HDA_SDI_1"),
32662306a36Sopenharmony_ci	PINCTRL_PIN(266, "GPP_R_6"),
32762306a36Sopenharmony_ci	PINCTRL_PIN(267, "GPP_R_7"),
32862306a36Sopenharmony_ci	/* SPI */
32962306a36Sopenharmony_ci	PINCTRL_PIN(268, "SPI0_IO_2"),
33062306a36Sopenharmony_ci	PINCTRL_PIN(269, "SPI0_IO_3"),
33162306a36Sopenharmony_ci	PINCTRL_PIN(270, "SPI0_MOSI_IO_0"),
33262306a36Sopenharmony_ci	PINCTRL_PIN(271, "SPI0_MISO_IO_1"),
33362306a36Sopenharmony_ci	PINCTRL_PIN(272, "SPI0_TPM_CSB"),
33462306a36Sopenharmony_ci	PINCTRL_PIN(273, "SPI0_FLASH_0_CSB"),
33562306a36Sopenharmony_ci	PINCTRL_PIN(274, "SPI0_FLASH_1_CSB"),
33662306a36Sopenharmony_ci	PINCTRL_PIN(275, "SPI0_CLK"),
33762306a36Sopenharmony_ci	PINCTRL_PIN(276, "SPI0_CLK_LOOPBK"),
33862306a36Sopenharmony_ci};
33962306a36Sopenharmony_ci
34062306a36Sopenharmony_cistatic const struct intel_padgroup tgllp_community0_gpps[] = {
34162306a36Sopenharmony_ci	TGL_GPP(0, 0, 25, 0),				/* GPP_B */
34262306a36Sopenharmony_ci	TGL_GPP(1, 26, 41, 32),				/* GPP_T */
34362306a36Sopenharmony_ci	TGL_GPP(2, 42, 66, 64),				/* GPP_A */
34462306a36Sopenharmony_ci};
34562306a36Sopenharmony_ci
34662306a36Sopenharmony_cistatic const struct intel_padgroup tgllp_community1_gpps[] = {
34762306a36Sopenharmony_ci	TGL_GPP(0, 67, 74, 96),				/* GPP_S */
34862306a36Sopenharmony_ci	TGL_GPP(1, 75, 98, 128),			/* GPP_H */
34962306a36Sopenharmony_ci	TGL_GPP(2, 99, 119, 160),			/* GPP_D */
35062306a36Sopenharmony_ci	TGL_GPP(3, 120, 143, 192),			/* GPP_U */
35162306a36Sopenharmony_ci	TGL_GPP(4, 144, 170, 224),			/* vGPIO */
35262306a36Sopenharmony_ci};
35362306a36Sopenharmony_ci
35462306a36Sopenharmony_cistatic const struct intel_padgroup tgllp_community4_gpps[] = {
35562306a36Sopenharmony_ci	TGL_GPP(0, 171, 194, 256),			/* GPP_C */
35662306a36Sopenharmony_ci	TGL_GPP(1, 195, 219, 288),			/* GPP_F */
35762306a36Sopenharmony_ci	TGL_GPP(2, 220, 225, INTEL_GPIO_BASE_NOMAP),	/* HVCMOS */
35862306a36Sopenharmony_ci	TGL_GPP(3, 226, 250, 320),			/* GPP_E */
35962306a36Sopenharmony_ci	TGL_GPP(4, 251, 259, INTEL_GPIO_BASE_NOMAP),	/* JTAG */
36062306a36Sopenharmony_ci};
36162306a36Sopenharmony_ci
36262306a36Sopenharmony_cistatic const struct intel_padgroup tgllp_community5_gpps[] = {
36362306a36Sopenharmony_ci	TGL_GPP(0, 260, 267, 352),			/* GPP_R */
36462306a36Sopenharmony_ci	TGL_GPP(1, 268, 276, INTEL_GPIO_BASE_NOMAP),	/* SPI */
36562306a36Sopenharmony_ci};
36662306a36Sopenharmony_ci
36762306a36Sopenharmony_cistatic const struct intel_community tgllp_communities[] = {
36862306a36Sopenharmony_ci	TGL_LP_COMMUNITY(0, 0, 66, tgllp_community0_gpps),
36962306a36Sopenharmony_ci	TGL_LP_COMMUNITY(1, 67, 170, tgllp_community1_gpps),
37062306a36Sopenharmony_ci	TGL_LP_COMMUNITY(2, 171, 259, tgllp_community4_gpps),
37162306a36Sopenharmony_ci	TGL_LP_COMMUNITY(3, 260, 276, tgllp_community5_gpps),
37262306a36Sopenharmony_ci};
37362306a36Sopenharmony_ci
37462306a36Sopenharmony_cistatic const struct intel_pinctrl_soc_data tgllp_soc_data = {
37562306a36Sopenharmony_ci	.pins = tgllp_pins,
37662306a36Sopenharmony_ci	.npins = ARRAY_SIZE(tgllp_pins),
37762306a36Sopenharmony_ci	.communities = tgllp_communities,
37862306a36Sopenharmony_ci	.ncommunities = ARRAY_SIZE(tgllp_communities),
37962306a36Sopenharmony_ci};
38062306a36Sopenharmony_ci
38162306a36Sopenharmony_ci/* Tiger Lake-H */
38262306a36Sopenharmony_cistatic const struct pinctrl_pin_desc tglh_pins[] = {
38362306a36Sopenharmony_ci	/* GPP_A */
38462306a36Sopenharmony_ci	PINCTRL_PIN(0, "SPI0_IO_2"),
38562306a36Sopenharmony_ci	PINCTRL_PIN(1, "SPI0_IO_3"),
38662306a36Sopenharmony_ci	PINCTRL_PIN(2, "SPI0_MOSI_IO_0"),
38762306a36Sopenharmony_ci	PINCTRL_PIN(3, "SPI0_MISO_IO_1"),
38862306a36Sopenharmony_ci	PINCTRL_PIN(4, "SPI0_TPM_CSB"),
38962306a36Sopenharmony_ci	PINCTRL_PIN(5, "SPI0_FLASH_0_CSB"),
39062306a36Sopenharmony_ci	PINCTRL_PIN(6, "SPI0_FLASH_1_CSB"),
39162306a36Sopenharmony_ci	PINCTRL_PIN(7, "SPI0_CLK"),
39262306a36Sopenharmony_ci	PINCTRL_PIN(8, "ESPI_IO_0"),
39362306a36Sopenharmony_ci	PINCTRL_PIN(9, "ESPI_IO_1"),
39462306a36Sopenharmony_ci	PINCTRL_PIN(10, "ESPI_IO_2"),
39562306a36Sopenharmony_ci	PINCTRL_PIN(11, "ESPI_IO_3"),
39662306a36Sopenharmony_ci	PINCTRL_PIN(12, "ESPI_CS0B"),
39762306a36Sopenharmony_ci	PINCTRL_PIN(13, "ESPI_CLK"),
39862306a36Sopenharmony_ci	PINCTRL_PIN(14, "ESPI_RESETB"),
39962306a36Sopenharmony_ci	PINCTRL_PIN(15, "ESPI_CS1B"),
40062306a36Sopenharmony_ci	PINCTRL_PIN(16, "ESPI_CS2B"),
40162306a36Sopenharmony_ci	PINCTRL_PIN(17, "ESPI_CS3B"),
40262306a36Sopenharmony_ci	PINCTRL_PIN(18, "ESPI_ALERT0B"),
40362306a36Sopenharmony_ci	PINCTRL_PIN(19, "ESPI_ALERT1B"),
40462306a36Sopenharmony_ci	PINCTRL_PIN(20, "ESPI_ALERT2B"),
40562306a36Sopenharmony_ci	PINCTRL_PIN(21, "ESPI_ALERT3B"),
40662306a36Sopenharmony_ci	PINCTRL_PIN(22, "GPPC_A_14"),
40762306a36Sopenharmony_ci	PINCTRL_PIN(23, "SPI0_CLK_LOOPBK"),
40862306a36Sopenharmony_ci	PINCTRL_PIN(24, "ESPI_CLK_LOOPBK"),
40962306a36Sopenharmony_ci	/* GPP_R */
41062306a36Sopenharmony_ci	PINCTRL_PIN(25, "HDA_BCLK"),
41162306a36Sopenharmony_ci	PINCTRL_PIN(26, "HDA_SYNC"),
41262306a36Sopenharmony_ci	PINCTRL_PIN(27, "HDA_SDO"),
41362306a36Sopenharmony_ci	PINCTRL_PIN(28, "HDA_SDI_0"),
41462306a36Sopenharmony_ci	PINCTRL_PIN(29, "HDA_RSTB"),
41562306a36Sopenharmony_ci	PINCTRL_PIN(30, "HDA_SDI_1"),
41662306a36Sopenharmony_ci	PINCTRL_PIN(31, "GPP_R_6"),
41762306a36Sopenharmony_ci	PINCTRL_PIN(32, "GPP_R_7"),
41862306a36Sopenharmony_ci	PINCTRL_PIN(33, "GPP_R_8"),
41962306a36Sopenharmony_ci	PINCTRL_PIN(34, "PCIE_LNK_DOWN"),
42062306a36Sopenharmony_ci	PINCTRL_PIN(35, "ISH_UART0_RTSB"),
42162306a36Sopenharmony_ci	PINCTRL_PIN(36, "SX_EXIT_HOLDOFFB"),
42262306a36Sopenharmony_ci	PINCTRL_PIN(37, "CLKOUT_48"),
42362306a36Sopenharmony_ci	PINCTRL_PIN(38, "ISH_GP_7"),
42462306a36Sopenharmony_ci	PINCTRL_PIN(39, "ISH_GP_0"),
42562306a36Sopenharmony_ci	PINCTRL_PIN(40, "ISH_GP_1"),
42662306a36Sopenharmony_ci	PINCTRL_PIN(41, "ISH_GP_2"),
42762306a36Sopenharmony_ci	PINCTRL_PIN(42, "ISH_GP_3"),
42862306a36Sopenharmony_ci	PINCTRL_PIN(43, "ISH_GP_4"),
42962306a36Sopenharmony_ci	PINCTRL_PIN(44, "ISH_GP_5"),
43062306a36Sopenharmony_ci	/* GPP_B */
43162306a36Sopenharmony_ci	PINCTRL_PIN(45, "GSPI0_CS1B"),
43262306a36Sopenharmony_ci	PINCTRL_PIN(46, "GSPI1_CS1B"),
43362306a36Sopenharmony_ci	PINCTRL_PIN(47, "VRALERTB"),
43462306a36Sopenharmony_ci	PINCTRL_PIN(48, "CPU_GP_2"),
43562306a36Sopenharmony_ci	PINCTRL_PIN(49, "CPU_GP_3"),
43662306a36Sopenharmony_ci	PINCTRL_PIN(50, "SRCCLKREQB_0"),
43762306a36Sopenharmony_ci	PINCTRL_PIN(51, "SRCCLKREQB_1"),
43862306a36Sopenharmony_ci	PINCTRL_PIN(52, "SRCCLKREQB_2"),
43962306a36Sopenharmony_ci	PINCTRL_PIN(53, "SRCCLKREQB_3"),
44062306a36Sopenharmony_ci	PINCTRL_PIN(54, "SRCCLKREQB_4"),
44162306a36Sopenharmony_ci	PINCTRL_PIN(55, "SRCCLKREQB_5"),
44262306a36Sopenharmony_ci	PINCTRL_PIN(56, "I2S_MCLK"),
44362306a36Sopenharmony_ci	PINCTRL_PIN(57, "SLP_S0B"),
44462306a36Sopenharmony_ci	PINCTRL_PIN(58, "PLTRSTB"),
44562306a36Sopenharmony_ci	PINCTRL_PIN(59, "SPKR"),
44662306a36Sopenharmony_ci	PINCTRL_PIN(60, "GSPI0_CS0B"),
44762306a36Sopenharmony_ci	PINCTRL_PIN(61, "GSPI0_CLK"),
44862306a36Sopenharmony_ci	PINCTRL_PIN(62, "GSPI0_MISO"),
44962306a36Sopenharmony_ci	PINCTRL_PIN(63, "GSPI0_MOSI"),
45062306a36Sopenharmony_ci	PINCTRL_PIN(64, "GSPI1_CS0B"),
45162306a36Sopenharmony_ci	PINCTRL_PIN(65, "GSPI1_CLK"),
45262306a36Sopenharmony_ci	PINCTRL_PIN(66, "GSPI1_MISO"),
45362306a36Sopenharmony_ci	PINCTRL_PIN(67, "GSPI1_MOSI"),
45462306a36Sopenharmony_ci	PINCTRL_PIN(68, "SML1ALERTB"),
45562306a36Sopenharmony_ci	PINCTRL_PIN(69, "GSPI0_CLK_LOOPBK"),
45662306a36Sopenharmony_ci	PINCTRL_PIN(70, "GSPI1_CLK_LOOPBK"),
45762306a36Sopenharmony_ci	/* vGPIO_0 */
45862306a36Sopenharmony_ci	PINCTRL_PIN(71, "ESPI_USB_OCB_0"),
45962306a36Sopenharmony_ci	PINCTRL_PIN(72, "ESPI_USB_OCB_1"),
46062306a36Sopenharmony_ci	PINCTRL_PIN(73, "ESPI_USB_OCB_2"),
46162306a36Sopenharmony_ci	PINCTRL_PIN(74, "ESPI_USB_OCB_3"),
46262306a36Sopenharmony_ci	PINCTRL_PIN(75, "USB_CPU_OCB_0"),
46362306a36Sopenharmony_ci	PINCTRL_PIN(76, "USB_CPU_OCB_1"),
46462306a36Sopenharmony_ci	PINCTRL_PIN(77, "USB_CPU_OCB_2"),
46562306a36Sopenharmony_ci	PINCTRL_PIN(78, "USB_CPU_OCB_3"),
46662306a36Sopenharmony_ci	/* GPP_D */
46762306a36Sopenharmony_ci	PINCTRL_PIN(79, "SPI1_CSB"),
46862306a36Sopenharmony_ci	PINCTRL_PIN(80, "SPI1_CLK"),
46962306a36Sopenharmony_ci	PINCTRL_PIN(81, "SPI1_MISO_IO_1"),
47062306a36Sopenharmony_ci	PINCTRL_PIN(82, "SPI1_MOSI_IO_0"),
47162306a36Sopenharmony_ci	PINCTRL_PIN(83, "SML1CLK"),
47262306a36Sopenharmony_ci	PINCTRL_PIN(84, "I2S2_SFRM"),
47362306a36Sopenharmony_ci	PINCTRL_PIN(85, "I2S2_TXD"),
47462306a36Sopenharmony_ci	PINCTRL_PIN(86, "I2S2_RXD"),
47562306a36Sopenharmony_ci	PINCTRL_PIN(87, "I2S2_SCLK"),
47662306a36Sopenharmony_ci	PINCTRL_PIN(88, "SML0CLK"),
47762306a36Sopenharmony_ci	PINCTRL_PIN(89, "SML0DATA"),
47862306a36Sopenharmony_ci	PINCTRL_PIN(90, "GPP_D_11"),
47962306a36Sopenharmony_ci	PINCTRL_PIN(91, "ISH_UART0_CTSB"),
48062306a36Sopenharmony_ci	PINCTRL_PIN(92, "SPI1_IO_2"),
48162306a36Sopenharmony_ci	PINCTRL_PIN(93, "SPI1_IO_3"),
48262306a36Sopenharmony_ci	PINCTRL_PIN(94, "SML1DATA"),
48362306a36Sopenharmony_ci	PINCTRL_PIN(95, "GSPI3_CS0B"),
48462306a36Sopenharmony_ci	PINCTRL_PIN(96, "GSPI3_CLK"),
48562306a36Sopenharmony_ci	PINCTRL_PIN(97, "GSPI3_MISO"),
48662306a36Sopenharmony_ci	PINCTRL_PIN(98, "GSPI3_MOSI"),
48762306a36Sopenharmony_ci	PINCTRL_PIN(99, "UART3_RXD"),
48862306a36Sopenharmony_ci	PINCTRL_PIN(100, "UART3_TXD"),
48962306a36Sopenharmony_ci	PINCTRL_PIN(101, "UART3_RTSB"),
49062306a36Sopenharmony_ci	PINCTRL_PIN(102, "UART3_CTSB"),
49162306a36Sopenharmony_ci	PINCTRL_PIN(103, "SPI1_CLK_LOOPBK"),
49262306a36Sopenharmony_ci	PINCTRL_PIN(104, "GSPI3_CLK_LOOPBK"),
49362306a36Sopenharmony_ci	/* GPP_C */
49462306a36Sopenharmony_ci	PINCTRL_PIN(105, "SMBCLK"),
49562306a36Sopenharmony_ci	PINCTRL_PIN(106, "SMBDATA"),
49662306a36Sopenharmony_ci	PINCTRL_PIN(107, "SMBALERTB"),
49762306a36Sopenharmony_ci	PINCTRL_PIN(108, "ISH_UART0_RXD"),
49862306a36Sopenharmony_ci	PINCTRL_PIN(109, "ISH_UART0_TXD"),
49962306a36Sopenharmony_ci	PINCTRL_PIN(110, "SML0ALERTB"),
50062306a36Sopenharmony_ci	PINCTRL_PIN(111, "ISH_I2C2_SDA"),
50162306a36Sopenharmony_ci	PINCTRL_PIN(112, "ISH_I2C2_SCL"),
50262306a36Sopenharmony_ci	PINCTRL_PIN(113, "UART0_RXD"),
50362306a36Sopenharmony_ci	PINCTRL_PIN(114, "UART0_TXD"),
50462306a36Sopenharmony_ci	PINCTRL_PIN(115, "UART0_RTSB"),
50562306a36Sopenharmony_ci	PINCTRL_PIN(116, "UART0_CTSB"),
50662306a36Sopenharmony_ci	PINCTRL_PIN(117, "UART1_RXD"),
50762306a36Sopenharmony_ci	PINCTRL_PIN(118, "UART1_TXD"),
50862306a36Sopenharmony_ci	PINCTRL_PIN(119, "UART1_RTSB"),
50962306a36Sopenharmony_ci	PINCTRL_PIN(120, "UART1_CTSB"),
51062306a36Sopenharmony_ci	PINCTRL_PIN(121, "I2C0_SDA"),
51162306a36Sopenharmony_ci	PINCTRL_PIN(122, "I2C0_SCL"),
51262306a36Sopenharmony_ci	PINCTRL_PIN(123, "I2C1_SDA"),
51362306a36Sopenharmony_ci	PINCTRL_PIN(124, "I2C1_SCL"),
51462306a36Sopenharmony_ci	PINCTRL_PIN(125, "UART2_RXD"),
51562306a36Sopenharmony_ci	PINCTRL_PIN(126, "UART2_TXD"),
51662306a36Sopenharmony_ci	PINCTRL_PIN(127, "UART2_RTSB"),
51762306a36Sopenharmony_ci	PINCTRL_PIN(128, "UART2_CTSB"),
51862306a36Sopenharmony_ci	/* GPP_S */
51962306a36Sopenharmony_ci	PINCTRL_PIN(129, "SNDW1_CLK"),
52062306a36Sopenharmony_ci	PINCTRL_PIN(130, "SNDW1_DATA"),
52162306a36Sopenharmony_ci	PINCTRL_PIN(131, "SNDW2_CLK"),
52262306a36Sopenharmony_ci	PINCTRL_PIN(132, "SNDW2_DATA"),
52362306a36Sopenharmony_ci	PINCTRL_PIN(133, "SNDW3_CLK"),
52462306a36Sopenharmony_ci	PINCTRL_PIN(134, "SNDW3_DATA"),
52562306a36Sopenharmony_ci	PINCTRL_PIN(135, "SNDW4_CLK"),
52662306a36Sopenharmony_ci	PINCTRL_PIN(136, "SNDW4_DATA"),
52762306a36Sopenharmony_ci	/* GPP_G */
52862306a36Sopenharmony_ci	PINCTRL_PIN(137, "DDPA_CTRLCLK"),
52962306a36Sopenharmony_ci	PINCTRL_PIN(138, "DDPA_CTRLDATA"),
53062306a36Sopenharmony_ci	PINCTRL_PIN(139, "DNX_FORCE_RELOAD"),
53162306a36Sopenharmony_ci	PINCTRL_PIN(140, "GMII_MDC_0"),
53262306a36Sopenharmony_ci	PINCTRL_PIN(141, "GMII_MDIO_0"),
53362306a36Sopenharmony_ci	PINCTRL_PIN(142, "SLP_DRAMB"),
53462306a36Sopenharmony_ci	PINCTRL_PIN(143, "GPPC_G_6"),
53562306a36Sopenharmony_ci	PINCTRL_PIN(144, "GPPC_G_7"),
53662306a36Sopenharmony_ci	PINCTRL_PIN(145, "ISH_SPI_CSB"),
53762306a36Sopenharmony_ci	PINCTRL_PIN(146, "ISH_SPI_CLK"),
53862306a36Sopenharmony_ci	PINCTRL_PIN(147, "ISH_SPI_MISO"),
53962306a36Sopenharmony_ci	PINCTRL_PIN(148, "ISH_SPI_MOSI"),
54062306a36Sopenharmony_ci	PINCTRL_PIN(149, "DDP1_CTRLCLK"),
54162306a36Sopenharmony_ci	PINCTRL_PIN(150, "DDP1_CTRLDATA"),
54262306a36Sopenharmony_ci	PINCTRL_PIN(151, "DDP2_CTRLCLK"),
54362306a36Sopenharmony_ci	PINCTRL_PIN(152, "DDP2_CTRLDATA"),
54462306a36Sopenharmony_ci	PINCTRL_PIN(153, "GSPI2_CLK_LOOPBK"),
54562306a36Sopenharmony_ci	/* vGPIO */
54662306a36Sopenharmony_ci	PINCTRL_PIN(154, "CNV_BTEN"),
54762306a36Sopenharmony_ci	PINCTRL_PIN(155, "CNV_BT_HOST_WAKEB"),
54862306a36Sopenharmony_ci	PINCTRL_PIN(156, "CNV_BT_IF_SELECT"),
54962306a36Sopenharmony_ci	PINCTRL_PIN(157, "vCNV_BT_UART_TXD"),
55062306a36Sopenharmony_ci	PINCTRL_PIN(158, "vCNV_BT_UART_RXD"),
55162306a36Sopenharmony_ci	PINCTRL_PIN(159, "vCNV_BT_UART_CTS_B"),
55262306a36Sopenharmony_ci	PINCTRL_PIN(160, "vCNV_BT_UART_RTS_B"),
55362306a36Sopenharmony_ci	PINCTRL_PIN(161, "vCNV_MFUART1_TXD"),
55462306a36Sopenharmony_ci	PINCTRL_PIN(162, "vCNV_MFUART1_RXD"),
55562306a36Sopenharmony_ci	PINCTRL_PIN(163, "vCNV_MFUART1_CTS_B"),
55662306a36Sopenharmony_ci	PINCTRL_PIN(164, "vCNV_MFUART1_RTS_B"),
55762306a36Sopenharmony_ci	PINCTRL_PIN(165, "vUART0_TXD"),
55862306a36Sopenharmony_ci	PINCTRL_PIN(166, "vUART0_RXD"),
55962306a36Sopenharmony_ci	PINCTRL_PIN(167, "vUART0_CTS_B"),
56062306a36Sopenharmony_ci	PINCTRL_PIN(168, "vUART0_RTS_B"),
56162306a36Sopenharmony_ci	PINCTRL_PIN(169, "vISH_UART0_TXD"),
56262306a36Sopenharmony_ci	PINCTRL_PIN(170, "vISH_UART0_RXD"),
56362306a36Sopenharmony_ci	PINCTRL_PIN(171, "vISH_UART0_CTS_B"),
56462306a36Sopenharmony_ci	PINCTRL_PIN(172, "vISH_UART0_RTS_B"),
56562306a36Sopenharmony_ci	PINCTRL_PIN(173, "vCNV_BT_I2S_BCLK"),
56662306a36Sopenharmony_ci	PINCTRL_PIN(174, "vCNV_BT_I2S_WS_SYNC"),
56762306a36Sopenharmony_ci	PINCTRL_PIN(175, "vCNV_BT_I2S_SDO"),
56862306a36Sopenharmony_ci	PINCTRL_PIN(176, "vCNV_BT_I2S_SDI"),
56962306a36Sopenharmony_ci	PINCTRL_PIN(177, "vI2S2_SCLK"),
57062306a36Sopenharmony_ci	PINCTRL_PIN(178, "vI2S2_SFRM"),
57162306a36Sopenharmony_ci	PINCTRL_PIN(179, "vI2S2_TXD"),
57262306a36Sopenharmony_ci	PINCTRL_PIN(180, "vI2S2_RXD"),
57362306a36Sopenharmony_ci	/* GPP_E */
57462306a36Sopenharmony_ci	PINCTRL_PIN(181, "SATAXPCIE_0"),
57562306a36Sopenharmony_ci	PINCTRL_PIN(182, "SATAXPCIE_1"),
57662306a36Sopenharmony_ci	PINCTRL_PIN(183, "SATAXPCIE_2"),
57762306a36Sopenharmony_ci	PINCTRL_PIN(184, "CPU_GP_0"),
57862306a36Sopenharmony_ci	PINCTRL_PIN(185, "SATA_DEVSLP_0"),
57962306a36Sopenharmony_ci	PINCTRL_PIN(186, "SATA_DEVSLP_1"),
58062306a36Sopenharmony_ci	PINCTRL_PIN(187, "SATA_DEVSLP_2"),
58162306a36Sopenharmony_ci	PINCTRL_PIN(188, "CPU_GP_1"),
58262306a36Sopenharmony_ci	PINCTRL_PIN(189, "SATA_LEDB"),
58362306a36Sopenharmony_ci	PINCTRL_PIN(190, "USB2_OCB_0"),
58462306a36Sopenharmony_ci	PINCTRL_PIN(191, "USB2_OCB_1"),
58562306a36Sopenharmony_ci	PINCTRL_PIN(192, "USB2_OCB_2"),
58662306a36Sopenharmony_ci	PINCTRL_PIN(193, "USB2_OCB_3"),
58762306a36Sopenharmony_ci	/* GPP_F */
58862306a36Sopenharmony_ci	PINCTRL_PIN(194, "SATAXPCIE_3"),
58962306a36Sopenharmony_ci	PINCTRL_PIN(195, "SATAXPCIE_4"),
59062306a36Sopenharmony_ci	PINCTRL_PIN(196, "SATAXPCIE_5"),
59162306a36Sopenharmony_ci	PINCTRL_PIN(197, "SATAXPCIE_6"),
59262306a36Sopenharmony_ci	PINCTRL_PIN(198, "SATAXPCIE_7"),
59362306a36Sopenharmony_ci	PINCTRL_PIN(199, "SATA_DEVSLP_3"),
59462306a36Sopenharmony_ci	PINCTRL_PIN(200, "SATA_DEVSLP_4"),
59562306a36Sopenharmony_ci	PINCTRL_PIN(201, "SATA_DEVSLP_5"),
59662306a36Sopenharmony_ci	PINCTRL_PIN(202, "SATA_DEVSLP_6"),
59762306a36Sopenharmony_ci	PINCTRL_PIN(203, "SATA_DEVSLP_7"),
59862306a36Sopenharmony_ci	PINCTRL_PIN(204, "SATA_SCLOCK"),
59962306a36Sopenharmony_ci	PINCTRL_PIN(205, "SATA_SLOAD"),
60062306a36Sopenharmony_ci	PINCTRL_PIN(206, "SATA_SDATAOUT1"),
60162306a36Sopenharmony_ci	PINCTRL_PIN(207, "SATA_SDATAOUT0"),
60262306a36Sopenharmony_ci	PINCTRL_PIN(208, "PS_ONB"),
60362306a36Sopenharmony_ci	PINCTRL_PIN(209, "M2_SKT2_CFG_0"),
60462306a36Sopenharmony_ci	PINCTRL_PIN(210, "M2_SKT2_CFG_1"),
60562306a36Sopenharmony_ci	PINCTRL_PIN(211, "M2_SKT2_CFG_2"),
60662306a36Sopenharmony_ci	PINCTRL_PIN(212, "M2_SKT2_CFG_3"),
60762306a36Sopenharmony_ci	PINCTRL_PIN(213, "L_VDDEN"),
60862306a36Sopenharmony_ci	PINCTRL_PIN(214, "L_BKLTEN"),
60962306a36Sopenharmony_ci	PINCTRL_PIN(215, "L_BKLTCTL"),
61062306a36Sopenharmony_ci	PINCTRL_PIN(216, "VNN_CTRL"),
61162306a36Sopenharmony_ci	PINCTRL_PIN(217, "GPP_F_23"),
61262306a36Sopenharmony_ci	/* GPP_H */
61362306a36Sopenharmony_ci	PINCTRL_PIN(218, "SRCCLKREQB_6"),
61462306a36Sopenharmony_ci	PINCTRL_PIN(219, "SRCCLKREQB_7"),
61562306a36Sopenharmony_ci	PINCTRL_PIN(220, "SRCCLKREQB_8"),
61662306a36Sopenharmony_ci	PINCTRL_PIN(221, "SRCCLKREQB_9"),
61762306a36Sopenharmony_ci	PINCTRL_PIN(222, "SRCCLKREQB_10"),
61862306a36Sopenharmony_ci	PINCTRL_PIN(223, "SRCCLKREQB_11"),
61962306a36Sopenharmony_ci	PINCTRL_PIN(224, "SRCCLKREQB_12"),
62062306a36Sopenharmony_ci	PINCTRL_PIN(225, "SRCCLKREQB_13"),
62162306a36Sopenharmony_ci	PINCTRL_PIN(226, "SRCCLKREQB_14"),
62262306a36Sopenharmony_ci	PINCTRL_PIN(227, "SRCCLKREQB_15"),
62362306a36Sopenharmony_ci	PINCTRL_PIN(228, "SML2CLK"),
62462306a36Sopenharmony_ci	PINCTRL_PIN(229, "SML2DATA"),
62562306a36Sopenharmony_ci	PINCTRL_PIN(230, "SML2ALERTB"),
62662306a36Sopenharmony_ci	PINCTRL_PIN(231, "SML3CLK"),
62762306a36Sopenharmony_ci	PINCTRL_PIN(232, "SML3DATA"),
62862306a36Sopenharmony_ci	PINCTRL_PIN(233, "SML3ALERTB"),
62962306a36Sopenharmony_ci	PINCTRL_PIN(234, "SML4CLK"),
63062306a36Sopenharmony_ci	PINCTRL_PIN(235, "SML4DATA"),
63162306a36Sopenharmony_ci	PINCTRL_PIN(236, "SML4ALERTB"),
63262306a36Sopenharmony_ci	PINCTRL_PIN(237, "ISH_I2C0_SDA"),
63362306a36Sopenharmony_ci	PINCTRL_PIN(238, "ISH_I2C0_SCL"),
63462306a36Sopenharmony_ci	PINCTRL_PIN(239, "ISH_I2C1_SDA"),
63562306a36Sopenharmony_ci	PINCTRL_PIN(240, "ISH_I2C1_SCL"),
63662306a36Sopenharmony_ci	PINCTRL_PIN(241, "TIME_SYNC_0"),
63762306a36Sopenharmony_ci	/* GPP_J */
63862306a36Sopenharmony_ci	PINCTRL_PIN(242, "CNV_PA_BLANKING"),
63962306a36Sopenharmony_ci	PINCTRL_PIN(243, "CPU_C10_GATEB"),
64062306a36Sopenharmony_ci	PINCTRL_PIN(244, "CNV_BRI_DT"),
64162306a36Sopenharmony_ci	PINCTRL_PIN(245, "CNV_BRI_RSP"),
64262306a36Sopenharmony_ci	PINCTRL_PIN(246, "CNV_RGI_DT"),
64362306a36Sopenharmony_ci	PINCTRL_PIN(247, "CNV_RGI_RSP"),
64462306a36Sopenharmony_ci	PINCTRL_PIN(248, "CNV_MFUART2_RXD"),
64562306a36Sopenharmony_ci	PINCTRL_PIN(249, "CNV_MFUART2_TXD"),
64662306a36Sopenharmony_ci	PINCTRL_PIN(250, "GPP_J_8"),
64762306a36Sopenharmony_ci	PINCTRL_PIN(251, "GPP_J_9"),
64862306a36Sopenharmony_ci	/* GPP_K */
64962306a36Sopenharmony_ci	PINCTRL_PIN(252, "GSXDOUT"),
65062306a36Sopenharmony_ci	PINCTRL_PIN(253, "GSXSLOAD"),
65162306a36Sopenharmony_ci	PINCTRL_PIN(254, "GSXDIN"),
65262306a36Sopenharmony_ci	PINCTRL_PIN(255, "GSXSRESETB"),
65362306a36Sopenharmony_ci	PINCTRL_PIN(256, "GSXCLK"),
65462306a36Sopenharmony_ci	PINCTRL_PIN(257, "ADR_COMPLETE"),
65562306a36Sopenharmony_ci	PINCTRL_PIN(258, "DDSP_HPD_A"),
65662306a36Sopenharmony_ci	PINCTRL_PIN(259, "DDSP_HPD_B"),
65762306a36Sopenharmony_ci	PINCTRL_PIN(260, "CORE_VID_0"),
65862306a36Sopenharmony_ci	PINCTRL_PIN(261, "CORE_VID_1"),
65962306a36Sopenharmony_ci	PINCTRL_PIN(262, "DDSP_HPD_C"),
66062306a36Sopenharmony_ci	PINCTRL_PIN(263, "GPP_K_11"),
66162306a36Sopenharmony_ci	PINCTRL_PIN(264, "SYS_PWROK"),
66262306a36Sopenharmony_ci	PINCTRL_PIN(265, "SYS_RESETB"),
66362306a36Sopenharmony_ci	PINCTRL_PIN(266, "MLK_RSTB"),
66462306a36Sopenharmony_ci	/* GPP_I */
66562306a36Sopenharmony_ci	PINCTRL_PIN(267, "PMCALERTB"),
66662306a36Sopenharmony_ci	PINCTRL_PIN(268, "DDSP_HPD_1"),
66762306a36Sopenharmony_ci	PINCTRL_PIN(269, "DDSP_HPD_2"),
66862306a36Sopenharmony_ci	PINCTRL_PIN(270, "DDSP_HPD_3"),
66962306a36Sopenharmony_ci	PINCTRL_PIN(271, "DDSP_HPD_4"),
67062306a36Sopenharmony_ci	PINCTRL_PIN(272, "DDPB_CTRLCLK"),
67162306a36Sopenharmony_ci	PINCTRL_PIN(273, "DDPB_CTRLDATA"),
67262306a36Sopenharmony_ci	PINCTRL_PIN(274, "DDPC_CTRLCLK"),
67362306a36Sopenharmony_ci	PINCTRL_PIN(275, "DDPC_CTRLDATA"),
67462306a36Sopenharmony_ci	PINCTRL_PIN(276, "FUSA_DIAGTEST_EN"),
67562306a36Sopenharmony_ci	PINCTRL_PIN(277, "FUSA_DIAGTEST_MODE"),
67662306a36Sopenharmony_ci	PINCTRL_PIN(278, "USB2_OCB_4"),
67762306a36Sopenharmony_ci	PINCTRL_PIN(279, "USB2_OCB_5"),
67862306a36Sopenharmony_ci	PINCTRL_PIN(280, "USB2_OCB_6"),
67962306a36Sopenharmony_ci	PINCTRL_PIN(281, "USB2_OCB_7"),
68062306a36Sopenharmony_ci	/* JTAG */
68162306a36Sopenharmony_ci	PINCTRL_PIN(282, "JTAG_TDO"),
68262306a36Sopenharmony_ci	PINCTRL_PIN(283, "JTAGX"),
68362306a36Sopenharmony_ci	PINCTRL_PIN(284, "PRDYB"),
68462306a36Sopenharmony_ci	PINCTRL_PIN(285, "PREQB"),
68562306a36Sopenharmony_ci	PINCTRL_PIN(286, "JTAG_TDI"),
68662306a36Sopenharmony_ci	PINCTRL_PIN(287, "JTAG_TMS"),
68762306a36Sopenharmony_ci	PINCTRL_PIN(288, "JTAG_TCK"),
68862306a36Sopenharmony_ci	PINCTRL_PIN(289, "DBG_PMODE"),
68962306a36Sopenharmony_ci	PINCTRL_PIN(290, "CPU_TRSTB"),
69062306a36Sopenharmony_ci};
69162306a36Sopenharmony_ci
69262306a36Sopenharmony_cistatic const struct intel_padgroup tglh_community0_gpps[] = {
69362306a36Sopenharmony_ci	TGL_GPP(0, 0, 24, 0),				/* GPP_A */
69462306a36Sopenharmony_ci	TGL_GPP(1, 25, 44, 32),				/* GPP_R */
69562306a36Sopenharmony_ci	TGL_GPP(2, 45, 70, 64),				/* GPP_B */
69662306a36Sopenharmony_ci	TGL_GPP(3, 71, 78, 96),				/* vGPIO_0 */
69762306a36Sopenharmony_ci};
69862306a36Sopenharmony_ci
69962306a36Sopenharmony_cistatic const struct intel_padgroup tglh_community1_gpps[] = {
70062306a36Sopenharmony_ci	TGL_GPP(0, 79, 104, 128),			/* GPP_D */
70162306a36Sopenharmony_ci	TGL_GPP(1, 105, 128, 160),			/* GPP_C */
70262306a36Sopenharmony_ci	TGL_GPP(2, 129, 136, 192),			/* GPP_S */
70362306a36Sopenharmony_ci	TGL_GPP(3, 137, 153, 224),			/* GPP_G */
70462306a36Sopenharmony_ci	TGL_GPP(4, 154, 180, 256),			/* vGPIO */
70562306a36Sopenharmony_ci};
70662306a36Sopenharmony_ci
70762306a36Sopenharmony_cistatic const struct intel_padgroup tglh_community3_gpps[] = {
70862306a36Sopenharmony_ci	TGL_GPP(0, 181, 193, 288),			/* GPP_E */
70962306a36Sopenharmony_ci	TGL_GPP(1, 194, 217, 320),			/* GPP_F */
71062306a36Sopenharmony_ci};
71162306a36Sopenharmony_ci
71262306a36Sopenharmony_cistatic const struct intel_padgroup tglh_community4_gpps[] = {
71362306a36Sopenharmony_ci	TGL_GPP(0, 218, 241, 352),			/* GPP_H */
71462306a36Sopenharmony_ci	TGL_GPP(1, 242, 251, 384),			/* GPP_J */
71562306a36Sopenharmony_ci	TGL_GPP(2, 252, 266, 416),			/* GPP_K */
71662306a36Sopenharmony_ci};
71762306a36Sopenharmony_ci
71862306a36Sopenharmony_cistatic const struct intel_padgroup tglh_community5_gpps[] = {
71962306a36Sopenharmony_ci	TGL_GPP(0, 267, 281, 448),			/* GPP_I */
72062306a36Sopenharmony_ci	TGL_GPP(1, 282, 290, INTEL_GPIO_BASE_NOMAP),	/* JTAG */
72162306a36Sopenharmony_ci};
72262306a36Sopenharmony_ci
72362306a36Sopenharmony_cistatic const struct intel_community tglh_communities[] = {
72462306a36Sopenharmony_ci	TGL_H_COMMUNITY(0, 0, 78, tglh_community0_gpps),
72562306a36Sopenharmony_ci	TGL_H_COMMUNITY(1, 79, 180, tglh_community1_gpps),
72662306a36Sopenharmony_ci	TGL_H_COMMUNITY(2, 181, 217, tglh_community3_gpps),
72762306a36Sopenharmony_ci	TGL_H_COMMUNITY(3, 218, 266, tglh_community4_gpps),
72862306a36Sopenharmony_ci	TGL_H_COMMUNITY(4, 267, 290, tglh_community5_gpps),
72962306a36Sopenharmony_ci};
73062306a36Sopenharmony_ci
73162306a36Sopenharmony_cistatic const struct intel_pinctrl_soc_data tglh_soc_data = {
73262306a36Sopenharmony_ci	.pins = tglh_pins,
73362306a36Sopenharmony_ci	.npins = ARRAY_SIZE(tglh_pins),
73462306a36Sopenharmony_ci	.communities = tglh_communities,
73562306a36Sopenharmony_ci	.ncommunities = ARRAY_SIZE(tglh_communities),
73662306a36Sopenharmony_ci};
73762306a36Sopenharmony_ci
73862306a36Sopenharmony_cistatic const struct acpi_device_id tgl_pinctrl_acpi_match[] = {
73962306a36Sopenharmony_ci	{ "INT34C5", (kernel_ulong_t)&tgllp_soc_data },
74062306a36Sopenharmony_ci	{ "INT34C6", (kernel_ulong_t)&tglh_soc_data },
74162306a36Sopenharmony_ci	{ "INTC1055", (kernel_ulong_t)&tgllp_soc_data },
74262306a36Sopenharmony_ci	{ }
74362306a36Sopenharmony_ci};
74462306a36Sopenharmony_ciMODULE_DEVICE_TABLE(acpi, tgl_pinctrl_acpi_match);
74562306a36Sopenharmony_ci
74662306a36Sopenharmony_cistatic INTEL_PINCTRL_PM_OPS(tgl_pinctrl_pm_ops);
74762306a36Sopenharmony_ci
74862306a36Sopenharmony_cistatic struct platform_driver tgl_pinctrl_driver = {
74962306a36Sopenharmony_ci	.probe = intel_pinctrl_probe_by_hid,
75062306a36Sopenharmony_ci	.driver = {
75162306a36Sopenharmony_ci		.name = "tigerlake-pinctrl",
75262306a36Sopenharmony_ci		.acpi_match_table = tgl_pinctrl_acpi_match,
75362306a36Sopenharmony_ci		.pm = &tgl_pinctrl_pm_ops,
75462306a36Sopenharmony_ci	},
75562306a36Sopenharmony_ci};
75662306a36Sopenharmony_cimodule_platform_driver(tgl_pinctrl_driver);
75762306a36Sopenharmony_ci
75862306a36Sopenharmony_ciMODULE_AUTHOR("Andy Shevchenko <andriy.shevchenko@linux.intel.com>");
75962306a36Sopenharmony_ciMODULE_AUTHOR("Mika Westerberg <mika.westerberg@linux.intel.com>");
76062306a36Sopenharmony_ciMODULE_DESCRIPTION("Intel Tiger Lake PCH pinctrl/GPIO driver");
76162306a36Sopenharmony_ciMODULE_LICENSE("GPL v2");
76262306a36Sopenharmony_ciMODULE_IMPORT_NS(PINCTRL_INTEL);
763