1 /* 2 * Autogenerated file 3 * 4 * SPDX-License-Identifier: Apache 2.0 5 */ 6 7 #include "gd32-af.h" 8 9 /* ADC_IN0 */ 10 #define ADC_IN0_PA0 \ 11 GD32_PINMUX_AF('A', 0, ANALOG) 12 13 /* ADC_IN1 */ 14 #define ADC_IN1_PA1 \ 15 GD32_PINMUX_AF('A', 1, ANALOG) 16 17 /* ADC_IN2 */ 18 #define ADC_IN2_PA2 \ 19 GD32_PINMUX_AF('A', 2, ANALOG) 20 21 /* ADC_IN3 */ 22 #define ADC_IN3_PA3 \ 23 GD32_PINMUX_AF('A', 3, ANALOG) 24 25 /* ADC_IN4 */ 26 #define ADC_IN4_PA4 \ 27 GD32_PINMUX_AF('A', 4, ANALOG) 28 29 /* ADC_IN5 */ 30 #define ADC_IN5_PA5 \ 31 GD32_PINMUX_AF('A', 5, ANALOG) 32 33 /* ADC_IN6 */ 34 #define ADC_IN6_PA6 \ 35 GD32_PINMUX_AF('A', 6, ANALOG) 36 37 /* ADC_IN7 */ 38 #define ADC_IN7_PA7 \ 39 GD32_PINMUX_AF('A', 7, ANALOG) 40 41 /* ADC_IN8 */ 42 #define ADC_IN8_PB0 \ 43 GD32_PINMUX_AF('B', 0, ANALOG) 44 45 /* ADC_IN9 */ 46 #define ADC_IN9_PB1 \ 47 GD32_PINMUX_AF('B', 1, ANALOG) 48 49 /* ANALOG */ 50 #define ANALOG_PA0 \ 51 GD32_PINMUX_AF('A', 0, ANALOG) 52 #define ANALOG_PA1 \ 53 GD32_PINMUX_AF('A', 1, ANALOG) 54 #define ANALOG_PA2 \ 55 GD32_PINMUX_AF('A', 2, ANALOG) 56 #define ANALOG_PA3 \ 57 GD32_PINMUX_AF('A', 3, ANALOG) 58 #define ANALOG_PA4 \ 59 GD32_PINMUX_AF('A', 4, ANALOG) 60 #define ANALOG_PA5 \ 61 GD32_PINMUX_AF('A', 5, ANALOG) 62 #define ANALOG_PA6 \ 63 GD32_PINMUX_AF('A', 6, ANALOG) 64 #define ANALOG_PA7 \ 65 GD32_PINMUX_AF('A', 7, ANALOG) 66 #define ANALOG_PA8 \ 67 GD32_PINMUX_AF('A', 8, ANALOG) 68 #define ANALOG_PA9 \ 69 GD32_PINMUX_AF('A', 9, ANALOG) 70 #define ANALOG_PA10 \ 71 GD32_PINMUX_AF('A', 10, ANALOG) 72 #define ANALOG_PA11 \ 73 GD32_PINMUX_AF('A', 11, ANALOG) 74 #define ANALOG_PA12 \ 75 GD32_PINMUX_AF('A', 12, ANALOG) 76 #define ANALOG_PA13 \ 77 GD32_PINMUX_AF('A', 13, ANALOG) 78 #define ANALOG_PA14 \ 79 GD32_PINMUX_AF('A', 14, ANALOG) 80 #define ANALOG_PA15 \ 81 GD32_PINMUX_AF('A', 15, ANALOG) 82 #define ANALOG_PB0 \ 83 GD32_PINMUX_AF('B', 0, ANALOG) 84 #define ANALOG_PB1 \ 85 GD32_PINMUX_AF('B', 1, ANALOG) 86 #define ANALOG_PB2 \ 87 GD32_PINMUX_AF('B', 2, ANALOG) 88 #define ANALOG_PB3 \ 89 GD32_PINMUX_AF('B', 3, ANALOG) 90 #define ANALOG_PB4 \ 91 GD32_PINMUX_AF('B', 4, ANALOG) 92 #define ANALOG_PB5 \ 93 GD32_PINMUX_AF('B', 5, ANALOG) 94 #define ANALOG_PB6 \ 95 GD32_PINMUX_AF('B', 6, ANALOG) 96 #define ANALOG_PB7 \ 97 GD32_PINMUX_AF('B', 7, ANALOG) 98 #define ANALOG_PB8 \ 99 GD32_PINMUX_AF('B', 8, ANALOG) 100 #define ANALOG_PF0 \ 101 GD32_PINMUX_AF('F', 0, ANALOG) 102 103 /* CEC */ 104 #define CEC_PA5 \ 105 GD32_PINMUX_AF('A', 5, AF1) 106 #define CEC_PB8 \ 107 GD32_PINMUX_AF('B', 8, AF0) 108 109 /* CK_OUT */ 110 #define CK_OUT_PA8 \ 111 GD32_PINMUX_AF('A', 8, AF0) 112 113 /* CMP0_OUT */ 114 #define CMP0_OUT_PA0 \ 115 GD32_PINMUX_AF('A', 0, AF7) 116 #define CMP0_OUT_PA6 \ 117 GD32_PINMUX_AF('A', 6, AF7) 118 #define CMP0_OUT_PA11 \ 119 GD32_PINMUX_AF('A', 11, AF7) 120 121 /* CMP1_OUT */ 122 #define CMP1_OUT_PA2 \ 123 GD32_PINMUX_AF('A', 2, AF7) 124 #define CMP1_OUT_PA7 \ 125 GD32_PINMUX_AF('A', 7, AF7) 126 #define CMP1_OUT_PA12 \ 127 GD32_PINMUX_AF('A', 12, AF7) 128 129 /* CTC_SYNC */ 130 #define CTC_SYNC_PA8 \ 131 GD32_PINMUX_AF('A', 8, AF6) 132 #define CTC_SYNC_PF0 \ 133 GD32_PINMUX_AF('F', 0, AF0) 134 135 /* DAC0_OUT */ 136 #define DAC0_OUT_PA4 \ 137 GD32_PINMUX_AF('A', 4, ANALOG) 138 139 /* EVENTOUT */ 140 #define EVENTOUT_PA1 \ 141 GD32_PINMUX_AF('A', 1, AF0) 142 #define EVENTOUT_PA6 \ 143 GD32_PINMUX_AF('A', 6, AF6) 144 #define EVENTOUT_PA7 \ 145 GD32_PINMUX_AF('A', 7, AF6) 146 #define EVENTOUT_PA8 \ 147 GD32_PINMUX_AF('A', 8, AF3) 148 #define EVENTOUT_PA11 \ 149 GD32_PINMUX_AF('A', 11, AF0) 150 #define EVENTOUT_PA12 \ 151 GD32_PINMUX_AF('A', 12, AF0) 152 #define EVENTOUT_PA15 \ 153 GD32_PINMUX_AF('A', 15, AF3) 154 #define EVENTOUT_PB0 \ 155 GD32_PINMUX_AF('B', 0, AF0) 156 #define EVENTOUT_PB3 \ 157 GD32_PINMUX_AF('B', 3, AF1) 158 #define EVENTOUT_PB4 \ 159 GD32_PINMUX_AF('B', 4, AF2) 160 161 /* I2C0_SCL */ 162 #define I2C0_SCL_PA9 \ 163 GD32_PINMUX_AF('A', 9, AF4) 164 #define I2C0_SCL_PB6 \ 165 GD32_PINMUX_AF('B', 6, AF1) 166 #define I2C0_SCL_PB8 \ 167 GD32_PINMUX_AF('B', 8, AF1) 168 169 /* I2C0_SDA */ 170 #define I2C0_SDA_PA10 \ 171 GD32_PINMUX_AF('A', 10, AF4) 172 #define I2C0_SDA_PB7 \ 173 GD32_PINMUX_AF('B', 7, AF1) 174 175 /* I2C0_SMBA */ 176 #define I2C0_SMBA_PB5 \ 177 GD32_PINMUX_AF('B', 5, AF3) 178 179 /* I2C1_SCL */ 180 #define I2C1_SCL_PA0 \ 181 GD32_PINMUX_AF('A', 0, AF4) 182 183 /* I2C1_SDA */ 184 #define I2C1_SDA_PA1 \ 185 GD32_PINMUX_AF('A', 1, AF4) 186 187 /* I2S0_CK */ 188 #define I2S0_CK_PA5 \ 189 GD32_PINMUX_AF('A', 5, AF0) 190 #define I2S0_CK_PB3 \ 191 GD32_PINMUX_AF('B', 3, AF0) 192 193 /* I2S0_MCK */ 194 #define I2S0_MCK_PA6 \ 195 GD32_PINMUX_AF('A', 6, AF0) 196 #define I2S0_MCK_PB4 \ 197 GD32_PINMUX_AF('B', 4, AF0) 198 199 /* I2S0_SD */ 200 #define I2S0_SD_PA7 \ 201 GD32_PINMUX_AF('A', 7, AF0) 202 #define I2S0_SD_PB5 \ 203 GD32_PINMUX_AF('B', 5, AF0) 204 205 /* I2S0_WS */ 206 #define I2S0_WS_PA4 \ 207 GD32_PINMUX_AF('A', 4, AF0) 208 #define I2S0_WS_PA15 \ 209 GD32_PINMUX_AF('A', 15, AF0) 210 211 /* IFRP_OUT */ 212 #define IFRP_OUT_PA13 \ 213 GD32_PINMUX_AF('A', 13, AF1) 214 215 /* SPI0_MISO */ 216 #define SPI0_MISO_PA6 \ 217 GD32_PINMUX_AF('A', 6, AF0) 218 #define SPI0_MISO_PB4 \ 219 GD32_PINMUX_AF('B', 4, AF0) 220 221 /* SPI0_MOSI */ 222 #define SPI0_MOSI_PA7 \ 223 GD32_PINMUX_AF('A', 7, AF0) 224 #define SPI0_MOSI_PB5 \ 225 GD32_PINMUX_AF('B', 5, AF0) 226 227 /* SPI0_NSS */ 228 #define SPI0_NSS_PA4 \ 229 GD32_PINMUX_AF('A', 4, AF0) 230 #define SPI0_NSS_PA15 \ 231 GD32_PINMUX_AF('A', 15, AF0) 232 233 /* SPI0_SCK */ 234 #define SPI0_SCK_PA5 \ 235 GD32_PINMUX_AF('A', 5, AF0) 236 #define SPI0_SCK_PB3 \ 237 GD32_PINMUX_AF('B', 3, AF0) 238 239 /* SPI1_IO2 */ 240 #define SPI1_IO2_PA11 \ 241 GD32_PINMUX_AF('A', 11, AF6) 242 243 /* SPI1_IO3 */ 244 #define SPI1_IO3_PA12 \ 245 GD32_PINMUX_AF('A', 12, AF6) 246 247 /* SPI1_MISO */ 248 #define SPI1_MISO_PA13 \ 249 GD32_PINMUX_AF('A', 13, AF6) 250 251 /* SPI1_MOSI */ 252 #define SPI1_MOSI_PA14 \ 253 GD32_PINMUX_AF('A', 14, AF6) 254 255 /* SPI1_NSS */ 256 #define SPI1_NSS_PA4 \ 257 GD32_PINMUX_AF('A', 4, AF6) 258 #define SPI1_NSS_PA15 \ 259 GD32_PINMUX_AF('A', 15, AF6) 260 261 /* SPI1_SCK */ 262 #define SPI1_SCK_PB1 \ 263 GD32_PINMUX_AF('B', 1, AF6) 264 265 /* SWCLK */ 266 #define SWCLK_PA14 \ 267 GD32_PINMUX_AF('A', 14, AF0) 268 269 /* SWDIO */ 270 #define SWDIO_PA13 \ 271 GD32_PINMUX_AF('A', 13, AF0) 272 273 /* TIMER0_BKIN */ 274 #define TIMER0_BKIN_PA6 \ 275 GD32_PINMUX_AF('A', 6, AF2) 276 277 /* TIMER0_CH0 */ 278 #define TIMER0_CH0_PA8 \ 279 GD32_PINMUX_AF('A', 8, AF2) 280 281 /* TIMER0_CH0_ON */ 282 #define TIMER0_CH0_ON_PA7 \ 283 GD32_PINMUX_AF('A', 7, AF2) 284 285 /* TIMER0_CH1 */ 286 #define TIMER0_CH1_PA9 \ 287 GD32_PINMUX_AF('A', 9, AF2) 288 289 /* TIMER0_CH1_ON */ 290 #define TIMER0_CH1_ON_PB0 \ 291 GD32_PINMUX_AF('B', 0, AF2) 292 293 /* TIMER0_CH2 */ 294 #define TIMER0_CH2_PA10 \ 295 GD32_PINMUX_AF('A', 10, AF2) 296 297 /* TIMER0_CH2_ON */ 298 #define TIMER0_CH2_ON_PB1 \ 299 GD32_PINMUX_AF('B', 1, AF2) 300 301 /* TIMER0_CH3 */ 302 #define TIMER0_CH3_PA11 \ 303 GD32_PINMUX_AF('A', 11, AF2) 304 305 /* TIMER0_ETI */ 306 #define TIMER0_ETI_PA12 \ 307 GD32_PINMUX_AF('A', 12, AF2) 308 309 /* TIMER13_CH0 */ 310 #define TIMER13_CH0_PA4 \ 311 GD32_PINMUX_AF('A', 4, AF4) 312 #define TIMER13_CH0_PA7 \ 313 GD32_PINMUX_AF('A', 7, AF4) 314 #define TIMER13_CH0_PB1 \ 315 GD32_PINMUX_AF('B', 1, AF0) 316 317 /* TIMER14_BKIN */ 318 #define TIMER14_BKIN_PA9 \ 319 GD32_PINMUX_AF('A', 9, AF0) 320 321 /* TIMER14_CH0 */ 322 #define TIMER14_CH0_PA2 \ 323 GD32_PINMUX_AF('A', 2, AF0) 324 325 /* TIMER14_CH1 */ 326 #define TIMER14_CH1_PA3 \ 327 GD32_PINMUX_AF('A', 3, AF0) 328 329 /* TIMER15_BKIN */ 330 #define TIMER15_BKIN_PB5 \ 331 GD32_PINMUX_AF('B', 5, AF2) 332 333 /* TIMER15_CH0 */ 334 #define TIMER15_CH0_PA6 \ 335 GD32_PINMUX_AF('A', 6, AF5) 336 #define TIMER15_CH0_PB8 \ 337 GD32_PINMUX_AF('B', 8, AF2) 338 339 /* TIMER15_CH0_ON */ 340 #define TIMER15_CH0_ON_PB6 \ 341 GD32_PINMUX_AF('B', 6, AF2) 342 343 /* TIMER16_BKIN */ 344 #define TIMER16_BKIN_PA10 \ 345 GD32_PINMUX_AF('A', 10, AF0) 346 347 /* TIMER16_CH0 */ 348 #define TIMER16_CH0_PA7 \ 349 GD32_PINMUX_AF('A', 7, AF5) 350 351 /* TIMER16_CH0_ON */ 352 #define TIMER16_CH0_ON_PB7 \ 353 GD32_PINMUX_AF('B', 7, AF2) 354 355 /* TIMER1_CH0 */ 356 #define TIMER1_CH0_PA0 \ 357 GD32_PINMUX_AF('A', 0, AF2) 358 #define TIMER1_CH0_PA5 \ 359 GD32_PINMUX_AF('A', 5, AF2) 360 #define TIMER1_CH0_PA15 \ 361 GD32_PINMUX_AF('A', 15, AF2) 362 363 /* TIMER1_CH1 */ 364 #define TIMER1_CH1_PA1 \ 365 GD32_PINMUX_AF('A', 1, AF2) 366 #define TIMER1_CH1_PB3 \ 367 GD32_PINMUX_AF('B', 3, AF2) 368 369 /* TIMER1_CH2 */ 370 #define TIMER1_CH2_PA2 \ 371 GD32_PINMUX_AF('A', 2, AF2) 372 373 /* TIMER1_CH3 */ 374 #define TIMER1_CH3_PA3 \ 375 GD32_PINMUX_AF('A', 3, AF2) 376 377 /* TIMER1_ETI */ 378 #define TIMER1_ETI_PA0 \ 379 GD32_PINMUX_AF('A', 0, AF2) 380 #define TIMER1_ETI_PA5 \ 381 GD32_PINMUX_AF('A', 5, AF2) 382 #define TIMER1_ETI_PA15 \ 383 GD32_PINMUX_AF('A', 15, AF2) 384 385 /* TIMER2_CH0 */ 386 #define TIMER2_CH0_PA6 \ 387 GD32_PINMUX_AF('A', 6, AF1) 388 #define TIMER2_CH0_PB4 \ 389 GD32_PINMUX_AF('B', 4, AF1) 390 391 /* TIMER2_CH1 */ 392 #define TIMER2_CH1_PA7 \ 393 GD32_PINMUX_AF('A', 7, AF1) 394 #define TIMER2_CH1_PB5 \ 395 GD32_PINMUX_AF('B', 5, AF1) 396 397 /* TIMER2_CH2 */ 398 #define TIMER2_CH2_PB0 \ 399 GD32_PINMUX_AF('B', 0, AF1) 400 401 /* TIMER2_CH3 */ 402 #define TIMER2_CH3_PB1 \ 403 GD32_PINMUX_AF('B', 1, AF1) 404 405 /* TSITG */ 406 #define TSITG_PB8 \ 407 GD32_PINMUX_AF('B', 8, AF3) 408 409 /* TSI_G0_IO0 */ 410 #define TSI_G0_IO0_PA0 \ 411 GD32_PINMUX_AF('A', 0, AF3) 412 413 /* TSI_G0_IO1 */ 414 #define TSI_G0_IO1_PA1 \ 415 GD32_PINMUX_AF('A', 1, AF3) 416 417 /* TSI_G0_IO2 */ 418 #define TSI_G0_IO2_PA2 \ 419 GD32_PINMUX_AF('A', 2, AF3) 420 421 /* TSI_G0_IO3 */ 422 #define TSI_G0_IO3_PA3 \ 423 GD32_PINMUX_AF('A', 3, AF3) 424 425 /* TSI_G1_IO0 */ 426 #define TSI_G1_IO0_PA4 \ 427 GD32_PINMUX_AF('A', 4, AF3) 428 429 /* TSI_G1_IO1 */ 430 #define TSI_G1_IO1_PA5 \ 431 GD32_PINMUX_AF('A', 5, AF3) 432 433 /* TSI_G1_IO2 */ 434 #define TSI_G1_IO2_PA6 \ 435 GD32_PINMUX_AF('A', 6, AF3) 436 437 /* TSI_G1_IO3 */ 438 #define TSI_G1_IO3_PA7 \ 439 GD32_PINMUX_AF('A', 7, AF3) 440 441 /* TSI_G2_IO1 */ 442 #define TSI_G2_IO1_PB0 \ 443 GD32_PINMUX_AF('B', 0, AF3) 444 445 /* TSI_G2_IO2 */ 446 #define TSI_G2_IO2_PB1 \ 447 GD32_PINMUX_AF('B', 1, AF3) 448 449 /* TSI_G2_IO3 */ 450 #define TSI_G2_IO3_PB2 \ 451 GD32_PINMUX_AF('B', 2, AF3) 452 453 /* TSI_G3_IO0 */ 454 #define TSI_G3_IO0_PA9 \ 455 GD32_PINMUX_AF('A', 9, AF3) 456 457 /* TSI_G3_IO1 */ 458 #define TSI_G3_IO1_PA10 \ 459 GD32_PINMUX_AF('A', 10, AF3) 460 461 /* TSI_G3_IO2 */ 462 #define TSI_G3_IO2_PA11 \ 463 GD32_PINMUX_AF('A', 11, AF3) 464 465 /* TSI_G3_IO3 */ 466 #define TSI_G3_IO3_PA12 \ 467 GD32_PINMUX_AF('A', 12, AF3) 468 469 /* TSI_G4_IO0 */ 470 #define TSI_G4_IO0_PB3 \ 471 GD32_PINMUX_AF('B', 3, AF3) 472 473 /* TSI_G4_IO1 */ 474 #define TSI_G4_IO1_PB4 \ 475 GD32_PINMUX_AF('B', 4, AF3) 476 477 /* TSI_G4_IO2 */ 478 #define TSI_G4_IO2_PB6 \ 479 GD32_PINMUX_AF('B', 6, AF3) 480 481 /* TSI_G4_IO3 */ 482 #define TSI_G4_IO3_PB7 \ 483 GD32_PINMUX_AF('B', 7, AF3) 484 485 /* USART0_CK */ 486 #define USART0_CK_PA4 \ 487 GD32_PINMUX_AF('A', 4, AF1) 488 #define USART0_CK_PA8 \ 489 GD32_PINMUX_AF('A', 8, AF1) 490 491 /* USART0_CTS */ 492 #define USART0_CTS_PA0 \ 493 GD32_PINMUX_AF('A', 0, AF1) 494 #define USART0_CTS_PA11 \ 495 GD32_PINMUX_AF('A', 11, AF1) 496 497 /* USART0_RTS */ 498 #define USART0_RTS_PA1 \ 499 GD32_PINMUX_AF('A', 1, AF1) 500 #define USART0_RTS_PA12 \ 501 GD32_PINMUX_AF('A', 12, AF1) 502 503 /* USART0_RX */ 504 #define USART0_RX_PA3 \ 505 GD32_PINMUX_AF('A', 3, AF1) 506 #define USART0_RX_PA10 \ 507 GD32_PINMUX_AF('A', 10, AF1) 508 #define USART0_RX_PA15 \ 509 GD32_PINMUX_AF('A', 15, AF1) 510 #define USART0_RX_PB7 \ 511 GD32_PINMUX_AF('B', 7, AF0) 512 513 /* USART0_TX */ 514 #define USART0_TX_PA2 \ 515 GD32_PINMUX_AF('A', 2, AF1) 516 #define USART0_TX_PA9 \ 517 GD32_PINMUX_AF('A', 9, AF1) 518 #define USART0_TX_PA14 \ 519 GD32_PINMUX_AF('A', 14, AF1) 520 #define USART0_TX_PB6 \ 521 GD32_PINMUX_AF('B', 6, AF0) 522 523 /* USART1_CK */ 524 #define USART1_CK_PA4 \ 525 GD32_PINMUX_AF('A', 4, AF1) 526 527 /* USART1_CTS */ 528 #define USART1_CTS_PA0 \ 529 GD32_PINMUX_AF('A', 0, AF1) 530 531 /* USART1_RTS */ 532 #define USART1_RTS_PA1 \ 533 GD32_PINMUX_AF('A', 1, AF1) 534 535 /* USART1_RX */ 536 #define USART1_RX_PA3 \ 537 GD32_PINMUX_AF('A', 3, AF1) 538 #define USART1_RX_PA15 \ 539 GD32_PINMUX_AF('A', 15, AF1) 540 #define USART1_RX_PB0 \ 541 GD32_PINMUX_AF('B', 0, AF4) 542 543 /* USART1_TX */ 544 #define USART1_TX_PA2 \ 545 GD32_PINMUX_AF('A', 2, AF1) 546 #define USART1_TX_PA8 \ 547 GD32_PINMUX_AF('A', 8, AF4) 548 #define USART1_TX_PA14 \ 549 GD32_PINMUX_AF('A', 14, AF1) 550 551 /* USBFS_ID */ 552 #define USBFS_ID_PA10 \ 553 GD32_PINMUX_AF('A', 10, AF5) 554 555 /* USBFS_SOF */ 556 #define USBFS_SOF_PA8 \ 557 GD32_PINMUX_AF('A', 8, AF5) 558 559 /* USBFS_VBUS */ 560 #define USBFS_VBUS_PA9 \ 561 GD32_PINMUX_AF('A', 9, AF5) 562