18c2ecf20Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0-only 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * Copyright (c) 2014, 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 ipq8064_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 848c2ecf20Sopenharmony_ci PINCTRL_PIN(69, "SDC3_CLK"), 858c2ecf20Sopenharmony_ci PINCTRL_PIN(70, "SDC3_CMD"), 868c2ecf20Sopenharmony_ci PINCTRL_PIN(71, "SDC3_DATA"), 878c2ecf20Sopenharmony_ci}; 888c2ecf20Sopenharmony_ci 898c2ecf20Sopenharmony_ci#define DECLARE_IPQ_GPIO_PINS(pin) static const unsigned int gpio##pin##_pins[] = { pin } 908c2ecf20Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(0); 918c2ecf20Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(1); 928c2ecf20Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(2); 938c2ecf20Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(3); 948c2ecf20Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(4); 958c2ecf20Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(5); 968c2ecf20Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(6); 978c2ecf20Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(7); 988c2ecf20Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(8); 998c2ecf20Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(9); 1008c2ecf20Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(10); 1018c2ecf20Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(11); 1028c2ecf20Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(12); 1038c2ecf20Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(13); 1048c2ecf20Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(14); 1058c2ecf20Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(15); 1068c2ecf20Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(16); 1078c2ecf20Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(17); 1088c2ecf20Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(18); 1098c2ecf20Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(19); 1108c2ecf20Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(20); 1118c2ecf20Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(21); 1128c2ecf20Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(22); 1138c2ecf20Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(23); 1148c2ecf20Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(24); 1158c2ecf20Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(25); 1168c2ecf20Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(26); 1178c2ecf20Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(27); 1188c2ecf20Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(28); 1198c2ecf20Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(29); 1208c2ecf20Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(30); 1218c2ecf20Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(31); 1228c2ecf20Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(32); 1238c2ecf20Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(33); 1248c2ecf20Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(34); 1258c2ecf20Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(35); 1268c2ecf20Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(36); 1278c2ecf20Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(37); 1288c2ecf20Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(38); 1298c2ecf20Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(39); 1308c2ecf20Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(40); 1318c2ecf20Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(41); 1328c2ecf20Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(42); 1338c2ecf20Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(43); 1348c2ecf20Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(44); 1358c2ecf20Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(45); 1368c2ecf20Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(46); 1378c2ecf20Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(47); 1388c2ecf20Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(48); 1398c2ecf20Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(49); 1408c2ecf20Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(50); 1418c2ecf20Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(51); 1428c2ecf20Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(52); 1438c2ecf20Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(53); 1448c2ecf20Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(54); 1458c2ecf20Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(55); 1468c2ecf20Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(56); 1478c2ecf20Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(57); 1488c2ecf20Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(58); 1498c2ecf20Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(59); 1508c2ecf20Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(60); 1518c2ecf20Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(61); 1528c2ecf20Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(62); 1538c2ecf20Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(63); 1548c2ecf20Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(64); 1558c2ecf20Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(65); 1568c2ecf20Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(66); 1578c2ecf20Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(67); 1588c2ecf20Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(68); 1598c2ecf20Sopenharmony_ci 1608c2ecf20Sopenharmony_cistatic const unsigned int sdc3_clk_pins[] = { 69 }; 1618c2ecf20Sopenharmony_cistatic const unsigned int sdc3_cmd_pins[] = { 70 }; 1628c2ecf20Sopenharmony_cistatic const unsigned int sdc3_data_pins[] = { 71 }; 1638c2ecf20Sopenharmony_ci 1648c2ecf20Sopenharmony_ci#define FUNCTION(fname) \ 1658c2ecf20Sopenharmony_ci [IPQ_MUX_##fname] = { \ 1668c2ecf20Sopenharmony_ci .name = #fname, \ 1678c2ecf20Sopenharmony_ci .groups = fname##_groups, \ 1688c2ecf20Sopenharmony_ci .ngroups = ARRAY_SIZE(fname##_groups), \ 1698c2ecf20Sopenharmony_ci } 1708c2ecf20Sopenharmony_ci 1718c2ecf20Sopenharmony_ci#define PINGROUP(id, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10) \ 1728c2ecf20Sopenharmony_ci { \ 1738c2ecf20Sopenharmony_ci .name = "gpio" #id, \ 1748c2ecf20Sopenharmony_ci .pins = gpio##id##_pins, \ 1758c2ecf20Sopenharmony_ci .npins = ARRAY_SIZE(gpio##id##_pins), \ 1768c2ecf20Sopenharmony_ci .funcs = (int[]){ \ 1778c2ecf20Sopenharmony_ci IPQ_MUX_gpio, \ 1788c2ecf20Sopenharmony_ci IPQ_MUX_##f1, \ 1798c2ecf20Sopenharmony_ci IPQ_MUX_##f2, \ 1808c2ecf20Sopenharmony_ci IPQ_MUX_##f3, \ 1818c2ecf20Sopenharmony_ci IPQ_MUX_##f4, \ 1828c2ecf20Sopenharmony_ci IPQ_MUX_##f5, \ 1838c2ecf20Sopenharmony_ci IPQ_MUX_##f6, \ 1848c2ecf20Sopenharmony_ci IPQ_MUX_##f7, \ 1858c2ecf20Sopenharmony_ci IPQ_MUX_##f8, \ 1868c2ecf20Sopenharmony_ci IPQ_MUX_##f9, \ 1878c2ecf20Sopenharmony_ci IPQ_MUX_##f10, \ 1888c2ecf20Sopenharmony_ci }, \ 1898c2ecf20Sopenharmony_ci .nfuncs = 11, \ 1908c2ecf20Sopenharmony_ci .ctl_reg = 0x1000 + 0x10 * id, \ 1918c2ecf20Sopenharmony_ci .io_reg = 0x1004 + 0x10 * id, \ 1928c2ecf20Sopenharmony_ci .intr_cfg_reg = 0x1008 + 0x10 * id, \ 1938c2ecf20Sopenharmony_ci .intr_status_reg = 0x100c + 0x10 * id, \ 1948c2ecf20Sopenharmony_ci .intr_target_reg = 0x400 + 0x4 * id, \ 1958c2ecf20Sopenharmony_ci .mux_bit = 2, \ 1968c2ecf20Sopenharmony_ci .pull_bit = 0, \ 1978c2ecf20Sopenharmony_ci .drv_bit = 6, \ 1988c2ecf20Sopenharmony_ci .oe_bit = 9, \ 1998c2ecf20Sopenharmony_ci .in_bit = 0, \ 2008c2ecf20Sopenharmony_ci .out_bit = 1, \ 2018c2ecf20Sopenharmony_ci .intr_enable_bit = 0, \ 2028c2ecf20Sopenharmony_ci .intr_status_bit = 0, \ 2038c2ecf20Sopenharmony_ci .intr_ack_high = 1, \ 2048c2ecf20Sopenharmony_ci .intr_target_bit = 0, \ 2058c2ecf20Sopenharmony_ci .intr_target_kpss_val = 4, \ 2068c2ecf20Sopenharmony_ci .intr_raw_status_bit = 3, \ 2078c2ecf20Sopenharmony_ci .intr_polarity_bit = 1, \ 2088c2ecf20Sopenharmony_ci .intr_detection_bit = 2, \ 2098c2ecf20Sopenharmony_ci .intr_detection_width = 1, \ 2108c2ecf20Sopenharmony_ci } 2118c2ecf20Sopenharmony_ci 2128c2ecf20Sopenharmony_ci#define SDC_PINGROUP(pg_name, ctl, pull, drv) \ 2138c2ecf20Sopenharmony_ci { \ 2148c2ecf20Sopenharmony_ci .name = #pg_name, \ 2158c2ecf20Sopenharmony_ci .pins = pg_name##_pins, \ 2168c2ecf20Sopenharmony_ci .npins = ARRAY_SIZE(pg_name##_pins), \ 2178c2ecf20Sopenharmony_ci .ctl_reg = ctl, \ 2188c2ecf20Sopenharmony_ci .io_reg = 0, \ 2198c2ecf20Sopenharmony_ci .intr_cfg_reg = 0, \ 2208c2ecf20Sopenharmony_ci .intr_status_reg = 0, \ 2218c2ecf20Sopenharmony_ci .intr_target_reg = 0, \ 2228c2ecf20Sopenharmony_ci .mux_bit = -1, \ 2238c2ecf20Sopenharmony_ci .pull_bit = pull, \ 2248c2ecf20Sopenharmony_ci .drv_bit = drv, \ 2258c2ecf20Sopenharmony_ci .oe_bit = -1, \ 2268c2ecf20Sopenharmony_ci .in_bit = -1, \ 2278c2ecf20Sopenharmony_ci .out_bit = -1, \ 2288c2ecf20Sopenharmony_ci .intr_enable_bit = -1, \ 2298c2ecf20Sopenharmony_ci .intr_status_bit = -1, \ 2308c2ecf20Sopenharmony_ci .intr_target_bit = -1, \ 2318c2ecf20Sopenharmony_ci .intr_target_kpss_val = -1, \ 2328c2ecf20Sopenharmony_ci .intr_raw_status_bit = -1, \ 2338c2ecf20Sopenharmony_ci .intr_polarity_bit = -1, \ 2348c2ecf20Sopenharmony_ci .intr_detection_bit = -1, \ 2358c2ecf20Sopenharmony_ci .intr_detection_width = -1, \ 2368c2ecf20Sopenharmony_ci } 2378c2ecf20Sopenharmony_ci 2388c2ecf20Sopenharmony_cienum ipq8064_functions { 2398c2ecf20Sopenharmony_ci IPQ_MUX_gpio, 2408c2ecf20Sopenharmony_ci IPQ_MUX_mdio, 2418c2ecf20Sopenharmony_ci IPQ_MUX_mi2s, 2428c2ecf20Sopenharmony_ci IPQ_MUX_pdm, 2438c2ecf20Sopenharmony_ci IPQ_MUX_ssbi, 2448c2ecf20Sopenharmony_ci IPQ_MUX_spmi, 2458c2ecf20Sopenharmony_ci IPQ_MUX_audio_pcm, 2468c2ecf20Sopenharmony_ci IPQ_MUX_gsbi1, 2478c2ecf20Sopenharmony_ci IPQ_MUX_gsbi2, 2488c2ecf20Sopenharmony_ci IPQ_MUX_gsbi4, 2498c2ecf20Sopenharmony_ci IPQ_MUX_gsbi5, 2508c2ecf20Sopenharmony_ci IPQ_MUX_gsbi5_spi_cs1, 2518c2ecf20Sopenharmony_ci IPQ_MUX_gsbi5_spi_cs2, 2528c2ecf20Sopenharmony_ci IPQ_MUX_gsbi5_spi_cs3, 2538c2ecf20Sopenharmony_ci IPQ_MUX_gsbi6, 2548c2ecf20Sopenharmony_ci IPQ_MUX_gsbi7, 2558c2ecf20Sopenharmony_ci IPQ_MUX_nss_spi, 2568c2ecf20Sopenharmony_ci IPQ_MUX_sdc1, 2578c2ecf20Sopenharmony_ci IPQ_MUX_spdif, 2588c2ecf20Sopenharmony_ci IPQ_MUX_nand, 2598c2ecf20Sopenharmony_ci IPQ_MUX_tsif1, 2608c2ecf20Sopenharmony_ci IPQ_MUX_tsif2, 2618c2ecf20Sopenharmony_ci IPQ_MUX_usb_fs_n, 2628c2ecf20Sopenharmony_ci IPQ_MUX_usb_fs, 2638c2ecf20Sopenharmony_ci IPQ_MUX_usb2_hsic, 2648c2ecf20Sopenharmony_ci IPQ_MUX_rgmii2, 2658c2ecf20Sopenharmony_ci IPQ_MUX_sata, 2668c2ecf20Sopenharmony_ci IPQ_MUX_pcie1_rst, 2678c2ecf20Sopenharmony_ci IPQ_MUX_pcie1_prsnt, 2688c2ecf20Sopenharmony_ci IPQ_MUX_pcie1_pwrflt, 2698c2ecf20Sopenharmony_ci IPQ_MUX_pcie1_pwren_n, 2708c2ecf20Sopenharmony_ci IPQ_MUX_pcie1_pwren, 2718c2ecf20Sopenharmony_ci IPQ_MUX_pcie1_clk_req, 2728c2ecf20Sopenharmony_ci IPQ_MUX_pcie2_rst, 2738c2ecf20Sopenharmony_ci IPQ_MUX_pcie2_prsnt, 2748c2ecf20Sopenharmony_ci IPQ_MUX_pcie2_pwrflt, 2758c2ecf20Sopenharmony_ci IPQ_MUX_pcie2_pwren_n, 2768c2ecf20Sopenharmony_ci IPQ_MUX_pcie2_pwren, 2778c2ecf20Sopenharmony_ci IPQ_MUX_pcie2_clk_req, 2788c2ecf20Sopenharmony_ci IPQ_MUX_pcie3_rst, 2798c2ecf20Sopenharmony_ci IPQ_MUX_pcie3_prsnt, 2808c2ecf20Sopenharmony_ci IPQ_MUX_pcie3_pwrflt, 2818c2ecf20Sopenharmony_ci IPQ_MUX_pcie3_pwren_n, 2828c2ecf20Sopenharmony_ci IPQ_MUX_pcie3_pwren, 2838c2ecf20Sopenharmony_ci IPQ_MUX_pcie3_clk_req, 2848c2ecf20Sopenharmony_ci IPQ_MUX_ps_hold, 2858c2ecf20Sopenharmony_ci IPQ_MUX_NA, 2868c2ecf20Sopenharmony_ci}; 2878c2ecf20Sopenharmony_ci 2888c2ecf20Sopenharmony_cistatic const char * const gpio_groups[] = { 2898c2ecf20Sopenharmony_ci "gpio0", "gpio1", "gpio2", "gpio3", "gpio4", "gpio5", "gpio6", "gpio7", 2908c2ecf20Sopenharmony_ci "gpio8", "gpio9", "gpio10", "gpio11", "gpio12", "gpio13", "gpio14", 2918c2ecf20Sopenharmony_ci "gpio15", "gpio16", "gpio17", "gpio18", "gpio19", "gpio20", "gpio21", 2928c2ecf20Sopenharmony_ci "gpio22", "gpio23", "gpio24", "gpio25", "gpio26", "gpio27", "gpio28", 2938c2ecf20Sopenharmony_ci "gpio29", "gpio30", "gpio31", "gpio32", "gpio33", "gpio34", "gpio35", 2948c2ecf20Sopenharmony_ci "gpio36", "gpio37", "gpio38", "gpio39", "gpio40", "gpio41", "gpio42", 2958c2ecf20Sopenharmony_ci "gpio43", "gpio44", "gpio45", "gpio46", "gpio47", "gpio48", "gpio49", 2968c2ecf20Sopenharmony_ci "gpio50", "gpio51", "gpio52", "gpio53", "gpio54", "gpio55", "gpio56", 2978c2ecf20Sopenharmony_ci "gpio57", "gpio58", "gpio59", "gpio60", "gpio61", "gpio62", "gpio63", 2988c2ecf20Sopenharmony_ci "gpio64", "gpio65", "gpio66", "gpio67", "gpio68" 2998c2ecf20Sopenharmony_ci}; 3008c2ecf20Sopenharmony_ci 3018c2ecf20Sopenharmony_cistatic const char * const mdio_groups[] = { 3028c2ecf20Sopenharmony_ci "gpio0", "gpio1", "gpio2", "gpio10", "gpio11", "gpio66", 3038c2ecf20Sopenharmony_ci}; 3048c2ecf20Sopenharmony_ci 3058c2ecf20Sopenharmony_cistatic const char * const mi2s_groups[] = { 3068c2ecf20Sopenharmony_ci "gpio27", "gpio28", "gpio29", "gpio30", "gpio31", "gpio32", 3078c2ecf20Sopenharmony_ci "gpio33", "gpio55", "gpio56", "gpio57", "gpio58", 3088c2ecf20Sopenharmony_ci}; 3098c2ecf20Sopenharmony_ci 3108c2ecf20Sopenharmony_cistatic const char * const pdm_groups[] = { 3118c2ecf20Sopenharmony_ci "gpio3", "gpio16", "gpio17", "gpio22", "gpio30", "gpio31", 3128c2ecf20Sopenharmony_ci "gpio34", "gpio35", "gpio52", "gpio55", "gpio56", "gpio58", 3138c2ecf20Sopenharmony_ci "gpio59", 3148c2ecf20Sopenharmony_ci}; 3158c2ecf20Sopenharmony_ci 3168c2ecf20Sopenharmony_cistatic const char * const ssbi_groups[] = { 3178c2ecf20Sopenharmony_ci "gpio10", "gpio11", 3188c2ecf20Sopenharmony_ci}; 3198c2ecf20Sopenharmony_ci 3208c2ecf20Sopenharmony_cistatic const char * const spmi_groups[] = { 3218c2ecf20Sopenharmony_ci "gpio10", "gpio11", 3228c2ecf20Sopenharmony_ci}; 3238c2ecf20Sopenharmony_ci 3248c2ecf20Sopenharmony_cistatic const char * const audio_pcm_groups[] = { 3258c2ecf20Sopenharmony_ci "gpio14", "gpio15", "gpio16", "gpio17", 3268c2ecf20Sopenharmony_ci}; 3278c2ecf20Sopenharmony_ci 3288c2ecf20Sopenharmony_cistatic const char * const gsbi1_groups[] = { 3298c2ecf20Sopenharmony_ci "gpio51", "gpio52", "gpio53", "gpio54", 3308c2ecf20Sopenharmony_ci}; 3318c2ecf20Sopenharmony_ci 3328c2ecf20Sopenharmony_cistatic const char * const gsbi2_groups[] = { 3338c2ecf20Sopenharmony_ci "gpio22", "gpio23", "gpio24", "gpio25", 3348c2ecf20Sopenharmony_ci}; 3358c2ecf20Sopenharmony_ci 3368c2ecf20Sopenharmony_cistatic const char * const gsbi4_groups[] = { 3378c2ecf20Sopenharmony_ci "gpio10", "gpio11", "gpio12", "gpio13", 3388c2ecf20Sopenharmony_ci}; 3398c2ecf20Sopenharmony_ci 3408c2ecf20Sopenharmony_cistatic const char * const gsbi5_groups[] = { 3418c2ecf20Sopenharmony_ci "gpio18", "gpio19", "gpio20", "gpio21", 3428c2ecf20Sopenharmony_ci}; 3438c2ecf20Sopenharmony_ci 3448c2ecf20Sopenharmony_cistatic const char * const gsbi5_spi_cs1_groups[] = { 3458c2ecf20Sopenharmony_ci "gpio6", "gpio61", 3468c2ecf20Sopenharmony_ci}; 3478c2ecf20Sopenharmony_ci 3488c2ecf20Sopenharmony_cistatic const char * const gsbi5_spi_cs2_groups[] = { 3498c2ecf20Sopenharmony_ci "gpio7", "gpio62", 3508c2ecf20Sopenharmony_ci}; 3518c2ecf20Sopenharmony_ci 3528c2ecf20Sopenharmony_cistatic const char * const gsbi5_spi_cs3_groups[] = { 3538c2ecf20Sopenharmony_ci "gpio2", 3548c2ecf20Sopenharmony_ci}; 3558c2ecf20Sopenharmony_ci 3568c2ecf20Sopenharmony_cistatic const char * const gsbi6_groups[] = { 3578c2ecf20Sopenharmony_ci "gpio27", "gpio28", "gpio29", "gpio30", "gpio55", "gpio56", 3588c2ecf20Sopenharmony_ci "gpio57", "gpio58", 3598c2ecf20Sopenharmony_ci}; 3608c2ecf20Sopenharmony_ci 3618c2ecf20Sopenharmony_cistatic const char * const gsbi7_groups[] = { 3628c2ecf20Sopenharmony_ci "gpio6", "gpio7", "gpio8", "gpio9", 3638c2ecf20Sopenharmony_ci}; 3648c2ecf20Sopenharmony_ci 3658c2ecf20Sopenharmony_cistatic const char * const nss_spi_groups[] = { 3668c2ecf20Sopenharmony_ci "gpio14", "gpio15", "gpio16", "gpio17", "gpio55", "gpio56", 3678c2ecf20Sopenharmony_ci "gpio57", "gpio58", 3688c2ecf20Sopenharmony_ci}; 3698c2ecf20Sopenharmony_ci 3708c2ecf20Sopenharmony_cistatic const char * const sdc1_groups[] = { 3718c2ecf20Sopenharmony_ci "gpio38", "gpio39", "gpio40", "gpio41", "gpio42", "gpio43", 3728c2ecf20Sopenharmony_ci "gpio44", "gpio45", "gpio46", "gpio47", 3738c2ecf20Sopenharmony_ci}; 3748c2ecf20Sopenharmony_ci 3758c2ecf20Sopenharmony_cistatic const char * const spdif_groups[] = { 3768c2ecf20Sopenharmony_ci "gpio10", "gpio48", 3778c2ecf20Sopenharmony_ci}; 3788c2ecf20Sopenharmony_ci 3798c2ecf20Sopenharmony_cistatic const char * const nand_groups[] = { 3808c2ecf20Sopenharmony_ci "gpio34", "gpio35", "gpio36", "gpio37", "gpio38", "gpio39", 3818c2ecf20Sopenharmony_ci "gpio40", "gpio41", "gpio42", "gpio43", "gpio44", "gpio45", 3828c2ecf20Sopenharmony_ci "gpio46", "gpio47", 3838c2ecf20Sopenharmony_ci}; 3848c2ecf20Sopenharmony_ci 3858c2ecf20Sopenharmony_cistatic const char * const tsif1_groups[] = { 3868c2ecf20Sopenharmony_ci "gpio55", "gpio56", "gpio57", "gpio58", 3878c2ecf20Sopenharmony_ci}; 3888c2ecf20Sopenharmony_ci 3898c2ecf20Sopenharmony_cistatic const char * const tsif2_groups[] = { 3908c2ecf20Sopenharmony_ci "gpio59", "gpio60", "gpio61", "gpio62", 3918c2ecf20Sopenharmony_ci}; 3928c2ecf20Sopenharmony_ci 3938c2ecf20Sopenharmony_cistatic const char * const usb_fs_n_groups[] = { 3948c2ecf20Sopenharmony_ci "gpio6", 3958c2ecf20Sopenharmony_ci}; 3968c2ecf20Sopenharmony_ci 3978c2ecf20Sopenharmony_cistatic const char * const usb_fs_groups[] = { 3988c2ecf20Sopenharmony_ci "gpio6", "gpio7", "gpio8", 3998c2ecf20Sopenharmony_ci}; 4008c2ecf20Sopenharmony_ci 4018c2ecf20Sopenharmony_cistatic const char * const usb2_hsic_groups[] = { 4028c2ecf20Sopenharmony_ci "gpio67", "gpio68", 4038c2ecf20Sopenharmony_ci}; 4048c2ecf20Sopenharmony_ci 4058c2ecf20Sopenharmony_cistatic const char * const rgmii2_groups[] = { 4068c2ecf20Sopenharmony_ci "gpio2", "gpio27", "gpio28", "gpio29", "gpio30", "gpio31", "gpio32", 4078c2ecf20Sopenharmony_ci "gpio51", "gpio52", "gpio59", "gpio60", "gpio61", "gpio62", "gpio66", 4088c2ecf20Sopenharmony_ci}; 4098c2ecf20Sopenharmony_ci 4108c2ecf20Sopenharmony_cistatic const char * const sata_groups[] = { 4118c2ecf20Sopenharmony_ci "gpio10", 4128c2ecf20Sopenharmony_ci}; 4138c2ecf20Sopenharmony_ci 4148c2ecf20Sopenharmony_cistatic const char * const pcie1_rst_groups[] = { 4158c2ecf20Sopenharmony_ci "gpio3", 4168c2ecf20Sopenharmony_ci}; 4178c2ecf20Sopenharmony_ci 4188c2ecf20Sopenharmony_cistatic const char * const pcie1_prsnt_groups[] = { 4198c2ecf20Sopenharmony_ci "gpio3", "gpio11", 4208c2ecf20Sopenharmony_ci}; 4218c2ecf20Sopenharmony_ci 4228c2ecf20Sopenharmony_cistatic const char * const pcie1_pwren_n_groups[] = { 4238c2ecf20Sopenharmony_ci "gpio4", "gpio12", 4248c2ecf20Sopenharmony_ci}; 4258c2ecf20Sopenharmony_ci 4268c2ecf20Sopenharmony_cistatic const char * const pcie1_pwren_groups[] = { 4278c2ecf20Sopenharmony_ci "gpio4", "gpio12", 4288c2ecf20Sopenharmony_ci}; 4298c2ecf20Sopenharmony_ci 4308c2ecf20Sopenharmony_cistatic const char * const pcie1_pwrflt_groups[] = { 4318c2ecf20Sopenharmony_ci "gpio5", "gpio13", 4328c2ecf20Sopenharmony_ci}; 4338c2ecf20Sopenharmony_ci 4348c2ecf20Sopenharmony_cistatic const char * const pcie1_clk_req_groups[] = { 4358c2ecf20Sopenharmony_ci "gpio5", 4368c2ecf20Sopenharmony_ci}; 4378c2ecf20Sopenharmony_ci 4388c2ecf20Sopenharmony_cistatic const char * const pcie2_rst_groups[] = { 4398c2ecf20Sopenharmony_ci "gpio48", 4408c2ecf20Sopenharmony_ci}; 4418c2ecf20Sopenharmony_ci 4428c2ecf20Sopenharmony_cistatic const char * const pcie2_prsnt_groups[] = { 4438c2ecf20Sopenharmony_ci "gpio11", "gpio48", 4448c2ecf20Sopenharmony_ci}; 4458c2ecf20Sopenharmony_ci 4468c2ecf20Sopenharmony_cistatic const char * const pcie2_pwren_n_groups[] = { 4478c2ecf20Sopenharmony_ci "gpio12", "gpio49", 4488c2ecf20Sopenharmony_ci}; 4498c2ecf20Sopenharmony_ci 4508c2ecf20Sopenharmony_cistatic const char * const pcie2_pwren_groups[] = { 4518c2ecf20Sopenharmony_ci "gpio12", "gpio49", 4528c2ecf20Sopenharmony_ci}; 4538c2ecf20Sopenharmony_ci 4548c2ecf20Sopenharmony_cistatic const char * const pcie2_pwrflt_groups[] = { 4558c2ecf20Sopenharmony_ci "gpio13", "gpio50", 4568c2ecf20Sopenharmony_ci}; 4578c2ecf20Sopenharmony_ci 4588c2ecf20Sopenharmony_cistatic const char * const pcie2_clk_req_groups[] = { 4598c2ecf20Sopenharmony_ci "gpio50", 4608c2ecf20Sopenharmony_ci}; 4618c2ecf20Sopenharmony_ci 4628c2ecf20Sopenharmony_cistatic const char * const pcie3_rst_groups[] = { 4638c2ecf20Sopenharmony_ci "gpio63", 4648c2ecf20Sopenharmony_ci}; 4658c2ecf20Sopenharmony_ci 4668c2ecf20Sopenharmony_cistatic const char * const pcie3_prsnt_groups[] = { 4678c2ecf20Sopenharmony_ci "gpio11", 4688c2ecf20Sopenharmony_ci}; 4698c2ecf20Sopenharmony_ci 4708c2ecf20Sopenharmony_cistatic const char * const pcie3_pwren_n_groups[] = { 4718c2ecf20Sopenharmony_ci "gpio12", 4728c2ecf20Sopenharmony_ci}; 4738c2ecf20Sopenharmony_ci 4748c2ecf20Sopenharmony_cistatic const char * const pcie3_pwren_groups[] = { 4758c2ecf20Sopenharmony_ci "gpio12", 4768c2ecf20Sopenharmony_ci}; 4778c2ecf20Sopenharmony_ci 4788c2ecf20Sopenharmony_cistatic const char * const pcie3_pwrflt_groups[] = { 4798c2ecf20Sopenharmony_ci "gpio13", 4808c2ecf20Sopenharmony_ci}; 4818c2ecf20Sopenharmony_ci 4828c2ecf20Sopenharmony_cistatic const char * const pcie3_clk_req_groups[] = { 4838c2ecf20Sopenharmony_ci "gpio65", 4848c2ecf20Sopenharmony_ci}; 4858c2ecf20Sopenharmony_ci 4868c2ecf20Sopenharmony_cistatic const char * const ps_hold_groups[] = { 4878c2ecf20Sopenharmony_ci "gpio26", 4888c2ecf20Sopenharmony_ci}; 4898c2ecf20Sopenharmony_ci 4908c2ecf20Sopenharmony_cistatic const struct msm_function ipq8064_functions[] = { 4918c2ecf20Sopenharmony_ci FUNCTION(gpio), 4928c2ecf20Sopenharmony_ci FUNCTION(mdio), 4938c2ecf20Sopenharmony_ci FUNCTION(ssbi), 4948c2ecf20Sopenharmony_ci FUNCTION(spmi), 4958c2ecf20Sopenharmony_ci FUNCTION(mi2s), 4968c2ecf20Sopenharmony_ci FUNCTION(pdm), 4978c2ecf20Sopenharmony_ci FUNCTION(audio_pcm), 4988c2ecf20Sopenharmony_ci FUNCTION(gsbi1), 4998c2ecf20Sopenharmony_ci FUNCTION(gsbi2), 5008c2ecf20Sopenharmony_ci FUNCTION(gsbi4), 5018c2ecf20Sopenharmony_ci FUNCTION(gsbi5), 5028c2ecf20Sopenharmony_ci FUNCTION(gsbi5_spi_cs1), 5038c2ecf20Sopenharmony_ci FUNCTION(gsbi5_spi_cs2), 5048c2ecf20Sopenharmony_ci FUNCTION(gsbi5_spi_cs3), 5058c2ecf20Sopenharmony_ci FUNCTION(gsbi6), 5068c2ecf20Sopenharmony_ci FUNCTION(gsbi7), 5078c2ecf20Sopenharmony_ci FUNCTION(nss_spi), 5088c2ecf20Sopenharmony_ci FUNCTION(sdc1), 5098c2ecf20Sopenharmony_ci FUNCTION(spdif), 5108c2ecf20Sopenharmony_ci FUNCTION(nand), 5118c2ecf20Sopenharmony_ci FUNCTION(tsif1), 5128c2ecf20Sopenharmony_ci FUNCTION(tsif2), 5138c2ecf20Sopenharmony_ci FUNCTION(usb_fs_n), 5148c2ecf20Sopenharmony_ci FUNCTION(usb_fs), 5158c2ecf20Sopenharmony_ci FUNCTION(usb2_hsic), 5168c2ecf20Sopenharmony_ci FUNCTION(rgmii2), 5178c2ecf20Sopenharmony_ci FUNCTION(sata), 5188c2ecf20Sopenharmony_ci FUNCTION(pcie1_rst), 5198c2ecf20Sopenharmony_ci FUNCTION(pcie1_prsnt), 5208c2ecf20Sopenharmony_ci FUNCTION(pcie1_pwren_n), 5218c2ecf20Sopenharmony_ci FUNCTION(pcie1_pwren), 5228c2ecf20Sopenharmony_ci FUNCTION(pcie1_pwrflt), 5238c2ecf20Sopenharmony_ci FUNCTION(pcie1_clk_req), 5248c2ecf20Sopenharmony_ci FUNCTION(pcie2_rst), 5258c2ecf20Sopenharmony_ci FUNCTION(pcie2_prsnt), 5268c2ecf20Sopenharmony_ci FUNCTION(pcie2_pwren_n), 5278c2ecf20Sopenharmony_ci FUNCTION(pcie2_pwren), 5288c2ecf20Sopenharmony_ci FUNCTION(pcie2_pwrflt), 5298c2ecf20Sopenharmony_ci FUNCTION(pcie2_clk_req), 5308c2ecf20Sopenharmony_ci FUNCTION(pcie3_rst), 5318c2ecf20Sopenharmony_ci FUNCTION(pcie3_prsnt), 5328c2ecf20Sopenharmony_ci FUNCTION(pcie3_pwren_n), 5338c2ecf20Sopenharmony_ci FUNCTION(pcie3_pwren), 5348c2ecf20Sopenharmony_ci FUNCTION(pcie3_pwrflt), 5358c2ecf20Sopenharmony_ci FUNCTION(pcie3_clk_req), 5368c2ecf20Sopenharmony_ci FUNCTION(ps_hold), 5378c2ecf20Sopenharmony_ci}; 5388c2ecf20Sopenharmony_ci 5398c2ecf20Sopenharmony_cistatic const struct msm_pingroup ipq8064_groups[] = { 5408c2ecf20Sopenharmony_ci PINGROUP(0, mdio, NA, NA, NA, NA, NA, NA, NA, NA, NA), 5418c2ecf20Sopenharmony_ci PINGROUP(1, mdio, NA, NA, NA, NA, NA, NA, NA, NA, NA), 5428c2ecf20Sopenharmony_ci PINGROUP(2, gsbi5_spi_cs3, rgmii2, mdio, NA, NA, NA, NA, NA, NA, NA), 5438c2ecf20Sopenharmony_ci PINGROUP(3, pcie1_rst, pcie1_prsnt, pdm, NA, NA, NA, NA, NA, NA, NA), 5448c2ecf20Sopenharmony_ci PINGROUP(4, pcie1_pwren_n, pcie1_pwren, NA, NA, NA, NA, NA, NA, NA, NA), 5458c2ecf20Sopenharmony_ci PINGROUP(5, pcie1_clk_req, pcie1_pwrflt, NA, NA, NA, NA, NA, NA, NA, NA), 5468c2ecf20Sopenharmony_ci PINGROUP(6, gsbi7, usb_fs, gsbi5_spi_cs1, usb_fs_n, NA, NA, NA, NA, NA, NA), 5478c2ecf20Sopenharmony_ci PINGROUP(7, gsbi7, usb_fs, gsbi5_spi_cs2, NA, NA, NA, NA, NA, NA, NA), 5488c2ecf20Sopenharmony_ci PINGROUP(8, gsbi7, usb_fs, NA, NA, NA, NA, NA, NA, NA, NA), 5498c2ecf20Sopenharmony_ci PINGROUP(9, gsbi7, NA, NA, NA, NA, NA, NA, NA, NA, NA), 5508c2ecf20Sopenharmony_ci PINGROUP(10, gsbi4, spdif, sata, ssbi, mdio, spmi, NA, NA, NA, NA), 5518c2ecf20Sopenharmony_ci PINGROUP(11, gsbi4, pcie2_prsnt, pcie1_prsnt, pcie3_prsnt, ssbi, mdio, spmi, NA, NA, NA), 5528c2ecf20Sopenharmony_ci PINGROUP(12, gsbi4, pcie2_pwren_n, pcie1_pwren_n, pcie3_pwren_n, pcie2_pwren, pcie1_pwren, pcie3_pwren, NA, NA, NA), 5538c2ecf20Sopenharmony_ci PINGROUP(13, gsbi4, pcie2_pwrflt, pcie1_pwrflt, pcie3_pwrflt, NA, NA, NA, NA, NA, NA), 5548c2ecf20Sopenharmony_ci PINGROUP(14, audio_pcm, nss_spi, NA, NA, NA, NA, NA, NA, NA, NA), 5558c2ecf20Sopenharmony_ci PINGROUP(15, audio_pcm, nss_spi, NA, NA, NA, NA, NA, NA, NA, NA), 5568c2ecf20Sopenharmony_ci PINGROUP(16, audio_pcm, nss_spi, pdm, NA, NA, NA, NA, NA, NA, NA), 5578c2ecf20Sopenharmony_ci PINGROUP(17, audio_pcm, nss_spi, pdm, NA, NA, NA, NA, NA, NA, NA), 5588c2ecf20Sopenharmony_ci PINGROUP(18, gsbi5, NA, NA, NA, NA, NA, NA, NA, NA, NA), 5598c2ecf20Sopenharmony_ci PINGROUP(19, gsbi5, NA, NA, NA, NA, NA, NA, NA, NA, NA), 5608c2ecf20Sopenharmony_ci PINGROUP(20, gsbi5, NA, NA, NA, NA, NA, NA, NA, NA, NA), 5618c2ecf20Sopenharmony_ci PINGROUP(21, gsbi5, NA, NA, NA, NA, NA, NA, NA, NA, NA), 5628c2ecf20Sopenharmony_ci PINGROUP(22, gsbi2, pdm, NA, NA, NA, NA, NA, NA, NA, NA), 5638c2ecf20Sopenharmony_ci PINGROUP(23, gsbi2, NA, NA, NA, NA, NA, NA, NA, NA, NA), 5648c2ecf20Sopenharmony_ci PINGROUP(24, gsbi2, NA, NA, NA, NA, NA, NA, NA, NA, NA), 5658c2ecf20Sopenharmony_ci PINGROUP(25, gsbi2, NA, NA, NA, NA, NA, NA, NA, NA, NA), 5668c2ecf20Sopenharmony_ci PINGROUP(26, ps_hold, NA, NA, NA, NA, NA, NA, NA, NA, NA), 5678c2ecf20Sopenharmony_ci PINGROUP(27, mi2s, rgmii2, gsbi6, NA, NA, NA, NA, NA, NA, NA), 5688c2ecf20Sopenharmony_ci PINGROUP(28, mi2s, rgmii2, gsbi6, NA, NA, NA, NA, NA, NA, NA), 5698c2ecf20Sopenharmony_ci PINGROUP(29, mi2s, rgmii2, gsbi6, NA, NA, NA, NA, NA, NA, NA), 5708c2ecf20Sopenharmony_ci PINGROUP(30, mi2s, rgmii2, gsbi6, pdm, NA, NA, NA, NA, NA, NA), 5718c2ecf20Sopenharmony_ci PINGROUP(31, mi2s, rgmii2, pdm, NA, NA, NA, NA, NA, NA, NA), 5728c2ecf20Sopenharmony_ci PINGROUP(32, mi2s, rgmii2, NA, NA, NA, NA, NA, NA, NA, NA), 5738c2ecf20Sopenharmony_ci PINGROUP(33, mi2s, NA, NA, NA, NA, NA, NA, NA, NA, NA), 5748c2ecf20Sopenharmony_ci PINGROUP(34, nand, pdm, NA, NA, NA, NA, NA, NA, NA, NA), 5758c2ecf20Sopenharmony_ci PINGROUP(35, nand, pdm, NA, NA, NA, NA, NA, NA, NA, NA), 5768c2ecf20Sopenharmony_ci PINGROUP(36, nand, NA, NA, NA, NA, NA, NA, NA, NA, NA), 5778c2ecf20Sopenharmony_ci PINGROUP(37, nand, NA, NA, NA, NA, NA, NA, NA, NA, NA), 5788c2ecf20Sopenharmony_ci PINGROUP(38, nand, sdc1, NA, NA, NA, NA, NA, NA, NA, NA), 5798c2ecf20Sopenharmony_ci PINGROUP(39, nand, sdc1, NA, NA, NA, NA, NA, NA, NA, NA), 5808c2ecf20Sopenharmony_ci PINGROUP(40, nand, sdc1, NA, NA, NA, NA, NA, NA, NA, NA), 5818c2ecf20Sopenharmony_ci PINGROUP(41, nand, sdc1, NA, NA, NA, NA, NA, NA, NA, NA), 5828c2ecf20Sopenharmony_ci PINGROUP(42, nand, sdc1, NA, NA, NA, NA, NA, NA, NA, NA), 5838c2ecf20Sopenharmony_ci PINGROUP(43, nand, sdc1, NA, NA, NA, NA, NA, NA, NA, NA), 5848c2ecf20Sopenharmony_ci PINGROUP(44, nand, sdc1, NA, NA, NA, NA, NA, NA, NA, NA), 5858c2ecf20Sopenharmony_ci PINGROUP(45, nand, sdc1, NA, NA, NA, NA, NA, NA, NA, NA), 5868c2ecf20Sopenharmony_ci PINGROUP(46, nand, sdc1, NA, NA, NA, NA, NA, NA, NA, NA), 5878c2ecf20Sopenharmony_ci PINGROUP(47, nand, sdc1, NA, NA, NA, NA, NA, NA, NA, NA), 5888c2ecf20Sopenharmony_ci PINGROUP(48, pcie2_rst, spdif, NA, NA, NA, NA, NA, NA, NA, NA), 5898c2ecf20Sopenharmony_ci PINGROUP(49, pcie2_pwren_n, pcie2_pwren, NA, NA, NA, NA, NA, NA, NA, NA), 5908c2ecf20Sopenharmony_ci PINGROUP(50, pcie2_clk_req, pcie2_pwrflt, NA, NA, NA, NA, NA, NA, NA, NA), 5918c2ecf20Sopenharmony_ci PINGROUP(51, gsbi1, rgmii2, NA, NA, NA, NA, NA, NA, NA, NA), 5928c2ecf20Sopenharmony_ci PINGROUP(52, gsbi1, rgmii2, pdm, NA, NA, NA, NA, NA, NA, NA), 5938c2ecf20Sopenharmony_ci PINGROUP(53, gsbi1, NA, NA, NA, NA, NA, NA, NA, NA, NA), 5948c2ecf20Sopenharmony_ci PINGROUP(54, gsbi1, NA, NA, NA, NA, NA, NA, NA, NA, NA), 5958c2ecf20Sopenharmony_ci PINGROUP(55, tsif1, mi2s, gsbi6, pdm, nss_spi, NA, NA, NA, NA, NA), 5968c2ecf20Sopenharmony_ci PINGROUP(56, tsif1, mi2s, gsbi6, pdm, nss_spi, NA, NA, NA, NA, NA), 5978c2ecf20Sopenharmony_ci PINGROUP(57, tsif1, mi2s, gsbi6, nss_spi, NA, NA, NA, NA, NA, NA), 5988c2ecf20Sopenharmony_ci PINGROUP(58, tsif1, mi2s, gsbi6, pdm, nss_spi, NA, NA, NA, NA, NA), 5998c2ecf20Sopenharmony_ci PINGROUP(59, tsif2, rgmii2, pdm, NA, NA, NA, NA, NA, NA, NA), 6008c2ecf20Sopenharmony_ci PINGROUP(60, tsif2, rgmii2, NA, NA, NA, NA, NA, NA, NA, NA), 6018c2ecf20Sopenharmony_ci PINGROUP(61, tsif2, rgmii2, gsbi5_spi_cs1, NA, NA, NA, NA, NA, NA, NA), 6028c2ecf20Sopenharmony_ci PINGROUP(62, tsif2, rgmii2, gsbi5_spi_cs2, NA, NA, NA, NA, NA, NA, NA), 6038c2ecf20Sopenharmony_ci PINGROUP(63, pcie3_rst, NA, NA, NA, NA, NA, NA, NA, NA, NA), 6048c2ecf20Sopenharmony_ci PINGROUP(64, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), 6058c2ecf20Sopenharmony_ci PINGROUP(65, pcie3_clk_req, NA, NA, NA, NA, NA, NA, NA, NA, NA), 6068c2ecf20Sopenharmony_ci PINGROUP(66, rgmii2, mdio, NA, NA, NA, NA, NA, NA, NA, NA), 6078c2ecf20Sopenharmony_ci PINGROUP(67, usb2_hsic, NA, NA, NA, NA, NA, NA, NA, NA, NA), 6088c2ecf20Sopenharmony_ci PINGROUP(68, usb2_hsic, NA, NA, NA, NA, NA, NA, NA, NA, NA), 6098c2ecf20Sopenharmony_ci SDC_PINGROUP(sdc3_clk, 0x204a, 14, 6), 6108c2ecf20Sopenharmony_ci SDC_PINGROUP(sdc3_cmd, 0x204a, 11, 3), 6118c2ecf20Sopenharmony_ci SDC_PINGROUP(sdc3_data, 0x204a, 9, 0), 6128c2ecf20Sopenharmony_ci}; 6138c2ecf20Sopenharmony_ci 6148c2ecf20Sopenharmony_ci#define NUM_GPIO_PINGROUPS 69 6158c2ecf20Sopenharmony_ci 6168c2ecf20Sopenharmony_cistatic const struct msm_pinctrl_soc_data ipq8064_pinctrl = { 6178c2ecf20Sopenharmony_ci .pins = ipq8064_pins, 6188c2ecf20Sopenharmony_ci .npins = ARRAY_SIZE(ipq8064_pins), 6198c2ecf20Sopenharmony_ci .functions = ipq8064_functions, 6208c2ecf20Sopenharmony_ci .nfunctions = ARRAY_SIZE(ipq8064_functions), 6218c2ecf20Sopenharmony_ci .groups = ipq8064_groups, 6228c2ecf20Sopenharmony_ci .ngroups = ARRAY_SIZE(ipq8064_groups), 6238c2ecf20Sopenharmony_ci .ngpios = NUM_GPIO_PINGROUPS, 6248c2ecf20Sopenharmony_ci}; 6258c2ecf20Sopenharmony_ci 6268c2ecf20Sopenharmony_cistatic int ipq8064_pinctrl_probe(struct platform_device *pdev) 6278c2ecf20Sopenharmony_ci{ 6288c2ecf20Sopenharmony_ci return msm_pinctrl_probe(pdev, &ipq8064_pinctrl); 6298c2ecf20Sopenharmony_ci} 6308c2ecf20Sopenharmony_ci 6318c2ecf20Sopenharmony_cistatic const struct of_device_id ipq8064_pinctrl_of_match[] = { 6328c2ecf20Sopenharmony_ci { .compatible = "qcom,ipq8064-pinctrl", }, 6338c2ecf20Sopenharmony_ci { }, 6348c2ecf20Sopenharmony_ci}; 6358c2ecf20Sopenharmony_ci 6368c2ecf20Sopenharmony_cistatic struct platform_driver ipq8064_pinctrl_driver = { 6378c2ecf20Sopenharmony_ci .driver = { 6388c2ecf20Sopenharmony_ci .name = "ipq8064-pinctrl", 6398c2ecf20Sopenharmony_ci .of_match_table = ipq8064_pinctrl_of_match, 6408c2ecf20Sopenharmony_ci }, 6418c2ecf20Sopenharmony_ci .probe = ipq8064_pinctrl_probe, 6428c2ecf20Sopenharmony_ci .remove = msm_pinctrl_remove, 6438c2ecf20Sopenharmony_ci}; 6448c2ecf20Sopenharmony_ci 6458c2ecf20Sopenharmony_cistatic int __init ipq8064_pinctrl_init(void) 6468c2ecf20Sopenharmony_ci{ 6478c2ecf20Sopenharmony_ci return platform_driver_register(&ipq8064_pinctrl_driver); 6488c2ecf20Sopenharmony_ci} 6498c2ecf20Sopenharmony_ciarch_initcall(ipq8064_pinctrl_init); 6508c2ecf20Sopenharmony_ci 6518c2ecf20Sopenharmony_cistatic void __exit ipq8064_pinctrl_exit(void) 6528c2ecf20Sopenharmony_ci{ 6538c2ecf20Sopenharmony_ci platform_driver_unregister(&ipq8064_pinctrl_driver); 6548c2ecf20Sopenharmony_ci} 6558c2ecf20Sopenharmony_cimodule_exit(ipq8064_pinctrl_exit); 6568c2ecf20Sopenharmony_ci 6578c2ecf20Sopenharmony_ciMODULE_AUTHOR("Andy Gross <agross@codeaurora.org>"); 6588c2ecf20Sopenharmony_ciMODULE_DESCRIPTION("Qualcomm IPQ8064 pinctrl driver"); 6598c2ecf20Sopenharmony_ciMODULE_LICENSE("GPL v2"); 6608c2ecf20Sopenharmony_ciMODULE_DEVICE_TABLE(of, ipq8064_pinctrl_of_match); 661