1e7507f57SSean Wang // SPDX-License-Identifier: GPL-2.0 2e7507f57SSean Wang /* 3e7507f57SSean Wang * The MT7623 driver based on Linux generic pinctrl binding. 4e7507f57SSean Wang * 5e7507f57SSean Wang * Copyright (C) 2015 - 2018 MediaTek Inc. 6e7507f57SSean Wang * Author: Biao Huang <biao.huang@mediatek.com> 7e7507f57SSean Wang * Ryder Lee <ryder.lee@mediatek.com> 8e7507f57SSean Wang * Sean Wang <sean.wang@mediatek.com> 9e7507f57SSean Wang */ 10e7507f57SSean Wang 11e7507f57SSean Wang #include "pinctrl-moore.h" 12e7507f57SSean Wang 13e7507f57SSean Wang #define PIN_BOND_REG0 0xb10 14e7507f57SSean Wang #define PIN_BOND_REG1 0xf20 15e7507f57SSean Wang #define PIN_BOND_REG2 0xef0 16e7507f57SSean Wang #define BOND_PCIE_CLR (0x77 << 3) 17e7507f57SSean Wang #define BOND_I2S_CLR 0x3 18e7507f57SSean Wang #define BOND_MSDC0E_CLR 0x1 19e7507f57SSean Wang 20e7507f57SSean Wang #define PIN_FIELD15(_s_pin, _e_pin, _s_addr, _x_addrs, _s_bit, _x_bits) \ 21*2bc47dfeSSean Wang PIN_FIELD_CALC(_s_pin, _e_pin, 0, _s_addr, _x_addrs, _s_bit, \ 22e7507f57SSean Wang _x_bits, 15, false) 23e7507f57SSean Wang 24e7507f57SSean Wang #define PIN_FIELD16(_s_pin, _e_pin, _s_addr, _x_addrs, _s_bit, _x_bits) \ 25*2bc47dfeSSean Wang PIN_FIELD_CALC(_s_pin, _e_pin, 0, _s_addr, _x_addrs, _s_bit, \ 26e7507f57SSean Wang _x_bits, 16, 0) 27e7507f57SSean Wang 28e7507f57SSean Wang #define PINS_FIELD16(_s_pin, _e_pin, _s_addr, _x_addrs, _s_bit, _x_bits) \ 29*2bc47dfeSSean Wang PIN_FIELD_CALC(_s_pin, _e_pin, 0, _s_addr, _x_addrs, _s_bit, \ 30e7507f57SSean Wang _x_bits, 16, 1) 31e7507f57SSean Wang 32e7507f57SSean Wang #define MT7623_PIN(_number, _name, _eint_n, _drv_grp) \ 33e7507f57SSean Wang MTK_PIN(_number, _name, _eint_n, _drv_grp) 34e7507f57SSean Wang 35e7507f57SSean Wang static const struct mtk_pin_field_calc mt7623_pin_mode_range[] = { 36e7507f57SSean Wang PIN_FIELD15(0, 278, 0x760, 0x10, 0, 3), 37e7507f57SSean Wang }; 38e7507f57SSean Wang 39e7507f57SSean Wang static const struct mtk_pin_field_calc mt7623_pin_dir_range[] = { 40e7507f57SSean Wang PIN_FIELD16(0, 175, 0x0, 0x10, 0, 1), 41e7507f57SSean Wang PIN_FIELD16(176, 278, 0xc0, 0x10, 0, 1), 42e7507f57SSean Wang }; 43e7507f57SSean Wang 44e7507f57SSean Wang static const struct mtk_pin_field_calc mt7623_pin_di_range[] = { 45e7507f57SSean Wang PIN_FIELD16(0, 278, 0x630, 0x10, 0, 1), 46e7507f57SSean Wang }; 47e7507f57SSean Wang 48e7507f57SSean Wang static const struct mtk_pin_field_calc mt7623_pin_do_range[] = { 49e7507f57SSean Wang PIN_FIELD16(0, 278, 0x500, 0x10, 0, 1), 50e7507f57SSean Wang }; 51e7507f57SSean Wang 52e7507f57SSean Wang static const struct mtk_pin_field_calc mt7623_pin_ies_range[] = { 53e7507f57SSean Wang PINS_FIELD16(0, 6, 0xb20, 0x10, 0, 1), 54e7507f57SSean Wang PINS_FIELD16(7, 9, 0xb20, 0x10, 1, 1), 55e7507f57SSean Wang PINS_FIELD16(10, 13, 0xb30, 0x10, 3, 1), 56e7507f57SSean Wang PINS_FIELD16(14, 15, 0xb30, 0x10, 13, 1), 57e7507f57SSean Wang PINS_FIELD16(16, 17, 0xb40, 0x10, 7, 1), 58e7507f57SSean Wang PINS_FIELD16(18, 29, 0xb40, 0x10, 13, 1), 59e7507f57SSean Wang PINS_FIELD16(30, 32, 0xb40, 0x10, 7, 1), 60e7507f57SSean Wang PINS_FIELD16(33, 37, 0xb40, 0x10, 13, 1), 61e7507f57SSean Wang PIN_FIELD16(38, 38, 0xb20, 0x10, 13, 1), 62e7507f57SSean Wang PINS_FIELD16(39, 42, 0xb40, 0x10, 13, 1), 63e7507f57SSean Wang PINS_FIELD16(43, 45, 0xb20, 0x10, 10, 1), 64e7507f57SSean Wang PINS_FIELD16(47, 48, 0xb20, 0x10, 11, 1), 65e7507f57SSean Wang PIN_FIELD16(49, 49, 0xb20, 0x10, 12, 1), 66e7507f57SSean Wang PINS_FIELD16(50, 52, 0xb20, 0x10, 13, 1), 67e7507f57SSean Wang PINS_FIELD16(53, 56, 0xb20, 0x10, 14, 1), 68e7507f57SSean Wang PINS_FIELD16(57, 58, 0xb20, 0x10, 15, 1), 69e7507f57SSean Wang PIN_FIELD16(59, 59, 0xb30, 0x10, 10, 1), 70e7507f57SSean Wang PINS_FIELD16(60, 62, 0xb30, 0x10, 0, 1), 71e7507f57SSean Wang PINS_FIELD16(63, 65, 0xb30, 0x10, 1, 1), 72e7507f57SSean Wang PINS_FIELD16(66, 71, 0xb30, 0x10, 2, 1), 73e7507f57SSean Wang PINS_FIELD16(72, 74, 0xb20, 0x10, 12, 1), 74e7507f57SSean Wang PINS_FIELD16(75, 76, 0xb30, 0x10, 3, 1), 75e7507f57SSean Wang PINS_FIELD16(77, 78, 0xb30, 0x10, 4, 1), 76e7507f57SSean Wang PINS_FIELD16(79, 82, 0xb30, 0x10, 5, 1), 77e7507f57SSean Wang PINS_FIELD16(83, 84, 0xb30, 0x10, 2, 1), 78e7507f57SSean Wang PIN_FIELD16(85, 85, 0xda0, 0x10, 4, 1), 79e7507f57SSean Wang PIN_FIELD16(86, 86, 0xd90, 0x10, 4, 1), 80e7507f57SSean Wang PINS_FIELD16(87, 90, 0xdb0, 0x10, 4, 1), 81e7507f57SSean Wang PINS_FIELD16(101, 104, 0xb30, 0x10, 6, 1), 82e7507f57SSean Wang PIN_FIELD16(105, 105, 0xd40, 0x10, 4, 1), 83e7507f57SSean Wang PIN_FIELD16(106, 106, 0xd30, 0x10, 4, 1), 84e7507f57SSean Wang PINS_FIELD16(107, 110, 0xd50, 0x10, 4, 1), 85e7507f57SSean Wang PINS_FIELD16(111, 115, 0xce0, 0x10, 4, 1), 86e7507f57SSean Wang PIN_FIELD16(116, 116, 0xcd0, 0x10, 4, 1), 87e7507f57SSean Wang PIN_FIELD16(117, 117, 0xcc0, 0x10, 4, 1), 88e7507f57SSean Wang PINS_FIELD16(118, 121, 0xce0, 0x10, 4, 1), 89e7507f57SSean Wang PINS_FIELD16(122, 125, 0xb30, 0x10, 7, 1), 90e7507f57SSean Wang PIN_FIELD16(126, 126, 0xb20, 0x10, 12, 1), 91e7507f57SSean Wang PINS_FIELD16(127, 142, 0xb30, 0x10, 9, 1), 92e7507f57SSean Wang PINS_FIELD16(143, 160, 0xb30, 0x10, 10, 1), 93e7507f57SSean Wang PINS_FIELD16(161, 168, 0xb30, 0x10, 12, 1), 94e7507f57SSean Wang PINS_FIELD16(169, 183, 0xb30, 0x10, 10, 1), 95e7507f57SSean Wang PINS_FIELD16(184, 186, 0xb30, 0x10, 9, 1), 96e7507f57SSean Wang PIN_FIELD16(187, 187, 0xb30, 0x10, 14, 1), 97e7507f57SSean Wang PIN_FIELD16(188, 188, 0xb20, 0x10, 13, 1), 98e7507f57SSean Wang PINS_FIELD16(189, 193, 0xb30, 0x10, 15, 1), 99e7507f57SSean Wang PINS_FIELD16(194, 198, 0xb40, 0x10, 0, 1), 100e7507f57SSean Wang PIN_FIELD16(199, 199, 0xb20, 0x10, 1, 1), 101e7507f57SSean Wang PINS_FIELD16(200, 202, 0xb40, 0x10, 1, 1), 102e7507f57SSean Wang PINS_FIELD16(203, 207, 0xb40, 0x10, 2, 1), 103e7507f57SSean Wang PINS_FIELD16(208, 209, 0xb40, 0x10, 3, 1), 104e7507f57SSean Wang PIN_FIELD16(210, 210, 0xb40, 0x10, 4, 1), 105e7507f57SSean Wang PINS_FIELD16(211, 235, 0xb40, 0x10, 5, 1), 106e7507f57SSean Wang PINS_FIELD16(236, 241, 0xb40, 0x10, 6, 1), 107e7507f57SSean Wang PINS_FIELD16(242, 243, 0xb40, 0x10, 7, 1), 108e7507f57SSean Wang PINS_FIELD16(244, 247, 0xb40, 0x10, 8, 1), 109e7507f57SSean Wang PIN_FIELD16(248, 248, 0xb40, 0x10, 9, 1), 110e7507f57SSean Wang PINS_FIELD16(249, 257, 0xfc0, 0x10, 4, 1), 111e7507f57SSean Wang PIN_FIELD16(258, 258, 0xcb0, 0x10, 4, 1), 112e7507f57SSean Wang PIN_FIELD16(259, 259, 0xc90, 0x10, 4, 1), 113e7507f57SSean Wang PIN_FIELD16(260, 260, 0x3a0, 0x10, 4, 1), 114e7507f57SSean Wang PIN_FIELD16(261, 261, 0xd50, 0x10, 4, 1), 115e7507f57SSean Wang PINS_FIELD16(262, 277, 0xb40, 0x10, 12, 1), 116e7507f57SSean Wang PIN_FIELD16(278, 278, 0xb40, 0x10, 13, 1), 117e7507f57SSean Wang }; 118e7507f57SSean Wang 119e7507f57SSean Wang static const struct mtk_pin_field_calc mt7623_pin_smt_range[] = { 120e7507f57SSean Wang PINS_FIELD16(0, 6, 0xb50, 0x10, 0, 1), 121e7507f57SSean Wang PINS_FIELD16(7, 9, 0xb50, 0x10, 1, 1), 122e7507f57SSean Wang PINS_FIELD16(10, 13, 0xb60, 0x10, 3, 1), 123e7507f57SSean Wang PINS_FIELD16(14, 15, 0xb60, 0x10, 13, 1), 124e7507f57SSean Wang PINS_FIELD16(16, 17, 0xb70, 0x10, 7, 1), 125e7507f57SSean Wang PINS_FIELD16(18, 29, 0xb70, 0x10, 13, 1), 126e7507f57SSean Wang PINS_FIELD16(30, 32, 0xb70, 0x10, 7, 1), 127e7507f57SSean Wang PINS_FIELD16(33, 37, 0xb70, 0x10, 13, 1), 128e7507f57SSean Wang PIN_FIELD16(38, 38, 0xb50, 0x10, 13, 1), 129e7507f57SSean Wang PINS_FIELD16(39, 42, 0xb70, 0x10, 13, 1), 130e7507f57SSean Wang PINS_FIELD16(43, 45, 0xb50, 0x10, 10, 1), 131e7507f57SSean Wang PINS_FIELD16(47, 48, 0xb50, 0x10, 11, 1), 132e7507f57SSean Wang PIN_FIELD16(49, 49, 0xb50, 0x10, 12, 1), 133e7507f57SSean Wang PINS_FIELD16(50, 52, 0xb50, 0x10, 13, 1), 134e7507f57SSean Wang PINS_FIELD16(53, 56, 0xb50, 0x10, 14, 1), 135e7507f57SSean Wang PINS_FIELD16(57, 58, 0xb50, 0x10, 15, 1), 136e7507f57SSean Wang PIN_FIELD16(59, 59, 0xb60, 0x10, 10, 1), 137e7507f57SSean Wang PINS_FIELD16(60, 62, 0xb60, 0x10, 0, 1), 138e7507f57SSean Wang PINS_FIELD16(63, 65, 0xb60, 0x10, 1, 1), 139e7507f57SSean Wang PINS_FIELD16(66, 71, 0xb60, 0x10, 2, 1), 140e7507f57SSean Wang PINS_FIELD16(72, 74, 0xb50, 0x10, 12, 1), 141e7507f57SSean Wang PINS_FIELD16(75, 76, 0xb60, 0x10, 3, 1), 142e7507f57SSean Wang PINS_FIELD16(77, 78, 0xb60, 0x10, 4, 1), 143e7507f57SSean Wang PINS_FIELD16(79, 82, 0xb60, 0x10, 5, 1), 144e7507f57SSean Wang PINS_FIELD16(83, 84, 0xb60, 0x10, 2, 1), 145e7507f57SSean Wang PIN_FIELD16(85, 85, 0xda0, 0x10, 11, 1), 146e7507f57SSean Wang PIN_FIELD16(86, 86, 0xd90, 0x10, 11, 1), 147e7507f57SSean Wang PIN_FIELD16(87, 87, 0xdc0, 0x10, 3, 1), 148e7507f57SSean Wang PIN_FIELD16(88, 88, 0xdc0, 0x10, 7, 1), 149e7507f57SSean Wang PIN_FIELD16(89, 89, 0xdc0, 0x10, 11, 1), 150e7507f57SSean Wang PIN_FIELD16(90, 90, 0xdc0, 0x10, 15, 1), 151e7507f57SSean Wang PINS_FIELD16(101, 104, 0xb60, 0x10, 6, 1), 152e7507f57SSean Wang PIN_FIELD16(105, 105, 0xd40, 0x10, 11, 1), 153e7507f57SSean Wang PIN_FIELD16(106, 106, 0xd30, 0x10, 11, 1), 154e7507f57SSean Wang PIN_FIELD16(107, 107, 0xd60, 0x10, 3, 1), 155e7507f57SSean Wang PIN_FIELD16(108, 108, 0xd60, 0x10, 7, 1), 156e7507f57SSean Wang PIN_FIELD16(109, 109, 0xd60, 0x10, 11, 1), 157e7507f57SSean Wang PIN_FIELD16(110, 110, 0xd60, 0x10, 15, 1), 158e7507f57SSean Wang PIN_FIELD16(111, 111, 0xd00, 0x10, 15, 1), 159e7507f57SSean Wang PIN_FIELD16(112, 112, 0xd00, 0x10, 11, 1), 160e7507f57SSean Wang PIN_FIELD16(113, 113, 0xd00, 0x10, 7, 1), 161e7507f57SSean Wang PIN_FIELD16(114, 114, 0xd00, 0x10, 3, 1), 162e7507f57SSean Wang PIN_FIELD16(115, 115, 0xd10, 0x10, 3, 1), 163e7507f57SSean Wang PIN_FIELD16(116, 116, 0xcd0, 0x10, 11, 1), 164e7507f57SSean Wang PIN_FIELD16(117, 117, 0xcc0, 0x10, 11, 1), 165e7507f57SSean Wang PIN_FIELD16(118, 118, 0xcf0, 0x10, 15, 1), 166e7507f57SSean Wang PIN_FIELD16(119, 119, 0xcf0, 0x10, 7, 1), 167e7507f57SSean Wang PIN_FIELD16(120, 120, 0xcf0, 0x10, 3, 1), 168e7507f57SSean Wang PIN_FIELD16(121, 121, 0xcf0, 0x10, 7, 1), 169e7507f57SSean Wang PINS_FIELD16(122, 125, 0xb60, 0x10, 7, 1), 170e7507f57SSean Wang PIN_FIELD16(126, 126, 0xb50, 0x10, 12, 1), 171e7507f57SSean Wang PINS_FIELD16(127, 142, 0xb60, 0x10, 9, 1), 172e7507f57SSean Wang PINS_FIELD16(143, 160, 0xb60, 0x10, 10, 1), 173e7507f57SSean Wang PINS_FIELD16(161, 168, 0xb60, 0x10, 12, 1), 174e7507f57SSean Wang PINS_FIELD16(169, 183, 0xb60, 0x10, 10, 1), 175e7507f57SSean Wang PINS_FIELD16(184, 186, 0xb60, 0x10, 9, 1), 176e7507f57SSean Wang PIN_FIELD16(187, 187, 0xb60, 0x10, 14, 1), 177e7507f57SSean Wang PIN_FIELD16(188, 188, 0xb50, 0x10, 13, 1), 178e7507f57SSean Wang PINS_FIELD16(189, 193, 0xb60, 0x10, 15, 1), 179e7507f57SSean Wang PINS_FIELD16(194, 198, 0xb70, 0x10, 0, 1), 180e7507f57SSean Wang PIN_FIELD16(199, 199, 0xb50, 0x10, 1, 1), 181e7507f57SSean Wang PINS_FIELD16(200, 202, 0xb70, 0x10, 1, 1), 182e7507f57SSean Wang PINS_FIELD16(203, 207, 0xb70, 0x10, 2, 1), 183e7507f57SSean Wang PINS_FIELD16(208, 209, 0xb70, 0x10, 3, 1), 184e7507f57SSean Wang PIN_FIELD16(210, 210, 0xb70, 0x10, 4, 1), 185e7507f57SSean Wang PINS_FIELD16(211, 235, 0xb70, 0x10, 5, 1), 186e7507f57SSean Wang PINS_FIELD16(236, 241, 0xb70, 0x10, 6, 1), 187e7507f57SSean Wang PINS_FIELD16(242, 243, 0xb70, 0x10, 7, 1), 188e7507f57SSean Wang PINS_FIELD16(244, 247, 0xb70, 0x10, 8, 1), 189e7507f57SSean Wang PIN_FIELD16(248, 248, 0xb70, 0x10, 9, 10), 190e7507f57SSean Wang PIN_FIELD16(249, 249, 0x140, 0x10, 3, 1), 191e7507f57SSean Wang PIN_FIELD16(250, 250, 0x130, 0x10, 15, 1), 192e7507f57SSean Wang PIN_FIELD16(251, 251, 0x130, 0x10, 11, 1), 193e7507f57SSean Wang PIN_FIELD16(252, 252, 0x130, 0x10, 7, 1), 194e7507f57SSean Wang PIN_FIELD16(253, 253, 0x130, 0x10, 3, 1), 195e7507f57SSean Wang PIN_FIELD16(254, 254, 0xf40, 0x10, 15, 1), 196e7507f57SSean Wang PIN_FIELD16(255, 255, 0xf40, 0x10, 11, 1), 197e7507f57SSean Wang PIN_FIELD16(256, 256, 0xf40, 0x10, 7, 1), 198e7507f57SSean Wang PIN_FIELD16(257, 257, 0xf40, 0x10, 3, 1), 199e7507f57SSean Wang PIN_FIELD16(258, 258, 0xcb0, 0x10, 11, 1), 200e7507f57SSean Wang PIN_FIELD16(259, 259, 0xc90, 0x10, 11, 1), 201e7507f57SSean Wang PIN_FIELD16(260, 260, 0x3a0, 0x10, 11, 1), 202e7507f57SSean Wang PIN_FIELD16(261, 261, 0x0b0, 0x10, 3, 1), 203e7507f57SSean Wang PINS_FIELD16(262, 277, 0xb70, 0x10, 12, 1), 204e7507f57SSean Wang PIN_FIELD16(278, 278, 0xb70, 0x10, 13, 1), 205e7507f57SSean Wang }; 206e7507f57SSean Wang 207e7507f57SSean Wang static const struct mtk_pin_field_calc mt7623_pin_pullen_range[] = { 208e7507f57SSean Wang PIN_FIELD16(0, 278, 0x150, 0x10, 0, 1), 209e7507f57SSean Wang }; 210e7507f57SSean Wang 211e7507f57SSean Wang static const struct mtk_pin_field_calc mt7623_pin_pullsel_range[] = { 212e7507f57SSean Wang PIN_FIELD16(0, 278, 0x280, 0x10, 0, 1), 213e7507f57SSean Wang }; 214e7507f57SSean Wang 215e7507f57SSean Wang static const struct mtk_pin_field_calc mt7623_pin_drv_range[] = { 216e7507f57SSean Wang PINS_FIELD16(0, 6, 0xf50, 0x10, 0, 4), 217e7507f57SSean Wang PINS_FIELD16(7, 9, 0xf50, 0x10, 4, 4), 218e7507f57SSean Wang PINS_FIELD16(10, 13, 0xf50, 0x10, 4, 4), 219e7507f57SSean Wang PINS_FIELD16(14, 15, 0xf50, 0x10, 12, 4), 220e7507f57SSean Wang PINS_FIELD16(16, 17, 0xf60, 0x10, 0, 4), 221e7507f57SSean Wang PINS_FIELD16(18, 21, 0xf60, 0x10, 0, 4), 222e7507f57SSean Wang PINS_FIELD16(22, 26, 0xf60, 0x10, 8, 4), 223e7507f57SSean Wang PINS_FIELD16(27, 29, 0xf60, 0x10, 12, 4), 224e7507f57SSean Wang PINS_FIELD16(30, 32, 0xf60, 0x10, 0, 4), 225e7507f57SSean Wang PINS_FIELD16(33, 37, 0xf70, 0x10, 0, 4), 226e7507f57SSean Wang PIN_FIELD16(38, 38, 0xf70, 0x10, 4, 4), 227e7507f57SSean Wang PINS_FIELD16(39, 42, 0xf70, 0x10, 8, 4), 228e7507f57SSean Wang PINS_FIELD16(43, 45, 0xf70, 0x10, 12, 4), 229e7507f57SSean Wang PINS_FIELD16(47, 48, 0xf80, 0x10, 0, 4), 230e7507f57SSean Wang PIN_FIELD16(49, 49, 0xf80, 0x10, 4, 4), 231e7507f57SSean Wang PINS_FIELD16(50, 52, 0xf70, 0x10, 4, 4), 232e7507f57SSean Wang PINS_FIELD16(53, 56, 0xf80, 0x10, 12, 4), 233e7507f57SSean Wang PINS_FIELD16(60, 62, 0xf90, 0x10, 8, 4), 234e7507f57SSean Wang PINS_FIELD16(63, 65, 0xf90, 0x10, 12, 4), 235e7507f57SSean Wang PINS_FIELD16(66, 71, 0xfa0, 0x10, 0, 4), 236e7507f57SSean Wang PINS_FIELD16(72, 74, 0xf80, 0x10, 4, 4), 237e7507f57SSean Wang PIN_FIELD16(85, 85, 0xda0, 0x10, 0, 4), 238e7507f57SSean Wang PIN_FIELD16(86, 86, 0xd90, 0x10, 0, 4), 239e7507f57SSean Wang PINS_FIELD16(87, 90, 0xdb0, 0x10, 0, 4), 240e7507f57SSean Wang PIN_FIELD16(105, 105, 0xd40, 0x10, 0, 4), 241e7507f57SSean Wang PIN_FIELD16(106, 106, 0xd30, 0x10, 0, 4), 242e7507f57SSean Wang PINS_FIELD16(107, 110, 0xd50, 0x10, 0, 4), 243e7507f57SSean Wang PINS_FIELD16(111, 115, 0xce0, 0x10, 0, 4), 244e7507f57SSean Wang PIN_FIELD16(116, 116, 0xcd0, 0x10, 0, 4), 245e7507f57SSean Wang PIN_FIELD16(117, 117, 0xcc0, 0x10, 0, 4), 246e7507f57SSean Wang PINS_FIELD16(118, 121, 0xce0, 0x10, 0, 4), 247e7507f57SSean Wang PIN_FIELD16(126, 126, 0xf80, 0x10, 4, 4), 248e7507f57SSean Wang PIN_FIELD16(188, 188, 0xf70, 0x10, 4, 4), 249e7507f57SSean Wang PINS_FIELD16(189, 193, 0xfe0, 0x10, 8, 4), 250e7507f57SSean Wang PINS_FIELD16(194, 198, 0xfe0, 0x10, 12, 4), 251e7507f57SSean Wang PIN_FIELD16(199, 199, 0xf50, 0x10, 4, 4), 252e7507f57SSean Wang PINS_FIELD16(200, 202, 0xfd0, 0x10, 0, 4), 253e7507f57SSean Wang PINS_FIELD16(203, 207, 0xfd0, 0x10, 4, 4), 254e7507f57SSean Wang PINS_FIELD16(208, 209, 0xfd0, 0x10, 8, 4), 255e7507f57SSean Wang PIN_FIELD16(210, 210, 0xfd0, 0x10, 12, 4), 256e7507f57SSean Wang PINS_FIELD16(211, 235, 0xff0, 0x10, 0, 4), 257e7507f57SSean Wang PINS_FIELD16(236, 241, 0xff0, 0x10, 4, 4), 258e7507f57SSean Wang PINS_FIELD16(242, 243, 0xff0, 0x10, 8, 4), 259e7507f57SSean Wang PIN_FIELD16(248, 248, 0xf00, 0x10, 0, 4), 260e7507f57SSean Wang PINS_FIELD16(249, 256, 0xfc0, 0x10, 0, 4), 261e7507f57SSean Wang PIN_FIELD16(257, 257, 0xce0, 0x10, 0, 4), 262e7507f57SSean Wang PIN_FIELD16(258, 258, 0xcb0, 0x10, 0, 4), 263e7507f57SSean Wang PIN_FIELD16(259, 259, 0xc90, 0x10, 0, 4), 264e7507f57SSean Wang PIN_FIELD16(260, 260, 0x3a0, 0x10, 0, 4), 265e7507f57SSean Wang PIN_FIELD16(261, 261, 0xd50, 0x10, 0, 4), 266e7507f57SSean Wang PINS_FIELD16(262, 277, 0xf00, 0x10, 8, 4), 267e7507f57SSean Wang PIN_FIELD16(278, 278, 0xf70, 0x10, 8, 4), 268e7507f57SSean Wang }; 269e7507f57SSean Wang 270e7507f57SSean Wang static const struct mtk_pin_field_calc mt7623_pin_tdsel_range[] = { 271e7507f57SSean Wang PINS_FIELD16(262, 276, 0x4c0, 0x10, 0, 4), 272e7507f57SSean Wang }; 273e7507f57SSean Wang 274e7507f57SSean Wang static const struct mtk_pin_field_calc mt7623_pin_pupd_range[] = { 275e7507f57SSean Wang /* MSDC0 */ 276e7507f57SSean Wang PIN_FIELD16(111, 111, 0xd00, 0x10, 12, 1), 277e7507f57SSean Wang PIN_FIELD16(112, 112, 0xd00, 0x10, 8, 1), 278e7507f57SSean Wang PIN_FIELD16(113, 113, 0xd00, 0x10, 4, 1), 279e7507f57SSean Wang PIN_FIELD16(114, 114, 0xd00, 0x10, 0, 1), 280e7507f57SSean Wang PIN_FIELD16(115, 115, 0xd10, 0x10, 0, 1), 281e7507f57SSean Wang PIN_FIELD16(116, 116, 0xcd0, 0x10, 8, 1), 282e7507f57SSean Wang PIN_FIELD16(117, 117, 0xcc0, 0x10, 8, 1), 283e7507f57SSean Wang PIN_FIELD16(118, 118, 0xcf0, 0x10, 12, 1), 284e7507f57SSean Wang PIN_FIELD16(119, 119, 0xcf0, 0x10, 8, 1), 285e7507f57SSean Wang PIN_FIELD16(120, 120, 0xcf0, 0x10, 4, 1), 286e7507f57SSean Wang PIN_FIELD16(121, 121, 0xcf0, 0x10, 0, 1), 287e7507f57SSean Wang /* MSDC1 */ 288e7507f57SSean Wang PIN_FIELD16(105, 105, 0xd40, 0x10, 8, 1), 289e7507f57SSean Wang PIN_FIELD16(106, 106, 0xd30, 0x10, 8, 1), 290e7507f57SSean Wang PIN_FIELD16(107, 107, 0xd60, 0x10, 0, 1), 291e7507f57SSean Wang PIN_FIELD16(108, 108, 0xd60, 0x10, 10, 1), 292e7507f57SSean Wang PIN_FIELD16(109, 109, 0xd60, 0x10, 4, 1), 293e7507f57SSean Wang PIN_FIELD16(110, 110, 0xc60, 0x10, 12, 1), 294e7507f57SSean Wang /* MSDC1 */ 295e7507f57SSean Wang PIN_FIELD16(85, 85, 0xda0, 0x10, 8, 1), 296e7507f57SSean Wang PIN_FIELD16(86, 86, 0xd90, 0x10, 8, 1), 297e7507f57SSean Wang PIN_FIELD16(87, 87, 0xdc0, 0x10, 0, 1), 298e7507f57SSean Wang PIN_FIELD16(88, 88, 0xdc0, 0x10, 10, 1), 299e7507f57SSean Wang PIN_FIELD16(89, 89, 0xdc0, 0x10, 4, 1), 300e7507f57SSean Wang PIN_FIELD16(90, 90, 0xdc0, 0x10, 12, 1), 301e7507f57SSean Wang /* MSDC0E */ 302e7507f57SSean Wang PIN_FIELD16(249, 249, 0x140, 0x10, 0, 1), 303e7507f57SSean Wang PIN_FIELD16(250, 250, 0x130, 0x10, 12, 1), 304e7507f57SSean Wang PIN_FIELD16(251, 251, 0x130, 0x10, 8, 1), 305e7507f57SSean Wang PIN_FIELD16(252, 252, 0x130, 0x10, 4, 1), 306e7507f57SSean Wang PIN_FIELD16(253, 253, 0x130, 0x10, 0, 1), 307e7507f57SSean Wang PIN_FIELD16(254, 254, 0xf40, 0x10, 12, 1), 308e7507f57SSean Wang PIN_FIELD16(255, 255, 0xf40, 0x10, 8, 1), 309e7507f57SSean Wang PIN_FIELD16(256, 256, 0xf40, 0x10, 4, 1), 310e7507f57SSean Wang PIN_FIELD16(257, 257, 0xf40, 0x10, 0, 1), 311e7507f57SSean Wang PIN_FIELD16(258, 258, 0xcb0, 0x10, 8, 1), 312e7507f57SSean Wang PIN_FIELD16(259, 259, 0xc90, 0x10, 8, 1), 313e7507f57SSean Wang PIN_FIELD16(261, 261, 0x140, 0x10, 8, 1), 314e7507f57SSean Wang }; 315e7507f57SSean Wang 316e7507f57SSean Wang static const struct mtk_pin_field_calc mt7623_pin_r1_range[] = { 317e7507f57SSean Wang /* MSDC0 */ 318e7507f57SSean Wang PIN_FIELD16(111, 111, 0xd00, 0x10, 13, 1), 319e7507f57SSean Wang PIN_FIELD16(112, 112, 0xd00, 0x10, 9, 1), 320e7507f57SSean Wang PIN_FIELD16(113, 113, 0xd00, 0x10, 5, 1), 321e7507f57SSean Wang PIN_FIELD16(114, 114, 0xd00, 0x10, 1, 1), 322e7507f57SSean Wang PIN_FIELD16(115, 115, 0xd10, 0x10, 1, 1), 323e7507f57SSean Wang PIN_FIELD16(116, 116, 0xcd0, 0x10, 9, 1), 324e7507f57SSean Wang PIN_FIELD16(117, 117, 0xcc0, 0x10, 9, 1), 325e7507f57SSean Wang PIN_FIELD16(118, 118, 0xcf0, 0x10, 13, 1), 326e7507f57SSean Wang PIN_FIELD16(119, 119, 0xcf0, 0x10, 9, 1), 327e7507f57SSean Wang PIN_FIELD16(120, 120, 0xcf0, 0x10, 5, 1), 328e7507f57SSean Wang PIN_FIELD16(121, 121, 0xcf0, 0x10, 1, 1), 329e7507f57SSean Wang /* MSDC1 */ 330e7507f57SSean Wang PIN_FIELD16(105, 105, 0xd40, 0x10, 9, 1), 331e7507f57SSean Wang PIN_FIELD16(106, 106, 0xd30, 0x10, 9, 1), 332e7507f57SSean Wang PIN_FIELD16(107, 107, 0xd60, 0x10, 1, 1), 333e7507f57SSean Wang PIN_FIELD16(108, 108, 0xd60, 0x10, 9, 1), 334e7507f57SSean Wang PIN_FIELD16(109, 109, 0xd60, 0x10, 5, 1), 335e7507f57SSean Wang PIN_FIELD16(110, 110, 0xc60, 0x10, 13, 1), 336e7507f57SSean Wang /* MSDC2 */ 337e7507f57SSean Wang PIN_FIELD16(85, 85, 0xda0, 0x10, 9, 1), 338e7507f57SSean Wang PIN_FIELD16(86, 86, 0xd90, 0x10, 9, 1), 339e7507f57SSean Wang PIN_FIELD16(87, 87, 0xdc0, 0x10, 1, 1), 340e7507f57SSean Wang PIN_FIELD16(88, 88, 0xdc0, 0x10, 9, 1), 341e7507f57SSean Wang PIN_FIELD16(89, 89, 0xdc0, 0x10, 5, 1), 342e7507f57SSean Wang PIN_FIELD16(90, 90, 0xdc0, 0x10, 13, 1), 343e7507f57SSean Wang /* MSDC0E */ 344e7507f57SSean Wang PIN_FIELD16(249, 249, 0x140, 0x10, 1, 1), 345e7507f57SSean Wang PIN_FIELD16(250, 250, 0x130, 0x10, 13, 1), 346e7507f57SSean Wang PIN_FIELD16(251, 251, 0x130, 0x10, 9, 1), 347e7507f57SSean Wang PIN_FIELD16(252, 252, 0x130, 0x10, 5, 1), 348e7507f57SSean Wang PIN_FIELD16(253, 253, 0x130, 0x10, 1, 1), 349e7507f57SSean Wang PIN_FIELD16(254, 254, 0xf40, 0x10, 13, 1), 350e7507f57SSean Wang PIN_FIELD16(255, 255, 0xf40, 0x10, 9, 1), 351e7507f57SSean Wang PIN_FIELD16(256, 256, 0xf40, 0x10, 5, 1), 352e7507f57SSean Wang PIN_FIELD16(257, 257, 0xf40, 0x10, 1, 1), 353e7507f57SSean Wang PIN_FIELD16(258, 258, 0xcb0, 0x10, 9, 1), 354e7507f57SSean Wang PIN_FIELD16(259, 259, 0xc90, 0x10, 9, 1), 355e7507f57SSean Wang PIN_FIELD16(261, 261, 0x140, 0x10, 9, 1), 356e7507f57SSean Wang }; 357e7507f57SSean Wang 358e7507f57SSean Wang static const struct mtk_pin_field_calc mt7623_pin_r0_range[] = { 359e7507f57SSean Wang /* MSDC0 */ 360e7507f57SSean Wang PIN_FIELD16(111, 111, 0xd00, 0x10, 14, 1), 361e7507f57SSean Wang PIN_FIELD16(112, 112, 0xd00, 0x10, 10, 1), 362e7507f57SSean Wang PIN_FIELD16(113, 113, 0xd00, 0x10, 6, 1), 363e7507f57SSean Wang PIN_FIELD16(114, 114, 0xd00, 0x10, 2, 1), 364e7507f57SSean Wang PIN_FIELD16(115, 115, 0xd10, 0x10, 2, 1), 365e7507f57SSean Wang PIN_FIELD16(116, 116, 0xcd0, 0x10, 10, 1), 366e7507f57SSean Wang PIN_FIELD16(117, 117, 0xcc0, 0x10, 10, 1), 367e7507f57SSean Wang PIN_FIELD16(118, 118, 0xcf0, 0x10, 14, 1), 368e7507f57SSean Wang PIN_FIELD16(119, 119, 0xcf0, 0x10, 10, 1), 369e7507f57SSean Wang PIN_FIELD16(120, 120, 0xcf0, 0x10, 6, 1), 370e7507f57SSean Wang PIN_FIELD16(121, 121, 0xcf0, 0x10, 2, 1), 371e7507f57SSean Wang /* MSDC1 */ 372e7507f57SSean Wang PIN_FIELD16(105, 105, 0xd40, 0x10, 10, 1), 373e7507f57SSean Wang PIN_FIELD16(106, 106, 0xd30, 0x10, 10, 1), 374e7507f57SSean Wang PIN_FIELD16(107, 107, 0xd60, 0x10, 2, 1), 375e7507f57SSean Wang PIN_FIELD16(108, 108, 0xd60, 0x10, 8, 1), 376e7507f57SSean Wang PIN_FIELD16(109, 109, 0xd60, 0x10, 6, 1), 377e7507f57SSean Wang PIN_FIELD16(110, 110, 0xc60, 0x10, 14, 1), 378e7507f57SSean Wang /* MSDC2 */ 379e7507f57SSean Wang PIN_FIELD16(85, 85, 0xda0, 0x10, 10, 1), 380e7507f57SSean Wang PIN_FIELD16(86, 86, 0xd90, 0x10, 10, 1), 381e7507f57SSean Wang PIN_FIELD16(87, 87, 0xdc0, 0x10, 2, 1), 382e7507f57SSean Wang PIN_FIELD16(88, 88, 0xdc0, 0x10, 8, 1), 383e7507f57SSean Wang PIN_FIELD16(89, 89, 0xdc0, 0x10, 6, 1), 384e7507f57SSean Wang PIN_FIELD16(90, 90, 0xdc0, 0x10, 14, 1), 385e7507f57SSean Wang /* MSDC0E */ 386e7507f57SSean Wang PIN_FIELD16(249, 249, 0x140, 0x10, 2, 1), 387e7507f57SSean Wang PIN_FIELD16(250, 250, 0x130, 0x10, 14, 1), 388e7507f57SSean Wang PIN_FIELD16(251, 251, 0x130, 0x10, 10, 1), 389e7507f57SSean Wang PIN_FIELD16(252, 252, 0x130, 0x10, 6, 1), 390e7507f57SSean Wang PIN_FIELD16(253, 253, 0x130, 0x10, 2, 1), 391e7507f57SSean Wang PIN_FIELD16(254, 254, 0xf40, 0x10, 14, 1), 392e7507f57SSean Wang PIN_FIELD16(255, 255, 0xf40, 0x10, 10, 1), 393e7507f57SSean Wang PIN_FIELD16(256, 256, 0xf40, 0x10, 6, 1), 394e7507f57SSean Wang PIN_FIELD16(257, 257, 0xf40, 0x10, 5, 1), 395e7507f57SSean Wang PIN_FIELD16(258, 258, 0xcb0, 0x10, 10, 1), 396e7507f57SSean Wang PIN_FIELD16(259, 259, 0xc90, 0x10, 10, 1), 397e7507f57SSean Wang PIN_FIELD16(261, 261, 0x140, 0x10, 10, 1), 398e7507f57SSean Wang }; 399e7507f57SSean Wang 400e7507f57SSean Wang static const struct mtk_pin_reg_calc mt7623_reg_cals[] = { 401e7507f57SSean Wang [PINCTRL_PIN_REG_MODE] = MTK_RANGE(mt7623_pin_mode_range), 402e7507f57SSean Wang [PINCTRL_PIN_REG_DIR] = MTK_RANGE(mt7623_pin_dir_range), 403e7507f57SSean Wang [PINCTRL_PIN_REG_DI] = MTK_RANGE(mt7623_pin_di_range), 404e7507f57SSean Wang [PINCTRL_PIN_REG_DO] = MTK_RANGE(mt7623_pin_do_range), 405e7507f57SSean Wang [PINCTRL_PIN_REG_SMT] = MTK_RANGE(mt7623_pin_smt_range), 406e7507f57SSean Wang [PINCTRL_PIN_REG_PULLSEL] = MTK_RANGE(mt7623_pin_pullsel_range), 407e7507f57SSean Wang [PINCTRL_PIN_REG_PULLEN] = MTK_RANGE(mt7623_pin_pullen_range), 408e7507f57SSean Wang [PINCTRL_PIN_REG_DRV] = MTK_RANGE(mt7623_pin_drv_range), 409e7507f57SSean Wang [PINCTRL_PIN_REG_TDSEL] = MTK_RANGE(mt7623_pin_tdsel_range), 410e7507f57SSean Wang [PINCTRL_PIN_REG_IES] = MTK_RANGE(mt7623_pin_ies_range), 411e7507f57SSean Wang [PINCTRL_PIN_REG_PUPD] = MTK_RANGE(mt7623_pin_pupd_range), 412e7507f57SSean Wang [PINCTRL_PIN_REG_R0] = MTK_RANGE(mt7623_pin_r0_range), 413e7507f57SSean Wang [PINCTRL_PIN_REG_R1] = MTK_RANGE(mt7623_pin_r1_range), 414e7507f57SSean Wang }; 415e7507f57SSean Wang 416e7507f57SSean Wang static const struct mtk_pin_desc mt7623_pins[] = { 417e7507f57SSean Wang MT7623_PIN(0, "PWRAP_SPI0_MI", 148, DRV_GRP3), 418e7507f57SSean Wang MT7623_PIN(1, "PWRAP_SPI0_MO", 149, DRV_GRP3), 419e7507f57SSean Wang MT7623_PIN(2, "PWRAP_INT", 150, DRV_GRP3), 420e7507f57SSean Wang MT7623_PIN(3, "PWRAP_SPI0_CK", 151, DRV_GRP3), 421e7507f57SSean Wang MT7623_PIN(4, "PWRAP_SPI0_CSN", 152, DRV_GRP3), 422e7507f57SSean Wang MT7623_PIN(5, "PWRAP_SPI0_CK2", 153, DRV_GRP3), 423e7507f57SSean Wang MT7623_PIN(6, "PWRAP_SPI0_CSN2", 154, DRV_GRP3), 424e7507f57SSean Wang MT7623_PIN(7, "SPI1_CSN", 155, DRV_GRP3), 425e7507f57SSean Wang MT7623_PIN(8, "SPI1_MI", 156, DRV_GRP3), 426e7507f57SSean Wang MT7623_PIN(9, "SPI1_MO", 157, DRV_GRP3), 427e7507f57SSean Wang MT7623_PIN(10, "RTC32K_CK", 158, DRV_GRP3), 428e7507f57SSean Wang MT7623_PIN(11, "WATCHDOG", 159, DRV_GRP3), 429e7507f57SSean Wang MT7623_PIN(12, "SRCLKENA", 160, DRV_GRP3), 430e7507f57SSean Wang MT7623_PIN(13, "SRCLKENAI", 161, DRV_GRP3), 431e7507f57SSean Wang MT7623_PIN(14, "URXD2", 162, DRV_GRP1), 432e7507f57SSean Wang MT7623_PIN(15, "UTXD2", 163, DRV_GRP1), 433e7507f57SSean Wang MT7623_PIN(16, "I2S5_DATA_IN", 164, DRV_GRP1), 434e7507f57SSean Wang MT7623_PIN(17, "I2S5_BCK", 165, DRV_GRP1), 435e7507f57SSean Wang MT7623_PIN(18, "PCM_CLK", 166, DRV_GRP1), 436e7507f57SSean Wang MT7623_PIN(19, "PCM_SYNC", 167, DRV_GRP1), 437e7507f57SSean Wang MT7623_PIN(20, "PCM_RX", EINT_NA, DRV_GRP1), 438e7507f57SSean Wang MT7623_PIN(21, "PCM_TX", EINT_NA, DRV_GRP1), 439e7507f57SSean Wang MT7623_PIN(22, "EINT0", 0, DRV_GRP1), 440e7507f57SSean Wang MT7623_PIN(23, "EINT1", 1, DRV_GRP1), 441e7507f57SSean Wang MT7623_PIN(24, "EINT2", 2, DRV_GRP1), 442e7507f57SSean Wang MT7623_PIN(25, "EINT3", 3, DRV_GRP1), 443e7507f57SSean Wang MT7623_PIN(26, "EINT4", 4, DRV_GRP1), 444e7507f57SSean Wang MT7623_PIN(27, "EINT5", 5, DRV_GRP1), 445e7507f57SSean Wang MT7623_PIN(28, "EINT6", 6, DRV_GRP1), 446e7507f57SSean Wang MT7623_PIN(29, "EINT7", 7, DRV_GRP1), 447e7507f57SSean Wang MT7623_PIN(30, "I2S5_LRCK", 12, DRV_GRP1), 448e7507f57SSean Wang MT7623_PIN(31, "I2S5_MCLK", 13, DRV_GRP1), 449e7507f57SSean Wang MT7623_PIN(32, "I2S5_DATA", 14, DRV_GRP1), 450e7507f57SSean Wang MT7623_PIN(33, "I2S1_DATA", 15, DRV_GRP1), 451e7507f57SSean Wang MT7623_PIN(34, "I2S1_DATA_IN", 16, DRV_GRP1), 452e7507f57SSean Wang MT7623_PIN(35, "I2S1_BCK", 17, DRV_GRP1), 453e7507f57SSean Wang MT7623_PIN(36, "I2S1_LRCK", 18, DRV_GRP1), 454e7507f57SSean Wang MT7623_PIN(37, "I2S1_MCLK", 19, DRV_GRP1), 455e7507f57SSean Wang MT7623_PIN(38, "I2S2_DATA", 20, DRV_GRP1), 456e7507f57SSean Wang MT7623_PIN(39, "JTMS", 21, DRV_GRP3), 457e7507f57SSean Wang MT7623_PIN(40, "JTCK", 22, DRV_GRP3), 458e7507f57SSean Wang MT7623_PIN(41, "JTDI", 23, DRV_GRP3), 459e7507f57SSean Wang MT7623_PIN(42, "JTDO", 24, DRV_GRP3), 460e7507f57SSean Wang MT7623_PIN(43, "NCLE", 25, DRV_GRP1), 461e7507f57SSean Wang MT7623_PIN(44, "NCEB1", 26, DRV_GRP1), 462e7507f57SSean Wang MT7623_PIN(45, "NCEB0", 27, DRV_GRP1), 463e7507f57SSean Wang MT7623_PIN(46, "IR", 28, DRV_FIXED), 464e7507f57SSean Wang MT7623_PIN(47, "NREB", 29, DRV_GRP1), 465e7507f57SSean Wang MT7623_PIN(48, "NRNB", 30, DRV_GRP1), 466e7507f57SSean Wang MT7623_PIN(49, "I2S0_DATA", 31, DRV_GRP1), 467e7507f57SSean Wang MT7623_PIN(50, "I2S2_BCK", 32, DRV_GRP1), 468e7507f57SSean Wang MT7623_PIN(51, "I2S2_DATA_IN", 33, DRV_GRP1), 469e7507f57SSean Wang MT7623_PIN(52, "I2S2_LRCK", 34, DRV_GRP1), 470e7507f57SSean Wang MT7623_PIN(53, "SPI0_CSN", 35, DRV_GRP1), 471e7507f57SSean Wang MT7623_PIN(54, "SPI0_CK", 36, DRV_GRP1), 472e7507f57SSean Wang MT7623_PIN(55, "SPI0_MI", 37, DRV_GRP1), 473e7507f57SSean Wang MT7623_PIN(56, "SPI0_MO", 38, DRV_GRP1), 474e7507f57SSean Wang MT7623_PIN(57, "SDA1", 39, DRV_FIXED), 475e7507f57SSean Wang MT7623_PIN(58, "SCL1", 40, DRV_FIXED), 476e7507f57SSean Wang MT7623_PIN(59, "RAMBUF_I_CLK", EINT_NA, DRV_FIXED), 477e7507f57SSean Wang MT7623_PIN(60, "WB_RSTB", 41, DRV_GRP3), 478e7507f57SSean Wang MT7623_PIN(61, "F2W_DATA", 42, DRV_GRP3), 479e7507f57SSean Wang MT7623_PIN(62, "F2W_CLK", 43, DRV_GRP3), 480e7507f57SSean Wang MT7623_PIN(63, "WB_SCLK", 44, DRV_GRP3), 481e7507f57SSean Wang MT7623_PIN(64, "WB_SDATA", 45, DRV_GRP3), 482e7507f57SSean Wang MT7623_PIN(65, "WB_SEN", 46, DRV_GRP3), 483e7507f57SSean Wang MT7623_PIN(66, "WB_CRTL0", 47, DRV_GRP3), 484e7507f57SSean Wang MT7623_PIN(67, "WB_CRTL1", 48, DRV_GRP3), 485e7507f57SSean Wang MT7623_PIN(68, "WB_CRTL2", 49, DRV_GRP3), 486e7507f57SSean Wang MT7623_PIN(69, "WB_CRTL3", 50, DRV_GRP3), 487e7507f57SSean Wang MT7623_PIN(70, "WB_CRTL4", 51, DRV_GRP3), 488e7507f57SSean Wang MT7623_PIN(71, "WB_CRTL5", 52, DRV_GRP3), 489e7507f57SSean Wang MT7623_PIN(72, "I2S0_DATA_IN", 53, DRV_GRP1), 490e7507f57SSean Wang MT7623_PIN(73, "I2S0_LRCK", 54, DRV_GRP1), 491e7507f57SSean Wang MT7623_PIN(74, "I2S0_BCK", 55, DRV_GRP1), 492e7507f57SSean Wang MT7623_PIN(75, "SDA0", 56, DRV_FIXED), 493e7507f57SSean Wang MT7623_PIN(76, "SCL0", 57, DRV_FIXED), 494e7507f57SSean Wang MT7623_PIN(77, "SDA2", 58, DRV_FIXED), 495e7507f57SSean Wang MT7623_PIN(78, "SCL2", 59, DRV_FIXED), 496e7507f57SSean Wang MT7623_PIN(79, "URXD0", 60, DRV_FIXED), 497e7507f57SSean Wang MT7623_PIN(80, "UTXD0", 61, DRV_FIXED), 498e7507f57SSean Wang MT7623_PIN(81, "URXD1", 62, DRV_FIXED), 499e7507f57SSean Wang MT7623_PIN(82, "UTXD1", 63, DRV_FIXED), 500e7507f57SSean Wang MT7623_PIN(83, "LCM_RST", 64, DRV_FIXED), 501e7507f57SSean Wang MT7623_PIN(84, "DSI_TE", 65, DRV_FIXED), 502e7507f57SSean Wang MT7623_PIN(85, "MSDC2_CMD", 66, DRV_GRP4), 503e7507f57SSean Wang MT7623_PIN(86, "MSDC2_CLK", 67, DRV_GRP4), 504e7507f57SSean Wang MT7623_PIN(87, "MSDC2_DAT0", 68, DRV_GRP4), 505e7507f57SSean Wang MT7623_PIN(88, "MSDC2_DAT1", 69, DRV_GRP4), 506e7507f57SSean Wang MT7623_PIN(89, "MSDC2_DAT2", 70, DRV_GRP4), 507e7507f57SSean Wang MT7623_PIN(90, "MSDC2_DAT3", 71, DRV_GRP4), 508e7507f57SSean Wang MT7623_PIN(91, "TDN3", EINT_NA, DRV_FIXED), 509e7507f57SSean Wang MT7623_PIN(92, "TDP3", EINT_NA, DRV_FIXED), 510e7507f57SSean Wang MT7623_PIN(93, "TDN2", EINT_NA, DRV_FIXED), 511e7507f57SSean Wang MT7623_PIN(94, "TDP2", EINT_NA, DRV_FIXED), 512e7507f57SSean Wang MT7623_PIN(95, "TCN", EINT_NA, DRV_FIXED), 513e7507f57SSean Wang MT7623_PIN(96, "TCP", EINT_NA, DRV_FIXED), 514e7507f57SSean Wang MT7623_PIN(97, "TDN1", EINT_NA, DRV_FIXED), 515e7507f57SSean Wang MT7623_PIN(98, "TDP1", EINT_NA, DRV_FIXED), 516e7507f57SSean Wang MT7623_PIN(99, "TDN0", EINT_NA, DRV_FIXED), 517e7507f57SSean Wang MT7623_PIN(100, "TDP0", EINT_NA, DRV_FIXED), 518e7507f57SSean Wang MT7623_PIN(101, "SPI2_CSN", 74, DRV_FIXED), 519e7507f57SSean Wang MT7623_PIN(102, "SPI2_MI", 75, DRV_FIXED), 520e7507f57SSean Wang MT7623_PIN(103, "SPI2_MO", 76, DRV_FIXED), 521e7507f57SSean Wang MT7623_PIN(104, "SPI2_CLK", 77, DRV_FIXED), 522e7507f57SSean Wang MT7623_PIN(105, "MSDC1_CMD", 78, DRV_GRP4), 523e7507f57SSean Wang MT7623_PIN(106, "MSDC1_CLK", 79, DRV_GRP4), 524e7507f57SSean Wang MT7623_PIN(107, "MSDC1_DAT0", 80, DRV_GRP4), 525e7507f57SSean Wang MT7623_PIN(108, "MSDC1_DAT1", 81, DRV_GRP4), 526e7507f57SSean Wang MT7623_PIN(109, "MSDC1_DAT2", 82, DRV_GRP4), 527e7507f57SSean Wang MT7623_PIN(110, "MSDC1_DAT3", 83, DRV_GRP4), 528e7507f57SSean Wang MT7623_PIN(111, "MSDC0_DAT7", 84, DRV_GRP4), 529e7507f57SSean Wang MT7623_PIN(112, "MSDC0_DAT6", 85, DRV_GRP4), 530e7507f57SSean Wang MT7623_PIN(113, "MSDC0_DAT5", 86, DRV_GRP4), 531e7507f57SSean Wang MT7623_PIN(114, "MSDC0_DAT4", 87, DRV_GRP4), 532e7507f57SSean Wang MT7623_PIN(115, "MSDC0_RSTB", 88, DRV_GRP4), 533e7507f57SSean Wang MT7623_PIN(116, "MSDC0_CMD", 89, DRV_GRP4), 534e7507f57SSean Wang MT7623_PIN(117, "MSDC0_CLK", 90, DRV_GRP4), 535e7507f57SSean Wang MT7623_PIN(118, "MSDC0_DAT3", 91, DRV_GRP4), 536e7507f57SSean Wang MT7623_PIN(119, "MSDC0_DAT2", 92, DRV_GRP4), 537e7507f57SSean Wang MT7623_PIN(120, "MSDC0_DAT1", 93, DRV_GRP4), 538e7507f57SSean Wang MT7623_PIN(121, "MSDC0_DAT0", 94, DRV_GRP4), 539e7507f57SSean Wang MT7623_PIN(122, "CEC", 95, DRV_FIXED), 540e7507f57SSean Wang MT7623_PIN(123, "HTPLG", 96, DRV_FIXED), 541e7507f57SSean Wang MT7623_PIN(124, "HDMISCK", 97, DRV_FIXED), 542e7507f57SSean Wang MT7623_PIN(125, "HDMISD", 98, DRV_FIXED), 543e7507f57SSean Wang MT7623_PIN(126, "I2S0_MCLK", 99, DRV_GRP1), 544e7507f57SSean Wang MT7623_PIN(127, "RAMBUF_IDATA0", EINT_NA, DRV_FIXED), 545e7507f57SSean Wang MT7623_PIN(128, "RAMBUF_IDATA1", EINT_NA, DRV_FIXED), 546e7507f57SSean Wang MT7623_PIN(129, "RAMBUF_IDATA2", EINT_NA, DRV_FIXED), 547e7507f57SSean Wang MT7623_PIN(130, "RAMBUF_IDATA3", EINT_NA, DRV_FIXED), 548e7507f57SSean Wang MT7623_PIN(131, "RAMBUF_IDATA4", EINT_NA, DRV_FIXED), 549e7507f57SSean Wang MT7623_PIN(132, "RAMBUF_IDATA5", EINT_NA, DRV_FIXED), 550e7507f57SSean Wang MT7623_PIN(133, "RAMBUF_IDATA6", EINT_NA, DRV_FIXED), 551e7507f57SSean Wang MT7623_PIN(134, "RAMBUF_IDATA7", EINT_NA, DRV_FIXED), 552e7507f57SSean Wang MT7623_PIN(135, "RAMBUF_IDATA8", EINT_NA, DRV_FIXED), 553e7507f57SSean Wang MT7623_PIN(136, "RAMBUF_IDATA9", EINT_NA, DRV_FIXED), 554e7507f57SSean Wang MT7623_PIN(137, "RAMBUF_IDATA10", EINT_NA, DRV_FIXED), 555e7507f57SSean Wang MT7623_PIN(138, "RAMBUF_IDATA11", EINT_NA, DRV_FIXED), 556e7507f57SSean Wang MT7623_PIN(139, "RAMBUF_IDATA12", EINT_NA, DRV_FIXED), 557e7507f57SSean Wang MT7623_PIN(140, "RAMBUF_IDATA13", EINT_NA, DRV_FIXED), 558e7507f57SSean Wang MT7623_PIN(141, "RAMBUF_IDATA14", EINT_NA, DRV_FIXED), 559e7507f57SSean Wang MT7623_PIN(142, "RAMBUF_IDATA15", EINT_NA, DRV_FIXED), 560e7507f57SSean Wang MT7623_PIN(143, "RAMBUF_ODATA0", EINT_NA, DRV_FIXED), 561e7507f57SSean Wang MT7623_PIN(144, "RAMBUF_ODATA1", EINT_NA, DRV_FIXED), 562e7507f57SSean Wang MT7623_PIN(145, "RAMBUF_ODATA2", EINT_NA, DRV_FIXED), 563e7507f57SSean Wang MT7623_PIN(146, "RAMBUF_ODATA3", EINT_NA, DRV_FIXED), 564e7507f57SSean Wang MT7623_PIN(147, "RAMBUF_ODATA4", EINT_NA, DRV_FIXED), 565e7507f57SSean Wang MT7623_PIN(148, "RAMBUF_ODATA5", EINT_NA, DRV_FIXED), 566e7507f57SSean Wang MT7623_PIN(149, "RAMBUF_ODATA6", EINT_NA, DRV_FIXED), 567e7507f57SSean Wang MT7623_PIN(150, "RAMBUF_ODATA7", EINT_NA, DRV_FIXED), 568e7507f57SSean Wang MT7623_PIN(151, "RAMBUF_ODATA8", EINT_NA, DRV_FIXED), 569e7507f57SSean Wang MT7623_PIN(152, "RAMBUF_ODATA9", EINT_NA, DRV_FIXED), 570e7507f57SSean Wang MT7623_PIN(153, "RAMBUF_ODATA10", EINT_NA, DRV_FIXED), 571e7507f57SSean Wang MT7623_PIN(154, "RAMBUF_ODATA11", EINT_NA, DRV_FIXED), 572e7507f57SSean Wang MT7623_PIN(155, "RAMBUF_ODATA12", EINT_NA, DRV_FIXED), 573e7507f57SSean Wang MT7623_PIN(156, "RAMBUF_ODATA13", EINT_NA, DRV_FIXED), 574e7507f57SSean Wang MT7623_PIN(157, "RAMBUF_ODATA14", EINT_NA, DRV_FIXED), 575e7507f57SSean Wang MT7623_PIN(158, "RAMBUF_ODATA15", EINT_NA, DRV_FIXED), 576e7507f57SSean Wang MT7623_PIN(159, "RAMBUF_BE0", EINT_NA, DRV_FIXED), 577e7507f57SSean Wang MT7623_PIN(160, "RAMBUF_BE1", EINT_NA, DRV_FIXED), 578e7507f57SSean Wang MT7623_PIN(161, "AP2PT_INT", EINT_NA, DRV_FIXED), 579e7507f57SSean Wang MT7623_PIN(162, "AP2PT_INT_CLR", EINT_NA, DRV_FIXED), 580e7507f57SSean Wang MT7623_PIN(163, "PT2AP_INT", EINT_NA, DRV_FIXED), 581e7507f57SSean Wang MT7623_PIN(164, "PT2AP_INT_CLR", EINT_NA, DRV_FIXED), 582e7507f57SSean Wang MT7623_PIN(165, "AP2UP_INT", EINT_NA, DRV_FIXED), 583e7507f57SSean Wang MT7623_PIN(166, "AP2UP_INT_CLR", EINT_NA, DRV_FIXED), 584e7507f57SSean Wang MT7623_PIN(167, "UP2AP_INT", EINT_NA, DRV_FIXED), 585e7507f57SSean Wang MT7623_PIN(168, "UP2AP_INT_CLR", EINT_NA, DRV_FIXED), 586e7507f57SSean Wang MT7623_PIN(169, "RAMBUF_ADDR0", EINT_NA, DRV_FIXED), 587e7507f57SSean Wang MT7623_PIN(170, "RAMBUF_ADDR1", EINT_NA, DRV_FIXED), 588e7507f57SSean Wang MT7623_PIN(171, "RAMBUF_ADDR2", EINT_NA, DRV_FIXED), 589e7507f57SSean Wang MT7623_PIN(172, "RAMBUF_ADDR3", EINT_NA, DRV_FIXED), 590e7507f57SSean Wang MT7623_PIN(173, "RAMBUF_ADDR4", EINT_NA, DRV_FIXED), 591e7507f57SSean Wang MT7623_PIN(174, "RAMBUF_ADDR5", EINT_NA, DRV_FIXED), 592e7507f57SSean Wang MT7623_PIN(175, "RAMBUF_ADDR6", EINT_NA, DRV_FIXED), 593e7507f57SSean Wang MT7623_PIN(176, "RAMBUF_ADDR7", EINT_NA, DRV_FIXED), 594e7507f57SSean Wang MT7623_PIN(177, "RAMBUF_ADDR8", EINT_NA, DRV_FIXED), 595e7507f57SSean Wang MT7623_PIN(178, "RAMBUF_ADDR9", EINT_NA, DRV_FIXED), 596e7507f57SSean Wang MT7623_PIN(179, "RAMBUF_ADDR10", EINT_NA, DRV_FIXED), 597e7507f57SSean Wang MT7623_PIN(180, "RAMBUF_RW", EINT_NA, DRV_FIXED), 598e7507f57SSean Wang MT7623_PIN(181, "RAMBUF_LAST", EINT_NA, DRV_FIXED), 599e7507f57SSean Wang MT7623_PIN(182, "RAMBUF_HP", EINT_NA, DRV_FIXED), 600e7507f57SSean Wang MT7623_PIN(183, "RAMBUF_REQ", EINT_NA, DRV_FIXED), 601e7507f57SSean Wang MT7623_PIN(184, "RAMBUF_ALE", EINT_NA, DRV_FIXED), 602e7507f57SSean Wang MT7623_PIN(185, "RAMBUF_DLE", EINT_NA, DRV_FIXED), 603e7507f57SSean Wang MT7623_PIN(186, "RAMBUF_WDLE", EINT_NA, DRV_FIXED), 604e7507f57SSean Wang MT7623_PIN(187, "RAMBUF_O_CLK", EINT_NA, DRV_FIXED), 605e7507f57SSean Wang MT7623_PIN(188, "I2S2_MCLK", 100, DRV_GRP1), 606e7507f57SSean Wang MT7623_PIN(189, "I2S3_DATA", 101, DRV_GRP1), 607e7507f57SSean Wang MT7623_PIN(190, "I2S3_DATA_IN", 102, DRV_GRP1), 608e7507f57SSean Wang MT7623_PIN(191, "I2S3_BCK", 103, DRV_GRP1), 609e7507f57SSean Wang MT7623_PIN(192, "I2S3_LRCK", 104, DRV_GRP1), 610e7507f57SSean Wang MT7623_PIN(193, "I2S3_MCLK", 105, DRV_GRP1), 611e7507f57SSean Wang MT7623_PIN(194, "I2S4_DATA", 106, DRV_GRP1), 612e7507f57SSean Wang MT7623_PIN(195, "I2S4_DATA_IN", 107, DRV_GRP1), 613e7507f57SSean Wang MT7623_PIN(196, "I2S4_BCK", 108, DRV_GRP1), 614e7507f57SSean Wang MT7623_PIN(197, "I2S4_LRCK", 109, DRV_GRP1), 615e7507f57SSean Wang MT7623_PIN(198, "I2S4_MCLK", 110, DRV_GRP1), 616e7507f57SSean Wang MT7623_PIN(199, "SPI1_CLK", 111, DRV_GRP3), 617e7507f57SSean Wang MT7623_PIN(200, "SPDIF_OUT", 112, DRV_GRP1), 618e7507f57SSean Wang MT7623_PIN(201, "SPDIF_IN0", 113, DRV_GRP1), 619e7507f57SSean Wang MT7623_PIN(202, "SPDIF_IN1", 114, DRV_GRP1), 620e7507f57SSean Wang MT7623_PIN(203, "PWM0", 115, DRV_GRP1), 621e7507f57SSean Wang MT7623_PIN(204, "PWM1", 116, DRV_GRP1), 622e7507f57SSean Wang MT7623_PIN(205, "PWM2", 117, DRV_GRP1), 623e7507f57SSean Wang MT7623_PIN(206, "PWM3", 118, DRV_GRP1), 624e7507f57SSean Wang MT7623_PIN(207, "PWM4", 119, DRV_GRP1), 625e7507f57SSean Wang MT7623_PIN(208, "AUD_EXT_CK1", 120, DRV_GRP1), 626e7507f57SSean Wang MT7623_PIN(209, "AUD_EXT_CK2", 121, DRV_GRP1), 627e7507f57SSean Wang MT7623_PIN(210, "AUD_CLOCK", EINT_NA, DRV_GRP3), 628e7507f57SSean Wang MT7623_PIN(211, "DVP_RESET", EINT_NA, DRV_GRP3), 629e7507f57SSean Wang MT7623_PIN(212, "DVP_CLOCK", EINT_NA, DRV_GRP3), 630e7507f57SSean Wang MT7623_PIN(213, "DVP_CS", EINT_NA, DRV_GRP3), 631e7507f57SSean Wang MT7623_PIN(214, "DVP_CK", EINT_NA, DRV_GRP3), 632e7507f57SSean Wang MT7623_PIN(215, "DVP_DI", EINT_NA, DRV_GRP3), 633e7507f57SSean Wang MT7623_PIN(216, "DVP_DO", EINT_NA, DRV_GRP3), 634e7507f57SSean Wang MT7623_PIN(217, "AP_CS", EINT_NA, DRV_GRP3), 635e7507f57SSean Wang MT7623_PIN(218, "AP_CK", EINT_NA, DRV_GRP3), 636e7507f57SSean Wang MT7623_PIN(219, "AP_DI", EINT_NA, DRV_GRP3), 637e7507f57SSean Wang MT7623_PIN(220, "AP_DO", EINT_NA, DRV_GRP3), 638e7507f57SSean Wang MT7623_PIN(221, "DVD_BCLK", EINT_NA, DRV_GRP3), 639e7507f57SSean Wang MT7623_PIN(222, "T8032_CLK", EINT_NA, DRV_GRP3), 640e7507f57SSean Wang MT7623_PIN(223, "AP_BCLK", EINT_NA, DRV_GRP3), 641e7507f57SSean Wang MT7623_PIN(224, "HOST_CS", EINT_NA, DRV_GRP3), 642e7507f57SSean Wang MT7623_PIN(225, "HOST_CK", EINT_NA, DRV_GRP3), 643e7507f57SSean Wang MT7623_PIN(226, "HOST_DO0", EINT_NA, DRV_GRP3), 644e7507f57SSean Wang MT7623_PIN(227, "HOST_DO1", EINT_NA, DRV_GRP3), 645e7507f57SSean Wang MT7623_PIN(228, "SLV_CS", EINT_NA, DRV_GRP3), 646e7507f57SSean Wang MT7623_PIN(229, "SLV_CK", EINT_NA, DRV_GRP3), 647e7507f57SSean Wang MT7623_PIN(230, "SLV_DI0", EINT_NA, DRV_GRP3), 648e7507f57SSean Wang MT7623_PIN(231, "SLV_DI1", EINT_NA, DRV_GRP3), 649e7507f57SSean Wang MT7623_PIN(232, "AP2DSP_INT", EINT_NA, DRV_GRP3), 650e7507f57SSean Wang MT7623_PIN(233, "AP2DSP_INT_CLR", EINT_NA, DRV_GRP3), 651e7507f57SSean Wang MT7623_PIN(234, "DSP2AP_INT", EINT_NA, DRV_GRP3), 652e7507f57SSean Wang MT7623_PIN(235, "DSP2AP_INT_CLR", EINT_NA, DRV_GRP3), 653e7507f57SSean Wang MT7623_PIN(236, "EXT_SDIO3", 122, DRV_GRP1), 654e7507f57SSean Wang MT7623_PIN(237, "EXT_SDIO2", 123, DRV_GRP1), 655e7507f57SSean Wang MT7623_PIN(238, "EXT_SDIO1", 124, DRV_GRP1), 656e7507f57SSean Wang MT7623_PIN(239, "EXT_SDIO0", 125, DRV_GRP1), 657e7507f57SSean Wang MT7623_PIN(240, "EXT_XCS", 126, DRV_GRP1), 658e7507f57SSean Wang MT7623_PIN(241, "EXT_SCK", 127, DRV_GRP1), 659e7507f57SSean Wang MT7623_PIN(242, "URTS2", 128, DRV_GRP1), 660e7507f57SSean Wang MT7623_PIN(243, "UCTS2", 129, DRV_GRP1), 661e7507f57SSean Wang MT7623_PIN(244, "HDMI_SDA_RX", 130, DRV_FIXED), 662e7507f57SSean Wang MT7623_PIN(245, "HDMI_SCL_RX", 131, DRV_FIXED), 663e7507f57SSean Wang MT7623_PIN(246, "MHL_SENCE", 132, DRV_FIXED), 664e7507f57SSean Wang MT7623_PIN(247, "HDMI_HPD_CBUS_RX", 69, DRV_FIXED), 665e7507f57SSean Wang MT7623_PIN(248, "HDMI_TESTOUTP_RX", 133, DRV_GRP1), 666e7507f57SSean Wang MT7623_PIN(249, "MSDC0E_RSTB", 134, DRV_GRP4), 667e7507f57SSean Wang MT7623_PIN(250, "MSDC0E_DAT7", 135, DRV_GRP4), 668e7507f57SSean Wang MT7623_PIN(251, "MSDC0E_DAT6", 136, DRV_GRP4), 669e7507f57SSean Wang MT7623_PIN(252, "MSDC0E_DAT5", 137, DRV_GRP4), 670e7507f57SSean Wang MT7623_PIN(253, "MSDC0E_DAT4", 138, DRV_GRP4), 671e7507f57SSean Wang MT7623_PIN(254, "MSDC0E_DAT3", 139, DRV_GRP4), 672e7507f57SSean Wang MT7623_PIN(255, "MSDC0E_DAT2", 140, DRV_GRP4), 673e7507f57SSean Wang MT7623_PIN(256, "MSDC0E_DAT1", 141, DRV_GRP4), 674e7507f57SSean Wang MT7623_PIN(257, "MSDC0E_DAT0", 142, DRV_GRP4), 675e7507f57SSean Wang MT7623_PIN(258, "MSDC0E_CMD", 143, DRV_GRP4), 676e7507f57SSean Wang MT7623_PIN(259, "MSDC0E_CLK", 144, DRV_GRP4), 677e7507f57SSean Wang MT7623_PIN(260, "MSDC0E_DSL", 145, DRV_GRP4), 678e7507f57SSean Wang MT7623_PIN(261, "MSDC1_INS", 146, DRV_GRP4), 679e7507f57SSean Wang MT7623_PIN(262, "G2_TXEN", 8, DRV_GRP1), 680e7507f57SSean Wang MT7623_PIN(263, "G2_TXD3", 9, DRV_GRP1), 681e7507f57SSean Wang MT7623_PIN(264, "G2_TXD2", 10, DRV_GRP1), 682e7507f57SSean Wang MT7623_PIN(265, "G2_TXD1", 11, DRV_GRP1), 683e7507f57SSean Wang MT7623_PIN(266, "G2_TXD0", EINT_NA, DRV_GRP1), 684e7507f57SSean Wang MT7623_PIN(267, "G2_TXC", EINT_NA, DRV_GRP1), 685e7507f57SSean Wang MT7623_PIN(268, "G2_RXC", EINT_NA, DRV_GRP1), 686e7507f57SSean Wang MT7623_PIN(269, "G2_RXD0", EINT_NA, DRV_GRP1), 687e7507f57SSean Wang MT7623_PIN(270, "G2_RXD1", EINT_NA, DRV_GRP1), 688e7507f57SSean Wang MT7623_PIN(271, "G2_RXD2", EINT_NA, DRV_GRP1), 689e7507f57SSean Wang MT7623_PIN(272, "G2_RXD3", EINT_NA, DRV_GRP1), 690e7507f57SSean Wang MT7623_PIN(273, "ESW_INT", 168, DRV_GRP1), 691e7507f57SSean Wang MT7623_PIN(274, "G2_RXDV", EINT_NA, DRV_GRP1), 692e7507f57SSean Wang MT7623_PIN(275, "MDC", EINT_NA, DRV_GRP1), 693e7507f57SSean Wang MT7623_PIN(276, "MDIO", EINT_NA, DRV_GRP1), 694e7507f57SSean Wang MT7623_PIN(277, "ESW_RST", EINT_NA, DRV_GRP1), 695e7507f57SSean Wang MT7623_PIN(278, "JTAG_RESET", 147, DRV_GRP3), 696e7507f57SSean Wang MT7623_PIN(279, "USB3_RES_BOND", EINT_NA, DRV_GRP1), 697e7507f57SSean Wang }; 698e7507f57SSean Wang 699e7507f57SSean Wang /* List all groups consisting of these pins dedicated to the enablement of 700e7507f57SSean Wang * certain hardware block and the corresponding mode for all of the pins. 701e7507f57SSean Wang * The hardware probably has multiple combinations of these pinouts. 702e7507f57SSean Wang */ 703e7507f57SSean Wang 704e7507f57SSean Wang /* AUDIO EXT CLK */ 705e7507f57SSean Wang static int mt7623_aud_ext_clk0_pins[] = { 208, }; 706e7507f57SSean Wang static int mt7623_aud_ext_clk0_funcs[] = { 1, }; 707e7507f57SSean Wang static int mt7623_aud_ext_clk1_pins[] = { 209, }; 708e7507f57SSean Wang static int mt7623_aud_ext_clk1_funcs[] = { 1, }; 709e7507f57SSean Wang 710e7507f57SSean Wang /* DISP PWM */ 711e7507f57SSean Wang static int mt7623_disp_pwm_0_pins[] = { 72, }; 712e7507f57SSean Wang static int mt7623_disp_pwm_0_funcs[] = { 5, }; 713e7507f57SSean Wang static int mt7623_disp_pwm_1_pins[] = { 203, }; 714e7507f57SSean Wang static int mt7623_disp_pwm_1_funcs[] = { 2, }; 715e7507f57SSean Wang static int mt7623_disp_pwm_2_pins[] = { 208, }; 716e7507f57SSean Wang static int mt7623_disp_pwm_2_funcs[] = { 5, }; 717e7507f57SSean Wang 718e7507f57SSean Wang /* ESW */ 719e7507f57SSean Wang static int mt7623_esw_int_pins[] = { 273, }; 720e7507f57SSean Wang static int mt7623_esw_int_funcs[] = { 1, }; 721e7507f57SSean Wang static int mt7623_esw_rst_pins[] = { 277, }; 722e7507f57SSean Wang static int mt7623_esw_rst_funcs[] = { 1, }; 723e7507f57SSean Wang 724e7507f57SSean Wang /* EPHY */ 725e7507f57SSean Wang static int mt7623_ephy_pins[] = { 262, 263, 264, 265, 266, 267, 268, 726e7507f57SSean Wang 269, 270, 271, 272, 274, }; 727e7507f57SSean Wang static int mt7623_ephy_funcs[] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, }; 728e7507f57SSean Wang 729e7507f57SSean Wang /* EXT_SDIO */ 730e7507f57SSean Wang static int mt7623_ext_sdio_pins[] = { 236, 237, 238, 239, 240, 241, }; 731e7507f57SSean Wang static int mt7623_ext_sdio_funcs[] = { 1, 1, 1, 1, 1, 1, }; 732e7507f57SSean Wang 733e7507f57SSean Wang /* HDMI RX */ 734e7507f57SSean Wang static int mt7623_hdmi_rx_pins[] = { 247, 248, }; 735e7507f57SSean Wang static int mt7623_hdmi_rx_funcs[] = { 1, 1 }; 736e7507f57SSean Wang static int mt7623_hdmi_rx_i2c_pins[] = { 244, 245, }; 737e7507f57SSean Wang static int mt7623_hdmi_rx_i2c_funcs[] = { 1, 1 }; 738e7507f57SSean Wang 739e7507f57SSean Wang /* HDMI TX */ 740e7507f57SSean Wang static int mt7623_hdmi_cec_pins[] = { 122, }; 741e7507f57SSean Wang static int mt7623_hdmi_cec_funcs[] = { 1, }; 742e7507f57SSean Wang static int mt7623_hdmi_htplg_pins[] = { 123, }; 743e7507f57SSean Wang static int mt7623_hdmi_htplg_funcs[] = { 1, }; 744e7507f57SSean Wang static int mt7623_hdmi_i2c_pins[] = { 124, 125, }; 745e7507f57SSean Wang static int mt7623_hdmi_i2c_funcs[] = { 1, 1 }; 746e7507f57SSean Wang 747e7507f57SSean Wang /* I2C */ 748e7507f57SSean Wang static int mt7623_i2c0_pins[] = { 75, 76, }; 749e7507f57SSean Wang static int mt7623_i2c0_funcs[] = { 1, 1, }; 750e7507f57SSean Wang static int mt7623_i2c1_0_pins[] = { 57, 58, }; 751e7507f57SSean Wang static int mt7623_i2c1_0_funcs[] = { 1, 1, }; 752e7507f57SSean Wang static int mt7623_i2c1_1_pins[] = { 242, 243, }; 753e7507f57SSean Wang static int mt7623_i2c1_1_funcs[] = { 4, 4, }; 754e7507f57SSean Wang static int mt7623_i2c1_2_pins[] = { 85, 86, }; 755e7507f57SSean Wang static int mt7623_i2c1_2_funcs[] = { 3, 3, }; 756e7507f57SSean Wang static int mt7623_i2c1_3_pins[] = { 105, 106, }; 757e7507f57SSean Wang static int mt7623_i2c1_3_funcs[] = { 3, 3, }; 758e7507f57SSean Wang static int mt7623_i2c1_4_pins[] = { 124, 125, }; 759e7507f57SSean Wang static int mt7623_i2c1_4_funcs[] = { 4, 4, }; 760e7507f57SSean Wang static int mt7623_i2c2_0_pins[] = { 77, 78, }; 761e7507f57SSean Wang static int mt7623_i2c2_0_funcs[] = { 1, 1, }; 762e7507f57SSean Wang static int mt7623_i2c2_1_pins[] = { 89, 90, }; 763e7507f57SSean Wang static int mt7623_i2c2_1_funcs[] = { 3, 3, }; 764e7507f57SSean Wang static int mt7623_i2c2_2_pins[] = { 109, 110, }; 765e7507f57SSean Wang static int mt7623_i2c2_2_funcs[] = { 3, 3, }; 766e7507f57SSean Wang static int mt7623_i2c2_3_pins[] = { 122, 123, }; 767e7507f57SSean Wang static int mt7623_i2c2_3_funcs[] = { 4, 4, }; 768e7507f57SSean Wang 769e7507f57SSean Wang /* I2S */ 770e7507f57SSean Wang static int mt7623_i2s0_pins[] = { 49, 72, 73, 74, 126, }; 771e7507f57SSean Wang static int mt7623_i2s0_funcs[] = { 1, 1, 1, 1, 1, }; 772e7507f57SSean Wang static int mt7623_i2s1_pins[] = { 33, 34, 35, 36, 37, }; 773e7507f57SSean Wang static int mt7623_i2s1_funcs[] = { 1, 1, 1, 1, 1, }; 774e7507f57SSean Wang static int mt7623_i2s2_bclk_lrclk_mclk_pins[] = { 50, 52, 188, }; 775e7507f57SSean Wang static int mt7623_i2s2_bclk_lrclk_mclk_funcs[] = { 1, 1, 1, }; 776e7507f57SSean Wang static int mt7623_i2s2_data_in_pins[] = { 51, }; 777e7507f57SSean Wang static int mt7623_i2s2_data_in_funcs[] = { 1, }; 778e7507f57SSean Wang static int mt7623_i2s2_data_0_pins[] = { 203, }; 779e7507f57SSean Wang static int mt7623_i2s2_data_0_funcs[] = { 9, }; 780e7507f57SSean Wang static int mt7623_i2s2_data_1_pins[] = { 38, }; 781e7507f57SSean Wang static int mt7623_i2s2_data_1_funcs[] = { 4, }; 782e7507f57SSean Wang static int mt7623_i2s3_bclk_lrclk_mclk_pins[] = { 191, 192, 193, }; 783e7507f57SSean Wang static int mt7623_i2s3_bclk_lrclk_mclk_funcs[] = { 1, 1, 1, }; 784e7507f57SSean Wang static int mt7623_i2s3_data_in_pins[] = { 190, }; 785e7507f57SSean Wang static int mt7623_i2s3_data_in_funcs[] = { 1, }; 786e7507f57SSean Wang static int mt7623_i2s3_data_0_pins[] = { 204, }; 787e7507f57SSean Wang static int mt7623_i2s3_data_0_funcs[] = { 9, }; 788e7507f57SSean Wang static int mt7623_i2s3_data_1_pins[] = { 2, }; 789e7507f57SSean Wang static int mt7623_i2s3_data_1_funcs[] = { 0, }; 790e7507f57SSean Wang static int mt7623_i2s4_pins[] = { 194, 195, 196, 197, 198, }; 791e7507f57SSean Wang static int mt7623_i2s4_funcs[] = { 1, 1, 1, 1, 1, }; 792e7507f57SSean Wang static int mt7623_i2s5_pins[] = { 16, 17, 30, 31, 32, }; 793e7507f57SSean Wang static int mt7623_i2s5_funcs[] = { 1, 1, 1, 1, 1, }; 794e7507f57SSean Wang 795e7507f57SSean Wang /* IR */ 796e7507f57SSean Wang static int mt7623_ir_pins[] = { 46, }; 797e7507f57SSean Wang static int mt7623_ir_funcs[] = { 1, }; 798e7507f57SSean Wang 799e7507f57SSean Wang /* LCD */ 800e7507f57SSean Wang static int mt7623_mipi_tx_pins[] = { 91, 92, 93, 94, 95, 96, 97, 98, 801e7507f57SSean Wang 99, 100, }; 802e7507f57SSean Wang static int mt7623_mipi_tx_funcs[] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, }; 803e7507f57SSean Wang static int mt7623_dsi_te_pins[] = { 84, }; 804e7507f57SSean Wang static int mt7623_dsi_te_funcs[] = { 1, }; 805e7507f57SSean Wang static int mt7623_lcm_rst_pins[] = { 83, }; 806e7507f57SSean Wang static int mt7623_lcm_rst_funcs[] = { 1, }; 807e7507f57SSean Wang 808e7507f57SSean Wang /* MDC/MDIO */ 809e7507f57SSean Wang static int mt7623_mdc_mdio_pins[] = { 275, 276, }; 810e7507f57SSean Wang static int mt7623_mdc_mdio_funcs[] = { 1, 1, }; 811e7507f57SSean Wang 812e7507f57SSean Wang /* MSDC */ 813e7507f57SSean Wang static int mt7623_msdc0_pins[] = { 111, 112, 113, 114, 115, 116, 117, 118, 814e7507f57SSean Wang 119, 120, 121, }; 815e7507f57SSean Wang static int mt7623_msdc0_funcs[] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, }; 816e7507f57SSean Wang static int mt7623_msdc1_pins[] = { 105, 106, 107, 108, 109, 110, }; 817e7507f57SSean Wang static int mt7623_msdc1_funcs[] = { 1, 1, 1, 1, 1, 1, }; 818e7507f57SSean Wang static int mt7623_msdc1_ins_pins[] = { 261, }; 819e7507f57SSean Wang static int mt7623_msdc1_ins_funcs[] = { 1, }; 820e7507f57SSean Wang static int mt7623_msdc1_wp_0_pins[] = { 29, }; 821e7507f57SSean Wang static int mt7623_msdc1_wp_0_funcs[] = { 1, }; 822e7507f57SSean Wang static int mt7623_msdc1_wp_1_pins[] = { 55, }; 823e7507f57SSean Wang static int mt7623_msdc1_wp_1_funcs[] = { 3, }; 824e7507f57SSean Wang static int mt7623_msdc1_wp_2_pins[] = { 209, }; 825e7507f57SSean Wang static int mt7623_msdc1_wp_2_funcs[] = { 2, }; 826e7507f57SSean Wang static int mt7623_msdc2_pins[] = { 85, 86, 87, 88, 89, 90, }; 827e7507f57SSean Wang static int mt7623_msdc2_funcs[] = { 1, 1, 1, 1, 1, 1, }; 828e7507f57SSean Wang static int mt7623_msdc3_pins[] = { 249, 250, 251, 252, 253, 254, 255, 256, 829e7507f57SSean Wang 257, 258, 259, 260, }; 830e7507f57SSean Wang static int mt7623_msdc3_funcs[] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, }; 831e7507f57SSean Wang 832e7507f57SSean Wang /* NAND */ 833e7507f57SSean Wang static int mt7623_nandc_pins[] = { 43, 47, 48, 111, 112, 113, 114, 115, 834e7507f57SSean Wang 116, 117, 118, 119, 120, 121, }; 835e7507f57SSean Wang static int mt7623_nandc_funcs[] = { 1, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 836e7507f57SSean Wang 4, 4, }; 837e7507f57SSean Wang static int mt7623_nandc_ceb0_pins[] = { 45, }; 838e7507f57SSean Wang static int mt7623_nandc_ceb0_funcs[] = { 1, }; 839e7507f57SSean Wang static int mt7623_nandc_ceb1_pins[] = { 44, }; 840e7507f57SSean Wang static int mt7623_nandc_ceb1_funcs[] = { 1, }; 841e7507f57SSean Wang 842e7507f57SSean Wang /* RTC */ 843e7507f57SSean Wang static int mt7623_rtc_pins[] = { 10, }; 844e7507f57SSean Wang static int mt7623_rtc_funcs[] = { 1, }; 845e7507f57SSean Wang 846e7507f57SSean Wang /* OTG */ 847e7507f57SSean Wang static int mt7623_otg_iddig0_0_pins[] = { 29, }; 848e7507f57SSean Wang static int mt7623_otg_iddig0_0_funcs[] = { 1, }; 849e7507f57SSean Wang static int mt7623_otg_iddig0_1_pins[] = { 44, }; 850e7507f57SSean Wang static int mt7623_otg_iddig0_1_funcs[] = { 2, }; 851e7507f57SSean Wang static int mt7623_otg_iddig0_2_pins[] = { 236, }; 852e7507f57SSean Wang static int mt7623_otg_iddig0_2_funcs[] = { 2, }; 853e7507f57SSean Wang static int mt7623_otg_iddig1_0_pins[] = { 27, }; 854e7507f57SSean Wang static int mt7623_otg_iddig1_0_funcs[] = { 2, }; 855e7507f57SSean Wang static int mt7623_otg_iddig1_1_pins[] = { 47, }; 856e7507f57SSean Wang static int mt7623_otg_iddig1_1_funcs[] = { 2, }; 857e7507f57SSean Wang static int mt7623_otg_iddig1_2_pins[] = { 238, }; 858e7507f57SSean Wang static int mt7623_otg_iddig1_2_funcs[] = { 2, }; 859e7507f57SSean Wang static int mt7623_otg_drv_vbus0_0_pins[] = { 28, }; 860e7507f57SSean Wang static int mt7623_otg_drv_vbus0_0_funcs[] = { 1, }; 861e7507f57SSean Wang static int mt7623_otg_drv_vbus0_1_pins[] = { 45, }; 862e7507f57SSean Wang static int mt7623_otg_drv_vbus0_1_funcs[] = { 2, }; 863e7507f57SSean Wang static int mt7623_otg_drv_vbus0_2_pins[] = { 237, }; 864e7507f57SSean Wang static int mt7623_otg_drv_vbus0_2_funcs[] = { 2, }; 865e7507f57SSean Wang static int mt7623_otg_drv_vbus1_0_pins[] = { 26, }; 866e7507f57SSean Wang static int mt7623_otg_drv_vbus1_0_funcs[] = { 2, }; 867e7507f57SSean Wang static int mt7623_otg_drv_vbus1_1_pins[] = { 48, }; 868e7507f57SSean Wang static int mt7623_otg_drv_vbus1_1_funcs[] = { 2, }; 869e7507f57SSean Wang static int mt7623_otg_drv_vbus1_2_pins[] = { 239, }; 870e7507f57SSean Wang static int mt7623_otg_drv_vbus1_2_funcs[] = { 2, }; 871e7507f57SSean Wang 872e7507f57SSean Wang /* PCIE */ 873e7507f57SSean Wang static int mt7623_pcie0_0_perst_pins[] = { 208, }; 874e7507f57SSean Wang static int mt7623_pcie0_0_perst_funcs[] = { 3, }; 875e7507f57SSean Wang static int mt7623_pcie0_1_perst_pins[] = { 22, }; 876e7507f57SSean Wang static int mt7623_pcie0_1_perst_funcs[] = { 2, }; 877e7507f57SSean Wang static int mt7623_pcie1_0_perst_pins[] = { 209, }; 878e7507f57SSean Wang static int mt7623_pcie1_0_perst_funcs[] = { 3, }; 879e7507f57SSean Wang static int mt7623_pcie1_1_perst_pins[] = { 23, }; 880e7507f57SSean Wang static int mt7623_pcie1_1_perst_funcs[] = { 2, }; 881e7507f57SSean Wang static int mt7623_pcie2_0_perst_pins[] = { 24, }; 882e7507f57SSean Wang static int mt7623_pcie2_0_perst_funcs[] = { 2, }; 883e7507f57SSean Wang static int mt7623_pcie2_1_perst_pins[] = { 29, }; 884e7507f57SSean Wang static int mt7623_pcie2_1_perst_funcs[] = { 6, }; 885e7507f57SSean Wang static int mt7623_pcie0_0_wake_pins[] = { 28, }; 886e7507f57SSean Wang static int mt7623_pcie0_0_wake_funcs[] = { 6, }; 887e7507f57SSean Wang static int mt7623_pcie0_1_wake_pins[] = { 251, }; 888e7507f57SSean Wang static int mt7623_pcie0_1_wake_funcs[] = { 6, }; 889e7507f57SSean Wang static int mt7623_pcie1_0_wake_pins[] = { 27, }; 890e7507f57SSean Wang static int mt7623_pcie1_0_wake_funcs[] = { 6, }; 891e7507f57SSean Wang static int mt7623_pcie1_1_wake_pins[] = { 253, }; 892e7507f57SSean Wang static int mt7623_pcie1_1_wake_funcs[] = { 6, }; 893e7507f57SSean Wang static int mt7623_pcie2_0_wake_pins[] = { 26, }; 894e7507f57SSean Wang static int mt7623_pcie2_0_wake_funcs[] = { 6, }; 895e7507f57SSean Wang static int mt7623_pcie2_1_wake_pins[] = { 255, }; 896e7507f57SSean Wang static int mt7623_pcie2_1_wake_funcs[] = { 6, }; 897e7507f57SSean Wang static int mt7623_pcie0_clkreq_pins[] = { 250, }; 898e7507f57SSean Wang static int mt7623_pcie0_clkreq_funcs[] = { 6, }; 899e7507f57SSean Wang static int mt7623_pcie1_clkreq_pins[] = { 252, }; 900e7507f57SSean Wang static int mt7623_pcie1_clkreq_funcs[] = { 6, }; 901e7507f57SSean Wang static int mt7623_pcie2_clkreq_pins[] = { 254, }; 902e7507f57SSean Wang static int mt7623_pcie2_clkreq_funcs[] = { 6, }; 903e7507f57SSean Wang 904e7507f57SSean Wang /* the pcie_*_rev are only used for MT7623 */ 905e7507f57SSean Wang static int mt7623_pcie0_0_rev_perst_pins[] = { 208, }; 906e7507f57SSean Wang static int mt7623_pcie0_0_rev_perst_funcs[] = { 11, }; 907e7507f57SSean Wang static int mt7623_pcie0_1_rev_perst_pins[] = { 22, }; 908e7507f57SSean Wang static int mt7623_pcie0_1_rev_perst_funcs[] = { 10, }; 909e7507f57SSean Wang static int mt7623_pcie1_0_rev_perst_pins[] = { 209, }; 910e7507f57SSean Wang static int mt7623_pcie1_0_rev_perst_funcs[] = { 11, }; 911e7507f57SSean Wang static int mt7623_pcie1_1_rev_perst_pins[] = { 23, }; 912e7507f57SSean Wang static int mt7623_pcie1_1_rev_perst_funcs[] = { 10, }; 913e7507f57SSean Wang static int mt7623_pcie2_0_rev_perst_pins[] = { 24, }; 914e7507f57SSean Wang static int mt7623_pcie2_0_rev_perst_funcs[] = { 11, }; 915e7507f57SSean Wang static int mt7623_pcie2_1_rev_perst_pins[] = { 29, }; 916e7507f57SSean Wang static int mt7623_pcie2_1_rev_perst_funcs[] = { 14, }; 917e7507f57SSean Wang 918e7507f57SSean Wang /* PCM */ 919e7507f57SSean Wang static int mt7623_pcm_clk_0_pins[] = { 18, }; 920e7507f57SSean Wang static int mt7623_pcm_clk_0_funcs[] = { 1, }; 921e7507f57SSean Wang static int mt7623_pcm_clk_1_pins[] = { 17, }; 922e7507f57SSean Wang static int mt7623_pcm_clk_1_funcs[] = { 3, }; 923e7507f57SSean Wang static int mt7623_pcm_clk_2_pins[] = { 35, }; 924e7507f57SSean Wang static int mt7623_pcm_clk_2_funcs[] = { 3, }; 925e7507f57SSean Wang static int mt7623_pcm_clk_3_pins[] = { 50, }; 926e7507f57SSean Wang static int mt7623_pcm_clk_3_funcs[] = { 3, }; 927e7507f57SSean Wang static int mt7623_pcm_clk_4_pins[] = { 74, }; 928e7507f57SSean Wang static int mt7623_pcm_clk_4_funcs[] = { 3, }; 929e7507f57SSean Wang static int mt7623_pcm_clk_5_pins[] = { 191, }; 930e7507f57SSean Wang static int mt7623_pcm_clk_5_funcs[] = { 3, }; 931e7507f57SSean Wang static int mt7623_pcm_clk_6_pins[] = { 196, }; 932e7507f57SSean Wang static int mt7623_pcm_clk_6_funcs[] = { 3, }; 933e7507f57SSean Wang static int mt7623_pcm_sync_0_pins[] = { 19, }; 934e7507f57SSean Wang static int mt7623_pcm_sync_0_funcs[] = { 1, }; 935e7507f57SSean Wang static int mt7623_pcm_sync_1_pins[] = { 30, }; 936e7507f57SSean Wang static int mt7623_pcm_sync_1_funcs[] = { 3, }; 937e7507f57SSean Wang static int mt7623_pcm_sync_2_pins[] = { 36, }; 938e7507f57SSean Wang static int mt7623_pcm_sync_2_funcs[] = { 3, }; 939e7507f57SSean Wang static int mt7623_pcm_sync_3_pins[] = { 52, }; 940e7507f57SSean Wang static int mt7623_pcm_sync_3_funcs[] = { 31, }; 941e7507f57SSean Wang static int mt7623_pcm_sync_4_pins[] = { 73, }; 942e7507f57SSean Wang static int mt7623_pcm_sync_4_funcs[] = { 3, }; 943e7507f57SSean Wang static int mt7623_pcm_sync_5_pins[] = { 192, }; 944e7507f57SSean Wang static int mt7623_pcm_sync_5_funcs[] = { 3, }; 945e7507f57SSean Wang static int mt7623_pcm_sync_6_pins[] = { 197, }; 946e7507f57SSean Wang static int mt7623_pcm_sync_6_funcs[] = { 3, }; 947e7507f57SSean Wang static int mt7623_pcm_rx_0_pins[] = { 20, }; 948e7507f57SSean Wang static int mt7623_pcm_rx_0_funcs[] = { 1, }; 949e7507f57SSean Wang static int mt7623_pcm_rx_1_pins[] = { 16, }; 950e7507f57SSean Wang static int mt7623_pcm_rx_1_funcs[] = { 3, }; 951e7507f57SSean Wang static int mt7623_pcm_rx_2_pins[] = { 34, }; 952e7507f57SSean Wang static int mt7623_pcm_rx_2_funcs[] = { 3, }; 953e7507f57SSean Wang static int mt7623_pcm_rx_3_pins[] = { 51, }; 954e7507f57SSean Wang static int mt7623_pcm_rx_3_funcs[] = { 3, }; 955e7507f57SSean Wang static int mt7623_pcm_rx_4_pins[] = { 72, }; 956e7507f57SSean Wang static int mt7623_pcm_rx_4_funcs[] = { 3, }; 957e7507f57SSean Wang static int mt7623_pcm_rx_5_pins[] = { 190, }; 958e7507f57SSean Wang static int mt7623_pcm_rx_5_funcs[] = { 3, }; 959e7507f57SSean Wang static int mt7623_pcm_rx_6_pins[] = { 195, }; 960e7507f57SSean Wang static int mt7623_pcm_rx_6_funcs[] = { 3, }; 961e7507f57SSean Wang static int mt7623_pcm_tx_0_pins[] = { 21, }; 962e7507f57SSean Wang static int mt7623_pcm_tx_0_funcs[] = { 1, }; 963e7507f57SSean Wang static int mt7623_pcm_tx_1_pins[] = { 32, }; 964e7507f57SSean Wang static int mt7623_pcm_tx_1_funcs[] = { 3, }; 965e7507f57SSean Wang static int mt7623_pcm_tx_2_pins[] = { 33, }; 966e7507f57SSean Wang static int mt7623_pcm_tx_2_funcs[] = { 3, }; 967e7507f57SSean Wang static int mt7623_pcm_tx_3_pins[] = { 38, }; 968e7507f57SSean Wang static int mt7623_pcm_tx_3_funcs[] = { 3, }; 969e7507f57SSean Wang static int mt7623_pcm_tx_4_pins[] = { 49, }; 970e7507f57SSean Wang static int mt7623_pcm_tx_4_funcs[] = { 3, }; 971e7507f57SSean Wang static int mt7623_pcm_tx_5_pins[] = { 189, }; 972e7507f57SSean Wang static int mt7623_pcm_tx_5_funcs[] = { 3, }; 973e7507f57SSean Wang static int mt7623_pcm_tx_6_pins[] = { 194, }; 974e7507f57SSean Wang static int mt7623_pcm_tx_6_funcs[] = { 3, }; 975e7507f57SSean Wang 976e7507f57SSean Wang /* PWM */ 977e7507f57SSean Wang static int mt7623_pwm_ch1_0_pins[] = { 203, }; 978e7507f57SSean Wang static int mt7623_pwm_ch1_0_funcs[] = { 1, }; 979e7507f57SSean Wang static int mt7623_pwm_ch1_1_pins[] = { 208, }; 980e7507f57SSean Wang static int mt7623_pwm_ch1_1_funcs[] = { 2, }; 981e7507f57SSean Wang static int mt7623_pwm_ch1_2_pins[] = { 72, }; 982e7507f57SSean Wang static int mt7623_pwm_ch1_2_funcs[] = { 4, }; 983e7507f57SSean Wang static int mt7623_pwm_ch1_3_pins[] = { 88, }; 984e7507f57SSean Wang static int mt7623_pwm_ch1_3_funcs[] = { 3, }; 985e7507f57SSean Wang static int mt7623_pwm_ch1_4_pins[] = { 108, }; 986e7507f57SSean Wang static int mt7623_pwm_ch1_4_funcs[] = { 3, }; 987e7507f57SSean Wang static int mt7623_pwm_ch2_0_pins[] = { 204, }; 988e7507f57SSean Wang static int mt7623_pwm_ch2_0_funcs[] = { 1, }; 989e7507f57SSean Wang static int mt7623_pwm_ch2_1_pins[] = { 53, }; 990e7507f57SSean Wang static int mt7623_pwm_ch2_1_funcs[] = { 5, }; 991e7507f57SSean Wang static int mt7623_pwm_ch2_2_pins[] = { 88, }; 992e7507f57SSean Wang static int mt7623_pwm_ch2_2_funcs[] = { 6, }; 993e7507f57SSean Wang static int mt7623_pwm_ch2_3_pins[] = { 108, }; 994e7507f57SSean Wang static int mt7623_pwm_ch2_3_funcs[] = { 6, }; 995e7507f57SSean Wang static int mt7623_pwm_ch2_4_pins[] = { 209, }; 996e7507f57SSean Wang static int mt7623_pwm_ch2_4_funcs[] = { 5, }; 997e7507f57SSean Wang static int mt7623_pwm_ch3_0_pins[] = { 205, }; 998e7507f57SSean Wang static int mt7623_pwm_ch3_0_funcs[] = { 1, }; 999e7507f57SSean Wang static int mt7623_pwm_ch3_1_pins[] = { 55, }; 1000e7507f57SSean Wang static int mt7623_pwm_ch3_1_funcs[] = { 5, }; 1001e7507f57SSean Wang static int mt7623_pwm_ch3_2_pins[] = { 89, }; 1002e7507f57SSean Wang static int mt7623_pwm_ch3_2_funcs[] = { 6, }; 1003e7507f57SSean Wang static int mt7623_pwm_ch3_3_pins[] = { 109, }; 1004e7507f57SSean Wang static int mt7623_pwm_ch3_3_funcs[] = { 6, }; 1005e7507f57SSean Wang static int mt7623_pwm_ch4_0_pins[] = { 206, }; 1006e7507f57SSean Wang static int mt7623_pwm_ch4_0_funcs[] = { 1, }; 1007e7507f57SSean Wang static int mt7623_pwm_ch4_1_pins[] = { 90, }; 1008e7507f57SSean Wang static int mt7623_pwm_ch4_1_funcs[] = { 6, }; 1009e7507f57SSean Wang static int mt7623_pwm_ch4_2_pins[] = { 110, }; 1010e7507f57SSean Wang static int mt7623_pwm_ch4_2_funcs[] = { 6, }; 1011e7507f57SSean Wang static int mt7623_pwm_ch4_3_pins[] = { 124, }; 1012e7507f57SSean Wang static int mt7623_pwm_ch4_3_funcs[] = { 5, }; 1013e7507f57SSean Wang static int mt7623_pwm_ch5_0_pins[] = { 207, }; 1014e7507f57SSean Wang static int mt7623_pwm_ch5_0_funcs[] = { 1, }; 1015e7507f57SSean Wang static int mt7623_pwm_ch5_1_pins[] = { 125, }; 1016e7507f57SSean Wang static int mt7623_pwm_ch5_1_funcs[] = { 5, }; 1017e7507f57SSean Wang 1018e7507f57SSean Wang /* PWRAP */ 1019e7507f57SSean Wang static int mt7623_pwrap_pins[] = { 0, 1, 2, 3, 4, 5, 6, }; 1020e7507f57SSean Wang static int mt7623_pwrap_funcs[] = { 1, 1, 1, 1, 1, 1, 1, }; 1021e7507f57SSean Wang 1022e7507f57SSean Wang /* SPDIF */ 1023e7507f57SSean Wang static int mt7623_spdif_in0_0_pins[] = { 56, }; 1024e7507f57SSean Wang static int mt7623_spdif_in0_0_funcs[] = { 3, }; 1025e7507f57SSean Wang static int mt7623_spdif_in0_1_pins[] = { 201, }; 1026e7507f57SSean Wang static int mt7623_spdif_in0_1_funcs[] = { 1, }; 1027e7507f57SSean Wang static int mt7623_spdif_in1_0_pins[] = { 54, }; 1028e7507f57SSean Wang static int mt7623_spdif_in1_0_funcs[] = { 3, }; 1029e7507f57SSean Wang static int mt7623_spdif_in1_1_pins[] = { 202, }; 1030e7507f57SSean Wang static int mt7623_spdif_in1_1_funcs[] = { 1, }; 1031e7507f57SSean Wang static int mt7623_spdif_out_pins[] = { 202, }; 1032e7507f57SSean Wang static int mt7623_spdif_out_funcs[] = { 1, }; 1033e7507f57SSean Wang 1034e7507f57SSean Wang /* SPI */ 1035e7507f57SSean Wang static int mt7623_spi0_pins[] = { 53, 54, 55, 56, }; 1036e7507f57SSean Wang static int mt7623_spi0_funcs[] = { 1, 1, 1, 1, }; 1037e7507f57SSean Wang static int mt7623_spi1_pins[] = { 7, 199, 8, 9, }; 1038e7507f57SSean Wang static int mt7623_spi1_funcs[] = { 1, 1, 1, 1, }; 1039e7507f57SSean Wang static int mt7623_spi2_pins[] = { 101, 104, 102, 103, }; 1040e7507f57SSean Wang static int mt7623_spi2_funcs[] = { 1, 1, 1, 1, }; 1041e7507f57SSean Wang 1042e7507f57SSean Wang /* UART */ 1043e7507f57SSean Wang static int mt7623_uart0_0_txd_rxd_pins[] = { 79, 80, }; 1044e7507f57SSean Wang static int mt7623_uart0_0_txd_rxd_funcs[] = { 1, 1, }; 1045e7507f57SSean Wang static int mt7623_uart0_1_txd_rxd_pins[] = { 87, 88, }; 1046e7507f57SSean Wang static int mt7623_uart0_1_txd_rxd_funcs[] = { 5, 5, }; 1047e7507f57SSean Wang static int mt7623_uart0_2_txd_rxd_pins[] = { 107, 108, }; 1048e7507f57SSean Wang static int mt7623_uart0_2_txd_rxd_funcs[] = { 5, 5, }; 1049e7507f57SSean Wang static int mt7623_uart0_3_txd_rxd_pins[] = { 123, 122, }; 1050e7507f57SSean Wang static int mt7623_uart0_3_txd_rxd_funcs[] = { 5, 5, }; 1051e7507f57SSean Wang static int mt7623_uart0_rts_cts_pins[] = { 22, 23, }; 1052e7507f57SSean Wang static int mt7623_uart0_rts_cts_funcs[] = { 1, 1, }; 1053e7507f57SSean Wang static int mt7623_uart1_0_txd_rxd_pins[] = { 81, 82, }; 1054e7507f57SSean Wang static int mt7623_uart1_0_txd_rxd_funcs[] = { 1, 1, }; 1055e7507f57SSean Wang static int mt7623_uart1_1_txd_rxd_pins[] = { 89, 90, }; 1056e7507f57SSean Wang static int mt7623_uart1_1_txd_rxd_funcs[] = { 5, 5, }; 1057e7507f57SSean Wang static int mt7623_uart1_2_txd_rxd_pins[] = { 109, 110, }; 1058e7507f57SSean Wang static int mt7623_uart1_2_txd_rxd_funcs[] = { 5, 5, }; 1059e7507f57SSean Wang static int mt7623_uart1_rts_cts_pins[] = { 24, 25, }; 1060e7507f57SSean Wang static int mt7623_uart1_rts_cts_funcs[] = { 1, 1, }; 1061e7507f57SSean Wang static int mt7623_uart2_0_txd_rxd_pins[] = { 14, 15, }; 1062e7507f57SSean Wang static int mt7623_uart2_0_txd_rxd_funcs[] = { 1, 1, }; 1063e7507f57SSean Wang static int mt7623_uart2_1_txd_rxd_pins[] = { 200, 201, }; 1064e7507f57SSean Wang static int mt7623_uart2_1_txd_rxd_funcs[] = { 6, 6, }; 1065e7507f57SSean Wang static int mt7623_uart2_rts_cts_pins[] = { 242, 243, }; 1066e7507f57SSean Wang static int mt7623_uart2_rts_cts_funcs[] = { 1, 1, }; 1067e7507f57SSean Wang static int mt7623_uart3_txd_rxd_pins[] = { 242, 243, }; 1068e7507f57SSean Wang static int mt7623_uart3_txd_rxd_funcs[] = { 2, 2, }; 1069e7507f57SSean Wang static int mt7623_uart3_rts_cts_pins[] = { 26, 27, }; 1070e7507f57SSean Wang static int mt7623_uart3_rts_cts_funcs[] = { 1, 1, }; 1071e7507f57SSean Wang 1072e7507f57SSean Wang /* Watchdog */ 1073e7507f57SSean Wang static int mt7623_watchdog_0_pins[] = { 11, }; 1074e7507f57SSean Wang static int mt7623_watchdog_0_funcs[] = { 1, }; 1075e7507f57SSean Wang static int mt7623_watchdog_1_pins[] = { 121, }; 1076e7507f57SSean Wang static int mt7623_watchdog_1_funcs[] = { 5, }; 1077e7507f57SSean Wang 1078e7507f57SSean Wang static const struct group_desc mt7623_groups[] = { 1079e7507f57SSean Wang PINCTRL_PIN_GROUP("aud_ext_clk0", mt7623_aud_ext_clk0), 1080e7507f57SSean Wang PINCTRL_PIN_GROUP("aud_ext_clk1", mt7623_aud_ext_clk1), 1081e7507f57SSean Wang PINCTRL_PIN_GROUP("dsi_te", mt7623_dsi_te), 1082e7507f57SSean Wang PINCTRL_PIN_GROUP("disp_pwm_0", mt7623_disp_pwm_0), 1083e7507f57SSean Wang PINCTRL_PIN_GROUP("disp_pwm_1", mt7623_disp_pwm_1), 1084e7507f57SSean Wang PINCTRL_PIN_GROUP("disp_pwm_2", mt7623_disp_pwm_2), 1085e7507f57SSean Wang PINCTRL_PIN_GROUP("ephy", mt7623_ephy), 1086e7507f57SSean Wang PINCTRL_PIN_GROUP("esw_int", mt7623_esw_int), 1087e7507f57SSean Wang PINCTRL_PIN_GROUP("esw_rst", mt7623_esw_rst), 1088e7507f57SSean Wang PINCTRL_PIN_GROUP("ext_sdio", mt7623_ext_sdio), 1089e7507f57SSean Wang PINCTRL_PIN_GROUP("hdmi_cec", mt7623_hdmi_cec), 1090e7507f57SSean Wang PINCTRL_PIN_GROUP("hdmi_htplg", mt7623_hdmi_htplg), 1091e7507f57SSean Wang PINCTRL_PIN_GROUP("hdmi_i2c", mt7623_hdmi_i2c), 1092e7507f57SSean Wang PINCTRL_PIN_GROUP("hdmi_rx", mt7623_hdmi_rx), 1093e7507f57SSean Wang PINCTRL_PIN_GROUP("hdmi_rx_i2c", mt7623_hdmi_rx_i2c), 1094e7507f57SSean Wang PINCTRL_PIN_GROUP("i2c0", mt7623_i2c0), 1095e7507f57SSean Wang PINCTRL_PIN_GROUP("i2c1_0", mt7623_i2c1_0), 1096e7507f57SSean Wang PINCTRL_PIN_GROUP("i2c1_1", mt7623_i2c1_1), 1097e7507f57SSean Wang PINCTRL_PIN_GROUP("i2c1_2", mt7623_i2c1_2), 1098e7507f57SSean Wang PINCTRL_PIN_GROUP("i2c1_3", mt7623_i2c1_3), 1099e7507f57SSean Wang PINCTRL_PIN_GROUP("i2c1_4", mt7623_i2c1_4), 1100e7507f57SSean Wang PINCTRL_PIN_GROUP("i2c2_0", mt7623_i2c2_0), 1101e7507f57SSean Wang PINCTRL_PIN_GROUP("i2c2_1", mt7623_i2c2_1), 1102e7507f57SSean Wang PINCTRL_PIN_GROUP("i2c2_2", mt7623_i2c2_2), 1103e7507f57SSean Wang PINCTRL_PIN_GROUP("i2c2_3", mt7623_i2c2_3), 1104e7507f57SSean Wang PINCTRL_PIN_GROUP("i2s0", mt7623_i2s0), 1105e7507f57SSean Wang PINCTRL_PIN_GROUP("i2s1", mt7623_i2s1), 1106e7507f57SSean Wang PINCTRL_PIN_GROUP("i2s4", mt7623_i2s4), 1107e7507f57SSean Wang PINCTRL_PIN_GROUP("i2s5", mt7623_i2s5), 1108e7507f57SSean Wang PINCTRL_PIN_GROUP("i2s2_bclk_lrclk_mclk", mt7623_i2s2_bclk_lrclk_mclk), 1109e7507f57SSean Wang PINCTRL_PIN_GROUP("i2s3_bclk_lrclk_mclk", mt7623_i2s3_bclk_lrclk_mclk), 1110e7507f57SSean Wang PINCTRL_PIN_GROUP("i2s2_data_in", mt7623_i2s2_data_in), 1111e7507f57SSean Wang PINCTRL_PIN_GROUP("i2s3_data_in", mt7623_i2s3_data_in), 1112e7507f57SSean Wang PINCTRL_PIN_GROUP("i2s2_data_0", mt7623_i2s2_data_0), 1113e7507f57SSean Wang PINCTRL_PIN_GROUP("i2s2_data_1", mt7623_i2s2_data_1), 1114e7507f57SSean Wang PINCTRL_PIN_GROUP("i2s3_data_0", mt7623_i2s3_data_0), 1115e7507f57SSean Wang PINCTRL_PIN_GROUP("i2s3_data_1", mt7623_i2s3_data_1), 1116e7507f57SSean Wang PINCTRL_PIN_GROUP("ir", mt7623_ir), 1117e7507f57SSean Wang PINCTRL_PIN_GROUP("lcm_rst", mt7623_lcm_rst), 1118e7507f57SSean Wang PINCTRL_PIN_GROUP("mdc_mdio", mt7623_mdc_mdio), 1119e7507f57SSean Wang PINCTRL_PIN_GROUP("mipi_tx", mt7623_mipi_tx), 1120e7507f57SSean Wang PINCTRL_PIN_GROUP("msdc0", mt7623_msdc0), 1121e7507f57SSean Wang PINCTRL_PIN_GROUP("msdc1", mt7623_msdc1), 1122e7507f57SSean Wang PINCTRL_PIN_GROUP("msdc1_ins", mt7623_msdc1_ins), 1123e7507f57SSean Wang PINCTRL_PIN_GROUP("msdc1_wp_0", mt7623_msdc1_wp_0), 1124e7507f57SSean Wang PINCTRL_PIN_GROUP("msdc1_wp_1", mt7623_msdc1_wp_1), 1125e7507f57SSean Wang PINCTRL_PIN_GROUP("msdc1_wp_2", mt7623_msdc1_wp_2), 1126e7507f57SSean Wang PINCTRL_PIN_GROUP("msdc2", mt7623_msdc2), 1127e7507f57SSean Wang PINCTRL_PIN_GROUP("msdc3", mt7623_msdc3), 1128e7507f57SSean Wang PINCTRL_PIN_GROUP("nandc", mt7623_nandc), 1129e7507f57SSean Wang PINCTRL_PIN_GROUP("nandc_ceb0", mt7623_nandc_ceb0), 1130e7507f57SSean Wang PINCTRL_PIN_GROUP("nandc_ceb1", mt7623_nandc_ceb1), 1131e7507f57SSean Wang PINCTRL_PIN_GROUP("otg_iddig0_0", mt7623_otg_iddig0_0), 1132e7507f57SSean Wang PINCTRL_PIN_GROUP("otg_iddig0_1", mt7623_otg_iddig0_1), 1133e7507f57SSean Wang PINCTRL_PIN_GROUP("otg_iddig0_2", mt7623_otg_iddig0_2), 1134e7507f57SSean Wang PINCTRL_PIN_GROUP("otg_iddig1_0", mt7623_otg_iddig1_0), 1135e7507f57SSean Wang PINCTRL_PIN_GROUP("otg_iddig1_1", mt7623_otg_iddig1_1), 1136e7507f57SSean Wang PINCTRL_PIN_GROUP("otg_iddig1_2", mt7623_otg_iddig1_2), 1137e7507f57SSean Wang PINCTRL_PIN_GROUP("otg_drv_vbus0_0", mt7623_otg_drv_vbus0_0), 1138e7507f57SSean Wang PINCTRL_PIN_GROUP("otg_drv_vbus0_1", mt7623_otg_drv_vbus0_1), 1139e7507f57SSean Wang PINCTRL_PIN_GROUP("otg_drv_vbus0_2", mt7623_otg_drv_vbus0_2), 1140e7507f57SSean Wang PINCTRL_PIN_GROUP("otg_drv_vbus1_0", mt7623_otg_drv_vbus1_0), 1141e7507f57SSean Wang PINCTRL_PIN_GROUP("otg_drv_vbus1_1", mt7623_otg_drv_vbus1_1), 1142e7507f57SSean Wang PINCTRL_PIN_GROUP("otg_drv_vbus1_2", mt7623_otg_drv_vbus1_2), 1143e7507f57SSean Wang PINCTRL_PIN_GROUP("pcie0_0_perst", mt7623_pcie0_0_perst), 1144e7507f57SSean Wang PINCTRL_PIN_GROUP("pcie0_1_perst", mt7623_pcie0_1_perst), 1145e7507f57SSean Wang PINCTRL_PIN_GROUP("pcie1_0_perst", mt7623_pcie1_0_perst), 1146e7507f57SSean Wang PINCTRL_PIN_GROUP("pcie1_1_perst", mt7623_pcie1_1_perst), 1147e7507f57SSean Wang PINCTRL_PIN_GROUP("pcie1_1_perst", mt7623_pcie1_1_perst), 1148e7507f57SSean Wang PINCTRL_PIN_GROUP("pcie0_0_rev_perst", mt7623_pcie0_0_rev_perst), 1149e7507f57SSean Wang PINCTRL_PIN_GROUP("pcie0_1_rev_perst", mt7623_pcie0_1_rev_perst), 1150e7507f57SSean Wang PINCTRL_PIN_GROUP("pcie1_0_rev_perst", mt7623_pcie1_0_rev_perst), 1151e7507f57SSean Wang PINCTRL_PIN_GROUP("pcie1_1_rev_perst", mt7623_pcie1_1_rev_perst), 1152e7507f57SSean Wang PINCTRL_PIN_GROUP("pcie2_0_rev_perst", mt7623_pcie2_0_rev_perst), 1153e7507f57SSean Wang PINCTRL_PIN_GROUP("pcie2_1_rev_perst", mt7623_pcie2_1_rev_perst), 1154e7507f57SSean Wang PINCTRL_PIN_GROUP("pcie2_0_perst", mt7623_pcie2_0_perst), 1155e7507f57SSean Wang PINCTRL_PIN_GROUP("pcie2_1_perst", mt7623_pcie2_1_perst), 1156e7507f57SSean Wang PINCTRL_PIN_GROUP("pcie0_0_wake", mt7623_pcie0_0_wake), 1157e7507f57SSean Wang PINCTRL_PIN_GROUP("pcie0_1_wake", mt7623_pcie0_1_wake), 1158e7507f57SSean Wang PINCTRL_PIN_GROUP("pcie1_0_wake", mt7623_pcie1_0_wake), 1159e7507f57SSean Wang PINCTRL_PIN_GROUP("pcie1_1_wake", mt7623_pcie1_1_wake), 1160e7507f57SSean Wang PINCTRL_PIN_GROUP("pcie2_0_wake", mt7623_pcie2_0_wake), 1161e7507f57SSean Wang PINCTRL_PIN_GROUP("pcie2_1_wake", mt7623_pcie2_1_wake), 1162e7507f57SSean Wang PINCTRL_PIN_GROUP("pcie0_clkreq", mt7623_pcie0_clkreq), 1163e7507f57SSean Wang PINCTRL_PIN_GROUP("pcie1_clkreq", mt7623_pcie1_clkreq), 1164e7507f57SSean Wang PINCTRL_PIN_GROUP("pcie2_clkreq", mt7623_pcie2_clkreq), 1165e7507f57SSean Wang PINCTRL_PIN_GROUP("pcm_clk_0", mt7623_pcm_clk_0), 1166e7507f57SSean Wang PINCTRL_PIN_GROUP("pcm_clk_1", mt7623_pcm_clk_1), 1167e7507f57SSean Wang PINCTRL_PIN_GROUP("pcm_clk_2", mt7623_pcm_clk_2), 1168e7507f57SSean Wang PINCTRL_PIN_GROUP("pcm_clk_3", mt7623_pcm_clk_3), 1169e7507f57SSean Wang PINCTRL_PIN_GROUP("pcm_clk_4", mt7623_pcm_clk_4), 1170e7507f57SSean Wang PINCTRL_PIN_GROUP("pcm_clk_5", mt7623_pcm_clk_5), 1171e7507f57SSean Wang PINCTRL_PIN_GROUP("pcm_clk_6", mt7623_pcm_clk_6), 1172e7507f57SSean Wang PINCTRL_PIN_GROUP("pcm_sync_0", mt7623_pcm_sync_0), 1173e7507f57SSean Wang PINCTRL_PIN_GROUP("pcm_sync_1", mt7623_pcm_sync_1), 1174e7507f57SSean Wang PINCTRL_PIN_GROUP("pcm_sync_2", mt7623_pcm_sync_2), 1175e7507f57SSean Wang PINCTRL_PIN_GROUP("pcm_sync_3", mt7623_pcm_sync_3), 1176e7507f57SSean Wang PINCTRL_PIN_GROUP("pcm_sync_4", mt7623_pcm_sync_4), 1177e7507f57SSean Wang PINCTRL_PIN_GROUP("pcm_sync_5", mt7623_pcm_sync_5), 1178e7507f57SSean Wang PINCTRL_PIN_GROUP("pcm_sync_6", mt7623_pcm_sync_6), 1179e7507f57SSean Wang PINCTRL_PIN_GROUP("pcm_rx_0", mt7623_pcm_rx_0), 1180e7507f57SSean Wang PINCTRL_PIN_GROUP("pcm_rx_1", mt7623_pcm_rx_1), 1181e7507f57SSean Wang PINCTRL_PIN_GROUP("pcm_rx_2", mt7623_pcm_rx_2), 1182e7507f57SSean Wang PINCTRL_PIN_GROUP("pcm_rx_3", mt7623_pcm_rx_3), 1183e7507f57SSean Wang PINCTRL_PIN_GROUP("pcm_rx_4", mt7623_pcm_rx_4), 1184e7507f57SSean Wang PINCTRL_PIN_GROUP("pcm_rx_5", mt7623_pcm_rx_5), 1185e7507f57SSean Wang PINCTRL_PIN_GROUP("pcm_rx_6", mt7623_pcm_rx_6), 1186e7507f57SSean Wang PINCTRL_PIN_GROUP("pcm_tx_0", mt7623_pcm_tx_0), 1187e7507f57SSean Wang PINCTRL_PIN_GROUP("pcm_tx_1", mt7623_pcm_tx_1), 1188e7507f57SSean Wang PINCTRL_PIN_GROUP("pcm_tx_2", mt7623_pcm_tx_2), 1189e7507f57SSean Wang PINCTRL_PIN_GROUP("pcm_tx_3", mt7623_pcm_tx_3), 1190e7507f57SSean Wang PINCTRL_PIN_GROUP("pcm_tx_4", mt7623_pcm_tx_4), 1191e7507f57SSean Wang PINCTRL_PIN_GROUP("pcm_tx_5", mt7623_pcm_tx_5), 1192e7507f57SSean Wang PINCTRL_PIN_GROUP("pcm_tx_6", mt7623_pcm_tx_6), 1193e7507f57SSean Wang PINCTRL_PIN_GROUP("pwm_ch1_0", mt7623_pwm_ch1_0), 1194e7507f57SSean Wang PINCTRL_PIN_GROUP("pwm_ch1_1", mt7623_pwm_ch1_1), 1195e7507f57SSean Wang PINCTRL_PIN_GROUP("pwm_ch1_2", mt7623_pwm_ch1_2), 1196e7507f57SSean Wang PINCTRL_PIN_GROUP("pwm_ch1_3", mt7623_pwm_ch1_3), 1197e7507f57SSean Wang PINCTRL_PIN_GROUP("pwm_ch1_4", mt7623_pwm_ch1_4), 1198e7507f57SSean Wang PINCTRL_PIN_GROUP("pwm_ch2_0", mt7623_pwm_ch2_0), 1199e7507f57SSean Wang PINCTRL_PIN_GROUP("pwm_ch2_1", mt7623_pwm_ch2_1), 1200e7507f57SSean Wang PINCTRL_PIN_GROUP("pwm_ch2_2", mt7623_pwm_ch2_2), 1201e7507f57SSean Wang PINCTRL_PIN_GROUP("pwm_ch2_3", mt7623_pwm_ch2_3), 1202e7507f57SSean Wang PINCTRL_PIN_GROUP("pwm_ch2_4", mt7623_pwm_ch2_4), 1203e7507f57SSean Wang PINCTRL_PIN_GROUP("pwm_ch3_0", mt7623_pwm_ch3_0), 1204e7507f57SSean Wang PINCTRL_PIN_GROUP("pwm_ch3_1", mt7623_pwm_ch3_1), 1205e7507f57SSean Wang PINCTRL_PIN_GROUP("pwm_ch3_2", mt7623_pwm_ch3_2), 1206e7507f57SSean Wang PINCTRL_PIN_GROUP("pwm_ch3_3", mt7623_pwm_ch3_3), 1207e7507f57SSean Wang PINCTRL_PIN_GROUP("pwm_ch4_0", mt7623_pwm_ch4_0), 1208e7507f57SSean Wang PINCTRL_PIN_GROUP("pwm_ch4_1", mt7623_pwm_ch4_1), 1209e7507f57SSean Wang PINCTRL_PIN_GROUP("pwm_ch4_2", mt7623_pwm_ch4_2), 1210e7507f57SSean Wang PINCTRL_PIN_GROUP("pwm_ch4_3", mt7623_pwm_ch4_3), 1211e7507f57SSean Wang PINCTRL_PIN_GROUP("pwm_ch5_0", mt7623_pwm_ch5_0), 1212e7507f57SSean Wang PINCTRL_PIN_GROUP("pwm_ch5_1", mt7623_pwm_ch5_1), 1213e7507f57SSean Wang PINCTRL_PIN_GROUP("pwrap", mt7623_pwrap), 1214e7507f57SSean Wang PINCTRL_PIN_GROUP("rtc", mt7623_rtc), 1215e7507f57SSean Wang PINCTRL_PIN_GROUP("spdif_in0_0", mt7623_spdif_in0_0), 1216e7507f57SSean Wang PINCTRL_PIN_GROUP("spdif_in0_1", mt7623_spdif_in0_1), 1217e7507f57SSean Wang PINCTRL_PIN_GROUP("spdif_in1_0", mt7623_spdif_in1_0), 1218e7507f57SSean Wang PINCTRL_PIN_GROUP("spdif_in1_1", mt7623_spdif_in1_1), 1219e7507f57SSean Wang PINCTRL_PIN_GROUP("spdif_out", mt7623_spdif_out), 1220e7507f57SSean Wang PINCTRL_PIN_GROUP("spi0", mt7623_spi0), 1221e7507f57SSean Wang PINCTRL_PIN_GROUP("spi1", mt7623_spi1), 1222e7507f57SSean Wang PINCTRL_PIN_GROUP("spi2", mt7623_spi2), 1223e7507f57SSean Wang PINCTRL_PIN_GROUP("uart0_0_txd_rxd", mt7623_uart0_0_txd_rxd), 1224e7507f57SSean Wang PINCTRL_PIN_GROUP("uart0_1_txd_rxd", mt7623_uart0_1_txd_rxd), 1225e7507f57SSean Wang PINCTRL_PIN_GROUP("uart0_2_txd_rxd", mt7623_uart0_2_txd_rxd), 1226e7507f57SSean Wang PINCTRL_PIN_GROUP("uart0_3_txd_rxd", mt7623_uart0_3_txd_rxd), 1227e7507f57SSean Wang PINCTRL_PIN_GROUP("uart1_0_txd_rxd", mt7623_uart1_0_txd_rxd), 1228e7507f57SSean Wang PINCTRL_PIN_GROUP("uart1_1_txd_rxd", mt7623_uart1_1_txd_rxd), 1229e7507f57SSean Wang PINCTRL_PIN_GROUP("uart1_2_txd_rxd", mt7623_uart1_2_txd_rxd), 1230e7507f57SSean Wang PINCTRL_PIN_GROUP("uart2_0_txd_rxd", mt7623_uart2_0_txd_rxd), 1231e7507f57SSean Wang PINCTRL_PIN_GROUP("uart2_1_txd_rxd", mt7623_uart2_1_txd_rxd), 1232e7507f57SSean Wang PINCTRL_PIN_GROUP("uart3_txd_rxd", mt7623_uart3_txd_rxd), 1233e7507f57SSean Wang PINCTRL_PIN_GROUP("uart0_rts_cts", mt7623_uart0_rts_cts), 1234e7507f57SSean Wang PINCTRL_PIN_GROUP("uart1_rts_cts", mt7623_uart1_rts_cts), 1235e7507f57SSean Wang PINCTRL_PIN_GROUP("uart2_rts_cts", mt7623_uart2_rts_cts), 1236e7507f57SSean Wang PINCTRL_PIN_GROUP("uart3_rts_cts", mt7623_uart3_rts_cts), 1237e7507f57SSean Wang PINCTRL_PIN_GROUP("watchdog_0", mt7623_watchdog_0), 1238e7507f57SSean Wang PINCTRL_PIN_GROUP("watchdog_1", mt7623_watchdog_1), 1239e7507f57SSean Wang }; 1240e7507f57SSean Wang 1241e7507f57SSean Wang /* Joint those groups owning the same capability in user point of view which 1242e7507f57SSean Wang * allows that people tend to use through the device tree. 1243e7507f57SSean Wang */ 1244e7507f57SSean Wang static const char *mt7623_aud_clk_groups[] = { "aud_ext_clk0", 1245e7507f57SSean Wang "aud_ext_clk1", }; 1246e7507f57SSean Wang static const char *mt7623_disp_pwm_groups[] = { "disp_pwm_0", "disp_pwm_1", 1247e7507f57SSean Wang "disp_pwm_2", }; 1248e7507f57SSean Wang static const char *mt7623_ethernet_groups[] = { "esw_int", "esw_rst", 1249e7507f57SSean Wang "ephy", "mdc_mdio", }; 1250e7507f57SSean Wang static const char *mt7623_ext_sdio_groups[] = { "ext_sdio", }; 1251e7507f57SSean Wang static const char *mt7623_hdmi_groups[] = { "hdmi_cec", "hdmi_htplg", 1252e7507f57SSean Wang "hdmi_i2c", "hdmi_rx", 1253e7507f57SSean Wang "hdmi_rx_i2c", }; 1254e7507f57SSean Wang static const char *mt7623_i2c_groups[] = { "i2c0", "i2c1_0", "i2c1_1", 1255e7507f57SSean Wang "i2c1_2", "i2c1_3", "i2c1_4", 1256e7507f57SSean Wang "i2c2_0", "i2c2_1", "i2c2_2", 1257e7507f57SSean Wang "i2c2_3", }; 1258e7507f57SSean Wang static const char *mt7623_i2s_groups[] = { "i2s0", "i2s1", 1259e7507f57SSean Wang "i2s2_bclk_lrclk_mclk", 1260e7507f57SSean Wang "i2s3_bclk_lrclk_mclk", 1261e7507f57SSean Wang "i2s4", "i2s5", 1262e7507f57SSean Wang "i2s2_data_in", "i2s3_data_in", 1263e7507f57SSean Wang "i2s2_data_0", "i2s2_data_1", 1264e7507f57SSean Wang "i2s3_data_0", "i2s3_data_1", }; 1265e7507f57SSean Wang static const char *mt7623_ir_groups[] = { "ir", }; 1266e7507f57SSean Wang static const char *mt7623_lcd_groups[] = { "dsi_te", "lcm_rst", "mipi_tx", }; 1267e7507f57SSean Wang static const char *mt7623_msdc_groups[] = { "msdc0", "msdc1", "msdc1_ins", 1268e7507f57SSean Wang "msdc1_wp_0", "msdc1_wp_1", 1269e7507f57SSean Wang "msdc1_wp_2", "msdc2", 1270e7507f57SSean Wang "msdc3", }; 1271e7507f57SSean Wang static const char *mt7623_nandc_groups[] = { "nandc", "nandc_ceb0", 1272e7507f57SSean Wang "nandc_ceb1", }; 1273e7507f57SSean Wang static const char *mt7623_otg_groups[] = { "otg_iddig0_0", "otg_iddig0_1", 1274e7507f57SSean Wang "otg_iddig0_2", "otg_iddig1_0", 1275e7507f57SSean Wang "otg_iddig1_1", "otg_iddig1_2", 1276e7507f57SSean Wang "otg_drv_vbus0_0", 1277e7507f57SSean Wang "otg_drv_vbus0_1", 1278e7507f57SSean Wang "otg_drv_vbus0_2", 1279e7507f57SSean Wang "otg_drv_vbus1_0", 1280e7507f57SSean Wang "otg_drv_vbus1_1", 1281e7507f57SSean Wang "otg_drv_vbus1_2", }; 1282e7507f57SSean Wang static const char *mt7623_pcie_groups[] = { "pcie0_0_perst", "pcie0_1_perst", 1283e7507f57SSean Wang "pcie1_0_perst", "pcie1_1_perst", 1284e7507f57SSean Wang "pcie2_0_perst", "pcie2_1_perst", 1285e7507f57SSean Wang "pcie0_0_rev_perst", 1286e7507f57SSean Wang "pcie0_1_rev_perst", 1287e7507f57SSean Wang "pcie1_0_rev_perst", 1288e7507f57SSean Wang "pcie1_1_rev_perst", 1289e7507f57SSean Wang "pcie2_0_rev_perst", 1290e7507f57SSean Wang "pcie2_1_rev_perst", 1291e7507f57SSean Wang "pcie0_0_wake", "pcie0_1_wake", 1292e7507f57SSean Wang "pcie2_0_wake", "pcie2_1_wake", 1293e7507f57SSean Wang "pcie0_clkreq", "pcie1_clkreq", 1294e7507f57SSean Wang "pcie2_clkreq", }; 1295e7507f57SSean Wang static const char *mt7623_pcm_groups[] = { "pcm_clk_0", "pcm_clk_1", 1296e7507f57SSean Wang "pcm_clk_2", "pcm_clk_3", 1297e7507f57SSean Wang "pcm_clk_4", "pcm_clk_5", 1298e7507f57SSean Wang "pcm_clk_6", "pcm_sync_0", 1299e7507f57SSean Wang "pcm_sync_1", "pcm_sync_2", 1300e7507f57SSean Wang "pcm_sync_3", "pcm_sync_4", 1301e7507f57SSean Wang "pcm_sync_5", "pcm_sync_6", 1302e7507f57SSean Wang "pcm_rx_0", "pcm_rx_1", 1303e7507f57SSean Wang "pcm_rx_2", "pcm_rx_3", 1304e7507f57SSean Wang "pcm_rx_4", "pcm_rx_5", 1305e7507f57SSean Wang "pcm_rx_6", "pcm_tx_0", 1306e7507f57SSean Wang "pcm_tx_1", "pcm_tx_2", 1307e7507f57SSean Wang "pcm_tx_3", "pcm_tx_4", 1308e7507f57SSean Wang "pcm_tx_5", "pcm_tx_6", }; 1309e7507f57SSean Wang static const char *mt7623_pwm_groups[] = { "pwm_ch1_0", "pwm_ch1_1", 1310e7507f57SSean Wang "pwm_ch1_2", "pwm_ch2_0", 1311e7507f57SSean Wang "pwm_ch2_1", "pwm_ch2_2", 1312e7507f57SSean Wang "pwm_ch3_0", "pwm_ch3_1", 1313e7507f57SSean Wang "pwm_ch3_2", "pwm_ch4_0", 1314e7507f57SSean Wang "pwm_ch4_1", "pwm_ch4_2", 1315e7507f57SSean Wang "pwm_ch4_3", "pwm_ch5_0", 1316e7507f57SSean Wang "pwm_ch5_1", "pwm_ch5_2", 1317e7507f57SSean Wang "pwm_ch6_0", "pwm_ch6_1", 1318e7507f57SSean Wang "pwm_ch6_2", "pwm_ch6_3", 1319e7507f57SSean Wang "pwm_ch7_0", "pwm_ch7_1", 1320e7507f57SSean Wang "pwm_ch7_2", }; 1321e7507f57SSean Wang static const char *mt7623_pwrap_groups[] = { "pwrap", }; 1322e7507f57SSean Wang static const char *mt7623_rtc_groups[] = { "rtc", }; 1323e7507f57SSean Wang static const char *mt7623_spi_groups[] = { "spi0", "spi2", "spi2", }; 1324e7507f57SSean Wang static const char *mt7623_spdif_groups[] = { "spdif_in0_0", "spdif_in0_1", 1325e7507f57SSean Wang "spdif_in1_0", "spdif_in1_1", 1326e7507f57SSean Wang "spdif_out", }; 1327e7507f57SSean Wang static const char *mt7623_uart_groups[] = { "uart0_0_txd_rxd", 1328e7507f57SSean Wang "uart0_1_txd_rxd", 1329e7507f57SSean Wang "uart0_2_txd_rxd", 1330e7507f57SSean Wang "uart0_3_txd_rxd", 1331e7507f57SSean Wang "uart1_0_txd_rxd", 1332e7507f57SSean Wang "uart1_1_txd_rxd", 1333e7507f57SSean Wang "uart1_2_txd_rxd", 1334e7507f57SSean Wang "uart2_0_txd_rxd", 1335e7507f57SSean Wang "uart2_1_txd_rxd", 1336e7507f57SSean Wang "uart3_txd_rxd", 1337e7507f57SSean Wang "uart0_rts_cts", 1338e7507f57SSean Wang "uart1_rts_cts", 1339e7507f57SSean Wang "uart2_rts_cts", 1340e7507f57SSean Wang "uart3_rts_cts", }; 1341e7507f57SSean Wang static const char *mt7623_wdt_groups[] = { "watchdog_0", "watchdog_1", }; 1342e7507f57SSean Wang 1343e7507f57SSean Wang static const struct function_desc mt7623_functions[] = { 1344e7507f57SSean Wang {"audck", mt7623_aud_clk_groups, ARRAY_SIZE(mt7623_aud_clk_groups)}, 1345e7507f57SSean Wang {"disp", mt7623_disp_pwm_groups, ARRAY_SIZE(mt7623_disp_pwm_groups)}, 1346e7507f57SSean Wang {"eth", mt7623_ethernet_groups, ARRAY_SIZE(mt7623_ethernet_groups)}, 1347e7507f57SSean Wang {"sdio", mt7623_ext_sdio_groups, ARRAY_SIZE(mt7623_ext_sdio_groups)}, 1348e7507f57SSean Wang {"hdmi", mt7623_hdmi_groups, ARRAY_SIZE(mt7623_hdmi_groups)}, 1349e7507f57SSean Wang {"i2c", mt7623_i2c_groups, ARRAY_SIZE(mt7623_i2c_groups)}, 1350e7507f57SSean Wang {"i2s", mt7623_i2s_groups, ARRAY_SIZE(mt7623_i2s_groups)}, 1351e7507f57SSean Wang {"ir", mt7623_ir_groups, ARRAY_SIZE(mt7623_ir_groups)}, 1352e7507f57SSean Wang {"lcd", mt7623_lcd_groups, ARRAY_SIZE(mt7623_lcd_groups)}, 1353e7507f57SSean Wang {"msdc", mt7623_msdc_groups, ARRAY_SIZE(mt7623_msdc_groups)}, 1354e7507f57SSean Wang {"nand", mt7623_nandc_groups, ARRAY_SIZE(mt7623_nandc_groups)}, 1355e7507f57SSean Wang {"otg", mt7623_otg_groups, ARRAY_SIZE(mt7623_otg_groups)}, 1356e7507f57SSean Wang {"pcie", mt7623_pcie_groups, ARRAY_SIZE(mt7623_pcie_groups)}, 1357e7507f57SSean Wang {"pcm", mt7623_pcm_groups, ARRAY_SIZE(mt7623_pcm_groups)}, 1358e7507f57SSean Wang {"pwm", mt7623_pwm_groups, ARRAY_SIZE(mt7623_pwm_groups)}, 1359e7507f57SSean Wang {"pwrap", mt7623_pwrap_groups, ARRAY_SIZE(mt7623_pwrap_groups)}, 1360e7507f57SSean Wang {"rtc", mt7623_rtc_groups, ARRAY_SIZE(mt7623_rtc_groups)}, 1361e7507f57SSean Wang {"spi", mt7623_spi_groups, ARRAY_SIZE(mt7623_spi_groups)}, 1362e7507f57SSean Wang {"spdif", mt7623_spdif_groups, ARRAY_SIZE(mt7623_spdif_groups)}, 1363e7507f57SSean Wang {"uart", mt7623_uart_groups, ARRAY_SIZE(mt7623_uart_groups)}, 1364e7507f57SSean Wang {"watchdog", mt7623_wdt_groups, ARRAY_SIZE(mt7623_wdt_groups)}, 1365e7507f57SSean Wang }; 1366e7507f57SSean Wang 1367e7507f57SSean Wang static const struct mtk_eint_hw mt7623_eint_hw = { 1368e7507f57SSean Wang .port_mask = 6, 1369e7507f57SSean Wang .ports = 6, 1370e7507f57SSean Wang .ap_num = 169, 1371e7507f57SSean Wang .db_cnt = 20, 1372e7507f57SSean Wang }; 1373e7507f57SSean Wang 1374e7507f57SSean Wang static struct mtk_pin_soc mt7623_data = { 1375e7507f57SSean Wang .reg_cal = mt7623_reg_cals, 1376e7507f57SSean Wang .pins = (const struct pinctrl_pin_desc *)mt7623_pins, 1377e7507f57SSean Wang .npins = ARRAY_SIZE(mt7623_pins), 1378e7507f57SSean Wang .grps = mt7623_groups, 1379e7507f57SSean Wang .ngrps = ARRAY_SIZE(mt7623_groups), 1380e7507f57SSean Wang .funcs = mt7623_functions, 1381e7507f57SSean Wang .nfuncs = ARRAY_SIZE(mt7623_functions), 1382e7507f57SSean Wang .eint_hw = &mt7623_eint_hw, 1383e7507f57SSean Wang .gpio_m = 0, 1384e7507f57SSean Wang .eint_m = 0, 1385e7507f57SSean Wang .ies_present = true, 1386*2bc47dfeSSean Wang .base_names = mtk_default_register_base_names, 1387*2bc47dfeSSean Wang .nbase_names = ARRAY_SIZE(mtk_default_register_base_names), 1388e7507f57SSean Wang .bias_disable_set = mtk_pinconf_bias_disable_set_rev1, 1389e7507f57SSean Wang .bias_disable_get = mtk_pinconf_bias_disable_get_rev1, 1390e7507f57SSean Wang .bias_set = mtk_pinconf_bias_set_rev1, 1391e7507f57SSean Wang .bias_get = mtk_pinconf_bias_get_rev1, 1392e7507f57SSean Wang .drive_set = mtk_pinconf_drive_set_rev1, 1393e7507f57SSean Wang .drive_get = mtk_pinconf_drive_get_rev1, 1394e7507f57SSean Wang .adv_pull_get = mtk_pinconf_adv_pull_get, 1395e7507f57SSean Wang .adv_pull_set = mtk_pinconf_adv_pull_set, 1396e7507f57SSean Wang }; 1397e7507f57SSean Wang 1398e7507f57SSean Wang /* 1399e7507f57SSean Wang * There are some specific pins have mux functions greater than 8, 1400e7507f57SSean Wang * and if we want to switch thees high modes we need to disable 1401e7507f57SSean Wang * bonding constraints firstly. 1402e7507f57SSean Wang */ 1403e7507f57SSean Wang static void mt7623_bonding_disable(struct platform_device *pdev) 1404e7507f57SSean Wang { 1405e7507f57SSean Wang struct mtk_pinctrl *hw = platform_get_drvdata(pdev); 1406e7507f57SSean Wang 1407*2bc47dfeSSean Wang mtk_rmw(hw, 0, PIN_BOND_REG0, BOND_PCIE_CLR, BOND_PCIE_CLR); 1408*2bc47dfeSSean Wang mtk_rmw(hw, 0, PIN_BOND_REG1, BOND_I2S_CLR, BOND_I2S_CLR); 1409*2bc47dfeSSean Wang mtk_rmw(hw, 0, PIN_BOND_REG2, BOND_MSDC0E_CLR, BOND_MSDC0E_CLR); 1410e7507f57SSean Wang } 1411e7507f57SSean Wang 1412e7507f57SSean Wang static const struct of_device_id mt7623_pctrl_match[] = { 1413e7507f57SSean Wang { .compatible = "mediatek,mt7623-moore-pinctrl", }, 1414e7507f57SSean Wang {} 1415e7507f57SSean Wang }; 1416e7507f57SSean Wang 1417e7507f57SSean Wang static int mt7623_pinctrl_probe(struct platform_device *pdev) 1418e7507f57SSean Wang { 1419e7507f57SSean Wang int err; 1420e7507f57SSean Wang 1421e7507f57SSean Wang err = mtk_moore_pinctrl_probe(pdev, &mt7623_data); 1422e7507f57SSean Wang if (err) 1423e7507f57SSean Wang return err; 1424e7507f57SSean Wang 1425e7507f57SSean Wang mt7623_bonding_disable(pdev); 1426e7507f57SSean Wang 1427e7507f57SSean Wang return 0; 1428e7507f57SSean Wang } 1429e7507f57SSean Wang 1430e7507f57SSean Wang static struct platform_driver mtk_pinctrl_driver = { 1431e7507f57SSean Wang .probe = mt7623_pinctrl_probe, 1432e7507f57SSean Wang .driver = { 1433e7507f57SSean Wang .name = "mt7623-moore-pinctrl", 1434e7507f57SSean Wang .of_match_table = mt7623_pctrl_match, 1435e7507f57SSean Wang }, 1436e7507f57SSean Wang }; 1437e7507f57SSean Wang 1438e7507f57SSean Wang static int __init mtk_pinctrl_init(void) 1439e7507f57SSean Wang { 1440e7507f57SSean Wang return platform_driver_register(&mtk_pinctrl_driver); 1441e7507f57SSean Wang } 1442e7507f57SSean Wang arch_initcall(mtk_pinctrl_init); 1443