162306a36Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0-only 262306a36Sopenharmony_ci/* 362306a36Sopenharmony_ci * Copyright (c) 2014, The Linux Foundation. All rights reserved. 462306a36Sopenharmony_ci */ 562306a36Sopenharmony_ci 662306a36Sopenharmony_ci#include <linux/module.h> 762306a36Sopenharmony_ci#include <linux/of.h> 862306a36Sopenharmony_ci#include <linux/platform_device.h> 962306a36Sopenharmony_ci 1062306a36Sopenharmony_ci#include "pinctrl-msm.h" 1162306a36Sopenharmony_ci 1262306a36Sopenharmony_cistatic const struct pinctrl_pin_desc ipq8064_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 8362306a36Sopenharmony_ci PINCTRL_PIN(69, "SDC3_CLK"), 8462306a36Sopenharmony_ci PINCTRL_PIN(70, "SDC3_CMD"), 8562306a36Sopenharmony_ci PINCTRL_PIN(71, "SDC3_DATA"), 8662306a36Sopenharmony_ci}; 8762306a36Sopenharmony_ci 8862306a36Sopenharmony_ci#define DECLARE_IPQ_GPIO_PINS(pin) static const unsigned int gpio##pin##_pins[] = { pin } 8962306a36Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(0); 9062306a36Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(1); 9162306a36Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(2); 9262306a36Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(3); 9362306a36Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(4); 9462306a36Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(5); 9562306a36Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(6); 9662306a36Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(7); 9762306a36Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(8); 9862306a36Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(9); 9962306a36Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(10); 10062306a36Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(11); 10162306a36Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(12); 10262306a36Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(13); 10362306a36Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(14); 10462306a36Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(15); 10562306a36Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(16); 10662306a36Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(17); 10762306a36Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(18); 10862306a36Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(19); 10962306a36Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(20); 11062306a36Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(21); 11162306a36Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(22); 11262306a36Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(23); 11362306a36Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(24); 11462306a36Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(25); 11562306a36Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(26); 11662306a36Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(27); 11762306a36Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(28); 11862306a36Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(29); 11962306a36Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(30); 12062306a36Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(31); 12162306a36Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(32); 12262306a36Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(33); 12362306a36Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(34); 12462306a36Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(35); 12562306a36Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(36); 12662306a36Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(37); 12762306a36Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(38); 12862306a36Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(39); 12962306a36Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(40); 13062306a36Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(41); 13162306a36Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(42); 13262306a36Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(43); 13362306a36Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(44); 13462306a36Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(45); 13562306a36Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(46); 13662306a36Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(47); 13762306a36Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(48); 13862306a36Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(49); 13962306a36Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(50); 14062306a36Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(51); 14162306a36Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(52); 14262306a36Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(53); 14362306a36Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(54); 14462306a36Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(55); 14562306a36Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(56); 14662306a36Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(57); 14762306a36Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(58); 14862306a36Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(59); 14962306a36Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(60); 15062306a36Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(61); 15162306a36Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(62); 15262306a36Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(63); 15362306a36Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(64); 15462306a36Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(65); 15562306a36Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(66); 15662306a36Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(67); 15762306a36Sopenharmony_ciDECLARE_IPQ_GPIO_PINS(68); 15862306a36Sopenharmony_ci 15962306a36Sopenharmony_cistatic const unsigned int sdc3_clk_pins[] = { 69 }; 16062306a36Sopenharmony_cistatic const unsigned int sdc3_cmd_pins[] = { 70 }; 16162306a36Sopenharmony_cistatic const unsigned int sdc3_data_pins[] = { 71 }; 16262306a36Sopenharmony_ci 16362306a36Sopenharmony_ci#define PINGROUP(id, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10) \ 16462306a36Sopenharmony_ci { \ 16562306a36Sopenharmony_ci .grp = PINCTRL_PINGROUP("gpio" #id, \ 16662306a36Sopenharmony_ci gpio##id##_pins, \ 16762306a36Sopenharmony_ci ARRAY_SIZE(gpio##id##_pins)), \ 16862306a36Sopenharmony_ci .funcs = (int[]){ \ 16962306a36Sopenharmony_ci IPQ_MUX_gpio, \ 17062306a36Sopenharmony_ci IPQ_MUX_##f1, \ 17162306a36Sopenharmony_ci IPQ_MUX_##f2, \ 17262306a36Sopenharmony_ci IPQ_MUX_##f3, \ 17362306a36Sopenharmony_ci IPQ_MUX_##f4, \ 17462306a36Sopenharmony_ci IPQ_MUX_##f5, \ 17562306a36Sopenharmony_ci IPQ_MUX_##f6, \ 17662306a36Sopenharmony_ci IPQ_MUX_##f7, \ 17762306a36Sopenharmony_ci IPQ_MUX_##f8, \ 17862306a36Sopenharmony_ci IPQ_MUX_##f9, \ 17962306a36Sopenharmony_ci IPQ_MUX_##f10, \ 18062306a36Sopenharmony_ci }, \ 18162306a36Sopenharmony_ci .nfuncs = 11, \ 18262306a36Sopenharmony_ci .ctl_reg = 0x1000 + 0x10 * id, \ 18362306a36Sopenharmony_ci .io_reg = 0x1004 + 0x10 * id, \ 18462306a36Sopenharmony_ci .intr_cfg_reg = 0x1008 + 0x10 * id, \ 18562306a36Sopenharmony_ci .intr_status_reg = 0x100c + 0x10 * id, \ 18662306a36Sopenharmony_ci .intr_target_reg = 0x400 + 0x4 * id, \ 18762306a36Sopenharmony_ci .mux_bit = 2, \ 18862306a36Sopenharmony_ci .pull_bit = 0, \ 18962306a36Sopenharmony_ci .drv_bit = 6, \ 19062306a36Sopenharmony_ci .oe_bit = 9, \ 19162306a36Sopenharmony_ci .in_bit = 0, \ 19262306a36Sopenharmony_ci .out_bit = 1, \ 19362306a36Sopenharmony_ci .intr_enable_bit = 0, \ 19462306a36Sopenharmony_ci .intr_status_bit = 0, \ 19562306a36Sopenharmony_ci .intr_ack_high = 1, \ 19662306a36Sopenharmony_ci .intr_target_bit = 0, \ 19762306a36Sopenharmony_ci .intr_target_kpss_val = 4, \ 19862306a36Sopenharmony_ci .intr_raw_status_bit = 3, \ 19962306a36Sopenharmony_ci .intr_polarity_bit = 1, \ 20062306a36Sopenharmony_ci .intr_detection_bit = 2, \ 20162306a36Sopenharmony_ci .intr_detection_width = 1, \ 20262306a36Sopenharmony_ci } 20362306a36Sopenharmony_ci 20462306a36Sopenharmony_ci#define SDC_PINGROUP(pg_name, ctl, pull, drv) \ 20562306a36Sopenharmony_ci { \ 20662306a36Sopenharmony_ci .grp = PINCTRL_PINGROUP(#pg_name, \ 20762306a36Sopenharmony_ci pg_name##_pins, \ 20862306a36Sopenharmony_ci ARRAY_SIZE(pg_name##_pins)), \ 20962306a36Sopenharmony_ci .ctl_reg = ctl, \ 21062306a36Sopenharmony_ci .io_reg = 0, \ 21162306a36Sopenharmony_ci .intr_cfg_reg = 0, \ 21262306a36Sopenharmony_ci .intr_status_reg = 0, \ 21362306a36Sopenharmony_ci .intr_target_reg = 0, \ 21462306a36Sopenharmony_ci .mux_bit = -1, \ 21562306a36Sopenharmony_ci .pull_bit = pull, \ 21662306a36Sopenharmony_ci .drv_bit = drv, \ 21762306a36Sopenharmony_ci .oe_bit = -1, \ 21862306a36Sopenharmony_ci .in_bit = -1, \ 21962306a36Sopenharmony_ci .out_bit = -1, \ 22062306a36Sopenharmony_ci .intr_enable_bit = -1, \ 22162306a36Sopenharmony_ci .intr_status_bit = -1, \ 22262306a36Sopenharmony_ci .intr_target_bit = -1, \ 22362306a36Sopenharmony_ci .intr_target_kpss_val = -1, \ 22462306a36Sopenharmony_ci .intr_raw_status_bit = -1, \ 22562306a36Sopenharmony_ci .intr_polarity_bit = -1, \ 22662306a36Sopenharmony_ci .intr_detection_bit = -1, \ 22762306a36Sopenharmony_ci .intr_detection_width = -1, \ 22862306a36Sopenharmony_ci } 22962306a36Sopenharmony_ci 23062306a36Sopenharmony_cienum ipq8064_functions { 23162306a36Sopenharmony_ci IPQ_MUX_gpio, 23262306a36Sopenharmony_ci IPQ_MUX_mdio, 23362306a36Sopenharmony_ci IPQ_MUX_mi2s, 23462306a36Sopenharmony_ci IPQ_MUX_pdm, 23562306a36Sopenharmony_ci IPQ_MUX_ssbi, 23662306a36Sopenharmony_ci IPQ_MUX_spmi, 23762306a36Sopenharmony_ci IPQ_MUX_audio_pcm, 23862306a36Sopenharmony_ci IPQ_MUX_gsbi1, 23962306a36Sopenharmony_ci IPQ_MUX_gsbi2, 24062306a36Sopenharmony_ci IPQ_MUX_gsbi4, 24162306a36Sopenharmony_ci IPQ_MUX_gsbi5, 24262306a36Sopenharmony_ci IPQ_MUX_gsbi5_spi_cs1, 24362306a36Sopenharmony_ci IPQ_MUX_gsbi5_spi_cs2, 24462306a36Sopenharmony_ci IPQ_MUX_gsbi5_spi_cs3, 24562306a36Sopenharmony_ci IPQ_MUX_gsbi6, 24662306a36Sopenharmony_ci IPQ_MUX_gsbi7, 24762306a36Sopenharmony_ci IPQ_MUX_nss_spi, 24862306a36Sopenharmony_ci IPQ_MUX_sdc1, 24962306a36Sopenharmony_ci IPQ_MUX_spdif, 25062306a36Sopenharmony_ci IPQ_MUX_nand, 25162306a36Sopenharmony_ci IPQ_MUX_tsif1, 25262306a36Sopenharmony_ci IPQ_MUX_tsif2, 25362306a36Sopenharmony_ci IPQ_MUX_usb_fs_n, 25462306a36Sopenharmony_ci IPQ_MUX_usb_fs, 25562306a36Sopenharmony_ci IPQ_MUX_usb2_hsic, 25662306a36Sopenharmony_ci IPQ_MUX_rgmii2, 25762306a36Sopenharmony_ci IPQ_MUX_sata, 25862306a36Sopenharmony_ci IPQ_MUX_pcie1_rst, 25962306a36Sopenharmony_ci IPQ_MUX_pcie1_prsnt, 26062306a36Sopenharmony_ci IPQ_MUX_pcie1_pwrflt, 26162306a36Sopenharmony_ci IPQ_MUX_pcie1_pwren_n, 26262306a36Sopenharmony_ci IPQ_MUX_pcie1_pwren, 26362306a36Sopenharmony_ci IPQ_MUX_pcie1_clk_req, 26462306a36Sopenharmony_ci IPQ_MUX_pcie2_rst, 26562306a36Sopenharmony_ci IPQ_MUX_pcie2_prsnt, 26662306a36Sopenharmony_ci IPQ_MUX_pcie2_pwrflt, 26762306a36Sopenharmony_ci IPQ_MUX_pcie2_pwren_n, 26862306a36Sopenharmony_ci IPQ_MUX_pcie2_pwren, 26962306a36Sopenharmony_ci IPQ_MUX_pcie2_clk_req, 27062306a36Sopenharmony_ci IPQ_MUX_pcie3_rst, 27162306a36Sopenharmony_ci IPQ_MUX_pcie3_prsnt, 27262306a36Sopenharmony_ci IPQ_MUX_pcie3_pwrflt, 27362306a36Sopenharmony_ci IPQ_MUX_pcie3_pwren_n, 27462306a36Sopenharmony_ci IPQ_MUX_pcie3_pwren, 27562306a36Sopenharmony_ci IPQ_MUX_pcie3_clk_req, 27662306a36Sopenharmony_ci IPQ_MUX_ps_hold, 27762306a36Sopenharmony_ci IPQ_MUX_NA, 27862306a36Sopenharmony_ci}; 27962306a36Sopenharmony_ci 28062306a36Sopenharmony_cistatic const char * const gpio_groups[] = { 28162306a36Sopenharmony_ci "gpio0", "gpio1", "gpio2", "gpio3", "gpio4", "gpio5", "gpio6", "gpio7", 28262306a36Sopenharmony_ci "gpio8", "gpio9", "gpio10", "gpio11", "gpio12", "gpio13", "gpio14", 28362306a36Sopenharmony_ci "gpio15", "gpio16", "gpio17", "gpio18", "gpio19", "gpio20", "gpio21", 28462306a36Sopenharmony_ci "gpio22", "gpio23", "gpio24", "gpio25", "gpio26", "gpio27", "gpio28", 28562306a36Sopenharmony_ci "gpio29", "gpio30", "gpio31", "gpio32", "gpio33", "gpio34", "gpio35", 28662306a36Sopenharmony_ci "gpio36", "gpio37", "gpio38", "gpio39", "gpio40", "gpio41", "gpio42", 28762306a36Sopenharmony_ci "gpio43", "gpio44", "gpio45", "gpio46", "gpio47", "gpio48", "gpio49", 28862306a36Sopenharmony_ci "gpio50", "gpio51", "gpio52", "gpio53", "gpio54", "gpio55", "gpio56", 28962306a36Sopenharmony_ci "gpio57", "gpio58", "gpio59", "gpio60", "gpio61", "gpio62", "gpio63", 29062306a36Sopenharmony_ci "gpio64", "gpio65", "gpio66", "gpio67", "gpio68" 29162306a36Sopenharmony_ci}; 29262306a36Sopenharmony_ci 29362306a36Sopenharmony_cistatic const char * const mdio_groups[] = { 29462306a36Sopenharmony_ci "gpio0", "gpio1", "gpio2", "gpio10", "gpio11", "gpio66", 29562306a36Sopenharmony_ci}; 29662306a36Sopenharmony_ci 29762306a36Sopenharmony_cistatic const char * const mi2s_groups[] = { 29862306a36Sopenharmony_ci "gpio27", "gpio28", "gpio29", "gpio30", "gpio31", "gpio32", 29962306a36Sopenharmony_ci "gpio33", "gpio55", "gpio56", "gpio57", "gpio58", 30062306a36Sopenharmony_ci}; 30162306a36Sopenharmony_ci 30262306a36Sopenharmony_cistatic const char * const pdm_groups[] = { 30362306a36Sopenharmony_ci "gpio3", "gpio16", "gpio17", "gpio22", "gpio30", "gpio31", 30462306a36Sopenharmony_ci "gpio34", "gpio35", "gpio52", "gpio55", "gpio56", "gpio58", 30562306a36Sopenharmony_ci "gpio59", 30662306a36Sopenharmony_ci}; 30762306a36Sopenharmony_ci 30862306a36Sopenharmony_cistatic const char * const ssbi_groups[] = { 30962306a36Sopenharmony_ci "gpio10", "gpio11", 31062306a36Sopenharmony_ci}; 31162306a36Sopenharmony_ci 31262306a36Sopenharmony_cistatic const char * const spmi_groups[] = { 31362306a36Sopenharmony_ci "gpio10", "gpio11", 31462306a36Sopenharmony_ci}; 31562306a36Sopenharmony_ci 31662306a36Sopenharmony_cistatic const char * const audio_pcm_groups[] = { 31762306a36Sopenharmony_ci "gpio14", "gpio15", "gpio16", "gpio17", 31862306a36Sopenharmony_ci}; 31962306a36Sopenharmony_ci 32062306a36Sopenharmony_cistatic const char * const gsbi1_groups[] = { 32162306a36Sopenharmony_ci "gpio51", "gpio52", "gpio53", "gpio54", 32262306a36Sopenharmony_ci}; 32362306a36Sopenharmony_ci 32462306a36Sopenharmony_cistatic const char * const gsbi2_groups[] = { 32562306a36Sopenharmony_ci "gpio22", "gpio23", "gpio24", "gpio25", 32662306a36Sopenharmony_ci}; 32762306a36Sopenharmony_ci 32862306a36Sopenharmony_cistatic const char * const gsbi4_groups[] = { 32962306a36Sopenharmony_ci "gpio10", "gpio11", "gpio12", "gpio13", 33062306a36Sopenharmony_ci}; 33162306a36Sopenharmony_ci 33262306a36Sopenharmony_cistatic const char * const gsbi5_groups[] = { 33362306a36Sopenharmony_ci "gpio18", "gpio19", "gpio20", "gpio21", 33462306a36Sopenharmony_ci}; 33562306a36Sopenharmony_ci 33662306a36Sopenharmony_cistatic const char * const gsbi5_spi_cs1_groups[] = { 33762306a36Sopenharmony_ci "gpio6", "gpio61", 33862306a36Sopenharmony_ci}; 33962306a36Sopenharmony_ci 34062306a36Sopenharmony_cistatic const char * const gsbi5_spi_cs2_groups[] = { 34162306a36Sopenharmony_ci "gpio7", "gpio62", 34262306a36Sopenharmony_ci}; 34362306a36Sopenharmony_ci 34462306a36Sopenharmony_cistatic const char * const gsbi5_spi_cs3_groups[] = { 34562306a36Sopenharmony_ci "gpio2", 34662306a36Sopenharmony_ci}; 34762306a36Sopenharmony_ci 34862306a36Sopenharmony_cistatic const char * const gsbi6_groups[] = { 34962306a36Sopenharmony_ci "gpio27", "gpio28", "gpio29", "gpio30", "gpio55", "gpio56", 35062306a36Sopenharmony_ci "gpio57", "gpio58", 35162306a36Sopenharmony_ci}; 35262306a36Sopenharmony_ci 35362306a36Sopenharmony_cistatic const char * const gsbi7_groups[] = { 35462306a36Sopenharmony_ci "gpio6", "gpio7", "gpio8", "gpio9", 35562306a36Sopenharmony_ci}; 35662306a36Sopenharmony_ci 35762306a36Sopenharmony_cistatic const char * const nss_spi_groups[] = { 35862306a36Sopenharmony_ci "gpio14", "gpio15", "gpio16", "gpio17", "gpio55", "gpio56", 35962306a36Sopenharmony_ci "gpio57", "gpio58", 36062306a36Sopenharmony_ci}; 36162306a36Sopenharmony_ci 36262306a36Sopenharmony_cistatic const char * const sdc1_groups[] = { 36362306a36Sopenharmony_ci "gpio38", "gpio39", "gpio40", "gpio41", "gpio42", "gpio43", 36462306a36Sopenharmony_ci "gpio44", "gpio45", "gpio46", "gpio47", 36562306a36Sopenharmony_ci}; 36662306a36Sopenharmony_ci 36762306a36Sopenharmony_cistatic const char * const spdif_groups[] = { 36862306a36Sopenharmony_ci "gpio10", "gpio48", 36962306a36Sopenharmony_ci}; 37062306a36Sopenharmony_ci 37162306a36Sopenharmony_cistatic const char * const nand_groups[] = { 37262306a36Sopenharmony_ci "gpio34", "gpio35", "gpio36", "gpio37", "gpio38", "gpio39", 37362306a36Sopenharmony_ci "gpio40", "gpio41", "gpio42", "gpio43", "gpio44", "gpio45", 37462306a36Sopenharmony_ci "gpio46", "gpio47", 37562306a36Sopenharmony_ci}; 37662306a36Sopenharmony_ci 37762306a36Sopenharmony_cistatic const char * const tsif1_groups[] = { 37862306a36Sopenharmony_ci "gpio55", "gpio56", "gpio57", "gpio58", 37962306a36Sopenharmony_ci}; 38062306a36Sopenharmony_ci 38162306a36Sopenharmony_cistatic const char * const tsif2_groups[] = { 38262306a36Sopenharmony_ci "gpio59", "gpio60", "gpio61", "gpio62", 38362306a36Sopenharmony_ci}; 38462306a36Sopenharmony_ci 38562306a36Sopenharmony_cistatic const char * const usb_fs_n_groups[] = { 38662306a36Sopenharmony_ci "gpio6", 38762306a36Sopenharmony_ci}; 38862306a36Sopenharmony_ci 38962306a36Sopenharmony_cistatic const char * const usb_fs_groups[] = { 39062306a36Sopenharmony_ci "gpio6", "gpio7", "gpio8", 39162306a36Sopenharmony_ci}; 39262306a36Sopenharmony_ci 39362306a36Sopenharmony_cistatic const char * const usb2_hsic_groups[] = { 39462306a36Sopenharmony_ci "gpio67", "gpio68", 39562306a36Sopenharmony_ci}; 39662306a36Sopenharmony_ci 39762306a36Sopenharmony_cistatic const char * const rgmii2_groups[] = { 39862306a36Sopenharmony_ci "gpio2", "gpio27", "gpio28", "gpio29", "gpio30", "gpio31", "gpio32", 39962306a36Sopenharmony_ci "gpio51", "gpio52", "gpio59", "gpio60", "gpio61", "gpio62", "gpio66", 40062306a36Sopenharmony_ci}; 40162306a36Sopenharmony_ci 40262306a36Sopenharmony_cistatic const char * const sata_groups[] = { 40362306a36Sopenharmony_ci "gpio10", 40462306a36Sopenharmony_ci}; 40562306a36Sopenharmony_ci 40662306a36Sopenharmony_cistatic const char * const pcie1_rst_groups[] = { 40762306a36Sopenharmony_ci "gpio3", 40862306a36Sopenharmony_ci}; 40962306a36Sopenharmony_ci 41062306a36Sopenharmony_cistatic const char * const pcie1_prsnt_groups[] = { 41162306a36Sopenharmony_ci "gpio3", "gpio11", 41262306a36Sopenharmony_ci}; 41362306a36Sopenharmony_ci 41462306a36Sopenharmony_cistatic const char * const pcie1_pwren_n_groups[] = { 41562306a36Sopenharmony_ci "gpio4", "gpio12", 41662306a36Sopenharmony_ci}; 41762306a36Sopenharmony_ci 41862306a36Sopenharmony_cistatic const char * const pcie1_pwren_groups[] = { 41962306a36Sopenharmony_ci "gpio4", "gpio12", 42062306a36Sopenharmony_ci}; 42162306a36Sopenharmony_ci 42262306a36Sopenharmony_cistatic const char * const pcie1_pwrflt_groups[] = { 42362306a36Sopenharmony_ci "gpio5", "gpio13", 42462306a36Sopenharmony_ci}; 42562306a36Sopenharmony_ci 42662306a36Sopenharmony_cistatic const char * const pcie1_clk_req_groups[] = { 42762306a36Sopenharmony_ci "gpio5", 42862306a36Sopenharmony_ci}; 42962306a36Sopenharmony_ci 43062306a36Sopenharmony_cistatic const char * const pcie2_rst_groups[] = { 43162306a36Sopenharmony_ci "gpio48", 43262306a36Sopenharmony_ci}; 43362306a36Sopenharmony_ci 43462306a36Sopenharmony_cistatic const char * const pcie2_prsnt_groups[] = { 43562306a36Sopenharmony_ci "gpio11", "gpio48", 43662306a36Sopenharmony_ci}; 43762306a36Sopenharmony_ci 43862306a36Sopenharmony_cistatic const char * const pcie2_pwren_n_groups[] = { 43962306a36Sopenharmony_ci "gpio12", "gpio49", 44062306a36Sopenharmony_ci}; 44162306a36Sopenharmony_ci 44262306a36Sopenharmony_cistatic const char * const pcie2_pwren_groups[] = { 44362306a36Sopenharmony_ci "gpio12", "gpio49", 44462306a36Sopenharmony_ci}; 44562306a36Sopenharmony_ci 44662306a36Sopenharmony_cistatic const char * const pcie2_pwrflt_groups[] = { 44762306a36Sopenharmony_ci "gpio13", "gpio50", 44862306a36Sopenharmony_ci}; 44962306a36Sopenharmony_ci 45062306a36Sopenharmony_cistatic const char * const pcie2_clk_req_groups[] = { 45162306a36Sopenharmony_ci "gpio50", 45262306a36Sopenharmony_ci}; 45362306a36Sopenharmony_ci 45462306a36Sopenharmony_cistatic const char * const pcie3_rst_groups[] = { 45562306a36Sopenharmony_ci "gpio63", 45662306a36Sopenharmony_ci}; 45762306a36Sopenharmony_ci 45862306a36Sopenharmony_cistatic const char * const pcie3_prsnt_groups[] = { 45962306a36Sopenharmony_ci "gpio11", 46062306a36Sopenharmony_ci}; 46162306a36Sopenharmony_ci 46262306a36Sopenharmony_cistatic const char * const pcie3_pwren_n_groups[] = { 46362306a36Sopenharmony_ci "gpio12", 46462306a36Sopenharmony_ci}; 46562306a36Sopenharmony_ci 46662306a36Sopenharmony_cistatic const char * const pcie3_pwren_groups[] = { 46762306a36Sopenharmony_ci "gpio12", 46862306a36Sopenharmony_ci}; 46962306a36Sopenharmony_ci 47062306a36Sopenharmony_cistatic const char * const pcie3_pwrflt_groups[] = { 47162306a36Sopenharmony_ci "gpio13", 47262306a36Sopenharmony_ci}; 47362306a36Sopenharmony_ci 47462306a36Sopenharmony_cistatic const char * const pcie3_clk_req_groups[] = { 47562306a36Sopenharmony_ci "gpio65", 47662306a36Sopenharmony_ci}; 47762306a36Sopenharmony_ci 47862306a36Sopenharmony_cistatic const char * const ps_hold_groups[] = { 47962306a36Sopenharmony_ci "gpio26", 48062306a36Sopenharmony_ci}; 48162306a36Sopenharmony_ci 48262306a36Sopenharmony_cistatic const struct pinfunction ipq8064_functions[] = { 48362306a36Sopenharmony_ci IPQ_PIN_FUNCTION(gpio), 48462306a36Sopenharmony_ci IPQ_PIN_FUNCTION(mdio), 48562306a36Sopenharmony_ci IPQ_PIN_FUNCTION(ssbi), 48662306a36Sopenharmony_ci IPQ_PIN_FUNCTION(spmi), 48762306a36Sopenharmony_ci IPQ_PIN_FUNCTION(mi2s), 48862306a36Sopenharmony_ci IPQ_PIN_FUNCTION(pdm), 48962306a36Sopenharmony_ci IPQ_PIN_FUNCTION(audio_pcm), 49062306a36Sopenharmony_ci IPQ_PIN_FUNCTION(gsbi1), 49162306a36Sopenharmony_ci IPQ_PIN_FUNCTION(gsbi2), 49262306a36Sopenharmony_ci IPQ_PIN_FUNCTION(gsbi4), 49362306a36Sopenharmony_ci IPQ_PIN_FUNCTION(gsbi5), 49462306a36Sopenharmony_ci IPQ_PIN_FUNCTION(gsbi5_spi_cs1), 49562306a36Sopenharmony_ci IPQ_PIN_FUNCTION(gsbi5_spi_cs2), 49662306a36Sopenharmony_ci IPQ_PIN_FUNCTION(gsbi5_spi_cs3), 49762306a36Sopenharmony_ci IPQ_PIN_FUNCTION(gsbi6), 49862306a36Sopenharmony_ci IPQ_PIN_FUNCTION(gsbi7), 49962306a36Sopenharmony_ci IPQ_PIN_FUNCTION(nss_spi), 50062306a36Sopenharmony_ci IPQ_PIN_FUNCTION(sdc1), 50162306a36Sopenharmony_ci IPQ_PIN_FUNCTION(spdif), 50262306a36Sopenharmony_ci IPQ_PIN_FUNCTION(nand), 50362306a36Sopenharmony_ci IPQ_PIN_FUNCTION(tsif1), 50462306a36Sopenharmony_ci IPQ_PIN_FUNCTION(tsif2), 50562306a36Sopenharmony_ci IPQ_PIN_FUNCTION(usb_fs_n), 50662306a36Sopenharmony_ci IPQ_PIN_FUNCTION(usb_fs), 50762306a36Sopenharmony_ci IPQ_PIN_FUNCTION(usb2_hsic), 50862306a36Sopenharmony_ci IPQ_PIN_FUNCTION(rgmii2), 50962306a36Sopenharmony_ci IPQ_PIN_FUNCTION(sata), 51062306a36Sopenharmony_ci IPQ_PIN_FUNCTION(pcie1_rst), 51162306a36Sopenharmony_ci IPQ_PIN_FUNCTION(pcie1_prsnt), 51262306a36Sopenharmony_ci IPQ_PIN_FUNCTION(pcie1_pwren_n), 51362306a36Sopenharmony_ci IPQ_PIN_FUNCTION(pcie1_pwren), 51462306a36Sopenharmony_ci IPQ_PIN_FUNCTION(pcie1_pwrflt), 51562306a36Sopenharmony_ci IPQ_PIN_FUNCTION(pcie1_clk_req), 51662306a36Sopenharmony_ci IPQ_PIN_FUNCTION(pcie2_rst), 51762306a36Sopenharmony_ci IPQ_PIN_FUNCTION(pcie2_prsnt), 51862306a36Sopenharmony_ci IPQ_PIN_FUNCTION(pcie2_pwren_n), 51962306a36Sopenharmony_ci IPQ_PIN_FUNCTION(pcie2_pwren), 52062306a36Sopenharmony_ci IPQ_PIN_FUNCTION(pcie2_pwrflt), 52162306a36Sopenharmony_ci IPQ_PIN_FUNCTION(pcie2_clk_req), 52262306a36Sopenharmony_ci IPQ_PIN_FUNCTION(pcie3_rst), 52362306a36Sopenharmony_ci IPQ_PIN_FUNCTION(pcie3_prsnt), 52462306a36Sopenharmony_ci IPQ_PIN_FUNCTION(pcie3_pwren_n), 52562306a36Sopenharmony_ci IPQ_PIN_FUNCTION(pcie3_pwren), 52662306a36Sopenharmony_ci IPQ_PIN_FUNCTION(pcie3_pwrflt), 52762306a36Sopenharmony_ci IPQ_PIN_FUNCTION(pcie3_clk_req), 52862306a36Sopenharmony_ci IPQ_PIN_FUNCTION(ps_hold), 52962306a36Sopenharmony_ci}; 53062306a36Sopenharmony_ci 53162306a36Sopenharmony_cistatic const struct msm_pingroup ipq8064_groups[] = { 53262306a36Sopenharmony_ci PINGROUP(0, mdio, NA, NA, NA, NA, NA, NA, NA, NA, NA), 53362306a36Sopenharmony_ci PINGROUP(1, mdio, NA, NA, NA, NA, NA, NA, NA, NA, NA), 53462306a36Sopenharmony_ci PINGROUP(2, gsbi5_spi_cs3, rgmii2, mdio, NA, NA, NA, NA, NA, NA, NA), 53562306a36Sopenharmony_ci PINGROUP(3, pcie1_rst, pcie1_prsnt, pdm, NA, NA, NA, NA, NA, NA, NA), 53662306a36Sopenharmony_ci PINGROUP(4, pcie1_pwren_n, pcie1_pwren, NA, NA, NA, NA, NA, NA, NA, NA), 53762306a36Sopenharmony_ci PINGROUP(5, pcie1_clk_req, pcie1_pwrflt, NA, NA, NA, NA, NA, NA, NA, NA), 53862306a36Sopenharmony_ci PINGROUP(6, gsbi7, usb_fs, gsbi5_spi_cs1, usb_fs_n, NA, NA, NA, NA, NA, NA), 53962306a36Sopenharmony_ci PINGROUP(7, gsbi7, usb_fs, gsbi5_spi_cs2, NA, NA, NA, NA, NA, NA, NA), 54062306a36Sopenharmony_ci PINGROUP(8, gsbi7, usb_fs, NA, NA, NA, NA, NA, NA, NA, NA), 54162306a36Sopenharmony_ci PINGROUP(9, gsbi7, NA, NA, NA, NA, NA, NA, NA, NA, NA), 54262306a36Sopenharmony_ci PINGROUP(10, gsbi4, spdif, sata, ssbi, mdio, spmi, NA, NA, NA, NA), 54362306a36Sopenharmony_ci PINGROUP(11, gsbi4, pcie2_prsnt, pcie1_prsnt, pcie3_prsnt, ssbi, mdio, spmi, NA, NA, NA), 54462306a36Sopenharmony_ci PINGROUP(12, gsbi4, pcie2_pwren_n, pcie1_pwren_n, pcie3_pwren_n, pcie2_pwren, pcie1_pwren, pcie3_pwren, NA, NA, NA), 54562306a36Sopenharmony_ci PINGROUP(13, gsbi4, pcie2_pwrflt, pcie1_pwrflt, pcie3_pwrflt, NA, NA, NA, NA, NA, NA), 54662306a36Sopenharmony_ci PINGROUP(14, audio_pcm, nss_spi, NA, NA, NA, NA, NA, NA, NA, NA), 54762306a36Sopenharmony_ci PINGROUP(15, audio_pcm, nss_spi, NA, NA, NA, NA, NA, NA, NA, NA), 54862306a36Sopenharmony_ci PINGROUP(16, audio_pcm, nss_spi, pdm, NA, NA, NA, NA, NA, NA, NA), 54962306a36Sopenharmony_ci PINGROUP(17, audio_pcm, nss_spi, pdm, NA, NA, NA, NA, NA, NA, NA), 55062306a36Sopenharmony_ci PINGROUP(18, gsbi5, NA, NA, NA, NA, NA, NA, NA, NA, NA), 55162306a36Sopenharmony_ci PINGROUP(19, gsbi5, NA, NA, NA, NA, NA, NA, NA, NA, NA), 55262306a36Sopenharmony_ci PINGROUP(20, gsbi5, NA, NA, NA, NA, NA, NA, NA, NA, NA), 55362306a36Sopenharmony_ci PINGROUP(21, gsbi5, NA, NA, NA, NA, NA, NA, NA, NA, NA), 55462306a36Sopenharmony_ci PINGROUP(22, gsbi2, pdm, NA, NA, NA, NA, NA, NA, NA, NA), 55562306a36Sopenharmony_ci PINGROUP(23, gsbi2, NA, NA, NA, NA, NA, NA, NA, NA, NA), 55662306a36Sopenharmony_ci PINGROUP(24, gsbi2, NA, NA, NA, NA, NA, NA, NA, NA, NA), 55762306a36Sopenharmony_ci PINGROUP(25, gsbi2, NA, NA, NA, NA, NA, NA, NA, NA, NA), 55862306a36Sopenharmony_ci PINGROUP(26, ps_hold, NA, NA, NA, NA, NA, NA, NA, NA, NA), 55962306a36Sopenharmony_ci PINGROUP(27, mi2s, rgmii2, gsbi6, NA, NA, NA, NA, NA, NA, NA), 56062306a36Sopenharmony_ci PINGROUP(28, mi2s, rgmii2, gsbi6, NA, NA, NA, NA, NA, NA, NA), 56162306a36Sopenharmony_ci PINGROUP(29, mi2s, rgmii2, gsbi6, NA, NA, NA, NA, NA, NA, NA), 56262306a36Sopenharmony_ci PINGROUP(30, mi2s, rgmii2, gsbi6, pdm, NA, NA, NA, NA, NA, NA), 56362306a36Sopenharmony_ci PINGROUP(31, mi2s, rgmii2, pdm, NA, NA, NA, NA, NA, NA, NA), 56462306a36Sopenharmony_ci PINGROUP(32, mi2s, rgmii2, NA, NA, NA, NA, NA, NA, NA, NA), 56562306a36Sopenharmony_ci PINGROUP(33, mi2s, NA, NA, NA, NA, NA, NA, NA, NA, NA), 56662306a36Sopenharmony_ci PINGROUP(34, nand, pdm, NA, NA, NA, NA, NA, NA, NA, NA), 56762306a36Sopenharmony_ci PINGROUP(35, nand, pdm, NA, NA, NA, NA, NA, NA, NA, NA), 56862306a36Sopenharmony_ci PINGROUP(36, nand, NA, NA, NA, NA, NA, NA, NA, NA, NA), 56962306a36Sopenharmony_ci PINGROUP(37, nand, NA, NA, NA, NA, NA, NA, NA, NA, NA), 57062306a36Sopenharmony_ci PINGROUP(38, nand, sdc1, NA, NA, NA, NA, NA, NA, NA, NA), 57162306a36Sopenharmony_ci PINGROUP(39, nand, sdc1, NA, NA, NA, NA, NA, NA, NA, NA), 57262306a36Sopenharmony_ci PINGROUP(40, nand, sdc1, NA, NA, NA, NA, NA, NA, NA, NA), 57362306a36Sopenharmony_ci PINGROUP(41, nand, sdc1, NA, NA, NA, NA, NA, NA, NA, NA), 57462306a36Sopenharmony_ci PINGROUP(42, nand, sdc1, NA, NA, NA, NA, NA, NA, NA, NA), 57562306a36Sopenharmony_ci PINGROUP(43, nand, sdc1, NA, NA, NA, NA, NA, NA, NA, NA), 57662306a36Sopenharmony_ci PINGROUP(44, nand, sdc1, NA, NA, NA, NA, NA, NA, NA, NA), 57762306a36Sopenharmony_ci PINGROUP(45, nand, sdc1, NA, NA, NA, NA, NA, NA, NA, NA), 57862306a36Sopenharmony_ci PINGROUP(46, nand, sdc1, NA, NA, NA, NA, NA, NA, NA, NA), 57962306a36Sopenharmony_ci PINGROUP(47, nand, sdc1, NA, NA, NA, NA, NA, NA, NA, NA), 58062306a36Sopenharmony_ci PINGROUP(48, pcie2_rst, spdif, NA, NA, NA, NA, NA, NA, NA, NA), 58162306a36Sopenharmony_ci PINGROUP(49, pcie2_pwren_n, pcie2_pwren, NA, NA, NA, NA, NA, NA, NA, NA), 58262306a36Sopenharmony_ci PINGROUP(50, pcie2_clk_req, pcie2_pwrflt, NA, NA, NA, NA, NA, NA, NA, NA), 58362306a36Sopenharmony_ci PINGROUP(51, gsbi1, rgmii2, NA, NA, NA, NA, NA, NA, NA, NA), 58462306a36Sopenharmony_ci PINGROUP(52, gsbi1, rgmii2, pdm, NA, NA, NA, NA, NA, NA, NA), 58562306a36Sopenharmony_ci PINGROUP(53, gsbi1, NA, NA, NA, NA, NA, NA, NA, NA, NA), 58662306a36Sopenharmony_ci PINGROUP(54, gsbi1, NA, NA, NA, NA, NA, NA, NA, NA, NA), 58762306a36Sopenharmony_ci PINGROUP(55, tsif1, mi2s, gsbi6, pdm, nss_spi, NA, NA, NA, NA, NA), 58862306a36Sopenharmony_ci PINGROUP(56, tsif1, mi2s, gsbi6, pdm, nss_spi, NA, NA, NA, NA, NA), 58962306a36Sopenharmony_ci PINGROUP(57, tsif1, mi2s, gsbi6, nss_spi, NA, NA, NA, NA, NA, NA), 59062306a36Sopenharmony_ci PINGROUP(58, tsif1, mi2s, gsbi6, pdm, nss_spi, NA, NA, NA, NA, NA), 59162306a36Sopenharmony_ci PINGROUP(59, tsif2, rgmii2, pdm, NA, NA, NA, NA, NA, NA, NA), 59262306a36Sopenharmony_ci PINGROUP(60, tsif2, rgmii2, NA, NA, NA, NA, NA, NA, NA, NA), 59362306a36Sopenharmony_ci PINGROUP(61, tsif2, rgmii2, gsbi5_spi_cs1, NA, NA, NA, NA, NA, NA, NA), 59462306a36Sopenharmony_ci PINGROUP(62, tsif2, rgmii2, gsbi5_spi_cs2, NA, NA, NA, NA, NA, NA, NA), 59562306a36Sopenharmony_ci PINGROUP(63, pcie3_rst, NA, NA, NA, NA, NA, NA, NA, NA, NA), 59662306a36Sopenharmony_ci PINGROUP(64, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), 59762306a36Sopenharmony_ci PINGROUP(65, pcie3_clk_req, NA, NA, NA, NA, NA, NA, NA, NA, NA), 59862306a36Sopenharmony_ci PINGROUP(66, rgmii2, mdio, NA, NA, NA, NA, NA, NA, NA, NA), 59962306a36Sopenharmony_ci PINGROUP(67, usb2_hsic, NA, NA, NA, NA, NA, NA, NA, NA, NA), 60062306a36Sopenharmony_ci PINGROUP(68, usb2_hsic, NA, NA, NA, NA, NA, NA, NA, NA, NA), 60162306a36Sopenharmony_ci SDC_PINGROUP(sdc3_clk, 0x204a, 14, 6), 60262306a36Sopenharmony_ci SDC_PINGROUP(sdc3_cmd, 0x204a, 11, 3), 60362306a36Sopenharmony_ci SDC_PINGROUP(sdc3_data, 0x204a, 9, 0), 60462306a36Sopenharmony_ci}; 60562306a36Sopenharmony_ci 60662306a36Sopenharmony_ci#define NUM_GPIO_PINGROUPS 69 60762306a36Sopenharmony_ci 60862306a36Sopenharmony_cistatic const struct msm_pinctrl_soc_data ipq8064_pinctrl = { 60962306a36Sopenharmony_ci .pins = ipq8064_pins, 61062306a36Sopenharmony_ci .npins = ARRAY_SIZE(ipq8064_pins), 61162306a36Sopenharmony_ci .functions = ipq8064_functions, 61262306a36Sopenharmony_ci .nfunctions = ARRAY_SIZE(ipq8064_functions), 61362306a36Sopenharmony_ci .groups = ipq8064_groups, 61462306a36Sopenharmony_ci .ngroups = ARRAY_SIZE(ipq8064_groups), 61562306a36Sopenharmony_ci .ngpios = NUM_GPIO_PINGROUPS, 61662306a36Sopenharmony_ci}; 61762306a36Sopenharmony_ci 61862306a36Sopenharmony_cistatic int ipq8064_pinctrl_probe(struct platform_device *pdev) 61962306a36Sopenharmony_ci{ 62062306a36Sopenharmony_ci return msm_pinctrl_probe(pdev, &ipq8064_pinctrl); 62162306a36Sopenharmony_ci} 62262306a36Sopenharmony_ci 62362306a36Sopenharmony_cistatic const struct of_device_id ipq8064_pinctrl_of_match[] = { 62462306a36Sopenharmony_ci { .compatible = "qcom,ipq8064-pinctrl", }, 62562306a36Sopenharmony_ci { }, 62662306a36Sopenharmony_ci}; 62762306a36Sopenharmony_ci 62862306a36Sopenharmony_cistatic struct platform_driver ipq8064_pinctrl_driver = { 62962306a36Sopenharmony_ci .driver = { 63062306a36Sopenharmony_ci .name = "ipq8064-pinctrl", 63162306a36Sopenharmony_ci .of_match_table = ipq8064_pinctrl_of_match, 63262306a36Sopenharmony_ci }, 63362306a36Sopenharmony_ci .probe = ipq8064_pinctrl_probe, 63462306a36Sopenharmony_ci .remove = msm_pinctrl_remove, 63562306a36Sopenharmony_ci}; 63662306a36Sopenharmony_ci 63762306a36Sopenharmony_cistatic int __init ipq8064_pinctrl_init(void) 63862306a36Sopenharmony_ci{ 63962306a36Sopenharmony_ci return platform_driver_register(&ipq8064_pinctrl_driver); 64062306a36Sopenharmony_ci} 64162306a36Sopenharmony_ciarch_initcall(ipq8064_pinctrl_init); 64262306a36Sopenharmony_ci 64362306a36Sopenharmony_cistatic void __exit ipq8064_pinctrl_exit(void) 64462306a36Sopenharmony_ci{ 64562306a36Sopenharmony_ci platform_driver_unregister(&ipq8064_pinctrl_driver); 64662306a36Sopenharmony_ci} 64762306a36Sopenharmony_cimodule_exit(ipq8064_pinctrl_exit); 64862306a36Sopenharmony_ci 64962306a36Sopenharmony_ciMODULE_AUTHOR("Andy Gross <agross@codeaurora.org>"); 65062306a36Sopenharmony_ciMODULE_DESCRIPTION("Qualcomm IPQ8064 pinctrl driver"); 65162306a36Sopenharmony_ciMODULE_LICENSE("GPL v2"); 65262306a36Sopenharmony_ciMODULE_DEVICE_TABLE(of, ipq8064_pinctrl_of_match); 653