18c2ecf20Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0-only 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * Copyright (c) 2014, Sony Mobile Communications AB. 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 apq8064_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 1058c2ecf20Sopenharmony_ci PINCTRL_PIN(90, "SDC1_CLK"), 1068c2ecf20Sopenharmony_ci PINCTRL_PIN(91, "SDC1_CMD"), 1078c2ecf20Sopenharmony_ci PINCTRL_PIN(92, "SDC1_DATA"), 1088c2ecf20Sopenharmony_ci PINCTRL_PIN(93, "SDC3_CLK"), 1098c2ecf20Sopenharmony_ci PINCTRL_PIN(94, "SDC3_CMD"), 1108c2ecf20Sopenharmony_ci PINCTRL_PIN(95, "SDC3_DATA"), 1118c2ecf20Sopenharmony_ci}; 1128c2ecf20Sopenharmony_ci 1138c2ecf20Sopenharmony_ci#define DECLARE_APQ_GPIO_PINS(pin) static const unsigned int gpio##pin##_pins[] = { pin } 1148c2ecf20Sopenharmony_ciDECLARE_APQ_GPIO_PINS(0); 1158c2ecf20Sopenharmony_ciDECLARE_APQ_GPIO_PINS(1); 1168c2ecf20Sopenharmony_ciDECLARE_APQ_GPIO_PINS(2); 1178c2ecf20Sopenharmony_ciDECLARE_APQ_GPIO_PINS(3); 1188c2ecf20Sopenharmony_ciDECLARE_APQ_GPIO_PINS(4); 1198c2ecf20Sopenharmony_ciDECLARE_APQ_GPIO_PINS(5); 1208c2ecf20Sopenharmony_ciDECLARE_APQ_GPIO_PINS(6); 1218c2ecf20Sopenharmony_ciDECLARE_APQ_GPIO_PINS(7); 1228c2ecf20Sopenharmony_ciDECLARE_APQ_GPIO_PINS(8); 1238c2ecf20Sopenharmony_ciDECLARE_APQ_GPIO_PINS(9); 1248c2ecf20Sopenharmony_ciDECLARE_APQ_GPIO_PINS(10); 1258c2ecf20Sopenharmony_ciDECLARE_APQ_GPIO_PINS(11); 1268c2ecf20Sopenharmony_ciDECLARE_APQ_GPIO_PINS(12); 1278c2ecf20Sopenharmony_ciDECLARE_APQ_GPIO_PINS(13); 1288c2ecf20Sopenharmony_ciDECLARE_APQ_GPIO_PINS(14); 1298c2ecf20Sopenharmony_ciDECLARE_APQ_GPIO_PINS(15); 1308c2ecf20Sopenharmony_ciDECLARE_APQ_GPIO_PINS(16); 1318c2ecf20Sopenharmony_ciDECLARE_APQ_GPIO_PINS(17); 1328c2ecf20Sopenharmony_ciDECLARE_APQ_GPIO_PINS(18); 1338c2ecf20Sopenharmony_ciDECLARE_APQ_GPIO_PINS(19); 1348c2ecf20Sopenharmony_ciDECLARE_APQ_GPIO_PINS(20); 1358c2ecf20Sopenharmony_ciDECLARE_APQ_GPIO_PINS(21); 1368c2ecf20Sopenharmony_ciDECLARE_APQ_GPIO_PINS(22); 1378c2ecf20Sopenharmony_ciDECLARE_APQ_GPIO_PINS(23); 1388c2ecf20Sopenharmony_ciDECLARE_APQ_GPIO_PINS(24); 1398c2ecf20Sopenharmony_ciDECLARE_APQ_GPIO_PINS(25); 1408c2ecf20Sopenharmony_ciDECLARE_APQ_GPIO_PINS(26); 1418c2ecf20Sopenharmony_ciDECLARE_APQ_GPIO_PINS(27); 1428c2ecf20Sopenharmony_ciDECLARE_APQ_GPIO_PINS(28); 1438c2ecf20Sopenharmony_ciDECLARE_APQ_GPIO_PINS(29); 1448c2ecf20Sopenharmony_ciDECLARE_APQ_GPIO_PINS(30); 1458c2ecf20Sopenharmony_ciDECLARE_APQ_GPIO_PINS(31); 1468c2ecf20Sopenharmony_ciDECLARE_APQ_GPIO_PINS(32); 1478c2ecf20Sopenharmony_ciDECLARE_APQ_GPIO_PINS(33); 1488c2ecf20Sopenharmony_ciDECLARE_APQ_GPIO_PINS(34); 1498c2ecf20Sopenharmony_ciDECLARE_APQ_GPIO_PINS(35); 1508c2ecf20Sopenharmony_ciDECLARE_APQ_GPIO_PINS(36); 1518c2ecf20Sopenharmony_ciDECLARE_APQ_GPIO_PINS(37); 1528c2ecf20Sopenharmony_ciDECLARE_APQ_GPIO_PINS(38); 1538c2ecf20Sopenharmony_ciDECLARE_APQ_GPIO_PINS(39); 1548c2ecf20Sopenharmony_ciDECLARE_APQ_GPIO_PINS(40); 1558c2ecf20Sopenharmony_ciDECLARE_APQ_GPIO_PINS(41); 1568c2ecf20Sopenharmony_ciDECLARE_APQ_GPIO_PINS(42); 1578c2ecf20Sopenharmony_ciDECLARE_APQ_GPIO_PINS(43); 1588c2ecf20Sopenharmony_ciDECLARE_APQ_GPIO_PINS(44); 1598c2ecf20Sopenharmony_ciDECLARE_APQ_GPIO_PINS(45); 1608c2ecf20Sopenharmony_ciDECLARE_APQ_GPIO_PINS(46); 1618c2ecf20Sopenharmony_ciDECLARE_APQ_GPIO_PINS(47); 1628c2ecf20Sopenharmony_ciDECLARE_APQ_GPIO_PINS(48); 1638c2ecf20Sopenharmony_ciDECLARE_APQ_GPIO_PINS(49); 1648c2ecf20Sopenharmony_ciDECLARE_APQ_GPIO_PINS(50); 1658c2ecf20Sopenharmony_ciDECLARE_APQ_GPIO_PINS(51); 1668c2ecf20Sopenharmony_ciDECLARE_APQ_GPIO_PINS(52); 1678c2ecf20Sopenharmony_ciDECLARE_APQ_GPIO_PINS(53); 1688c2ecf20Sopenharmony_ciDECLARE_APQ_GPIO_PINS(54); 1698c2ecf20Sopenharmony_ciDECLARE_APQ_GPIO_PINS(55); 1708c2ecf20Sopenharmony_ciDECLARE_APQ_GPIO_PINS(56); 1718c2ecf20Sopenharmony_ciDECLARE_APQ_GPIO_PINS(57); 1728c2ecf20Sopenharmony_ciDECLARE_APQ_GPIO_PINS(58); 1738c2ecf20Sopenharmony_ciDECLARE_APQ_GPIO_PINS(59); 1748c2ecf20Sopenharmony_ciDECLARE_APQ_GPIO_PINS(60); 1758c2ecf20Sopenharmony_ciDECLARE_APQ_GPIO_PINS(61); 1768c2ecf20Sopenharmony_ciDECLARE_APQ_GPIO_PINS(62); 1778c2ecf20Sopenharmony_ciDECLARE_APQ_GPIO_PINS(63); 1788c2ecf20Sopenharmony_ciDECLARE_APQ_GPIO_PINS(64); 1798c2ecf20Sopenharmony_ciDECLARE_APQ_GPIO_PINS(65); 1808c2ecf20Sopenharmony_ciDECLARE_APQ_GPIO_PINS(66); 1818c2ecf20Sopenharmony_ciDECLARE_APQ_GPIO_PINS(67); 1828c2ecf20Sopenharmony_ciDECLARE_APQ_GPIO_PINS(68); 1838c2ecf20Sopenharmony_ciDECLARE_APQ_GPIO_PINS(69); 1848c2ecf20Sopenharmony_ciDECLARE_APQ_GPIO_PINS(70); 1858c2ecf20Sopenharmony_ciDECLARE_APQ_GPIO_PINS(71); 1868c2ecf20Sopenharmony_ciDECLARE_APQ_GPIO_PINS(72); 1878c2ecf20Sopenharmony_ciDECLARE_APQ_GPIO_PINS(73); 1888c2ecf20Sopenharmony_ciDECLARE_APQ_GPIO_PINS(74); 1898c2ecf20Sopenharmony_ciDECLARE_APQ_GPIO_PINS(75); 1908c2ecf20Sopenharmony_ciDECLARE_APQ_GPIO_PINS(76); 1918c2ecf20Sopenharmony_ciDECLARE_APQ_GPIO_PINS(77); 1928c2ecf20Sopenharmony_ciDECLARE_APQ_GPIO_PINS(78); 1938c2ecf20Sopenharmony_ciDECLARE_APQ_GPIO_PINS(79); 1948c2ecf20Sopenharmony_ciDECLARE_APQ_GPIO_PINS(80); 1958c2ecf20Sopenharmony_ciDECLARE_APQ_GPIO_PINS(81); 1968c2ecf20Sopenharmony_ciDECLARE_APQ_GPIO_PINS(82); 1978c2ecf20Sopenharmony_ciDECLARE_APQ_GPIO_PINS(83); 1988c2ecf20Sopenharmony_ciDECLARE_APQ_GPIO_PINS(84); 1998c2ecf20Sopenharmony_ciDECLARE_APQ_GPIO_PINS(85); 2008c2ecf20Sopenharmony_ciDECLARE_APQ_GPIO_PINS(86); 2018c2ecf20Sopenharmony_ciDECLARE_APQ_GPIO_PINS(87); 2028c2ecf20Sopenharmony_ciDECLARE_APQ_GPIO_PINS(88); 2038c2ecf20Sopenharmony_ciDECLARE_APQ_GPIO_PINS(89); 2048c2ecf20Sopenharmony_ci 2058c2ecf20Sopenharmony_cistatic const unsigned int sdc1_clk_pins[] = { 90 }; 2068c2ecf20Sopenharmony_cistatic const unsigned int sdc1_cmd_pins[] = { 91 }; 2078c2ecf20Sopenharmony_cistatic const unsigned int sdc1_data_pins[] = { 92 }; 2088c2ecf20Sopenharmony_cistatic const unsigned int sdc3_clk_pins[] = { 93 }; 2098c2ecf20Sopenharmony_cistatic const unsigned int sdc3_cmd_pins[] = { 94 }; 2108c2ecf20Sopenharmony_cistatic const unsigned int sdc3_data_pins[] = { 95 }; 2118c2ecf20Sopenharmony_ci 2128c2ecf20Sopenharmony_ci#define FUNCTION(fname) \ 2138c2ecf20Sopenharmony_ci [APQ_MUX_##fname] = { \ 2148c2ecf20Sopenharmony_ci .name = #fname, \ 2158c2ecf20Sopenharmony_ci .groups = fname##_groups, \ 2168c2ecf20Sopenharmony_ci .ngroups = ARRAY_SIZE(fname##_groups), \ 2178c2ecf20Sopenharmony_ci } 2188c2ecf20Sopenharmony_ci 2198c2ecf20Sopenharmony_ci#define PINGROUP(id, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10) \ 2208c2ecf20Sopenharmony_ci { \ 2218c2ecf20Sopenharmony_ci .name = "gpio" #id, \ 2228c2ecf20Sopenharmony_ci .pins = gpio##id##_pins, \ 2238c2ecf20Sopenharmony_ci .npins = ARRAY_SIZE(gpio##id##_pins), \ 2248c2ecf20Sopenharmony_ci .funcs = (int[]){ \ 2258c2ecf20Sopenharmony_ci APQ_MUX_gpio, \ 2268c2ecf20Sopenharmony_ci APQ_MUX_##f1, \ 2278c2ecf20Sopenharmony_ci APQ_MUX_##f2, \ 2288c2ecf20Sopenharmony_ci APQ_MUX_##f3, \ 2298c2ecf20Sopenharmony_ci APQ_MUX_##f4, \ 2308c2ecf20Sopenharmony_ci APQ_MUX_##f5, \ 2318c2ecf20Sopenharmony_ci APQ_MUX_##f6, \ 2328c2ecf20Sopenharmony_ci APQ_MUX_##f7, \ 2338c2ecf20Sopenharmony_ci APQ_MUX_##f8, \ 2348c2ecf20Sopenharmony_ci APQ_MUX_##f9, \ 2358c2ecf20Sopenharmony_ci APQ_MUX_##f10, \ 2368c2ecf20Sopenharmony_ci }, \ 2378c2ecf20Sopenharmony_ci .nfuncs = 11, \ 2388c2ecf20Sopenharmony_ci .ctl_reg = 0x1000 + 0x10 * id, \ 2398c2ecf20Sopenharmony_ci .io_reg = 0x1004 + 0x10 * id, \ 2408c2ecf20Sopenharmony_ci .intr_cfg_reg = 0x1008 + 0x10 * id, \ 2418c2ecf20Sopenharmony_ci .intr_status_reg = 0x100c + 0x10 * id, \ 2428c2ecf20Sopenharmony_ci .intr_target_reg = 0x400 + 0x4 * id, \ 2438c2ecf20Sopenharmony_ci .mux_bit = 2, \ 2448c2ecf20Sopenharmony_ci .pull_bit = 0, \ 2458c2ecf20Sopenharmony_ci .drv_bit = 6, \ 2468c2ecf20Sopenharmony_ci .oe_bit = 9, \ 2478c2ecf20Sopenharmony_ci .in_bit = 0, \ 2488c2ecf20Sopenharmony_ci .out_bit = 1, \ 2498c2ecf20Sopenharmony_ci .intr_enable_bit = 0, \ 2508c2ecf20Sopenharmony_ci .intr_status_bit = 0, \ 2518c2ecf20Sopenharmony_ci .intr_ack_high = 1, \ 2528c2ecf20Sopenharmony_ci .intr_target_bit = 0, \ 2538c2ecf20Sopenharmony_ci .intr_target_kpss_val = 4, \ 2548c2ecf20Sopenharmony_ci .intr_raw_status_bit = 3, \ 2558c2ecf20Sopenharmony_ci .intr_polarity_bit = 1, \ 2568c2ecf20Sopenharmony_ci .intr_detection_bit = 2, \ 2578c2ecf20Sopenharmony_ci .intr_detection_width = 1, \ 2588c2ecf20Sopenharmony_ci } 2598c2ecf20Sopenharmony_ci 2608c2ecf20Sopenharmony_ci#define SDC_PINGROUP(pg_name, ctl, pull, drv) \ 2618c2ecf20Sopenharmony_ci { \ 2628c2ecf20Sopenharmony_ci .name = #pg_name, \ 2638c2ecf20Sopenharmony_ci .pins = pg_name##_pins, \ 2648c2ecf20Sopenharmony_ci .npins = ARRAY_SIZE(pg_name##_pins), \ 2658c2ecf20Sopenharmony_ci .ctl_reg = ctl, \ 2668c2ecf20Sopenharmony_ci .io_reg = 0, \ 2678c2ecf20Sopenharmony_ci .intr_cfg_reg = 0, \ 2688c2ecf20Sopenharmony_ci .intr_status_reg = 0, \ 2698c2ecf20Sopenharmony_ci .intr_target_reg = 0, \ 2708c2ecf20Sopenharmony_ci .mux_bit = -1, \ 2718c2ecf20Sopenharmony_ci .pull_bit = pull, \ 2728c2ecf20Sopenharmony_ci .drv_bit = drv, \ 2738c2ecf20Sopenharmony_ci .oe_bit = -1, \ 2748c2ecf20Sopenharmony_ci .in_bit = -1, \ 2758c2ecf20Sopenharmony_ci .out_bit = -1, \ 2768c2ecf20Sopenharmony_ci .intr_enable_bit = -1, \ 2778c2ecf20Sopenharmony_ci .intr_status_bit = -1, \ 2788c2ecf20Sopenharmony_ci .intr_target_bit = -1, \ 2798c2ecf20Sopenharmony_ci .intr_target_kpss_val = -1, \ 2808c2ecf20Sopenharmony_ci .intr_raw_status_bit = -1, \ 2818c2ecf20Sopenharmony_ci .intr_polarity_bit = -1, \ 2828c2ecf20Sopenharmony_ci .intr_detection_bit = -1, \ 2838c2ecf20Sopenharmony_ci .intr_detection_width = -1, \ 2848c2ecf20Sopenharmony_ci } 2858c2ecf20Sopenharmony_ci 2868c2ecf20Sopenharmony_cienum apq8064_functions { 2878c2ecf20Sopenharmony_ci APQ_MUX_cam_mclk, 2888c2ecf20Sopenharmony_ci APQ_MUX_codec_mic_i2s, 2898c2ecf20Sopenharmony_ci APQ_MUX_codec_spkr_i2s, 2908c2ecf20Sopenharmony_ci APQ_MUX_gp_clk_0a, 2918c2ecf20Sopenharmony_ci APQ_MUX_gp_clk_0b, 2928c2ecf20Sopenharmony_ci APQ_MUX_gp_clk_1a, 2938c2ecf20Sopenharmony_ci APQ_MUX_gp_clk_1b, 2948c2ecf20Sopenharmony_ci APQ_MUX_gp_clk_2a, 2958c2ecf20Sopenharmony_ci APQ_MUX_gp_clk_2b, 2968c2ecf20Sopenharmony_ci APQ_MUX_gpio, 2978c2ecf20Sopenharmony_ci APQ_MUX_gsbi1, 2988c2ecf20Sopenharmony_ci APQ_MUX_gsbi2, 2998c2ecf20Sopenharmony_ci APQ_MUX_gsbi3, 3008c2ecf20Sopenharmony_ci APQ_MUX_gsbi4, 3018c2ecf20Sopenharmony_ci APQ_MUX_gsbi4_cam_i2c, 3028c2ecf20Sopenharmony_ci APQ_MUX_gsbi5, 3038c2ecf20Sopenharmony_ci APQ_MUX_gsbi5_spi_cs1, 3048c2ecf20Sopenharmony_ci APQ_MUX_gsbi5_spi_cs2, 3058c2ecf20Sopenharmony_ci APQ_MUX_gsbi5_spi_cs3, 3068c2ecf20Sopenharmony_ci APQ_MUX_gsbi6, 3078c2ecf20Sopenharmony_ci APQ_MUX_gsbi6_spi_cs1, 3088c2ecf20Sopenharmony_ci APQ_MUX_gsbi6_spi_cs2, 3098c2ecf20Sopenharmony_ci APQ_MUX_gsbi6_spi_cs3, 3108c2ecf20Sopenharmony_ci APQ_MUX_gsbi7, 3118c2ecf20Sopenharmony_ci APQ_MUX_gsbi7_spi_cs1, 3128c2ecf20Sopenharmony_ci APQ_MUX_gsbi7_spi_cs2, 3138c2ecf20Sopenharmony_ci APQ_MUX_gsbi7_spi_cs3, 3148c2ecf20Sopenharmony_ci APQ_MUX_gsbi_cam_i2c, 3158c2ecf20Sopenharmony_ci APQ_MUX_hdmi, 3168c2ecf20Sopenharmony_ci APQ_MUX_mi2s, 3178c2ecf20Sopenharmony_ci APQ_MUX_riva_bt, 3188c2ecf20Sopenharmony_ci APQ_MUX_riva_fm, 3198c2ecf20Sopenharmony_ci APQ_MUX_riva_wlan, 3208c2ecf20Sopenharmony_ci APQ_MUX_sdc2, 3218c2ecf20Sopenharmony_ci APQ_MUX_sdc4, 3228c2ecf20Sopenharmony_ci APQ_MUX_slimbus, 3238c2ecf20Sopenharmony_ci APQ_MUX_spkr_i2s, 3248c2ecf20Sopenharmony_ci APQ_MUX_tsif1, 3258c2ecf20Sopenharmony_ci APQ_MUX_tsif2, 3268c2ecf20Sopenharmony_ci APQ_MUX_usb2_hsic, 3278c2ecf20Sopenharmony_ci APQ_MUX_ps_hold, 3288c2ecf20Sopenharmony_ci APQ_MUX_NA, 3298c2ecf20Sopenharmony_ci}; 3308c2ecf20Sopenharmony_ci 3318c2ecf20Sopenharmony_cistatic const char * const cam_mclk_groups[] = { 3328c2ecf20Sopenharmony_ci "gpio4" "gpio5" 3338c2ecf20Sopenharmony_ci}; 3348c2ecf20Sopenharmony_cistatic const char * const codec_mic_i2s_groups[] = { 3358c2ecf20Sopenharmony_ci "gpio34", "gpio35", "gpio36", "gpio37", "gpio38" 3368c2ecf20Sopenharmony_ci}; 3378c2ecf20Sopenharmony_cistatic const char * const codec_spkr_i2s_groups[] = { 3388c2ecf20Sopenharmony_ci "gpio39", "gpio40", "gpio41", "gpio42" 3398c2ecf20Sopenharmony_ci}; 3408c2ecf20Sopenharmony_cistatic const char * const gpio_groups[] = { 3418c2ecf20Sopenharmony_ci "gpio0", "gpio1", "gpio2", "gpio3", "gpio4", "gpio5", "gpio6", "gpio7", 3428c2ecf20Sopenharmony_ci "gpio8", "gpio9", "gpio10", "gpio11", "gpio12", "gpio13", "gpio14", 3438c2ecf20Sopenharmony_ci "gpio15", "gpio16", "gpio17", "gpio18", "gpio19", "gpio20", "gpio21", 3448c2ecf20Sopenharmony_ci "gpio22", "gpio23", "gpio24", "gpio25", "gpio26", "gpio27", "gpio28", 3458c2ecf20Sopenharmony_ci "gpio29", "gpio30", "gpio31", "gpio32", "gpio33", "gpio34", "gpio35", 3468c2ecf20Sopenharmony_ci "gpio36", "gpio37", "gpio38", "gpio39", "gpio40", "gpio41", "gpio42", 3478c2ecf20Sopenharmony_ci "gpio43", "gpio44", "gpio45", "gpio46", "gpio47", "gpio48", "gpio49", 3488c2ecf20Sopenharmony_ci "gpio50", "gpio51", "gpio52", "gpio53", "gpio54", "gpio55", "gpio56", 3498c2ecf20Sopenharmony_ci "gpio57", "gpio58", "gpio59", "gpio60", "gpio61", "gpio62", "gpio63", 3508c2ecf20Sopenharmony_ci "gpio64", "gpio65", "gpio66", "gpio67", "gpio68", "gpio69", "gpio70", 3518c2ecf20Sopenharmony_ci "gpio71", "gpio72", "gpio73", "gpio74", "gpio75", "gpio76", "gpio77", 3528c2ecf20Sopenharmony_ci "gpio78", "gpio79", "gpio80", "gpio81", "gpio82", "gpio83", "gpio84", 3538c2ecf20Sopenharmony_ci "gpio85", "gpio86", "gpio87", "gpio88", "gpio89" 3548c2ecf20Sopenharmony_ci}; 3558c2ecf20Sopenharmony_cistatic const char * const gp_clk_0a_groups[] = { 3568c2ecf20Sopenharmony_ci "gpio3" 3578c2ecf20Sopenharmony_ci}; 3588c2ecf20Sopenharmony_cistatic const char * const gp_clk_0b_groups[] = { 3598c2ecf20Sopenharmony_ci "gpio34" 3608c2ecf20Sopenharmony_ci}; 3618c2ecf20Sopenharmony_cistatic const char * const gp_clk_1a_groups[] = { 3628c2ecf20Sopenharmony_ci "gpio4" 3638c2ecf20Sopenharmony_ci}; 3648c2ecf20Sopenharmony_cistatic const char * const gp_clk_1b_groups[] = { 3658c2ecf20Sopenharmony_ci "gpio50" 3668c2ecf20Sopenharmony_ci}; 3678c2ecf20Sopenharmony_cistatic const char * const gp_clk_2a_groups[] = { 3688c2ecf20Sopenharmony_ci "gpio32" 3698c2ecf20Sopenharmony_ci}; 3708c2ecf20Sopenharmony_cistatic const char * const gp_clk_2b_groups[] = { 3718c2ecf20Sopenharmony_ci "gpio25" 3728c2ecf20Sopenharmony_ci}; 3738c2ecf20Sopenharmony_cistatic const char * const ps_hold_groups[] = { 3748c2ecf20Sopenharmony_ci "gpio78" 3758c2ecf20Sopenharmony_ci}; 3768c2ecf20Sopenharmony_cistatic const char * const gsbi1_groups[] = { 3778c2ecf20Sopenharmony_ci "gpio18", "gpio19", "gpio20", "gpio21" 3788c2ecf20Sopenharmony_ci}; 3798c2ecf20Sopenharmony_cistatic const char * const gsbi2_groups[] = { 3808c2ecf20Sopenharmony_ci "gpio22", "gpio23", "gpio24", "gpio25" 3818c2ecf20Sopenharmony_ci}; 3828c2ecf20Sopenharmony_cistatic const char * const gsbi3_groups[] = { 3838c2ecf20Sopenharmony_ci "gpio6", "gpio7", "gpio8", "gpio9" 3848c2ecf20Sopenharmony_ci}; 3858c2ecf20Sopenharmony_cistatic const char * const gsbi4_groups[] = { 3868c2ecf20Sopenharmony_ci "gpio10", "gpio11", "gpio12", "gpio13" 3878c2ecf20Sopenharmony_ci}; 3888c2ecf20Sopenharmony_cistatic const char * const gsbi4_cam_i2c_groups[] = { 3898c2ecf20Sopenharmony_ci "gpio10", "gpio11", "gpio12", "gpio13" 3908c2ecf20Sopenharmony_ci}; 3918c2ecf20Sopenharmony_cistatic const char * const gsbi5_groups[] = { 3928c2ecf20Sopenharmony_ci "gpio51", "gpio52", "gpio53", "gpio54" 3938c2ecf20Sopenharmony_ci}; 3948c2ecf20Sopenharmony_cistatic const char * const gsbi5_spi_cs1_groups[] = { 3958c2ecf20Sopenharmony_ci "gpio47" 3968c2ecf20Sopenharmony_ci}; 3978c2ecf20Sopenharmony_cistatic const char * const gsbi5_spi_cs2_groups[] = { 3988c2ecf20Sopenharmony_ci "gpio31" 3998c2ecf20Sopenharmony_ci}; 4008c2ecf20Sopenharmony_cistatic const char * const gsbi5_spi_cs3_groups[] = { 4018c2ecf20Sopenharmony_ci "gpio32" 4028c2ecf20Sopenharmony_ci}; 4038c2ecf20Sopenharmony_cistatic const char * const gsbi6_groups[] = { 4048c2ecf20Sopenharmony_ci "gpio14", "gpio15", "gpio16", "gpio17" 4058c2ecf20Sopenharmony_ci}; 4068c2ecf20Sopenharmony_cistatic const char * const gsbi6_spi_cs1_groups[] = { 4078c2ecf20Sopenharmony_ci "gpio47" 4088c2ecf20Sopenharmony_ci}; 4098c2ecf20Sopenharmony_cistatic const char * const gsbi6_spi_cs2_groups[] = { 4108c2ecf20Sopenharmony_ci "gpio31" 4118c2ecf20Sopenharmony_ci}; 4128c2ecf20Sopenharmony_cistatic const char * const gsbi6_spi_cs3_groups[] = { 4138c2ecf20Sopenharmony_ci "gpio32" 4148c2ecf20Sopenharmony_ci}; 4158c2ecf20Sopenharmony_cistatic const char * const gsbi7_groups[] = { 4168c2ecf20Sopenharmony_ci "gpio82", "gpio83", "gpio84", "gpio85" 4178c2ecf20Sopenharmony_ci}; 4188c2ecf20Sopenharmony_cistatic const char * const gsbi7_spi_cs1_groups[] = { 4198c2ecf20Sopenharmony_ci "gpio47" 4208c2ecf20Sopenharmony_ci}; 4218c2ecf20Sopenharmony_cistatic const char * const gsbi7_spi_cs2_groups[] = { 4228c2ecf20Sopenharmony_ci "gpio31" 4238c2ecf20Sopenharmony_ci}; 4248c2ecf20Sopenharmony_cistatic const char * const gsbi7_spi_cs3_groups[] = { 4258c2ecf20Sopenharmony_ci "gpio32" 4268c2ecf20Sopenharmony_ci}; 4278c2ecf20Sopenharmony_cistatic const char * const gsbi_cam_i2c_groups[] = { 4288c2ecf20Sopenharmony_ci "gpio10", "gpio11", "gpio12", "gpio13" 4298c2ecf20Sopenharmony_ci}; 4308c2ecf20Sopenharmony_cistatic const char * const hdmi_groups[] = { 4318c2ecf20Sopenharmony_ci "gpio69", "gpio70", "gpio71", "gpio72" 4328c2ecf20Sopenharmony_ci}; 4338c2ecf20Sopenharmony_cistatic const char * const mi2s_groups[] = { 4348c2ecf20Sopenharmony_ci "gpio27", "gpio28", "gpio29", "gpio30", "gpio31", "gpio32", "gpio33" 4358c2ecf20Sopenharmony_ci}; 4368c2ecf20Sopenharmony_cistatic const char * const riva_bt_groups[] = { 4378c2ecf20Sopenharmony_ci "gpio16", "gpio17" 4388c2ecf20Sopenharmony_ci}; 4398c2ecf20Sopenharmony_cistatic const char * const riva_fm_groups[] = { 4408c2ecf20Sopenharmony_ci "gpio14", "gpio15" 4418c2ecf20Sopenharmony_ci}; 4428c2ecf20Sopenharmony_cistatic const char * const riva_wlan_groups[] = { 4438c2ecf20Sopenharmony_ci "gpio64", "gpio65", "gpio66", "gpio67", "gpio68" 4448c2ecf20Sopenharmony_ci}; 4458c2ecf20Sopenharmony_cistatic const char * const sdc2_groups[] = { 4468c2ecf20Sopenharmony_ci "gpio57", "gpio58", "gpio59", "gpio60", "gpio61", "gpio62" 4478c2ecf20Sopenharmony_ci}; 4488c2ecf20Sopenharmony_cistatic const char * const sdc4_groups[] = { 4498c2ecf20Sopenharmony_ci "gpio63", "gpio64", "gpio65", "gpio66", "gpio67", "gpio68" 4508c2ecf20Sopenharmony_ci}; 4518c2ecf20Sopenharmony_cistatic const char * const slimbus_groups[] = { 4528c2ecf20Sopenharmony_ci "gpio40", "gpio41" 4538c2ecf20Sopenharmony_ci}; 4548c2ecf20Sopenharmony_cistatic const char * const spkr_i2s_groups[] = { 4558c2ecf20Sopenharmony_ci "gpio47", "gpio48", "gpio49", "gpio50" 4568c2ecf20Sopenharmony_ci}; 4578c2ecf20Sopenharmony_cistatic const char * const tsif1_groups[] = { 4588c2ecf20Sopenharmony_ci "gpio55", "gpio56", "gpio57" 4598c2ecf20Sopenharmony_ci}; 4608c2ecf20Sopenharmony_cistatic const char * const tsif2_groups[] = { 4618c2ecf20Sopenharmony_ci "gpio58", "gpio59", "gpio60" 4628c2ecf20Sopenharmony_ci}; 4638c2ecf20Sopenharmony_cistatic const char * const usb2_hsic_groups[] = { 4648c2ecf20Sopenharmony_ci "gpio88", "gpio89" 4658c2ecf20Sopenharmony_ci}; 4668c2ecf20Sopenharmony_ci 4678c2ecf20Sopenharmony_cistatic const struct msm_function apq8064_functions[] = { 4688c2ecf20Sopenharmony_ci FUNCTION(cam_mclk), 4698c2ecf20Sopenharmony_ci FUNCTION(codec_mic_i2s), 4708c2ecf20Sopenharmony_ci FUNCTION(codec_spkr_i2s), 4718c2ecf20Sopenharmony_ci FUNCTION(gp_clk_0a), 4728c2ecf20Sopenharmony_ci FUNCTION(gp_clk_0b), 4738c2ecf20Sopenharmony_ci FUNCTION(gp_clk_1a), 4748c2ecf20Sopenharmony_ci FUNCTION(gp_clk_1b), 4758c2ecf20Sopenharmony_ci FUNCTION(gp_clk_2a), 4768c2ecf20Sopenharmony_ci FUNCTION(gp_clk_2b), 4778c2ecf20Sopenharmony_ci FUNCTION(gpio), 4788c2ecf20Sopenharmony_ci FUNCTION(gsbi1), 4798c2ecf20Sopenharmony_ci FUNCTION(gsbi2), 4808c2ecf20Sopenharmony_ci FUNCTION(gsbi3), 4818c2ecf20Sopenharmony_ci FUNCTION(gsbi4), 4828c2ecf20Sopenharmony_ci FUNCTION(gsbi4_cam_i2c), 4838c2ecf20Sopenharmony_ci FUNCTION(gsbi5), 4848c2ecf20Sopenharmony_ci FUNCTION(gsbi5_spi_cs1), 4858c2ecf20Sopenharmony_ci FUNCTION(gsbi5_spi_cs2), 4868c2ecf20Sopenharmony_ci FUNCTION(gsbi5_spi_cs3), 4878c2ecf20Sopenharmony_ci FUNCTION(gsbi6), 4888c2ecf20Sopenharmony_ci FUNCTION(gsbi6_spi_cs1), 4898c2ecf20Sopenharmony_ci FUNCTION(gsbi6_spi_cs2), 4908c2ecf20Sopenharmony_ci FUNCTION(gsbi6_spi_cs3), 4918c2ecf20Sopenharmony_ci FUNCTION(gsbi7), 4928c2ecf20Sopenharmony_ci FUNCTION(gsbi7_spi_cs1), 4938c2ecf20Sopenharmony_ci FUNCTION(gsbi7_spi_cs2), 4948c2ecf20Sopenharmony_ci FUNCTION(gsbi7_spi_cs3), 4958c2ecf20Sopenharmony_ci FUNCTION(gsbi_cam_i2c), 4968c2ecf20Sopenharmony_ci FUNCTION(hdmi), 4978c2ecf20Sopenharmony_ci FUNCTION(mi2s), 4988c2ecf20Sopenharmony_ci FUNCTION(riva_bt), 4998c2ecf20Sopenharmony_ci FUNCTION(riva_fm), 5008c2ecf20Sopenharmony_ci FUNCTION(riva_wlan), 5018c2ecf20Sopenharmony_ci FUNCTION(sdc2), 5028c2ecf20Sopenharmony_ci FUNCTION(sdc4), 5038c2ecf20Sopenharmony_ci FUNCTION(slimbus), 5048c2ecf20Sopenharmony_ci FUNCTION(spkr_i2s), 5058c2ecf20Sopenharmony_ci FUNCTION(tsif1), 5068c2ecf20Sopenharmony_ci FUNCTION(tsif2), 5078c2ecf20Sopenharmony_ci FUNCTION(usb2_hsic), 5088c2ecf20Sopenharmony_ci FUNCTION(ps_hold), 5098c2ecf20Sopenharmony_ci}; 5108c2ecf20Sopenharmony_ci 5118c2ecf20Sopenharmony_cistatic const struct msm_pingroup apq8064_groups[] = { 5128c2ecf20Sopenharmony_ci PINGROUP(0, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), 5138c2ecf20Sopenharmony_ci PINGROUP(1, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), 5148c2ecf20Sopenharmony_ci PINGROUP(2, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), 5158c2ecf20Sopenharmony_ci PINGROUP(3, NA, gp_clk_0a, NA, NA, NA, NA, NA, NA, NA, NA), 5168c2ecf20Sopenharmony_ci PINGROUP(4, NA, NA, cam_mclk, gp_clk_1a, NA, NA, NA, NA, NA, NA), 5178c2ecf20Sopenharmony_ci PINGROUP(5, NA, cam_mclk, NA, NA, NA, NA, NA, NA, NA, NA), 5188c2ecf20Sopenharmony_ci PINGROUP(6, gsbi3, NA, NA, NA, NA, NA, NA, NA, NA, NA), 5198c2ecf20Sopenharmony_ci PINGROUP(7, gsbi3, NA, NA, NA, NA, NA, NA, NA, NA, NA), 5208c2ecf20Sopenharmony_ci PINGROUP(8, gsbi3, NA, NA, NA, NA, NA, NA, NA, NA, NA), 5218c2ecf20Sopenharmony_ci PINGROUP(9, gsbi3, NA, NA, NA, NA, NA, NA, NA, NA, NA), 5228c2ecf20Sopenharmony_ci PINGROUP(10, gsbi4, NA, NA, NA, NA, NA, NA, NA, gsbi4_cam_i2c, NA), 5238c2ecf20Sopenharmony_ci PINGROUP(11, gsbi4, NA, NA, NA, NA, NA, NA, NA, NA, gsbi4_cam_i2c), 5248c2ecf20Sopenharmony_ci PINGROUP(12, gsbi4, NA, NA, NA, NA, gsbi4_cam_i2c, NA, NA, NA, NA), 5258c2ecf20Sopenharmony_ci PINGROUP(13, gsbi4, NA, NA, NA, NA, gsbi4_cam_i2c, NA, NA, NA, NA), 5268c2ecf20Sopenharmony_ci PINGROUP(14, riva_fm, gsbi6, NA, NA, NA, NA, NA, NA, NA, NA), 5278c2ecf20Sopenharmony_ci PINGROUP(15, riva_fm, gsbi6, NA, NA, NA, NA, NA, NA, NA, NA), 5288c2ecf20Sopenharmony_ci PINGROUP(16, riva_bt, gsbi6, NA, NA, NA, NA, NA, NA, NA, NA), 5298c2ecf20Sopenharmony_ci PINGROUP(17, riva_bt, gsbi6, NA, NA, NA, NA, NA, NA, NA, NA), 5308c2ecf20Sopenharmony_ci PINGROUP(18, gsbi1, NA, NA, NA, NA, NA, NA, NA, NA, NA), 5318c2ecf20Sopenharmony_ci PINGROUP(19, gsbi1, NA, NA, NA, NA, NA, NA, NA, NA, NA), 5328c2ecf20Sopenharmony_ci PINGROUP(20, gsbi1, NA, NA, NA, NA, NA, NA, NA, NA, NA), 5338c2ecf20Sopenharmony_ci PINGROUP(21, gsbi1, NA, NA, NA, NA, NA, NA, NA, NA, NA), 5348c2ecf20Sopenharmony_ci PINGROUP(22, gsbi2, NA, NA, NA, NA, NA, NA, NA, NA, NA), 5358c2ecf20Sopenharmony_ci PINGROUP(23, gsbi2, NA, NA, NA, NA, NA, NA, NA, NA, NA), 5368c2ecf20Sopenharmony_ci PINGROUP(24, gsbi2, NA, NA, NA, NA, NA, NA, NA, NA, NA), 5378c2ecf20Sopenharmony_ci PINGROUP(25, gsbi2, gp_clk_2b, NA, NA, NA, NA, NA, NA, NA, NA), 5388c2ecf20Sopenharmony_ci PINGROUP(26, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), 5398c2ecf20Sopenharmony_ci PINGROUP(27, mi2s, NA, NA, NA, NA, NA, NA, NA, NA, NA), 5408c2ecf20Sopenharmony_ci PINGROUP(28, mi2s, NA, NA, NA, NA, NA, NA, NA, NA, NA), 5418c2ecf20Sopenharmony_ci PINGROUP(29, mi2s, NA, NA, NA, NA, NA, NA, NA, NA, NA), 5428c2ecf20Sopenharmony_ci PINGROUP(30, mi2s, NA, NA, NA, NA, NA, NA, NA, NA, NA), 5438c2ecf20Sopenharmony_ci PINGROUP(31, mi2s, NA, gsbi5_spi_cs2, gsbi6_spi_cs2, gsbi7_spi_cs2, NA, NA, NA, NA, NA), 5448c2ecf20Sopenharmony_ci PINGROUP(32, mi2s, gp_clk_2a, NA, NA, NA, gsbi5_spi_cs3, gsbi6_spi_cs3, gsbi7_spi_cs3, NA, NA), 5458c2ecf20Sopenharmony_ci PINGROUP(33, mi2s, NA, NA, NA, NA, NA, NA, NA, NA, NA), 5468c2ecf20Sopenharmony_ci PINGROUP(34, codec_mic_i2s, gp_clk_0b, NA, NA, NA, NA, NA, NA, NA, NA), 5478c2ecf20Sopenharmony_ci PINGROUP(35, codec_mic_i2s, NA, NA, NA, NA, NA, NA, NA, NA, NA), 5488c2ecf20Sopenharmony_ci PINGROUP(36, codec_mic_i2s, NA, NA, NA, NA, NA, NA, NA, NA, NA), 5498c2ecf20Sopenharmony_ci PINGROUP(37, codec_mic_i2s, NA, NA, NA, NA, NA, NA, NA, NA, NA), 5508c2ecf20Sopenharmony_ci PINGROUP(38, codec_mic_i2s, NA, NA, NA, NA, NA, NA, NA, NA, NA), 5518c2ecf20Sopenharmony_ci PINGROUP(39, codec_spkr_i2s, NA, NA, NA, NA, NA, NA, NA, NA, NA), 5528c2ecf20Sopenharmony_ci PINGROUP(40, slimbus, codec_spkr_i2s, NA, NA, NA, NA, NA, NA, NA, NA), 5538c2ecf20Sopenharmony_ci PINGROUP(41, slimbus, codec_spkr_i2s, NA, NA, NA, NA, NA, NA, NA, NA), 5548c2ecf20Sopenharmony_ci PINGROUP(42, codec_spkr_i2s, NA, NA, NA, NA, NA, NA, NA, NA, NA), 5558c2ecf20Sopenharmony_ci PINGROUP(43, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), 5568c2ecf20Sopenharmony_ci PINGROUP(44, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), 5578c2ecf20Sopenharmony_ci PINGROUP(45, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), 5588c2ecf20Sopenharmony_ci PINGROUP(46, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), 5598c2ecf20Sopenharmony_ci PINGROUP(47, spkr_i2s, gsbi5_spi_cs1, gsbi6_spi_cs1, gsbi7_spi_cs1, NA, NA, NA, NA, NA, NA), 5608c2ecf20Sopenharmony_ci PINGROUP(48, spkr_i2s, NA, NA, NA, NA, NA, NA, NA, NA, NA), 5618c2ecf20Sopenharmony_ci PINGROUP(49, spkr_i2s, NA, NA, NA, NA, NA, NA, NA, NA, NA), 5628c2ecf20Sopenharmony_ci PINGROUP(50, spkr_i2s, gp_clk_1b, NA, NA, NA, NA, NA, NA, NA, NA), 5638c2ecf20Sopenharmony_ci PINGROUP(51, NA, gsbi5, NA, NA, NA, NA, NA, NA, NA, NA), 5648c2ecf20Sopenharmony_ci PINGROUP(52, NA, gsbi5, NA, NA, NA, NA, NA, NA, NA, NA), 5658c2ecf20Sopenharmony_ci PINGROUP(53, NA, gsbi5, NA, NA, NA, NA, NA, NA, NA, NA), 5668c2ecf20Sopenharmony_ci PINGROUP(54, NA, gsbi5, NA, NA, NA, NA, NA, NA, NA, NA), 5678c2ecf20Sopenharmony_ci PINGROUP(55, tsif1, NA, NA, NA, NA, NA, NA, NA, NA, NA), 5688c2ecf20Sopenharmony_ci PINGROUP(56, tsif1, NA, NA, NA, NA, NA, NA, NA, NA, NA), 5698c2ecf20Sopenharmony_ci PINGROUP(57, tsif1, sdc2, NA, NA, NA, NA, NA, NA, NA, NA), 5708c2ecf20Sopenharmony_ci PINGROUP(58, tsif2, sdc2, NA, NA, NA, NA, NA, NA, NA, NA), 5718c2ecf20Sopenharmony_ci PINGROUP(59, tsif2, sdc2, NA, NA, NA, NA, NA, NA, NA, NA), 5728c2ecf20Sopenharmony_ci PINGROUP(60, tsif2, sdc2, NA, NA, NA, NA, NA, NA, NA, NA), 5738c2ecf20Sopenharmony_ci PINGROUP(61, NA, sdc2, NA, NA, NA, NA, NA, NA, NA, NA), 5748c2ecf20Sopenharmony_ci PINGROUP(62, NA, sdc2, NA, NA, NA, NA, NA, NA, NA, NA), 5758c2ecf20Sopenharmony_ci PINGROUP(63, NA, sdc4, NA, NA, NA, NA, NA, NA, NA, NA), 5768c2ecf20Sopenharmony_ci PINGROUP(64, riva_wlan, sdc4, NA, NA, NA, NA, NA, NA, NA, NA), 5778c2ecf20Sopenharmony_ci PINGROUP(65, riva_wlan, sdc4, NA, NA, NA, NA, NA, NA, NA, NA), 5788c2ecf20Sopenharmony_ci PINGROUP(66, riva_wlan, sdc4, NA, NA, NA, NA, NA, NA, NA, NA), 5798c2ecf20Sopenharmony_ci PINGROUP(67, riva_wlan, sdc4, NA, NA, NA, NA, NA, NA, NA, NA), 5808c2ecf20Sopenharmony_ci PINGROUP(68, riva_wlan, sdc4, NA, NA, NA, NA, NA, NA, NA, NA), 5818c2ecf20Sopenharmony_ci PINGROUP(69, hdmi, NA, NA, NA, NA, NA, NA, NA, NA, NA), 5828c2ecf20Sopenharmony_ci PINGROUP(70, hdmi, NA, NA, NA, NA, NA, NA, NA, NA, NA), 5838c2ecf20Sopenharmony_ci PINGROUP(71, hdmi, NA, NA, NA, NA, NA, NA, NA, NA, NA), 5848c2ecf20Sopenharmony_ci PINGROUP(72, hdmi, NA, NA, NA, NA, NA, NA, NA, NA, NA), 5858c2ecf20Sopenharmony_ci PINGROUP(73, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), 5868c2ecf20Sopenharmony_ci PINGROUP(74, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), 5878c2ecf20Sopenharmony_ci PINGROUP(75, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), 5888c2ecf20Sopenharmony_ci PINGROUP(76, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), 5898c2ecf20Sopenharmony_ci PINGROUP(77, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), 5908c2ecf20Sopenharmony_ci PINGROUP(78, ps_hold, NA, NA, NA, NA, NA, NA, NA, NA, NA), 5918c2ecf20Sopenharmony_ci PINGROUP(79, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), 5928c2ecf20Sopenharmony_ci PINGROUP(80, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), 5938c2ecf20Sopenharmony_ci PINGROUP(81, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), 5948c2ecf20Sopenharmony_ci PINGROUP(82, NA, gsbi7, NA, NA, NA, NA, NA, NA, NA, NA), 5958c2ecf20Sopenharmony_ci PINGROUP(83, gsbi7, NA, NA, NA, NA, NA, NA, NA, NA, NA), 5968c2ecf20Sopenharmony_ci PINGROUP(84, NA, gsbi7, NA, NA, NA, NA, NA, NA, NA, NA), 5978c2ecf20Sopenharmony_ci PINGROUP(85, NA, NA, gsbi7, NA, NA, NA, NA, NA, NA, NA), 5988c2ecf20Sopenharmony_ci PINGROUP(86, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), 5998c2ecf20Sopenharmony_ci PINGROUP(87, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), 6008c2ecf20Sopenharmony_ci PINGROUP(88, usb2_hsic, NA, NA, NA, NA, NA, NA, NA, NA, NA), 6018c2ecf20Sopenharmony_ci PINGROUP(89, usb2_hsic, NA, NA, NA, NA, NA, NA, NA, NA, NA), 6028c2ecf20Sopenharmony_ci 6038c2ecf20Sopenharmony_ci SDC_PINGROUP(sdc1_clk, 0x20a0, 13, 6), 6048c2ecf20Sopenharmony_ci SDC_PINGROUP(sdc1_cmd, 0x20a0, 11, 3), 6058c2ecf20Sopenharmony_ci SDC_PINGROUP(sdc1_data, 0x20a0, 9, 0), 6068c2ecf20Sopenharmony_ci 6078c2ecf20Sopenharmony_ci SDC_PINGROUP(sdc3_clk, 0x20a4, 14, 6), 6088c2ecf20Sopenharmony_ci SDC_PINGROUP(sdc3_cmd, 0x20a4, 11, 3), 6098c2ecf20Sopenharmony_ci SDC_PINGROUP(sdc3_data, 0x20a4, 9, 0), 6108c2ecf20Sopenharmony_ci}; 6118c2ecf20Sopenharmony_ci 6128c2ecf20Sopenharmony_ci#define NUM_GPIO_PINGROUPS 90 6138c2ecf20Sopenharmony_ci 6148c2ecf20Sopenharmony_cistatic const struct msm_pinctrl_soc_data apq8064_pinctrl = { 6158c2ecf20Sopenharmony_ci .pins = apq8064_pins, 6168c2ecf20Sopenharmony_ci .npins = ARRAY_SIZE(apq8064_pins), 6178c2ecf20Sopenharmony_ci .functions = apq8064_functions, 6188c2ecf20Sopenharmony_ci .nfunctions = ARRAY_SIZE(apq8064_functions), 6198c2ecf20Sopenharmony_ci .groups = apq8064_groups, 6208c2ecf20Sopenharmony_ci .ngroups = ARRAY_SIZE(apq8064_groups), 6218c2ecf20Sopenharmony_ci .ngpios = NUM_GPIO_PINGROUPS, 6228c2ecf20Sopenharmony_ci}; 6238c2ecf20Sopenharmony_ci 6248c2ecf20Sopenharmony_cistatic int apq8064_pinctrl_probe(struct platform_device *pdev) 6258c2ecf20Sopenharmony_ci{ 6268c2ecf20Sopenharmony_ci return msm_pinctrl_probe(pdev, &apq8064_pinctrl); 6278c2ecf20Sopenharmony_ci} 6288c2ecf20Sopenharmony_ci 6298c2ecf20Sopenharmony_cistatic const struct of_device_id apq8064_pinctrl_of_match[] = { 6308c2ecf20Sopenharmony_ci { .compatible = "qcom,apq8064-pinctrl", }, 6318c2ecf20Sopenharmony_ci { }, 6328c2ecf20Sopenharmony_ci}; 6338c2ecf20Sopenharmony_ci 6348c2ecf20Sopenharmony_cistatic struct platform_driver apq8064_pinctrl_driver = { 6358c2ecf20Sopenharmony_ci .driver = { 6368c2ecf20Sopenharmony_ci .name = "apq8064-pinctrl", 6378c2ecf20Sopenharmony_ci .of_match_table = apq8064_pinctrl_of_match, 6388c2ecf20Sopenharmony_ci }, 6398c2ecf20Sopenharmony_ci .probe = apq8064_pinctrl_probe, 6408c2ecf20Sopenharmony_ci .remove = msm_pinctrl_remove, 6418c2ecf20Sopenharmony_ci}; 6428c2ecf20Sopenharmony_ci 6438c2ecf20Sopenharmony_cistatic int __init apq8064_pinctrl_init(void) 6448c2ecf20Sopenharmony_ci{ 6458c2ecf20Sopenharmony_ci return platform_driver_register(&apq8064_pinctrl_driver); 6468c2ecf20Sopenharmony_ci} 6478c2ecf20Sopenharmony_ciarch_initcall(apq8064_pinctrl_init); 6488c2ecf20Sopenharmony_ci 6498c2ecf20Sopenharmony_cistatic void __exit apq8064_pinctrl_exit(void) 6508c2ecf20Sopenharmony_ci{ 6518c2ecf20Sopenharmony_ci platform_driver_unregister(&apq8064_pinctrl_driver); 6528c2ecf20Sopenharmony_ci} 6538c2ecf20Sopenharmony_cimodule_exit(apq8064_pinctrl_exit); 6548c2ecf20Sopenharmony_ci 6558c2ecf20Sopenharmony_ciMODULE_AUTHOR("Bjorn Andersson <bjorn.andersson@sonymobile.com>"); 6568c2ecf20Sopenharmony_ciMODULE_DESCRIPTION("Qualcomm APQ8064 pinctrl driver"); 6578c2ecf20Sopenharmony_ciMODULE_LICENSE("GPL v2"); 6588c2ecf20Sopenharmony_ciMODULE_DEVICE_TABLE(of, apq8064_pinctrl_of_match); 659