18c2ecf20Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0-only 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * Copyright (c) 2015, The Linux Foundation. All rights reserved. 48c2ecf20Sopenharmony_ci */ 58c2ecf20Sopenharmony_ci 68c2ecf20Sopenharmony_ci#include <linux/module.h> 78c2ecf20Sopenharmony_ci#include <linux/of.h> 88c2ecf20Sopenharmony_ci#include <linux/platform_device.h> 98c2ecf20Sopenharmony_ci#include <linux/pinctrl/pinctrl.h> 108c2ecf20Sopenharmony_ci 118c2ecf20Sopenharmony_ci#include "pinctrl-msm.h" 128c2ecf20Sopenharmony_ci 138c2ecf20Sopenharmony_cistatic const struct pinctrl_pin_desc ipq4019_pins[] = { 148c2ecf20Sopenharmony_ci PINCTRL_PIN(0, "GPIO_0"), 158c2ecf20Sopenharmony_ci PINCTRL_PIN(1, "GPIO_1"), 168c2ecf20Sopenharmony_ci PINCTRL_PIN(2, "GPIO_2"), 178c2ecf20Sopenharmony_ci PINCTRL_PIN(3, "GPIO_3"), 188c2ecf20Sopenharmony_ci PINCTRL_PIN(4, "GPIO_4"), 198c2ecf20Sopenharmony_ci PINCTRL_PIN(5, "GPIO_5"), 208c2ecf20Sopenharmony_ci PINCTRL_PIN(6, "GPIO_6"), 218c2ecf20Sopenharmony_ci PINCTRL_PIN(7, "GPIO_7"), 228c2ecf20Sopenharmony_ci PINCTRL_PIN(8, "GPIO_8"), 238c2ecf20Sopenharmony_ci PINCTRL_PIN(9, "GPIO_9"), 248c2ecf20Sopenharmony_ci PINCTRL_PIN(10, "GPIO_10"), 258c2ecf20Sopenharmony_ci PINCTRL_PIN(11, "GPIO_11"), 268c2ecf20Sopenharmony_ci PINCTRL_PIN(12, "GPIO_12"), 278c2ecf20Sopenharmony_ci PINCTRL_PIN(13, "GPIO_13"), 288c2ecf20Sopenharmony_ci PINCTRL_PIN(14, "GPIO_14"), 298c2ecf20Sopenharmony_ci PINCTRL_PIN(15, "GPIO_15"), 308c2ecf20Sopenharmony_ci PINCTRL_PIN(16, "GPIO_16"), 318c2ecf20Sopenharmony_ci PINCTRL_PIN(17, "GPIO_17"), 328c2ecf20Sopenharmony_ci PINCTRL_PIN(18, "GPIO_18"), 338c2ecf20Sopenharmony_ci PINCTRL_PIN(19, "GPIO_19"), 348c2ecf20Sopenharmony_ci PINCTRL_PIN(20, "GPIO_20"), 358c2ecf20Sopenharmony_ci PINCTRL_PIN(21, "GPIO_21"), 368c2ecf20Sopenharmony_ci PINCTRL_PIN(22, "GPIO_22"), 378c2ecf20Sopenharmony_ci PINCTRL_PIN(23, "GPIO_23"), 388c2ecf20Sopenharmony_ci PINCTRL_PIN(24, "GPIO_24"), 398c2ecf20Sopenharmony_ci PINCTRL_PIN(25, "GPIO_25"), 408c2ecf20Sopenharmony_ci PINCTRL_PIN(26, "GPIO_26"), 418c2ecf20Sopenharmony_ci PINCTRL_PIN(27, "GPIO_27"), 428c2ecf20Sopenharmony_ci PINCTRL_PIN(28, "GPIO_28"), 438c2ecf20Sopenharmony_ci PINCTRL_PIN(29, "GPIO_29"), 448c2ecf20Sopenharmony_ci PINCTRL_PIN(30, "GPIO_30"), 458c2ecf20Sopenharmony_ci PINCTRL_PIN(31, "GPIO_31"), 468c2ecf20Sopenharmony_ci PINCTRL_PIN(32, "GPIO_32"), 478c2ecf20Sopenharmony_ci PINCTRL_PIN(33, "GPIO_33"), 488c2ecf20Sopenharmony_ci PINCTRL_PIN(34, "GPIO_34"), 498c2ecf20Sopenharmony_ci PINCTRL_PIN(35, "GPIO_35"), 508c2ecf20Sopenharmony_ci PINCTRL_PIN(36, "GPIO_36"), 518c2ecf20Sopenharmony_ci PINCTRL_PIN(37, "GPIO_37"), 528c2ecf20Sopenharmony_ci PINCTRL_PIN(38, "GPIO_38"), 538c2ecf20Sopenharmony_ci PINCTRL_PIN(39, "GPIO_39"), 548c2ecf20Sopenharmony_ci PINCTRL_PIN(40, "GPIO_40"), 558c2ecf20Sopenharmony_ci PINCTRL_PIN(41, "GPIO_41"), 568c2ecf20Sopenharmony_ci PINCTRL_PIN(42, "GPIO_42"), 578c2ecf20Sopenharmony_ci PINCTRL_PIN(43, "GPIO_43"), 588c2ecf20Sopenharmony_ci PINCTRL_PIN(44, "GPIO_44"), 598c2ecf20Sopenharmony_ci PINCTRL_PIN(45, "GPIO_45"), 608c2ecf20Sopenharmony_ci PINCTRL_PIN(46, "GPIO_46"), 618c2ecf20Sopenharmony_ci PINCTRL_PIN(47, "GPIO_47"), 628c2ecf20Sopenharmony_ci PINCTRL_PIN(48, "GPIO_48"), 638c2ecf20Sopenharmony_ci PINCTRL_PIN(49, "GPIO_49"), 648c2ecf20Sopenharmony_ci PINCTRL_PIN(50, "GPIO_50"), 658c2ecf20Sopenharmony_ci PINCTRL_PIN(51, "GPIO_51"), 668c2ecf20Sopenharmony_ci PINCTRL_PIN(52, "GPIO_52"), 678c2ecf20Sopenharmony_ci PINCTRL_PIN(53, "GPIO_53"), 688c2ecf20Sopenharmony_ci PINCTRL_PIN(54, "GPIO_54"), 698c2ecf20Sopenharmony_ci PINCTRL_PIN(55, "GPIO_55"), 708c2ecf20Sopenharmony_ci PINCTRL_PIN(56, "GPIO_56"), 718c2ecf20Sopenharmony_ci PINCTRL_PIN(57, "GPIO_57"), 728c2ecf20Sopenharmony_ci PINCTRL_PIN(58, "GPIO_58"), 738c2ecf20Sopenharmony_ci PINCTRL_PIN(59, "GPIO_59"), 748c2ecf20Sopenharmony_ci PINCTRL_PIN(60, "GPIO_60"), 758c2ecf20Sopenharmony_ci PINCTRL_PIN(61, "GPIO_61"), 768c2ecf20Sopenharmony_ci PINCTRL_PIN(62, "GPIO_62"), 778c2ecf20Sopenharmony_ci PINCTRL_PIN(63, "GPIO_63"), 788c2ecf20Sopenharmony_ci PINCTRL_PIN(64, "GPIO_64"), 798c2ecf20Sopenharmony_ci PINCTRL_PIN(65, "GPIO_65"), 808c2ecf20Sopenharmony_ci PINCTRL_PIN(66, "GPIO_66"), 818c2ecf20Sopenharmony_ci PINCTRL_PIN(67, "GPIO_67"), 828c2ecf20Sopenharmony_ci PINCTRL_PIN(68, "GPIO_68"), 838c2ecf20Sopenharmony_ci PINCTRL_PIN(69, "GPIO_69"), 848c2ecf20Sopenharmony_ci PINCTRL_PIN(70, "GPIO_70"), 858c2ecf20Sopenharmony_ci PINCTRL_PIN(71, "GPIO_71"), 868c2ecf20Sopenharmony_ci PINCTRL_PIN(72, "GPIO_72"), 878c2ecf20Sopenharmony_ci PINCTRL_PIN(73, "GPIO_73"), 888c2ecf20Sopenharmony_ci PINCTRL_PIN(74, "GPIO_74"), 898c2ecf20Sopenharmony_ci PINCTRL_PIN(75, "GPIO_75"), 908c2ecf20Sopenharmony_ci PINCTRL_PIN(76, "GPIO_76"), 918c2ecf20Sopenharmony_ci PINCTRL_PIN(77, "GPIO_77"), 928c2ecf20Sopenharmony_ci PINCTRL_PIN(78, "GPIO_78"), 938c2ecf20Sopenharmony_ci PINCTRL_PIN(79, "GPIO_79"), 948c2ecf20Sopenharmony_ci PINCTRL_PIN(80, "GPIO_80"), 958c2ecf20Sopenharmony_ci PINCTRL_PIN(81, "GPIO_81"), 968c2ecf20Sopenharmony_ci PINCTRL_PIN(82, "GPIO_82"), 978c2ecf20Sopenharmony_ci PINCTRL_PIN(83, "GPIO_83"), 988c2ecf20Sopenharmony_ci PINCTRL_PIN(84, "GPIO_84"), 998c2ecf20Sopenharmony_ci PINCTRL_PIN(85, "GPIO_85"), 1008c2ecf20Sopenharmony_ci PINCTRL_PIN(86, "GPIO_86"), 1018c2ecf20Sopenharmony_ci PINCTRL_PIN(87, "GPIO_87"), 1028c2ecf20Sopenharmony_ci PINCTRL_PIN(88, "GPIO_88"), 1038c2ecf20Sopenharmony_ci PINCTRL_PIN(89, "GPIO_89"), 1048c2ecf20Sopenharmony_ci PINCTRL_PIN(90, "GPIO_90"), 1058c2ecf20Sopenharmony_ci PINCTRL_PIN(91, "GPIO_91"), 1068c2ecf20Sopenharmony_ci PINCTRL_PIN(92, "GPIO_92"), 1078c2ecf20Sopenharmony_ci PINCTRL_PIN(93, "GPIO_93"), 1088c2ecf20Sopenharmony_ci PINCTRL_PIN(94, "GPIO_94"), 1098c2ecf20Sopenharmony_ci PINCTRL_PIN(95, "GPIO_95"), 1108c2ecf20Sopenharmony_ci PINCTRL_PIN(96, "GPIO_96"), 1118c2ecf20Sopenharmony_ci PINCTRL_PIN(97, "GPIO_97"), 1128c2ecf20Sopenharmony_ci PINCTRL_PIN(98, "GPIO_98"), 1138c2ecf20Sopenharmony_ci PINCTRL_PIN(99, "GPIO_99"), 1148c2ecf20Sopenharmony_ci}; 1158c2ecf20Sopenharmony_ci 1168c2ecf20Sopenharmony_ci#define DECLARE_QCA_GPIO_PINS(pin) \ 1178c2ecf20Sopenharmony_ci static const unsigned int gpio##pin##_pins[] = { pin } 1188c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(0); 1198c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(1); 1208c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(2); 1218c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(3); 1228c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(4); 1238c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(5); 1248c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(6); 1258c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(7); 1268c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(8); 1278c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(9); 1288c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(10); 1298c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(11); 1308c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(12); 1318c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(13); 1328c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(14); 1338c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(15); 1348c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(16); 1358c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(17); 1368c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(18); 1378c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(19); 1388c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(20); 1398c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(21); 1408c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(22); 1418c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(23); 1428c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(24); 1438c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(25); 1448c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(26); 1458c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(27); 1468c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(28); 1478c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(29); 1488c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(30); 1498c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(31); 1508c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(32); 1518c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(33); 1528c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(34); 1538c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(35); 1548c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(36); 1558c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(37); 1568c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(38); 1578c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(39); 1588c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(40); 1598c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(41); 1608c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(42); 1618c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(43); 1628c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(44); 1638c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(45); 1648c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(46); 1658c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(47); 1668c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(48); 1678c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(49); 1688c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(50); 1698c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(51); 1708c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(52); 1718c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(53); 1728c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(54); 1738c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(55); 1748c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(56); 1758c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(57); 1768c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(58); 1778c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(59); 1788c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(60); 1798c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(61); 1808c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(62); 1818c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(63); 1828c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(64); 1838c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(65); 1848c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(66); 1858c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(67); 1868c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(68); 1878c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(69); 1888c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(70); 1898c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(71); 1908c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(72); 1918c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(73); 1928c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(74); 1938c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(75); 1948c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(76); 1958c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(77); 1968c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(78); 1978c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(79); 1988c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(80); 1998c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(81); 2008c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(82); 2018c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(83); 2028c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(84); 2038c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(85); 2048c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(86); 2058c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(87); 2068c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(88); 2078c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(89); 2088c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(90); 2098c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(91); 2108c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(92); 2118c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(93); 2128c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(94); 2138c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(95); 2148c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(96); 2158c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(97); 2168c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(98); 2178c2ecf20Sopenharmony_ciDECLARE_QCA_GPIO_PINS(99); 2188c2ecf20Sopenharmony_ci 2198c2ecf20Sopenharmony_ci#define FUNCTION(fname) \ 2208c2ecf20Sopenharmony_ci [qca_mux_##fname] = { \ 2218c2ecf20Sopenharmony_ci .name = #fname, \ 2228c2ecf20Sopenharmony_ci .groups = fname##_groups, \ 2238c2ecf20Sopenharmony_ci .ngroups = ARRAY_SIZE(fname##_groups), \ 2248c2ecf20Sopenharmony_ci } 2258c2ecf20Sopenharmony_ci 2268c2ecf20Sopenharmony_ci#define PINGROUP(id, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12, f13, f14) \ 2278c2ecf20Sopenharmony_ci { \ 2288c2ecf20Sopenharmony_ci .name = "gpio" #id, \ 2298c2ecf20Sopenharmony_ci .pins = gpio##id##_pins, \ 2308c2ecf20Sopenharmony_ci .npins = (unsigned)ARRAY_SIZE(gpio##id##_pins), \ 2318c2ecf20Sopenharmony_ci .funcs = (int[]){ \ 2328c2ecf20Sopenharmony_ci qca_mux_gpio, /* gpio mode */ \ 2338c2ecf20Sopenharmony_ci qca_mux_##f1, \ 2348c2ecf20Sopenharmony_ci qca_mux_##f2, \ 2358c2ecf20Sopenharmony_ci qca_mux_##f3, \ 2368c2ecf20Sopenharmony_ci qca_mux_##f4, \ 2378c2ecf20Sopenharmony_ci qca_mux_##f5, \ 2388c2ecf20Sopenharmony_ci qca_mux_##f6, \ 2398c2ecf20Sopenharmony_ci qca_mux_##f7, \ 2408c2ecf20Sopenharmony_ci qca_mux_##f8, \ 2418c2ecf20Sopenharmony_ci qca_mux_##f9, \ 2428c2ecf20Sopenharmony_ci qca_mux_##f10, \ 2438c2ecf20Sopenharmony_ci qca_mux_##f11, \ 2448c2ecf20Sopenharmony_ci qca_mux_##f12, \ 2458c2ecf20Sopenharmony_ci qca_mux_##f13, \ 2468c2ecf20Sopenharmony_ci qca_mux_##f14 \ 2478c2ecf20Sopenharmony_ci }, \ 2488c2ecf20Sopenharmony_ci .nfuncs = 15, \ 2498c2ecf20Sopenharmony_ci .ctl_reg = 0x0 + 0x1000 * id, \ 2508c2ecf20Sopenharmony_ci .io_reg = 0x4 + 0x1000 * id, \ 2518c2ecf20Sopenharmony_ci .intr_cfg_reg = 0x8 + 0x1000 * id, \ 2528c2ecf20Sopenharmony_ci .intr_status_reg = 0xc + 0x1000 * id, \ 2538c2ecf20Sopenharmony_ci .intr_target_reg = 0x8 + 0x1000 * id, \ 2548c2ecf20Sopenharmony_ci .mux_bit = 2, \ 2558c2ecf20Sopenharmony_ci .pull_bit = 0, \ 2568c2ecf20Sopenharmony_ci .drv_bit = 6, \ 2578c2ecf20Sopenharmony_ci .od_bit = 12, \ 2588c2ecf20Sopenharmony_ci .oe_bit = 9, \ 2598c2ecf20Sopenharmony_ci .in_bit = 0, \ 2608c2ecf20Sopenharmony_ci .out_bit = 1, \ 2618c2ecf20Sopenharmony_ci .intr_enable_bit = 0, \ 2628c2ecf20Sopenharmony_ci .intr_status_bit = 0, \ 2638c2ecf20Sopenharmony_ci .intr_target_bit = 5, \ 2648c2ecf20Sopenharmony_ci .intr_raw_status_bit = 4, \ 2658c2ecf20Sopenharmony_ci .intr_polarity_bit = 1, \ 2668c2ecf20Sopenharmony_ci .intr_detection_bit = 2, \ 2678c2ecf20Sopenharmony_ci .intr_detection_width = 2, \ 2688c2ecf20Sopenharmony_ci } 2698c2ecf20Sopenharmony_ci 2708c2ecf20Sopenharmony_ci 2718c2ecf20Sopenharmony_cienum ipq4019_functions { 2728c2ecf20Sopenharmony_ci qca_mux_gpio, 2738c2ecf20Sopenharmony_ci qca_mux_aud_pin, 2748c2ecf20Sopenharmony_ci qca_mux_audio_pwm, 2758c2ecf20Sopenharmony_ci qca_mux_blsp_i2c0, 2768c2ecf20Sopenharmony_ci qca_mux_blsp_i2c1, 2778c2ecf20Sopenharmony_ci qca_mux_blsp_spi0, 2788c2ecf20Sopenharmony_ci qca_mux_blsp_spi1, 2798c2ecf20Sopenharmony_ci qca_mux_blsp_uart0, 2808c2ecf20Sopenharmony_ci qca_mux_blsp_uart1, 2818c2ecf20Sopenharmony_ci qca_mux_chip_rst, 2828c2ecf20Sopenharmony_ci qca_mux_i2s_rx, 2838c2ecf20Sopenharmony_ci qca_mux_i2s_spdif_in, 2848c2ecf20Sopenharmony_ci qca_mux_i2s_spdif_out, 2858c2ecf20Sopenharmony_ci qca_mux_i2s_td, 2868c2ecf20Sopenharmony_ci qca_mux_i2s_tx, 2878c2ecf20Sopenharmony_ci qca_mux_jtag, 2888c2ecf20Sopenharmony_ci qca_mux_led0, 2898c2ecf20Sopenharmony_ci qca_mux_led1, 2908c2ecf20Sopenharmony_ci qca_mux_led2, 2918c2ecf20Sopenharmony_ci qca_mux_led3, 2928c2ecf20Sopenharmony_ci qca_mux_led4, 2938c2ecf20Sopenharmony_ci qca_mux_led5, 2948c2ecf20Sopenharmony_ci qca_mux_led6, 2958c2ecf20Sopenharmony_ci qca_mux_led7, 2968c2ecf20Sopenharmony_ci qca_mux_led8, 2978c2ecf20Sopenharmony_ci qca_mux_led9, 2988c2ecf20Sopenharmony_ci qca_mux_led10, 2998c2ecf20Sopenharmony_ci qca_mux_led11, 3008c2ecf20Sopenharmony_ci qca_mux_mdc, 3018c2ecf20Sopenharmony_ci qca_mux_mdio, 3028c2ecf20Sopenharmony_ci qca_mux_pcie, 3038c2ecf20Sopenharmony_ci qca_mux_pmu, 3048c2ecf20Sopenharmony_ci qca_mux_prng_rosc, 3058c2ecf20Sopenharmony_ci qca_mux_qpic, 3068c2ecf20Sopenharmony_ci qca_mux_rgmii, 3078c2ecf20Sopenharmony_ci qca_mux_rmii, 3088c2ecf20Sopenharmony_ci qca_mux_sdio, 3098c2ecf20Sopenharmony_ci qca_mux_smart0, 3108c2ecf20Sopenharmony_ci qca_mux_smart1, 3118c2ecf20Sopenharmony_ci qca_mux_smart2, 3128c2ecf20Sopenharmony_ci qca_mux_smart3, 3138c2ecf20Sopenharmony_ci qca_mux_tm, 3148c2ecf20Sopenharmony_ci qca_mux_wifi0, 3158c2ecf20Sopenharmony_ci qca_mux_wifi1, 3168c2ecf20Sopenharmony_ci qca_mux_NA, 3178c2ecf20Sopenharmony_ci}; 3188c2ecf20Sopenharmony_ci 3198c2ecf20Sopenharmony_cistatic const char * const gpio_groups[] = { 3208c2ecf20Sopenharmony_ci "gpio0", "gpio1", "gpio2", "gpio3", "gpio4", "gpio5", "gpio6", "gpio7", 3218c2ecf20Sopenharmony_ci "gpio8", "gpio9", "gpio10", "gpio11", "gpio12", "gpio13", "gpio14", 3228c2ecf20Sopenharmony_ci "gpio15", "gpio16", "gpio17", "gpio18", "gpio19", "gpio20", "gpio21", 3238c2ecf20Sopenharmony_ci "gpio22", "gpio23", "gpio24", "gpio25", "gpio26", "gpio27", "gpio28", 3248c2ecf20Sopenharmony_ci "gpio29", "gpio30", "gpio31", "gpio32", "gpio33", "gpio34", "gpio35", 3258c2ecf20Sopenharmony_ci "gpio36", "gpio37", "gpio38", "gpio39", "gpio40", "gpio41", "gpio42", 3268c2ecf20Sopenharmony_ci "gpio43", "gpio44", "gpio45", "gpio46", "gpio47", "gpio48", "gpio49", 3278c2ecf20Sopenharmony_ci "gpio50", "gpio51", "gpio52", "gpio53", "gpio54", "gpio55", "gpio56", 3288c2ecf20Sopenharmony_ci "gpio57", "gpio58", "gpio59", "gpio60", "gpio61", "gpio62", "gpio63", 3298c2ecf20Sopenharmony_ci "gpio64", "gpio65", "gpio66", "gpio67", "gpio68", "gpio69", "gpio70", 3308c2ecf20Sopenharmony_ci "gpio71", "gpio72", "gpio73", "gpio74", "gpio75", "gpio76", "gpio77", 3318c2ecf20Sopenharmony_ci "gpio78", "gpio79", "gpio80", "gpio81", "gpio82", "gpio83", "gpio84", 3328c2ecf20Sopenharmony_ci "gpio85", "gpio86", "gpio87", "gpio88", "gpio89", "gpio90", "gpio91", 3338c2ecf20Sopenharmony_ci "gpio92", "gpio93", "gpio94", "gpio95", "gpio96", "gpio97", "gpio98", 3348c2ecf20Sopenharmony_ci "gpio99", 3358c2ecf20Sopenharmony_ci}; 3368c2ecf20Sopenharmony_cistatic const char * const aud_pin_groups[] = { 3378c2ecf20Sopenharmony_ci "gpio48", "gpio49", "gpio50", "gpio51", 3388c2ecf20Sopenharmony_ci}; 3398c2ecf20Sopenharmony_cistatic const char * const audio_pwm_groups[] = { 3408c2ecf20Sopenharmony_ci "gpio30", "gpio31", "gpio32", "gpio33", "gpio64", "gpio65", "gpio66", 3418c2ecf20Sopenharmony_ci "gpio67", 3428c2ecf20Sopenharmony_ci}; 3438c2ecf20Sopenharmony_cistatic const char * const blsp_i2c0_groups[] = { 3448c2ecf20Sopenharmony_ci "gpio10", "gpio11", "gpio20", "gpio21", "gpio58", "gpio59", 3458c2ecf20Sopenharmony_ci}; 3468c2ecf20Sopenharmony_cistatic const char * const blsp_i2c1_groups[] = { 3478c2ecf20Sopenharmony_ci "gpio12", "gpio13", "gpio34", "gpio35", 3488c2ecf20Sopenharmony_ci}; 3498c2ecf20Sopenharmony_cistatic const char * const blsp_spi0_groups[] = { 3508c2ecf20Sopenharmony_ci "gpio12", "gpio13", "gpio14", "gpio15", "gpio45", "gpio54", "gpio55", 3518c2ecf20Sopenharmony_ci "gpio56", "gpio57", 3528c2ecf20Sopenharmony_ci}; 3538c2ecf20Sopenharmony_cistatic const char * const blsp_spi1_groups[] = { 3548c2ecf20Sopenharmony_ci "gpio44", "gpio45", "gpio46", "gpio47", 3558c2ecf20Sopenharmony_ci}; 3568c2ecf20Sopenharmony_cistatic const char * const blsp_uart0_groups[] = { 3578c2ecf20Sopenharmony_ci "gpio16", "gpio17", "gpio60", "gpio61", 3588c2ecf20Sopenharmony_ci}; 3598c2ecf20Sopenharmony_cistatic const char * const blsp_uart1_groups[] = { 3608c2ecf20Sopenharmony_ci "gpio8", "gpio9", "gpio10", "gpio11", 3618c2ecf20Sopenharmony_ci}; 3628c2ecf20Sopenharmony_cistatic const char * const chip_rst_groups[] = { 3638c2ecf20Sopenharmony_ci "gpio62", 3648c2ecf20Sopenharmony_ci}; 3658c2ecf20Sopenharmony_cistatic const char * const i2s_rx_groups[] = { 3668c2ecf20Sopenharmony_ci "gpio0", "gpio1", "gpio2", "gpio20", "gpio21", "gpio22", "gpio23", 3678c2ecf20Sopenharmony_ci "gpio58", "gpio60", "gpio61", "gpio63", 3688c2ecf20Sopenharmony_ci}; 3698c2ecf20Sopenharmony_cistatic const char * const i2s_spdif_in_groups[] = { 3708c2ecf20Sopenharmony_ci "gpio34", "gpio59", "gpio63", 3718c2ecf20Sopenharmony_ci}; 3728c2ecf20Sopenharmony_cistatic const char * const i2s_spdif_out_groups[] = { 3738c2ecf20Sopenharmony_ci "gpio35", "gpio62", "gpio63", 3748c2ecf20Sopenharmony_ci}; 3758c2ecf20Sopenharmony_cistatic const char * const i2s_td_groups[] = { 3768c2ecf20Sopenharmony_ci "gpio27", "gpio28", "gpio29", "gpio54", "gpio55", "gpio56", "gpio63", 3778c2ecf20Sopenharmony_ci}; 3788c2ecf20Sopenharmony_cistatic const char * const i2s_tx_groups[] = { 3798c2ecf20Sopenharmony_ci "gpio24", "gpio25", "gpio26", "gpio52", "gpio53", "gpio57", "gpio60", 3808c2ecf20Sopenharmony_ci "gpio61", 3818c2ecf20Sopenharmony_ci}; 3828c2ecf20Sopenharmony_cistatic const char * const jtag_groups[] = { 3838c2ecf20Sopenharmony_ci "gpio0", "gpio1", "gpio2", "gpio3", "gpio4", "gpio5", 3848c2ecf20Sopenharmony_ci}; 3858c2ecf20Sopenharmony_cistatic const char * const led0_groups[] = { 3868c2ecf20Sopenharmony_ci "gpio16", "gpio36", "gpio60", 3878c2ecf20Sopenharmony_ci}; 3888c2ecf20Sopenharmony_cistatic const char * const led1_groups[] = { 3898c2ecf20Sopenharmony_ci "gpio17", "gpio37", "gpio61", 3908c2ecf20Sopenharmony_ci}; 3918c2ecf20Sopenharmony_cistatic const char * const led2_groups[] = { 3928c2ecf20Sopenharmony_ci "gpio36", "gpio38", "gpio58", 3938c2ecf20Sopenharmony_ci}; 3948c2ecf20Sopenharmony_cistatic const char * const led3_groups[] = { 3958c2ecf20Sopenharmony_ci "gpio39", 3968c2ecf20Sopenharmony_ci}; 3978c2ecf20Sopenharmony_cistatic const char * const led4_groups[] = { 3988c2ecf20Sopenharmony_ci "gpio40", 3998c2ecf20Sopenharmony_ci}; 4008c2ecf20Sopenharmony_cistatic const char * const led5_groups[] = { 4018c2ecf20Sopenharmony_ci "gpio44", 4028c2ecf20Sopenharmony_ci}; 4038c2ecf20Sopenharmony_cistatic const char * const led6_groups[] = { 4048c2ecf20Sopenharmony_ci "gpio45", 4058c2ecf20Sopenharmony_ci}; 4068c2ecf20Sopenharmony_cistatic const char * const led7_groups[] = { 4078c2ecf20Sopenharmony_ci "gpio46", 4088c2ecf20Sopenharmony_ci}; 4098c2ecf20Sopenharmony_cistatic const char * const led8_groups[] = { 4108c2ecf20Sopenharmony_ci "gpio47", 4118c2ecf20Sopenharmony_ci}; 4128c2ecf20Sopenharmony_cistatic const char * const led9_groups[] = { 4138c2ecf20Sopenharmony_ci "gpio48", 4148c2ecf20Sopenharmony_ci}; 4158c2ecf20Sopenharmony_cistatic const char * const led10_groups[] = { 4168c2ecf20Sopenharmony_ci "gpio49", 4178c2ecf20Sopenharmony_ci}; 4188c2ecf20Sopenharmony_cistatic const char * const led11_groups[] = { 4198c2ecf20Sopenharmony_ci "gpio50", 4208c2ecf20Sopenharmony_ci}; 4218c2ecf20Sopenharmony_cistatic const char * const mdc_groups[] = { 4228c2ecf20Sopenharmony_ci "gpio7", "gpio52", 4238c2ecf20Sopenharmony_ci}; 4248c2ecf20Sopenharmony_cistatic const char * const mdio_groups[] = { 4258c2ecf20Sopenharmony_ci "gpio6", "gpio53", 4268c2ecf20Sopenharmony_ci}; 4278c2ecf20Sopenharmony_cistatic const char * const pcie_groups[] = { 4288c2ecf20Sopenharmony_ci "gpio39", "gpio52", 4298c2ecf20Sopenharmony_ci}; 4308c2ecf20Sopenharmony_cistatic const char * const pmu_groups[] = { 4318c2ecf20Sopenharmony_ci "gpio54", "gpio55", 4328c2ecf20Sopenharmony_ci}; 4338c2ecf20Sopenharmony_cistatic const char * const prng_rosc_groups[] = { 4348c2ecf20Sopenharmony_ci "gpio53", 4358c2ecf20Sopenharmony_ci}; 4368c2ecf20Sopenharmony_cistatic const char * const qpic_groups[] = { 4378c2ecf20Sopenharmony_ci "gpio52", "gpio53", "gpio54", "gpio55", "gpio56", "gpio57", "gpio58", 4388c2ecf20Sopenharmony_ci "gpio59", "gpio60", "gpio61", "gpio62", "gpio63", "gpio64", "gpio65", 4398c2ecf20Sopenharmony_ci "gpio66", "gpio67", "gpio68", "gpio69", 4408c2ecf20Sopenharmony_ci}; 4418c2ecf20Sopenharmony_cistatic const char * const rgmii_groups[] = { 4428c2ecf20Sopenharmony_ci "gpio22", "gpio23", "gpio24", "gpio25", "gpio26", "gpio27", "gpio28", 4438c2ecf20Sopenharmony_ci "gpio29", "gpio30", "gpio31", "gpio32", "gpio33", 4448c2ecf20Sopenharmony_ci}; 4458c2ecf20Sopenharmony_cistatic const char * const rmii_groups[] = { 4468c2ecf20Sopenharmony_ci "gpio36", "gpio37", "gpio38", "gpio39", "gpio40", "gpio41", "gpio42", 4478c2ecf20Sopenharmony_ci "gpio43", "gpio44", "gpio45", "gpio46", "gpio47", "gpio48", "gpio49", 4488c2ecf20Sopenharmony_ci "gpio50", "gpio51", 4498c2ecf20Sopenharmony_ci}; 4508c2ecf20Sopenharmony_cistatic const char * const sdio_groups[] = { 4518c2ecf20Sopenharmony_ci "gpio23", "gpio24", "gpio25", "gpio26", "gpio27", "gpio28", "gpio29", 4528c2ecf20Sopenharmony_ci "gpio30", "gpio31", "gpio32", 4538c2ecf20Sopenharmony_ci}; 4548c2ecf20Sopenharmony_cistatic const char * const smart0_groups[] = { 4558c2ecf20Sopenharmony_ci "gpio0", "gpio1", "gpio2", "gpio5", "gpio44", "gpio45", "gpio46", 4568c2ecf20Sopenharmony_ci "gpio47", 4578c2ecf20Sopenharmony_ci}; 4588c2ecf20Sopenharmony_cistatic const char * const smart1_groups[] = { 4598c2ecf20Sopenharmony_ci "gpio8", "gpio9", "gpio16", "gpio17", "gpio58", "gpio59", "gpio60", 4608c2ecf20Sopenharmony_ci "gpio61", 4618c2ecf20Sopenharmony_ci}; 4628c2ecf20Sopenharmony_cistatic const char * const smart2_groups[] = { 4638c2ecf20Sopenharmony_ci "gpio40", "gpio41", "gpio48", "gpio49", 4648c2ecf20Sopenharmony_ci}; 4658c2ecf20Sopenharmony_cistatic const char * const smart3_groups[] = { 4668c2ecf20Sopenharmony_ci "gpio58", "gpio59", "gpio60", "gpio61", 4678c2ecf20Sopenharmony_ci}; 4688c2ecf20Sopenharmony_cistatic const char * const tm_groups[] = { 4698c2ecf20Sopenharmony_ci "gpio52", "gpio53", "gpio54", "gpio55", "gpio56", "gpio57", "gpio58", 4708c2ecf20Sopenharmony_ci "gpio59", "gpio60", "gpio61", "gpio62", "gpio63", 4718c2ecf20Sopenharmony_ci}; 4728c2ecf20Sopenharmony_cistatic const char * const wifi0_groups[] = { 4738c2ecf20Sopenharmony_ci "gpio37", "gpio40", "gpio41", "gpio42", "gpio50", "gpio51", "gpio52", 4748c2ecf20Sopenharmony_ci "gpio53", "gpio56", "gpio57", "gpio58", "gpio98", 4758c2ecf20Sopenharmony_ci}; 4768c2ecf20Sopenharmony_cistatic const char * const wifi1_groups[] = { 4778c2ecf20Sopenharmony_ci "gpio37", "gpio40", "gpio41", "gpio43", "gpio50", "gpio51", "gpio52", 4788c2ecf20Sopenharmony_ci "gpio53", "gpio56", "gpio57", "gpio58", "gpio98", 4798c2ecf20Sopenharmony_ci}; 4808c2ecf20Sopenharmony_ci 4818c2ecf20Sopenharmony_cistatic const struct msm_function ipq4019_functions[] = { 4828c2ecf20Sopenharmony_ci FUNCTION(aud_pin), 4838c2ecf20Sopenharmony_ci FUNCTION(audio_pwm), 4848c2ecf20Sopenharmony_ci FUNCTION(blsp_i2c0), 4858c2ecf20Sopenharmony_ci FUNCTION(blsp_i2c1), 4868c2ecf20Sopenharmony_ci FUNCTION(blsp_spi0), 4878c2ecf20Sopenharmony_ci FUNCTION(blsp_spi1), 4888c2ecf20Sopenharmony_ci FUNCTION(blsp_uart0), 4898c2ecf20Sopenharmony_ci FUNCTION(blsp_uart1), 4908c2ecf20Sopenharmony_ci FUNCTION(chip_rst), 4918c2ecf20Sopenharmony_ci FUNCTION(gpio), 4928c2ecf20Sopenharmony_ci FUNCTION(i2s_rx), 4938c2ecf20Sopenharmony_ci FUNCTION(i2s_spdif_in), 4948c2ecf20Sopenharmony_ci FUNCTION(i2s_spdif_out), 4958c2ecf20Sopenharmony_ci FUNCTION(i2s_td), 4968c2ecf20Sopenharmony_ci FUNCTION(i2s_tx), 4978c2ecf20Sopenharmony_ci FUNCTION(jtag), 4988c2ecf20Sopenharmony_ci FUNCTION(led0), 4998c2ecf20Sopenharmony_ci FUNCTION(led1), 5008c2ecf20Sopenharmony_ci FUNCTION(led2), 5018c2ecf20Sopenharmony_ci FUNCTION(led3), 5028c2ecf20Sopenharmony_ci FUNCTION(led4), 5038c2ecf20Sopenharmony_ci FUNCTION(led5), 5048c2ecf20Sopenharmony_ci FUNCTION(led6), 5058c2ecf20Sopenharmony_ci FUNCTION(led7), 5068c2ecf20Sopenharmony_ci FUNCTION(led8), 5078c2ecf20Sopenharmony_ci FUNCTION(led9), 5088c2ecf20Sopenharmony_ci FUNCTION(led10), 5098c2ecf20Sopenharmony_ci FUNCTION(led11), 5108c2ecf20Sopenharmony_ci FUNCTION(mdc), 5118c2ecf20Sopenharmony_ci FUNCTION(mdio), 5128c2ecf20Sopenharmony_ci FUNCTION(pcie), 5138c2ecf20Sopenharmony_ci FUNCTION(pmu), 5148c2ecf20Sopenharmony_ci FUNCTION(prng_rosc), 5158c2ecf20Sopenharmony_ci FUNCTION(qpic), 5168c2ecf20Sopenharmony_ci FUNCTION(rgmii), 5178c2ecf20Sopenharmony_ci FUNCTION(rmii), 5188c2ecf20Sopenharmony_ci FUNCTION(sdio), 5198c2ecf20Sopenharmony_ci FUNCTION(smart0), 5208c2ecf20Sopenharmony_ci FUNCTION(smart1), 5218c2ecf20Sopenharmony_ci FUNCTION(smart2), 5228c2ecf20Sopenharmony_ci FUNCTION(smart3), 5238c2ecf20Sopenharmony_ci FUNCTION(tm), 5248c2ecf20Sopenharmony_ci FUNCTION(wifi0), 5258c2ecf20Sopenharmony_ci FUNCTION(wifi1), 5268c2ecf20Sopenharmony_ci}; 5278c2ecf20Sopenharmony_ci 5288c2ecf20Sopenharmony_cistatic const struct msm_pingroup ipq4019_groups[] = { 5298c2ecf20Sopenharmony_ci PINGROUP(0, jtag, smart0, i2s_rx, NA, NA, NA, NA, NA, NA, NA, NA, NA, 5308c2ecf20Sopenharmony_ci NA, NA), 5318c2ecf20Sopenharmony_ci PINGROUP(1, jtag, smart0, i2s_rx, NA, NA, NA, NA, NA, NA, NA, NA, NA, 5328c2ecf20Sopenharmony_ci NA, NA), 5338c2ecf20Sopenharmony_ci PINGROUP(2, jtag, smart0, i2s_rx, NA, NA, NA, NA, NA, NA, NA, NA, NA, 5348c2ecf20Sopenharmony_ci NA, NA), 5358c2ecf20Sopenharmony_ci PINGROUP(3, jtag, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), 5368c2ecf20Sopenharmony_ci PINGROUP(4, jtag, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), 5378c2ecf20Sopenharmony_ci PINGROUP(5, jtag, smart0, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 5388c2ecf20Sopenharmony_ci NA), 5398c2ecf20Sopenharmony_ci PINGROUP(6, mdio, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), 5408c2ecf20Sopenharmony_ci PINGROUP(7, mdc, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), 5418c2ecf20Sopenharmony_ci PINGROUP(8, blsp_uart1, NA, NA, smart1, NA, NA, NA, NA, NA, NA, NA, 5428c2ecf20Sopenharmony_ci NA, NA, NA), 5438c2ecf20Sopenharmony_ci PINGROUP(9, blsp_uart1, NA, NA, smart1, NA, NA, NA, NA, NA, NA, NA, 5448c2ecf20Sopenharmony_ci NA, NA, NA), 5458c2ecf20Sopenharmony_ci PINGROUP(10, blsp_uart1, NA, NA, blsp_i2c0, NA, NA, NA, NA, NA, NA, NA, 5468c2ecf20Sopenharmony_ci NA, NA, NA), 5478c2ecf20Sopenharmony_ci PINGROUP(11, blsp_uart1, NA, NA, blsp_i2c0, NA, NA, NA, NA, NA, NA, NA, 5488c2ecf20Sopenharmony_ci NA, NA, NA), 5498c2ecf20Sopenharmony_ci PINGROUP(12, blsp_spi0, blsp_i2c1, NA, NA, NA, NA, NA, NA, NA, NA, NA, 5508c2ecf20Sopenharmony_ci NA, NA, NA), 5518c2ecf20Sopenharmony_ci PINGROUP(13, blsp_spi0, blsp_i2c1, NA, NA, NA, NA, NA, NA, NA, NA, NA, 5528c2ecf20Sopenharmony_ci NA, NA, NA), 5538c2ecf20Sopenharmony_ci PINGROUP(14, blsp_spi0, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 5548c2ecf20Sopenharmony_ci NA), 5558c2ecf20Sopenharmony_ci PINGROUP(15, blsp_spi0, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 5568c2ecf20Sopenharmony_ci NA), 5578c2ecf20Sopenharmony_ci PINGROUP(16, blsp_uart0, led0, smart1, NA, NA, NA, NA, NA, NA, NA, NA, 5588c2ecf20Sopenharmony_ci NA, NA, NA), 5598c2ecf20Sopenharmony_ci PINGROUP(17, blsp_uart0, led1, smart1, NA, NA, NA, NA, NA, NA, NA, NA, 5608c2ecf20Sopenharmony_ci NA, NA, NA), 5618c2ecf20Sopenharmony_ci PINGROUP(18, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), 5628c2ecf20Sopenharmony_ci PINGROUP(19, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), 5638c2ecf20Sopenharmony_ci PINGROUP(20, blsp_i2c0, i2s_rx, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 5648c2ecf20Sopenharmony_ci NA, NA), 5658c2ecf20Sopenharmony_ci PINGROUP(21, blsp_i2c0, i2s_rx, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 5668c2ecf20Sopenharmony_ci NA, NA), 5678c2ecf20Sopenharmony_ci PINGROUP(22, rgmii, i2s_rx, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 5688c2ecf20Sopenharmony_ci NA), 5698c2ecf20Sopenharmony_ci PINGROUP(23, sdio, rgmii, i2s_rx, NA, NA, NA, NA, NA, NA, NA, NA, NA, 5708c2ecf20Sopenharmony_ci NA, NA), 5718c2ecf20Sopenharmony_ci PINGROUP(24, sdio, rgmii, i2s_tx, NA, NA, NA, NA, NA, NA, NA, NA, NA, 5728c2ecf20Sopenharmony_ci NA, NA), 5738c2ecf20Sopenharmony_ci PINGROUP(25, sdio, rgmii, i2s_tx, NA, NA, NA, NA, NA, NA, NA, NA, NA, 5748c2ecf20Sopenharmony_ci NA, NA), 5758c2ecf20Sopenharmony_ci PINGROUP(26, sdio, rgmii, i2s_tx, NA, NA, NA, NA, NA, NA, NA, NA, NA, 5768c2ecf20Sopenharmony_ci NA, NA), 5778c2ecf20Sopenharmony_ci PINGROUP(27, sdio, rgmii, i2s_td, NA, NA, NA, NA, NA, NA, NA, NA, NA, 5788c2ecf20Sopenharmony_ci NA, NA), 5798c2ecf20Sopenharmony_ci PINGROUP(28, sdio, rgmii, i2s_td, NA, NA, NA, NA, NA, NA, NA, NA, NA, 5808c2ecf20Sopenharmony_ci NA, NA), 5818c2ecf20Sopenharmony_ci PINGROUP(29, sdio, rgmii, i2s_td, NA, NA, NA, NA, NA, NA, NA, NA, NA, 5828c2ecf20Sopenharmony_ci NA, NA), 5838c2ecf20Sopenharmony_ci PINGROUP(30, sdio, rgmii, audio_pwm, NA, NA, NA, NA, NA, NA, NA, NA, 5848c2ecf20Sopenharmony_ci NA, NA, NA), 5858c2ecf20Sopenharmony_ci PINGROUP(31, sdio, rgmii, audio_pwm, NA, NA, NA, NA, NA, NA, NA, NA, 5868c2ecf20Sopenharmony_ci NA, NA, NA), 5878c2ecf20Sopenharmony_ci PINGROUP(32, sdio, rgmii, audio_pwm, NA, NA, NA, NA, NA, NA, NA, NA, 5888c2ecf20Sopenharmony_ci NA, NA, NA), 5898c2ecf20Sopenharmony_ci PINGROUP(33, rgmii, audio_pwm, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 5908c2ecf20Sopenharmony_ci NA, NA), 5918c2ecf20Sopenharmony_ci PINGROUP(34, blsp_i2c1, i2s_spdif_in, NA, NA, NA, NA, NA, NA, NA, NA, 5928c2ecf20Sopenharmony_ci NA, NA, NA, NA), 5938c2ecf20Sopenharmony_ci PINGROUP(35, blsp_i2c1, i2s_spdif_out, NA, NA, NA, NA, NA, NA, NA, NA, 5948c2ecf20Sopenharmony_ci NA, NA, NA, NA), 5958c2ecf20Sopenharmony_ci PINGROUP(36, rmii, led2, led0, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 5968c2ecf20Sopenharmony_ci NA), 5978c2ecf20Sopenharmony_ci PINGROUP(37, rmii, wifi0, wifi1, led1, NA, NA, NA, NA, NA, NA, NA, NA, 5988c2ecf20Sopenharmony_ci NA, NA), 5998c2ecf20Sopenharmony_ci PINGROUP(38, rmii, led2, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 6008c2ecf20Sopenharmony_ci NA), 6018c2ecf20Sopenharmony_ci PINGROUP(39, rmii, pcie, led3, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 6028c2ecf20Sopenharmony_ci NA), 6038c2ecf20Sopenharmony_ci PINGROUP(40, rmii, wifi0, wifi1, smart2, led4, NA, NA, NA, NA, NA, NA, 6048c2ecf20Sopenharmony_ci NA, NA, NA), 6058c2ecf20Sopenharmony_ci PINGROUP(41, rmii, wifi0, wifi1, smart2, NA, NA, NA, NA, NA, NA, NA, 6068c2ecf20Sopenharmony_ci NA, NA, NA), 6078c2ecf20Sopenharmony_ci PINGROUP(42, rmii, wifi0, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 6088c2ecf20Sopenharmony_ci NA), 6098c2ecf20Sopenharmony_ci PINGROUP(43, rmii, wifi1, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 6108c2ecf20Sopenharmony_ci NA), 6118c2ecf20Sopenharmony_ci PINGROUP(44, rmii, blsp_spi1, smart0, led5, NA, NA, NA, NA, NA, NA, NA, 6128c2ecf20Sopenharmony_ci NA, NA, NA), 6138c2ecf20Sopenharmony_ci PINGROUP(45, rmii, blsp_spi1, blsp_spi0, smart0, led6, NA, NA, NA, NA, 6148c2ecf20Sopenharmony_ci NA, NA, NA, NA, NA), 6158c2ecf20Sopenharmony_ci PINGROUP(46, rmii, blsp_spi1, smart0, led7, NA, NA, NA, NA, NA, NA, NA, 6168c2ecf20Sopenharmony_ci NA, NA, NA), 6178c2ecf20Sopenharmony_ci PINGROUP(47, rmii, blsp_spi1, smart0, led8, NA, NA, NA, NA, NA, NA, NA, 6188c2ecf20Sopenharmony_ci NA, NA, NA), 6198c2ecf20Sopenharmony_ci PINGROUP(48, rmii, aud_pin, smart2, led9, NA, NA, NA, NA, NA, NA, NA, 6208c2ecf20Sopenharmony_ci NA, NA, NA), 6218c2ecf20Sopenharmony_ci PINGROUP(49, rmii, aud_pin, smart2, led10, NA, NA, NA, NA, NA, NA, NA, 6228c2ecf20Sopenharmony_ci NA, NA, NA), 6238c2ecf20Sopenharmony_ci PINGROUP(50, rmii, aud_pin, wifi0, wifi1, led11, NA, NA, NA, NA, NA, 6248c2ecf20Sopenharmony_ci NA, NA, NA, NA), 6258c2ecf20Sopenharmony_ci PINGROUP(51, rmii, aud_pin, wifi0, wifi1, NA, NA, NA, NA, NA, NA, NA, 6268c2ecf20Sopenharmony_ci NA, NA, NA), 6278c2ecf20Sopenharmony_ci PINGROUP(52, qpic, mdc, pcie, i2s_tx, NA, NA, NA, tm, wifi0, wifi1, NA, 6288c2ecf20Sopenharmony_ci NA, NA, NA), 6298c2ecf20Sopenharmony_ci PINGROUP(53, qpic, mdio, i2s_tx, prng_rosc, NA, tm, wifi0, wifi1, NA, 6308c2ecf20Sopenharmony_ci NA, NA, NA, NA, NA), 6318c2ecf20Sopenharmony_ci PINGROUP(54, qpic, blsp_spi0, i2s_td, NA, pmu, NA, NA, NA, tm, NA, NA, 6328c2ecf20Sopenharmony_ci NA, NA, NA), 6338c2ecf20Sopenharmony_ci PINGROUP(55, qpic, blsp_spi0, i2s_td, NA, pmu, NA, NA, NA, tm, NA, NA, 6348c2ecf20Sopenharmony_ci NA, NA, NA), 6358c2ecf20Sopenharmony_ci PINGROUP(56, qpic, blsp_spi0, i2s_td, NA, NA, tm, wifi0, wifi1, NA, NA, 6368c2ecf20Sopenharmony_ci NA, NA, NA, NA), 6378c2ecf20Sopenharmony_ci PINGROUP(57, qpic, blsp_spi0, i2s_tx, NA, NA, tm, wifi0, wifi1, NA, NA, 6388c2ecf20Sopenharmony_ci NA, NA, NA, NA), 6398c2ecf20Sopenharmony_ci PINGROUP(58, qpic, led2, blsp_i2c0, smart3, smart1, i2s_rx, NA, NA, tm, 6408c2ecf20Sopenharmony_ci wifi0, wifi1, NA, NA, NA), 6418c2ecf20Sopenharmony_ci PINGROUP(59, qpic, blsp_i2c0, smart3, smart1, i2s_spdif_in, NA, NA, NA, 6428c2ecf20Sopenharmony_ci NA, NA, tm, NA, NA, NA), 6438c2ecf20Sopenharmony_ci PINGROUP(60, qpic, blsp_uart0, smart1, smart3, led0, i2s_tx, i2s_rx, 6448c2ecf20Sopenharmony_ci NA, NA, NA, NA, NA, tm, NA), 6458c2ecf20Sopenharmony_ci PINGROUP(61, qpic, blsp_uart0, smart1, smart3, led1, i2s_tx, i2s_rx, 6468c2ecf20Sopenharmony_ci NA, NA, NA, NA, NA, tm, NA), 6478c2ecf20Sopenharmony_ci PINGROUP(62, qpic, chip_rst, NA, NA, i2s_spdif_out, NA, NA, NA, NA, NA, 6488c2ecf20Sopenharmony_ci tm, NA, NA, NA), 6498c2ecf20Sopenharmony_ci PINGROUP(63, qpic, NA, NA, NA, i2s_td, i2s_rx, i2s_spdif_out, 6508c2ecf20Sopenharmony_ci i2s_spdif_in, NA, NA, NA, NA, tm, NA), 6518c2ecf20Sopenharmony_ci PINGROUP(64, qpic, audio_pwm, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 6528c2ecf20Sopenharmony_ci NA, NA), 6538c2ecf20Sopenharmony_ci PINGROUP(65, qpic, audio_pwm, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 6548c2ecf20Sopenharmony_ci NA, NA), 6558c2ecf20Sopenharmony_ci PINGROUP(66, qpic, audio_pwm, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 6568c2ecf20Sopenharmony_ci NA, NA), 6578c2ecf20Sopenharmony_ci PINGROUP(67, qpic, audio_pwm, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 6588c2ecf20Sopenharmony_ci NA, NA), 6598c2ecf20Sopenharmony_ci PINGROUP(68, qpic, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), 6608c2ecf20Sopenharmony_ci PINGROUP(69, qpic, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), 6618c2ecf20Sopenharmony_ci PINGROUP(70, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), 6628c2ecf20Sopenharmony_ci PINGROUP(71, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), 6638c2ecf20Sopenharmony_ci PINGROUP(72, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), 6648c2ecf20Sopenharmony_ci PINGROUP(73, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), 6658c2ecf20Sopenharmony_ci PINGROUP(74, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), 6668c2ecf20Sopenharmony_ci PINGROUP(75, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), 6678c2ecf20Sopenharmony_ci PINGROUP(76, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), 6688c2ecf20Sopenharmony_ci PINGROUP(77, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), 6698c2ecf20Sopenharmony_ci PINGROUP(78, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), 6708c2ecf20Sopenharmony_ci PINGROUP(79, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), 6718c2ecf20Sopenharmony_ci PINGROUP(80, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), 6728c2ecf20Sopenharmony_ci PINGROUP(81, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), 6738c2ecf20Sopenharmony_ci PINGROUP(82, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), 6748c2ecf20Sopenharmony_ci PINGROUP(83, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), 6758c2ecf20Sopenharmony_ci PINGROUP(84, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), 6768c2ecf20Sopenharmony_ci PINGROUP(85, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), 6778c2ecf20Sopenharmony_ci PINGROUP(86, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), 6788c2ecf20Sopenharmony_ci PINGROUP(87, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), 6798c2ecf20Sopenharmony_ci PINGROUP(88, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), 6808c2ecf20Sopenharmony_ci PINGROUP(89, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), 6818c2ecf20Sopenharmony_ci PINGROUP(90, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), 6828c2ecf20Sopenharmony_ci PINGROUP(91, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), 6838c2ecf20Sopenharmony_ci PINGROUP(92, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), 6848c2ecf20Sopenharmony_ci PINGROUP(93, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), 6858c2ecf20Sopenharmony_ci PINGROUP(94, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), 6868c2ecf20Sopenharmony_ci PINGROUP(95, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), 6878c2ecf20Sopenharmony_ci PINGROUP(96, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), 6888c2ecf20Sopenharmony_ci PINGROUP(97, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), 6898c2ecf20Sopenharmony_ci PINGROUP(98, wifi0, wifi1, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 6908c2ecf20Sopenharmony_ci NA), 6918c2ecf20Sopenharmony_ci PINGROUP(99, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), 6928c2ecf20Sopenharmony_ci}; 6938c2ecf20Sopenharmony_ci 6948c2ecf20Sopenharmony_cistatic const struct msm_pinctrl_soc_data ipq4019_pinctrl = { 6958c2ecf20Sopenharmony_ci .pins = ipq4019_pins, 6968c2ecf20Sopenharmony_ci .npins = ARRAY_SIZE(ipq4019_pins), 6978c2ecf20Sopenharmony_ci .functions = ipq4019_functions, 6988c2ecf20Sopenharmony_ci .nfunctions = ARRAY_SIZE(ipq4019_functions), 6998c2ecf20Sopenharmony_ci .groups = ipq4019_groups, 7008c2ecf20Sopenharmony_ci .ngroups = ARRAY_SIZE(ipq4019_groups), 7018c2ecf20Sopenharmony_ci .ngpios = 100, 7028c2ecf20Sopenharmony_ci .pull_no_keeper = true, 7038c2ecf20Sopenharmony_ci}; 7048c2ecf20Sopenharmony_ci 7058c2ecf20Sopenharmony_cistatic int ipq4019_pinctrl_probe(struct platform_device *pdev) 7068c2ecf20Sopenharmony_ci{ 7078c2ecf20Sopenharmony_ci return msm_pinctrl_probe(pdev, &ipq4019_pinctrl); 7088c2ecf20Sopenharmony_ci} 7098c2ecf20Sopenharmony_ci 7108c2ecf20Sopenharmony_cistatic const struct of_device_id ipq4019_pinctrl_of_match[] = { 7118c2ecf20Sopenharmony_ci { .compatible = "qcom,ipq4019-pinctrl", }, 7128c2ecf20Sopenharmony_ci { }, 7138c2ecf20Sopenharmony_ci}; 7148c2ecf20Sopenharmony_ci 7158c2ecf20Sopenharmony_cistatic struct platform_driver ipq4019_pinctrl_driver = { 7168c2ecf20Sopenharmony_ci .driver = { 7178c2ecf20Sopenharmony_ci .name = "ipq4019-pinctrl", 7188c2ecf20Sopenharmony_ci .of_match_table = ipq4019_pinctrl_of_match, 7198c2ecf20Sopenharmony_ci }, 7208c2ecf20Sopenharmony_ci .probe = ipq4019_pinctrl_probe, 7218c2ecf20Sopenharmony_ci .remove = msm_pinctrl_remove, 7228c2ecf20Sopenharmony_ci}; 7238c2ecf20Sopenharmony_ci 7248c2ecf20Sopenharmony_cistatic int __init ipq4019_pinctrl_init(void) 7258c2ecf20Sopenharmony_ci{ 7268c2ecf20Sopenharmony_ci return platform_driver_register(&ipq4019_pinctrl_driver); 7278c2ecf20Sopenharmony_ci} 7288c2ecf20Sopenharmony_ciarch_initcall(ipq4019_pinctrl_init); 7298c2ecf20Sopenharmony_ci 7308c2ecf20Sopenharmony_cistatic void __exit ipq4019_pinctrl_exit(void) 7318c2ecf20Sopenharmony_ci{ 7328c2ecf20Sopenharmony_ci platform_driver_unregister(&ipq4019_pinctrl_driver); 7338c2ecf20Sopenharmony_ci} 7348c2ecf20Sopenharmony_cimodule_exit(ipq4019_pinctrl_exit); 7358c2ecf20Sopenharmony_ci 7368c2ecf20Sopenharmony_ciMODULE_DESCRIPTION("Qualcomm ipq4019 pinctrl driver"); 7378c2ecf20Sopenharmony_ciMODULE_LICENSE("GPL v2"); 7388c2ecf20Sopenharmony_ciMODULE_DEVICE_TABLE(of, ipq4019_pinctrl_of_match); 739