162306a36Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0-only
262306a36Sopenharmony_ci/*
362306a36Sopenharmony_ci * Copyright (c) 2019-2020, The Linux Foundation. All rights reserved.
462306a36Sopenharmony_ci */
562306a36Sopenharmony_ci
662306a36Sopenharmony_ci#include <linux/module.h>
762306a36Sopenharmony_ci#include <linux/of.h>
862306a36Sopenharmony_ci#include <linux/platform_device.h>
962306a36Sopenharmony_ci
1062306a36Sopenharmony_ci#include "pinctrl-msm.h"
1162306a36Sopenharmony_ci
1262306a36Sopenharmony_ci#define REG_SIZE 0x1000
1362306a36Sopenharmony_ci
1462306a36Sopenharmony_ci#define PINGROUP(id, f1, f2, f3, f4, f5, f6, f7, f8, f9)	\
1562306a36Sopenharmony_ci	{						\
1662306a36Sopenharmony_ci		.grp = PINCTRL_PINGROUP("gpio" #id, 	\
1762306a36Sopenharmony_ci			gpio##id##_pins, 		\
1862306a36Sopenharmony_ci			ARRAY_SIZE(gpio##id##_pins)),	\
1962306a36Sopenharmony_ci		.funcs = (int[]){			\
2062306a36Sopenharmony_ci			msm_mux_gpio, /* gpio mode */	\
2162306a36Sopenharmony_ci			msm_mux_##f1,			\
2262306a36Sopenharmony_ci			msm_mux_##f2,			\
2362306a36Sopenharmony_ci			msm_mux_##f3,			\
2462306a36Sopenharmony_ci			msm_mux_##f4,			\
2562306a36Sopenharmony_ci			msm_mux_##f5,			\
2662306a36Sopenharmony_ci			msm_mux_##f6,			\
2762306a36Sopenharmony_ci			msm_mux_##f7,			\
2862306a36Sopenharmony_ci			msm_mux_##f8,			\
2962306a36Sopenharmony_ci			msm_mux_##f9			\
3062306a36Sopenharmony_ci		},					\
3162306a36Sopenharmony_ci		.nfuncs = 10,				\
3262306a36Sopenharmony_ci		.ctl_reg = REG_SIZE * id,		\
3362306a36Sopenharmony_ci		.io_reg = 0x4 + REG_SIZE * id,		\
3462306a36Sopenharmony_ci		.intr_cfg_reg = 0x8 + REG_SIZE * id,	\
3562306a36Sopenharmony_ci		.intr_status_reg = 0xc + REG_SIZE * id,	\
3662306a36Sopenharmony_ci		.intr_target_reg = 0x8 + REG_SIZE * id,	\
3762306a36Sopenharmony_ci		.mux_bit = 2,			\
3862306a36Sopenharmony_ci		.pull_bit = 0,			\
3962306a36Sopenharmony_ci		.drv_bit = 6,			\
4062306a36Sopenharmony_ci		.oe_bit = 9,			\
4162306a36Sopenharmony_ci		.in_bit = 0,			\
4262306a36Sopenharmony_ci		.out_bit = 1,			\
4362306a36Sopenharmony_ci		.intr_enable_bit = 0,		\
4462306a36Sopenharmony_ci		.intr_status_bit = 0,		\
4562306a36Sopenharmony_ci		.intr_target_bit = 5,		\
4662306a36Sopenharmony_ci		.intr_target_kpss_val = 3,	\
4762306a36Sopenharmony_ci		.intr_raw_status_bit = 4,	\
4862306a36Sopenharmony_ci		.intr_polarity_bit = 1,		\
4962306a36Sopenharmony_ci		.intr_detection_bit = 2,	\
5062306a36Sopenharmony_ci		.intr_detection_width = 2,	\
5162306a36Sopenharmony_ci	}
5262306a36Sopenharmony_ci
5362306a36Sopenharmony_ci#define SDC_QDSD_PINGROUP(pg_name, ctl, pull, drv)	\
5462306a36Sopenharmony_ci	{					        \
5562306a36Sopenharmony_ci		.grp = PINCTRL_PINGROUP(#pg_name, 	\
5662306a36Sopenharmony_ci			pg_name##_pins, 		\
5762306a36Sopenharmony_ci			ARRAY_SIZE(pg_name##_pins)),	\
5862306a36Sopenharmony_ci		.ctl_reg = ctl,				\
5962306a36Sopenharmony_ci		.io_reg = 0,				\
6062306a36Sopenharmony_ci		.intr_cfg_reg = 0,			\
6162306a36Sopenharmony_ci		.intr_status_reg = 0,			\
6262306a36Sopenharmony_ci		.intr_target_reg = 0,			\
6362306a36Sopenharmony_ci		.mux_bit = -1,				\
6462306a36Sopenharmony_ci		.pull_bit = pull,			\
6562306a36Sopenharmony_ci		.drv_bit = drv,				\
6662306a36Sopenharmony_ci		.oe_bit = -1,				\
6762306a36Sopenharmony_ci		.in_bit = -1,				\
6862306a36Sopenharmony_ci		.out_bit = -1,				\
6962306a36Sopenharmony_ci		.intr_enable_bit = -1,			\
7062306a36Sopenharmony_ci		.intr_status_bit = -1,			\
7162306a36Sopenharmony_ci		.intr_target_bit = -1,			\
7262306a36Sopenharmony_ci		.intr_raw_status_bit = -1,		\
7362306a36Sopenharmony_ci		.intr_polarity_bit = -1,		\
7462306a36Sopenharmony_ci		.intr_detection_bit = -1,		\
7562306a36Sopenharmony_ci		.intr_detection_width = -1,		\
7662306a36Sopenharmony_ci	}
7762306a36Sopenharmony_ci
7862306a36Sopenharmony_ci#define UFS_RESET(pg_name, offset)				\
7962306a36Sopenharmony_ci	{					        \
8062306a36Sopenharmony_ci		.grp = PINCTRL_PINGROUP(#pg_name, 	\
8162306a36Sopenharmony_ci			pg_name##_pins, 		\
8262306a36Sopenharmony_ci			ARRAY_SIZE(pg_name##_pins)),	\
8362306a36Sopenharmony_ci		.ctl_reg = offset,			\
8462306a36Sopenharmony_ci		.io_reg = offset + 0x4,			\
8562306a36Sopenharmony_ci		.intr_cfg_reg = 0,			\
8662306a36Sopenharmony_ci		.intr_status_reg = 0,			\
8762306a36Sopenharmony_ci		.intr_target_reg = 0,			\
8862306a36Sopenharmony_ci		.mux_bit = -1,				\
8962306a36Sopenharmony_ci		.pull_bit = 3,				\
9062306a36Sopenharmony_ci		.drv_bit = 0,				\
9162306a36Sopenharmony_ci		.oe_bit = -1,				\
9262306a36Sopenharmony_ci		.in_bit = -1,				\
9362306a36Sopenharmony_ci		.out_bit = 0,				\
9462306a36Sopenharmony_ci		.intr_enable_bit = -1,			\
9562306a36Sopenharmony_ci		.intr_status_bit = -1,			\
9662306a36Sopenharmony_ci		.intr_target_bit = -1,			\
9762306a36Sopenharmony_ci		.intr_raw_status_bit = -1,		\
9862306a36Sopenharmony_ci		.intr_polarity_bit = -1,		\
9962306a36Sopenharmony_ci		.intr_detection_bit = -1,		\
10062306a36Sopenharmony_ci		.intr_detection_width = -1,		\
10162306a36Sopenharmony_ci	}
10262306a36Sopenharmony_cistatic const struct pinctrl_pin_desc qcm2290_pins[] = {
10362306a36Sopenharmony_ci	PINCTRL_PIN(0, "GPIO_0"),
10462306a36Sopenharmony_ci	PINCTRL_PIN(1, "GPIO_1"),
10562306a36Sopenharmony_ci	PINCTRL_PIN(2, "GPIO_2"),
10662306a36Sopenharmony_ci	PINCTRL_PIN(3, "GPIO_3"),
10762306a36Sopenharmony_ci	PINCTRL_PIN(4, "GPIO_4"),
10862306a36Sopenharmony_ci	PINCTRL_PIN(5, "GPIO_5"),
10962306a36Sopenharmony_ci	PINCTRL_PIN(6, "GPIO_6"),
11062306a36Sopenharmony_ci	PINCTRL_PIN(7, "GPIO_7"),
11162306a36Sopenharmony_ci	PINCTRL_PIN(8, "GPIO_8"),
11262306a36Sopenharmony_ci	PINCTRL_PIN(9, "GPIO_9"),
11362306a36Sopenharmony_ci	PINCTRL_PIN(10, "GPIO_10"),
11462306a36Sopenharmony_ci	PINCTRL_PIN(11, "GPIO_11"),
11562306a36Sopenharmony_ci	PINCTRL_PIN(12, "GPIO_12"),
11662306a36Sopenharmony_ci	PINCTRL_PIN(13, "GPIO_13"),
11762306a36Sopenharmony_ci	PINCTRL_PIN(14, "GPIO_14"),
11862306a36Sopenharmony_ci	PINCTRL_PIN(15, "GPIO_15"),
11962306a36Sopenharmony_ci	PINCTRL_PIN(16, "GPIO_16"),
12062306a36Sopenharmony_ci	PINCTRL_PIN(17, "GPIO_17"),
12162306a36Sopenharmony_ci	PINCTRL_PIN(18, "GPIO_18"),
12262306a36Sopenharmony_ci	PINCTRL_PIN(19, "GPIO_19"),
12362306a36Sopenharmony_ci	PINCTRL_PIN(20, "GPIO_20"),
12462306a36Sopenharmony_ci	PINCTRL_PIN(21, "GPIO_21"),
12562306a36Sopenharmony_ci	PINCTRL_PIN(22, "GPIO_22"),
12662306a36Sopenharmony_ci	PINCTRL_PIN(23, "GPIO_23"),
12762306a36Sopenharmony_ci	PINCTRL_PIN(24, "GPIO_24"),
12862306a36Sopenharmony_ci	PINCTRL_PIN(25, "GPIO_25"),
12962306a36Sopenharmony_ci	PINCTRL_PIN(26, "GPIO_26"),
13062306a36Sopenharmony_ci	PINCTRL_PIN(27, "GPIO_27"),
13162306a36Sopenharmony_ci	PINCTRL_PIN(28, "GPIO_28"),
13262306a36Sopenharmony_ci	PINCTRL_PIN(29, "GPIO_29"),
13362306a36Sopenharmony_ci	PINCTRL_PIN(30, "GPIO_30"),
13462306a36Sopenharmony_ci	PINCTRL_PIN(31, "GPIO_31"),
13562306a36Sopenharmony_ci	PINCTRL_PIN(32, "GPIO_32"),
13662306a36Sopenharmony_ci	PINCTRL_PIN(33, "GPIO_33"),
13762306a36Sopenharmony_ci	PINCTRL_PIN(34, "GPIO_34"),
13862306a36Sopenharmony_ci	PINCTRL_PIN(35, "GPIO_35"),
13962306a36Sopenharmony_ci	PINCTRL_PIN(36, "GPIO_36"),
14062306a36Sopenharmony_ci	PINCTRL_PIN(37, "GPIO_37"),
14162306a36Sopenharmony_ci	PINCTRL_PIN(38, "GPIO_38"),
14262306a36Sopenharmony_ci	PINCTRL_PIN(39, "GPIO_39"),
14362306a36Sopenharmony_ci	PINCTRL_PIN(40, "GPIO_40"),
14462306a36Sopenharmony_ci	PINCTRL_PIN(41, "GPIO_41"),
14562306a36Sopenharmony_ci	PINCTRL_PIN(42, "GPIO_42"),
14662306a36Sopenharmony_ci	PINCTRL_PIN(43, "GPIO_43"),
14762306a36Sopenharmony_ci	PINCTRL_PIN(44, "GPIO_44"),
14862306a36Sopenharmony_ci	PINCTRL_PIN(45, "GPIO_45"),
14962306a36Sopenharmony_ci	PINCTRL_PIN(46, "GPIO_46"),
15062306a36Sopenharmony_ci	PINCTRL_PIN(47, "GPIO_47"),
15162306a36Sopenharmony_ci	PINCTRL_PIN(48, "GPIO_48"),
15262306a36Sopenharmony_ci	PINCTRL_PIN(49, "GPIO_49"),
15362306a36Sopenharmony_ci	PINCTRL_PIN(50, "GPIO_50"),
15462306a36Sopenharmony_ci	PINCTRL_PIN(51, "GPIO_51"),
15562306a36Sopenharmony_ci	PINCTRL_PIN(52, "GPIO_52"),
15662306a36Sopenharmony_ci	PINCTRL_PIN(53, "GPIO_53"),
15762306a36Sopenharmony_ci	PINCTRL_PIN(54, "GPIO_54"),
15862306a36Sopenharmony_ci	PINCTRL_PIN(55, "GPIO_55"),
15962306a36Sopenharmony_ci	PINCTRL_PIN(56, "GPIO_56"),
16062306a36Sopenharmony_ci	PINCTRL_PIN(57, "GPIO_57"),
16162306a36Sopenharmony_ci	PINCTRL_PIN(58, "GPIO_58"),
16262306a36Sopenharmony_ci	PINCTRL_PIN(59, "GPIO_59"),
16362306a36Sopenharmony_ci	PINCTRL_PIN(60, "GPIO_60"),
16462306a36Sopenharmony_ci	PINCTRL_PIN(61, "GPIO_61"),
16562306a36Sopenharmony_ci	PINCTRL_PIN(62, "GPIO_62"),
16662306a36Sopenharmony_ci	PINCTRL_PIN(63, "GPIO_63"),
16762306a36Sopenharmony_ci	PINCTRL_PIN(64, "GPIO_64"),
16862306a36Sopenharmony_ci	PINCTRL_PIN(69, "GPIO_69"),
16962306a36Sopenharmony_ci	PINCTRL_PIN(70, "GPIO_70"),
17062306a36Sopenharmony_ci	PINCTRL_PIN(71, "GPIO_71"),
17162306a36Sopenharmony_ci	PINCTRL_PIN(72, "GPIO_72"),
17262306a36Sopenharmony_ci	PINCTRL_PIN(73, "GPIO_73"),
17362306a36Sopenharmony_ci	PINCTRL_PIN(74, "GPIO_74"),
17462306a36Sopenharmony_ci	PINCTRL_PIN(75, "GPIO_75"),
17562306a36Sopenharmony_ci	PINCTRL_PIN(76, "GPIO_76"),
17662306a36Sopenharmony_ci	PINCTRL_PIN(77, "GPIO_77"),
17762306a36Sopenharmony_ci	PINCTRL_PIN(78, "GPIO_78"),
17862306a36Sopenharmony_ci	PINCTRL_PIN(79, "GPIO_79"),
17962306a36Sopenharmony_ci	PINCTRL_PIN(80, "GPIO_80"),
18062306a36Sopenharmony_ci	PINCTRL_PIN(81, "GPIO_81"),
18162306a36Sopenharmony_ci	PINCTRL_PIN(82, "GPIO_82"),
18262306a36Sopenharmony_ci	PINCTRL_PIN(86, "GPIO_86"),
18362306a36Sopenharmony_ci	PINCTRL_PIN(87, "GPIO_87"),
18462306a36Sopenharmony_ci	PINCTRL_PIN(88, "GPIO_88"),
18562306a36Sopenharmony_ci	PINCTRL_PIN(89, "GPIO_89"),
18662306a36Sopenharmony_ci	PINCTRL_PIN(90, "GPIO_90"),
18762306a36Sopenharmony_ci	PINCTRL_PIN(91, "GPIO_91"),
18862306a36Sopenharmony_ci	PINCTRL_PIN(94, "GPIO_94"),
18962306a36Sopenharmony_ci	PINCTRL_PIN(95, "GPIO_95"),
19062306a36Sopenharmony_ci	PINCTRL_PIN(96, "GPIO_96"),
19162306a36Sopenharmony_ci	PINCTRL_PIN(97, "GPIO_97"),
19262306a36Sopenharmony_ci	PINCTRL_PIN(98, "GPIO_98"),
19362306a36Sopenharmony_ci	PINCTRL_PIN(99, "GPIO_99"),
19462306a36Sopenharmony_ci	PINCTRL_PIN(100, "GPIO_100"),
19562306a36Sopenharmony_ci	PINCTRL_PIN(101, "GPIO_101"),
19662306a36Sopenharmony_ci	PINCTRL_PIN(102, "GPIO_102"),
19762306a36Sopenharmony_ci	PINCTRL_PIN(103, "GPIO_103"),
19862306a36Sopenharmony_ci	PINCTRL_PIN(104, "GPIO_104"),
19962306a36Sopenharmony_ci	PINCTRL_PIN(105, "GPIO_105"),
20062306a36Sopenharmony_ci	PINCTRL_PIN(106, "GPIO_106"),
20162306a36Sopenharmony_ci	PINCTRL_PIN(107, "GPIO_107"),
20262306a36Sopenharmony_ci	PINCTRL_PIN(108, "GPIO_108"),
20362306a36Sopenharmony_ci	PINCTRL_PIN(109, "GPIO_109"),
20462306a36Sopenharmony_ci	PINCTRL_PIN(110, "GPIO_110"),
20562306a36Sopenharmony_ci	PINCTRL_PIN(111, "GPIO_111"),
20662306a36Sopenharmony_ci	PINCTRL_PIN(112, "GPIO_112"),
20762306a36Sopenharmony_ci	PINCTRL_PIN(113, "GPIO_113"),
20862306a36Sopenharmony_ci	PINCTRL_PIN(114, "GPIO_114"),
20962306a36Sopenharmony_ci	PINCTRL_PIN(115, "GPIO_115"),
21062306a36Sopenharmony_ci	PINCTRL_PIN(116, "GPIO_116"),
21162306a36Sopenharmony_ci	PINCTRL_PIN(117, "GPIO_117"),
21262306a36Sopenharmony_ci	PINCTRL_PIN(118, "GPIO_118"),
21362306a36Sopenharmony_ci	PINCTRL_PIN(119, "GPIO_119"),
21462306a36Sopenharmony_ci	PINCTRL_PIN(120, "GPIO_120"),
21562306a36Sopenharmony_ci	PINCTRL_PIN(121, "GPIO_121"),
21662306a36Sopenharmony_ci	PINCTRL_PIN(122, "GPIO_122"),
21762306a36Sopenharmony_ci	PINCTRL_PIN(123, "GPIO_123"),
21862306a36Sopenharmony_ci	PINCTRL_PIN(124, "GPIO_124"),
21962306a36Sopenharmony_ci	PINCTRL_PIN(125, "GPIO_125"),
22062306a36Sopenharmony_ci	PINCTRL_PIN(126, "GPIO_126"),
22162306a36Sopenharmony_ci	PINCTRL_PIN(127, "SDC1_RCLK"),
22262306a36Sopenharmony_ci	PINCTRL_PIN(128, "SDC1_CLK"),
22362306a36Sopenharmony_ci	PINCTRL_PIN(129, "SDC1_CMD"),
22462306a36Sopenharmony_ci	PINCTRL_PIN(130, "SDC1_DATA"),
22562306a36Sopenharmony_ci	PINCTRL_PIN(131, "SDC2_CLK"),
22662306a36Sopenharmony_ci	PINCTRL_PIN(132, "SDC2_CMD"),
22762306a36Sopenharmony_ci	PINCTRL_PIN(133, "SDC2_DATA"),
22862306a36Sopenharmony_ci};
22962306a36Sopenharmony_ci
23062306a36Sopenharmony_ci#define DECLARE_MSM_GPIO_PINS(pin) \
23162306a36Sopenharmony_ci	static const unsigned int gpio##pin##_pins[] = { pin }
23262306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(0);
23362306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(1);
23462306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(2);
23562306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(3);
23662306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(4);
23762306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(5);
23862306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(6);
23962306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(7);
24062306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(8);
24162306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(9);
24262306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(10);
24362306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(11);
24462306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(12);
24562306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(13);
24662306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(14);
24762306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(15);
24862306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(16);
24962306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(17);
25062306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(18);
25162306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(19);
25262306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(20);
25362306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(21);
25462306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(22);
25562306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(23);
25662306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(24);
25762306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(25);
25862306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(26);
25962306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(27);
26062306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(28);
26162306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(29);
26262306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(30);
26362306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(31);
26462306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(32);
26562306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(33);
26662306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(34);
26762306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(35);
26862306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(36);
26962306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(37);
27062306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(38);
27162306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(39);
27262306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(40);
27362306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(41);
27462306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(42);
27562306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(43);
27662306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(44);
27762306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(45);
27862306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(46);
27962306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(47);
28062306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(48);
28162306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(49);
28262306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(50);
28362306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(51);
28462306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(52);
28562306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(53);
28662306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(54);
28762306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(55);
28862306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(56);
28962306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(57);
29062306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(58);
29162306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(59);
29262306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(60);
29362306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(61);
29462306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(62);
29562306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(63);
29662306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(64);
29762306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(65);
29862306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(66);
29962306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(67);
30062306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(68);
30162306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(69);
30262306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(70);
30362306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(71);
30462306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(72);
30562306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(73);
30662306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(74);
30762306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(75);
30862306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(76);
30962306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(77);
31062306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(78);
31162306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(79);
31262306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(80);
31362306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(81);
31462306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(82);
31562306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(83);
31662306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(84);
31762306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(85);
31862306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(86);
31962306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(87);
32062306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(88);
32162306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(89);
32262306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(90);
32362306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(91);
32462306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(92);
32562306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(93);
32662306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(94);
32762306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(95);
32862306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(96);
32962306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(97);
33062306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(98);
33162306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(99);
33262306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(100);
33362306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(101);
33462306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(102);
33562306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(103);
33662306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(104);
33762306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(105);
33862306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(106);
33962306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(107);
34062306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(108);
34162306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(109);
34262306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(110);
34362306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(111);
34462306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(112);
34562306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(113);
34662306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(114);
34762306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(115);
34862306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(116);
34962306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(117);
35062306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(118);
35162306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(119);
35262306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(120);
35362306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(121);
35462306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(122);
35562306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(123);
35662306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(124);
35762306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(125);
35862306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(126);
35962306a36Sopenharmony_ci
36062306a36Sopenharmony_cistatic const unsigned int sdc1_rclk_pins[] = { 127 };
36162306a36Sopenharmony_cistatic const unsigned int sdc1_clk_pins[] = { 128 };
36262306a36Sopenharmony_cistatic const unsigned int sdc1_cmd_pins[] = { 129 };
36362306a36Sopenharmony_cistatic const unsigned int sdc1_data_pins[] = { 130 };
36462306a36Sopenharmony_cistatic const unsigned int sdc2_clk_pins[] = { 131 };
36562306a36Sopenharmony_cistatic const unsigned int sdc2_cmd_pins[] = { 132 };
36662306a36Sopenharmony_cistatic const unsigned int sdc2_data_pins[] = { 133 };
36762306a36Sopenharmony_ci
36862306a36Sopenharmony_cienum qcm2290_functions {
36962306a36Sopenharmony_ci	msm_mux_adsp_ext,
37062306a36Sopenharmony_ci	msm_mux_agera_pll,
37162306a36Sopenharmony_ci	msm_mux_atest,
37262306a36Sopenharmony_ci	msm_mux_cam_mclk,
37362306a36Sopenharmony_ci	msm_mux_cci_async,
37462306a36Sopenharmony_ci	msm_mux_cci_i2c,
37562306a36Sopenharmony_ci	msm_mux_cci_timer0,
37662306a36Sopenharmony_ci	msm_mux_cci_timer1,
37762306a36Sopenharmony_ci	msm_mux_cci_timer2,
37862306a36Sopenharmony_ci	msm_mux_cci_timer3,
37962306a36Sopenharmony_ci	msm_mux_char_exec,
38062306a36Sopenharmony_ci	msm_mux_cri_trng,
38162306a36Sopenharmony_ci	msm_mux_cri_trng0,
38262306a36Sopenharmony_ci	msm_mux_cri_trng1,
38362306a36Sopenharmony_ci	msm_mux_dac_calib,
38462306a36Sopenharmony_ci	msm_mux_dbg_out,
38562306a36Sopenharmony_ci	msm_mux_ddr_bist,
38662306a36Sopenharmony_ci	msm_mux_ddr_pxi0,
38762306a36Sopenharmony_ci	msm_mux_ddr_pxi1,
38862306a36Sopenharmony_ci	msm_mux_ddr_pxi2,
38962306a36Sopenharmony_ci	msm_mux_ddr_pxi3,
39062306a36Sopenharmony_ci	msm_mux_gcc_gp1,
39162306a36Sopenharmony_ci	msm_mux_gcc_gp2,
39262306a36Sopenharmony_ci	msm_mux_gcc_gp3,
39362306a36Sopenharmony_ci	msm_mux_gpio,
39462306a36Sopenharmony_ci	msm_mux_gp_pdm0,
39562306a36Sopenharmony_ci	msm_mux_gp_pdm1,
39662306a36Sopenharmony_ci	msm_mux_gp_pdm2,
39762306a36Sopenharmony_ci	msm_mux_gsm0_tx,
39862306a36Sopenharmony_ci	msm_mux_gsm1_tx,
39962306a36Sopenharmony_ci	msm_mux_jitter_bist,
40062306a36Sopenharmony_ci	msm_mux_mdp_vsync,
40162306a36Sopenharmony_ci	msm_mux_mdp_vsync_out_0,
40262306a36Sopenharmony_ci	msm_mux_mdp_vsync_out_1,
40362306a36Sopenharmony_ci	msm_mux_mpm_pwr,
40462306a36Sopenharmony_ci	msm_mux_mss_lte,
40562306a36Sopenharmony_ci	msm_mux_m_voc,
40662306a36Sopenharmony_ci	msm_mux_nav_gpio,
40762306a36Sopenharmony_ci	msm_mux_pa_indicator,
40862306a36Sopenharmony_ci	msm_mux_pbs0,
40962306a36Sopenharmony_ci	msm_mux_pbs1,
41062306a36Sopenharmony_ci	msm_mux_pbs2,
41162306a36Sopenharmony_ci	msm_mux_pbs3,
41262306a36Sopenharmony_ci	msm_mux_pbs4,
41362306a36Sopenharmony_ci	msm_mux_pbs5,
41462306a36Sopenharmony_ci	msm_mux_pbs6,
41562306a36Sopenharmony_ci	msm_mux_pbs7,
41662306a36Sopenharmony_ci	msm_mux_pbs8,
41762306a36Sopenharmony_ci	msm_mux_pbs9,
41862306a36Sopenharmony_ci	msm_mux_pbs10,
41962306a36Sopenharmony_ci	msm_mux_pbs11,
42062306a36Sopenharmony_ci	msm_mux_pbs12,
42162306a36Sopenharmony_ci	msm_mux_pbs13,
42262306a36Sopenharmony_ci	msm_mux_pbs14,
42362306a36Sopenharmony_ci	msm_mux_pbs15,
42462306a36Sopenharmony_ci	msm_mux_pbs_out,
42562306a36Sopenharmony_ci	msm_mux_phase_flag,
42662306a36Sopenharmony_ci	msm_mux_pll_bist,
42762306a36Sopenharmony_ci	msm_mux_pll_bypassnl,
42862306a36Sopenharmony_ci	msm_mux_pll_reset,
42962306a36Sopenharmony_ci	msm_mux_prng_rosc,
43062306a36Sopenharmony_ci	msm_mux_pwm_0,
43162306a36Sopenharmony_ci	msm_mux_pwm_1,
43262306a36Sopenharmony_ci	msm_mux_pwm_2,
43362306a36Sopenharmony_ci	msm_mux_pwm_3,
43462306a36Sopenharmony_ci	msm_mux_pwm_4,
43562306a36Sopenharmony_ci	msm_mux_pwm_5,
43662306a36Sopenharmony_ci	msm_mux_pwm_6,
43762306a36Sopenharmony_ci	msm_mux_pwm_7,
43862306a36Sopenharmony_ci	msm_mux_pwm_8,
43962306a36Sopenharmony_ci	msm_mux_pwm_9,
44062306a36Sopenharmony_ci	msm_mux_qdss_cti,
44162306a36Sopenharmony_ci	msm_mux_qdss_gpio,
44262306a36Sopenharmony_ci	msm_mux_qup0,
44362306a36Sopenharmony_ci	msm_mux_qup1,
44462306a36Sopenharmony_ci	msm_mux_qup2,
44562306a36Sopenharmony_ci	msm_mux_qup3,
44662306a36Sopenharmony_ci	msm_mux_qup4,
44762306a36Sopenharmony_ci	msm_mux_qup5,
44862306a36Sopenharmony_ci	msm_mux_sdc1_tb,
44962306a36Sopenharmony_ci	msm_mux_sdc2_tb,
45062306a36Sopenharmony_ci	msm_mux_sd_write,
45162306a36Sopenharmony_ci	msm_mux_ssbi_wtr1,
45262306a36Sopenharmony_ci	msm_mux_tgu_ch0,
45362306a36Sopenharmony_ci	msm_mux_tgu_ch1,
45462306a36Sopenharmony_ci	msm_mux_tgu_ch2,
45562306a36Sopenharmony_ci	msm_mux_tgu_ch3,
45662306a36Sopenharmony_ci	msm_mux_tsense_pwm,
45762306a36Sopenharmony_ci	msm_mux_uim1_clk,
45862306a36Sopenharmony_ci	msm_mux_uim1_data,
45962306a36Sopenharmony_ci	msm_mux_uim1_present,
46062306a36Sopenharmony_ci	msm_mux_uim1_reset,
46162306a36Sopenharmony_ci	msm_mux_uim2_clk,
46262306a36Sopenharmony_ci	msm_mux_uim2_data,
46362306a36Sopenharmony_ci	msm_mux_uim2_present,
46462306a36Sopenharmony_ci	msm_mux_uim2_reset,
46562306a36Sopenharmony_ci	msm_mux_usb_phy,
46662306a36Sopenharmony_ci	msm_mux_vfr_1,
46762306a36Sopenharmony_ci	msm_mux_vsense_trigger,
46862306a36Sopenharmony_ci	msm_mux_wlan1_adc0,
46962306a36Sopenharmony_ci	msm_mux_wlan1_adc1,
47062306a36Sopenharmony_ci	msm_mux__,
47162306a36Sopenharmony_ci};
47262306a36Sopenharmony_ci
47362306a36Sopenharmony_cistatic const char * const qup0_groups[] = {
47462306a36Sopenharmony_ci	"gpio0", "gpio1", "gpio2", "gpio3", "gpio82", "gpio86",
47562306a36Sopenharmony_ci};
47662306a36Sopenharmony_cistatic const char * const gpio_groups[] = {
47762306a36Sopenharmony_ci	"gpio0", "gpio1", "gpio2", "gpio3", "gpio4", "gpio5", "gpio6", "gpio7",
47862306a36Sopenharmony_ci	"gpio8", "gpio9", "gpio10", "gpio11", "gpio12", "gpio13", "gpio14",
47962306a36Sopenharmony_ci	"gpio15", "gpio16", "gpio17", "gpio18", "gpio19", "gpio20", "gpio21",
48062306a36Sopenharmony_ci	"gpio22", "gpio23", "gpio24", "gpio25", "gpio26", "gpio27", "gpio28",
48162306a36Sopenharmony_ci	"gpio29", "gpio30", "gpio31", "gpio32", "gpio33", "gpio34", "gpio35",
48262306a36Sopenharmony_ci	"gpio36", "gpio37", "gpio38", "gpio39", "gpio40", "gpio41", "gpio42",
48362306a36Sopenharmony_ci	"gpio43", "gpio44", "gpio45", "gpio46", "gpio47", "gpio48", "gpio49",
48462306a36Sopenharmony_ci	"gpio50", "gpio51", "gpio52", "gpio53", "gpio54", "gpio55", "gpio56",
48562306a36Sopenharmony_ci	"gpio57", "gpio58", "gpio59", "gpio60", "gpio61", "gpio62", "gpio63",
48662306a36Sopenharmony_ci	"gpio64", "gpio65", "gpio66", "gpio67", "gpio68", "gpio69", "gpio70",
48762306a36Sopenharmony_ci	"gpio71", "gpio72", "gpio73", "gpio74", "gpio75", "gpio76", "gpio77",
48862306a36Sopenharmony_ci	"gpio78", "gpio79", "gpio80", "gpio81", "gpio82", "gpio83", "gpio84",
48962306a36Sopenharmony_ci	"gpio85", "gpio86", "gpio87", "gpio88", "gpio89", "gpio90", "gpio91",
49062306a36Sopenharmony_ci	"gpio92", "gpio93", "gpio94", "gpio95", "gpio96", "gpio97", "gpio98",
49162306a36Sopenharmony_ci	"gpio99", "gpio100", "gpio101", "gpio102", "gpio103", "gpio104",
49262306a36Sopenharmony_ci	"gpio105", "gpio106", "gpio107", "gpio108", "gpio109", "gpio110",
49362306a36Sopenharmony_ci	"gpio111", "gpio112", "gpio113", "gpio114", "gpio115", "gpio116",
49462306a36Sopenharmony_ci	"gpio117", "gpio118", "gpio119", "gpio120", "gpio121", "gpio122",
49562306a36Sopenharmony_ci	"gpio123", "gpio124", "gpio125", "gpio126",
49662306a36Sopenharmony_ci};
49762306a36Sopenharmony_cistatic const char * const ddr_bist_groups[] = {
49862306a36Sopenharmony_ci	"gpio0", "gpio1", "gpio2", "gpio3",
49962306a36Sopenharmony_ci};
50062306a36Sopenharmony_cistatic const char * const phase_flag_groups[] = {
50162306a36Sopenharmony_ci	"gpio0", "gpio1", "gpio2", "gpio3", "gpio4", "gpio5", "gpio6",
50262306a36Sopenharmony_ci	"gpio14", "gpio15", "gpio16", "gpio17", "gpio22", "gpio23", "gpio24",
50362306a36Sopenharmony_ci	"gpio25", "gpio26", "gpio29", "gpio30", "gpio31", "gpio32", "gpio33",
50462306a36Sopenharmony_ci	"gpio35", "gpio36", "gpio43", "gpio44", "gpio45", "gpio63", "gpio64",
50562306a36Sopenharmony_ci	"gpio102", "gpio103", "gpio104", "gpio105",
50662306a36Sopenharmony_ci};
50762306a36Sopenharmony_cistatic const char * const qdss_gpio_groups[] = {
50862306a36Sopenharmony_ci	"gpio0", "gpio1", "gpio2", "gpio3", "gpio8", "gpio9", "gpio10",
50962306a36Sopenharmony_ci	"gpio11", "gpio14", "gpio15", "gpio16", "gpio17", "gpio18", "gpio19",
51062306a36Sopenharmony_ci	"gpio20", "gpio21", "gpio22", "gpio23", "gpio24", "gpio25", "gpio26",
51162306a36Sopenharmony_ci	"gpio47", "gpio48", "gpio69", "gpio70", "gpio87", "gpio90", "gpio91",
51262306a36Sopenharmony_ci	"gpio94", "gpio95", "gpio104", "gpio105", "gpio106", "gpio107",
51362306a36Sopenharmony_ci	"gpio109", "gpio110",
51462306a36Sopenharmony_ci};
51562306a36Sopenharmony_cistatic const char * const atest_groups[] = {
51662306a36Sopenharmony_ci	"gpio0", "gpio1", "gpio2", "gpio3", "gpio4", "gpio5", "gpio6",
51762306a36Sopenharmony_ci	"gpio22", "gpio23", "gpio24", "gpio25", "gpio26", "gpio29", "gpio30",
51862306a36Sopenharmony_ci	"gpio31", "gpio32", "gpio33", "gpio86", "gpio89", "gpio100", "gpio101",
51962306a36Sopenharmony_ci};
52062306a36Sopenharmony_cistatic const char * const mpm_pwr_groups[] = {
52162306a36Sopenharmony_ci	"gpio1",
52262306a36Sopenharmony_ci};
52362306a36Sopenharmony_cistatic const char * const m_voc_groups[] = {
52462306a36Sopenharmony_ci	"gpio0",
52562306a36Sopenharmony_ci};
52662306a36Sopenharmony_cistatic const char * const dac_calib_groups[] = {
52762306a36Sopenharmony_ci	"gpio2",
52862306a36Sopenharmony_ci	"gpio3",
52962306a36Sopenharmony_ci	"gpio4",
53062306a36Sopenharmony_ci	"gpio5",
53162306a36Sopenharmony_ci	"gpio6",
53262306a36Sopenharmony_ci	"gpio14",
53362306a36Sopenharmony_ci	"gpio15",
53462306a36Sopenharmony_ci	"gpio16",
53562306a36Sopenharmony_ci	"gpio17",
53662306a36Sopenharmony_ci	"gpio22",
53762306a36Sopenharmony_ci	"gpio23",
53862306a36Sopenharmony_ci	"gpio24",
53962306a36Sopenharmony_ci	"gpio25",
54062306a36Sopenharmony_ci	"gpio26",
54162306a36Sopenharmony_ci	"gpio29",
54262306a36Sopenharmony_ci	"gpio30",
54362306a36Sopenharmony_ci	"gpio31",
54462306a36Sopenharmony_ci	"gpio32",
54562306a36Sopenharmony_ci	"gpio33",
54662306a36Sopenharmony_ci	"gpio80",
54762306a36Sopenharmony_ci	"gpio81",
54862306a36Sopenharmony_ci	"gpio82",
54962306a36Sopenharmony_ci	"gpio102",
55062306a36Sopenharmony_ci	"gpio103",
55162306a36Sopenharmony_ci	"gpio104",
55262306a36Sopenharmony_ci	"gpio105",
55362306a36Sopenharmony_ci};
55462306a36Sopenharmony_cistatic const char * const qup1_groups[] = {
55562306a36Sopenharmony_ci	"gpio4", "gpio5", "gpio69", "gpio70",
55662306a36Sopenharmony_ci};
55762306a36Sopenharmony_cistatic const char * const cri_trng0_groups[] = {
55862306a36Sopenharmony_ci	"gpio4",
55962306a36Sopenharmony_ci};
56062306a36Sopenharmony_cistatic const char * const cri_trng1_groups[] = {
56162306a36Sopenharmony_ci	"gpio5",
56262306a36Sopenharmony_ci};
56362306a36Sopenharmony_cistatic const char * const qup2_groups[] = {
56462306a36Sopenharmony_ci	"gpio6", "gpio7", "gpio71", "gpio80",
56562306a36Sopenharmony_ci};
56662306a36Sopenharmony_cistatic const char * const qup3_groups[] = {
56762306a36Sopenharmony_ci	"gpio8", "gpio9", "gpio10", "gpio11",
56862306a36Sopenharmony_ci};
56962306a36Sopenharmony_cistatic const char * const pbs_out_groups[] = {
57062306a36Sopenharmony_ci	"gpio8", "gpio9", "gpio52",
57162306a36Sopenharmony_ci};
57262306a36Sopenharmony_cistatic const char * const pll_bist_groups[] = {
57362306a36Sopenharmony_ci	"gpio8", "gpio9",
57462306a36Sopenharmony_ci};
57562306a36Sopenharmony_cistatic const char * const tsense_pwm_groups[] = {
57662306a36Sopenharmony_ci	"gpio8",
57762306a36Sopenharmony_ci};
57862306a36Sopenharmony_cistatic const char * const agera_pll_groups[] = {
57962306a36Sopenharmony_ci	"gpio10", "gpio11",
58062306a36Sopenharmony_ci};
58162306a36Sopenharmony_cistatic const char * const pbs0_groups[] = {
58262306a36Sopenharmony_ci	"gpio10",
58362306a36Sopenharmony_ci};
58462306a36Sopenharmony_cistatic const char * const pbs1_groups[] = {
58562306a36Sopenharmony_ci	"gpio11",
58662306a36Sopenharmony_ci};
58762306a36Sopenharmony_cistatic const char * const qup4_groups[] = {
58862306a36Sopenharmony_ci	"gpio12", "gpio13", "gpio96", "gpio97",
58962306a36Sopenharmony_ci};
59062306a36Sopenharmony_cistatic const char * const tgu_ch0_groups[] = {
59162306a36Sopenharmony_ci	"gpio12",
59262306a36Sopenharmony_ci};
59362306a36Sopenharmony_cistatic const char * const tgu_ch1_groups[] = {
59462306a36Sopenharmony_ci	"gpio13",
59562306a36Sopenharmony_ci};
59662306a36Sopenharmony_cistatic const char * const qup5_groups[] = {
59762306a36Sopenharmony_ci	"gpio14", "gpio15", "gpio16", "gpio17",
59862306a36Sopenharmony_ci};
59962306a36Sopenharmony_cistatic const char * const tgu_ch2_groups[] = {
60062306a36Sopenharmony_ci	"gpio14",
60162306a36Sopenharmony_ci};
60262306a36Sopenharmony_cistatic const char * const tgu_ch3_groups[] = {
60362306a36Sopenharmony_ci	"gpio15",
60462306a36Sopenharmony_ci};
60562306a36Sopenharmony_cistatic const char * const sdc2_tb_groups[] = {
60662306a36Sopenharmony_ci	"gpio18",
60762306a36Sopenharmony_ci};
60862306a36Sopenharmony_cistatic const char * const cri_trng_groups[] = {
60962306a36Sopenharmony_ci	"gpio18",
61062306a36Sopenharmony_ci};
61162306a36Sopenharmony_cistatic const char * const pbs2_groups[] = {
61262306a36Sopenharmony_ci	"gpio18",
61362306a36Sopenharmony_ci};
61462306a36Sopenharmony_cistatic const char * const pwm_0_groups[] = {
61562306a36Sopenharmony_ci	"gpio18",
61662306a36Sopenharmony_ci};
61762306a36Sopenharmony_cistatic const char * const sdc1_tb_groups[] = {
61862306a36Sopenharmony_ci	"gpio19",
61962306a36Sopenharmony_ci};
62062306a36Sopenharmony_cistatic const char * const pbs3_groups[] = {
62162306a36Sopenharmony_ci	"gpio19",
62262306a36Sopenharmony_ci};
62362306a36Sopenharmony_cistatic const char * const cam_mclk_groups[] = {
62462306a36Sopenharmony_ci	"gpio20", "gpio21", "gpio27", "gpio28",
62562306a36Sopenharmony_ci};
62662306a36Sopenharmony_cistatic const char * const pbs4_groups[] = {
62762306a36Sopenharmony_ci	"gpio20",
62862306a36Sopenharmony_ci};
62962306a36Sopenharmony_cistatic const char * const adsp_ext_groups[] = {
63062306a36Sopenharmony_ci	"gpio21",
63162306a36Sopenharmony_ci};
63262306a36Sopenharmony_cistatic const char * const pbs5_groups[] = {
63362306a36Sopenharmony_ci	"gpio21",
63462306a36Sopenharmony_ci};
63562306a36Sopenharmony_cistatic const char * const cci_i2c_groups[] = {
63662306a36Sopenharmony_ci	"gpio22", "gpio23", "gpio29", "gpio30",
63762306a36Sopenharmony_ci};
63862306a36Sopenharmony_cistatic const char * const prng_rosc_groups[] = {
63962306a36Sopenharmony_ci	"gpio22", "gpio23",
64062306a36Sopenharmony_ci};
64162306a36Sopenharmony_cistatic const char * const pbs6_groups[] = {
64262306a36Sopenharmony_ci	"gpio22",
64362306a36Sopenharmony_ci};
64462306a36Sopenharmony_cistatic const char * const pbs7_groups[] = {
64562306a36Sopenharmony_ci	"gpio23",
64662306a36Sopenharmony_ci};
64762306a36Sopenharmony_cistatic const char * const cci_timer1_groups[] = {
64862306a36Sopenharmony_ci	"gpio24",
64962306a36Sopenharmony_ci};
65062306a36Sopenharmony_cistatic const char * const gcc_gp1_groups[] = {
65162306a36Sopenharmony_ci	"gpio24", "gpio86",
65262306a36Sopenharmony_ci};
65362306a36Sopenharmony_cistatic const char * const pbs8_groups[] = {
65462306a36Sopenharmony_ci	"gpio24",
65562306a36Sopenharmony_ci};
65662306a36Sopenharmony_cistatic const char * const cci_async_groups[] = {
65762306a36Sopenharmony_ci	"gpio25",
65862306a36Sopenharmony_ci};
65962306a36Sopenharmony_cistatic const char * const cci_timer0_groups[] = {
66062306a36Sopenharmony_ci	"gpio25",
66162306a36Sopenharmony_ci};
66262306a36Sopenharmony_cistatic const char * const pbs9_groups[] = {
66362306a36Sopenharmony_ci	"gpio25",
66462306a36Sopenharmony_ci};
66562306a36Sopenharmony_cistatic const char * const pbs10_groups[] = {
66662306a36Sopenharmony_ci	"gpio26",
66762306a36Sopenharmony_ci};
66862306a36Sopenharmony_cistatic const char * const vsense_trigger_groups[] = {
66962306a36Sopenharmony_ci	"gpio26",
67062306a36Sopenharmony_ci};
67162306a36Sopenharmony_cistatic const char * const qdss_cti_groups[] = {
67262306a36Sopenharmony_ci	"gpio27", "gpio28", "gpio72", "gpio73", "gpio96", "gpio97",
67362306a36Sopenharmony_ci};
67462306a36Sopenharmony_cistatic const char * const cci_timer2_groups[] = {
67562306a36Sopenharmony_ci	"gpio28",
67662306a36Sopenharmony_ci};
67762306a36Sopenharmony_cistatic const char * const pwm_1_groups[] = {
67862306a36Sopenharmony_ci	"gpio28",
67962306a36Sopenharmony_ci};
68062306a36Sopenharmony_cistatic const char * const gp_pdm0_groups[] = {
68162306a36Sopenharmony_ci	"gpio31", "gpio95",
68262306a36Sopenharmony_ci};
68362306a36Sopenharmony_cistatic const char * const cci_timer3_groups[] = {
68462306a36Sopenharmony_ci	"gpio32",
68562306a36Sopenharmony_ci};
68662306a36Sopenharmony_cistatic const char * const gp_pdm1_groups[] = {
68762306a36Sopenharmony_ci	"gpio32", "gpio96",
68862306a36Sopenharmony_ci};
68962306a36Sopenharmony_cistatic const char * const gp_pdm2_groups[] = {
69062306a36Sopenharmony_ci	"gpio33", "gpio97",
69162306a36Sopenharmony_ci};
69262306a36Sopenharmony_cistatic const char * const char_exec_groups[] = {
69362306a36Sopenharmony_ci	"gpio37", "gpio38",
69462306a36Sopenharmony_ci};
69562306a36Sopenharmony_cistatic const char * const nav_gpio_groups[] = {
69662306a36Sopenharmony_ci	"gpio42", "gpio47", "gpio52", "gpio95", "gpio96", "gpio97", "gpio106",
69762306a36Sopenharmony_ci	"gpio107", "gpio108",
69862306a36Sopenharmony_ci};
69962306a36Sopenharmony_cistatic const char * const pbs14_groups[] = {
70062306a36Sopenharmony_ci	"gpio47",
70162306a36Sopenharmony_ci};
70262306a36Sopenharmony_cistatic const char * const vfr_1_groups[] = {
70362306a36Sopenharmony_ci	"gpio48",
70462306a36Sopenharmony_ci};
70562306a36Sopenharmony_cistatic const char * const pbs15_groups[] = {
70662306a36Sopenharmony_ci	"gpio48",
70762306a36Sopenharmony_ci};
70862306a36Sopenharmony_cistatic const char * const pa_indicator_groups[] = {
70962306a36Sopenharmony_ci	"gpio49",
71062306a36Sopenharmony_ci};
71162306a36Sopenharmony_cistatic const char * const pwm_2_groups[] = {
71262306a36Sopenharmony_ci	"gpio51",
71362306a36Sopenharmony_ci};
71462306a36Sopenharmony_cistatic const char * const gsm1_tx_groups[] = {
71562306a36Sopenharmony_ci	"gpio53",
71662306a36Sopenharmony_ci};
71762306a36Sopenharmony_cistatic const char * const ssbi_wtr1_groups[] = {
71862306a36Sopenharmony_ci	"gpio59", "gpio60",
71962306a36Sopenharmony_ci};
72062306a36Sopenharmony_cistatic const char * const pll_bypassnl_groups[] = {
72162306a36Sopenharmony_ci	"gpio62",
72262306a36Sopenharmony_ci};
72362306a36Sopenharmony_cistatic const char * const pll_reset_groups[] = {
72462306a36Sopenharmony_ci	"gpio63",
72562306a36Sopenharmony_ci};
72662306a36Sopenharmony_cistatic const char * const ddr_pxi0_groups[] = {
72762306a36Sopenharmony_ci	"gpio63", "gpio64",
72862306a36Sopenharmony_ci};
72962306a36Sopenharmony_cistatic const char * const gsm0_tx_groups[] = {
73062306a36Sopenharmony_ci	"gpio64",
73162306a36Sopenharmony_ci};
73262306a36Sopenharmony_cistatic const char * const gcc_gp2_groups[] = {
73362306a36Sopenharmony_ci	"gpio69", "gpio107",
73462306a36Sopenharmony_ci};
73562306a36Sopenharmony_cistatic const char * const ddr_pxi1_groups[] = {
73662306a36Sopenharmony_ci	"gpio69", "gpio70",
73762306a36Sopenharmony_ci};
73862306a36Sopenharmony_cistatic const char * const gcc_gp3_groups[] = {
73962306a36Sopenharmony_ci	"gpio70", "gpio106",
74062306a36Sopenharmony_ci};
74162306a36Sopenharmony_cistatic const char * const dbg_out_groups[] = {
74262306a36Sopenharmony_ci	"gpio71",
74362306a36Sopenharmony_ci};
74462306a36Sopenharmony_cistatic const char * const uim2_data_groups[] = {
74562306a36Sopenharmony_ci	"gpio72",
74662306a36Sopenharmony_ci};
74762306a36Sopenharmony_cistatic const char * const pwm_3_groups[] = {
74862306a36Sopenharmony_ci	"gpio72",
74962306a36Sopenharmony_ci};
75062306a36Sopenharmony_cistatic const char * const uim2_clk_groups[] = {
75162306a36Sopenharmony_ci	"gpio73",
75262306a36Sopenharmony_ci};
75362306a36Sopenharmony_cistatic const char * const uim2_reset_groups[] = {
75462306a36Sopenharmony_ci	"gpio74",
75562306a36Sopenharmony_ci};
75662306a36Sopenharmony_cistatic const char * const pwm_4_groups[] = {
75762306a36Sopenharmony_ci	"gpio74",
75862306a36Sopenharmony_ci};
75962306a36Sopenharmony_cistatic const char * const uim2_present_groups[] = {
76062306a36Sopenharmony_ci	"gpio75",
76162306a36Sopenharmony_ci};
76262306a36Sopenharmony_cistatic const char * const pwm_5_groups[] = {
76362306a36Sopenharmony_ci	"gpio75",
76462306a36Sopenharmony_ci};
76562306a36Sopenharmony_cistatic const char * const uim1_data_groups[] = {
76662306a36Sopenharmony_ci	"gpio76",
76762306a36Sopenharmony_ci};
76862306a36Sopenharmony_cistatic const char * const uim1_clk_groups[] = {
76962306a36Sopenharmony_ci	"gpio77",
77062306a36Sopenharmony_ci};
77162306a36Sopenharmony_cistatic const char * const uim1_reset_groups[] = {
77262306a36Sopenharmony_ci	"gpio78",
77362306a36Sopenharmony_ci};
77462306a36Sopenharmony_cistatic const char * const uim1_present_groups[] = {
77562306a36Sopenharmony_ci	"gpio79",
77662306a36Sopenharmony_ci};
77762306a36Sopenharmony_cistatic const char * const mdp_vsync_groups[] = {
77862306a36Sopenharmony_ci	"gpio81", "gpio96", "gpio97",
77962306a36Sopenharmony_ci};
78062306a36Sopenharmony_cistatic const char * const mdp_vsync_out_0_groups[] = {
78162306a36Sopenharmony_ci	"gpio81",
78262306a36Sopenharmony_ci};
78362306a36Sopenharmony_cistatic const char * const mdp_vsync_out_1_groups[] = {
78462306a36Sopenharmony_ci	"gpio81",
78562306a36Sopenharmony_ci};
78662306a36Sopenharmony_cistatic const char * const pwm_6_groups[] = {
78762306a36Sopenharmony_ci	"gpio82",
78862306a36Sopenharmony_ci};
78962306a36Sopenharmony_cistatic const char * const pbs11_groups[] = {
79062306a36Sopenharmony_ci	"gpio87",
79162306a36Sopenharmony_ci};
79262306a36Sopenharmony_cistatic const char * const usb_phy_groups[] = {
79362306a36Sopenharmony_ci	"gpio89",
79462306a36Sopenharmony_ci};
79562306a36Sopenharmony_cistatic const char * const pwm_7_groups[] = {
79662306a36Sopenharmony_ci	"gpio89",
79762306a36Sopenharmony_ci};
79862306a36Sopenharmony_cistatic const char * const mss_lte_groups[] = {
79962306a36Sopenharmony_ci	"gpio90", "gpio91",
80062306a36Sopenharmony_ci};
80162306a36Sopenharmony_cistatic const char * const pbs12_groups[] = {
80262306a36Sopenharmony_ci	"gpio90",
80362306a36Sopenharmony_ci};
80462306a36Sopenharmony_cistatic const char * const pbs13_groups[] = {
80562306a36Sopenharmony_ci	"gpio91",
80662306a36Sopenharmony_ci};
80762306a36Sopenharmony_cistatic const char * const wlan1_adc0_groups[] = {
80862306a36Sopenharmony_ci	"gpio94",
80962306a36Sopenharmony_ci};
81062306a36Sopenharmony_cistatic const char * const wlan1_adc1_groups[] = {
81162306a36Sopenharmony_ci	"gpio95",
81262306a36Sopenharmony_ci};
81362306a36Sopenharmony_cistatic const char * const sd_write_groups[] = {
81462306a36Sopenharmony_ci	"gpio96",
81562306a36Sopenharmony_ci};
81662306a36Sopenharmony_cistatic const char * const jitter_bist_groups[] = {
81762306a36Sopenharmony_ci	"gpio96", "gpio97",
81862306a36Sopenharmony_ci};
81962306a36Sopenharmony_cistatic const char * const ddr_pxi2_groups[] = {
82062306a36Sopenharmony_ci	"gpio102", "gpio103",
82162306a36Sopenharmony_ci};
82262306a36Sopenharmony_cistatic const char * const ddr_pxi3_groups[] = {
82362306a36Sopenharmony_ci	"gpio104", "gpio105",
82462306a36Sopenharmony_ci};
82562306a36Sopenharmony_cistatic const char * const pwm_8_groups[] = {
82662306a36Sopenharmony_ci	"gpio104",
82762306a36Sopenharmony_ci};
82862306a36Sopenharmony_cistatic const char * const pwm_9_groups[] = {
82962306a36Sopenharmony_ci	"gpio115",
83062306a36Sopenharmony_ci};
83162306a36Sopenharmony_ci
83262306a36Sopenharmony_cistatic const struct pinfunction qcm2290_functions[] = {
83362306a36Sopenharmony_ci	MSM_PIN_FUNCTION(adsp_ext),
83462306a36Sopenharmony_ci	MSM_PIN_FUNCTION(agera_pll),
83562306a36Sopenharmony_ci	MSM_PIN_FUNCTION(atest),
83662306a36Sopenharmony_ci	MSM_PIN_FUNCTION(cam_mclk),
83762306a36Sopenharmony_ci	MSM_PIN_FUNCTION(cci_async),
83862306a36Sopenharmony_ci	MSM_PIN_FUNCTION(cci_i2c),
83962306a36Sopenharmony_ci	MSM_PIN_FUNCTION(cci_timer0),
84062306a36Sopenharmony_ci	MSM_PIN_FUNCTION(cci_timer1),
84162306a36Sopenharmony_ci	MSM_PIN_FUNCTION(cci_timer2),
84262306a36Sopenharmony_ci	MSM_PIN_FUNCTION(cci_timer3),
84362306a36Sopenharmony_ci	MSM_PIN_FUNCTION(char_exec),
84462306a36Sopenharmony_ci	MSM_PIN_FUNCTION(cri_trng),
84562306a36Sopenharmony_ci	MSM_PIN_FUNCTION(cri_trng0),
84662306a36Sopenharmony_ci	MSM_PIN_FUNCTION(cri_trng1),
84762306a36Sopenharmony_ci	MSM_PIN_FUNCTION(dac_calib),
84862306a36Sopenharmony_ci	MSM_PIN_FUNCTION(dbg_out),
84962306a36Sopenharmony_ci	MSM_PIN_FUNCTION(ddr_bist),
85062306a36Sopenharmony_ci	MSM_PIN_FUNCTION(ddr_pxi0),
85162306a36Sopenharmony_ci	MSM_PIN_FUNCTION(ddr_pxi1),
85262306a36Sopenharmony_ci	MSM_PIN_FUNCTION(ddr_pxi2),
85362306a36Sopenharmony_ci	MSM_PIN_FUNCTION(ddr_pxi3),
85462306a36Sopenharmony_ci	MSM_PIN_FUNCTION(gcc_gp1),
85562306a36Sopenharmony_ci	MSM_PIN_FUNCTION(gcc_gp2),
85662306a36Sopenharmony_ci	MSM_PIN_FUNCTION(gcc_gp3),
85762306a36Sopenharmony_ci	MSM_PIN_FUNCTION(gpio),
85862306a36Sopenharmony_ci	MSM_PIN_FUNCTION(gp_pdm0),
85962306a36Sopenharmony_ci	MSM_PIN_FUNCTION(gp_pdm1),
86062306a36Sopenharmony_ci	MSM_PIN_FUNCTION(gp_pdm2),
86162306a36Sopenharmony_ci	MSM_PIN_FUNCTION(gsm0_tx),
86262306a36Sopenharmony_ci	MSM_PIN_FUNCTION(gsm1_tx),
86362306a36Sopenharmony_ci	MSM_PIN_FUNCTION(jitter_bist),
86462306a36Sopenharmony_ci	MSM_PIN_FUNCTION(mdp_vsync),
86562306a36Sopenharmony_ci	MSM_PIN_FUNCTION(mdp_vsync_out_0),
86662306a36Sopenharmony_ci	MSM_PIN_FUNCTION(mdp_vsync_out_1),
86762306a36Sopenharmony_ci	MSM_PIN_FUNCTION(mpm_pwr),
86862306a36Sopenharmony_ci	MSM_PIN_FUNCTION(mss_lte),
86962306a36Sopenharmony_ci	MSM_PIN_FUNCTION(m_voc),
87062306a36Sopenharmony_ci	MSM_PIN_FUNCTION(nav_gpio),
87162306a36Sopenharmony_ci	MSM_PIN_FUNCTION(pa_indicator),
87262306a36Sopenharmony_ci	MSM_PIN_FUNCTION(pbs0),
87362306a36Sopenharmony_ci	MSM_PIN_FUNCTION(pbs1),
87462306a36Sopenharmony_ci	MSM_PIN_FUNCTION(pbs2),
87562306a36Sopenharmony_ci	MSM_PIN_FUNCTION(pbs3),
87662306a36Sopenharmony_ci	MSM_PIN_FUNCTION(pbs4),
87762306a36Sopenharmony_ci	MSM_PIN_FUNCTION(pbs5),
87862306a36Sopenharmony_ci	MSM_PIN_FUNCTION(pbs6),
87962306a36Sopenharmony_ci	MSM_PIN_FUNCTION(pbs7),
88062306a36Sopenharmony_ci	MSM_PIN_FUNCTION(pbs8),
88162306a36Sopenharmony_ci	MSM_PIN_FUNCTION(pbs9),
88262306a36Sopenharmony_ci	MSM_PIN_FUNCTION(pbs10),
88362306a36Sopenharmony_ci	MSM_PIN_FUNCTION(pbs11),
88462306a36Sopenharmony_ci	MSM_PIN_FUNCTION(pbs12),
88562306a36Sopenharmony_ci	MSM_PIN_FUNCTION(pbs13),
88662306a36Sopenharmony_ci	MSM_PIN_FUNCTION(pbs14),
88762306a36Sopenharmony_ci	MSM_PIN_FUNCTION(pbs15),
88862306a36Sopenharmony_ci	MSM_PIN_FUNCTION(pbs_out),
88962306a36Sopenharmony_ci	MSM_PIN_FUNCTION(phase_flag),
89062306a36Sopenharmony_ci	MSM_PIN_FUNCTION(pll_bist),
89162306a36Sopenharmony_ci	MSM_PIN_FUNCTION(pll_bypassnl),
89262306a36Sopenharmony_ci	MSM_PIN_FUNCTION(pll_reset),
89362306a36Sopenharmony_ci	MSM_PIN_FUNCTION(prng_rosc),
89462306a36Sopenharmony_ci	MSM_PIN_FUNCTION(pwm_0),
89562306a36Sopenharmony_ci	MSM_PIN_FUNCTION(pwm_1),
89662306a36Sopenharmony_ci	MSM_PIN_FUNCTION(pwm_2),
89762306a36Sopenharmony_ci	MSM_PIN_FUNCTION(pwm_3),
89862306a36Sopenharmony_ci	MSM_PIN_FUNCTION(pwm_4),
89962306a36Sopenharmony_ci	MSM_PIN_FUNCTION(pwm_5),
90062306a36Sopenharmony_ci	MSM_PIN_FUNCTION(pwm_6),
90162306a36Sopenharmony_ci	MSM_PIN_FUNCTION(pwm_7),
90262306a36Sopenharmony_ci	MSM_PIN_FUNCTION(pwm_8),
90362306a36Sopenharmony_ci	MSM_PIN_FUNCTION(pwm_9),
90462306a36Sopenharmony_ci	MSM_PIN_FUNCTION(qdss_cti),
90562306a36Sopenharmony_ci	MSM_PIN_FUNCTION(qdss_gpio),
90662306a36Sopenharmony_ci	MSM_PIN_FUNCTION(qup0),
90762306a36Sopenharmony_ci	MSM_PIN_FUNCTION(qup1),
90862306a36Sopenharmony_ci	MSM_PIN_FUNCTION(qup2),
90962306a36Sopenharmony_ci	MSM_PIN_FUNCTION(qup3),
91062306a36Sopenharmony_ci	MSM_PIN_FUNCTION(qup4),
91162306a36Sopenharmony_ci	MSM_PIN_FUNCTION(qup5),
91262306a36Sopenharmony_ci	MSM_PIN_FUNCTION(sdc1_tb),
91362306a36Sopenharmony_ci	MSM_PIN_FUNCTION(sdc2_tb),
91462306a36Sopenharmony_ci	MSM_PIN_FUNCTION(sd_write),
91562306a36Sopenharmony_ci	MSM_PIN_FUNCTION(ssbi_wtr1),
91662306a36Sopenharmony_ci	MSM_PIN_FUNCTION(tgu_ch0),
91762306a36Sopenharmony_ci	MSM_PIN_FUNCTION(tgu_ch1),
91862306a36Sopenharmony_ci	MSM_PIN_FUNCTION(tgu_ch2),
91962306a36Sopenharmony_ci	MSM_PIN_FUNCTION(tgu_ch3),
92062306a36Sopenharmony_ci	MSM_PIN_FUNCTION(tsense_pwm),
92162306a36Sopenharmony_ci	MSM_PIN_FUNCTION(uim1_clk),
92262306a36Sopenharmony_ci	MSM_PIN_FUNCTION(uim1_data),
92362306a36Sopenharmony_ci	MSM_PIN_FUNCTION(uim1_present),
92462306a36Sopenharmony_ci	MSM_PIN_FUNCTION(uim1_reset),
92562306a36Sopenharmony_ci	MSM_PIN_FUNCTION(uim2_clk),
92662306a36Sopenharmony_ci	MSM_PIN_FUNCTION(uim2_data),
92762306a36Sopenharmony_ci	MSM_PIN_FUNCTION(uim2_present),
92862306a36Sopenharmony_ci	MSM_PIN_FUNCTION(uim2_reset),
92962306a36Sopenharmony_ci	MSM_PIN_FUNCTION(usb_phy),
93062306a36Sopenharmony_ci	MSM_PIN_FUNCTION(vfr_1),
93162306a36Sopenharmony_ci	MSM_PIN_FUNCTION(vsense_trigger),
93262306a36Sopenharmony_ci	MSM_PIN_FUNCTION(wlan1_adc0),
93362306a36Sopenharmony_ci	MSM_PIN_FUNCTION(wlan1_adc1),
93462306a36Sopenharmony_ci};
93562306a36Sopenharmony_ci
93662306a36Sopenharmony_ci/* Every pin is maintained as a single group, and missing or non-existing pin
93762306a36Sopenharmony_ci * would be maintained as dummy group to synchronize pin group index with
93862306a36Sopenharmony_ci * pin descriptor registered with pinctrl core.
93962306a36Sopenharmony_ci * Clients would not be able to request these dummy pin groups.
94062306a36Sopenharmony_ci */
94162306a36Sopenharmony_cistatic const struct msm_pingroup qcm2290_groups[] = {
94262306a36Sopenharmony_ci	[0] = PINGROUP(0, qup0, m_voc, ddr_bist, _, phase_flag, qdss_gpio, atest, _, _),
94362306a36Sopenharmony_ci	[1] = PINGROUP(1, qup0, mpm_pwr, ddr_bist, _, phase_flag, qdss_gpio, atest, _, _),
94462306a36Sopenharmony_ci	[2] = PINGROUP(2, qup0, ddr_bist, _, phase_flag, qdss_gpio, dac_calib, atest, _, _),
94562306a36Sopenharmony_ci	[3] = PINGROUP(3, qup0, ddr_bist, _, phase_flag, qdss_gpio, dac_calib, atest, _, _),
94662306a36Sopenharmony_ci	[4] = PINGROUP(4, qup1, cri_trng0, _, phase_flag, dac_calib, atest, _, _, _),
94762306a36Sopenharmony_ci	[5] = PINGROUP(5, qup1, cri_trng1, _, phase_flag, dac_calib, atest, _, _, _),
94862306a36Sopenharmony_ci	[6] = PINGROUP(6, qup2, _, phase_flag, dac_calib, atest, _, _, _, _),
94962306a36Sopenharmony_ci	[7] = PINGROUP(7, qup2, _, _, _, _, _, _, _, _),
95062306a36Sopenharmony_ci	[8] = PINGROUP(8, qup3, pbs_out, pll_bist, _, qdss_gpio, _, tsense_pwm, _, _),
95162306a36Sopenharmony_ci	[9] = PINGROUP(9, qup3, pbs_out, pll_bist, _, qdss_gpio, _, _, _, _),
95262306a36Sopenharmony_ci	[10] = PINGROUP(10, qup3, agera_pll, _, pbs0, qdss_gpio, _, _, _, _),
95362306a36Sopenharmony_ci	[11] = PINGROUP(11, qup3, agera_pll, _, pbs1, qdss_gpio, _, _, _, _),
95462306a36Sopenharmony_ci	[12] = PINGROUP(12, qup4, tgu_ch0, _, _, _, _, _, _, _),
95562306a36Sopenharmony_ci	[13] = PINGROUP(13, qup4, tgu_ch1, _, _, _, _, _, _, _),
95662306a36Sopenharmony_ci	[14] = PINGROUP(14, qup5, tgu_ch2, _, phase_flag, qdss_gpio, dac_calib, _, _, _),
95762306a36Sopenharmony_ci	[15] = PINGROUP(15, qup5, tgu_ch3, _, phase_flag, qdss_gpio, dac_calib, _, _, _),
95862306a36Sopenharmony_ci	[16] = PINGROUP(16, qup5, _, phase_flag, qdss_gpio, dac_calib, _, _, _, _),
95962306a36Sopenharmony_ci	[17] = PINGROUP(17, qup5, _, phase_flag, qdss_gpio, dac_calib, _, _, _, _),
96062306a36Sopenharmony_ci	[18] = PINGROUP(18, sdc2_tb, cri_trng, pbs2, qdss_gpio, _, pwm_0, _, _, _),
96162306a36Sopenharmony_ci	[19] = PINGROUP(19, sdc1_tb, pbs3, qdss_gpio, _, _, _, _, _, _),
96262306a36Sopenharmony_ci	[20] = PINGROUP(20, cam_mclk, pbs4, qdss_gpio, _, _, _, _, _, _),
96362306a36Sopenharmony_ci	[21] = PINGROUP(21, cam_mclk, adsp_ext, pbs5, qdss_gpio, _, _, _, _, _),
96462306a36Sopenharmony_ci	[22] = PINGROUP(22, cci_i2c, prng_rosc, _, pbs6, phase_flag, qdss_gpio, dac_calib, atest, _),
96562306a36Sopenharmony_ci	[23] = PINGROUP(23, cci_i2c, prng_rosc, _, pbs7, phase_flag, qdss_gpio, dac_calib, atest, _),
96662306a36Sopenharmony_ci	[24] = PINGROUP(24, cci_timer1, gcc_gp1, _, pbs8, phase_flag, qdss_gpio, dac_calib, atest, _),
96762306a36Sopenharmony_ci	[25] = PINGROUP(25, cci_async, cci_timer0, _, pbs9, phase_flag, qdss_gpio, dac_calib, atest, _),
96862306a36Sopenharmony_ci	[26] = PINGROUP(26, _, pbs10, phase_flag, qdss_gpio, dac_calib, atest, vsense_trigger, _, _),
96962306a36Sopenharmony_ci	[27] = PINGROUP(27, cam_mclk, qdss_cti, _, _, _, _, _, _, _),
97062306a36Sopenharmony_ci	[28] = PINGROUP(28, cam_mclk, cci_timer2, qdss_cti, _, pwm_1, _, _, _, _),
97162306a36Sopenharmony_ci	[29] = PINGROUP(29, cci_i2c, _, phase_flag, dac_calib, atest, _, _, _, _),
97262306a36Sopenharmony_ci	[30] = PINGROUP(30, cci_i2c, _, phase_flag, dac_calib, atest, _, _, _, _),
97362306a36Sopenharmony_ci	[31] = PINGROUP(31, gp_pdm0, _, phase_flag, dac_calib, atest, _, _, _, _),
97462306a36Sopenharmony_ci	[32] = PINGROUP(32, cci_timer3, gp_pdm1, _, phase_flag, dac_calib, atest, _, _, _),
97562306a36Sopenharmony_ci	[33] = PINGROUP(33, gp_pdm2, _, phase_flag, dac_calib, atest, _, _, _, _),
97662306a36Sopenharmony_ci	[34] = PINGROUP(34, _, _, _, _, _, _, _, _, _),
97762306a36Sopenharmony_ci	[35] = PINGROUP(35, _, phase_flag, _, _, _, _, _, _, _),
97862306a36Sopenharmony_ci	[36] = PINGROUP(36, _, phase_flag, _, _, _, _, _, _, _),
97962306a36Sopenharmony_ci	[37] = PINGROUP(37, _, _, char_exec, _, _, _, _, _, _),
98062306a36Sopenharmony_ci	[38] = PINGROUP(38, _, _, _, char_exec, _, _, _, _, _),
98162306a36Sopenharmony_ci	[39] = PINGROUP(39, _, _, _, _, _, _, _, _, _),
98262306a36Sopenharmony_ci	[40] = PINGROUP(40, _, _, _, _, _, _, _, _, _),
98362306a36Sopenharmony_ci	[41] = PINGROUP(41, _, _, _, _, _, _, _, _, _),
98462306a36Sopenharmony_ci	[42] = PINGROUP(42, _, nav_gpio, _, _, _, _, _, _, _),
98562306a36Sopenharmony_ci	[43] = PINGROUP(43, _, _, phase_flag, _, _, _, _, _, _),
98662306a36Sopenharmony_ci	[44] = PINGROUP(44, _, _, phase_flag, _, _, _, _, _, _),
98762306a36Sopenharmony_ci	[45] = PINGROUP(45, _, _, phase_flag, _, _, _, _, _, _),
98862306a36Sopenharmony_ci	[46] = PINGROUP(46, _, _, _, _, _, _, _, _, _),
98962306a36Sopenharmony_ci	[47] = PINGROUP(47, _, nav_gpio, pbs14, qdss_gpio, _, _, _, _, _),
99062306a36Sopenharmony_ci	[48] = PINGROUP(48, _, vfr_1, _, pbs15, qdss_gpio, _, _, _, _),
99162306a36Sopenharmony_ci	[49] = PINGROUP(49, _, pa_indicator, _, _, _, _, _, _, _),
99262306a36Sopenharmony_ci	[50] = PINGROUP(50, _, _, _, _, _, _, _, _, _),
99362306a36Sopenharmony_ci	[51] = PINGROUP(51, _, _, _, pwm_2, _, _, _, _, _),
99462306a36Sopenharmony_ci	[52] = PINGROUP(52, _, nav_gpio, pbs_out, _, _, _, _, _, _),
99562306a36Sopenharmony_ci	[53] = PINGROUP(53, _, gsm1_tx, _, _, _, _, _, _, _),
99662306a36Sopenharmony_ci	[54] = PINGROUP(54, _, _, _, _, _, _, _, _, _),
99762306a36Sopenharmony_ci	[55] = PINGROUP(55, _, _, _, _, _, _, _, _, _),
99862306a36Sopenharmony_ci	[56] = PINGROUP(56, _, _, _, _, _, _, _, _, _),
99962306a36Sopenharmony_ci	[57] = PINGROUP(57, _, _, _, _, _, _, _, _, _),
100062306a36Sopenharmony_ci	[58] = PINGROUP(58, _, _, _, _, _, _, _, _, _),
100162306a36Sopenharmony_ci	[59] = PINGROUP(59, _, ssbi_wtr1, _, _, _, _, _, _, _),
100262306a36Sopenharmony_ci	[60] = PINGROUP(60, _, ssbi_wtr1, _, _, _, _, _, _, _),
100362306a36Sopenharmony_ci	[61] = PINGROUP(61, _, _, _, _, _, _, _, _, _),
100462306a36Sopenharmony_ci	[62] = PINGROUP(62, _, pll_bypassnl, _, _, _, _, _, _, _),
100562306a36Sopenharmony_ci	[63] = PINGROUP(63, pll_reset, _, phase_flag, ddr_pxi0, _, _, _, _, _),
100662306a36Sopenharmony_ci	[64] = PINGROUP(64, gsm0_tx, _, phase_flag, ddr_pxi0, _, _, _, _, _),
100762306a36Sopenharmony_ci	[65] = PINGROUP(65, _, _, _, _, _, _, _, _, _),
100862306a36Sopenharmony_ci	[66] = PINGROUP(66, _, _, _, _, _, _, _, _, _),
100962306a36Sopenharmony_ci	[67] = PINGROUP(67, _, _, _, _, _, _, _, _, _),
101062306a36Sopenharmony_ci	[68] = PINGROUP(68, _, _, _, _, _, _, _, _, _),
101162306a36Sopenharmony_ci	[69] = PINGROUP(69, qup1, gcc_gp2, qdss_gpio, ddr_pxi1, _, _, _, _, _),
101262306a36Sopenharmony_ci	[70] = PINGROUP(70, qup1, gcc_gp3, qdss_gpio, ddr_pxi1, _, _, _, _, _),
101362306a36Sopenharmony_ci	[71] = PINGROUP(71, qup2, dbg_out, _, _, _, _, _, _, _),
101462306a36Sopenharmony_ci	[72] = PINGROUP(72, uim2_data, qdss_cti, _, pwm_3, _, _, _, _, _),
101562306a36Sopenharmony_ci	[73] = PINGROUP(73, uim2_clk, _, qdss_cti, _, _, _, _, _, _),
101662306a36Sopenharmony_ci	[74] = PINGROUP(74, uim2_reset, _, _, pwm_4, _, _, _, _, _),
101762306a36Sopenharmony_ci	[75] = PINGROUP(75, uim2_present, _, _, pwm_5, _, _, _, _, _),
101862306a36Sopenharmony_ci	[76] = PINGROUP(76, uim1_data, _, _, _, _, _, _, _, _),
101962306a36Sopenharmony_ci	[77] = PINGROUP(77, uim1_clk, _, _, _, _, _, _, _, _),
102062306a36Sopenharmony_ci	[78] = PINGROUP(78, uim1_reset, _, _, _, _, _, _, _, _),
102162306a36Sopenharmony_ci	[79] = PINGROUP(79, uim1_present, _, _, _, _, _, _, _, _),
102262306a36Sopenharmony_ci	[80] = PINGROUP(80, qup2, dac_calib, _, _, _, _, _, _, _),
102362306a36Sopenharmony_ci	[81] = PINGROUP(81, mdp_vsync_out_0, mdp_vsync_out_1, mdp_vsync, dac_calib, _, _, _, _, _),
102462306a36Sopenharmony_ci	[82] = PINGROUP(82, qup0, dac_calib, _, pwm_6, _, _, _, _, _),
102562306a36Sopenharmony_ci	[83] = PINGROUP(83, _, _, _, _, _, _, _, _, _),
102662306a36Sopenharmony_ci	[84] = PINGROUP(84, _, _, _, _, _, _, _, _, _),
102762306a36Sopenharmony_ci	[85] = PINGROUP(85, _, _, _, _, _, _, _, _, _),
102862306a36Sopenharmony_ci	[86] = PINGROUP(86, qup0, gcc_gp1, atest, _, _, _, _, _, _),
102962306a36Sopenharmony_ci	[87] = PINGROUP(87, pbs11, qdss_gpio, _, _, _, _, _, _, _),
103062306a36Sopenharmony_ci	[88] = PINGROUP(88, _, _, _, _, _, _, _, _, _),
103162306a36Sopenharmony_ci	[89] = PINGROUP(89, usb_phy, atest, _, pwm_7, _, _, _, _, _),
103262306a36Sopenharmony_ci	[90] = PINGROUP(90, mss_lte, pbs12, qdss_gpio, _, _, _, _, _, _),
103362306a36Sopenharmony_ci	[91] = PINGROUP(91, mss_lte, pbs13, qdss_gpio, _, _, _, _, _, _),
103462306a36Sopenharmony_ci	[92] = PINGROUP(92, _, _, _, _, _, _, _, _, _),
103562306a36Sopenharmony_ci	[93] = PINGROUP(93, _, _, _, _, _, _, _, _, _),
103662306a36Sopenharmony_ci	[94] = PINGROUP(94, _, qdss_gpio, wlan1_adc0, _, _, _, _, _, _),
103762306a36Sopenharmony_ci	[95] = PINGROUP(95, nav_gpio, gp_pdm0, qdss_gpio, wlan1_adc1, _, _, _, _, _),
103862306a36Sopenharmony_ci	[96] = PINGROUP(96, qup4, nav_gpio, mdp_vsync, gp_pdm1, sd_write, jitter_bist, qdss_cti, qdss_cti, _),
103962306a36Sopenharmony_ci	[97] = PINGROUP(97, qup4, nav_gpio, mdp_vsync, gp_pdm2, jitter_bist, qdss_cti, qdss_cti, _, _),
104062306a36Sopenharmony_ci	[98] = PINGROUP(98, _, _, _, _, _, _, _, _, _),
104162306a36Sopenharmony_ci	[99] = PINGROUP(99, _, _, _, _, _, _, _, _, _),
104262306a36Sopenharmony_ci	[100] = PINGROUP(100, atest, _, _, _, _, _, _, _, _),
104362306a36Sopenharmony_ci	[101] = PINGROUP(101, atest, _, _, _, _, _, _, _, _),
104462306a36Sopenharmony_ci	[102] = PINGROUP(102, _, phase_flag, dac_calib, ddr_pxi2, _, _, _, _, _),
104562306a36Sopenharmony_ci	[103] = PINGROUP(103, _, phase_flag, dac_calib, ddr_pxi2, _, _, _, _, _),
104662306a36Sopenharmony_ci	[104] = PINGROUP(104, _, phase_flag, qdss_gpio, dac_calib, ddr_pxi3, _, pwm_8, _, _),
104762306a36Sopenharmony_ci	[105] = PINGROUP(105, _, phase_flag, qdss_gpio, dac_calib, ddr_pxi3, _, _, _, _),
104862306a36Sopenharmony_ci	[106] = PINGROUP(106, nav_gpio, gcc_gp3, qdss_gpio, _, _, _, _, _, _),
104962306a36Sopenharmony_ci	[107] = PINGROUP(107, nav_gpio, gcc_gp2, qdss_gpio, _, _, _, _, _, _),
105062306a36Sopenharmony_ci	[108] = PINGROUP(108, nav_gpio, _, _, _, _, _, _, _, _),
105162306a36Sopenharmony_ci	[109] = PINGROUP(109, _, qdss_gpio, _, _, _, _, _, _, _),
105262306a36Sopenharmony_ci	[110] = PINGROUP(110, _, qdss_gpio, _, _, _, _, _, _, _),
105362306a36Sopenharmony_ci	[111] = PINGROUP(111, _, _, _, _, _, _, _, _, _),
105462306a36Sopenharmony_ci	[112] = PINGROUP(112, _, _, _, _, _, _, _, _, _),
105562306a36Sopenharmony_ci	[113] = PINGROUP(113, _, _, _, _, _, _, _, _, _),
105662306a36Sopenharmony_ci	[114] = PINGROUP(114, _, _, _, _, _, _, _, _, _),
105762306a36Sopenharmony_ci	[115] = PINGROUP(115, _, pwm_9, _, _, _, _, _, _, _),
105862306a36Sopenharmony_ci	[116] = PINGROUP(116, _, _, _, _, _, _, _, _, _),
105962306a36Sopenharmony_ci	[117] = PINGROUP(117, _, _, _, _, _, _, _, _, _),
106062306a36Sopenharmony_ci	[118] = PINGROUP(118, _, _, _, _, _, _, _, _, _),
106162306a36Sopenharmony_ci	[119] = PINGROUP(119, _, _, _, _, _, _, _, _, _),
106262306a36Sopenharmony_ci	[120] = PINGROUP(120, _, _, _, _, _, _, _, _, _),
106362306a36Sopenharmony_ci	[121] = PINGROUP(121, _, _, _, _, _, _, _, _, _),
106462306a36Sopenharmony_ci	[122] = PINGROUP(122, _, _, _, _, _, _, _, _, _),
106562306a36Sopenharmony_ci	[123] = PINGROUP(123, _, _, _, _, _, _, _, _, _),
106662306a36Sopenharmony_ci	[124] = PINGROUP(124, _, _, _, _, _, _, _, _, _),
106762306a36Sopenharmony_ci	[125] = PINGROUP(125, _, _, _, _, _, _, _, _, _),
106862306a36Sopenharmony_ci	[126] = PINGROUP(126, _, _, _, _, _, _, _, _, _),
106962306a36Sopenharmony_ci	[127] = SDC_QDSD_PINGROUP(sdc1_rclk, 0x84004, 0, 0),
107062306a36Sopenharmony_ci	[128] = SDC_QDSD_PINGROUP(sdc1_clk, 0x84000, 13, 6),
107162306a36Sopenharmony_ci	[129] = SDC_QDSD_PINGROUP(sdc1_cmd, 0x84000, 11, 3),
107262306a36Sopenharmony_ci	[130] = SDC_QDSD_PINGROUP(sdc1_data, 0x84000, 9, 0),
107362306a36Sopenharmony_ci	[131] = SDC_QDSD_PINGROUP(sdc2_clk, 0x86000, 14, 6),
107462306a36Sopenharmony_ci	[132] = SDC_QDSD_PINGROUP(sdc2_cmd, 0x86000, 11, 3),
107562306a36Sopenharmony_ci	[133] = SDC_QDSD_PINGROUP(sdc2_data, 0x86000, 9, 0),
107662306a36Sopenharmony_ci};
107762306a36Sopenharmony_ci
107862306a36Sopenharmony_cistatic const struct msm_gpio_wakeirq_map qcm2290_mpm_map[] = {
107962306a36Sopenharmony_ci	{ 0, 84 }, { 3, 75 }, { 4, 16 }, { 6, 59 }, { 8, 63 }, { 11, 17 },
108062306a36Sopenharmony_ci	{ 13, 18 }, { 14, 51 }, { 17, 20 }, { 18, 52 }, { 19, 53 }, { 24, 6 },
108162306a36Sopenharmony_ci	{ 25, 71 }, { 27, 73 }, { 28, 41 }, { 31, 27 }, { 32, 54 }, { 33, 55 },
108262306a36Sopenharmony_ci	{ 34, 56 }, { 35, 57 }, { 36, 58 }, { 39, 28 }, { 46, 29 }, { 62, 60 },
108362306a36Sopenharmony_ci	{ 63, 61 }, { 64, 62 }, { 69, 33 }, { 70, 34 }, { 72, 72 }, { 75, 35 },
108462306a36Sopenharmony_ci	{ 79, 36 }, { 80, 21 }, { 81, 38 }, { 86, 19 }, { 87, 42 }, { 88, 43 },
108562306a36Sopenharmony_ci	{ 89, 45 }, { 91, 74 }, { 94, 47 }, { 95, 48 }, { 96, 49 }, { 97, 50 },
108662306a36Sopenharmony_ci};
108762306a36Sopenharmony_ci
108862306a36Sopenharmony_cistatic const struct msm_pinctrl_soc_data qcm2290_pinctrl = {
108962306a36Sopenharmony_ci	.pins = qcm2290_pins,
109062306a36Sopenharmony_ci	.npins = ARRAY_SIZE(qcm2290_pins),
109162306a36Sopenharmony_ci	.functions = qcm2290_functions,
109262306a36Sopenharmony_ci	.nfunctions = ARRAY_SIZE(qcm2290_functions),
109362306a36Sopenharmony_ci	.groups = qcm2290_groups,
109462306a36Sopenharmony_ci	.ngroups = ARRAY_SIZE(qcm2290_groups),
109562306a36Sopenharmony_ci	.ngpios = 127,
109662306a36Sopenharmony_ci	.wakeirq_map = qcm2290_mpm_map,
109762306a36Sopenharmony_ci	.nwakeirq_map = ARRAY_SIZE(qcm2290_mpm_map),
109862306a36Sopenharmony_ci};
109962306a36Sopenharmony_ci
110062306a36Sopenharmony_cistatic int qcm2290_pinctrl_probe(struct platform_device *pdev)
110162306a36Sopenharmony_ci{
110262306a36Sopenharmony_ci	return msm_pinctrl_probe(pdev, &qcm2290_pinctrl);
110362306a36Sopenharmony_ci}
110462306a36Sopenharmony_ci
110562306a36Sopenharmony_cistatic const struct of_device_id qcm2290_pinctrl_of_match[] = {
110662306a36Sopenharmony_ci	{ .compatible = "qcom,qcm2290-tlmm", },
110762306a36Sopenharmony_ci	{ },
110862306a36Sopenharmony_ci};
110962306a36Sopenharmony_ci
111062306a36Sopenharmony_cistatic struct platform_driver qcm2290_pinctrl_driver = {
111162306a36Sopenharmony_ci	.driver = {
111262306a36Sopenharmony_ci		.name = "qcm2290-pinctrl",
111362306a36Sopenharmony_ci		.of_match_table = qcm2290_pinctrl_of_match,
111462306a36Sopenharmony_ci	},
111562306a36Sopenharmony_ci	.probe = qcm2290_pinctrl_probe,
111662306a36Sopenharmony_ci	.remove = msm_pinctrl_remove,
111762306a36Sopenharmony_ci};
111862306a36Sopenharmony_ci
111962306a36Sopenharmony_cistatic int __init qcm2290_pinctrl_init(void)
112062306a36Sopenharmony_ci{
112162306a36Sopenharmony_ci	return platform_driver_register(&qcm2290_pinctrl_driver);
112262306a36Sopenharmony_ci}
112362306a36Sopenharmony_ciarch_initcall(qcm2290_pinctrl_init);
112462306a36Sopenharmony_ci
112562306a36Sopenharmony_cistatic void __exit qcm2290_pinctrl_exit(void)
112662306a36Sopenharmony_ci{
112762306a36Sopenharmony_ci	platform_driver_unregister(&qcm2290_pinctrl_driver);
112862306a36Sopenharmony_ci}
112962306a36Sopenharmony_cimodule_exit(qcm2290_pinctrl_exit);
113062306a36Sopenharmony_ci
113162306a36Sopenharmony_ciMODULE_DESCRIPTION("QTI QCM2290 pinctrl driver");
113262306a36Sopenharmony_ciMODULE_LICENSE("GPL v2");
113362306a36Sopenharmony_ciMODULE_DEVICE_TABLE(of, qcm2290_pinctrl_of_match);
1134