162306a36Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0
262306a36Sopenharmony_ci/*
362306a36Sopenharmony_ci * Intel Alder Lake PCH pinctrl/GPIO driver
462306a36Sopenharmony_ci *
562306a36Sopenharmony_ci * Copyright (C) 2020, 2022 Intel Corporation
662306a36Sopenharmony_ci * Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
762306a36Sopenharmony_ci */
862306a36Sopenharmony_ci
962306a36Sopenharmony_ci#include <linux/mod_devicetable.h>
1062306a36Sopenharmony_ci#include <linux/module.h>
1162306a36Sopenharmony_ci#include <linux/platform_device.h>
1262306a36Sopenharmony_ci
1362306a36Sopenharmony_ci#include <linux/pinctrl/pinctrl.h>
1462306a36Sopenharmony_ci
1562306a36Sopenharmony_ci#include "pinctrl-intel.h"
1662306a36Sopenharmony_ci
1762306a36Sopenharmony_ci#define ADL_N_PAD_OWN		0x020
1862306a36Sopenharmony_ci#define ADL_N_PADCFGLOCK	0x080
1962306a36Sopenharmony_ci#define ADL_N_HOSTSW_OWN	0x0b0
2062306a36Sopenharmony_ci#define ADL_N_GPI_IS		0x100
2162306a36Sopenharmony_ci#define ADL_N_GPI_IE		0x120
2262306a36Sopenharmony_ci
2362306a36Sopenharmony_ci#define ADL_S_PAD_OWN		0x0a0
2462306a36Sopenharmony_ci#define ADL_S_PADCFGLOCK	0x110
2562306a36Sopenharmony_ci#define ADL_S_HOSTSW_OWN	0x150
2662306a36Sopenharmony_ci#define ADL_S_GPI_IS		0x200
2762306a36Sopenharmony_ci#define ADL_S_GPI_IE		0x220
2862306a36Sopenharmony_ci
2962306a36Sopenharmony_ci#define ADL_GPP(r, s, e, g)				\
3062306a36Sopenharmony_ci	{						\
3162306a36Sopenharmony_ci		.reg_num = (r),				\
3262306a36Sopenharmony_ci		.base = (s),				\
3362306a36Sopenharmony_ci		.size = ((e) - (s) + 1),		\
3462306a36Sopenharmony_ci		.gpio_base = (g),			\
3562306a36Sopenharmony_ci	}
3662306a36Sopenharmony_ci
3762306a36Sopenharmony_ci#define ADL_N_COMMUNITY(b, s, e, g)			\
3862306a36Sopenharmony_ci	INTEL_COMMUNITY_GPPS(b, s, e, g, ADL_N)
3962306a36Sopenharmony_ci
4062306a36Sopenharmony_ci#define ADL_S_COMMUNITY(b, s, e, g)			\
4162306a36Sopenharmony_ci	INTEL_COMMUNITY_GPPS(b, s, e, g, ADL_S)
4262306a36Sopenharmony_ci
4362306a36Sopenharmony_ci/* Alder Lake-N */
4462306a36Sopenharmony_cistatic const struct pinctrl_pin_desc adln_pins[] = {
4562306a36Sopenharmony_ci	/* GPP_B */
4662306a36Sopenharmony_ci	PINCTRL_PIN(0, "CORE_VID_0"),
4762306a36Sopenharmony_ci	PINCTRL_PIN(1, "CORE_VID_1"),
4862306a36Sopenharmony_ci	PINCTRL_PIN(2, "GPPC_B_2"),
4962306a36Sopenharmony_ci	PINCTRL_PIN(3, "GPPC_B_3"),
5062306a36Sopenharmony_ci	PINCTRL_PIN(4, "GPPC_B_4"),
5162306a36Sopenharmony_ci	PINCTRL_PIN(5, "GPPC_B_5"),
5262306a36Sopenharmony_ci	PINCTRL_PIN(6, "GPPC_B_6"),
5362306a36Sopenharmony_ci	PINCTRL_PIN(7, "GPPC_B_7"),
5462306a36Sopenharmony_ci	PINCTRL_PIN(8, "GPPC_B_8"),
5562306a36Sopenharmony_ci	PINCTRL_PIN(9, "GPPC_B_9"),
5662306a36Sopenharmony_ci	PINCTRL_PIN(10, "GPPC_B_10"),
5762306a36Sopenharmony_ci	PINCTRL_PIN(11, "GPPC_B_11"),
5862306a36Sopenharmony_ci	PINCTRL_PIN(12, "SLP_S0B"),
5962306a36Sopenharmony_ci	PINCTRL_PIN(13, "PLTRSTB"),
6062306a36Sopenharmony_ci	PINCTRL_PIN(14, "GPPC_B_14"),
6162306a36Sopenharmony_ci	PINCTRL_PIN(15, "GPPC_B_15"),
6262306a36Sopenharmony_ci	PINCTRL_PIN(16, "GPPC_B_16"),
6362306a36Sopenharmony_ci	PINCTRL_PIN(17, "GPPC_B_17"),
6462306a36Sopenharmony_ci	PINCTRL_PIN(18, "GPPC_B_18"),
6562306a36Sopenharmony_ci	PINCTRL_PIN(19, "GPPC_B_19"),
6662306a36Sopenharmony_ci	PINCTRL_PIN(20, "GPPC_B_20"),
6762306a36Sopenharmony_ci	PINCTRL_PIN(21, "GPPC_B_21"),
6862306a36Sopenharmony_ci	PINCTRL_PIN(22, "GPPC_B_22"),
6962306a36Sopenharmony_ci	PINCTRL_PIN(23, "GPPC_B_23"),
7062306a36Sopenharmony_ci	PINCTRL_PIN(24, "GSPI0_CLK_LOOPBK"),
7162306a36Sopenharmony_ci	PINCTRL_PIN(25, "GSPI1_CLK_LOOPBK"),
7262306a36Sopenharmony_ci	/* GPP_T */
7362306a36Sopenharmony_ci	PINCTRL_PIN(26, "GPPC_T_0"),
7462306a36Sopenharmony_ci	PINCTRL_PIN(27, "GPPC_T_1"),
7562306a36Sopenharmony_ci	PINCTRL_PIN(28, "FUSA_DIAGTEST_EN"),
7662306a36Sopenharmony_ci	PINCTRL_PIN(29, "FUSA_DIAGTEST_MODE"),
7762306a36Sopenharmony_ci	PINCTRL_PIN(30, "GPPC_T_4"),
7862306a36Sopenharmony_ci	PINCTRL_PIN(31, "GPPC_T_5"),
7962306a36Sopenharmony_ci	PINCTRL_PIN(32, "GPPC_T_6"),
8062306a36Sopenharmony_ci	PINCTRL_PIN(33, "GPPC_T_7"),
8162306a36Sopenharmony_ci	PINCTRL_PIN(34, "GPPC_T_8"),
8262306a36Sopenharmony_ci	PINCTRL_PIN(35, "GPPC_T_9"),
8362306a36Sopenharmony_ci	PINCTRL_PIN(36, "GPPC_T_10"),
8462306a36Sopenharmony_ci	PINCTRL_PIN(37, "GPPC_T_11"),
8562306a36Sopenharmony_ci	PINCTRL_PIN(38, "GPPC_T_12"),
8662306a36Sopenharmony_ci	PINCTRL_PIN(39, "GPPC_T_13"),
8762306a36Sopenharmony_ci	PINCTRL_PIN(40, "GPPC_T_14"),
8862306a36Sopenharmony_ci	PINCTRL_PIN(41, "GPPC_T_15"),
8962306a36Sopenharmony_ci	/* GPP_A */
9062306a36Sopenharmony_ci	PINCTRL_PIN(42, "ESPI_IO_0"),
9162306a36Sopenharmony_ci	PINCTRL_PIN(43, "ESPI_IO_1"),
9262306a36Sopenharmony_ci	PINCTRL_PIN(44, "ESPI_IO_2"),
9362306a36Sopenharmony_ci	PINCTRL_PIN(45, "ESPI_IO_3"),
9462306a36Sopenharmony_ci	PINCTRL_PIN(46, "ESPI_CS0B"),
9562306a36Sopenharmony_ci	PINCTRL_PIN(47, "ESPI_ALERT0B"),
9662306a36Sopenharmony_ci	PINCTRL_PIN(48, "ESPI_ALERT1B"),
9762306a36Sopenharmony_ci	PINCTRL_PIN(49, "GPPC_A_7"),
9862306a36Sopenharmony_ci	PINCTRL_PIN(50, "GPPC_A_8"),
9962306a36Sopenharmony_ci	PINCTRL_PIN(51, "ESPI_CLK"),
10062306a36Sopenharmony_ci	PINCTRL_PIN(52, "ESPI_RESETB"),
10162306a36Sopenharmony_ci	PINCTRL_PIN(53, "GPPC_A_11"),
10262306a36Sopenharmony_ci	PINCTRL_PIN(54, "GPPC_A_12"),
10362306a36Sopenharmony_ci	PINCTRL_PIN(55, "GPPC_A_13"),
10462306a36Sopenharmony_ci	PINCTRL_PIN(56, "GPPC_A_14"),
10562306a36Sopenharmony_ci	PINCTRL_PIN(57, "GPPC_A_15"),
10662306a36Sopenharmony_ci	PINCTRL_PIN(58, "GPPC_A_16"),
10762306a36Sopenharmony_ci	PINCTRL_PIN(59, "GPPC_A_17"),
10862306a36Sopenharmony_ci	PINCTRL_PIN(60, "GPPC_A_18"),
10962306a36Sopenharmony_ci	PINCTRL_PIN(61, "GPPC_A_19"),
11062306a36Sopenharmony_ci	PINCTRL_PIN(62, "GPPC_A_20"),
11162306a36Sopenharmony_ci	PINCTRL_PIN(63, "GPPC_A_21"),
11262306a36Sopenharmony_ci	PINCTRL_PIN(64, "GPPC_A_22"),
11362306a36Sopenharmony_ci	PINCTRL_PIN(65, "ESPI_CS1B"),
11462306a36Sopenharmony_ci	PINCTRL_PIN(66, "ESPI_CLK_LOOPBK"),
11562306a36Sopenharmony_ci	/* GPP_S */
11662306a36Sopenharmony_ci	PINCTRL_PIN(67, "GPP_S_0"),
11762306a36Sopenharmony_ci	PINCTRL_PIN(68, "GPP_S_1"),
11862306a36Sopenharmony_ci	PINCTRL_PIN(69, "GPP_S_2"),
11962306a36Sopenharmony_ci	PINCTRL_PIN(70, "GPP_S_3"),
12062306a36Sopenharmony_ci	PINCTRL_PIN(71, "GPP_S_4"),
12162306a36Sopenharmony_ci	PINCTRL_PIN(72, "GPP_S_5"),
12262306a36Sopenharmony_ci	PINCTRL_PIN(73, "GPP_S_6"),
12362306a36Sopenharmony_ci	PINCTRL_PIN(74, "GPP_S_7"),
12462306a36Sopenharmony_ci	/* GPP_I */
12562306a36Sopenharmony_ci	PINCTRL_PIN(75, "GPP_F_0_CNV_BRI_DT_UART0_RTSB"),
12662306a36Sopenharmony_ci	PINCTRL_PIN(76, "GPP_F_1_CNV_BRI_RSP_UART0_RXD"),
12762306a36Sopenharmony_ci	PINCTRL_PIN(77, "GPP_F_2_CNV_RGI_DT_UART0_TXD"),
12862306a36Sopenharmony_ci	PINCTRL_PIN(78, "GPP_F_3_CNV_RGI_RSP_UART0_CTSB"),
12962306a36Sopenharmony_ci	PINCTRL_PIN(79, "GPP_F_4_CNV_RF_RESET_B"),
13062306a36Sopenharmony_ci	PINCTRL_PIN(80, "GPP_F_5_MODEM_CLKREQ"),
13162306a36Sopenharmony_ci	PINCTRL_PIN(81, "GPP_F_6_CNV_PA_BLANKING"),
13262306a36Sopenharmony_ci	PINCTRL_PIN(82, "GPP_F_7_EMMC_CMD"),
13362306a36Sopenharmony_ci	PINCTRL_PIN(83, "GPP_F_8_EMMC_DATA0"),
13462306a36Sopenharmony_ci	PINCTRL_PIN(84, "GPP_F_9_EMMC_DATA1"),
13562306a36Sopenharmony_ci	PINCTRL_PIN(85, "GPP_F_10_EMMC_DATA2"),
13662306a36Sopenharmony_ci	PINCTRL_PIN(86, "GPP_F_11_EMMC_DATA3"),
13762306a36Sopenharmony_ci	PINCTRL_PIN(87, "GPP_F_12_EMMC_DATA4"),
13862306a36Sopenharmony_ci	PINCTRL_PIN(88, "GPP_F_13_EMMC_DATA5"),
13962306a36Sopenharmony_ci	PINCTRL_PIN(89, "GPP_F_14_EMMC_DATA6"),
14062306a36Sopenharmony_ci	PINCTRL_PIN(90, "GPP_F_15_EMMC_DATA7"),
14162306a36Sopenharmony_ci	PINCTRL_PIN(91, "GPP_F_16_EMMC_RCLK"),
14262306a36Sopenharmony_ci	PINCTRL_PIN(92, "GPP_F_17_EMMC_CLK"),
14362306a36Sopenharmony_ci	PINCTRL_PIN(93, "GPP_F_18_EMMC_RESETB"),
14462306a36Sopenharmony_ci	PINCTRL_PIN(94, "GPP_F_19_A4WP_PRESENT"),
14562306a36Sopenharmony_ci	/* GPP_H */
14662306a36Sopenharmony_ci	PINCTRL_PIN(95, "GPPC_H_0"),
14762306a36Sopenharmony_ci	PINCTRL_PIN(96, "GPPC_H_1"),
14862306a36Sopenharmony_ci	PINCTRL_PIN(97, "GPPC_H_2"),
14962306a36Sopenharmony_ci	PINCTRL_PIN(98, "GPPC_H_3"),
15062306a36Sopenharmony_ci	PINCTRL_PIN(99, "GPPC_H_4"),
15162306a36Sopenharmony_ci	PINCTRL_PIN(100, "GPPC_H_5"),
15262306a36Sopenharmony_ci	PINCTRL_PIN(101, "GPPC_H_6"),
15362306a36Sopenharmony_ci	PINCTRL_PIN(102, "GPPC_H_7"),
15462306a36Sopenharmony_ci	PINCTRL_PIN(103, "GPPC_H_8"),
15562306a36Sopenharmony_ci	PINCTRL_PIN(104, "GPPC_H_9"),
15662306a36Sopenharmony_ci	PINCTRL_PIN(105, "GPPC_H_10"),
15762306a36Sopenharmony_ci	PINCTRL_PIN(106, "GPPC_H_11"),
15862306a36Sopenharmony_ci	PINCTRL_PIN(107, "I2C7_SDA"),
15962306a36Sopenharmony_ci	PINCTRL_PIN(108, "I2C7_SCL"),
16062306a36Sopenharmony_ci	PINCTRL_PIN(109, "GPPC_H_14"),
16162306a36Sopenharmony_ci	PINCTRL_PIN(110, "GPPC_H_15"),
16262306a36Sopenharmony_ci	PINCTRL_PIN(111, "GPPC_H_16"),
16362306a36Sopenharmony_ci	PINCTRL_PIN(112, "GPPC_H_17"),
16462306a36Sopenharmony_ci	PINCTRL_PIN(113, "CPU_C10_GATEB"),
16562306a36Sopenharmony_ci	PINCTRL_PIN(114, "GPPC_H_19"),
16662306a36Sopenharmony_ci	PINCTRL_PIN(115, "GPPC_H_20"),
16762306a36Sopenharmony_ci	PINCTRL_PIN(116, "GPPC_H_21"),
16862306a36Sopenharmony_ci	PINCTRL_PIN(117, "GPPC_H_22"),
16962306a36Sopenharmony_ci	PINCTRL_PIN(118, "GPPC_H_23"),
17062306a36Sopenharmony_ci	/* GPP_D */
17162306a36Sopenharmony_ci	PINCTRL_PIN(119, "GPPC_D_0"),
17262306a36Sopenharmony_ci	PINCTRL_PIN(120, "GPPC_D_1"),
17362306a36Sopenharmony_ci	PINCTRL_PIN(121, "GPPC_D_2"),
17462306a36Sopenharmony_ci	PINCTRL_PIN(122, "GPPC_D_3"),
17562306a36Sopenharmony_ci	PINCTRL_PIN(123, "GPPC_D_4"),
17662306a36Sopenharmony_ci	PINCTRL_PIN(124, "GPPC_D_5"),
17762306a36Sopenharmony_ci	PINCTRL_PIN(125, "GPPC_D_6"),
17862306a36Sopenharmony_ci	PINCTRL_PIN(126, "GPPC_D_7"),
17962306a36Sopenharmony_ci	PINCTRL_PIN(127, "GPPC_D_8"),
18062306a36Sopenharmony_ci	PINCTRL_PIN(128, "BSSB_LS2_RX"),
18162306a36Sopenharmony_ci	PINCTRL_PIN(129, "BSSB_LS2_TX"),
18262306a36Sopenharmony_ci	PINCTRL_PIN(130, "BSSB_LS3_RX"),
18362306a36Sopenharmony_ci	PINCTRL_PIN(131, "BSSB_LS3_TX"),
18462306a36Sopenharmony_ci	PINCTRL_PIN(132, "GPPC_D_13"),
18562306a36Sopenharmony_ci	PINCTRL_PIN(133, "GPPC_D_14"),
18662306a36Sopenharmony_ci	PINCTRL_PIN(134, "GPPC_D_15"),
18762306a36Sopenharmony_ci	PINCTRL_PIN(135, "GPPC_D_16"),
18862306a36Sopenharmony_ci	PINCTRL_PIN(136, "GPPC_D_17"),
18962306a36Sopenharmony_ci	PINCTRL_PIN(137, "GPPC_D_18"),
19062306a36Sopenharmony_ci	PINCTRL_PIN(138, "GPPC_D_19"),
19162306a36Sopenharmony_ci	PINCTRL_PIN(139, "GSPI2_CLK_LOOPBK"),
19262306a36Sopenharmony_ci	/* vGPIO */
19362306a36Sopenharmony_ci	PINCTRL_PIN(140, "CNV_BTEN"),
19462306a36Sopenharmony_ci	PINCTRL_PIN(141, "CNV_BT_HOST_WAKEB"),
19562306a36Sopenharmony_ci	PINCTRL_PIN(142, "CNV_BT_IF_SELECT"),
19662306a36Sopenharmony_ci	PINCTRL_PIN(143, "vCNV_BT_UART_TXD"),
19762306a36Sopenharmony_ci	PINCTRL_PIN(144, "vCNV_BT_UART_RXD"),
19862306a36Sopenharmony_ci	PINCTRL_PIN(145, "vCNV_BT_UART_CTS_B"),
19962306a36Sopenharmony_ci	PINCTRL_PIN(146, "vCNV_BT_UART_RTS_B"),
20062306a36Sopenharmony_ci	PINCTRL_PIN(147, "vCNV_MFUART1_TXD"),
20162306a36Sopenharmony_ci	PINCTRL_PIN(148, "vCNV_MFUART1_RXD"),
20262306a36Sopenharmony_ci	PINCTRL_PIN(149, "vCNV_MFUART1_CTS_B"),
20362306a36Sopenharmony_ci	PINCTRL_PIN(150, "vCNV_MFUART1_RTS_B"),
20462306a36Sopenharmony_ci	PINCTRL_PIN(151, "vUART0_TXD"),
20562306a36Sopenharmony_ci	PINCTRL_PIN(152, "vUART0_RXD"),
20662306a36Sopenharmony_ci	PINCTRL_PIN(153, "vUART0_CTS_B"),
20762306a36Sopenharmony_ci	PINCTRL_PIN(154, "vUART0_RTS_B"),
20862306a36Sopenharmony_ci	PINCTRL_PIN(155, "vISH_UART0_TXD"),
20962306a36Sopenharmony_ci	PINCTRL_PIN(156, "vISH_UART0_RXD"),
21062306a36Sopenharmony_ci	PINCTRL_PIN(157, "vISH_UART0_CTS_B"),
21162306a36Sopenharmony_ci	PINCTRL_PIN(158, "vISH_UART0_RTS_B"),
21262306a36Sopenharmony_ci	PINCTRL_PIN(159, "vCNV_BT_I2S_BCLK"),
21362306a36Sopenharmony_ci	PINCTRL_PIN(160, "vCNV_BT_I2S_WS_SYNC"),
21462306a36Sopenharmony_ci	PINCTRL_PIN(161, "vCNV_BT_I2S_SDO"),
21562306a36Sopenharmony_ci	PINCTRL_PIN(162, "vCNV_BT_I2S_SDI"),
21662306a36Sopenharmony_ci	PINCTRL_PIN(163, "vI2S2_SCLK"),
21762306a36Sopenharmony_ci	PINCTRL_PIN(164, "vI2S2_SFRM"),
21862306a36Sopenharmony_ci	PINCTRL_PIN(165, "vI2S2_TXD"),
21962306a36Sopenharmony_ci	PINCTRL_PIN(166, "vI2S2_RXD"),
22062306a36Sopenharmony_ci	PINCTRL_PIN(167, "THC0_WOT_INT"),
22162306a36Sopenharmony_ci	PINCTRL_PIN(168, "THC1_WOT_INT"),
22262306a36Sopenharmony_ci	/* GPP_C */
22362306a36Sopenharmony_ci	PINCTRL_PIN(169, "SMBCLK"),
22462306a36Sopenharmony_ci	PINCTRL_PIN(170, "SMBDATA"),
22562306a36Sopenharmony_ci	PINCTRL_PIN(171, "SMBALERTB"),
22662306a36Sopenharmony_ci	PINCTRL_PIN(172, "SML0CLK"),
22762306a36Sopenharmony_ci	PINCTRL_PIN(173, "SML0DATA"),
22862306a36Sopenharmony_ci	PINCTRL_PIN(174, "GPPC_C_5"),
22962306a36Sopenharmony_ci	PINCTRL_PIN(175, "GPPC_C_6"),
23062306a36Sopenharmony_ci	PINCTRL_PIN(176, "GPPC_C_7"),
23162306a36Sopenharmony_ci	PINCTRL_PIN(177, "GPPC_C_8"),
23262306a36Sopenharmony_ci	PINCTRL_PIN(178, "GPPC_C_9"),
23362306a36Sopenharmony_ci	PINCTRL_PIN(179, "GPPC_C_10"),
23462306a36Sopenharmony_ci	PINCTRL_PIN(180, "GPPC_C_11"),
23562306a36Sopenharmony_ci	PINCTRL_PIN(181, "GPPC_C_12"),
23662306a36Sopenharmony_ci	PINCTRL_PIN(182, "GPPC_C_13"),
23762306a36Sopenharmony_ci	PINCTRL_PIN(183, "GPPC_C_14"),
23862306a36Sopenharmony_ci	PINCTRL_PIN(184, "GPPC_C_15"),
23962306a36Sopenharmony_ci	PINCTRL_PIN(185, "GPPC_C_16"),
24062306a36Sopenharmony_ci	PINCTRL_PIN(186, "GPPC_C_17"),
24162306a36Sopenharmony_ci	PINCTRL_PIN(187, "GPPC_C_18"),
24262306a36Sopenharmony_ci	PINCTRL_PIN(188, "GPPC_C_19"),
24362306a36Sopenharmony_ci	PINCTRL_PIN(189, "GPPC_C_20"),
24462306a36Sopenharmony_ci	PINCTRL_PIN(190, "GPPC_C_21"),
24562306a36Sopenharmony_ci	PINCTRL_PIN(191, "GPPC_C_22"),
24662306a36Sopenharmony_ci	PINCTRL_PIN(192, "GPPC_C_23"),
24762306a36Sopenharmony_ci	/* GPP_F */
24862306a36Sopenharmony_ci	PINCTRL_PIN(193, "CNV_BRI_DT"),
24962306a36Sopenharmony_ci	PINCTRL_PIN(194, "CNV_BRI_RSP"),
25062306a36Sopenharmony_ci	PINCTRL_PIN(195, "CNV_RGI_DT"),
25162306a36Sopenharmony_ci	PINCTRL_PIN(196, "CNV_RGI_RSP"),
25262306a36Sopenharmony_ci	PINCTRL_PIN(197, "CNV_RF_RESET_B"),
25362306a36Sopenharmony_ci	PINCTRL_PIN(198, "MODEM_CLKREQ"),
25462306a36Sopenharmony_ci	PINCTRL_PIN(199, "GPPC_F_6"),
25562306a36Sopenharmony_ci	PINCTRL_PIN(200, "GPPC_F_7"),
25662306a36Sopenharmony_ci	PINCTRL_PIN(201, "GPPC_F_8"),
25762306a36Sopenharmony_ci	PINCTRL_PIN(202, "BOOTMPC"),
25862306a36Sopenharmony_ci	PINCTRL_PIN(203, "GPPC_F_10"),
25962306a36Sopenharmony_ci	PINCTRL_PIN(204, "GPPC_F_11"),
26062306a36Sopenharmony_ci	PINCTRL_PIN(205, "GPPC_F_12"),
26162306a36Sopenharmony_ci	PINCTRL_PIN(206, "GPPC_F_13"),
26262306a36Sopenharmony_ci	PINCTRL_PIN(207, "GPPC_F_14"),
26362306a36Sopenharmony_ci	PINCTRL_PIN(208, "GPPC_F_15"),
26462306a36Sopenharmony_ci	PINCTRL_PIN(209, "GPPC_F_16"),
26562306a36Sopenharmony_ci	PINCTRL_PIN(210, "GPPC_F_17"),
26662306a36Sopenharmony_ci	PINCTRL_PIN(211, "GPPC_F_18"),
26762306a36Sopenharmony_ci	PINCTRL_PIN(212, "GPPC_F_19"),
26862306a36Sopenharmony_ci	PINCTRL_PIN(213, "EXT_PWR_GATEB"),
26962306a36Sopenharmony_ci	PINCTRL_PIN(214, "EXT_PWR_GATE2B"),
27062306a36Sopenharmony_ci	PINCTRL_PIN(215, "GPPC_F_22"),
27162306a36Sopenharmony_ci	PINCTRL_PIN(216, "GPPC_F_23"),
27262306a36Sopenharmony_ci	PINCTRL_PIN(217, "GPPF_CLK_LOOPBACK"),
27362306a36Sopenharmony_ci	/* HVCMOS */
27462306a36Sopenharmony_ci	PINCTRL_PIN(218, "L_BKLTEN"),
27562306a36Sopenharmony_ci	PINCTRL_PIN(219, "L_BKLTCTL"),
27662306a36Sopenharmony_ci	PINCTRL_PIN(220, "L_VDDEN"),
27762306a36Sopenharmony_ci	PINCTRL_PIN(221, "SYS_PWROK"),
27862306a36Sopenharmony_ci	PINCTRL_PIN(222, "SYS_RESETB"),
27962306a36Sopenharmony_ci	PINCTRL_PIN(223, "MLK_RSTB"),
28062306a36Sopenharmony_ci	/* GPP_E */
28162306a36Sopenharmony_ci	PINCTRL_PIN(224, "GPPC_E_0"),
28262306a36Sopenharmony_ci	PINCTRL_PIN(225, "GPPC_E_1"),
28362306a36Sopenharmony_ci	PINCTRL_PIN(226, "GPPC_E_2"),
28462306a36Sopenharmony_ci	PINCTRL_PIN(227, "GPPC_E_3"),
28562306a36Sopenharmony_ci	PINCTRL_PIN(228, "GPPC_E_4"),
28662306a36Sopenharmony_ci	PINCTRL_PIN(229, "GPPC_E_5"),
28762306a36Sopenharmony_ci	PINCTRL_PIN(230, "GPPC_E_6"),
28862306a36Sopenharmony_ci	PINCTRL_PIN(231, "GPPC_E_7"),
28962306a36Sopenharmony_ci	PINCTRL_PIN(232, "GPPC_E_8"),
29062306a36Sopenharmony_ci	PINCTRL_PIN(233, "GPPC_E_9"),
29162306a36Sopenharmony_ci	PINCTRL_PIN(234, "GPPC_E_10"),
29262306a36Sopenharmony_ci	PINCTRL_PIN(235, "GPPC_E_11"),
29362306a36Sopenharmony_ci	PINCTRL_PIN(236, "GPPC_E_12"),
29462306a36Sopenharmony_ci	PINCTRL_PIN(237, "GPPC_E_13"),
29562306a36Sopenharmony_ci	PINCTRL_PIN(238, "GPPC_E_14"),
29662306a36Sopenharmony_ci	PINCTRL_PIN(239, "FIVR_DIGPB_0"),
29762306a36Sopenharmony_ci	PINCTRL_PIN(240, "FIVR_DIGPB_1"),
29862306a36Sopenharmony_ci	PINCTRL_PIN(241, "GPPC_E_17"),
29962306a36Sopenharmony_ci	PINCTRL_PIN(242, "BSSB_LS0_RX"),
30062306a36Sopenharmony_ci	PINCTRL_PIN(243, "BSSB_LS0_TX"),
30162306a36Sopenharmony_ci	PINCTRL_PIN(244, "BSSB_LS1_RX"),
30262306a36Sopenharmony_ci	PINCTRL_PIN(245, "BSSB_LS1_TX"),
30362306a36Sopenharmony_ci	PINCTRL_PIN(246, "DNX_FORCE_RELOAD"),
30462306a36Sopenharmony_ci	PINCTRL_PIN(247, "GPPC_E_23"),
30562306a36Sopenharmony_ci	PINCTRL_PIN(248, "GPPE_CLK_LOOPBACK"),
30662306a36Sopenharmony_ci	/* GPP_R */
30762306a36Sopenharmony_ci	PINCTRL_PIN(249, "HDA_BCLK"),
30862306a36Sopenharmony_ci	PINCTRL_PIN(250, "HDA_SYNC"),
30962306a36Sopenharmony_ci	PINCTRL_PIN(251, "HDA_SDO"),
31062306a36Sopenharmony_ci	PINCTRL_PIN(252, "HDA_SDI_0"),
31162306a36Sopenharmony_ci	PINCTRL_PIN(253, "HDA_RSTB"),
31262306a36Sopenharmony_ci	PINCTRL_PIN(254, "GPP_R_5"),
31362306a36Sopenharmony_ci	PINCTRL_PIN(255, "GPP_R_6"),
31462306a36Sopenharmony_ci	PINCTRL_PIN(256, "GPP_R_7"),
31562306a36Sopenharmony_ci};
31662306a36Sopenharmony_ci
31762306a36Sopenharmony_cistatic const struct intel_padgroup adln_community0_gpps[] = {
31862306a36Sopenharmony_ci	ADL_GPP(0, 0, 25, 0),				/* GPP_B */
31962306a36Sopenharmony_ci	ADL_GPP(1, 26, 41, 32),				/* GPP_T */
32062306a36Sopenharmony_ci	ADL_GPP(2, 42, 66, 64),				/* GPP_A */
32162306a36Sopenharmony_ci};
32262306a36Sopenharmony_ci
32362306a36Sopenharmony_cistatic const struct intel_padgroup adln_community1_gpps[] = {
32462306a36Sopenharmony_ci	ADL_GPP(0, 67, 74, 96),				/* GPP_S */
32562306a36Sopenharmony_ci	ADL_GPP(1, 75, 94, 128),			/* GPP_I */
32662306a36Sopenharmony_ci	ADL_GPP(2, 95, 118, 160),			/* GPP_H */
32762306a36Sopenharmony_ci	ADL_GPP(3, 119, 139, 192),			/* GPP_D */
32862306a36Sopenharmony_ci	ADL_GPP(4, 140, 168, 224),			/* vGPIO */
32962306a36Sopenharmony_ci};
33062306a36Sopenharmony_ci
33162306a36Sopenharmony_cistatic const struct intel_padgroup adln_community4_gpps[] = {
33262306a36Sopenharmony_ci	ADL_GPP(0, 169, 192, 256),			/* GPP_C */
33362306a36Sopenharmony_ci	ADL_GPP(1, 193, 217, 288),			/* GPP_F */
33462306a36Sopenharmony_ci	ADL_GPP(2, 218, 223, INTEL_GPIO_BASE_NOMAP),	/* HVCMOS */
33562306a36Sopenharmony_ci	ADL_GPP(3, 224, 248, 320),			/* GPP_E */
33662306a36Sopenharmony_ci};
33762306a36Sopenharmony_ci
33862306a36Sopenharmony_cistatic const struct intel_padgroup adln_community5_gpps[] = {
33962306a36Sopenharmony_ci	ADL_GPP(0, 249, 256, 352),			/* GPP_R */
34062306a36Sopenharmony_ci};
34162306a36Sopenharmony_ci
34262306a36Sopenharmony_cistatic const struct intel_community adln_communities[] = {
34362306a36Sopenharmony_ci	ADL_N_COMMUNITY(0, 0, 66, adln_community0_gpps),
34462306a36Sopenharmony_ci	ADL_N_COMMUNITY(1, 67, 168, adln_community1_gpps),
34562306a36Sopenharmony_ci	ADL_N_COMMUNITY(2, 169, 248, adln_community4_gpps),
34662306a36Sopenharmony_ci	ADL_N_COMMUNITY(3, 249, 256, adln_community5_gpps),
34762306a36Sopenharmony_ci};
34862306a36Sopenharmony_ci
34962306a36Sopenharmony_cistatic const struct intel_pinctrl_soc_data adln_soc_data = {
35062306a36Sopenharmony_ci	.pins = adln_pins,
35162306a36Sopenharmony_ci	.npins = ARRAY_SIZE(adln_pins),
35262306a36Sopenharmony_ci	.communities = adln_communities,
35362306a36Sopenharmony_ci	.ncommunities = ARRAY_SIZE(adln_communities),
35462306a36Sopenharmony_ci};
35562306a36Sopenharmony_ci
35662306a36Sopenharmony_ci/* Alder Lake-S */
35762306a36Sopenharmony_cistatic const struct pinctrl_pin_desc adls_pins[] = {
35862306a36Sopenharmony_ci	/* GPP_I */
35962306a36Sopenharmony_ci	PINCTRL_PIN(0, "EXT_PWR_GATEB"),
36062306a36Sopenharmony_ci	PINCTRL_PIN(1, "DDSP_HPD_1"),
36162306a36Sopenharmony_ci	PINCTRL_PIN(2, "DDSP_HPD_2"),
36262306a36Sopenharmony_ci	PINCTRL_PIN(3, "DDSP_HPD_3"),
36362306a36Sopenharmony_ci	PINCTRL_PIN(4, "DDSP_HPD_4"),
36462306a36Sopenharmony_ci	PINCTRL_PIN(5, "DDPB_CTRLCLK"),
36562306a36Sopenharmony_ci	PINCTRL_PIN(6, "DDPB_CTRLDATA"),
36662306a36Sopenharmony_ci	PINCTRL_PIN(7, "DDPC_CTRLCLK"),
36762306a36Sopenharmony_ci	PINCTRL_PIN(8, "DDPC_CTRLDATA"),
36862306a36Sopenharmony_ci	PINCTRL_PIN(9, "GSPI0_CS1B"),
36962306a36Sopenharmony_ci	PINCTRL_PIN(10, "GSPI1_CS1B"),
37062306a36Sopenharmony_ci	PINCTRL_PIN(11, "USB2_OCB_4"),
37162306a36Sopenharmony_ci	PINCTRL_PIN(12, "USB2_OCB_5"),
37262306a36Sopenharmony_ci	PINCTRL_PIN(13, "USB2_OCB_6"),
37362306a36Sopenharmony_ci	PINCTRL_PIN(14, "USB2_OCB_7"),
37462306a36Sopenharmony_ci	PINCTRL_PIN(15, "GSPI0_CS0B"),
37562306a36Sopenharmony_ci	PINCTRL_PIN(16, "GSPI0_CLK"),
37662306a36Sopenharmony_ci	PINCTRL_PIN(17, "GSPI0_MISO"),
37762306a36Sopenharmony_ci	PINCTRL_PIN(18, "GSPI0_MOSI"),
37862306a36Sopenharmony_ci	PINCTRL_PIN(19, "GSPI1_CS0B"),
37962306a36Sopenharmony_ci	PINCTRL_PIN(20, "GSPI1_CLK"),
38062306a36Sopenharmony_ci	PINCTRL_PIN(21, "GSPI1_MISO"),
38162306a36Sopenharmony_ci	PINCTRL_PIN(22, "GSPI1_MOSI"),
38262306a36Sopenharmony_ci	PINCTRL_PIN(23, "GSPI0_CLK_LOOPBK"),
38362306a36Sopenharmony_ci	PINCTRL_PIN(24, "GSPI1_CLK_LOOPBK"),
38462306a36Sopenharmony_ci	/* GPP_R */
38562306a36Sopenharmony_ci	PINCTRL_PIN(25, "HDA_BCLK"),
38662306a36Sopenharmony_ci	PINCTRL_PIN(26, "HDA_SYNC"),
38762306a36Sopenharmony_ci	PINCTRL_PIN(27, "HDA_SDO"),
38862306a36Sopenharmony_ci	PINCTRL_PIN(28, "HDA_SDI_0"),
38962306a36Sopenharmony_ci	PINCTRL_PIN(29, "HDA_RSTB"),
39062306a36Sopenharmony_ci	PINCTRL_PIN(30, "HDA_SDI_1"),
39162306a36Sopenharmony_ci	PINCTRL_PIN(31, "GPP_R_6"),
39262306a36Sopenharmony_ci	PINCTRL_PIN(32, "GPP_R_7"),
39362306a36Sopenharmony_ci	PINCTRL_PIN(33, "GPP_R_8"),
39462306a36Sopenharmony_ci	PINCTRL_PIN(34, "DDSP_HPD_A"),
39562306a36Sopenharmony_ci	PINCTRL_PIN(35, "DDSP_HPD_B"),
39662306a36Sopenharmony_ci	PINCTRL_PIN(36, "DDSP_HPD_C"),
39762306a36Sopenharmony_ci	PINCTRL_PIN(37, "ISH_SPI_CSB"),
39862306a36Sopenharmony_ci	PINCTRL_PIN(38, "ISH_SPI_CLK"),
39962306a36Sopenharmony_ci	PINCTRL_PIN(39, "ISH_SPI_MISO"),
40062306a36Sopenharmony_ci	PINCTRL_PIN(40, "ISH_SPI_MOSI"),
40162306a36Sopenharmony_ci	PINCTRL_PIN(41, "DDP1_CTRLCLK"),
40262306a36Sopenharmony_ci	PINCTRL_PIN(42, "DDP1_CTRLDATA"),
40362306a36Sopenharmony_ci	PINCTRL_PIN(43, "DDP2_CTRLCLK"),
40462306a36Sopenharmony_ci	PINCTRL_PIN(44, "DDP2_CTRLDATA"),
40562306a36Sopenharmony_ci	PINCTRL_PIN(45, "DDPA_CTRLCLK"),
40662306a36Sopenharmony_ci	PINCTRL_PIN(46, "DDPA_CTRLDATA"),
40762306a36Sopenharmony_ci	PINCTRL_PIN(47, "GSPI2_CLK_LOOPBK"),
40862306a36Sopenharmony_ci	/* GPP_J */
40962306a36Sopenharmony_ci	PINCTRL_PIN(48, "CNV_PA_BLANKING"),
41062306a36Sopenharmony_ci	PINCTRL_PIN(49, "CPU_C10_GATEB"),
41162306a36Sopenharmony_ci	PINCTRL_PIN(50, "CNV_BRI_DT"),
41262306a36Sopenharmony_ci	PINCTRL_PIN(51, "CNV_BRI_RSP"),
41362306a36Sopenharmony_ci	PINCTRL_PIN(52, "CNV_RGI_DT"),
41462306a36Sopenharmony_ci	PINCTRL_PIN(53, "CNV_RGI_RSP"),
41562306a36Sopenharmony_ci	PINCTRL_PIN(54, "CNV_MFUART2_RXD"),
41662306a36Sopenharmony_ci	PINCTRL_PIN(55, "CNV_MFUART2_TXD"),
41762306a36Sopenharmony_ci	PINCTRL_PIN(56, "SRCCLKREQB_16"),
41862306a36Sopenharmony_ci	PINCTRL_PIN(57, "SRCCLKREQB_17"),
41962306a36Sopenharmony_ci	PINCTRL_PIN(58, "BSSB_LS_RX"),
42062306a36Sopenharmony_ci	PINCTRL_PIN(59, "BSSB_LS_TX"),
42162306a36Sopenharmony_ci	/* vGPIO */
42262306a36Sopenharmony_ci	PINCTRL_PIN(60, "CNV_BTEN"),
42362306a36Sopenharmony_ci	PINCTRL_PIN(61, "CNV_BT_HOST_WAKEB"),
42462306a36Sopenharmony_ci	PINCTRL_PIN(62, "CNV_BT_IF_SELECT"),
42562306a36Sopenharmony_ci	PINCTRL_PIN(63, "vCNV_BT_UART_TXD"),
42662306a36Sopenharmony_ci	PINCTRL_PIN(64, "vCNV_BT_UART_RXD"),
42762306a36Sopenharmony_ci	PINCTRL_PIN(65, "vCNV_BT_UART_CTS_B"),
42862306a36Sopenharmony_ci	PINCTRL_PIN(66, "vCNV_BT_UART_RTS_B"),
42962306a36Sopenharmony_ci	PINCTRL_PIN(67, "vCNV_MFUART1_TXD"),
43062306a36Sopenharmony_ci	PINCTRL_PIN(68, "vCNV_MFUART1_RXD"),
43162306a36Sopenharmony_ci	PINCTRL_PIN(69, "vCNV_MFUART1_CTS_B"),
43262306a36Sopenharmony_ci	PINCTRL_PIN(70, "vCNV_MFUART1_RTS_B"),
43362306a36Sopenharmony_ci	PINCTRL_PIN(71, "vUART0_TXD"),
43462306a36Sopenharmony_ci	PINCTRL_PIN(72, "vUART0_RXD"),
43562306a36Sopenharmony_ci	PINCTRL_PIN(73, "vUART0_CTS_B"),
43662306a36Sopenharmony_ci	PINCTRL_PIN(74, "vUART0_RTS_B"),
43762306a36Sopenharmony_ci	PINCTRL_PIN(75, "vISH_UART0_TXD"),
43862306a36Sopenharmony_ci	PINCTRL_PIN(76, "vISH_UART0_RXD"),
43962306a36Sopenharmony_ci	PINCTRL_PIN(77, "vISH_UART0_CTS_B"),
44062306a36Sopenharmony_ci	PINCTRL_PIN(78, "vISH_UART0_RTS_B"),
44162306a36Sopenharmony_ci	PINCTRL_PIN(79, "vCNV_BT_I2S_BCLK"),
44262306a36Sopenharmony_ci	PINCTRL_PIN(80, "vCNV_BT_I2S_WS_SYNC"),
44362306a36Sopenharmony_ci	PINCTRL_PIN(81, "vCNV_BT_I2S_SDO"),
44462306a36Sopenharmony_ci	PINCTRL_PIN(82, "vCNV_BT_I2S_SDI"),
44562306a36Sopenharmony_ci	PINCTRL_PIN(83, "vI2S2_SCLK"),
44662306a36Sopenharmony_ci	PINCTRL_PIN(84, "vI2S2_SFRM"),
44762306a36Sopenharmony_ci	PINCTRL_PIN(85, "vI2S2_TXD"),
44862306a36Sopenharmony_ci	PINCTRL_PIN(86, "vI2S2_RXD"),
44962306a36Sopenharmony_ci	/* vGPIO_0 */
45062306a36Sopenharmony_ci	PINCTRL_PIN(87, "ESPI_USB_OCB_0"),
45162306a36Sopenharmony_ci	PINCTRL_PIN(88, "ESPI_USB_OCB_1"),
45262306a36Sopenharmony_ci	PINCTRL_PIN(89, "ESPI_USB_OCB_2"),
45362306a36Sopenharmony_ci	PINCTRL_PIN(90, "ESPI_USB_OCB_3"),
45462306a36Sopenharmony_ci	PINCTRL_PIN(91, "USB_CPU_OCB_0"),
45562306a36Sopenharmony_ci	PINCTRL_PIN(92, "USB_CPU_OCB_1"),
45662306a36Sopenharmony_ci	PINCTRL_PIN(93, "USB_CPU_OCB_2"),
45762306a36Sopenharmony_ci	PINCTRL_PIN(94, "USB_CPU_OCB_3"),
45862306a36Sopenharmony_ci	/* GPP_B */
45962306a36Sopenharmony_ci	PINCTRL_PIN(95, "PCIE_LNK_DOWN"),
46062306a36Sopenharmony_ci	PINCTRL_PIN(96, "ISH_UART0_RTSB"),
46162306a36Sopenharmony_ci	PINCTRL_PIN(97, "VRALERTB"),
46262306a36Sopenharmony_ci	PINCTRL_PIN(98, "CPU_GP_2"),
46362306a36Sopenharmony_ci	PINCTRL_PIN(99, "CPU_GP_3"),
46462306a36Sopenharmony_ci	PINCTRL_PIN(100, "SX_EXIT_HOLDOFFB"),
46562306a36Sopenharmony_ci	PINCTRL_PIN(101, "CLKOUT_48"),
46662306a36Sopenharmony_ci	PINCTRL_PIN(102, "ISH_GP_7"),
46762306a36Sopenharmony_ci	PINCTRL_PIN(103, "ISH_GP_0"),
46862306a36Sopenharmony_ci	PINCTRL_PIN(104, "ISH_GP_1"),
46962306a36Sopenharmony_ci	PINCTRL_PIN(105, "ISH_GP_2"),
47062306a36Sopenharmony_ci	PINCTRL_PIN(106, "I2S_MCLK"),
47162306a36Sopenharmony_ci	PINCTRL_PIN(107, "SLP_S0B"),
47262306a36Sopenharmony_ci	PINCTRL_PIN(108, "PLTRSTB"),
47362306a36Sopenharmony_ci	PINCTRL_PIN(109, "SPKR"),
47462306a36Sopenharmony_ci	PINCTRL_PIN(110, "ISH_GP_3"),
47562306a36Sopenharmony_ci	PINCTRL_PIN(111, "ISH_GP_4"),
47662306a36Sopenharmony_ci	PINCTRL_PIN(112, "ISH_GP_5"),
47762306a36Sopenharmony_ci	PINCTRL_PIN(113, "PMCALERTB"),
47862306a36Sopenharmony_ci	PINCTRL_PIN(114, "FUSA_DIAGTEST_EN"),
47962306a36Sopenharmony_ci	PINCTRL_PIN(115, "FUSA_DIAGTEST_MODE"),
48062306a36Sopenharmony_ci	PINCTRL_PIN(116, "GPP_B_21"),
48162306a36Sopenharmony_ci	PINCTRL_PIN(117, "GPP_B_22"),
48262306a36Sopenharmony_ci	PINCTRL_PIN(118, "SML1ALERTB"),
48362306a36Sopenharmony_ci	/* GPP_G */
48462306a36Sopenharmony_ci	PINCTRL_PIN(119, "GPP_G_0"),
48562306a36Sopenharmony_ci	PINCTRL_PIN(120, "GPP_G_1"),
48662306a36Sopenharmony_ci	PINCTRL_PIN(121, "DNX_FORCE_RELOAD"),
48762306a36Sopenharmony_ci	PINCTRL_PIN(122, "GMII_MDC_0"),
48862306a36Sopenharmony_ci	PINCTRL_PIN(123, "GMII_MDIO_0"),
48962306a36Sopenharmony_ci	PINCTRL_PIN(124, "SLP_DRAMB"),
49062306a36Sopenharmony_ci	PINCTRL_PIN(125, "GPP_G_6"),
49162306a36Sopenharmony_ci	PINCTRL_PIN(126, "GPP_G_7"),
49262306a36Sopenharmony_ci	/* GPP_H */
49362306a36Sopenharmony_ci	PINCTRL_PIN(127, "SRCCLKREQB_18"),
49462306a36Sopenharmony_ci	PINCTRL_PIN(128, "GPP_H_1"),
49562306a36Sopenharmony_ci	PINCTRL_PIN(129, "SRCCLKREQB_8"),
49662306a36Sopenharmony_ci	PINCTRL_PIN(130, "SRCCLKREQB_9"),
49762306a36Sopenharmony_ci	PINCTRL_PIN(131, "SRCCLKREQB_10"),
49862306a36Sopenharmony_ci	PINCTRL_PIN(132, "SRCCLKREQB_11"),
49962306a36Sopenharmony_ci	PINCTRL_PIN(133, "SRCCLKREQB_12"),
50062306a36Sopenharmony_ci	PINCTRL_PIN(134, "SRCCLKREQB_13"),
50162306a36Sopenharmony_ci	PINCTRL_PIN(135, "SRCCLKREQB_14"),
50262306a36Sopenharmony_ci	PINCTRL_PIN(136, "SRCCLKREQB_15"),
50362306a36Sopenharmony_ci	PINCTRL_PIN(137, "SML2CLK"),
50462306a36Sopenharmony_ci	PINCTRL_PIN(138, "SML2DATA"),
50562306a36Sopenharmony_ci	PINCTRL_PIN(139, "SML2ALERTB"),
50662306a36Sopenharmony_ci	PINCTRL_PIN(140, "SML3CLK"),
50762306a36Sopenharmony_ci	PINCTRL_PIN(141, "SML3DATA"),
50862306a36Sopenharmony_ci	PINCTRL_PIN(142, "SML3ALERTB"),
50962306a36Sopenharmony_ci	PINCTRL_PIN(143, "SML4CLK"),
51062306a36Sopenharmony_ci	PINCTRL_PIN(144, "SML4DATA"),
51162306a36Sopenharmony_ci	PINCTRL_PIN(145, "SML4ALERTB"),
51262306a36Sopenharmony_ci	PINCTRL_PIN(146, "ISH_I2C0_SDA"),
51362306a36Sopenharmony_ci	PINCTRL_PIN(147, "ISH_I2C0_SCL"),
51462306a36Sopenharmony_ci	PINCTRL_PIN(148, "ISH_I2C1_SDA"),
51562306a36Sopenharmony_ci	PINCTRL_PIN(149, "ISH_I2C1_SCL"),
51662306a36Sopenharmony_ci	PINCTRL_PIN(150, "TIME_SYNC_0"),
51762306a36Sopenharmony_ci	/* SPI0 */
51862306a36Sopenharmony_ci	PINCTRL_PIN(151, "SPI0_IO_2"),
51962306a36Sopenharmony_ci	PINCTRL_PIN(152, "SPI0_IO_3"),
52062306a36Sopenharmony_ci	PINCTRL_PIN(153, "SPI0_MOSI_IO_0"),
52162306a36Sopenharmony_ci	PINCTRL_PIN(154, "SPI0_MISO_IO_1"),
52262306a36Sopenharmony_ci	PINCTRL_PIN(155, "SPI0_TPM_CSB"),
52362306a36Sopenharmony_ci	PINCTRL_PIN(156, "SPI0_FLASH_0_CSB"),
52462306a36Sopenharmony_ci	PINCTRL_PIN(157, "SPI0_FLASH_1_CSB"),
52562306a36Sopenharmony_ci	PINCTRL_PIN(158, "SPI0_CLK"),
52662306a36Sopenharmony_ci	PINCTRL_PIN(159, "SPI0_CLK_LOOPBK"),
52762306a36Sopenharmony_ci	/* GPP_A */
52862306a36Sopenharmony_ci	PINCTRL_PIN(160, "ESPI_IO_0"),
52962306a36Sopenharmony_ci	PINCTRL_PIN(161, "ESPI_IO_1"),
53062306a36Sopenharmony_ci	PINCTRL_PIN(162, "ESPI_IO_2"),
53162306a36Sopenharmony_ci	PINCTRL_PIN(163, "ESPI_IO_3"),
53262306a36Sopenharmony_ci	PINCTRL_PIN(164, "ESPI_CS0B"),
53362306a36Sopenharmony_ci	PINCTRL_PIN(165, "ESPI_CLK"),
53462306a36Sopenharmony_ci	PINCTRL_PIN(166, "ESPI_RESETB"),
53562306a36Sopenharmony_ci	PINCTRL_PIN(167, "ESPI_CS1B"),
53662306a36Sopenharmony_ci	PINCTRL_PIN(168, "ESPI_CS2B"),
53762306a36Sopenharmony_ci	PINCTRL_PIN(169, "ESPI_CS3B"),
53862306a36Sopenharmony_ci	PINCTRL_PIN(170, "ESPI_ALERT0B"),
53962306a36Sopenharmony_ci	PINCTRL_PIN(171, "ESPI_ALERT1B"),
54062306a36Sopenharmony_ci	PINCTRL_PIN(172, "ESPI_ALERT2B"),
54162306a36Sopenharmony_ci	PINCTRL_PIN(173, "ESPI_ALERT3B"),
54262306a36Sopenharmony_ci	PINCTRL_PIN(174, "GPP_A_14"),
54362306a36Sopenharmony_ci	PINCTRL_PIN(175, "ESPI_CLK_LOOPBK"),
54462306a36Sopenharmony_ci	/* GPP_C */
54562306a36Sopenharmony_ci	PINCTRL_PIN(176, "SMBCLK"),
54662306a36Sopenharmony_ci	PINCTRL_PIN(177, "SMBDATA"),
54762306a36Sopenharmony_ci	PINCTRL_PIN(178, "SMBALERTB"),
54862306a36Sopenharmony_ci	PINCTRL_PIN(179, "ISH_UART0_RXD"),
54962306a36Sopenharmony_ci	PINCTRL_PIN(180, "ISH_UART0_TXD"),
55062306a36Sopenharmony_ci	PINCTRL_PIN(181, "SML0ALERTB"),
55162306a36Sopenharmony_ci	PINCTRL_PIN(182, "ISH_I2C2_SDA"),
55262306a36Sopenharmony_ci	PINCTRL_PIN(183, "ISH_I2C2_SCL"),
55362306a36Sopenharmony_ci	PINCTRL_PIN(184, "UART0_RXD"),
55462306a36Sopenharmony_ci	PINCTRL_PIN(185, "UART0_TXD"),
55562306a36Sopenharmony_ci	PINCTRL_PIN(186, "UART0_RTSB"),
55662306a36Sopenharmony_ci	PINCTRL_PIN(187, "UART0_CTSB"),
55762306a36Sopenharmony_ci	PINCTRL_PIN(188, "UART1_RXD"),
55862306a36Sopenharmony_ci	PINCTRL_PIN(189, "UART1_TXD"),
55962306a36Sopenharmony_ci	PINCTRL_PIN(190, "UART1_RTSB"),
56062306a36Sopenharmony_ci	PINCTRL_PIN(191, "UART1_CTSB"),
56162306a36Sopenharmony_ci	PINCTRL_PIN(192, "I2C0_SDA"),
56262306a36Sopenharmony_ci	PINCTRL_PIN(193, "I2C0_SCL"),
56362306a36Sopenharmony_ci	PINCTRL_PIN(194, "I2C1_SDA"),
56462306a36Sopenharmony_ci	PINCTRL_PIN(195, "I2C1_SCL"),
56562306a36Sopenharmony_ci	PINCTRL_PIN(196, "UART2_RXD"),
56662306a36Sopenharmony_ci	PINCTRL_PIN(197, "UART2_TXD"),
56762306a36Sopenharmony_ci	PINCTRL_PIN(198, "UART2_RTSB"),
56862306a36Sopenharmony_ci	PINCTRL_PIN(199, "UART2_CTSB"),
56962306a36Sopenharmony_ci	/* GPP_S */
57062306a36Sopenharmony_ci	PINCTRL_PIN(200, "SNDW1_CLK"),
57162306a36Sopenharmony_ci	PINCTRL_PIN(201, "SNDW1_DATA"),
57262306a36Sopenharmony_ci	PINCTRL_PIN(202, "SNDW2_CLK"),
57362306a36Sopenharmony_ci	PINCTRL_PIN(203, "SNDW2_DATA"),
57462306a36Sopenharmony_ci	PINCTRL_PIN(204, "SNDW3_CLK"),
57562306a36Sopenharmony_ci	PINCTRL_PIN(205, "SNDW3_DATA"),
57662306a36Sopenharmony_ci	PINCTRL_PIN(206, "SNDW4_CLK"),
57762306a36Sopenharmony_ci	PINCTRL_PIN(207, "SNDW4_DATA"),
57862306a36Sopenharmony_ci	/* GPP_E */
57962306a36Sopenharmony_ci	PINCTRL_PIN(208, "SATAXPCIE_0"),
58062306a36Sopenharmony_ci	PINCTRL_PIN(209, "SATAXPCIE_1"),
58162306a36Sopenharmony_ci	PINCTRL_PIN(210, "SATAXPCIE_2"),
58262306a36Sopenharmony_ci	PINCTRL_PIN(211, "CPU_GP_0"),
58362306a36Sopenharmony_ci	PINCTRL_PIN(212, "SATA_DEVSLP_0"),
58462306a36Sopenharmony_ci	PINCTRL_PIN(213, "SATA_DEVSLP_1"),
58562306a36Sopenharmony_ci	PINCTRL_PIN(214, "SATA_DEVSLP_2"),
58662306a36Sopenharmony_ci	PINCTRL_PIN(215, "CPU_GP_1"),
58762306a36Sopenharmony_ci	PINCTRL_PIN(216, "SATA_LEDB"),
58862306a36Sopenharmony_ci	PINCTRL_PIN(217, "USB2_OCB_0"),
58962306a36Sopenharmony_ci	PINCTRL_PIN(218, "USB2_OCB_1"),
59062306a36Sopenharmony_ci	PINCTRL_PIN(219, "USB2_OCB_2"),
59162306a36Sopenharmony_ci	PINCTRL_PIN(220, "USB2_OCB_3"),
59262306a36Sopenharmony_ci	PINCTRL_PIN(221, "SPI1_CSB"),
59362306a36Sopenharmony_ci	PINCTRL_PIN(222, "SPI1_CLK"),
59462306a36Sopenharmony_ci	PINCTRL_PIN(223, "SPI1_MISO_IO_1"),
59562306a36Sopenharmony_ci	PINCTRL_PIN(224, "SPI1_MOSI_IO_0"),
59662306a36Sopenharmony_ci	PINCTRL_PIN(225, "SPI1_IO_2"),
59762306a36Sopenharmony_ci	PINCTRL_PIN(226, "SPI1_IO_3"),
59862306a36Sopenharmony_ci	PINCTRL_PIN(227, "GPP_E_19"),
59962306a36Sopenharmony_ci	PINCTRL_PIN(228, "GPP_E_20"),
60062306a36Sopenharmony_ci	PINCTRL_PIN(229, "ISH_UART0_CTSB"),
60162306a36Sopenharmony_ci	PINCTRL_PIN(230, "SPI1_CLK_LOOPBK"),
60262306a36Sopenharmony_ci	/* GPP_K */
60362306a36Sopenharmony_ci	PINCTRL_PIN(231, "GSXDOUT"),
60462306a36Sopenharmony_ci	PINCTRL_PIN(232, "GSXSLOAD"),
60562306a36Sopenharmony_ci	PINCTRL_PIN(233, "GSXDIN"),
60662306a36Sopenharmony_ci	PINCTRL_PIN(234, "GSXSRESETB"),
60762306a36Sopenharmony_ci	PINCTRL_PIN(235, "GSXCLK"),
60862306a36Sopenharmony_ci	PINCTRL_PIN(236, "ADR_COMPLETE"),
60962306a36Sopenharmony_ci	PINCTRL_PIN(237, "GPP_K_6"),
61062306a36Sopenharmony_ci	PINCTRL_PIN(238, "GPP_K_7"),
61162306a36Sopenharmony_ci	PINCTRL_PIN(239, "CORE_VID_0"),
61262306a36Sopenharmony_ci	PINCTRL_PIN(240, "CORE_VID_1"),
61362306a36Sopenharmony_ci	PINCTRL_PIN(241, "GPP_K_10"),
61462306a36Sopenharmony_ci	PINCTRL_PIN(242, "GPP_K_11"),
61562306a36Sopenharmony_ci	PINCTRL_PIN(243, "SYS_PWROK"),
61662306a36Sopenharmony_ci	PINCTRL_PIN(244, "SYS_RESETB"),
61762306a36Sopenharmony_ci	PINCTRL_PIN(245, "MLK_RSTB"),
61862306a36Sopenharmony_ci	/* GPP_F */
61962306a36Sopenharmony_ci	PINCTRL_PIN(246, "SATAXPCIE_3"),
62062306a36Sopenharmony_ci	PINCTRL_PIN(247, "SATAXPCIE_4"),
62162306a36Sopenharmony_ci	PINCTRL_PIN(248, "SATAXPCIE_5"),
62262306a36Sopenharmony_ci	PINCTRL_PIN(249, "SATAXPCIE_6"),
62362306a36Sopenharmony_ci	PINCTRL_PIN(250, "SATAXPCIE_7"),
62462306a36Sopenharmony_ci	PINCTRL_PIN(251, "SATA_DEVSLP_3"),
62562306a36Sopenharmony_ci	PINCTRL_PIN(252, "SATA_DEVSLP_4"),
62662306a36Sopenharmony_ci	PINCTRL_PIN(253, "SATA_DEVSLP_5"),
62762306a36Sopenharmony_ci	PINCTRL_PIN(254, "SATA_DEVSLP_6"),
62862306a36Sopenharmony_ci	PINCTRL_PIN(255, "SATA_DEVSLP_7"),
62962306a36Sopenharmony_ci	PINCTRL_PIN(256, "SATA_SCLOCK"),
63062306a36Sopenharmony_ci	PINCTRL_PIN(257, "SATA_SLOAD"),
63162306a36Sopenharmony_ci	PINCTRL_PIN(258, "SATA_SDATAOUT1"),
63262306a36Sopenharmony_ci	PINCTRL_PIN(259, "SATA_SDATAOUT0"),
63362306a36Sopenharmony_ci	PINCTRL_PIN(260, "PS_ONB"),
63462306a36Sopenharmony_ci	PINCTRL_PIN(261, "M2_SKT2_CFG_0"),
63562306a36Sopenharmony_ci	PINCTRL_PIN(262, "M2_SKT2_CFG_1"),
63662306a36Sopenharmony_ci	PINCTRL_PIN(263, "M2_SKT2_CFG_2"),
63762306a36Sopenharmony_ci	PINCTRL_PIN(264, "M2_SKT2_CFG_3"),
63862306a36Sopenharmony_ci	PINCTRL_PIN(265, "L_VDDEN"),
63962306a36Sopenharmony_ci	PINCTRL_PIN(266, "L_BKLTEN"),
64062306a36Sopenharmony_ci	PINCTRL_PIN(267, "L_BKLTCTL"),
64162306a36Sopenharmony_ci	PINCTRL_PIN(268, "VNN_CTRL"),
64262306a36Sopenharmony_ci	PINCTRL_PIN(269, "GPP_F_23"),
64362306a36Sopenharmony_ci	/* GPP_D */
64462306a36Sopenharmony_ci	PINCTRL_PIN(270, "SRCCLKREQB_0"),
64562306a36Sopenharmony_ci	PINCTRL_PIN(271, "SRCCLKREQB_1"),
64662306a36Sopenharmony_ci	PINCTRL_PIN(272, "SRCCLKREQB_2"),
64762306a36Sopenharmony_ci	PINCTRL_PIN(273, "SRCCLKREQB_3"),
64862306a36Sopenharmony_ci	PINCTRL_PIN(274, "SML1CLK"),
64962306a36Sopenharmony_ci	PINCTRL_PIN(275, "I2S2_SFRM"),
65062306a36Sopenharmony_ci	PINCTRL_PIN(276, "I2S2_TXD"),
65162306a36Sopenharmony_ci	PINCTRL_PIN(277, "I2S2_RXD"),
65262306a36Sopenharmony_ci	PINCTRL_PIN(278, "I2S2_SCLK"),
65362306a36Sopenharmony_ci	PINCTRL_PIN(279, "SML0CLK"),
65462306a36Sopenharmony_ci	PINCTRL_PIN(280, "SML0DATA"),
65562306a36Sopenharmony_ci	PINCTRL_PIN(281, "SRCCLKREQB_4"),
65662306a36Sopenharmony_ci	PINCTRL_PIN(282, "SRCCLKREQB_5"),
65762306a36Sopenharmony_ci	PINCTRL_PIN(283, "SRCCLKREQB_6"),
65862306a36Sopenharmony_ci	PINCTRL_PIN(284, "SRCCLKREQB_7"),
65962306a36Sopenharmony_ci	PINCTRL_PIN(285, "SML1DATA"),
66062306a36Sopenharmony_ci	PINCTRL_PIN(286, "GSPI3_CS0B"),
66162306a36Sopenharmony_ci	PINCTRL_PIN(287, "GSPI3_CLK"),
66262306a36Sopenharmony_ci	PINCTRL_PIN(288, "GSPI3_MISO"),
66362306a36Sopenharmony_ci	PINCTRL_PIN(289, "GSPI3_MOSI"),
66462306a36Sopenharmony_ci	PINCTRL_PIN(290, "UART3_RXD"),
66562306a36Sopenharmony_ci	PINCTRL_PIN(291, "UART3_TXD"),
66662306a36Sopenharmony_ci	PINCTRL_PIN(292, "UART3_RTSB"),
66762306a36Sopenharmony_ci	PINCTRL_PIN(293, "UART3_CTSB"),
66862306a36Sopenharmony_ci	PINCTRL_PIN(294, "GSPI3_CLK_LOOPBK"),
66962306a36Sopenharmony_ci	/* JTAG */
67062306a36Sopenharmony_ci	PINCTRL_PIN(295, "JTAG_TDO"),
67162306a36Sopenharmony_ci	PINCTRL_PIN(296, "JTAGX"),
67262306a36Sopenharmony_ci	PINCTRL_PIN(297, "PRDYB"),
67362306a36Sopenharmony_ci	PINCTRL_PIN(298, "PREQB"),
67462306a36Sopenharmony_ci	PINCTRL_PIN(299, "JTAG_TDI"),
67562306a36Sopenharmony_ci	PINCTRL_PIN(300, "JTAG_TMS"),
67662306a36Sopenharmony_ci	PINCTRL_PIN(301, "JTAG_TCK"),
67762306a36Sopenharmony_ci	PINCTRL_PIN(302, "DBG_PMODE"),
67862306a36Sopenharmony_ci	PINCTRL_PIN(303, "CPU_TRSTB"),
67962306a36Sopenharmony_ci};
68062306a36Sopenharmony_ci
68162306a36Sopenharmony_cistatic const struct intel_padgroup adls_community0_gpps[] = {
68262306a36Sopenharmony_ci	ADL_GPP(0, 0, 24, 0),				/* GPP_I */
68362306a36Sopenharmony_ci	ADL_GPP(1, 25, 47, 32),				/* GPP_R */
68462306a36Sopenharmony_ci	ADL_GPP(2, 48, 59, 64),				/* GPP_J */
68562306a36Sopenharmony_ci	ADL_GPP(3, 60, 86, 96),				/* vGPIO */
68662306a36Sopenharmony_ci	ADL_GPP(4, 87, 94, 128),			/* vGPIO_0 */
68762306a36Sopenharmony_ci};
68862306a36Sopenharmony_ci
68962306a36Sopenharmony_cistatic const struct intel_padgroup adls_community1_gpps[] = {
69062306a36Sopenharmony_ci	ADL_GPP(0, 95, 118, 160),			/* GPP_B */
69162306a36Sopenharmony_ci	ADL_GPP(1, 119, 126, 192),			/* GPP_G */
69262306a36Sopenharmony_ci	ADL_GPP(2, 127, 150, 224),			/* GPP_H */
69362306a36Sopenharmony_ci};
69462306a36Sopenharmony_ci
69562306a36Sopenharmony_cistatic const struct intel_padgroup adls_community3_gpps[] = {
69662306a36Sopenharmony_ci	ADL_GPP(0, 151, 159, INTEL_GPIO_BASE_NOMAP),	/* SPI0 */
69762306a36Sopenharmony_ci	ADL_GPP(1, 160, 175, 256),			/* GPP_A */
69862306a36Sopenharmony_ci	ADL_GPP(2, 176, 199, 288),			/* GPP_C */
69962306a36Sopenharmony_ci};
70062306a36Sopenharmony_ci
70162306a36Sopenharmony_cistatic const struct intel_padgroup adls_community4_gpps[] = {
70262306a36Sopenharmony_ci	ADL_GPP(0, 200, 207, 320),			/* GPP_S */
70362306a36Sopenharmony_ci	ADL_GPP(1, 208, 230, 352),			/* GPP_E */
70462306a36Sopenharmony_ci	ADL_GPP(2, 231, 245, 384),			/* GPP_K */
70562306a36Sopenharmony_ci	ADL_GPP(3, 246, 269, 416),			/* GPP_F */
70662306a36Sopenharmony_ci};
70762306a36Sopenharmony_ci
70862306a36Sopenharmony_cistatic const struct intel_padgroup adls_community5_gpps[] = {
70962306a36Sopenharmony_ci	ADL_GPP(0, 270, 294, 448),			/* GPP_D */
71062306a36Sopenharmony_ci	ADL_GPP(1, 295, 303, INTEL_GPIO_BASE_NOMAP),	/* JTAG */
71162306a36Sopenharmony_ci};
71262306a36Sopenharmony_ci
71362306a36Sopenharmony_cistatic const struct intel_community adls_communities[] = {
71462306a36Sopenharmony_ci	ADL_S_COMMUNITY(0, 0, 94, adls_community0_gpps),
71562306a36Sopenharmony_ci	ADL_S_COMMUNITY(1, 95, 150, adls_community1_gpps),
71662306a36Sopenharmony_ci	ADL_S_COMMUNITY(2, 151, 199, adls_community3_gpps),
71762306a36Sopenharmony_ci	ADL_S_COMMUNITY(3, 200, 269, adls_community4_gpps),
71862306a36Sopenharmony_ci	ADL_S_COMMUNITY(4, 270, 303, adls_community5_gpps),
71962306a36Sopenharmony_ci};
72062306a36Sopenharmony_ci
72162306a36Sopenharmony_cistatic const struct intel_pinctrl_soc_data adls_soc_data = {
72262306a36Sopenharmony_ci	.pins = adls_pins,
72362306a36Sopenharmony_ci	.npins = ARRAY_SIZE(adls_pins),
72462306a36Sopenharmony_ci	.communities = adls_communities,
72562306a36Sopenharmony_ci	.ncommunities = ARRAY_SIZE(adls_communities),
72662306a36Sopenharmony_ci};
72762306a36Sopenharmony_ci
72862306a36Sopenharmony_cistatic const struct acpi_device_id adl_pinctrl_acpi_match[] = {
72962306a36Sopenharmony_ci	{ "INTC1056", (kernel_ulong_t)&adls_soc_data },
73062306a36Sopenharmony_ci	{ "INTC1057", (kernel_ulong_t)&adln_soc_data },
73162306a36Sopenharmony_ci	{ "INTC1085", (kernel_ulong_t)&adls_soc_data },
73262306a36Sopenharmony_ci	{ }
73362306a36Sopenharmony_ci};
73462306a36Sopenharmony_ciMODULE_DEVICE_TABLE(acpi, adl_pinctrl_acpi_match);
73562306a36Sopenharmony_ci
73662306a36Sopenharmony_cistatic INTEL_PINCTRL_PM_OPS(adl_pinctrl_pm_ops);
73762306a36Sopenharmony_ci
73862306a36Sopenharmony_cistatic struct platform_driver adl_pinctrl_driver = {
73962306a36Sopenharmony_ci	.probe = intel_pinctrl_probe_by_hid,
74062306a36Sopenharmony_ci	.driver = {
74162306a36Sopenharmony_ci		.name = "alderlake-pinctrl",
74262306a36Sopenharmony_ci		.acpi_match_table = adl_pinctrl_acpi_match,
74362306a36Sopenharmony_ci		.pm = &adl_pinctrl_pm_ops,
74462306a36Sopenharmony_ci	},
74562306a36Sopenharmony_ci};
74662306a36Sopenharmony_cimodule_platform_driver(adl_pinctrl_driver);
74762306a36Sopenharmony_ci
74862306a36Sopenharmony_ciMODULE_AUTHOR("Andy Shevchenko <andriy.shevchenko@linux.intel.com>");
74962306a36Sopenharmony_ciMODULE_DESCRIPTION("Intel Alder Lake PCH pinctrl/GPIO driver");
75062306a36Sopenharmony_ciMODULE_LICENSE("GPL v2");
75162306a36Sopenharmony_ciMODULE_IMPORT_NS(PINCTRL_INTEL);
752