162306a36Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0-only 262306a36Sopenharmony_ci/* 362306a36Sopenharmony_ci * Copyright (c) 2014, Sony Mobile Communications AB. 462306a36Sopenharmony_ci */ 562306a36Sopenharmony_ci 662306a36Sopenharmony_ci#include <linux/module.h> 762306a36Sopenharmony_ci#include <linux/of.h> 862306a36Sopenharmony_ci#include <linux/platform_device.h> 962306a36Sopenharmony_ci 1062306a36Sopenharmony_ci#include "pinctrl-msm.h" 1162306a36Sopenharmony_ci 1262306a36Sopenharmony_cistatic const struct pinctrl_pin_desc apq8064_pins[] = { 1362306a36Sopenharmony_ci PINCTRL_PIN(0, "GPIO_0"), 1462306a36Sopenharmony_ci PINCTRL_PIN(1, "GPIO_1"), 1562306a36Sopenharmony_ci PINCTRL_PIN(2, "GPIO_2"), 1662306a36Sopenharmony_ci PINCTRL_PIN(3, "GPIO_3"), 1762306a36Sopenharmony_ci PINCTRL_PIN(4, "GPIO_4"), 1862306a36Sopenharmony_ci PINCTRL_PIN(5, "GPIO_5"), 1962306a36Sopenharmony_ci PINCTRL_PIN(6, "GPIO_6"), 2062306a36Sopenharmony_ci PINCTRL_PIN(7, "GPIO_7"), 2162306a36Sopenharmony_ci PINCTRL_PIN(8, "GPIO_8"), 2262306a36Sopenharmony_ci PINCTRL_PIN(9, "GPIO_9"), 2362306a36Sopenharmony_ci PINCTRL_PIN(10, "GPIO_10"), 2462306a36Sopenharmony_ci PINCTRL_PIN(11, "GPIO_11"), 2562306a36Sopenharmony_ci PINCTRL_PIN(12, "GPIO_12"), 2662306a36Sopenharmony_ci PINCTRL_PIN(13, "GPIO_13"), 2762306a36Sopenharmony_ci PINCTRL_PIN(14, "GPIO_14"), 2862306a36Sopenharmony_ci PINCTRL_PIN(15, "GPIO_15"), 2962306a36Sopenharmony_ci PINCTRL_PIN(16, "GPIO_16"), 3062306a36Sopenharmony_ci PINCTRL_PIN(17, "GPIO_17"), 3162306a36Sopenharmony_ci PINCTRL_PIN(18, "GPIO_18"), 3262306a36Sopenharmony_ci PINCTRL_PIN(19, "GPIO_19"), 3362306a36Sopenharmony_ci PINCTRL_PIN(20, "GPIO_20"), 3462306a36Sopenharmony_ci PINCTRL_PIN(21, "GPIO_21"), 3562306a36Sopenharmony_ci PINCTRL_PIN(22, "GPIO_22"), 3662306a36Sopenharmony_ci PINCTRL_PIN(23, "GPIO_23"), 3762306a36Sopenharmony_ci PINCTRL_PIN(24, "GPIO_24"), 3862306a36Sopenharmony_ci PINCTRL_PIN(25, "GPIO_25"), 3962306a36Sopenharmony_ci PINCTRL_PIN(26, "GPIO_26"), 4062306a36Sopenharmony_ci PINCTRL_PIN(27, "GPIO_27"), 4162306a36Sopenharmony_ci PINCTRL_PIN(28, "GPIO_28"), 4262306a36Sopenharmony_ci PINCTRL_PIN(29, "GPIO_29"), 4362306a36Sopenharmony_ci PINCTRL_PIN(30, "GPIO_30"), 4462306a36Sopenharmony_ci PINCTRL_PIN(31, "GPIO_31"), 4562306a36Sopenharmony_ci PINCTRL_PIN(32, "GPIO_32"), 4662306a36Sopenharmony_ci PINCTRL_PIN(33, "GPIO_33"), 4762306a36Sopenharmony_ci PINCTRL_PIN(34, "GPIO_34"), 4862306a36Sopenharmony_ci PINCTRL_PIN(35, "GPIO_35"), 4962306a36Sopenharmony_ci PINCTRL_PIN(36, "GPIO_36"), 5062306a36Sopenharmony_ci PINCTRL_PIN(37, "GPIO_37"), 5162306a36Sopenharmony_ci PINCTRL_PIN(38, "GPIO_38"), 5262306a36Sopenharmony_ci PINCTRL_PIN(39, "GPIO_39"), 5362306a36Sopenharmony_ci PINCTRL_PIN(40, "GPIO_40"), 5462306a36Sopenharmony_ci PINCTRL_PIN(41, "GPIO_41"), 5562306a36Sopenharmony_ci PINCTRL_PIN(42, "GPIO_42"), 5662306a36Sopenharmony_ci PINCTRL_PIN(43, "GPIO_43"), 5762306a36Sopenharmony_ci PINCTRL_PIN(44, "GPIO_44"), 5862306a36Sopenharmony_ci PINCTRL_PIN(45, "GPIO_45"), 5962306a36Sopenharmony_ci PINCTRL_PIN(46, "GPIO_46"), 6062306a36Sopenharmony_ci PINCTRL_PIN(47, "GPIO_47"), 6162306a36Sopenharmony_ci PINCTRL_PIN(48, "GPIO_48"), 6262306a36Sopenharmony_ci PINCTRL_PIN(49, "GPIO_49"), 6362306a36Sopenharmony_ci PINCTRL_PIN(50, "GPIO_50"), 6462306a36Sopenharmony_ci PINCTRL_PIN(51, "GPIO_51"), 6562306a36Sopenharmony_ci PINCTRL_PIN(52, "GPIO_52"), 6662306a36Sopenharmony_ci PINCTRL_PIN(53, "GPIO_53"), 6762306a36Sopenharmony_ci PINCTRL_PIN(54, "GPIO_54"), 6862306a36Sopenharmony_ci PINCTRL_PIN(55, "GPIO_55"), 6962306a36Sopenharmony_ci PINCTRL_PIN(56, "GPIO_56"), 7062306a36Sopenharmony_ci PINCTRL_PIN(57, "GPIO_57"), 7162306a36Sopenharmony_ci PINCTRL_PIN(58, "GPIO_58"), 7262306a36Sopenharmony_ci PINCTRL_PIN(59, "GPIO_59"), 7362306a36Sopenharmony_ci PINCTRL_PIN(60, "GPIO_60"), 7462306a36Sopenharmony_ci PINCTRL_PIN(61, "GPIO_61"), 7562306a36Sopenharmony_ci PINCTRL_PIN(62, "GPIO_62"), 7662306a36Sopenharmony_ci PINCTRL_PIN(63, "GPIO_63"), 7762306a36Sopenharmony_ci PINCTRL_PIN(64, "GPIO_64"), 7862306a36Sopenharmony_ci PINCTRL_PIN(65, "GPIO_65"), 7962306a36Sopenharmony_ci PINCTRL_PIN(66, "GPIO_66"), 8062306a36Sopenharmony_ci PINCTRL_PIN(67, "GPIO_67"), 8162306a36Sopenharmony_ci PINCTRL_PIN(68, "GPIO_68"), 8262306a36Sopenharmony_ci PINCTRL_PIN(69, "GPIO_69"), 8362306a36Sopenharmony_ci PINCTRL_PIN(70, "GPIO_70"), 8462306a36Sopenharmony_ci PINCTRL_PIN(71, "GPIO_71"), 8562306a36Sopenharmony_ci PINCTRL_PIN(72, "GPIO_72"), 8662306a36Sopenharmony_ci PINCTRL_PIN(73, "GPIO_73"), 8762306a36Sopenharmony_ci PINCTRL_PIN(74, "GPIO_74"), 8862306a36Sopenharmony_ci PINCTRL_PIN(75, "GPIO_75"), 8962306a36Sopenharmony_ci PINCTRL_PIN(76, "GPIO_76"), 9062306a36Sopenharmony_ci PINCTRL_PIN(77, "GPIO_77"), 9162306a36Sopenharmony_ci PINCTRL_PIN(78, "GPIO_78"), 9262306a36Sopenharmony_ci PINCTRL_PIN(79, "GPIO_79"), 9362306a36Sopenharmony_ci PINCTRL_PIN(80, "GPIO_80"), 9462306a36Sopenharmony_ci PINCTRL_PIN(81, "GPIO_81"), 9562306a36Sopenharmony_ci PINCTRL_PIN(82, "GPIO_82"), 9662306a36Sopenharmony_ci PINCTRL_PIN(83, "GPIO_83"), 9762306a36Sopenharmony_ci PINCTRL_PIN(84, "GPIO_84"), 9862306a36Sopenharmony_ci PINCTRL_PIN(85, "GPIO_85"), 9962306a36Sopenharmony_ci PINCTRL_PIN(86, "GPIO_86"), 10062306a36Sopenharmony_ci PINCTRL_PIN(87, "GPIO_87"), 10162306a36Sopenharmony_ci PINCTRL_PIN(88, "GPIO_88"), 10262306a36Sopenharmony_ci PINCTRL_PIN(89, "GPIO_89"), 10362306a36Sopenharmony_ci 10462306a36Sopenharmony_ci PINCTRL_PIN(90, "SDC1_CLK"), 10562306a36Sopenharmony_ci PINCTRL_PIN(91, "SDC1_CMD"), 10662306a36Sopenharmony_ci PINCTRL_PIN(92, "SDC1_DATA"), 10762306a36Sopenharmony_ci PINCTRL_PIN(93, "SDC3_CLK"), 10862306a36Sopenharmony_ci PINCTRL_PIN(94, "SDC3_CMD"), 10962306a36Sopenharmony_ci PINCTRL_PIN(95, "SDC3_DATA"), 11062306a36Sopenharmony_ci}; 11162306a36Sopenharmony_ci 11262306a36Sopenharmony_ci#define DECLARE_APQ_GPIO_PINS(pin) static const unsigned int gpio##pin##_pins[] = { pin } 11362306a36Sopenharmony_ciDECLARE_APQ_GPIO_PINS(0); 11462306a36Sopenharmony_ciDECLARE_APQ_GPIO_PINS(1); 11562306a36Sopenharmony_ciDECLARE_APQ_GPIO_PINS(2); 11662306a36Sopenharmony_ciDECLARE_APQ_GPIO_PINS(3); 11762306a36Sopenharmony_ciDECLARE_APQ_GPIO_PINS(4); 11862306a36Sopenharmony_ciDECLARE_APQ_GPIO_PINS(5); 11962306a36Sopenharmony_ciDECLARE_APQ_GPIO_PINS(6); 12062306a36Sopenharmony_ciDECLARE_APQ_GPIO_PINS(7); 12162306a36Sopenharmony_ciDECLARE_APQ_GPIO_PINS(8); 12262306a36Sopenharmony_ciDECLARE_APQ_GPIO_PINS(9); 12362306a36Sopenharmony_ciDECLARE_APQ_GPIO_PINS(10); 12462306a36Sopenharmony_ciDECLARE_APQ_GPIO_PINS(11); 12562306a36Sopenharmony_ciDECLARE_APQ_GPIO_PINS(12); 12662306a36Sopenharmony_ciDECLARE_APQ_GPIO_PINS(13); 12762306a36Sopenharmony_ciDECLARE_APQ_GPIO_PINS(14); 12862306a36Sopenharmony_ciDECLARE_APQ_GPIO_PINS(15); 12962306a36Sopenharmony_ciDECLARE_APQ_GPIO_PINS(16); 13062306a36Sopenharmony_ciDECLARE_APQ_GPIO_PINS(17); 13162306a36Sopenharmony_ciDECLARE_APQ_GPIO_PINS(18); 13262306a36Sopenharmony_ciDECLARE_APQ_GPIO_PINS(19); 13362306a36Sopenharmony_ciDECLARE_APQ_GPIO_PINS(20); 13462306a36Sopenharmony_ciDECLARE_APQ_GPIO_PINS(21); 13562306a36Sopenharmony_ciDECLARE_APQ_GPIO_PINS(22); 13662306a36Sopenharmony_ciDECLARE_APQ_GPIO_PINS(23); 13762306a36Sopenharmony_ciDECLARE_APQ_GPIO_PINS(24); 13862306a36Sopenharmony_ciDECLARE_APQ_GPIO_PINS(25); 13962306a36Sopenharmony_ciDECLARE_APQ_GPIO_PINS(26); 14062306a36Sopenharmony_ciDECLARE_APQ_GPIO_PINS(27); 14162306a36Sopenharmony_ciDECLARE_APQ_GPIO_PINS(28); 14262306a36Sopenharmony_ciDECLARE_APQ_GPIO_PINS(29); 14362306a36Sopenharmony_ciDECLARE_APQ_GPIO_PINS(30); 14462306a36Sopenharmony_ciDECLARE_APQ_GPIO_PINS(31); 14562306a36Sopenharmony_ciDECLARE_APQ_GPIO_PINS(32); 14662306a36Sopenharmony_ciDECLARE_APQ_GPIO_PINS(33); 14762306a36Sopenharmony_ciDECLARE_APQ_GPIO_PINS(34); 14862306a36Sopenharmony_ciDECLARE_APQ_GPIO_PINS(35); 14962306a36Sopenharmony_ciDECLARE_APQ_GPIO_PINS(36); 15062306a36Sopenharmony_ciDECLARE_APQ_GPIO_PINS(37); 15162306a36Sopenharmony_ciDECLARE_APQ_GPIO_PINS(38); 15262306a36Sopenharmony_ciDECLARE_APQ_GPIO_PINS(39); 15362306a36Sopenharmony_ciDECLARE_APQ_GPIO_PINS(40); 15462306a36Sopenharmony_ciDECLARE_APQ_GPIO_PINS(41); 15562306a36Sopenharmony_ciDECLARE_APQ_GPIO_PINS(42); 15662306a36Sopenharmony_ciDECLARE_APQ_GPIO_PINS(43); 15762306a36Sopenharmony_ciDECLARE_APQ_GPIO_PINS(44); 15862306a36Sopenharmony_ciDECLARE_APQ_GPIO_PINS(45); 15962306a36Sopenharmony_ciDECLARE_APQ_GPIO_PINS(46); 16062306a36Sopenharmony_ciDECLARE_APQ_GPIO_PINS(47); 16162306a36Sopenharmony_ciDECLARE_APQ_GPIO_PINS(48); 16262306a36Sopenharmony_ciDECLARE_APQ_GPIO_PINS(49); 16362306a36Sopenharmony_ciDECLARE_APQ_GPIO_PINS(50); 16462306a36Sopenharmony_ciDECLARE_APQ_GPIO_PINS(51); 16562306a36Sopenharmony_ciDECLARE_APQ_GPIO_PINS(52); 16662306a36Sopenharmony_ciDECLARE_APQ_GPIO_PINS(53); 16762306a36Sopenharmony_ciDECLARE_APQ_GPIO_PINS(54); 16862306a36Sopenharmony_ciDECLARE_APQ_GPIO_PINS(55); 16962306a36Sopenharmony_ciDECLARE_APQ_GPIO_PINS(56); 17062306a36Sopenharmony_ciDECLARE_APQ_GPIO_PINS(57); 17162306a36Sopenharmony_ciDECLARE_APQ_GPIO_PINS(58); 17262306a36Sopenharmony_ciDECLARE_APQ_GPIO_PINS(59); 17362306a36Sopenharmony_ciDECLARE_APQ_GPIO_PINS(60); 17462306a36Sopenharmony_ciDECLARE_APQ_GPIO_PINS(61); 17562306a36Sopenharmony_ciDECLARE_APQ_GPIO_PINS(62); 17662306a36Sopenharmony_ciDECLARE_APQ_GPIO_PINS(63); 17762306a36Sopenharmony_ciDECLARE_APQ_GPIO_PINS(64); 17862306a36Sopenharmony_ciDECLARE_APQ_GPIO_PINS(65); 17962306a36Sopenharmony_ciDECLARE_APQ_GPIO_PINS(66); 18062306a36Sopenharmony_ciDECLARE_APQ_GPIO_PINS(67); 18162306a36Sopenharmony_ciDECLARE_APQ_GPIO_PINS(68); 18262306a36Sopenharmony_ciDECLARE_APQ_GPIO_PINS(69); 18362306a36Sopenharmony_ciDECLARE_APQ_GPIO_PINS(70); 18462306a36Sopenharmony_ciDECLARE_APQ_GPIO_PINS(71); 18562306a36Sopenharmony_ciDECLARE_APQ_GPIO_PINS(72); 18662306a36Sopenharmony_ciDECLARE_APQ_GPIO_PINS(73); 18762306a36Sopenharmony_ciDECLARE_APQ_GPIO_PINS(74); 18862306a36Sopenharmony_ciDECLARE_APQ_GPIO_PINS(75); 18962306a36Sopenharmony_ciDECLARE_APQ_GPIO_PINS(76); 19062306a36Sopenharmony_ciDECLARE_APQ_GPIO_PINS(77); 19162306a36Sopenharmony_ciDECLARE_APQ_GPIO_PINS(78); 19262306a36Sopenharmony_ciDECLARE_APQ_GPIO_PINS(79); 19362306a36Sopenharmony_ciDECLARE_APQ_GPIO_PINS(80); 19462306a36Sopenharmony_ciDECLARE_APQ_GPIO_PINS(81); 19562306a36Sopenharmony_ciDECLARE_APQ_GPIO_PINS(82); 19662306a36Sopenharmony_ciDECLARE_APQ_GPIO_PINS(83); 19762306a36Sopenharmony_ciDECLARE_APQ_GPIO_PINS(84); 19862306a36Sopenharmony_ciDECLARE_APQ_GPIO_PINS(85); 19962306a36Sopenharmony_ciDECLARE_APQ_GPIO_PINS(86); 20062306a36Sopenharmony_ciDECLARE_APQ_GPIO_PINS(87); 20162306a36Sopenharmony_ciDECLARE_APQ_GPIO_PINS(88); 20262306a36Sopenharmony_ciDECLARE_APQ_GPIO_PINS(89); 20362306a36Sopenharmony_ci 20462306a36Sopenharmony_cistatic const unsigned int sdc1_clk_pins[] = { 90 }; 20562306a36Sopenharmony_cistatic const unsigned int sdc1_cmd_pins[] = { 91 }; 20662306a36Sopenharmony_cistatic const unsigned int sdc1_data_pins[] = { 92 }; 20762306a36Sopenharmony_cistatic const unsigned int sdc3_clk_pins[] = { 93 }; 20862306a36Sopenharmony_cistatic const unsigned int sdc3_cmd_pins[] = { 94 }; 20962306a36Sopenharmony_cistatic const unsigned int sdc3_data_pins[] = { 95 }; 21062306a36Sopenharmony_ci 21162306a36Sopenharmony_ci#define PINGROUP(id, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10) \ 21262306a36Sopenharmony_ci { \ 21362306a36Sopenharmony_ci .grp = PINCTRL_PINGROUP("gpio" #id, \ 21462306a36Sopenharmony_ci gpio##id##_pins, \ 21562306a36Sopenharmony_ci ARRAY_SIZE(gpio##id##_pins)), \ 21662306a36Sopenharmony_ci .funcs = (int[]){ \ 21762306a36Sopenharmony_ci APQ_MUX_gpio, \ 21862306a36Sopenharmony_ci APQ_MUX_##f1, \ 21962306a36Sopenharmony_ci APQ_MUX_##f2, \ 22062306a36Sopenharmony_ci APQ_MUX_##f3, \ 22162306a36Sopenharmony_ci APQ_MUX_##f4, \ 22262306a36Sopenharmony_ci APQ_MUX_##f5, \ 22362306a36Sopenharmony_ci APQ_MUX_##f6, \ 22462306a36Sopenharmony_ci APQ_MUX_##f7, \ 22562306a36Sopenharmony_ci APQ_MUX_##f8, \ 22662306a36Sopenharmony_ci APQ_MUX_##f9, \ 22762306a36Sopenharmony_ci APQ_MUX_##f10, \ 22862306a36Sopenharmony_ci }, \ 22962306a36Sopenharmony_ci .nfuncs = 11, \ 23062306a36Sopenharmony_ci .ctl_reg = 0x1000 + 0x10 * id, \ 23162306a36Sopenharmony_ci .io_reg = 0x1004 + 0x10 * id, \ 23262306a36Sopenharmony_ci .intr_cfg_reg = 0x1008 + 0x10 * id, \ 23362306a36Sopenharmony_ci .intr_status_reg = 0x100c + 0x10 * id, \ 23462306a36Sopenharmony_ci .intr_target_reg = 0x400 + 0x4 * id, \ 23562306a36Sopenharmony_ci .mux_bit = 2, \ 23662306a36Sopenharmony_ci .pull_bit = 0, \ 23762306a36Sopenharmony_ci .drv_bit = 6, \ 23862306a36Sopenharmony_ci .oe_bit = 9, \ 23962306a36Sopenharmony_ci .in_bit = 0, \ 24062306a36Sopenharmony_ci .out_bit = 1, \ 24162306a36Sopenharmony_ci .intr_enable_bit = 0, \ 24262306a36Sopenharmony_ci .intr_status_bit = 0, \ 24362306a36Sopenharmony_ci .intr_ack_high = 1, \ 24462306a36Sopenharmony_ci .intr_target_bit = 0, \ 24562306a36Sopenharmony_ci .intr_target_kpss_val = 4, \ 24662306a36Sopenharmony_ci .intr_raw_status_bit = 3, \ 24762306a36Sopenharmony_ci .intr_polarity_bit = 1, \ 24862306a36Sopenharmony_ci .intr_detection_bit = 2, \ 24962306a36Sopenharmony_ci .intr_detection_width = 1, \ 25062306a36Sopenharmony_ci } 25162306a36Sopenharmony_ci 25262306a36Sopenharmony_ci#define SDC_PINGROUP(pg_name, ctl, pull, drv) \ 25362306a36Sopenharmony_ci { \ 25462306a36Sopenharmony_ci .grp = PINCTRL_PINGROUP(#pg_name, \ 25562306a36Sopenharmony_ci pg_name##_pins, \ 25662306a36Sopenharmony_ci ARRAY_SIZE(pg_name##_pins)), \ 25762306a36Sopenharmony_ci .ctl_reg = ctl, \ 25862306a36Sopenharmony_ci .io_reg = 0, \ 25962306a36Sopenharmony_ci .intr_cfg_reg = 0, \ 26062306a36Sopenharmony_ci .intr_status_reg = 0, \ 26162306a36Sopenharmony_ci .intr_target_reg = 0, \ 26262306a36Sopenharmony_ci .mux_bit = -1, \ 26362306a36Sopenharmony_ci .pull_bit = pull, \ 26462306a36Sopenharmony_ci .drv_bit = drv, \ 26562306a36Sopenharmony_ci .oe_bit = -1, \ 26662306a36Sopenharmony_ci .in_bit = -1, \ 26762306a36Sopenharmony_ci .out_bit = -1, \ 26862306a36Sopenharmony_ci .intr_enable_bit = -1, \ 26962306a36Sopenharmony_ci .intr_status_bit = -1, \ 27062306a36Sopenharmony_ci .intr_target_bit = -1, \ 27162306a36Sopenharmony_ci .intr_target_kpss_val = -1, \ 27262306a36Sopenharmony_ci .intr_raw_status_bit = -1, \ 27362306a36Sopenharmony_ci .intr_polarity_bit = -1, \ 27462306a36Sopenharmony_ci .intr_detection_bit = -1, \ 27562306a36Sopenharmony_ci .intr_detection_width = -1, \ 27662306a36Sopenharmony_ci } 27762306a36Sopenharmony_ci 27862306a36Sopenharmony_cienum apq8064_functions { 27962306a36Sopenharmony_ci APQ_MUX_cam_mclk, 28062306a36Sopenharmony_ci APQ_MUX_codec_mic_i2s, 28162306a36Sopenharmony_ci APQ_MUX_codec_spkr_i2s, 28262306a36Sopenharmony_ci APQ_MUX_gp_clk_0a, 28362306a36Sopenharmony_ci APQ_MUX_gp_clk_0b, 28462306a36Sopenharmony_ci APQ_MUX_gp_clk_1a, 28562306a36Sopenharmony_ci APQ_MUX_gp_clk_1b, 28662306a36Sopenharmony_ci APQ_MUX_gp_clk_2a, 28762306a36Sopenharmony_ci APQ_MUX_gp_clk_2b, 28862306a36Sopenharmony_ci APQ_MUX_gpio, 28962306a36Sopenharmony_ci APQ_MUX_gsbi1, 29062306a36Sopenharmony_ci APQ_MUX_gsbi2, 29162306a36Sopenharmony_ci APQ_MUX_gsbi3, 29262306a36Sopenharmony_ci APQ_MUX_gsbi4, 29362306a36Sopenharmony_ci APQ_MUX_gsbi4_cam_i2c, 29462306a36Sopenharmony_ci APQ_MUX_gsbi5, 29562306a36Sopenharmony_ci APQ_MUX_gsbi5_spi_cs1, 29662306a36Sopenharmony_ci APQ_MUX_gsbi5_spi_cs2, 29762306a36Sopenharmony_ci APQ_MUX_gsbi5_spi_cs3, 29862306a36Sopenharmony_ci APQ_MUX_gsbi6, 29962306a36Sopenharmony_ci APQ_MUX_gsbi6_spi_cs1, 30062306a36Sopenharmony_ci APQ_MUX_gsbi6_spi_cs2, 30162306a36Sopenharmony_ci APQ_MUX_gsbi6_spi_cs3, 30262306a36Sopenharmony_ci APQ_MUX_gsbi7, 30362306a36Sopenharmony_ci APQ_MUX_gsbi7_spi_cs1, 30462306a36Sopenharmony_ci APQ_MUX_gsbi7_spi_cs2, 30562306a36Sopenharmony_ci APQ_MUX_gsbi7_spi_cs3, 30662306a36Sopenharmony_ci APQ_MUX_gsbi_cam_i2c, 30762306a36Sopenharmony_ci APQ_MUX_hdmi, 30862306a36Sopenharmony_ci APQ_MUX_mi2s, 30962306a36Sopenharmony_ci APQ_MUX_riva_bt, 31062306a36Sopenharmony_ci APQ_MUX_riva_fm, 31162306a36Sopenharmony_ci APQ_MUX_riva_wlan, 31262306a36Sopenharmony_ci APQ_MUX_sdc2, 31362306a36Sopenharmony_ci APQ_MUX_sdc4, 31462306a36Sopenharmony_ci APQ_MUX_slimbus, 31562306a36Sopenharmony_ci APQ_MUX_spkr_i2s, 31662306a36Sopenharmony_ci APQ_MUX_tsif1, 31762306a36Sopenharmony_ci APQ_MUX_tsif2, 31862306a36Sopenharmony_ci APQ_MUX_usb2_hsic, 31962306a36Sopenharmony_ci APQ_MUX_ps_hold, 32062306a36Sopenharmony_ci APQ_MUX_NA, 32162306a36Sopenharmony_ci}; 32262306a36Sopenharmony_ci 32362306a36Sopenharmony_cistatic const char * const cam_mclk_groups[] = { 32462306a36Sopenharmony_ci "gpio4" "gpio5" 32562306a36Sopenharmony_ci}; 32662306a36Sopenharmony_cistatic const char * const codec_mic_i2s_groups[] = { 32762306a36Sopenharmony_ci "gpio34", "gpio35", "gpio36", "gpio37", "gpio38" 32862306a36Sopenharmony_ci}; 32962306a36Sopenharmony_cistatic const char * const codec_spkr_i2s_groups[] = { 33062306a36Sopenharmony_ci "gpio39", "gpio40", "gpio41", "gpio42" 33162306a36Sopenharmony_ci}; 33262306a36Sopenharmony_cistatic const char * const gpio_groups[] = { 33362306a36Sopenharmony_ci "gpio0", "gpio1", "gpio2", "gpio3", "gpio4", "gpio5", "gpio6", "gpio7", 33462306a36Sopenharmony_ci "gpio8", "gpio9", "gpio10", "gpio11", "gpio12", "gpio13", "gpio14", 33562306a36Sopenharmony_ci "gpio15", "gpio16", "gpio17", "gpio18", "gpio19", "gpio20", "gpio21", 33662306a36Sopenharmony_ci "gpio22", "gpio23", "gpio24", "gpio25", "gpio26", "gpio27", "gpio28", 33762306a36Sopenharmony_ci "gpio29", "gpio30", "gpio31", "gpio32", "gpio33", "gpio34", "gpio35", 33862306a36Sopenharmony_ci "gpio36", "gpio37", "gpio38", "gpio39", "gpio40", "gpio41", "gpio42", 33962306a36Sopenharmony_ci "gpio43", "gpio44", "gpio45", "gpio46", "gpio47", "gpio48", "gpio49", 34062306a36Sopenharmony_ci "gpio50", "gpio51", "gpio52", "gpio53", "gpio54", "gpio55", "gpio56", 34162306a36Sopenharmony_ci "gpio57", "gpio58", "gpio59", "gpio60", "gpio61", "gpio62", "gpio63", 34262306a36Sopenharmony_ci "gpio64", "gpio65", "gpio66", "gpio67", "gpio68", "gpio69", "gpio70", 34362306a36Sopenharmony_ci "gpio71", "gpio72", "gpio73", "gpio74", "gpio75", "gpio76", "gpio77", 34462306a36Sopenharmony_ci "gpio78", "gpio79", "gpio80", "gpio81", "gpio82", "gpio83", "gpio84", 34562306a36Sopenharmony_ci "gpio85", "gpio86", "gpio87", "gpio88", "gpio89" 34662306a36Sopenharmony_ci}; 34762306a36Sopenharmony_cistatic const char * const gp_clk_0a_groups[] = { 34862306a36Sopenharmony_ci "gpio3" 34962306a36Sopenharmony_ci}; 35062306a36Sopenharmony_cistatic const char * const gp_clk_0b_groups[] = { 35162306a36Sopenharmony_ci "gpio34" 35262306a36Sopenharmony_ci}; 35362306a36Sopenharmony_cistatic const char * const gp_clk_1a_groups[] = { 35462306a36Sopenharmony_ci "gpio4" 35562306a36Sopenharmony_ci}; 35662306a36Sopenharmony_cistatic const char * const gp_clk_1b_groups[] = { 35762306a36Sopenharmony_ci "gpio50" 35862306a36Sopenharmony_ci}; 35962306a36Sopenharmony_cistatic const char * const gp_clk_2a_groups[] = { 36062306a36Sopenharmony_ci "gpio32" 36162306a36Sopenharmony_ci}; 36262306a36Sopenharmony_cistatic const char * const gp_clk_2b_groups[] = { 36362306a36Sopenharmony_ci "gpio25" 36462306a36Sopenharmony_ci}; 36562306a36Sopenharmony_cistatic const char * const ps_hold_groups[] = { 36662306a36Sopenharmony_ci "gpio78" 36762306a36Sopenharmony_ci}; 36862306a36Sopenharmony_cistatic const char * const gsbi1_groups[] = { 36962306a36Sopenharmony_ci "gpio18", "gpio19", "gpio20", "gpio21" 37062306a36Sopenharmony_ci}; 37162306a36Sopenharmony_cistatic const char * const gsbi2_groups[] = { 37262306a36Sopenharmony_ci "gpio22", "gpio23", "gpio24", "gpio25" 37362306a36Sopenharmony_ci}; 37462306a36Sopenharmony_cistatic const char * const gsbi3_groups[] = { 37562306a36Sopenharmony_ci "gpio6", "gpio7", "gpio8", "gpio9" 37662306a36Sopenharmony_ci}; 37762306a36Sopenharmony_cistatic const char * const gsbi4_groups[] = { 37862306a36Sopenharmony_ci "gpio10", "gpio11", "gpio12", "gpio13" 37962306a36Sopenharmony_ci}; 38062306a36Sopenharmony_cistatic const char * const gsbi4_cam_i2c_groups[] = { 38162306a36Sopenharmony_ci "gpio10", "gpio11", "gpio12", "gpio13" 38262306a36Sopenharmony_ci}; 38362306a36Sopenharmony_cistatic const char * const gsbi5_groups[] = { 38462306a36Sopenharmony_ci "gpio51", "gpio52", "gpio53", "gpio54" 38562306a36Sopenharmony_ci}; 38662306a36Sopenharmony_cistatic const char * const gsbi5_spi_cs1_groups[] = { 38762306a36Sopenharmony_ci "gpio47" 38862306a36Sopenharmony_ci}; 38962306a36Sopenharmony_cistatic const char * const gsbi5_spi_cs2_groups[] = { 39062306a36Sopenharmony_ci "gpio31" 39162306a36Sopenharmony_ci}; 39262306a36Sopenharmony_cistatic const char * const gsbi5_spi_cs3_groups[] = { 39362306a36Sopenharmony_ci "gpio32" 39462306a36Sopenharmony_ci}; 39562306a36Sopenharmony_cistatic const char * const gsbi6_groups[] = { 39662306a36Sopenharmony_ci "gpio14", "gpio15", "gpio16", "gpio17" 39762306a36Sopenharmony_ci}; 39862306a36Sopenharmony_cistatic const char * const gsbi6_spi_cs1_groups[] = { 39962306a36Sopenharmony_ci "gpio47" 40062306a36Sopenharmony_ci}; 40162306a36Sopenharmony_cistatic const char * const gsbi6_spi_cs2_groups[] = { 40262306a36Sopenharmony_ci "gpio31" 40362306a36Sopenharmony_ci}; 40462306a36Sopenharmony_cistatic const char * const gsbi6_spi_cs3_groups[] = { 40562306a36Sopenharmony_ci "gpio32" 40662306a36Sopenharmony_ci}; 40762306a36Sopenharmony_cistatic const char * const gsbi7_groups[] = { 40862306a36Sopenharmony_ci "gpio82", "gpio83", "gpio84", "gpio85" 40962306a36Sopenharmony_ci}; 41062306a36Sopenharmony_cistatic const char * const gsbi7_spi_cs1_groups[] = { 41162306a36Sopenharmony_ci "gpio47" 41262306a36Sopenharmony_ci}; 41362306a36Sopenharmony_cistatic const char * const gsbi7_spi_cs2_groups[] = { 41462306a36Sopenharmony_ci "gpio31" 41562306a36Sopenharmony_ci}; 41662306a36Sopenharmony_cistatic const char * const gsbi7_spi_cs3_groups[] = { 41762306a36Sopenharmony_ci "gpio32" 41862306a36Sopenharmony_ci}; 41962306a36Sopenharmony_cistatic const char * const gsbi_cam_i2c_groups[] = { 42062306a36Sopenharmony_ci "gpio10", "gpio11", "gpio12", "gpio13" 42162306a36Sopenharmony_ci}; 42262306a36Sopenharmony_cistatic const char * const hdmi_groups[] = { 42362306a36Sopenharmony_ci "gpio69", "gpio70", "gpio71", "gpio72" 42462306a36Sopenharmony_ci}; 42562306a36Sopenharmony_cistatic const char * const mi2s_groups[] = { 42662306a36Sopenharmony_ci "gpio27", "gpio28", "gpio29", "gpio30", "gpio31", "gpio32", "gpio33" 42762306a36Sopenharmony_ci}; 42862306a36Sopenharmony_cistatic const char * const riva_bt_groups[] = { 42962306a36Sopenharmony_ci "gpio16", "gpio17" 43062306a36Sopenharmony_ci}; 43162306a36Sopenharmony_cistatic const char * const riva_fm_groups[] = { 43262306a36Sopenharmony_ci "gpio14", "gpio15" 43362306a36Sopenharmony_ci}; 43462306a36Sopenharmony_cistatic const char * const riva_wlan_groups[] = { 43562306a36Sopenharmony_ci "gpio64", "gpio65", "gpio66", "gpio67", "gpio68" 43662306a36Sopenharmony_ci}; 43762306a36Sopenharmony_cistatic const char * const sdc2_groups[] = { 43862306a36Sopenharmony_ci "gpio57", "gpio58", "gpio59", "gpio60", "gpio61", "gpio62" 43962306a36Sopenharmony_ci}; 44062306a36Sopenharmony_cistatic const char * const sdc4_groups[] = { 44162306a36Sopenharmony_ci "gpio63", "gpio64", "gpio65", "gpio66", "gpio67", "gpio68" 44262306a36Sopenharmony_ci}; 44362306a36Sopenharmony_cistatic const char * const slimbus_groups[] = { 44462306a36Sopenharmony_ci "gpio40", "gpio41" 44562306a36Sopenharmony_ci}; 44662306a36Sopenharmony_cistatic const char * const spkr_i2s_groups[] = { 44762306a36Sopenharmony_ci "gpio47", "gpio48", "gpio49", "gpio50" 44862306a36Sopenharmony_ci}; 44962306a36Sopenharmony_cistatic const char * const tsif1_groups[] = { 45062306a36Sopenharmony_ci "gpio55", "gpio56", "gpio57" 45162306a36Sopenharmony_ci}; 45262306a36Sopenharmony_cistatic const char * const tsif2_groups[] = { 45362306a36Sopenharmony_ci "gpio58", "gpio59", "gpio60" 45462306a36Sopenharmony_ci}; 45562306a36Sopenharmony_cistatic const char * const usb2_hsic_groups[] = { 45662306a36Sopenharmony_ci "gpio88", "gpio89" 45762306a36Sopenharmony_ci}; 45862306a36Sopenharmony_ci 45962306a36Sopenharmony_cistatic const struct pinfunction apq8064_functions[] = { 46062306a36Sopenharmony_ci APQ_PIN_FUNCTION(cam_mclk), 46162306a36Sopenharmony_ci APQ_PIN_FUNCTION(codec_mic_i2s), 46262306a36Sopenharmony_ci APQ_PIN_FUNCTION(codec_spkr_i2s), 46362306a36Sopenharmony_ci APQ_PIN_FUNCTION(gp_clk_0a), 46462306a36Sopenharmony_ci APQ_PIN_FUNCTION(gp_clk_0b), 46562306a36Sopenharmony_ci APQ_PIN_FUNCTION(gp_clk_1a), 46662306a36Sopenharmony_ci APQ_PIN_FUNCTION(gp_clk_1b), 46762306a36Sopenharmony_ci APQ_PIN_FUNCTION(gp_clk_2a), 46862306a36Sopenharmony_ci APQ_PIN_FUNCTION(gp_clk_2b), 46962306a36Sopenharmony_ci APQ_PIN_FUNCTION(gpio), 47062306a36Sopenharmony_ci APQ_PIN_FUNCTION(gsbi1), 47162306a36Sopenharmony_ci APQ_PIN_FUNCTION(gsbi2), 47262306a36Sopenharmony_ci APQ_PIN_FUNCTION(gsbi3), 47362306a36Sopenharmony_ci APQ_PIN_FUNCTION(gsbi4), 47462306a36Sopenharmony_ci APQ_PIN_FUNCTION(gsbi4_cam_i2c), 47562306a36Sopenharmony_ci APQ_PIN_FUNCTION(gsbi5), 47662306a36Sopenharmony_ci APQ_PIN_FUNCTION(gsbi5_spi_cs1), 47762306a36Sopenharmony_ci APQ_PIN_FUNCTION(gsbi5_spi_cs2), 47862306a36Sopenharmony_ci APQ_PIN_FUNCTION(gsbi5_spi_cs3), 47962306a36Sopenharmony_ci APQ_PIN_FUNCTION(gsbi6), 48062306a36Sopenharmony_ci APQ_PIN_FUNCTION(gsbi6_spi_cs1), 48162306a36Sopenharmony_ci APQ_PIN_FUNCTION(gsbi6_spi_cs2), 48262306a36Sopenharmony_ci APQ_PIN_FUNCTION(gsbi6_spi_cs3), 48362306a36Sopenharmony_ci APQ_PIN_FUNCTION(gsbi7), 48462306a36Sopenharmony_ci APQ_PIN_FUNCTION(gsbi7_spi_cs1), 48562306a36Sopenharmony_ci APQ_PIN_FUNCTION(gsbi7_spi_cs2), 48662306a36Sopenharmony_ci APQ_PIN_FUNCTION(gsbi7_spi_cs3), 48762306a36Sopenharmony_ci APQ_PIN_FUNCTION(gsbi_cam_i2c), 48862306a36Sopenharmony_ci APQ_PIN_FUNCTION(hdmi), 48962306a36Sopenharmony_ci APQ_PIN_FUNCTION(mi2s), 49062306a36Sopenharmony_ci APQ_PIN_FUNCTION(riva_bt), 49162306a36Sopenharmony_ci APQ_PIN_FUNCTION(riva_fm), 49262306a36Sopenharmony_ci APQ_PIN_FUNCTION(riva_wlan), 49362306a36Sopenharmony_ci APQ_PIN_FUNCTION(sdc2), 49462306a36Sopenharmony_ci APQ_PIN_FUNCTION(sdc4), 49562306a36Sopenharmony_ci APQ_PIN_FUNCTION(slimbus), 49662306a36Sopenharmony_ci APQ_PIN_FUNCTION(spkr_i2s), 49762306a36Sopenharmony_ci APQ_PIN_FUNCTION(tsif1), 49862306a36Sopenharmony_ci APQ_PIN_FUNCTION(tsif2), 49962306a36Sopenharmony_ci APQ_PIN_FUNCTION(usb2_hsic), 50062306a36Sopenharmony_ci APQ_PIN_FUNCTION(ps_hold), 50162306a36Sopenharmony_ci}; 50262306a36Sopenharmony_ci 50362306a36Sopenharmony_cistatic const struct msm_pingroup apq8064_groups[] = { 50462306a36Sopenharmony_ci PINGROUP(0, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), 50562306a36Sopenharmony_ci PINGROUP(1, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), 50662306a36Sopenharmony_ci PINGROUP(2, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), 50762306a36Sopenharmony_ci PINGROUP(3, NA, gp_clk_0a, NA, NA, NA, NA, NA, NA, NA, NA), 50862306a36Sopenharmony_ci PINGROUP(4, NA, NA, cam_mclk, gp_clk_1a, NA, NA, NA, NA, NA, NA), 50962306a36Sopenharmony_ci PINGROUP(5, NA, cam_mclk, NA, NA, NA, NA, NA, NA, NA, NA), 51062306a36Sopenharmony_ci PINGROUP(6, gsbi3, NA, NA, NA, NA, NA, NA, NA, NA, NA), 51162306a36Sopenharmony_ci PINGROUP(7, gsbi3, NA, NA, NA, NA, NA, NA, NA, NA, NA), 51262306a36Sopenharmony_ci PINGROUP(8, gsbi3, NA, NA, NA, NA, NA, NA, NA, NA, NA), 51362306a36Sopenharmony_ci PINGROUP(9, gsbi3, NA, NA, NA, NA, NA, NA, NA, NA, NA), 51462306a36Sopenharmony_ci PINGROUP(10, gsbi4, NA, NA, NA, NA, NA, NA, NA, gsbi4_cam_i2c, NA), 51562306a36Sopenharmony_ci PINGROUP(11, gsbi4, NA, NA, NA, NA, NA, NA, NA, NA, gsbi4_cam_i2c), 51662306a36Sopenharmony_ci PINGROUP(12, gsbi4, NA, NA, NA, NA, gsbi4_cam_i2c, NA, NA, NA, NA), 51762306a36Sopenharmony_ci PINGROUP(13, gsbi4, NA, NA, NA, NA, gsbi4_cam_i2c, NA, NA, NA, NA), 51862306a36Sopenharmony_ci PINGROUP(14, riva_fm, gsbi6, NA, NA, NA, NA, NA, NA, NA, NA), 51962306a36Sopenharmony_ci PINGROUP(15, riva_fm, gsbi6, NA, NA, NA, NA, NA, NA, NA, NA), 52062306a36Sopenharmony_ci PINGROUP(16, riva_bt, gsbi6, NA, NA, NA, NA, NA, NA, NA, NA), 52162306a36Sopenharmony_ci PINGROUP(17, riva_bt, gsbi6, NA, NA, NA, NA, NA, NA, NA, NA), 52262306a36Sopenharmony_ci PINGROUP(18, gsbi1, NA, NA, NA, NA, NA, NA, NA, NA, NA), 52362306a36Sopenharmony_ci PINGROUP(19, gsbi1, NA, NA, NA, NA, NA, NA, NA, NA, NA), 52462306a36Sopenharmony_ci PINGROUP(20, gsbi1, NA, NA, NA, NA, NA, NA, NA, NA, NA), 52562306a36Sopenharmony_ci PINGROUP(21, gsbi1, NA, NA, NA, NA, NA, NA, NA, NA, NA), 52662306a36Sopenharmony_ci PINGROUP(22, gsbi2, NA, NA, NA, NA, NA, NA, NA, NA, NA), 52762306a36Sopenharmony_ci PINGROUP(23, gsbi2, NA, NA, NA, NA, NA, NA, NA, NA, NA), 52862306a36Sopenharmony_ci PINGROUP(24, gsbi2, NA, NA, NA, NA, NA, NA, NA, NA, NA), 52962306a36Sopenharmony_ci PINGROUP(25, gsbi2, gp_clk_2b, NA, NA, NA, NA, NA, NA, NA, NA), 53062306a36Sopenharmony_ci PINGROUP(26, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), 53162306a36Sopenharmony_ci PINGROUP(27, mi2s, NA, NA, NA, NA, NA, NA, NA, NA, NA), 53262306a36Sopenharmony_ci PINGROUP(28, mi2s, NA, NA, NA, NA, NA, NA, NA, NA, NA), 53362306a36Sopenharmony_ci PINGROUP(29, mi2s, NA, NA, NA, NA, NA, NA, NA, NA, NA), 53462306a36Sopenharmony_ci PINGROUP(30, mi2s, NA, NA, NA, NA, NA, NA, NA, NA, NA), 53562306a36Sopenharmony_ci PINGROUP(31, mi2s, NA, gsbi5_spi_cs2, gsbi6_spi_cs2, gsbi7_spi_cs2, NA, NA, NA, NA, NA), 53662306a36Sopenharmony_ci PINGROUP(32, mi2s, gp_clk_2a, NA, NA, NA, gsbi5_spi_cs3, gsbi6_spi_cs3, gsbi7_spi_cs3, NA, NA), 53762306a36Sopenharmony_ci PINGROUP(33, mi2s, NA, NA, NA, NA, NA, NA, NA, NA, NA), 53862306a36Sopenharmony_ci PINGROUP(34, codec_mic_i2s, gp_clk_0b, NA, NA, NA, NA, NA, NA, NA, NA), 53962306a36Sopenharmony_ci PINGROUP(35, codec_mic_i2s, NA, NA, NA, NA, NA, NA, NA, NA, NA), 54062306a36Sopenharmony_ci PINGROUP(36, codec_mic_i2s, NA, NA, NA, NA, NA, NA, NA, NA, NA), 54162306a36Sopenharmony_ci PINGROUP(37, codec_mic_i2s, NA, NA, NA, NA, NA, NA, NA, NA, NA), 54262306a36Sopenharmony_ci PINGROUP(38, codec_mic_i2s, NA, NA, NA, NA, NA, NA, NA, NA, NA), 54362306a36Sopenharmony_ci PINGROUP(39, codec_spkr_i2s, NA, NA, NA, NA, NA, NA, NA, NA, NA), 54462306a36Sopenharmony_ci PINGROUP(40, slimbus, codec_spkr_i2s, NA, NA, NA, NA, NA, NA, NA, NA), 54562306a36Sopenharmony_ci PINGROUP(41, slimbus, codec_spkr_i2s, NA, NA, NA, NA, NA, NA, NA, NA), 54662306a36Sopenharmony_ci PINGROUP(42, codec_spkr_i2s, NA, NA, NA, NA, NA, NA, NA, NA, NA), 54762306a36Sopenharmony_ci PINGROUP(43, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), 54862306a36Sopenharmony_ci PINGROUP(44, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), 54962306a36Sopenharmony_ci PINGROUP(45, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), 55062306a36Sopenharmony_ci PINGROUP(46, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), 55162306a36Sopenharmony_ci PINGROUP(47, spkr_i2s, gsbi5_spi_cs1, gsbi6_spi_cs1, gsbi7_spi_cs1, NA, NA, NA, NA, NA, NA), 55262306a36Sopenharmony_ci PINGROUP(48, spkr_i2s, NA, NA, NA, NA, NA, NA, NA, NA, NA), 55362306a36Sopenharmony_ci PINGROUP(49, spkr_i2s, NA, NA, NA, NA, NA, NA, NA, NA, NA), 55462306a36Sopenharmony_ci PINGROUP(50, spkr_i2s, gp_clk_1b, NA, NA, NA, NA, NA, NA, NA, NA), 55562306a36Sopenharmony_ci PINGROUP(51, NA, gsbi5, NA, NA, NA, NA, NA, NA, NA, NA), 55662306a36Sopenharmony_ci PINGROUP(52, NA, gsbi5, NA, NA, NA, NA, NA, NA, NA, NA), 55762306a36Sopenharmony_ci PINGROUP(53, NA, gsbi5, NA, NA, NA, NA, NA, NA, NA, NA), 55862306a36Sopenharmony_ci PINGROUP(54, NA, gsbi5, NA, NA, NA, NA, NA, NA, NA, NA), 55962306a36Sopenharmony_ci PINGROUP(55, tsif1, NA, NA, NA, NA, NA, NA, NA, NA, NA), 56062306a36Sopenharmony_ci PINGROUP(56, tsif1, NA, NA, NA, NA, NA, NA, NA, NA, NA), 56162306a36Sopenharmony_ci PINGROUP(57, tsif1, sdc2, NA, NA, NA, NA, NA, NA, NA, NA), 56262306a36Sopenharmony_ci PINGROUP(58, tsif2, sdc2, NA, NA, NA, NA, NA, NA, NA, NA), 56362306a36Sopenharmony_ci PINGROUP(59, tsif2, sdc2, NA, NA, NA, NA, NA, NA, NA, NA), 56462306a36Sopenharmony_ci PINGROUP(60, tsif2, sdc2, NA, NA, NA, NA, NA, NA, NA, NA), 56562306a36Sopenharmony_ci PINGROUP(61, NA, sdc2, NA, NA, NA, NA, NA, NA, NA, NA), 56662306a36Sopenharmony_ci PINGROUP(62, NA, sdc2, NA, NA, NA, NA, NA, NA, NA, NA), 56762306a36Sopenharmony_ci PINGROUP(63, NA, sdc4, NA, NA, NA, NA, NA, NA, NA, NA), 56862306a36Sopenharmony_ci PINGROUP(64, riva_wlan, sdc4, NA, NA, NA, NA, NA, NA, NA, NA), 56962306a36Sopenharmony_ci PINGROUP(65, riva_wlan, sdc4, NA, NA, NA, NA, NA, NA, NA, NA), 57062306a36Sopenharmony_ci PINGROUP(66, riva_wlan, sdc4, NA, NA, NA, NA, NA, NA, NA, NA), 57162306a36Sopenharmony_ci PINGROUP(67, riva_wlan, sdc4, NA, NA, NA, NA, NA, NA, NA, NA), 57262306a36Sopenharmony_ci PINGROUP(68, riva_wlan, sdc4, NA, NA, NA, NA, NA, NA, NA, NA), 57362306a36Sopenharmony_ci PINGROUP(69, hdmi, NA, NA, NA, NA, NA, NA, NA, NA, NA), 57462306a36Sopenharmony_ci PINGROUP(70, hdmi, NA, NA, NA, NA, NA, NA, NA, NA, NA), 57562306a36Sopenharmony_ci PINGROUP(71, hdmi, NA, NA, NA, NA, NA, NA, NA, NA, NA), 57662306a36Sopenharmony_ci PINGROUP(72, hdmi, NA, NA, NA, NA, NA, NA, NA, NA, NA), 57762306a36Sopenharmony_ci PINGROUP(73, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), 57862306a36Sopenharmony_ci PINGROUP(74, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), 57962306a36Sopenharmony_ci PINGROUP(75, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), 58062306a36Sopenharmony_ci PINGROUP(76, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), 58162306a36Sopenharmony_ci PINGROUP(77, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), 58262306a36Sopenharmony_ci PINGROUP(78, ps_hold, NA, NA, NA, NA, NA, NA, NA, NA, NA), 58362306a36Sopenharmony_ci PINGROUP(79, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), 58462306a36Sopenharmony_ci PINGROUP(80, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), 58562306a36Sopenharmony_ci PINGROUP(81, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), 58662306a36Sopenharmony_ci PINGROUP(82, NA, gsbi7, NA, NA, NA, NA, NA, NA, NA, NA), 58762306a36Sopenharmony_ci PINGROUP(83, gsbi7, NA, NA, NA, NA, NA, NA, NA, NA, NA), 58862306a36Sopenharmony_ci PINGROUP(84, NA, gsbi7, NA, NA, NA, NA, NA, NA, NA, NA), 58962306a36Sopenharmony_ci PINGROUP(85, NA, NA, gsbi7, NA, NA, NA, NA, NA, NA, NA), 59062306a36Sopenharmony_ci PINGROUP(86, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), 59162306a36Sopenharmony_ci PINGROUP(87, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), 59262306a36Sopenharmony_ci PINGROUP(88, usb2_hsic, NA, NA, NA, NA, NA, NA, NA, NA, NA), 59362306a36Sopenharmony_ci PINGROUP(89, usb2_hsic, NA, NA, NA, NA, NA, NA, NA, NA, NA), 59462306a36Sopenharmony_ci 59562306a36Sopenharmony_ci SDC_PINGROUP(sdc1_clk, 0x20a0, 13, 6), 59662306a36Sopenharmony_ci SDC_PINGROUP(sdc1_cmd, 0x20a0, 11, 3), 59762306a36Sopenharmony_ci SDC_PINGROUP(sdc1_data, 0x20a0, 9, 0), 59862306a36Sopenharmony_ci 59962306a36Sopenharmony_ci SDC_PINGROUP(sdc3_clk, 0x20a4, 14, 6), 60062306a36Sopenharmony_ci SDC_PINGROUP(sdc3_cmd, 0x20a4, 11, 3), 60162306a36Sopenharmony_ci SDC_PINGROUP(sdc3_data, 0x20a4, 9, 0), 60262306a36Sopenharmony_ci}; 60362306a36Sopenharmony_ci 60462306a36Sopenharmony_ci#define NUM_GPIO_PINGROUPS 90 60562306a36Sopenharmony_ci 60662306a36Sopenharmony_cistatic const struct msm_pinctrl_soc_data apq8064_pinctrl = { 60762306a36Sopenharmony_ci .pins = apq8064_pins, 60862306a36Sopenharmony_ci .npins = ARRAY_SIZE(apq8064_pins), 60962306a36Sopenharmony_ci .functions = apq8064_functions, 61062306a36Sopenharmony_ci .nfunctions = ARRAY_SIZE(apq8064_functions), 61162306a36Sopenharmony_ci .groups = apq8064_groups, 61262306a36Sopenharmony_ci .ngroups = ARRAY_SIZE(apq8064_groups), 61362306a36Sopenharmony_ci .ngpios = NUM_GPIO_PINGROUPS, 61462306a36Sopenharmony_ci}; 61562306a36Sopenharmony_ci 61662306a36Sopenharmony_cistatic int apq8064_pinctrl_probe(struct platform_device *pdev) 61762306a36Sopenharmony_ci{ 61862306a36Sopenharmony_ci return msm_pinctrl_probe(pdev, &apq8064_pinctrl); 61962306a36Sopenharmony_ci} 62062306a36Sopenharmony_ci 62162306a36Sopenharmony_cistatic const struct of_device_id apq8064_pinctrl_of_match[] = { 62262306a36Sopenharmony_ci { .compatible = "qcom,apq8064-pinctrl", }, 62362306a36Sopenharmony_ci { }, 62462306a36Sopenharmony_ci}; 62562306a36Sopenharmony_ci 62662306a36Sopenharmony_cistatic struct platform_driver apq8064_pinctrl_driver = { 62762306a36Sopenharmony_ci .driver = { 62862306a36Sopenharmony_ci .name = "apq8064-pinctrl", 62962306a36Sopenharmony_ci .of_match_table = apq8064_pinctrl_of_match, 63062306a36Sopenharmony_ci }, 63162306a36Sopenharmony_ci .probe = apq8064_pinctrl_probe, 63262306a36Sopenharmony_ci .remove = msm_pinctrl_remove, 63362306a36Sopenharmony_ci}; 63462306a36Sopenharmony_ci 63562306a36Sopenharmony_cistatic int __init apq8064_pinctrl_init(void) 63662306a36Sopenharmony_ci{ 63762306a36Sopenharmony_ci return platform_driver_register(&apq8064_pinctrl_driver); 63862306a36Sopenharmony_ci} 63962306a36Sopenharmony_ciarch_initcall(apq8064_pinctrl_init); 64062306a36Sopenharmony_ci 64162306a36Sopenharmony_cistatic void __exit apq8064_pinctrl_exit(void) 64262306a36Sopenharmony_ci{ 64362306a36Sopenharmony_ci platform_driver_unregister(&apq8064_pinctrl_driver); 64462306a36Sopenharmony_ci} 64562306a36Sopenharmony_cimodule_exit(apq8064_pinctrl_exit); 64662306a36Sopenharmony_ci 64762306a36Sopenharmony_ciMODULE_AUTHOR("Bjorn Andersson <bjorn.andersson@sonymobile.com>"); 64862306a36Sopenharmony_ciMODULE_DESCRIPTION("Qualcomm APQ8064 pinctrl driver"); 64962306a36Sopenharmony_ciMODULE_LICENSE("GPL v2"); 65062306a36Sopenharmony_ciMODULE_DEVICE_TABLE(of, apq8064_pinctrl_of_match); 651