162306a36Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0-only 262306a36Sopenharmony_ci/* 362306a36Sopenharmony_ci * Copyright (c) 2020, 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 msm8226_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 PINCTRL_PIN(90, "GPIO_90"), 10462306a36Sopenharmony_ci PINCTRL_PIN(91, "GPIO_91"), 10562306a36Sopenharmony_ci PINCTRL_PIN(92, "GPIO_92"), 10662306a36Sopenharmony_ci PINCTRL_PIN(93, "GPIO_93"), 10762306a36Sopenharmony_ci PINCTRL_PIN(94, "GPIO_94"), 10862306a36Sopenharmony_ci PINCTRL_PIN(95, "GPIO_95"), 10962306a36Sopenharmony_ci PINCTRL_PIN(96, "GPIO_96"), 11062306a36Sopenharmony_ci PINCTRL_PIN(97, "GPIO_97"), 11162306a36Sopenharmony_ci PINCTRL_PIN(98, "GPIO_98"), 11262306a36Sopenharmony_ci PINCTRL_PIN(99, "GPIO_99"), 11362306a36Sopenharmony_ci PINCTRL_PIN(100, "GPIO_100"), 11462306a36Sopenharmony_ci PINCTRL_PIN(101, "GPIO_101"), 11562306a36Sopenharmony_ci PINCTRL_PIN(102, "GPIO_102"), 11662306a36Sopenharmony_ci PINCTRL_PIN(103, "GPIO_103"), 11762306a36Sopenharmony_ci PINCTRL_PIN(104, "GPIO_104"), 11862306a36Sopenharmony_ci PINCTRL_PIN(105, "GPIO_105"), 11962306a36Sopenharmony_ci PINCTRL_PIN(106, "GPIO_106"), 12062306a36Sopenharmony_ci PINCTRL_PIN(107, "GPIO_107"), 12162306a36Sopenharmony_ci PINCTRL_PIN(108, "GPIO_108"), 12262306a36Sopenharmony_ci PINCTRL_PIN(109, "GPIO_109"), 12362306a36Sopenharmony_ci PINCTRL_PIN(110, "GPIO_110"), 12462306a36Sopenharmony_ci PINCTRL_PIN(111, "GPIO_111"), 12562306a36Sopenharmony_ci PINCTRL_PIN(112, "GPIO_112"), 12662306a36Sopenharmony_ci PINCTRL_PIN(113, "GPIO_113"), 12762306a36Sopenharmony_ci PINCTRL_PIN(114, "GPIO_114"), 12862306a36Sopenharmony_ci PINCTRL_PIN(115, "GPIO_115"), 12962306a36Sopenharmony_ci PINCTRL_PIN(116, "GPIO_116"), 13062306a36Sopenharmony_ci 13162306a36Sopenharmony_ci PINCTRL_PIN(117, "SDC1_CLK"), 13262306a36Sopenharmony_ci PINCTRL_PIN(118, "SDC1_CMD"), 13362306a36Sopenharmony_ci PINCTRL_PIN(119, "SDC1_DATA"), 13462306a36Sopenharmony_ci PINCTRL_PIN(120, "SDC2_CLK"), 13562306a36Sopenharmony_ci PINCTRL_PIN(121, "SDC2_CMD"), 13662306a36Sopenharmony_ci PINCTRL_PIN(122, "SDC2_DATA"), 13762306a36Sopenharmony_ci}; 13862306a36Sopenharmony_ci 13962306a36Sopenharmony_ci#define DECLARE_MSM_GPIO_PINS(pin) static const unsigned int gpio##pin##_pins[] = { pin } 14062306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(0); 14162306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(1); 14262306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(2); 14362306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(3); 14462306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(4); 14562306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(5); 14662306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(6); 14762306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(7); 14862306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(8); 14962306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(9); 15062306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(10); 15162306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(11); 15262306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(12); 15362306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(13); 15462306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(14); 15562306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(15); 15662306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(16); 15762306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(17); 15862306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(18); 15962306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(19); 16062306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(20); 16162306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(21); 16262306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(22); 16362306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(23); 16462306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(24); 16562306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(25); 16662306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(26); 16762306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(27); 16862306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(28); 16962306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(29); 17062306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(30); 17162306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(31); 17262306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(32); 17362306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(33); 17462306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(34); 17562306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(35); 17662306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(36); 17762306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(37); 17862306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(38); 17962306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(39); 18062306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(40); 18162306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(41); 18262306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(42); 18362306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(43); 18462306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(44); 18562306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(45); 18662306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(46); 18762306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(47); 18862306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(48); 18962306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(49); 19062306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(50); 19162306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(51); 19262306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(52); 19362306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(53); 19462306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(54); 19562306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(55); 19662306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(56); 19762306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(57); 19862306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(58); 19962306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(59); 20062306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(60); 20162306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(61); 20262306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(62); 20362306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(63); 20462306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(64); 20562306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(65); 20662306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(66); 20762306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(67); 20862306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(68); 20962306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(69); 21062306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(70); 21162306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(71); 21262306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(72); 21362306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(73); 21462306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(74); 21562306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(75); 21662306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(76); 21762306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(77); 21862306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(78); 21962306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(79); 22062306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(80); 22162306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(81); 22262306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(82); 22362306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(83); 22462306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(84); 22562306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(85); 22662306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(86); 22762306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(87); 22862306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(88); 22962306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(89); 23062306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(90); 23162306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(91); 23262306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(92); 23362306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(93); 23462306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(94); 23562306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(95); 23662306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(96); 23762306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(97); 23862306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(98); 23962306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(99); 24062306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(100); 24162306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(101); 24262306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(102); 24362306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(103); 24462306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(104); 24562306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(105); 24662306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(106); 24762306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(107); 24862306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(108); 24962306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(109); 25062306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(110); 25162306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(111); 25262306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(112); 25362306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(113); 25462306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(114); 25562306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(115); 25662306a36Sopenharmony_ciDECLARE_MSM_GPIO_PINS(116); 25762306a36Sopenharmony_ci 25862306a36Sopenharmony_cistatic const unsigned int sdc1_clk_pins[] = { 117 }; 25962306a36Sopenharmony_cistatic const unsigned int sdc1_cmd_pins[] = { 118 }; 26062306a36Sopenharmony_cistatic const unsigned int sdc1_data_pins[] = { 119 }; 26162306a36Sopenharmony_cistatic const unsigned int sdc2_clk_pins[] = { 120 }; 26262306a36Sopenharmony_cistatic const unsigned int sdc2_cmd_pins[] = { 121 }; 26362306a36Sopenharmony_cistatic const unsigned int sdc2_data_pins[] = { 122 }; 26462306a36Sopenharmony_ci 26562306a36Sopenharmony_ci#define PINGROUP(id, f1, f2, f3, f4, f5, f6, f7) \ 26662306a36Sopenharmony_ci { \ 26762306a36Sopenharmony_ci .grp = PINCTRL_PINGROUP("gpio" #id, \ 26862306a36Sopenharmony_ci gpio##id##_pins, \ 26962306a36Sopenharmony_ci ARRAY_SIZE(gpio##id##_pins)), \ 27062306a36Sopenharmony_ci .funcs = (int[]){ \ 27162306a36Sopenharmony_ci msm_mux_gpio, \ 27262306a36Sopenharmony_ci msm_mux_##f1, \ 27362306a36Sopenharmony_ci msm_mux_##f2, \ 27462306a36Sopenharmony_ci msm_mux_##f3, \ 27562306a36Sopenharmony_ci msm_mux_##f4, \ 27662306a36Sopenharmony_ci msm_mux_##f5, \ 27762306a36Sopenharmony_ci msm_mux_##f6, \ 27862306a36Sopenharmony_ci msm_mux_##f7 \ 27962306a36Sopenharmony_ci }, \ 28062306a36Sopenharmony_ci .nfuncs = 8, \ 28162306a36Sopenharmony_ci .ctl_reg = 0x1000 + 0x10 * id, \ 28262306a36Sopenharmony_ci .io_reg = 0x1004 + 0x10 * id, \ 28362306a36Sopenharmony_ci .intr_cfg_reg = 0x1008 + 0x10 * id, \ 28462306a36Sopenharmony_ci .intr_status_reg = 0x100c + 0x10 * id, \ 28562306a36Sopenharmony_ci .intr_target_reg = 0x1008 + 0x10 * id, \ 28662306a36Sopenharmony_ci .mux_bit = 2, \ 28762306a36Sopenharmony_ci .pull_bit = 0, \ 28862306a36Sopenharmony_ci .drv_bit = 6, \ 28962306a36Sopenharmony_ci .oe_bit = 9, \ 29062306a36Sopenharmony_ci .in_bit = 0, \ 29162306a36Sopenharmony_ci .out_bit = 1, \ 29262306a36Sopenharmony_ci .intr_enable_bit = 0, \ 29362306a36Sopenharmony_ci .intr_status_bit = 0, \ 29462306a36Sopenharmony_ci .intr_target_bit = 5, \ 29562306a36Sopenharmony_ci .intr_target_kpss_val = 4, \ 29662306a36Sopenharmony_ci .intr_raw_status_bit = 4, \ 29762306a36Sopenharmony_ci .intr_polarity_bit = 1, \ 29862306a36Sopenharmony_ci .intr_detection_bit = 2, \ 29962306a36Sopenharmony_ci .intr_detection_width = 2, \ 30062306a36Sopenharmony_ci } 30162306a36Sopenharmony_ci 30262306a36Sopenharmony_ci#define SDC_PINGROUP(pg_name, ctl, pull, drv) \ 30362306a36Sopenharmony_ci { \ 30462306a36Sopenharmony_ci .grp = PINCTRL_PINGROUP(#pg_name, \ 30562306a36Sopenharmony_ci pg_name##_pins, \ 30662306a36Sopenharmony_ci ARRAY_SIZE(pg_name##_pins)), \ 30762306a36Sopenharmony_ci .ctl_reg = ctl, \ 30862306a36Sopenharmony_ci .io_reg = 0, \ 30962306a36Sopenharmony_ci .intr_cfg_reg = 0, \ 31062306a36Sopenharmony_ci .intr_status_reg = 0, \ 31162306a36Sopenharmony_ci .intr_target_reg = 0, \ 31262306a36Sopenharmony_ci .mux_bit = -1, \ 31362306a36Sopenharmony_ci .pull_bit = pull, \ 31462306a36Sopenharmony_ci .drv_bit = drv, \ 31562306a36Sopenharmony_ci .oe_bit = -1, \ 31662306a36Sopenharmony_ci .in_bit = -1, \ 31762306a36Sopenharmony_ci .out_bit = -1, \ 31862306a36Sopenharmony_ci .intr_enable_bit = -1, \ 31962306a36Sopenharmony_ci .intr_status_bit = -1, \ 32062306a36Sopenharmony_ci .intr_target_bit = -1, \ 32162306a36Sopenharmony_ci .intr_target_kpss_val = -1, \ 32262306a36Sopenharmony_ci .intr_raw_status_bit = -1, \ 32362306a36Sopenharmony_ci .intr_polarity_bit = -1, \ 32462306a36Sopenharmony_ci .intr_detection_bit = -1, \ 32562306a36Sopenharmony_ci .intr_detection_width = -1, \ 32662306a36Sopenharmony_ci } 32762306a36Sopenharmony_ci 32862306a36Sopenharmony_ci/* 32962306a36Sopenharmony_ci * TODO: Add the rest of the possible functions and fill out 33062306a36Sopenharmony_ci * the pingroup table below. 33162306a36Sopenharmony_ci */ 33262306a36Sopenharmony_cienum msm8226_functions { 33362306a36Sopenharmony_ci msm_mux_audio_pcm, 33462306a36Sopenharmony_ci msm_mux_blsp_i2c1, 33562306a36Sopenharmony_ci msm_mux_blsp_i2c2, 33662306a36Sopenharmony_ci msm_mux_blsp_i2c3, 33762306a36Sopenharmony_ci msm_mux_blsp_i2c4, 33862306a36Sopenharmony_ci msm_mux_blsp_i2c5, 33962306a36Sopenharmony_ci msm_mux_blsp_spi1, 34062306a36Sopenharmony_ci msm_mux_blsp_spi2, 34162306a36Sopenharmony_ci msm_mux_blsp_spi3, 34262306a36Sopenharmony_ci msm_mux_blsp_spi4, 34362306a36Sopenharmony_ci msm_mux_blsp_spi5, 34462306a36Sopenharmony_ci msm_mux_blsp_uart1, 34562306a36Sopenharmony_ci msm_mux_blsp_uart2, 34662306a36Sopenharmony_ci msm_mux_blsp_uart3, 34762306a36Sopenharmony_ci msm_mux_blsp_uart4, 34862306a36Sopenharmony_ci msm_mux_blsp_uart5, 34962306a36Sopenharmony_ci msm_mux_blsp_uim1, 35062306a36Sopenharmony_ci msm_mux_blsp_uim2, 35162306a36Sopenharmony_ci msm_mux_blsp_uim3, 35262306a36Sopenharmony_ci msm_mux_blsp_uim4, 35362306a36Sopenharmony_ci msm_mux_blsp_uim5, 35462306a36Sopenharmony_ci msm_mux_cam_mclk0, 35562306a36Sopenharmony_ci msm_mux_cam_mclk1, 35662306a36Sopenharmony_ci msm_mux_cci_i2c0, 35762306a36Sopenharmony_ci msm_mux_gp0_clk, 35862306a36Sopenharmony_ci msm_mux_gp1_clk, 35962306a36Sopenharmony_ci msm_mux_gpio, 36062306a36Sopenharmony_ci msm_mux_sdc3, 36162306a36Sopenharmony_ci msm_mux_wlan, 36262306a36Sopenharmony_ci msm_mux_NA, 36362306a36Sopenharmony_ci}; 36462306a36Sopenharmony_ci 36562306a36Sopenharmony_cistatic const char * const gpio_groups[] = { 36662306a36Sopenharmony_ci "gpio0", "gpio1", "gpio2", "gpio3", "gpio4", "gpio5", "gpio6", "gpio7", 36762306a36Sopenharmony_ci "gpio8", "gpio9", "gpio10", "gpio11", "gpio12", "gpio13", "gpio14", 36862306a36Sopenharmony_ci "gpio15", "gpio16", "gpio17", "gpio18", "gpio19", "gpio20", "gpio21", 36962306a36Sopenharmony_ci "gpio22", "gpio23", "gpio24", "gpio25", "gpio26", "gpio27", "gpio28", 37062306a36Sopenharmony_ci "gpio29", "gpio30", "gpio31", "gpio32", "gpio33", "gpio34", "gpio35", 37162306a36Sopenharmony_ci "gpio36", "gpio37", "gpio38", "gpio39", "gpio40", "gpio41", "gpio42", 37262306a36Sopenharmony_ci "gpio43", "gpio44", "gpio45", "gpio46", "gpio47", "gpio48", "gpio49", 37362306a36Sopenharmony_ci "gpio50", "gpio51", "gpio52", "gpio53", "gpio54", "gpio55", "gpio56", 37462306a36Sopenharmony_ci "gpio57", "gpio58", "gpio59", "gpio60", "gpio61", "gpio62", "gpio63", 37562306a36Sopenharmony_ci "gpio64", "gpio65", "gpio66", "gpio67", "gpio68", "gpio69", "gpio70", 37662306a36Sopenharmony_ci "gpio71", "gpio72", "gpio73", "gpio74", "gpio75", "gpio76", "gpio77", 37762306a36Sopenharmony_ci "gpio78", "gpio79", "gpio80", "gpio81", "gpio82", "gpio83", "gpio84", 37862306a36Sopenharmony_ci "gpio85", "gpio86", "gpio87", "gpio88", "gpio89", "gpio90", "gpio91", 37962306a36Sopenharmony_ci "gpio92", "gpio93", "gpio94", "gpio95", "gpio96", "gpio97", "gpio98", 38062306a36Sopenharmony_ci "gpio99", "gpio100", "gpio101", "gpio102", "gpio103", "gpio104", 38162306a36Sopenharmony_ci "gpio105", "gpio106", "gpio107", "gpio108", "gpio109", "gpio110", 38262306a36Sopenharmony_ci "gpio111", "gpio112", "gpio113", "gpio114", "gpio115", "gpio116", 38362306a36Sopenharmony_ci}; 38462306a36Sopenharmony_ci 38562306a36Sopenharmony_cistatic const char * const audio_pcm_groups[] = { 38662306a36Sopenharmony_ci "gpio63", "gpio64", "gpio65", "gpio66" 38762306a36Sopenharmony_ci}; 38862306a36Sopenharmony_ci 38962306a36Sopenharmony_cistatic const char * const blsp_uart1_groups[] = { 39062306a36Sopenharmony_ci "gpio0", "gpio1", "gpio2", "gpio3" 39162306a36Sopenharmony_ci}; 39262306a36Sopenharmony_ci 39362306a36Sopenharmony_cistatic const char * const blsp_uim1_groups[] = { "gpio0", "gpio1" }; 39462306a36Sopenharmony_cistatic const char * const blsp_i2c1_groups[] = { "gpio2", "gpio3" }; 39562306a36Sopenharmony_cistatic const char * const blsp_spi1_groups[] = { 39662306a36Sopenharmony_ci "gpio0", "gpio1", "gpio2", "gpio3" 39762306a36Sopenharmony_ci}; 39862306a36Sopenharmony_ci 39962306a36Sopenharmony_cistatic const char * const blsp_uart2_groups[] = { 40062306a36Sopenharmony_ci "gpio4", "gpio5", "gpio6", "gpio7" 40162306a36Sopenharmony_ci}; 40262306a36Sopenharmony_ci 40362306a36Sopenharmony_cistatic const char * const blsp_uim2_groups[] = { "gpio4", "gpio5" }; 40462306a36Sopenharmony_cistatic const char * const blsp_i2c2_groups[] = { "gpio6", "gpio7" }; 40562306a36Sopenharmony_cistatic const char * const blsp_spi2_groups[] = { 40662306a36Sopenharmony_ci "gpio4", "gpio5", "gpio6", "gpio7" 40762306a36Sopenharmony_ci}; 40862306a36Sopenharmony_ci 40962306a36Sopenharmony_cistatic const char * const blsp_uart3_groups[] = { 41062306a36Sopenharmony_ci "gpio8", "gpio9", "gpio10", "gpio11" 41162306a36Sopenharmony_ci}; 41262306a36Sopenharmony_ci 41362306a36Sopenharmony_cistatic const char * const blsp_uim3_groups[] = { "gpio8", "gpio9" }; 41462306a36Sopenharmony_cistatic const char * const blsp_i2c3_groups[] = { "gpio10", "gpio11" }; 41562306a36Sopenharmony_cistatic const char * const blsp_spi3_groups[] = { 41662306a36Sopenharmony_ci "gpio8", "gpio9", "gpio10", "gpio11" 41762306a36Sopenharmony_ci}; 41862306a36Sopenharmony_ci 41962306a36Sopenharmony_cistatic const char * const blsp_uart4_groups[] = { 42062306a36Sopenharmony_ci "gpio12", "gpio13", "gpio14", "gpio15" 42162306a36Sopenharmony_ci}; 42262306a36Sopenharmony_ci 42362306a36Sopenharmony_cistatic const char * const blsp_uim4_groups[] = { "gpio12", "gpio13" }; 42462306a36Sopenharmony_cistatic const char * const blsp_i2c4_groups[] = { "gpio14", "gpio15" }; 42562306a36Sopenharmony_cistatic const char * const blsp_spi4_groups[] = { 42662306a36Sopenharmony_ci "gpio12", "gpio13", "gpio14", "gpio15" 42762306a36Sopenharmony_ci}; 42862306a36Sopenharmony_ci 42962306a36Sopenharmony_cistatic const char * const blsp_uart5_groups[] = { 43062306a36Sopenharmony_ci "gpio16", "gpio17", "gpio18", "gpio19" 43162306a36Sopenharmony_ci}; 43262306a36Sopenharmony_ci 43362306a36Sopenharmony_cistatic const char * const blsp_uim5_groups[] = { "gpio16", "gpio17" }; 43462306a36Sopenharmony_cistatic const char * const blsp_i2c5_groups[] = { "gpio18", "gpio19" }; 43562306a36Sopenharmony_cistatic const char * const blsp_spi5_groups[] = { 43662306a36Sopenharmony_ci "gpio16", "gpio17", "gpio18", "gpio19" 43762306a36Sopenharmony_ci}; 43862306a36Sopenharmony_ci 43962306a36Sopenharmony_cistatic const char * const cci_i2c0_groups[] = { "gpio29", "gpio30" }; 44062306a36Sopenharmony_ci 44162306a36Sopenharmony_cistatic const char * const cam_mclk0_groups[] = { "gpio26" }; 44262306a36Sopenharmony_cistatic const char * const cam_mclk1_groups[] = { "gpio27" }; 44362306a36Sopenharmony_ci 44462306a36Sopenharmony_cistatic const char * const gp0_clk_groups[] = { "gpio33" }; 44562306a36Sopenharmony_cistatic const char * const gp1_clk_groups[] = { "gpio34" }; 44662306a36Sopenharmony_ci 44762306a36Sopenharmony_cistatic const char * const sdc3_groups[] = { 44862306a36Sopenharmony_ci "gpio39", "gpio40", "gpio41", "gpio42", "gpio43", "gpio44" 44962306a36Sopenharmony_ci}; 45062306a36Sopenharmony_ci 45162306a36Sopenharmony_cistatic const char * const wlan_groups[] = { 45262306a36Sopenharmony_ci "gpio40", "gpio41", "gpio42", "gpio43", "gpio44" 45362306a36Sopenharmony_ci}; 45462306a36Sopenharmony_ci 45562306a36Sopenharmony_cistatic const struct pinfunction msm8226_functions[] = { 45662306a36Sopenharmony_ci MSM_PIN_FUNCTION(audio_pcm), 45762306a36Sopenharmony_ci MSM_PIN_FUNCTION(blsp_i2c1), 45862306a36Sopenharmony_ci MSM_PIN_FUNCTION(blsp_i2c2), 45962306a36Sopenharmony_ci MSM_PIN_FUNCTION(blsp_i2c3), 46062306a36Sopenharmony_ci MSM_PIN_FUNCTION(blsp_i2c4), 46162306a36Sopenharmony_ci MSM_PIN_FUNCTION(blsp_i2c5), 46262306a36Sopenharmony_ci MSM_PIN_FUNCTION(blsp_spi1), 46362306a36Sopenharmony_ci MSM_PIN_FUNCTION(blsp_spi2), 46462306a36Sopenharmony_ci MSM_PIN_FUNCTION(blsp_spi3), 46562306a36Sopenharmony_ci MSM_PIN_FUNCTION(blsp_spi4), 46662306a36Sopenharmony_ci MSM_PIN_FUNCTION(blsp_spi5), 46762306a36Sopenharmony_ci MSM_PIN_FUNCTION(blsp_uart1), 46862306a36Sopenharmony_ci MSM_PIN_FUNCTION(blsp_uart2), 46962306a36Sopenharmony_ci MSM_PIN_FUNCTION(blsp_uart3), 47062306a36Sopenharmony_ci MSM_PIN_FUNCTION(blsp_uart4), 47162306a36Sopenharmony_ci MSM_PIN_FUNCTION(blsp_uart5), 47262306a36Sopenharmony_ci MSM_PIN_FUNCTION(blsp_uim1), 47362306a36Sopenharmony_ci MSM_PIN_FUNCTION(blsp_uim2), 47462306a36Sopenharmony_ci MSM_PIN_FUNCTION(blsp_uim3), 47562306a36Sopenharmony_ci MSM_PIN_FUNCTION(blsp_uim4), 47662306a36Sopenharmony_ci MSM_PIN_FUNCTION(blsp_uim5), 47762306a36Sopenharmony_ci MSM_PIN_FUNCTION(cam_mclk0), 47862306a36Sopenharmony_ci MSM_PIN_FUNCTION(cam_mclk1), 47962306a36Sopenharmony_ci MSM_PIN_FUNCTION(cci_i2c0), 48062306a36Sopenharmony_ci MSM_PIN_FUNCTION(gp0_clk), 48162306a36Sopenharmony_ci MSM_PIN_FUNCTION(gp1_clk), 48262306a36Sopenharmony_ci MSM_PIN_FUNCTION(gpio), 48362306a36Sopenharmony_ci MSM_PIN_FUNCTION(sdc3), 48462306a36Sopenharmony_ci MSM_PIN_FUNCTION(wlan), 48562306a36Sopenharmony_ci}; 48662306a36Sopenharmony_ci 48762306a36Sopenharmony_cistatic const struct msm_pingroup msm8226_groups[] = { 48862306a36Sopenharmony_ci PINGROUP(0, blsp_spi1, blsp_uart1, blsp_uim1, NA, NA, NA, NA), 48962306a36Sopenharmony_ci PINGROUP(1, blsp_spi1, blsp_uart1, blsp_uim1, NA, NA, NA, NA), 49062306a36Sopenharmony_ci PINGROUP(2, blsp_spi1, blsp_uart1, blsp_i2c1, NA, NA, NA, NA), 49162306a36Sopenharmony_ci PINGROUP(3, blsp_spi1, blsp_uart1, blsp_i2c1, NA, NA, NA, NA), 49262306a36Sopenharmony_ci PINGROUP(4, blsp_spi2, blsp_uart2, blsp_uim2, NA, NA, NA, NA), 49362306a36Sopenharmony_ci PINGROUP(5, blsp_spi2, blsp_uart2, blsp_uim2, NA, NA, NA, NA), 49462306a36Sopenharmony_ci PINGROUP(6, blsp_spi2, blsp_uart2, blsp_i2c2, NA, NA, NA, NA), 49562306a36Sopenharmony_ci PINGROUP(7, blsp_spi2, blsp_uart2, blsp_i2c2, NA, NA, NA, NA), 49662306a36Sopenharmony_ci PINGROUP(8, blsp_spi3, blsp_uart3, blsp_uim3, NA, NA, NA, NA), 49762306a36Sopenharmony_ci PINGROUP(9, blsp_spi3, blsp_uart3, blsp_uim3, NA, NA, NA, NA), 49862306a36Sopenharmony_ci PINGROUP(10, blsp_spi3, blsp_uart3, blsp_i2c3, NA, NA, NA, NA), 49962306a36Sopenharmony_ci PINGROUP(11, blsp_spi3, blsp_uart3, blsp_i2c3, NA, NA, NA, NA), 50062306a36Sopenharmony_ci PINGROUP(12, blsp_spi4, blsp_uart4, blsp_uim4, NA, NA, NA, NA), 50162306a36Sopenharmony_ci PINGROUP(13, blsp_spi4, blsp_uart4, blsp_uim4, NA, NA, NA, NA), 50262306a36Sopenharmony_ci PINGROUP(14, blsp_spi4, blsp_uart4, blsp_i2c4, NA, NA, NA, NA), 50362306a36Sopenharmony_ci PINGROUP(15, blsp_spi4, blsp_uart4, blsp_i2c4, NA, NA, NA, NA), 50462306a36Sopenharmony_ci PINGROUP(16, blsp_spi5, blsp_uart5, blsp_uim5, NA, NA, NA, NA), 50562306a36Sopenharmony_ci PINGROUP(17, blsp_spi5, blsp_uart5, blsp_uim5, NA, NA, NA, NA), 50662306a36Sopenharmony_ci PINGROUP(18, blsp_spi5, blsp_uart5, blsp_i2c5, NA, NA, NA, NA), 50762306a36Sopenharmony_ci PINGROUP(19, blsp_spi5, blsp_uart5, blsp_i2c5, NA, NA, NA, NA), 50862306a36Sopenharmony_ci PINGROUP(20, NA, NA, NA, NA, NA, NA, NA), 50962306a36Sopenharmony_ci PINGROUP(21, NA, NA, NA, NA, NA, NA, NA), 51062306a36Sopenharmony_ci PINGROUP(22, NA, NA, NA, NA, NA, NA, NA), 51162306a36Sopenharmony_ci PINGROUP(23, NA, NA, NA, NA, NA, NA, NA), 51262306a36Sopenharmony_ci PINGROUP(24, NA, NA, NA, NA, NA, NA, NA), 51362306a36Sopenharmony_ci PINGROUP(25, NA, NA, NA, NA, NA, NA, NA), 51462306a36Sopenharmony_ci PINGROUP(26, cam_mclk0, NA, NA, NA, NA, NA, NA), 51562306a36Sopenharmony_ci PINGROUP(27, cam_mclk1, NA, NA, NA, NA, NA, NA), 51662306a36Sopenharmony_ci PINGROUP(28, NA, NA, NA, NA, NA, NA, NA), 51762306a36Sopenharmony_ci PINGROUP(29, cci_i2c0, NA, NA, NA, NA, NA, NA), 51862306a36Sopenharmony_ci PINGROUP(30, cci_i2c0, NA, NA, NA, NA, NA, NA), 51962306a36Sopenharmony_ci PINGROUP(31, NA, NA, NA, NA, NA, NA, NA), 52062306a36Sopenharmony_ci PINGROUP(32, NA, NA, NA, NA, NA, NA, NA), 52162306a36Sopenharmony_ci PINGROUP(33, NA, NA, gp0_clk, NA, NA, NA, NA), 52262306a36Sopenharmony_ci PINGROUP(34, NA, NA, gp1_clk, NA, NA, NA, NA), 52362306a36Sopenharmony_ci PINGROUP(35, NA, NA, NA, NA, NA, NA, NA), 52462306a36Sopenharmony_ci PINGROUP(36, NA, NA, NA, NA, NA, NA, NA), 52562306a36Sopenharmony_ci PINGROUP(37, NA, NA, NA, NA, NA, NA, NA), 52662306a36Sopenharmony_ci PINGROUP(38, NA, NA, NA, NA, NA, NA, NA), 52762306a36Sopenharmony_ci PINGROUP(39, NA, sdc3, NA, NA, NA, NA, NA), 52862306a36Sopenharmony_ci PINGROUP(40, wlan, sdc3, NA, NA, NA, NA, NA), 52962306a36Sopenharmony_ci PINGROUP(41, wlan, sdc3, NA, NA, NA, NA, NA), 53062306a36Sopenharmony_ci PINGROUP(42, wlan, sdc3, NA, NA, NA, NA, NA), 53162306a36Sopenharmony_ci PINGROUP(43, wlan, sdc3, NA, NA, NA, NA, NA), 53262306a36Sopenharmony_ci PINGROUP(44, wlan, sdc3, NA, NA, NA, NA, NA), 53362306a36Sopenharmony_ci PINGROUP(45, NA, NA, NA, NA, NA, NA, NA), 53462306a36Sopenharmony_ci PINGROUP(46, NA, NA, NA, NA, NA, NA, NA), 53562306a36Sopenharmony_ci PINGROUP(47, NA, NA, NA, NA, NA, NA, NA), 53662306a36Sopenharmony_ci PINGROUP(48, NA, NA, NA, NA, NA, NA, NA), 53762306a36Sopenharmony_ci PINGROUP(49, NA, NA, NA, NA, NA, NA, NA), 53862306a36Sopenharmony_ci PINGROUP(50, NA, NA, NA, NA, NA, NA, NA), 53962306a36Sopenharmony_ci PINGROUP(51, NA, NA, NA, NA, NA, NA, NA), 54062306a36Sopenharmony_ci PINGROUP(52, NA, NA, NA, NA, NA, NA, NA), 54162306a36Sopenharmony_ci PINGROUP(53, NA, NA, NA, NA, NA, NA, NA), 54262306a36Sopenharmony_ci PINGROUP(54, NA, NA, NA, NA, NA, NA, NA), 54362306a36Sopenharmony_ci PINGROUP(55, NA, NA, NA, NA, NA, NA, NA), 54462306a36Sopenharmony_ci PINGROUP(56, NA, NA, NA, NA, NA, NA, NA), 54562306a36Sopenharmony_ci PINGROUP(57, NA, NA, NA, NA, NA, NA, NA), 54662306a36Sopenharmony_ci PINGROUP(58, NA, NA, NA, NA, NA, NA, NA), 54762306a36Sopenharmony_ci PINGROUP(59, NA, NA, NA, NA, NA, NA, NA), 54862306a36Sopenharmony_ci PINGROUP(60, NA, NA, NA, NA, NA, NA, NA), 54962306a36Sopenharmony_ci PINGROUP(61, NA, NA, NA, NA, NA, NA, NA), 55062306a36Sopenharmony_ci PINGROUP(62, NA, NA, NA, NA, NA, NA, NA), 55162306a36Sopenharmony_ci PINGROUP(63, audio_pcm, NA, NA, NA, NA, NA, NA), 55262306a36Sopenharmony_ci PINGROUP(64, audio_pcm, NA, NA, NA, NA, NA, NA), 55362306a36Sopenharmony_ci PINGROUP(65, audio_pcm, NA, NA, NA, NA, NA, NA), 55462306a36Sopenharmony_ci PINGROUP(66, audio_pcm, NA, NA, NA, NA, NA, NA), 55562306a36Sopenharmony_ci PINGROUP(67, NA, NA, NA, NA, NA, NA, NA), 55662306a36Sopenharmony_ci PINGROUP(68, NA, NA, NA, NA, NA, NA, NA), 55762306a36Sopenharmony_ci PINGROUP(69, NA, NA, NA, NA, NA, NA, NA), 55862306a36Sopenharmony_ci PINGROUP(70, NA, NA, NA, NA, NA, NA, NA), 55962306a36Sopenharmony_ci PINGROUP(71, NA, NA, NA, NA, NA, NA, NA), 56062306a36Sopenharmony_ci PINGROUP(72, NA, NA, NA, NA, NA, NA, NA), 56162306a36Sopenharmony_ci PINGROUP(73, NA, NA, NA, NA, NA, NA, NA), 56262306a36Sopenharmony_ci PINGROUP(74, NA, NA, NA, NA, NA, NA, NA), 56362306a36Sopenharmony_ci PINGROUP(75, NA, NA, NA, NA, NA, NA, NA), 56462306a36Sopenharmony_ci PINGROUP(76, NA, NA, NA, NA, NA, NA, NA), 56562306a36Sopenharmony_ci PINGROUP(77, NA, NA, NA, NA, NA, NA, NA), 56662306a36Sopenharmony_ci PINGROUP(78, NA, NA, NA, NA, NA, NA, NA), 56762306a36Sopenharmony_ci PINGROUP(79, NA, NA, NA, NA, NA, NA, NA), 56862306a36Sopenharmony_ci PINGROUP(80, NA, NA, NA, NA, NA, NA, NA), 56962306a36Sopenharmony_ci PINGROUP(81, NA, NA, NA, NA, NA, NA, NA), 57062306a36Sopenharmony_ci PINGROUP(82, NA, NA, NA, NA, NA, NA, NA), 57162306a36Sopenharmony_ci PINGROUP(83, NA, NA, NA, NA, NA, NA, NA), 57262306a36Sopenharmony_ci PINGROUP(84, NA, NA, NA, NA, NA, NA, NA), 57362306a36Sopenharmony_ci PINGROUP(85, NA, NA, NA, NA, NA, NA, NA), 57462306a36Sopenharmony_ci PINGROUP(86, NA, NA, NA, NA, NA, NA, NA), 57562306a36Sopenharmony_ci PINGROUP(87, NA, NA, NA, NA, NA, NA, NA), 57662306a36Sopenharmony_ci PINGROUP(88, NA, NA, NA, NA, NA, NA, NA), 57762306a36Sopenharmony_ci PINGROUP(89, NA, NA, NA, NA, NA, NA, NA), 57862306a36Sopenharmony_ci PINGROUP(90, NA, NA, NA, NA, NA, NA, NA), 57962306a36Sopenharmony_ci PINGROUP(91, NA, NA, NA, NA, NA, NA, NA), 58062306a36Sopenharmony_ci PINGROUP(92, NA, NA, NA, NA, NA, NA, NA), 58162306a36Sopenharmony_ci PINGROUP(93, NA, NA, NA, NA, NA, NA, NA), 58262306a36Sopenharmony_ci PINGROUP(94, NA, NA, NA, NA, NA, NA, NA), 58362306a36Sopenharmony_ci PINGROUP(95, NA, NA, NA, NA, NA, NA, NA), 58462306a36Sopenharmony_ci PINGROUP(96, NA, NA, NA, NA, NA, NA, NA), 58562306a36Sopenharmony_ci PINGROUP(97, NA, NA, NA, NA, NA, NA, NA), 58662306a36Sopenharmony_ci PINGROUP(98, NA, NA, NA, NA, NA, NA, NA), 58762306a36Sopenharmony_ci PINGROUP(99, NA, NA, NA, NA, NA, NA, NA), 58862306a36Sopenharmony_ci PINGROUP(100, NA, NA, NA, NA, NA, NA, NA), 58962306a36Sopenharmony_ci PINGROUP(101, NA, NA, NA, NA, NA, NA, NA), 59062306a36Sopenharmony_ci PINGROUP(102, NA, NA, NA, NA, NA, NA, NA), 59162306a36Sopenharmony_ci PINGROUP(103, NA, NA, NA, NA, NA, NA, NA), 59262306a36Sopenharmony_ci PINGROUP(104, NA, NA, NA, NA, NA, NA, NA), 59362306a36Sopenharmony_ci PINGROUP(105, NA, NA, NA, NA, NA, NA, NA), 59462306a36Sopenharmony_ci PINGROUP(106, NA, NA, NA, NA, NA, NA, NA), 59562306a36Sopenharmony_ci PINGROUP(107, NA, NA, NA, NA, NA, NA, NA), 59662306a36Sopenharmony_ci PINGROUP(108, NA, NA, NA, NA, NA, NA, NA), 59762306a36Sopenharmony_ci PINGROUP(109, NA, NA, NA, NA, NA, NA, NA), 59862306a36Sopenharmony_ci PINGROUP(110, NA, NA, NA, NA, NA, NA, NA), 59962306a36Sopenharmony_ci PINGROUP(111, NA, NA, NA, NA, NA, NA, NA), 60062306a36Sopenharmony_ci PINGROUP(112, NA, NA, NA, NA, NA, NA, NA), 60162306a36Sopenharmony_ci PINGROUP(113, NA, NA, NA, NA, NA, NA, NA), 60262306a36Sopenharmony_ci PINGROUP(114, NA, NA, NA, NA, NA, NA, NA), 60362306a36Sopenharmony_ci PINGROUP(115, NA, NA, NA, NA, NA, NA, NA), 60462306a36Sopenharmony_ci PINGROUP(116, NA, NA, NA, NA, NA, NA, NA), 60562306a36Sopenharmony_ci SDC_PINGROUP(sdc1_clk, 0x2044, 13, 6), 60662306a36Sopenharmony_ci SDC_PINGROUP(sdc1_cmd, 0x2044, 11, 3), 60762306a36Sopenharmony_ci SDC_PINGROUP(sdc1_data, 0x2044, 9, 0), 60862306a36Sopenharmony_ci SDC_PINGROUP(sdc2_clk, 0x2048, 14, 6), 60962306a36Sopenharmony_ci SDC_PINGROUP(sdc2_cmd, 0x2048, 11, 3), 61062306a36Sopenharmony_ci SDC_PINGROUP(sdc2_data, 0x2048, 9, 0), 61162306a36Sopenharmony_ci}; 61262306a36Sopenharmony_ci 61362306a36Sopenharmony_ci#define NUM_GPIO_PINGROUPS 117 61462306a36Sopenharmony_ci 61562306a36Sopenharmony_cistatic const struct msm_pinctrl_soc_data msm8226_pinctrl = { 61662306a36Sopenharmony_ci .pins = msm8226_pins, 61762306a36Sopenharmony_ci .npins = ARRAY_SIZE(msm8226_pins), 61862306a36Sopenharmony_ci .functions = msm8226_functions, 61962306a36Sopenharmony_ci .nfunctions = ARRAY_SIZE(msm8226_functions), 62062306a36Sopenharmony_ci .groups = msm8226_groups, 62162306a36Sopenharmony_ci .ngroups = ARRAY_SIZE(msm8226_groups), 62262306a36Sopenharmony_ci .ngpios = NUM_GPIO_PINGROUPS, 62362306a36Sopenharmony_ci}; 62462306a36Sopenharmony_ci 62562306a36Sopenharmony_cistatic int msm8226_pinctrl_probe(struct platform_device *pdev) 62662306a36Sopenharmony_ci{ 62762306a36Sopenharmony_ci return msm_pinctrl_probe(pdev, &msm8226_pinctrl); 62862306a36Sopenharmony_ci} 62962306a36Sopenharmony_ci 63062306a36Sopenharmony_cistatic const struct of_device_id msm8226_pinctrl_of_match[] = { 63162306a36Sopenharmony_ci { .compatible = "qcom,msm8226-pinctrl", }, 63262306a36Sopenharmony_ci { }, 63362306a36Sopenharmony_ci}; 63462306a36Sopenharmony_ci 63562306a36Sopenharmony_cistatic struct platform_driver msm8226_pinctrl_driver = { 63662306a36Sopenharmony_ci .driver = { 63762306a36Sopenharmony_ci .name = "msm8226-pinctrl", 63862306a36Sopenharmony_ci .of_match_table = msm8226_pinctrl_of_match, 63962306a36Sopenharmony_ci }, 64062306a36Sopenharmony_ci .probe = msm8226_pinctrl_probe, 64162306a36Sopenharmony_ci .remove = msm_pinctrl_remove, 64262306a36Sopenharmony_ci}; 64362306a36Sopenharmony_ci 64462306a36Sopenharmony_cistatic int __init msm8226_pinctrl_init(void) 64562306a36Sopenharmony_ci{ 64662306a36Sopenharmony_ci return platform_driver_register(&msm8226_pinctrl_driver); 64762306a36Sopenharmony_ci} 64862306a36Sopenharmony_ciarch_initcall(msm8226_pinctrl_init); 64962306a36Sopenharmony_ci 65062306a36Sopenharmony_cistatic void __exit msm8226_pinctrl_exit(void) 65162306a36Sopenharmony_ci{ 65262306a36Sopenharmony_ci platform_driver_unregister(&msm8226_pinctrl_driver); 65362306a36Sopenharmony_ci} 65462306a36Sopenharmony_cimodule_exit(msm8226_pinctrl_exit); 65562306a36Sopenharmony_ci 65662306a36Sopenharmony_ciMODULE_AUTHOR("Bartosz Dudziak <bartosz.dudziak@snejp.pl>"); 65762306a36Sopenharmony_ciMODULE_DESCRIPTION("Qualcomm MSM8226 pinctrl driver"); 65862306a36Sopenharmony_ciMODULE_LICENSE("GPL v2"); 65962306a36Sopenharmony_ciMODULE_DEVICE_TABLE(of, msm8226_pinctrl_of_match); 660