162306a36Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0-only
262306a36Sopenharmony_ci/*
362306a36Sopenharmony_ci * Copyright (c) 2015, 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_cistatic const struct pinctrl_pin_desc ipq4019_pins[] = {
1362306a36Sopenharmony_ci	PINCTRL_PIN(0, "GPIO_0"),
1462306a36Sopenharmony_ci	PINCTRL_PIN(1, "GPIO_1"),
1562306a36Sopenharmony_ci	PINCTRL_PIN(2, "GPIO_2"),
1662306a36Sopenharmony_ci	PINCTRL_PIN(3, "GPIO_3"),
1762306a36Sopenharmony_ci	PINCTRL_PIN(4, "GPIO_4"),
1862306a36Sopenharmony_ci	PINCTRL_PIN(5, "GPIO_5"),
1962306a36Sopenharmony_ci	PINCTRL_PIN(6, "GPIO_6"),
2062306a36Sopenharmony_ci	PINCTRL_PIN(7, "GPIO_7"),
2162306a36Sopenharmony_ci	PINCTRL_PIN(8, "GPIO_8"),
2262306a36Sopenharmony_ci	PINCTRL_PIN(9, "GPIO_9"),
2362306a36Sopenharmony_ci	PINCTRL_PIN(10, "GPIO_10"),
2462306a36Sopenharmony_ci	PINCTRL_PIN(11, "GPIO_11"),
2562306a36Sopenharmony_ci	PINCTRL_PIN(12, "GPIO_12"),
2662306a36Sopenharmony_ci	PINCTRL_PIN(13, "GPIO_13"),
2762306a36Sopenharmony_ci	PINCTRL_PIN(14, "GPIO_14"),
2862306a36Sopenharmony_ci	PINCTRL_PIN(15, "GPIO_15"),
2962306a36Sopenharmony_ci	PINCTRL_PIN(16, "GPIO_16"),
3062306a36Sopenharmony_ci	PINCTRL_PIN(17, "GPIO_17"),
3162306a36Sopenharmony_ci	PINCTRL_PIN(18, "GPIO_18"),
3262306a36Sopenharmony_ci	PINCTRL_PIN(19, "GPIO_19"),
3362306a36Sopenharmony_ci	PINCTRL_PIN(20, "GPIO_20"),
3462306a36Sopenharmony_ci	PINCTRL_PIN(21, "GPIO_21"),
3562306a36Sopenharmony_ci	PINCTRL_PIN(22, "GPIO_22"),
3662306a36Sopenharmony_ci	PINCTRL_PIN(23, "GPIO_23"),
3762306a36Sopenharmony_ci	PINCTRL_PIN(24, "GPIO_24"),
3862306a36Sopenharmony_ci	PINCTRL_PIN(25, "GPIO_25"),
3962306a36Sopenharmony_ci	PINCTRL_PIN(26, "GPIO_26"),
4062306a36Sopenharmony_ci	PINCTRL_PIN(27, "GPIO_27"),
4162306a36Sopenharmony_ci	PINCTRL_PIN(28, "GPIO_28"),
4262306a36Sopenharmony_ci	PINCTRL_PIN(29, "GPIO_29"),
4362306a36Sopenharmony_ci	PINCTRL_PIN(30, "GPIO_30"),
4462306a36Sopenharmony_ci	PINCTRL_PIN(31, "GPIO_31"),
4562306a36Sopenharmony_ci	PINCTRL_PIN(32, "GPIO_32"),
4662306a36Sopenharmony_ci	PINCTRL_PIN(33, "GPIO_33"),
4762306a36Sopenharmony_ci	PINCTRL_PIN(34, "GPIO_34"),
4862306a36Sopenharmony_ci	PINCTRL_PIN(35, "GPIO_35"),
4962306a36Sopenharmony_ci	PINCTRL_PIN(36, "GPIO_36"),
5062306a36Sopenharmony_ci	PINCTRL_PIN(37, "GPIO_37"),
5162306a36Sopenharmony_ci	PINCTRL_PIN(38, "GPIO_38"),
5262306a36Sopenharmony_ci	PINCTRL_PIN(39, "GPIO_39"),
5362306a36Sopenharmony_ci	PINCTRL_PIN(40, "GPIO_40"),
5462306a36Sopenharmony_ci	PINCTRL_PIN(41, "GPIO_41"),
5562306a36Sopenharmony_ci	PINCTRL_PIN(42, "GPIO_42"),
5662306a36Sopenharmony_ci	PINCTRL_PIN(43, "GPIO_43"),
5762306a36Sopenharmony_ci	PINCTRL_PIN(44, "GPIO_44"),
5862306a36Sopenharmony_ci	PINCTRL_PIN(45, "GPIO_45"),
5962306a36Sopenharmony_ci	PINCTRL_PIN(46, "GPIO_46"),
6062306a36Sopenharmony_ci	PINCTRL_PIN(47, "GPIO_47"),
6162306a36Sopenharmony_ci	PINCTRL_PIN(48, "GPIO_48"),
6262306a36Sopenharmony_ci	PINCTRL_PIN(49, "GPIO_49"),
6362306a36Sopenharmony_ci	PINCTRL_PIN(50, "GPIO_50"),
6462306a36Sopenharmony_ci	PINCTRL_PIN(51, "GPIO_51"),
6562306a36Sopenharmony_ci	PINCTRL_PIN(52, "GPIO_52"),
6662306a36Sopenharmony_ci	PINCTRL_PIN(53, "GPIO_53"),
6762306a36Sopenharmony_ci	PINCTRL_PIN(54, "GPIO_54"),
6862306a36Sopenharmony_ci	PINCTRL_PIN(55, "GPIO_55"),
6962306a36Sopenharmony_ci	PINCTRL_PIN(56, "GPIO_56"),
7062306a36Sopenharmony_ci	PINCTRL_PIN(57, "GPIO_57"),
7162306a36Sopenharmony_ci	PINCTRL_PIN(58, "GPIO_58"),
7262306a36Sopenharmony_ci	PINCTRL_PIN(59, "GPIO_59"),
7362306a36Sopenharmony_ci	PINCTRL_PIN(60, "GPIO_60"),
7462306a36Sopenharmony_ci	PINCTRL_PIN(61, "GPIO_61"),
7562306a36Sopenharmony_ci	PINCTRL_PIN(62, "GPIO_62"),
7662306a36Sopenharmony_ci	PINCTRL_PIN(63, "GPIO_63"),
7762306a36Sopenharmony_ci	PINCTRL_PIN(64, "GPIO_64"),
7862306a36Sopenharmony_ci	PINCTRL_PIN(65, "GPIO_65"),
7962306a36Sopenharmony_ci	PINCTRL_PIN(66, "GPIO_66"),
8062306a36Sopenharmony_ci	PINCTRL_PIN(67, "GPIO_67"),
8162306a36Sopenharmony_ci	PINCTRL_PIN(68, "GPIO_68"),
8262306a36Sopenharmony_ci	PINCTRL_PIN(69, "GPIO_69"),
8362306a36Sopenharmony_ci	PINCTRL_PIN(70, "GPIO_70"),
8462306a36Sopenharmony_ci	PINCTRL_PIN(71, "GPIO_71"),
8562306a36Sopenharmony_ci	PINCTRL_PIN(72, "GPIO_72"),
8662306a36Sopenharmony_ci	PINCTRL_PIN(73, "GPIO_73"),
8762306a36Sopenharmony_ci	PINCTRL_PIN(74, "GPIO_74"),
8862306a36Sopenharmony_ci	PINCTRL_PIN(75, "GPIO_75"),
8962306a36Sopenharmony_ci	PINCTRL_PIN(76, "GPIO_76"),
9062306a36Sopenharmony_ci	PINCTRL_PIN(77, "GPIO_77"),
9162306a36Sopenharmony_ci	PINCTRL_PIN(78, "GPIO_78"),
9262306a36Sopenharmony_ci	PINCTRL_PIN(79, "GPIO_79"),
9362306a36Sopenharmony_ci	PINCTRL_PIN(80, "GPIO_80"),
9462306a36Sopenharmony_ci	PINCTRL_PIN(81, "GPIO_81"),
9562306a36Sopenharmony_ci	PINCTRL_PIN(82, "GPIO_82"),
9662306a36Sopenharmony_ci	PINCTRL_PIN(83, "GPIO_83"),
9762306a36Sopenharmony_ci	PINCTRL_PIN(84, "GPIO_84"),
9862306a36Sopenharmony_ci	PINCTRL_PIN(85, "GPIO_85"),
9962306a36Sopenharmony_ci	PINCTRL_PIN(86, "GPIO_86"),
10062306a36Sopenharmony_ci	PINCTRL_PIN(87, "GPIO_87"),
10162306a36Sopenharmony_ci	PINCTRL_PIN(88, "GPIO_88"),
10262306a36Sopenharmony_ci	PINCTRL_PIN(89, "GPIO_89"),
10362306a36Sopenharmony_ci	PINCTRL_PIN(90, "GPIO_90"),
10462306a36Sopenharmony_ci	PINCTRL_PIN(91, "GPIO_91"),
10562306a36Sopenharmony_ci	PINCTRL_PIN(92, "GPIO_92"),
10662306a36Sopenharmony_ci	PINCTRL_PIN(93, "GPIO_93"),
10762306a36Sopenharmony_ci	PINCTRL_PIN(94, "GPIO_94"),
10862306a36Sopenharmony_ci	PINCTRL_PIN(95, "GPIO_95"),
10962306a36Sopenharmony_ci	PINCTRL_PIN(96, "GPIO_96"),
11062306a36Sopenharmony_ci	PINCTRL_PIN(97, "GPIO_97"),
11162306a36Sopenharmony_ci	PINCTRL_PIN(98, "GPIO_98"),
11262306a36Sopenharmony_ci	PINCTRL_PIN(99, "GPIO_99"),
11362306a36Sopenharmony_ci};
11462306a36Sopenharmony_ci
11562306a36Sopenharmony_ci#define DECLARE_QCA_GPIO_PINS(pin) \
11662306a36Sopenharmony_ci	static const unsigned int gpio##pin##_pins[] = { pin }
11762306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(0);
11862306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(1);
11962306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(2);
12062306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(3);
12162306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(4);
12262306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(5);
12362306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(6);
12462306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(7);
12562306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(8);
12662306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(9);
12762306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(10);
12862306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(11);
12962306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(12);
13062306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(13);
13162306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(14);
13262306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(15);
13362306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(16);
13462306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(17);
13562306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(18);
13662306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(19);
13762306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(20);
13862306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(21);
13962306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(22);
14062306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(23);
14162306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(24);
14262306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(25);
14362306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(26);
14462306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(27);
14562306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(28);
14662306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(29);
14762306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(30);
14862306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(31);
14962306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(32);
15062306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(33);
15162306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(34);
15262306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(35);
15362306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(36);
15462306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(37);
15562306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(38);
15662306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(39);
15762306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(40);
15862306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(41);
15962306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(42);
16062306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(43);
16162306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(44);
16262306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(45);
16362306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(46);
16462306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(47);
16562306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(48);
16662306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(49);
16762306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(50);
16862306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(51);
16962306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(52);
17062306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(53);
17162306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(54);
17262306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(55);
17362306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(56);
17462306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(57);
17562306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(58);
17662306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(59);
17762306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(60);
17862306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(61);
17962306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(62);
18062306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(63);
18162306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(64);
18262306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(65);
18362306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(66);
18462306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(67);
18562306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(68);
18662306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(69);
18762306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(70);
18862306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(71);
18962306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(72);
19062306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(73);
19162306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(74);
19262306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(75);
19362306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(76);
19462306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(77);
19562306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(78);
19662306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(79);
19762306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(80);
19862306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(81);
19962306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(82);
20062306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(83);
20162306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(84);
20262306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(85);
20362306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(86);
20462306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(87);
20562306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(88);
20662306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(89);
20762306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(90);
20862306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(91);
20962306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(92);
21062306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(93);
21162306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(94);
21262306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(95);
21362306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(96);
21462306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(97);
21562306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(98);
21662306a36Sopenharmony_ciDECLARE_QCA_GPIO_PINS(99);
21762306a36Sopenharmony_ci
21862306a36Sopenharmony_ci#define PINGROUP(id, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14) \
21962306a36Sopenharmony_ci	{					        \
22062306a36Sopenharmony_ci		.grp = PINCTRL_PINGROUP("gpio" #id, 	\
22162306a36Sopenharmony_ci			gpio##id##_pins, 		\
22262306a36Sopenharmony_ci			ARRAY_SIZE(gpio##id##_pins)),	\
22362306a36Sopenharmony_ci		.funcs = (int[]){			\
22462306a36Sopenharmony_ci			qca_mux_gpio, /* gpio mode */	\
22562306a36Sopenharmony_ci			qca_mux_##f1,			\
22662306a36Sopenharmony_ci			qca_mux_##f2,			\
22762306a36Sopenharmony_ci			qca_mux_##f3,			\
22862306a36Sopenharmony_ci			qca_mux_##f4,			\
22962306a36Sopenharmony_ci			qca_mux_##f5,			\
23062306a36Sopenharmony_ci			qca_mux_##f6,			\
23162306a36Sopenharmony_ci			qca_mux_##f7,			\
23262306a36Sopenharmony_ci			qca_mux_##f8,			\
23362306a36Sopenharmony_ci			qca_mux_##f9,			\
23462306a36Sopenharmony_ci			qca_mux_##f10,			\
23562306a36Sopenharmony_ci			qca_mux_##f11,			\
23662306a36Sopenharmony_ci			qca_mux_##f12,			\
23762306a36Sopenharmony_ci			qca_mux_##f13,			\
23862306a36Sopenharmony_ci			qca_mux_##f14			\
23962306a36Sopenharmony_ci		},				        \
24062306a36Sopenharmony_ci		.nfuncs = 15,				\
24162306a36Sopenharmony_ci		.ctl_reg = 0x0 + 0x1000 * id,		\
24262306a36Sopenharmony_ci		.io_reg = 0x4 + 0x1000 * id,		\
24362306a36Sopenharmony_ci		.intr_cfg_reg = 0x8 + 0x1000 * id,	\
24462306a36Sopenharmony_ci		.intr_status_reg = 0xc + 0x1000 * id,	\
24562306a36Sopenharmony_ci		.intr_target_reg = 0x8 + 0x1000 * id,	\
24662306a36Sopenharmony_ci		.mux_bit = 2,			\
24762306a36Sopenharmony_ci		.pull_bit = 0,			\
24862306a36Sopenharmony_ci		.drv_bit = 6,			\
24962306a36Sopenharmony_ci		.od_bit = 12,			\
25062306a36Sopenharmony_ci		.oe_bit = 9,			\
25162306a36Sopenharmony_ci		.in_bit = 0,			\
25262306a36Sopenharmony_ci		.out_bit = 1,			\
25362306a36Sopenharmony_ci		.intr_enable_bit = 0,		\
25462306a36Sopenharmony_ci		.intr_status_bit = 0,		\
25562306a36Sopenharmony_ci		.intr_target_bit = 5,		\
25662306a36Sopenharmony_ci		.intr_raw_status_bit = 4,	\
25762306a36Sopenharmony_ci		.intr_polarity_bit = 1,		\
25862306a36Sopenharmony_ci		.intr_detection_bit = 2,	\
25962306a36Sopenharmony_ci		.intr_detection_width = 2,	\
26062306a36Sopenharmony_ci	}
26162306a36Sopenharmony_ci
26262306a36Sopenharmony_ci
26362306a36Sopenharmony_cienum ipq4019_functions {
26462306a36Sopenharmony_ci	qca_mux_gpio,
26562306a36Sopenharmony_ci	qca_mux_aud_pin,
26662306a36Sopenharmony_ci	qca_mux_audio_pwm,
26762306a36Sopenharmony_ci	qca_mux_blsp_i2c0,
26862306a36Sopenharmony_ci	qca_mux_blsp_i2c1,
26962306a36Sopenharmony_ci	qca_mux_blsp_spi0,
27062306a36Sopenharmony_ci	qca_mux_blsp_spi1,
27162306a36Sopenharmony_ci	qca_mux_blsp_uart0,
27262306a36Sopenharmony_ci	qca_mux_blsp_uart1,
27362306a36Sopenharmony_ci	qca_mux_chip_rst,
27462306a36Sopenharmony_ci	qca_mux_i2s_rx,
27562306a36Sopenharmony_ci	qca_mux_i2s_spdif_in,
27662306a36Sopenharmony_ci	qca_mux_i2s_spdif_out,
27762306a36Sopenharmony_ci	qca_mux_i2s_td,
27862306a36Sopenharmony_ci	qca_mux_i2s_tx,
27962306a36Sopenharmony_ci	qca_mux_jtag,
28062306a36Sopenharmony_ci	qca_mux_led0,
28162306a36Sopenharmony_ci	qca_mux_led1,
28262306a36Sopenharmony_ci	qca_mux_led2,
28362306a36Sopenharmony_ci	qca_mux_led3,
28462306a36Sopenharmony_ci	qca_mux_led4,
28562306a36Sopenharmony_ci	qca_mux_led5,
28662306a36Sopenharmony_ci	qca_mux_led6,
28762306a36Sopenharmony_ci	qca_mux_led7,
28862306a36Sopenharmony_ci	qca_mux_led8,
28962306a36Sopenharmony_ci	qca_mux_led9,
29062306a36Sopenharmony_ci	qca_mux_led10,
29162306a36Sopenharmony_ci	qca_mux_led11,
29262306a36Sopenharmony_ci	qca_mux_mdc,
29362306a36Sopenharmony_ci	qca_mux_mdio,
29462306a36Sopenharmony_ci	qca_mux_pcie,
29562306a36Sopenharmony_ci	qca_mux_pmu,
29662306a36Sopenharmony_ci	qca_mux_prng_rosc,
29762306a36Sopenharmony_ci	qca_mux_qpic,
29862306a36Sopenharmony_ci	qca_mux_rgmii,
29962306a36Sopenharmony_ci	qca_mux_rmii,
30062306a36Sopenharmony_ci	qca_mux_sdio,
30162306a36Sopenharmony_ci	qca_mux_smart0,
30262306a36Sopenharmony_ci	qca_mux_smart1,
30362306a36Sopenharmony_ci	qca_mux_smart2,
30462306a36Sopenharmony_ci	qca_mux_smart3,
30562306a36Sopenharmony_ci	qca_mux_tm,
30662306a36Sopenharmony_ci	qca_mux_wifi0,
30762306a36Sopenharmony_ci	qca_mux_wifi1,
30862306a36Sopenharmony_ci	qca_mux_NA,
30962306a36Sopenharmony_ci};
31062306a36Sopenharmony_ci
31162306a36Sopenharmony_cistatic const char * const gpio_groups[] = {
31262306a36Sopenharmony_ci	"gpio0", "gpio1", "gpio2", "gpio3", "gpio4", "gpio5", "gpio6", "gpio7",
31362306a36Sopenharmony_ci	"gpio8", "gpio9", "gpio10", "gpio11", "gpio12", "gpio13", "gpio14",
31462306a36Sopenharmony_ci	"gpio15", "gpio16", "gpio17", "gpio18", "gpio19", "gpio20", "gpio21",
31562306a36Sopenharmony_ci	"gpio22", "gpio23", "gpio24", "gpio25", "gpio26", "gpio27", "gpio28",
31662306a36Sopenharmony_ci	"gpio29", "gpio30", "gpio31", "gpio32", "gpio33", "gpio34", "gpio35",
31762306a36Sopenharmony_ci	"gpio36", "gpio37", "gpio38", "gpio39", "gpio40", "gpio41", "gpio42",
31862306a36Sopenharmony_ci	"gpio43", "gpio44", "gpio45", "gpio46", "gpio47", "gpio48", "gpio49",
31962306a36Sopenharmony_ci	"gpio50", "gpio51", "gpio52", "gpio53", "gpio54", "gpio55", "gpio56",
32062306a36Sopenharmony_ci	"gpio57", "gpio58", "gpio59", "gpio60", "gpio61", "gpio62", "gpio63",
32162306a36Sopenharmony_ci	"gpio64", "gpio65", "gpio66", "gpio67", "gpio68", "gpio69", "gpio70",
32262306a36Sopenharmony_ci	"gpio71", "gpio72", "gpio73", "gpio74", "gpio75", "gpio76", "gpio77",
32362306a36Sopenharmony_ci	"gpio78", "gpio79", "gpio80", "gpio81", "gpio82", "gpio83", "gpio84",
32462306a36Sopenharmony_ci	"gpio85", "gpio86", "gpio87", "gpio88", "gpio89", "gpio90", "gpio91",
32562306a36Sopenharmony_ci	"gpio92", "gpio93", "gpio94", "gpio95", "gpio96", "gpio97", "gpio98",
32662306a36Sopenharmony_ci	"gpio99",
32762306a36Sopenharmony_ci};
32862306a36Sopenharmony_cistatic const char * const aud_pin_groups[] = {
32962306a36Sopenharmony_ci	"gpio48", "gpio49", "gpio50", "gpio51",
33062306a36Sopenharmony_ci};
33162306a36Sopenharmony_cistatic const char * const audio_pwm_groups[] = {
33262306a36Sopenharmony_ci	"gpio30", "gpio31", "gpio32", "gpio33", "gpio64", "gpio65", "gpio66",
33362306a36Sopenharmony_ci	"gpio67",
33462306a36Sopenharmony_ci};
33562306a36Sopenharmony_cistatic const char * const blsp_i2c0_groups[] = {
33662306a36Sopenharmony_ci	"gpio10", "gpio11", "gpio20", "gpio21", "gpio58", "gpio59",
33762306a36Sopenharmony_ci};
33862306a36Sopenharmony_cistatic const char * const blsp_i2c1_groups[] = {
33962306a36Sopenharmony_ci	"gpio12", "gpio13", "gpio34", "gpio35",
34062306a36Sopenharmony_ci};
34162306a36Sopenharmony_cistatic const char * const blsp_spi0_groups[] = {
34262306a36Sopenharmony_ci	"gpio12", "gpio13", "gpio14", "gpio15", "gpio45", "gpio54", "gpio55",
34362306a36Sopenharmony_ci	"gpio56", "gpio57",
34462306a36Sopenharmony_ci};
34562306a36Sopenharmony_cistatic const char * const blsp_spi1_groups[] = {
34662306a36Sopenharmony_ci	"gpio44", "gpio45", "gpio46", "gpio47",
34762306a36Sopenharmony_ci};
34862306a36Sopenharmony_cistatic const char * const blsp_uart0_groups[] = {
34962306a36Sopenharmony_ci	"gpio16", "gpio17", "gpio60", "gpio61",
35062306a36Sopenharmony_ci};
35162306a36Sopenharmony_cistatic const char * const blsp_uart1_groups[] = {
35262306a36Sopenharmony_ci	"gpio8", "gpio9", "gpio10", "gpio11",
35362306a36Sopenharmony_ci};
35462306a36Sopenharmony_cistatic const char * const chip_rst_groups[] = {
35562306a36Sopenharmony_ci	"gpio62",
35662306a36Sopenharmony_ci};
35762306a36Sopenharmony_cistatic const char * const i2s_rx_groups[] = {
35862306a36Sopenharmony_ci	"gpio0", "gpio1", "gpio2", "gpio20", "gpio21", "gpio22", "gpio23",
35962306a36Sopenharmony_ci	"gpio58", "gpio60", "gpio61", "gpio63",
36062306a36Sopenharmony_ci};
36162306a36Sopenharmony_cistatic const char * const i2s_spdif_in_groups[] = {
36262306a36Sopenharmony_ci	"gpio34", "gpio59", "gpio63",
36362306a36Sopenharmony_ci};
36462306a36Sopenharmony_cistatic const char * const i2s_spdif_out_groups[] = {
36562306a36Sopenharmony_ci	"gpio35", "gpio62", "gpio63",
36662306a36Sopenharmony_ci};
36762306a36Sopenharmony_cistatic const char * const i2s_td_groups[] = {
36862306a36Sopenharmony_ci	"gpio27", "gpio28", "gpio29", "gpio54", "gpio55", "gpio56", "gpio63",
36962306a36Sopenharmony_ci};
37062306a36Sopenharmony_cistatic const char * const i2s_tx_groups[] = {
37162306a36Sopenharmony_ci	"gpio24", "gpio25", "gpio26", "gpio52", "gpio53", "gpio57", "gpio60",
37262306a36Sopenharmony_ci	"gpio61",
37362306a36Sopenharmony_ci};
37462306a36Sopenharmony_cistatic const char * const jtag_groups[] = {
37562306a36Sopenharmony_ci	"gpio0", "gpio1", "gpio2", "gpio3", "gpio4", "gpio5",
37662306a36Sopenharmony_ci};
37762306a36Sopenharmony_cistatic const char * const led0_groups[] = {
37862306a36Sopenharmony_ci	"gpio16", "gpio36", "gpio60",
37962306a36Sopenharmony_ci};
38062306a36Sopenharmony_cistatic const char * const led1_groups[] = {
38162306a36Sopenharmony_ci	"gpio17", "gpio37", "gpio61",
38262306a36Sopenharmony_ci};
38362306a36Sopenharmony_cistatic const char * const led2_groups[] = {
38462306a36Sopenharmony_ci	"gpio36", "gpio38", "gpio58",
38562306a36Sopenharmony_ci};
38662306a36Sopenharmony_cistatic const char * const led3_groups[] = {
38762306a36Sopenharmony_ci	"gpio39",
38862306a36Sopenharmony_ci};
38962306a36Sopenharmony_cistatic const char * const led4_groups[] = {
39062306a36Sopenharmony_ci	"gpio40",
39162306a36Sopenharmony_ci};
39262306a36Sopenharmony_cistatic const char * const led5_groups[] = {
39362306a36Sopenharmony_ci	"gpio44",
39462306a36Sopenharmony_ci};
39562306a36Sopenharmony_cistatic const char * const led6_groups[] = {
39662306a36Sopenharmony_ci	"gpio45",
39762306a36Sopenharmony_ci};
39862306a36Sopenharmony_cistatic const char * const led7_groups[] = {
39962306a36Sopenharmony_ci	"gpio46",
40062306a36Sopenharmony_ci};
40162306a36Sopenharmony_cistatic const char * const led8_groups[] = {
40262306a36Sopenharmony_ci	"gpio47",
40362306a36Sopenharmony_ci};
40462306a36Sopenharmony_cistatic const char * const led9_groups[] = {
40562306a36Sopenharmony_ci	"gpio48",
40662306a36Sopenharmony_ci};
40762306a36Sopenharmony_cistatic const char * const led10_groups[] = {
40862306a36Sopenharmony_ci	"gpio49",
40962306a36Sopenharmony_ci};
41062306a36Sopenharmony_cistatic const char * const led11_groups[] = {
41162306a36Sopenharmony_ci	"gpio50",
41262306a36Sopenharmony_ci};
41362306a36Sopenharmony_cistatic const char * const mdc_groups[] = {
41462306a36Sopenharmony_ci	"gpio7", "gpio52",
41562306a36Sopenharmony_ci};
41662306a36Sopenharmony_cistatic const char * const mdio_groups[] = {
41762306a36Sopenharmony_ci	"gpio6", "gpio53",
41862306a36Sopenharmony_ci};
41962306a36Sopenharmony_cistatic const char * const pcie_groups[] = {
42062306a36Sopenharmony_ci	"gpio39", "gpio52",
42162306a36Sopenharmony_ci};
42262306a36Sopenharmony_cistatic const char * const pmu_groups[] = {
42362306a36Sopenharmony_ci	"gpio54", "gpio55",
42462306a36Sopenharmony_ci};
42562306a36Sopenharmony_cistatic const char * const prng_rosc_groups[] = {
42662306a36Sopenharmony_ci	"gpio53",
42762306a36Sopenharmony_ci};
42862306a36Sopenharmony_cistatic const char * const qpic_groups[] = {
42962306a36Sopenharmony_ci	"gpio52", "gpio53", "gpio54", "gpio55", "gpio56", "gpio57", "gpio58",
43062306a36Sopenharmony_ci	"gpio59", "gpio60", "gpio61", "gpio62", "gpio63", "gpio64", "gpio65",
43162306a36Sopenharmony_ci	"gpio66", "gpio67", "gpio68", "gpio69",
43262306a36Sopenharmony_ci};
43362306a36Sopenharmony_cistatic const char * const rgmii_groups[] = {
43462306a36Sopenharmony_ci	"gpio22", "gpio23", "gpio24", "gpio25", "gpio26", "gpio27", "gpio28",
43562306a36Sopenharmony_ci	"gpio29", "gpio30", "gpio31", "gpio32", "gpio33",
43662306a36Sopenharmony_ci};
43762306a36Sopenharmony_cistatic const char * const rmii_groups[] = {
43862306a36Sopenharmony_ci	"gpio36", "gpio37", "gpio38", "gpio39", "gpio40", "gpio41", "gpio42",
43962306a36Sopenharmony_ci	"gpio43", "gpio44", "gpio45", "gpio46", "gpio47", "gpio48", "gpio49",
44062306a36Sopenharmony_ci	"gpio50", "gpio51",
44162306a36Sopenharmony_ci};
44262306a36Sopenharmony_cistatic const char * const sdio_groups[] = {
44362306a36Sopenharmony_ci	"gpio23", "gpio24", "gpio25", "gpio26", "gpio27", "gpio28", "gpio29",
44462306a36Sopenharmony_ci	"gpio30", "gpio31", "gpio32",
44562306a36Sopenharmony_ci};
44662306a36Sopenharmony_cistatic const char * const smart0_groups[] = {
44762306a36Sopenharmony_ci	"gpio0", "gpio1", "gpio2", "gpio5", "gpio44", "gpio45", "gpio46",
44862306a36Sopenharmony_ci	"gpio47",
44962306a36Sopenharmony_ci};
45062306a36Sopenharmony_cistatic const char * const smart1_groups[] = {
45162306a36Sopenharmony_ci	"gpio8", "gpio9", "gpio16", "gpio17", "gpio58", "gpio59", "gpio60",
45262306a36Sopenharmony_ci	"gpio61",
45362306a36Sopenharmony_ci};
45462306a36Sopenharmony_cistatic const char * const smart2_groups[] = {
45562306a36Sopenharmony_ci	"gpio40", "gpio41", "gpio48", "gpio49",
45662306a36Sopenharmony_ci};
45762306a36Sopenharmony_cistatic const char * const smart3_groups[] = {
45862306a36Sopenharmony_ci	"gpio58", "gpio59", "gpio60", "gpio61",
45962306a36Sopenharmony_ci};
46062306a36Sopenharmony_cistatic const char * const tm_groups[] = {
46162306a36Sopenharmony_ci	"gpio52", "gpio53", "gpio54", "gpio55", "gpio56", "gpio57", "gpio58",
46262306a36Sopenharmony_ci	"gpio59", "gpio60", "gpio61", "gpio62", "gpio63",
46362306a36Sopenharmony_ci};
46462306a36Sopenharmony_cistatic const char * const wifi0_groups[] = {
46562306a36Sopenharmony_ci	"gpio37", "gpio40", "gpio41", "gpio42", "gpio50", "gpio51", "gpio52",
46662306a36Sopenharmony_ci	"gpio53", "gpio56", "gpio57", "gpio58", "gpio98",
46762306a36Sopenharmony_ci};
46862306a36Sopenharmony_cistatic const char * const wifi1_groups[] = {
46962306a36Sopenharmony_ci	"gpio37", "gpio40", "gpio41", "gpio43", "gpio50", "gpio51", "gpio52",
47062306a36Sopenharmony_ci	"gpio53", "gpio56", "gpio57", "gpio58", "gpio98",
47162306a36Sopenharmony_ci};
47262306a36Sopenharmony_ci
47362306a36Sopenharmony_cistatic const struct pinfunction ipq4019_functions[] = {
47462306a36Sopenharmony_ci	QCA_PIN_FUNCTION(aud_pin),
47562306a36Sopenharmony_ci	QCA_PIN_FUNCTION(audio_pwm),
47662306a36Sopenharmony_ci	QCA_PIN_FUNCTION(blsp_i2c0),
47762306a36Sopenharmony_ci	QCA_PIN_FUNCTION(blsp_i2c1),
47862306a36Sopenharmony_ci	QCA_PIN_FUNCTION(blsp_spi0),
47962306a36Sopenharmony_ci	QCA_PIN_FUNCTION(blsp_spi1),
48062306a36Sopenharmony_ci	QCA_PIN_FUNCTION(blsp_uart0),
48162306a36Sopenharmony_ci	QCA_PIN_FUNCTION(blsp_uart1),
48262306a36Sopenharmony_ci	QCA_PIN_FUNCTION(chip_rst),
48362306a36Sopenharmony_ci	QCA_PIN_FUNCTION(gpio),
48462306a36Sopenharmony_ci	QCA_PIN_FUNCTION(i2s_rx),
48562306a36Sopenharmony_ci	QCA_PIN_FUNCTION(i2s_spdif_in),
48662306a36Sopenharmony_ci	QCA_PIN_FUNCTION(i2s_spdif_out),
48762306a36Sopenharmony_ci	QCA_PIN_FUNCTION(i2s_td),
48862306a36Sopenharmony_ci	QCA_PIN_FUNCTION(i2s_tx),
48962306a36Sopenharmony_ci	QCA_PIN_FUNCTION(jtag),
49062306a36Sopenharmony_ci	QCA_PIN_FUNCTION(led0),
49162306a36Sopenharmony_ci	QCA_PIN_FUNCTION(led1),
49262306a36Sopenharmony_ci	QCA_PIN_FUNCTION(led2),
49362306a36Sopenharmony_ci	QCA_PIN_FUNCTION(led3),
49462306a36Sopenharmony_ci	QCA_PIN_FUNCTION(led4),
49562306a36Sopenharmony_ci	QCA_PIN_FUNCTION(led5),
49662306a36Sopenharmony_ci	QCA_PIN_FUNCTION(led6),
49762306a36Sopenharmony_ci	QCA_PIN_FUNCTION(led7),
49862306a36Sopenharmony_ci	QCA_PIN_FUNCTION(led8),
49962306a36Sopenharmony_ci	QCA_PIN_FUNCTION(led9),
50062306a36Sopenharmony_ci	QCA_PIN_FUNCTION(led10),
50162306a36Sopenharmony_ci	QCA_PIN_FUNCTION(led11),
50262306a36Sopenharmony_ci	QCA_PIN_FUNCTION(mdc),
50362306a36Sopenharmony_ci	QCA_PIN_FUNCTION(mdio),
50462306a36Sopenharmony_ci	QCA_PIN_FUNCTION(pcie),
50562306a36Sopenharmony_ci	QCA_PIN_FUNCTION(pmu),
50662306a36Sopenharmony_ci	QCA_PIN_FUNCTION(prng_rosc),
50762306a36Sopenharmony_ci	QCA_PIN_FUNCTION(qpic),
50862306a36Sopenharmony_ci	QCA_PIN_FUNCTION(rgmii),
50962306a36Sopenharmony_ci	QCA_PIN_FUNCTION(rmii),
51062306a36Sopenharmony_ci	QCA_PIN_FUNCTION(sdio),
51162306a36Sopenharmony_ci	QCA_PIN_FUNCTION(smart0),
51262306a36Sopenharmony_ci	QCA_PIN_FUNCTION(smart1),
51362306a36Sopenharmony_ci	QCA_PIN_FUNCTION(smart2),
51462306a36Sopenharmony_ci	QCA_PIN_FUNCTION(smart3),
51562306a36Sopenharmony_ci	QCA_PIN_FUNCTION(tm),
51662306a36Sopenharmony_ci	QCA_PIN_FUNCTION(wifi0),
51762306a36Sopenharmony_ci	QCA_PIN_FUNCTION(wifi1),
51862306a36Sopenharmony_ci};
51962306a36Sopenharmony_ci
52062306a36Sopenharmony_cistatic const struct msm_pingroup ipq4019_groups[] = {
52162306a36Sopenharmony_ci	PINGROUP(0, jtag, smart0, i2s_rx, NA, NA, NA, NA, NA, NA, NA, NA, NA,
52262306a36Sopenharmony_ci		 NA, NA),
52362306a36Sopenharmony_ci	PINGROUP(1, jtag, smart0, i2s_rx, NA, NA, NA, NA, NA, NA, NA, NA, NA,
52462306a36Sopenharmony_ci		 NA, NA),
52562306a36Sopenharmony_ci	PINGROUP(2, jtag, smart0, i2s_rx, NA, NA, NA, NA, NA, NA, NA, NA, NA,
52662306a36Sopenharmony_ci		 NA, NA),
52762306a36Sopenharmony_ci	PINGROUP(3, jtag, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
52862306a36Sopenharmony_ci	PINGROUP(4, jtag, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
52962306a36Sopenharmony_ci	PINGROUP(5, jtag, smart0, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
53062306a36Sopenharmony_ci		 NA),
53162306a36Sopenharmony_ci	PINGROUP(6, mdio, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
53262306a36Sopenharmony_ci	PINGROUP(7, mdc, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
53362306a36Sopenharmony_ci	PINGROUP(8, blsp_uart1, NA, NA, smart1, NA, NA, NA, NA, NA, NA, NA,
53462306a36Sopenharmony_ci		 NA, NA, NA),
53562306a36Sopenharmony_ci	PINGROUP(9, blsp_uart1, NA, NA, smart1, NA, NA, NA, NA, NA, NA, NA,
53662306a36Sopenharmony_ci		 NA, NA, NA),
53762306a36Sopenharmony_ci	PINGROUP(10, blsp_uart1, NA, NA, blsp_i2c0, NA, NA, NA, NA, NA, NA, NA,
53862306a36Sopenharmony_ci		 NA, NA, NA),
53962306a36Sopenharmony_ci	PINGROUP(11, blsp_uart1, NA, NA, blsp_i2c0, NA, NA, NA, NA, NA, NA, NA,
54062306a36Sopenharmony_ci		 NA, NA, NA),
54162306a36Sopenharmony_ci	PINGROUP(12, blsp_spi0, blsp_i2c1, NA, NA, NA, NA, NA, NA, NA, NA, NA,
54262306a36Sopenharmony_ci		 NA, NA, NA),
54362306a36Sopenharmony_ci	PINGROUP(13, blsp_spi0, blsp_i2c1, NA, NA, NA, NA, NA, NA, NA, NA, NA,
54462306a36Sopenharmony_ci		 NA, NA, NA),
54562306a36Sopenharmony_ci	PINGROUP(14, blsp_spi0, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
54662306a36Sopenharmony_ci		 NA),
54762306a36Sopenharmony_ci	PINGROUP(15, blsp_spi0, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
54862306a36Sopenharmony_ci		 NA),
54962306a36Sopenharmony_ci	PINGROUP(16, blsp_uart0, led0, smart1, NA, NA, NA, NA, NA, NA, NA, NA,
55062306a36Sopenharmony_ci		 NA, NA, NA),
55162306a36Sopenharmony_ci	PINGROUP(17, blsp_uart0, led1, smart1, NA, NA, NA, NA, NA, NA, NA, NA,
55262306a36Sopenharmony_ci		 NA, NA, NA),
55362306a36Sopenharmony_ci	PINGROUP(18, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
55462306a36Sopenharmony_ci	PINGROUP(19, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
55562306a36Sopenharmony_ci	PINGROUP(20, blsp_i2c0, i2s_rx, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
55662306a36Sopenharmony_ci		 NA, NA),
55762306a36Sopenharmony_ci	PINGROUP(21, blsp_i2c0, i2s_rx, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
55862306a36Sopenharmony_ci		 NA, NA),
55962306a36Sopenharmony_ci	PINGROUP(22, rgmii, i2s_rx, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
56062306a36Sopenharmony_ci		 NA),
56162306a36Sopenharmony_ci	PINGROUP(23, sdio, rgmii, i2s_rx, NA, NA, NA, NA, NA, NA, NA, NA, NA,
56262306a36Sopenharmony_ci		 NA, NA),
56362306a36Sopenharmony_ci	PINGROUP(24, sdio, rgmii, i2s_tx, NA, NA, NA, NA, NA, NA, NA, NA, NA,
56462306a36Sopenharmony_ci		 NA, NA),
56562306a36Sopenharmony_ci	PINGROUP(25, sdio, rgmii, i2s_tx, NA, NA, NA, NA, NA, NA, NA, NA, NA,
56662306a36Sopenharmony_ci		 NA, NA),
56762306a36Sopenharmony_ci	PINGROUP(26, sdio, rgmii, i2s_tx, NA, NA, NA, NA, NA, NA, NA, NA, NA,
56862306a36Sopenharmony_ci		 NA, NA),
56962306a36Sopenharmony_ci	PINGROUP(27, sdio, rgmii, i2s_td, NA, NA, NA, NA, NA, NA, NA, NA, NA,
57062306a36Sopenharmony_ci		 NA, NA),
57162306a36Sopenharmony_ci	PINGROUP(28, sdio, rgmii, i2s_td, NA, NA, NA, NA, NA, NA, NA, NA, NA,
57262306a36Sopenharmony_ci		 NA, NA),
57362306a36Sopenharmony_ci	PINGROUP(29, sdio, rgmii, i2s_td, NA, NA, NA, NA, NA, NA, NA, NA, NA,
57462306a36Sopenharmony_ci		 NA, NA),
57562306a36Sopenharmony_ci	PINGROUP(30, sdio, rgmii, audio_pwm, NA, NA, NA, NA, NA, NA, NA, NA,
57662306a36Sopenharmony_ci		 NA, NA, NA),
57762306a36Sopenharmony_ci	PINGROUP(31, sdio, rgmii, audio_pwm, NA, NA, NA, NA, NA, NA, NA, NA,
57862306a36Sopenharmony_ci		 NA, NA, NA),
57962306a36Sopenharmony_ci	PINGROUP(32, sdio, rgmii, audio_pwm, NA, NA, NA, NA, NA, NA, NA, NA,
58062306a36Sopenharmony_ci		 NA, NA, NA),
58162306a36Sopenharmony_ci	PINGROUP(33, rgmii, audio_pwm, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
58262306a36Sopenharmony_ci		 NA, NA),
58362306a36Sopenharmony_ci	PINGROUP(34, blsp_i2c1, i2s_spdif_in, NA, NA, NA, NA, NA, NA, NA, NA,
58462306a36Sopenharmony_ci		 NA, NA, NA, NA),
58562306a36Sopenharmony_ci	PINGROUP(35, blsp_i2c1, i2s_spdif_out, NA, NA, NA, NA, NA, NA, NA, NA,
58662306a36Sopenharmony_ci		 NA, NA, NA, NA),
58762306a36Sopenharmony_ci	PINGROUP(36, rmii, led2, led0, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
58862306a36Sopenharmony_ci		 NA),
58962306a36Sopenharmony_ci	PINGROUP(37, rmii, wifi0, wifi1, led1, NA, NA, NA, NA, NA, NA, NA, NA,
59062306a36Sopenharmony_ci		 NA, NA),
59162306a36Sopenharmony_ci	PINGROUP(38, rmii, led2, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
59262306a36Sopenharmony_ci		 NA),
59362306a36Sopenharmony_ci	PINGROUP(39, rmii, pcie, led3, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
59462306a36Sopenharmony_ci		 NA),
59562306a36Sopenharmony_ci	PINGROUP(40, rmii, wifi0, wifi1, smart2, led4, NA, NA, NA, NA, NA, NA,
59662306a36Sopenharmony_ci		 NA, NA, NA),
59762306a36Sopenharmony_ci	PINGROUP(41, rmii, wifi0, wifi1, smart2, NA, NA, NA, NA, NA, NA, NA,
59862306a36Sopenharmony_ci		 NA, NA, NA),
59962306a36Sopenharmony_ci	PINGROUP(42, rmii, wifi0, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
60062306a36Sopenharmony_ci		 NA),
60162306a36Sopenharmony_ci	PINGROUP(43, rmii, wifi1, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
60262306a36Sopenharmony_ci		 NA),
60362306a36Sopenharmony_ci	PINGROUP(44, rmii, blsp_spi1, smart0, led5, NA, NA, NA, NA, NA, NA, NA,
60462306a36Sopenharmony_ci		 NA, NA, NA),
60562306a36Sopenharmony_ci	PINGROUP(45, rmii, blsp_spi1, blsp_spi0, smart0, led6, NA, NA, NA, NA,
60662306a36Sopenharmony_ci		 NA, NA, NA, NA, NA),
60762306a36Sopenharmony_ci	PINGROUP(46, rmii, blsp_spi1, smart0, led7, NA, NA, NA, NA, NA, NA, NA,
60862306a36Sopenharmony_ci		 NA, NA, NA),
60962306a36Sopenharmony_ci	PINGROUP(47, rmii, blsp_spi1, smart0, led8, NA, NA, NA, NA, NA, NA, NA,
61062306a36Sopenharmony_ci		 NA, NA, NA),
61162306a36Sopenharmony_ci	PINGROUP(48, rmii, aud_pin, smart2, led9, NA, NA, NA, NA, NA, NA, NA,
61262306a36Sopenharmony_ci		 NA, NA, NA),
61362306a36Sopenharmony_ci	PINGROUP(49, rmii, aud_pin, smart2, led10, NA, NA, NA, NA, NA, NA, NA,
61462306a36Sopenharmony_ci		 NA, NA, NA),
61562306a36Sopenharmony_ci	PINGROUP(50, rmii, aud_pin, wifi0, wifi1, led11, NA, NA, NA, NA, NA,
61662306a36Sopenharmony_ci		 NA, NA, NA, NA),
61762306a36Sopenharmony_ci	PINGROUP(51, rmii, aud_pin, wifi0, wifi1, NA, NA, NA, NA, NA, NA, NA,
61862306a36Sopenharmony_ci		 NA, NA, NA),
61962306a36Sopenharmony_ci	PINGROUP(52, qpic, mdc, pcie, i2s_tx, NA, NA, NA, tm, wifi0, wifi1, NA,
62062306a36Sopenharmony_ci		 NA, NA, NA),
62162306a36Sopenharmony_ci	PINGROUP(53, qpic, mdio, i2s_tx, prng_rosc, NA, tm, wifi0, wifi1, NA,
62262306a36Sopenharmony_ci		 NA, NA, NA, NA, NA),
62362306a36Sopenharmony_ci	PINGROUP(54, qpic, blsp_spi0, i2s_td, NA, pmu, NA, NA, NA, tm, NA, NA,
62462306a36Sopenharmony_ci		 NA, NA, NA),
62562306a36Sopenharmony_ci	PINGROUP(55, qpic, blsp_spi0, i2s_td, NA, pmu, NA, NA, NA, tm, NA, NA,
62662306a36Sopenharmony_ci		 NA, NA, NA),
62762306a36Sopenharmony_ci	PINGROUP(56, qpic, blsp_spi0, i2s_td, NA, NA, tm, wifi0, wifi1, NA, NA,
62862306a36Sopenharmony_ci		 NA, NA, NA, NA),
62962306a36Sopenharmony_ci	PINGROUP(57, qpic, blsp_spi0, i2s_tx, NA, NA, tm, wifi0, wifi1, NA, NA,
63062306a36Sopenharmony_ci		 NA, NA, NA, NA),
63162306a36Sopenharmony_ci	PINGROUP(58, qpic, led2, blsp_i2c0, smart3, smart1, i2s_rx, NA, NA, tm,
63262306a36Sopenharmony_ci		 wifi0, wifi1, NA, NA, NA),
63362306a36Sopenharmony_ci	PINGROUP(59, qpic, blsp_i2c0, smart3, smart1, i2s_spdif_in, NA, NA, NA,
63462306a36Sopenharmony_ci		 NA, NA, tm, NA, NA, NA),
63562306a36Sopenharmony_ci	PINGROUP(60, qpic, blsp_uart0, smart1, smart3, led0, i2s_tx, i2s_rx,
63662306a36Sopenharmony_ci		 NA, NA, NA, NA, NA, tm, NA),
63762306a36Sopenharmony_ci	PINGROUP(61, qpic, blsp_uart0, smart1, smart3, led1, i2s_tx, i2s_rx,
63862306a36Sopenharmony_ci		 NA, NA, NA, NA, NA, tm, NA),
63962306a36Sopenharmony_ci	PINGROUP(62, qpic, chip_rst, NA, NA, i2s_spdif_out, NA, NA, NA, NA, NA,
64062306a36Sopenharmony_ci		 tm, NA, NA, NA),
64162306a36Sopenharmony_ci	PINGROUP(63, qpic, NA, NA, NA, i2s_td, i2s_rx, i2s_spdif_out,
64262306a36Sopenharmony_ci		 i2s_spdif_in, NA, NA, NA, NA, tm, NA),
64362306a36Sopenharmony_ci	PINGROUP(64, qpic, audio_pwm, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
64462306a36Sopenharmony_ci		 NA, NA),
64562306a36Sopenharmony_ci	PINGROUP(65, qpic, audio_pwm, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
64662306a36Sopenharmony_ci		 NA, NA),
64762306a36Sopenharmony_ci	PINGROUP(66, qpic, audio_pwm, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
64862306a36Sopenharmony_ci		 NA, NA),
64962306a36Sopenharmony_ci	PINGROUP(67, qpic, audio_pwm, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
65062306a36Sopenharmony_ci		 NA, NA),
65162306a36Sopenharmony_ci	PINGROUP(68, qpic, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
65262306a36Sopenharmony_ci	PINGROUP(69, qpic, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
65362306a36Sopenharmony_ci	PINGROUP(70, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
65462306a36Sopenharmony_ci	PINGROUP(71, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
65562306a36Sopenharmony_ci	PINGROUP(72, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
65662306a36Sopenharmony_ci	PINGROUP(73, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
65762306a36Sopenharmony_ci	PINGROUP(74, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
65862306a36Sopenharmony_ci	PINGROUP(75, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
65962306a36Sopenharmony_ci	PINGROUP(76, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
66062306a36Sopenharmony_ci	PINGROUP(77, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
66162306a36Sopenharmony_ci	PINGROUP(78, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
66262306a36Sopenharmony_ci	PINGROUP(79, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
66362306a36Sopenharmony_ci	PINGROUP(80, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
66462306a36Sopenharmony_ci	PINGROUP(81, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
66562306a36Sopenharmony_ci	PINGROUP(82, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
66662306a36Sopenharmony_ci	PINGROUP(83, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
66762306a36Sopenharmony_ci	PINGROUP(84, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
66862306a36Sopenharmony_ci	PINGROUP(85, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
66962306a36Sopenharmony_ci	PINGROUP(86, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
67062306a36Sopenharmony_ci	PINGROUP(87, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
67162306a36Sopenharmony_ci	PINGROUP(88, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
67262306a36Sopenharmony_ci	PINGROUP(89, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
67362306a36Sopenharmony_ci	PINGROUP(90, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
67462306a36Sopenharmony_ci	PINGROUP(91, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
67562306a36Sopenharmony_ci	PINGROUP(92, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
67662306a36Sopenharmony_ci	PINGROUP(93, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
67762306a36Sopenharmony_ci	PINGROUP(94, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
67862306a36Sopenharmony_ci	PINGROUP(95, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
67962306a36Sopenharmony_ci	PINGROUP(96, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
68062306a36Sopenharmony_ci	PINGROUP(97, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
68162306a36Sopenharmony_ci	PINGROUP(98, wifi0, wifi1, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
68262306a36Sopenharmony_ci		 NA),
68362306a36Sopenharmony_ci	PINGROUP(99, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA),
68462306a36Sopenharmony_ci};
68562306a36Sopenharmony_ci
68662306a36Sopenharmony_cistatic const struct msm_pinctrl_soc_data ipq4019_pinctrl = {
68762306a36Sopenharmony_ci	.pins = ipq4019_pins,
68862306a36Sopenharmony_ci	.npins = ARRAY_SIZE(ipq4019_pins),
68962306a36Sopenharmony_ci	.functions = ipq4019_functions,
69062306a36Sopenharmony_ci	.nfunctions = ARRAY_SIZE(ipq4019_functions),
69162306a36Sopenharmony_ci	.groups = ipq4019_groups,
69262306a36Sopenharmony_ci	.ngroups = ARRAY_SIZE(ipq4019_groups),
69362306a36Sopenharmony_ci	.ngpios = 100,
69462306a36Sopenharmony_ci	.pull_no_keeper = true,
69562306a36Sopenharmony_ci};
69662306a36Sopenharmony_ci
69762306a36Sopenharmony_cistatic int ipq4019_pinctrl_probe(struct platform_device *pdev)
69862306a36Sopenharmony_ci{
69962306a36Sopenharmony_ci	return msm_pinctrl_probe(pdev, &ipq4019_pinctrl);
70062306a36Sopenharmony_ci}
70162306a36Sopenharmony_ci
70262306a36Sopenharmony_cistatic const struct of_device_id ipq4019_pinctrl_of_match[] = {
70362306a36Sopenharmony_ci	{ .compatible = "qcom,ipq4019-pinctrl", },
70462306a36Sopenharmony_ci	{ },
70562306a36Sopenharmony_ci};
70662306a36Sopenharmony_ci
70762306a36Sopenharmony_cistatic struct platform_driver ipq4019_pinctrl_driver = {
70862306a36Sopenharmony_ci	.driver = {
70962306a36Sopenharmony_ci		.name = "ipq4019-pinctrl",
71062306a36Sopenharmony_ci		.of_match_table = ipq4019_pinctrl_of_match,
71162306a36Sopenharmony_ci	},
71262306a36Sopenharmony_ci	.probe = ipq4019_pinctrl_probe,
71362306a36Sopenharmony_ci	.remove = msm_pinctrl_remove,
71462306a36Sopenharmony_ci};
71562306a36Sopenharmony_ci
71662306a36Sopenharmony_cistatic int __init ipq4019_pinctrl_init(void)
71762306a36Sopenharmony_ci{
71862306a36Sopenharmony_ci	return platform_driver_register(&ipq4019_pinctrl_driver);
71962306a36Sopenharmony_ci}
72062306a36Sopenharmony_ciarch_initcall(ipq4019_pinctrl_init);
72162306a36Sopenharmony_ci
72262306a36Sopenharmony_cistatic void __exit ipq4019_pinctrl_exit(void)
72362306a36Sopenharmony_ci{
72462306a36Sopenharmony_ci	platform_driver_unregister(&ipq4019_pinctrl_driver);
72562306a36Sopenharmony_ci}
72662306a36Sopenharmony_cimodule_exit(ipq4019_pinctrl_exit);
72762306a36Sopenharmony_ci
72862306a36Sopenharmony_ciMODULE_DESCRIPTION("Qualcomm ipq4019 pinctrl driver");
72962306a36Sopenharmony_ciMODULE_LICENSE("GPL v2");
73062306a36Sopenharmony_ciMODULE_DEVICE_TABLE(of, ipq4019_pinctrl_of_match);
731