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