1 /* SPDX-License-Identifier: GPL-2.0 */ 2 #ifndef __PINCTRL_MTK_MT6397_H 3 #define __PINCTRL_MTK_MT6397_H 4 5 #include <linux/pinctrl/pinctrl.h> 6 #include "pinctrl-mtk-common.h" 7 8 static const struct mtk_desc_pin mtk_pins_mt6397[] = { 9 MTK_PIN(PINCTRL_PIN(0, "INT"), 10 "N2", "mt6397", 11 MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 12 MTK_FUNCTION(0, "GPIO0"), 13 MTK_FUNCTION(1, "INT") 14 ), 15 MTK_PIN(PINCTRL_PIN(1, "SRCVOLTEN"), 16 "M4", "mt6397", 17 MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 18 MTK_FUNCTION(0, "GPIO1"), 19 MTK_FUNCTION(1, "SRCVOLTEN"), 20 MTK_FUNCTION(6, "TEST_CK1") 21 ), 22 MTK_PIN(PINCTRL_PIN(2, "SRCLKEN_PERI"), 23 "M2", "mt6397", 24 MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 25 MTK_FUNCTION(0, "GPIO2"), 26 MTK_FUNCTION(1, "SRCLKEN_PERI"), 27 MTK_FUNCTION(6, "TEST_CK2") 28 ), 29 MTK_PIN(PINCTRL_PIN(3, "RTC_32K1V8"), 30 "K3", "mt6397", 31 MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 32 MTK_FUNCTION(0, "GPIO3"), 33 MTK_FUNCTION(1, "RTC_32K1V8"), 34 MTK_FUNCTION(6, "TEST_CK3") 35 ), 36 MTK_PIN(PINCTRL_PIN(4, "WRAP_EVENT"), 37 "J2", "mt6397", 38 MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 39 MTK_FUNCTION(0, "GPIO4"), 40 MTK_FUNCTION(1, "WRAP_EVENT") 41 ), 42 MTK_PIN(PINCTRL_PIN(5, "SPI_CLK"), 43 "L4", "mt6397", 44 MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 45 MTK_FUNCTION(0, "GPIO5"), 46 MTK_FUNCTION(1, "SPI_CLK") 47 ), 48 MTK_PIN(PINCTRL_PIN(6, "SPI_CSN"), 49 "J3", "mt6397", 50 MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 51 MTK_FUNCTION(0, "GPIO6"), 52 MTK_FUNCTION(1, "SPI_CSN") 53 ), 54 MTK_PIN(PINCTRL_PIN(7, "SPI_MOSI"), 55 "J1", "mt6397", 56 MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 57 MTK_FUNCTION(0, "GPIO7"), 58 MTK_FUNCTION(1, "SPI_MOSI") 59 ), 60 MTK_PIN(PINCTRL_PIN(8, "SPI_MISO"), 61 "L3", "mt6397", 62 MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 63 MTK_FUNCTION(0, "GPIO8"), 64 MTK_FUNCTION(1, "SPI_MISO") 65 ), 66 MTK_PIN(PINCTRL_PIN(9, "AUD_CLK_MOSI"), 67 "H2", "mt6397", 68 MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 69 MTK_FUNCTION(0, "GPIO9"), 70 MTK_FUNCTION(1, "AUD_CLK"), 71 MTK_FUNCTION(6, "TEST_IN0"), 72 MTK_FUNCTION(7, "TEST_OUT0") 73 ), 74 MTK_PIN(PINCTRL_PIN(10, "AUD_DAT_MISO"), 75 "H3", "mt6397", 76 MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 77 MTK_FUNCTION(0, "GPIO10"), 78 MTK_FUNCTION(1, "AUD_MISO"), 79 MTK_FUNCTION(6, "TEST_IN1"), 80 MTK_FUNCTION(7, "TEST_OUT1") 81 ), 82 MTK_PIN(PINCTRL_PIN(11, "AUD_DAT_MOSI"), 83 "H1", "mt6397", 84 MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 85 MTK_FUNCTION(0, "GPIO11"), 86 MTK_FUNCTION(1, "AUD_MOSI"), 87 MTK_FUNCTION(6, "TEST_IN2"), 88 MTK_FUNCTION(7, "TEST_OUT2") 89 ), 90 MTK_PIN(PINCTRL_PIN(12, "COL0"), 91 "F3", "mt6397", 92 MTK_EINT_FUNCTION(2, 10), 93 MTK_FUNCTION(0, "GPIO12"), 94 MTK_FUNCTION(1, "COL0_USBDL"), 95 MTK_FUNCTION(2, "EINT10_1X"), 96 MTK_FUNCTION(3, "PWM1_3X"), 97 MTK_FUNCTION(6, "TEST_IN3"), 98 MTK_FUNCTION(7, "TEST_OUT3") 99 ), 100 MTK_PIN(PINCTRL_PIN(13, "COL1"), 101 "G8", "mt6397", 102 MTK_EINT_FUNCTION(2, 11), 103 MTK_FUNCTION(0, "GPIO13"), 104 MTK_FUNCTION(1, "COL1"), 105 MTK_FUNCTION(2, "EINT11_1X"), 106 MTK_FUNCTION(3, "SCL0_2X"), 107 MTK_FUNCTION(6, "TEST_IN4"), 108 MTK_FUNCTION(7, "TEST_OUT4") 109 ), 110 MTK_PIN(PINCTRL_PIN(14, "COL2"), 111 "H4", "mt6397", 112 MTK_EINT_FUNCTION(2, 12), 113 MTK_FUNCTION(0, "GPIO14"), 114 MTK_FUNCTION(1, "COL2"), 115 MTK_FUNCTION(2, "EINT12_1X"), 116 MTK_FUNCTION(3, "SDA0_2X"), 117 MTK_FUNCTION(6, "TEST_IN5"), 118 MTK_FUNCTION(7, "TEST_OUT5") 119 ), 120 MTK_PIN(PINCTRL_PIN(15, "COL3"), 121 "G2", "mt6397", 122 MTK_EINT_FUNCTION(2, 13), 123 MTK_FUNCTION(0, "GPIO15"), 124 MTK_FUNCTION(1, "COL3"), 125 MTK_FUNCTION(2, "EINT13_1X"), 126 MTK_FUNCTION(3, "SCL1_2X"), 127 MTK_FUNCTION(6, "TEST_IN6"), 128 MTK_FUNCTION(7, "TEST_OUT6") 129 ), 130 MTK_PIN(PINCTRL_PIN(16, "COL4"), 131 "F2", "mt6397", 132 MTK_EINT_FUNCTION(2, 14), 133 MTK_FUNCTION(0, "GPIO16"), 134 MTK_FUNCTION(1, "COL4"), 135 MTK_FUNCTION(2, "EINT14_1X"), 136 MTK_FUNCTION(3, "SDA1_2X"), 137 MTK_FUNCTION(6, "TEST_IN7"), 138 MTK_FUNCTION(7, "TEST_OUT7") 139 ), 140 MTK_PIN(PINCTRL_PIN(17, "COL5"), 141 "G7", "mt6397", 142 MTK_EINT_FUNCTION(2, 15), 143 MTK_FUNCTION(0, "GPIO17"), 144 MTK_FUNCTION(1, "COL5"), 145 MTK_FUNCTION(2, "EINT15_1X"), 146 MTK_FUNCTION(3, "SCL2_2X"), 147 MTK_FUNCTION(6, "TEST_IN8"), 148 MTK_FUNCTION(7, "TEST_OUT8") 149 ), 150 MTK_PIN(PINCTRL_PIN(18, "COL6"), 151 "J6", "mt6397", 152 MTK_EINT_FUNCTION(2, 16), 153 MTK_FUNCTION(0, "GPIO18"), 154 MTK_FUNCTION(1, "COL6"), 155 MTK_FUNCTION(2, "EINT16_1X"), 156 MTK_FUNCTION(3, "SDA2_2X"), 157 MTK_FUNCTION(4, "GPIO32K_0"), 158 MTK_FUNCTION(5, "GPIO26M_0"), 159 MTK_FUNCTION(6, "TEST_IN9"), 160 MTK_FUNCTION(7, "TEST_OUT9") 161 ), 162 MTK_PIN(PINCTRL_PIN(19, "COL7"), 163 "J5", "mt6397", 164 MTK_EINT_FUNCTION(2, 17), 165 MTK_FUNCTION(0, "GPIO19"), 166 MTK_FUNCTION(1, "COL7"), 167 MTK_FUNCTION(2, "EINT17_1X"), 168 MTK_FUNCTION(3, "PWM2_3X"), 169 MTK_FUNCTION(4, "GPIO32K_1"), 170 MTK_FUNCTION(5, "GPIO26M_1"), 171 MTK_FUNCTION(6, "TEST_IN10"), 172 MTK_FUNCTION(7, "TEST_OUT10") 173 ), 174 MTK_PIN(PINCTRL_PIN(20, "ROW0"), 175 "L7", "mt6397", 176 MTK_EINT_FUNCTION(2, 18), 177 MTK_FUNCTION(0, "GPIO20"), 178 MTK_FUNCTION(1, "ROW0"), 179 MTK_FUNCTION(2, "EINT18_1X"), 180 MTK_FUNCTION(3, "SCL0_3X"), 181 MTK_FUNCTION(6, "TEST_IN11"), 182 MTK_FUNCTION(7, "TEST_OUT11") 183 ), 184 MTK_PIN(PINCTRL_PIN(21, "ROW1"), 185 "P1", "mt6397", 186 MTK_EINT_FUNCTION(2, 19), 187 MTK_FUNCTION(0, "GPIO21"), 188 MTK_FUNCTION(1, "ROW1"), 189 MTK_FUNCTION(2, "EINT19_1X"), 190 MTK_FUNCTION(3, "SDA0_3X"), 191 MTK_FUNCTION(4, "AUD_TSTCK"), 192 MTK_FUNCTION(6, "TEST_IN12"), 193 MTK_FUNCTION(7, "TEST_OUT12") 194 ), 195 MTK_PIN(PINCTRL_PIN(22, "ROW2"), 196 "J8", "mt6397", 197 MTK_EINT_FUNCTION(2, 20), 198 MTK_FUNCTION(0, "GPIO22"), 199 MTK_FUNCTION(1, "ROW2"), 200 MTK_FUNCTION(2, "EINT20_1X"), 201 MTK_FUNCTION(3, "SCL1_3X"), 202 MTK_FUNCTION(6, "TEST_IN13"), 203 MTK_FUNCTION(7, "TEST_OUT13") 204 ), 205 MTK_PIN(PINCTRL_PIN(23, "ROW3"), 206 "J7", "mt6397", 207 MTK_EINT_FUNCTION(2, 21), 208 MTK_FUNCTION(0, "GPIO23"), 209 MTK_FUNCTION(1, "ROW3"), 210 MTK_FUNCTION(2, "EINT21_1X"), 211 MTK_FUNCTION(3, "SDA1_3X"), 212 MTK_FUNCTION(6, "TEST_IN14"), 213 MTK_FUNCTION(7, "TEST_OUT14") 214 ), 215 MTK_PIN(PINCTRL_PIN(24, "ROW4"), 216 "L5", "mt6397", 217 MTK_EINT_FUNCTION(2, 22), 218 MTK_FUNCTION(0, "GPIO24"), 219 MTK_FUNCTION(1, "ROW4"), 220 MTK_FUNCTION(2, "EINT22_1X"), 221 MTK_FUNCTION(3, "SCL2_3X"), 222 MTK_FUNCTION(6, "TEST_IN15"), 223 MTK_FUNCTION(7, "TEST_OUT15") 224 ), 225 MTK_PIN(PINCTRL_PIN(25, "ROW5"), 226 "N6", "mt6397", 227 MTK_EINT_FUNCTION(2, 23), 228 MTK_FUNCTION(0, "GPIO25"), 229 MTK_FUNCTION(1, "ROW5"), 230 MTK_FUNCTION(2, "EINT23_1X"), 231 MTK_FUNCTION(3, "SDA2_3X"), 232 MTK_FUNCTION(6, "TEST_IN16"), 233 MTK_FUNCTION(7, "TEST_OUT16") 234 ), 235 MTK_PIN(PINCTRL_PIN(26, "ROW6"), 236 "L6", "mt6397", 237 MTK_EINT_FUNCTION(2, 24), 238 MTK_FUNCTION(0, "GPIO26"), 239 MTK_FUNCTION(1, "ROW6"), 240 MTK_FUNCTION(2, "EINT24_1X"), 241 MTK_FUNCTION(3, "PWM3_3X"), 242 MTK_FUNCTION(4, "GPIO32K_2"), 243 MTK_FUNCTION(5, "GPIO26M_2"), 244 MTK_FUNCTION(6, "TEST_IN17"), 245 MTK_FUNCTION(7, "TEST_OUT17") 246 ), 247 MTK_PIN(PINCTRL_PIN(27, "ROW7"), 248 "P2", "mt6397", 249 MTK_EINT_FUNCTION(2, 3), 250 MTK_FUNCTION(0, "GPIO27"), 251 MTK_FUNCTION(1, "ROW7"), 252 MTK_FUNCTION(2, "EINT3_1X"), 253 MTK_FUNCTION(3, "CBUS"), 254 MTK_FUNCTION(4, "GPIO32K_3"), 255 MTK_FUNCTION(5, "GPIO26M_3"), 256 MTK_FUNCTION(6, "TEST_IN18"), 257 MTK_FUNCTION(7, "TEST_OUT18") 258 ), 259 MTK_PIN(PINCTRL_PIN(28, "PWM1(VMSEL1)"), 260 "J4", "mt6397", 261 MTK_EINT_FUNCTION(2, 4), 262 MTK_FUNCTION(0, "GPIO28"), 263 MTK_FUNCTION(1, "PWM1"), 264 MTK_FUNCTION(2, "EINT4_1X"), 265 MTK_FUNCTION(4, "GPIO32K_4"), 266 MTK_FUNCTION(5, "GPIO26M_4"), 267 MTK_FUNCTION(6, "TEST_IN19"), 268 MTK_FUNCTION(7, "TEST_OUT19") 269 ), 270 MTK_PIN(PINCTRL_PIN(29, "PWM2(VMSEL2)"), 271 "N5", "mt6397", 272 MTK_EINT_FUNCTION(2, 5), 273 MTK_FUNCTION(0, "GPIO29"), 274 MTK_FUNCTION(1, "PWM2"), 275 MTK_FUNCTION(2, "EINT5_1X"), 276 MTK_FUNCTION(4, "GPIO32K_5"), 277 MTK_FUNCTION(5, "GPIO26M_5"), 278 MTK_FUNCTION(6, "TEST_IN20"), 279 MTK_FUNCTION(7, "TEST_OUT20") 280 ), 281 MTK_PIN(PINCTRL_PIN(30, "PWM3(PWM)"), 282 "R3", "mt6397", 283 MTK_EINT_FUNCTION(2, 6), 284 MTK_FUNCTION(0, "GPIO30"), 285 MTK_FUNCTION(1, "PWM3"), 286 MTK_FUNCTION(2, "EINT6_1X"), 287 MTK_FUNCTION(3, "COL0"), 288 MTK_FUNCTION(4, "GPIO32K_6"), 289 MTK_FUNCTION(5, "GPIO26M_6"), 290 MTK_FUNCTION(6, "TEST_IN21"), 291 MTK_FUNCTION(7, "TEST_OUT21") 292 ), 293 MTK_PIN(PINCTRL_PIN(31, "SCL0"), 294 "N1", "mt6397", 295 MTK_EINT_FUNCTION(2, 7), 296 MTK_FUNCTION(0, "GPIO31"), 297 MTK_FUNCTION(1, "SCL0"), 298 MTK_FUNCTION(2, "EINT7_1X"), 299 MTK_FUNCTION(3, "PWM1_2X"), 300 MTK_FUNCTION(6, "TEST_IN22"), 301 MTK_FUNCTION(7, "TEST_OUT22") 302 ), 303 MTK_PIN(PINCTRL_PIN(32, "SDA0"), 304 "N3", "mt6397", 305 MTK_EINT_FUNCTION(2, 8), 306 MTK_FUNCTION(0, "GPIO32"), 307 MTK_FUNCTION(1, "SDA0"), 308 MTK_FUNCTION(2, "EINT8_1X"), 309 MTK_FUNCTION(6, "TEST_IN23"), 310 MTK_FUNCTION(7, "TEST_OUT23") 311 ), 312 MTK_PIN(PINCTRL_PIN(33, "SCL1"), 313 "T1", "mt6397", 314 MTK_EINT_FUNCTION(2, 9), 315 MTK_FUNCTION(0, "GPIO33"), 316 MTK_FUNCTION(1, "SCL1"), 317 MTK_FUNCTION(2, "EINT9_1X"), 318 MTK_FUNCTION(3, "PWM2_2X"), 319 MTK_FUNCTION(6, "TEST_IN24"), 320 MTK_FUNCTION(7, "TEST_OUT24") 321 ), 322 MTK_PIN(PINCTRL_PIN(34, "SDA1"), 323 "T2", "mt6397", 324 MTK_EINT_FUNCTION(2, 0), 325 MTK_FUNCTION(0, "GPIO34"), 326 MTK_FUNCTION(1, "SDA1"), 327 MTK_FUNCTION(2, "EINT0_1X"), 328 MTK_FUNCTION(6, "TEST_IN25"), 329 MTK_FUNCTION(7, "TEST_OUT25") 330 ), 331 MTK_PIN(PINCTRL_PIN(35, "SCL2"), 332 "T3", "mt6397", 333 MTK_EINT_FUNCTION(2, 1), 334 MTK_FUNCTION(0, "GPIO35"), 335 MTK_FUNCTION(1, "SCL2"), 336 MTK_FUNCTION(2, "EINT1_1X"), 337 MTK_FUNCTION(3, "PWM3_2X"), 338 MTK_FUNCTION(6, "TEST_IN26"), 339 MTK_FUNCTION(7, "TEST_OUT26") 340 ), 341 MTK_PIN(PINCTRL_PIN(36, "SDA2"), 342 "U2", "mt6397", 343 MTK_EINT_FUNCTION(2, 2), 344 MTK_FUNCTION(0, "GPIO36"), 345 MTK_FUNCTION(1, "SDA2"), 346 MTK_FUNCTION(2, "EINT2_1X"), 347 MTK_FUNCTION(6, "TEST_IN27"), 348 MTK_FUNCTION(7, "TEST_OUT27") 349 ), 350 MTK_PIN(PINCTRL_PIN(37, "HDMISD"), 351 "H6", "mt6397", 352 MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 353 MTK_FUNCTION(0, "GPIO37"), 354 MTK_FUNCTION(1, "HDMISD"), 355 MTK_FUNCTION(6, "TEST_IN28"), 356 MTK_FUNCTION(7, "TEST_OUT28") 357 ), 358 MTK_PIN(PINCTRL_PIN(38, "HDMISCK"), 359 "H5", "mt6397", 360 MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 361 MTK_FUNCTION(0, "GPIO38"), 362 MTK_FUNCTION(1, "HDMISCK"), 363 MTK_FUNCTION(6, "TEST_IN29"), 364 MTK_FUNCTION(7, "TEST_OUT29") 365 ), 366 MTK_PIN(PINCTRL_PIN(39, "HTPLG"), 367 "H7", "mt6397", 368 MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 369 MTK_FUNCTION(0, "GPIO39"), 370 MTK_FUNCTION(1, "HTPLG"), 371 MTK_FUNCTION(6, "TEST_IN30"), 372 MTK_FUNCTION(7, "TEST_OUT30") 373 ), 374 MTK_PIN(PINCTRL_PIN(40, "CEC"), 375 "J9", "mt6397", 376 MTK_EINT_FUNCTION(NO_EINT_SUPPORT, NO_EINT_SUPPORT), 377 MTK_FUNCTION(0, "GPIO40"), 378 MTK_FUNCTION(1, "CEC"), 379 MTK_FUNCTION(6, "TEST_IN31"), 380 MTK_FUNCTION(7, "TEST_OUT31") 381 ), 382 }; 383 384 #endif /* __PINCTRL_MTK_MT6397_H */ 385