1 // SPDX-License-Identifier: GPL-2.0-or-later 2 /* 3 * NXP S32G pinctrl driver 4 * 5 * Copyright 2015-2016 Freescale Semiconductor, Inc. 6 * Copyright 2017-2018, 2020-2022 NXP 7 * Copyright (C) 2022 SUSE LLC 8 */ 9 10 #include <linux/err.h> 11 #include <linux/init.h> 12 #include <linux/io.h> 13 #include <linux/module.h> 14 #include <linux/of.h> 15 #include <linux/platform_device.h> 16 #include <linux/pinctrl/pinctrl.h> 17 18 #include "pinctrl-s32.h" 19 20 enum s32_pins { 21 S32G_MSCR_PA_00 = 0, 22 S32G_MSCR_PA_01 = 1, 23 S32G_MSCR_PA_02 = 2, 24 S32G_MSCR_PA_03 = 3, 25 S32G_MSCR_PA_04 = 4, 26 S32G_MSCR_PA_05 = 5, 27 S32G_MSCR_PA_06 = 6, 28 S32G_MSCR_PA_07 = 7, 29 S32G_MSCR_PA_08 = 8, 30 S32G_MSCR_PA_09 = 9, 31 S32G_MSCR_PA_10 = 10, 32 S32G_MSCR_PA_11 = 11, 33 S32G_MSCR_PA_12 = 12, 34 S32G_MSCR_PA_13 = 13, 35 S32G_MSCR_PA_14 = 14, 36 S32G_MSCR_PA_15 = 15, 37 S32G_MSCR_PB_00 = 16, 38 S32G_MSCR_PB_01 = 17, 39 S32G_MSCR_PB_02 = 18, 40 S32G_MSCR_PB_03 = 19, 41 S32G_MSCR_PB_04 = 20, 42 S32G_MSCR_PB_05 = 21, 43 S32G_MSCR_PB_06 = 22, 44 S32G_MSCR_PB_07 = 23, 45 S32G_MSCR_PB_08 = 24, 46 S32G_MSCR_PB_09 = 25, 47 S32G_MSCR_PB_10 = 26, 48 S32G_MSCR_PB_11 = 27, 49 S32G_MSCR_PB_12 = 28, 50 S32G_MSCR_PB_13 = 29, 51 S32G_MSCR_PB_14 = 30, 52 S32G_MSCR_PB_15 = 31, 53 S32G_MSCR_PC_00 = 32, 54 S32G_MSCR_PC_01 = 33, 55 S32G_MSCR_PC_02 = 34, 56 S32G_MSCR_PC_03 = 35, 57 S32G_MSCR_PC_04 = 36, 58 S32G_MSCR_PC_05 = 37, 59 S32G_MSCR_PC_06 = 38, 60 S32G_MSCR_PC_07 = 39, 61 S32G_MSCR_PC_08 = 40, 62 S32G_MSCR_PC_09 = 41, 63 S32G_MSCR_PC_10 = 42, 64 S32G_MSCR_PC_11 = 43, 65 S32G_MSCR_PC_12 = 44, 66 S32G_MSCR_PC_13 = 45, 67 S32G_MSCR_PC_14 = 46, 68 S32G_MSCR_PC_15 = 47, 69 S32G_MSCR_PD_00 = 48, 70 S32G_MSCR_PD_01 = 49, 71 S32G_MSCR_PD_02 = 50, 72 S32G_MSCR_PD_03 = 51, 73 S32G_MSCR_PD_04 = 52, 74 S32G_MSCR_PD_05 = 53, 75 S32G_MSCR_PD_06 = 54, 76 S32G_MSCR_PD_07 = 55, 77 S32G_MSCR_PD_08 = 56, 78 S32G_MSCR_PD_09 = 57, 79 S32G_MSCR_PD_10 = 58, 80 S32G_MSCR_PD_11 = 59, 81 S32G_MSCR_PD_12 = 60, 82 S32G_MSCR_PD_13 = 61, 83 S32G_MSCR_PD_14 = 62, 84 S32G_MSCR_PD_15 = 63, 85 S32G_MSCR_PE_00 = 64, 86 S32G_MSCR_PE_01 = 65, 87 S32G_MSCR_PE_02 = 66, 88 S32G_MSCR_PE_03 = 67, 89 S32G_MSCR_PE_04 = 68, 90 S32G_MSCR_PE_05 = 69, 91 S32G_MSCR_PE_06 = 70, 92 S32G_MSCR_PE_07 = 71, 93 S32G_MSCR_PE_08 = 72, 94 S32G_MSCR_PE_09 = 73, 95 S32G_MSCR_PE_10 = 74, 96 S32G_MSCR_PE_11 = 75, 97 S32G_MSCR_PE_12 = 76, 98 S32G_MSCR_PE_13 = 77, 99 S32G_MSCR_PE_14 = 78, 100 S32G_MSCR_PE_15 = 79, 101 S32G_MSCR_PF_00 = 80, 102 S32G_MSCR_PF_01 = 81, 103 S32G_MSCR_PF_02 = 82, 104 S32G_MSCR_PF_03 = 83, 105 S32G_MSCR_PF_04 = 84, 106 S32G_MSCR_PF_05 = 85, 107 S32G_MSCR_PF_06 = 86, 108 S32G_MSCR_PF_07 = 87, 109 S32G_MSCR_PF_08 = 88, 110 S32G_MSCR_PF_09 = 89, 111 S32G_MSCR_PF_10 = 90, 112 S32G_MSCR_PF_11 = 91, 113 S32G_MSCR_PF_12 = 92, 114 S32G_MSCR_PF_13 = 93, 115 S32G_MSCR_PF_14 = 94, 116 S32G_MSCR_PF_15 = 95, 117 S32G_MSCR_PG_00 = 96, 118 S32G_MSCR_PG_01 = 97, 119 S32G_MSCR_PG_02 = 98, 120 S32G_MSCR_PG_03 = 99, 121 S32G_MSCR_PG_04 = 100, 122 S32G_MSCR_PG_05 = 101, 123 S32G_MSCR_PH_00 = 112, 124 S32G_MSCR_PH_01 = 113, 125 S32G_MSCR_PH_02 = 114, 126 S32G_MSCR_PH_03 = 115, 127 S32G_MSCR_PH_04 = 116, 128 S32G_MSCR_PH_05 = 117, 129 S32G_MSCR_PH_06 = 118, 130 S32G_MSCR_PH_07 = 119, 131 S32G_MSCR_PH_08 = 120, 132 S32G_MSCR_PH_09 = 121, 133 S32G_MSCR_PH_10 = 122, 134 S32G_MSCR_PJ_00 = 144, 135 S32G_MSCR_PJ_01 = 145, 136 S32G_MSCR_PJ_02 = 146, 137 S32G_MSCR_PJ_03 = 147, 138 S32G_MSCR_PJ_04 = 148, 139 S32G_MSCR_PJ_05 = 149, 140 S32G_MSCR_PJ_06 = 150, 141 S32G_MSCR_PJ_07 = 151, 142 S32G_MSCR_PJ_08 = 152, 143 S32G_MSCR_PJ_09 = 153, 144 S32G_MSCR_PJ_10 = 154, 145 S32G_MSCR_PJ_11 = 155, 146 S32G_MSCR_PJ_12 = 156, 147 S32G_MSCR_PJ_13 = 157, 148 S32G_MSCR_PJ_14 = 158, 149 S32G_MSCR_PJ_15 = 159, 150 S32G_MSCR_PK_00 = 160, 151 S32G_MSCR_PK_01 = 161, 152 S32G_MSCR_PK_02 = 162, 153 S32G_MSCR_PK_03 = 163, 154 S32G_MSCR_PK_04 = 164, 155 S32G_MSCR_PK_05 = 165, 156 S32G_MSCR_PK_06 = 166, 157 S32G_MSCR_PK_07 = 167, 158 S32G_MSCR_PK_08 = 168, 159 S32G_MSCR_PK_09 = 169, 160 S32G_MSCR_PK_10 = 170, 161 S32G_MSCR_PK_11 = 171, 162 S32G_MSCR_PK_12 = 172, 163 S32G_MSCR_PK_13 = 173, 164 S32G_MSCR_PK_14 = 174, 165 S32G_MSCR_PK_15 = 175, 166 S32G_MSCR_PL_00 = 176, 167 S32G_MSCR_PL_01 = 177, 168 S32G_MSCR_PL_02 = 178, 169 S32G_MSCR_PL_03 = 179, 170 S32G_MSCR_PL_04 = 180, 171 S32G_MSCR_PL_05 = 181, 172 S32G_MSCR_PL_06 = 182, 173 S32G_MSCR_PL_07 = 183, 174 S32G_MSCR_PL_08 = 184, 175 S32G_MSCR_PL_09 = 185, 176 S32G_MSCR_PL_10 = 186, 177 S32G_MSCR_PL_11 = 187, 178 S32G_MSCR_PL_12 = 188, 179 S32G_MSCR_PL_13 = 189, 180 S32G_MSCR_PL_14 = 190, 181 182 S32G_IMCR_QSPI_A_DATA0 = 540, 183 S32G_IMCR_QSPI_A_DATA1 = 541, 184 S32G_IMCR_QSPI_A_DATA2 = 542, 185 S32G_IMCR_QSPI_A_DATA3 = 543, 186 S32G_IMCR_QSPI_A_DATA4 = 544, 187 S32G_IMCR_QSPI_A_DATA5 = 545, 188 S32G_IMCR_QSPI_A_DATA6 = 546, 189 S32G_IMCR_QSPI_A_DATA7 = 547, 190 S32G_IMCR_QSPI_DQS_A = 548, 191 S32G_IMCR_QSPI_B_DATA0 = 552, 192 S32G_IMCR_QSPI_B_DATA1 = 554, 193 S32G_IMCR_QSPI_B_DATA2 = 551, 194 S32G_IMCR_QSPI_B_DATA3 = 553, 195 S32G_IMCR_QSPI_B_DATA4 = 557, 196 S32G_IMCR_QSPI_B_DATA5 = 550, 197 S32G_IMCR_QSPI_B_DATA6 = 556, 198 S32G_IMCR_QSPI_B_DATA7 = 555, 199 S32G_IMCR_QSPI_DQS_B = 558, 200 S32G_IMCR_BOOT_BOOTMOD0 = 560, 201 S32G_IMCR_BOOT_BOOTMOD1 = 561, 202 S32G_IMCR_I2C0_SCL = 566, 203 S32G_IMCR_I2C0_SDA = 565, 204 S32G_IMCR_LIN0_RX = 512, 205 S32G_IMCR_USDHC_CMD = 515, 206 S32G_IMCR_USDHC_DAT0 = 516, 207 S32G_IMCR_USDHC_DAT1 = 517, 208 S32G_IMCR_USDHC_DAT2 = 520, 209 S32G_IMCR_USDHC_DAT3 = 521, 210 S32G_IMCR_USDHC_DAT4 = 522, 211 S32G_IMCR_USDHC_DAT5 = 523, 212 S32G_IMCR_USDHC_DAT6 = 519, 213 S32G_IMCR_USDHC_DAT7 = 518, 214 S32G_IMCR_USDHC_DQS = 524, 215 S32G_IMCR_CAN0_RXD = 513, 216 S32G_IMCR_CAN1_RXD = 631, 217 S32G_IMCR_CAN2_RXD = 632, 218 S32G_IMCR_CAN3_RXD = 633, 219 220 /* JTAG IMCRs */ 221 S32G_IMCR_JTAG_TMS = 562, 222 S32G_IMCR_JTAG_TCK = 572, 223 S32G_IMCR_JTAG_TDI = 573, 224 225 /* GMAC0 */ 226 S32G_IMCR_Ethernet_MDIO = 527, 227 S32G_IMCR_Ethernet_CRS = 526, 228 S32G_IMCR_Ethernet_COL = 525, 229 S32G_IMCR_Ethernet_RX_D0 = 531, 230 S32G_IMCR_Ethernet_RX_D1 = 532, 231 S32G_IMCR_Ethernet_RX_D2 = 533, 232 S32G_IMCR_Ethernet_RX_D3 = 534, 233 S32G_IMCR_Ethernet_RX_ER = 528, 234 S32G_IMCR_Ethernet_RX_CLK = 529, 235 S32G_IMCR_Ethernet_RX_DV = 530, 236 S32G_IMCR_Ethernet_TX_CLK = 538, 237 S32G_IMCR_Ethernet_REF_CLK = 535, 238 239 /* PFE EMAC 0 MII */ 240 S32G_IMCR_PFE_EMAC_0_MDIO = 837, 241 S32G_IMCR_PFE_EMAC_0_CRS = 836, 242 S32G_IMCR_PFE_EMAC_0_COL = 835, 243 S32G_IMCR_PFE_EMAC_0_RX_D0 = 841, 244 S32G_IMCR_PFE_EMAC_0_RX_D1 = 842, 245 S32G_IMCR_PFE_EMAC_0_RX_D2 = 843, 246 S32G_IMCR_PFE_EMAC_0_RX_D3 = 844, 247 S32G_IMCR_PFE_EMAC_0_RX_ER = 840, 248 S32G_IMCR_PFE_EMAC_0_RX_CLK = 839, 249 S32G_IMCR_PFE_EMAC_0_RX_DV = 845, 250 S32G_IMCR_PFE_EMAC_0_TX_CLK = 846, 251 S32G_IMCR_PFE_EMAC_0_REF_CLK = 838, 252 253 /* PFE EMAC 1 MII */ 254 S32G_IMCR_PFE_EMAC_1_MDIO = 857, 255 S32G_IMCR_PFE_EMAC_1_CRS = 856, 256 S32G_IMCR_PFE_EMAC_1_COL = 855, 257 S32G_IMCR_PFE_EMAC_1_RX_D0 = 861, 258 S32G_IMCR_PFE_EMAC_1_RX_D1 = 862, 259 S32G_IMCR_PFE_EMAC_1_RX_D2 = 863, 260 S32G_IMCR_PFE_EMAC_1_RX_D3 = 864, 261 S32G_IMCR_PFE_EMAC_1_RX_ER = 860, 262 S32G_IMCR_PFE_EMAC_1_RX_CLK = 859, 263 S32G_IMCR_PFE_EMAC_1_RX_DV = 865, 264 S32G_IMCR_PFE_EMAC_1_TX_CLK = 866, 265 S32G_IMCR_PFE_EMAC_1_REF_CLK = 858, 266 /* PFE EMAC 2 MII */ 267 S32G_IMCR_PFE_EMAC_2_MDIO = 877, 268 S32G_IMCR_PFE_EMAC_2_CRS = 876, 269 S32G_IMCR_PFE_EMAC_2_COL = 875, 270 S32G_IMCR_PFE_EMAC_2_RX_D0 = 881, 271 S32G_IMCR_PFE_EMAC_2_RX_D1 = 882, 272 S32G_IMCR_PFE_EMAC_2_RX_D2 = 883, 273 S32G_IMCR_PFE_EMAC_2_RX_D3 = 884, 274 S32G_IMCR_PFE_EMAC_2_RX_ER = 880, 275 S32G_IMCR_PFE_EMAC_2_RX_CLK = 879, 276 S32G_IMCR_PFE_EMAC_2_RX_DV = 885, 277 S32G_IMCR_PFE_EMAC_2_TX_CLK = 886, 278 S32G_IMCR_PFE_EMAC_2_REF_CLK = 878, 279 280 S32G_IMCR_FlexRay0_A_RX = 785, 281 S32G_IMCR_FlexRay0_B_RX = 786, 282 S32G_IMCR_FlexTimer0_CH0 = 655, 283 S32G_IMCR_FlexTimer1_CH0 = 665, 284 S32G_IMCR_FlexTimer0_CH1 = 656, 285 S32G_IMCR_FlexTimer1_CH1 = 666, 286 S32G_IMCR_FlexTimer0_CH2 = 657, 287 S32G_IMCR_FlexTimer1_CH2 = 667, 288 S32G_IMCR_FlexTimer0_CH3 = 658, 289 S32G_IMCR_FlexTimer1_CH3 = 668, 290 S32G_IMCR_FlexTimer0_CH4 = 659, 291 S32G_IMCR_FlexTimer1_CH4 = 669, 292 S32G_IMCR_FlexTimer0_CH5 = 660, 293 S32G_IMCR_FlexTimer1_CH5 = 670, 294 S32G_IMCR_FlexTimer0_EXTCLK = 661, 295 S32G_IMCR_FlexTimer1_EXTCLK = 671, 296 S32G_IMCR_I2C1_SCL = 717, 297 S32G_IMCR_I2C1_SDA = 718, 298 S32G_IMCR_I2C2_SCL = 719, 299 S32G_IMCR_I2C2_SDA = 720, 300 S32G_IMCR_I2C3_SCL = 721, 301 S32G_IMCR_I2C3_SDA = 722, 302 S32G_IMCR_I2C4_SCL = 723, 303 S32G_IMCR_I2C4_SDA = 724, 304 S32G_IMCR_LIN1_RX = 736, 305 S32G_IMCR_LIN2_RX = 737, 306 S32G_IMCR_DSPI0_PCS0 = 980, 307 S32G_IMCR_DSPI0_SCK = 981, 308 S32G_IMCR_DSPI0_SIN = 982, 309 S32G_IMCR_DSPI1_PCS0 = 985, 310 S32G_IMCR_DSPI1_SCK = 986, 311 S32G_IMCR_DSPI1_SIN = 987, 312 S32G_IMCR_DSPI2_PCS0 = 990, 313 S32G_IMCR_DSPI2_SCK = 991, 314 S32G_IMCR_DSPI2_SIN = 992, 315 S32G_IMCR_DSPI3_PCS0 = 995, 316 S32G_IMCR_DSPI3_SCK = 996, 317 S32G_IMCR_DSPI3_SIN = 997, 318 S32G_IMCR_DSPI4_PCS0 = 1000, 319 S32G_IMCR_DSPI4_SCK = 1001, 320 S32G_IMCR_DSPI4_SIN = 1002, 321 S32G_IMCR_DSPI5_PCS0 = 1005, 322 S32G_IMCR_DSPI5_SCK = 1006, 323 S32G_IMCR_DSPI5_SIN = 1007, 324 S32G_IMCR_LLCE_CAN0_RXD = 745, 325 S32G_IMCR_LLCE_CAN1_RXD = 746, 326 S32G_IMCR_LLCE_CAN2_RXD = 747, 327 S32G_IMCR_LLCE_CAN3_RXD = 748, 328 S32G_IMCR_LLCE_CAN4_RXD = 749, 329 S32G_IMCR_LLCE_CAN5_RXD = 750, 330 S32G_IMCR_LLCE_CAN6_RXD = 751, 331 S32G_IMCR_LLCE_CAN7_RXD = 752, 332 S32G_IMCR_LLCE_CAN8_RXD = 753, 333 S32G_IMCR_LLCE_CAN9_RXD = 754, 334 S32G_IMCR_LLCE_CAN10_RXD = 755, 335 S32G_IMCR_LLCE_CAN11_RXD = 756, 336 S32G_IMCR_LLCE_CAN12_RXD = 757, 337 S32G_IMCR_LLCE_CAN13_RXD = 758, 338 S32G_IMCR_LLCE_CAN14_RXD = 759, 339 S32G_IMCR_LLCE_CAN15_RXD = 760, 340 S32G_IMCR_LLCE_UART0_RXD = 790, 341 S32G_IMCR_LLCE_UART1_RXD = 791, 342 S32G_IMCR_LLCE_UART2_RXD = 792, 343 S32G_IMCR_LLCE_UART3_RXD = 793, 344 S32G_IMCR_LLCE_LPSPI2_PCS0 = 811, 345 S32G_IMCR_LLCE_LPSPI2_SCK = 816, 346 S32G_IMCR_LLCE_LPSPI2_SIN = 817, 347 S32G_IMCR_USB_CLK = 895, 348 S32G_IMCR_USB_DATA0 = 896, 349 S32G_IMCR_USB_DATA1 = 897, 350 S32G_IMCR_USB_DATA2 = 898, 351 S32G_IMCR_USB_DATA3 = 899, 352 S32G_IMCR_USB_DATA4 = 900, 353 S32G_IMCR_USB_DATA5 = 901, 354 S32G_IMCR_USB_DATA6 = 902, 355 S32G_IMCR_USB_DATA7 = 903, 356 S32G_IMCR_USB_DIR = 904, 357 S32G_IMCR_USB_NXT = 905, 358 359 S32G_IMCR_SIUL_EIRQ0 = 910, 360 S32G_IMCR_SIUL_EIRQ1 = 911, 361 S32G_IMCR_SIUL_EIRQ2 = 912, 362 S32G_IMCR_SIUL_EIRQ3 = 913, 363 S32G_IMCR_SIUL_EIRQ4 = 914, 364 S32G_IMCR_SIUL_EIRQ5 = 915, 365 S32G_IMCR_SIUL_EIRQ6 = 916, 366 S32G_IMCR_SIUL_EIRQ7 = 917, 367 S32G_IMCR_SIUL_EIRQ8 = 918, 368 S32G_IMCR_SIUL_EIRQ9 = 919, 369 S32G_IMCR_SIUL_EIRQ10 = 920, 370 S32G_IMCR_SIUL_EIRQ11 = 921, 371 S32G_IMCR_SIUL_EIRQ12 = 922, 372 S32G_IMCR_SIUL_EIRQ13 = 923, 373 S32G_IMCR_SIUL_EIRQ14 = 924, 374 S32G_IMCR_SIUL_EIRQ15 = 925, 375 S32G_IMCR_SIUL_EIRQ16 = 926, 376 S32G_IMCR_SIUL_EIRQ17 = 927, 377 S32G_IMCR_SIUL_EIRQ18 = 928, 378 S32G_IMCR_SIUL_EIRQ19 = 929, 379 S32G_IMCR_SIUL_EIRQ20 = 930, 380 S32G_IMCR_SIUL_EIRQ21 = 931, 381 S32G_IMCR_SIUL_EIRQ22 = 932, 382 S32G_IMCR_SIUL_EIRQ23 = 933, 383 S32G_IMCR_SIUL_EIRQ24 = 934, 384 S32G_IMCR_SIUL_EIRQ25 = 935, 385 S32G_IMCR_SIUL_EIRQ26 = 936, 386 S32G_IMCR_SIUL_EIRQ27 = 937, 387 S32G_IMCR_SIUL_EIRQ28 = 938, 388 S32G_IMCR_SIUL_EIRQ29 = 939, 389 S32G_IMCR_SIUL_EIRQ30 = 940, 390 S32G_IMCR_SIUL_EIRQ31 = 941, 391 }; 392 393 /* Pad names for the pinmux subsystem */ 394 static const struct pinctrl_pin_desc s32_pinctrl_pads_siul2[] = { 395 396 /* SIUL2_0 pins. */ 397 398 S32_PINCTRL_PIN(S32G_MSCR_PA_00), 399 S32_PINCTRL_PIN(S32G_MSCR_PA_01), 400 S32_PINCTRL_PIN(S32G_MSCR_PA_02), 401 S32_PINCTRL_PIN(S32G_MSCR_PA_03), 402 S32_PINCTRL_PIN(S32G_MSCR_PA_04), 403 S32_PINCTRL_PIN(S32G_MSCR_PA_05), 404 S32_PINCTRL_PIN(S32G_MSCR_PA_06), 405 S32_PINCTRL_PIN(S32G_MSCR_PA_07), 406 S32_PINCTRL_PIN(S32G_MSCR_PA_08), 407 S32_PINCTRL_PIN(S32G_MSCR_PA_09), 408 S32_PINCTRL_PIN(S32G_MSCR_PA_10), 409 S32_PINCTRL_PIN(S32G_MSCR_PA_11), 410 S32_PINCTRL_PIN(S32G_MSCR_PA_12), 411 S32_PINCTRL_PIN(S32G_MSCR_PA_13), 412 S32_PINCTRL_PIN(S32G_MSCR_PA_14), 413 S32_PINCTRL_PIN(S32G_MSCR_PA_15), 414 S32_PINCTRL_PIN(S32G_MSCR_PB_00), 415 S32_PINCTRL_PIN(S32G_MSCR_PB_01), 416 S32_PINCTRL_PIN(S32G_MSCR_PB_02), 417 S32_PINCTRL_PIN(S32G_MSCR_PB_03), 418 S32_PINCTRL_PIN(S32G_MSCR_PB_04), 419 S32_PINCTRL_PIN(S32G_MSCR_PB_05), 420 S32_PINCTRL_PIN(S32G_MSCR_PB_06), 421 S32_PINCTRL_PIN(S32G_MSCR_PB_07), 422 S32_PINCTRL_PIN(S32G_MSCR_PB_08), 423 S32_PINCTRL_PIN(S32G_MSCR_PB_09), 424 S32_PINCTRL_PIN(S32G_MSCR_PB_10), 425 S32_PINCTRL_PIN(S32G_MSCR_PB_11), 426 S32_PINCTRL_PIN(S32G_MSCR_PB_12), 427 S32_PINCTRL_PIN(S32G_MSCR_PB_13), 428 S32_PINCTRL_PIN(S32G_MSCR_PB_14), 429 S32_PINCTRL_PIN(S32G_MSCR_PB_15), 430 S32_PINCTRL_PIN(S32G_MSCR_PC_00), 431 S32_PINCTRL_PIN(S32G_MSCR_PC_01), 432 S32_PINCTRL_PIN(S32G_MSCR_PC_02), 433 S32_PINCTRL_PIN(S32G_MSCR_PC_03), 434 S32_PINCTRL_PIN(S32G_MSCR_PC_04), 435 S32_PINCTRL_PIN(S32G_MSCR_PC_05), 436 S32_PINCTRL_PIN(S32G_MSCR_PC_06), 437 S32_PINCTRL_PIN(S32G_MSCR_PC_07), 438 S32_PINCTRL_PIN(S32G_MSCR_PC_08), 439 S32_PINCTRL_PIN(S32G_MSCR_PC_09), 440 S32_PINCTRL_PIN(S32G_MSCR_PC_10), 441 S32_PINCTRL_PIN(S32G_MSCR_PC_11), 442 S32_PINCTRL_PIN(S32G_MSCR_PC_12), 443 S32_PINCTRL_PIN(S32G_MSCR_PC_13), 444 S32_PINCTRL_PIN(S32G_MSCR_PC_14), 445 S32_PINCTRL_PIN(S32G_MSCR_PC_15), 446 S32_PINCTRL_PIN(S32G_MSCR_PD_00), 447 S32_PINCTRL_PIN(S32G_MSCR_PD_01), 448 S32_PINCTRL_PIN(S32G_MSCR_PD_02), 449 S32_PINCTRL_PIN(S32G_MSCR_PD_03), 450 S32_PINCTRL_PIN(S32G_MSCR_PD_04), 451 S32_PINCTRL_PIN(S32G_MSCR_PD_05), 452 S32_PINCTRL_PIN(S32G_MSCR_PD_06), 453 S32_PINCTRL_PIN(S32G_MSCR_PD_07), 454 S32_PINCTRL_PIN(S32G_MSCR_PD_08), 455 S32_PINCTRL_PIN(S32G_MSCR_PD_09), 456 S32_PINCTRL_PIN(S32G_MSCR_PD_10), 457 S32_PINCTRL_PIN(S32G_MSCR_PD_11), 458 S32_PINCTRL_PIN(S32G_MSCR_PD_12), 459 S32_PINCTRL_PIN(S32G_MSCR_PD_13), 460 S32_PINCTRL_PIN(S32G_MSCR_PD_14), 461 S32_PINCTRL_PIN(S32G_MSCR_PD_15), 462 S32_PINCTRL_PIN(S32G_MSCR_PE_00), 463 S32_PINCTRL_PIN(S32G_MSCR_PE_01), 464 S32_PINCTRL_PIN(S32G_MSCR_PE_02), 465 S32_PINCTRL_PIN(S32G_MSCR_PE_03), 466 S32_PINCTRL_PIN(S32G_MSCR_PE_04), 467 S32_PINCTRL_PIN(S32G_MSCR_PE_05), 468 S32_PINCTRL_PIN(S32G_MSCR_PE_06), 469 S32_PINCTRL_PIN(S32G_MSCR_PE_07), 470 S32_PINCTRL_PIN(S32G_MSCR_PE_08), 471 S32_PINCTRL_PIN(S32G_MSCR_PE_09), 472 S32_PINCTRL_PIN(S32G_MSCR_PE_10), 473 S32_PINCTRL_PIN(S32G_MSCR_PE_11), 474 S32_PINCTRL_PIN(S32G_MSCR_PE_12), 475 S32_PINCTRL_PIN(S32G_MSCR_PE_13), 476 S32_PINCTRL_PIN(S32G_MSCR_PE_14), 477 S32_PINCTRL_PIN(S32G_MSCR_PE_15), 478 S32_PINCTRL_PIN(S32G_MSCR_PF_00), 479 S32_PINCTRL_PIN(S32G_MSCR_PF_01), 480 S32_PINCTRL_PIN(S32G_MSCR_PF_02), 481 S32_PINCTRL_PIN(S32G_MSCR_PF_03), 482 S32_PINCTRL_PIN(S32G_MSCR_PF_04), 483 S32_PINCTRL_PIN(S32G_MSCR_PF_05), 484 S32_PINCTRL_PIN(S32G_MSCR_PF_06), 485 S32_PINCTRL_PIN(S32G_MSCR_PF_07), 486 S32_PINCTRL_PIN(S32G_MSCR_PF_08), 487 S32_PINCTRL_PIN(S32G_MSCR_PF_09), 488 S32_PINCTRL_PIN(S32G_MSCR_PF_10), 489 S32_PINCTRL_PIN(S32G_MSCR_PF_11), 490 S32_PINCTRL_PIN(S32G_MSCR_PF_12), 491 S32_PINCTRL_PIN(S32G_MSCR_PF_13), 492 S32_PINCTRL_PIN(S32G_MSCR_PF_14), 493 S32_PINCTRL_PIN(S32G_MSCR_PF_15), 494 S32_PINCTRL_PIN(S32G_MSCR_PG_00), 495 S32_PINCTRL_PIN(S32G_MSCR_PG_01), 496 S32_PINCTRL_PIN(S32G_MSCR_PG_02), 497 S32_PINCTRL_PIN(S32G_MSCR_PG_03), 498 S32_PINCTRL_PIN(S32G_MSCR_PG_04), 499 S32_PINCTRL_PIN(S32G_MSCR_PG_05), 500 501 S32_PINCTRL_PIN(S32G_IMCR_QSPI_A_DATA0), 502 S32_PINCTRL_PIN(S32G_IMCR_QSPI_A_DATA1), 503 S32_PINCTRL_PIN(S32G_IMCR_QSPI_A_DATA2), 504 S32_PINCTRL_PIN(S32G_IMCR_QSPI_A_DATA3), 505 S32_PINCTRL_PIN(S32G_IMCR_QSPI_A_DATA4), 506 S32_PINCTRL_PIN(S32G_IMCR_QSPI_A_DATA5), 507 S32_PINCTRL_PIN(S32G_IMCR_QSPI_A_DATA6), 508 S32_PINCTRL_PIN(S32G_IMCR_QSPI_A_DATA7), 509 S32_PINCTRL_PIN(S32G_IMCR_QSPI_DQS_A), 510 S32_PINCTRL_PIN(S32G_IMCR_QSPI_B_DATA0), 511 S32_PINCTRL_PIN(S32G_IMCR_QSPI_B_DATA1), 512 S32_PINCTRL_PIN(S32G_IMCR_QSPI_B_DATA2), 513 S32_PINCTRL_PIN(S32G_IMCR_QSPI_B_DATA3), 514 S32_PINCTRL_PIN(S32G_IMCR_QSPI_B_DATA4), 515 S32_PINCTRL_PIN(S32G_IMCR_QSPI_B_DATA5), 516 S32_PINCTRL_PIN(S32G_IMCR_QSPI_B_DATA6), 517 S32_PINCTRL_PIN(S32G_IMCR_QSPI_B_DATA7), 518 S32_PINCTRL_PIN(S32G_IMCR_QSPI_DQS_B), 519 S32_PINCTRL_PIN(S32G_IMCR_I2C0_SCL), 520 S32_PINCTRL_PIN(S32G_IMCR_I2C0_SDA), 521 S32_PINCTRL_PIN(S32G_IMCR_LIN0_RX), 522 S32_PINCTRL_PIN(S32G_IMCR_USDHC_CMD), 523 S32_PINCTRL_PIN(S32G_IMCR_USDHC_DAT0), 524 S32_PINCTRL_PIN(S32G_IMCR_USDHC_DAT1), 525 S32_PINCTRL_PIN(S32G_IMCR_USDHC_DAT2), 526 S32_PINCTRL_PIN(S32G_IMCR_USDHC_DAT3), 527 S32_PINCTRL_PIN(S32G_IMCR_USDHC_DAT4), 528 S32_PINCTRL_PIN(S32G_IMCR_USDHC_DAT5), 529 S32_PINCTRL_PIN(S32G_IMCR_USDHC_DAT6), 530 S32_PINCTRL_PIN(S32G_IMCR_USDHC_DAT7), 531 S32_PINCTRL_PIN(S32G_IMCR_USDHC_DQS), 532 S32_PINCTRL_PIN(S32G_IMCR_CAN0_RXD), 533 534 /* JTAG IMCRs */ 535 S32_PINCTRL_PIN(S32G_IMCR_JTAG_TMS), 536 S32_PINCTRL_PIN(S32G_IMCR_JTAG_TCK), 537 S32_PINCTRL_PIN(S32G_IMCR_JTAG_TDI), 538 539 /* GMAC0 */ 540 S32_PINCTRL_PIN(S32G_IMCR_Ethernet_MDIO), 541 S32_PINCTRL_PIN(S32G_IMCR_Ethernet_CRS), 542 S32_PINCTRL_PIN(S32G_IMCR_Ethernet_COL), 543 S32_PINCTRL_PIN(S32G_IMCR_Ethernet_RX_D0), 544 S32_PINCTRL_PIN(S32G_IMCR_Ethernet_RX_D1), 545 S32_PINCTRL_PIN(S32G_IMCR_Ethernet_RX_D2), 546 S32_PINCTRL_PIN(S32G_IMCR_Ethernet_RX_D3), 547 S32_PINCTRL_PIN(S32G_IMCR_Ethernet_RX_ER), 548 S32_PINCTRL_PIN(S32G_IMCR_Ethernet_RX_CLK), 549 S32_PINCTRL_PIN(S32G_IMCR_Ethernet_RX_DV), 550 S32_PINCTRL_PIN(S32G_IMCR_Ethernet_TX_CLK), 551 S32_PINCTRL_PIN(S32G_IMCR_Ethernet_REF_CLK), 552 553 /* SIUL2_1 pins. */ 554 555 S32_PINCTRL_PIN(S32G_MSCR_PH_00), 556 S32_PINCTRL_PIN(S32G_MSCR_PH_01), 557 S32_PINCTRL_PIN(S32G_MSCR_PH_02), 558 S32_PINCTRL_PIN(S32G_MSCR_PH_03), 559 S32_PINCTRL_PIN(S32G_MSCR_PH_04), 560 S32_PINCTRL_PIN(S32G_MSCR_PH_05), 561 S32_PINCTRL_PIN(S32G_MSCR_PH_06), 562 S32_PINCTRL_PIN(S32G_MSCR_PH_07), 563 S32_PINCTRL_PIN(S32G_MSCR_PH_08), 564 S32_PINCTRL_PIN(S32G_MSCR_PH_09), 565 S32_PINCTRL_PIN(S32G_MSCR_PH_10), 566 S32_PINCTRL_PIN(S32G_MSCR_PJ_00), 567 S32_PINCTRL_PIN(S32G_MSCR_PJ_01), 568 S32_PINCTRL_PIN(S32G_MSCR_PJ_02), 569 S32_PINCTRL_PIN(S32G_MSCR_PJ_03), 570 S32_PINCTRL_PIN(S32G_MSCR_PJ_04), 571 S32_PINCTRL_PIN(S32G_MSCR_PJ_05), 572 S32_PINCTRL_PIN(S32G_MSCR_PJ_06), 573 S32_PINCTRL_PIN(S32G_MSCR_PJ_07), 574 S32_PINCTRL_PIN(S32G_MSCR_PJ_08), 575 S32_PINCTRL_PIN(S32G_MSCR_PJ_09), 576 S32_PINCTRL_PIN(S32G_MSCR_PJ_10), 577 S32_PINCTRL_PIN(S32G_MSCR_PJ_11), 578 S32_PINCTRL_PIN(S32G_MSCR_PJ_12), 579 S32_PINCTRL_PIN(S32G_MSCR_PJ_13), 580 S32_PINCTRL_PIN(S32G_MSCR_PJ_14), 581 S32_PINCTRL_PIN(S32G_MSCR_PJ_15), 582 S32_PINCTRL_PIN(S32G_MSCR_PK_00), 583 S32_PINCTRL_PIN(S32G_MSCR_PK_01), 584 S32_PINCTRL_PIN(S32G_MSCR_PK_02), 585 S32_PINCTRL_PIN(S32G_MSCR_PK_03), 586 S32_PINCTRL_PIN(S32G_MSCR_PK_04), 587 S32_PINCTRL_PIN(S32G_MSCR_PK_05), 588 S32_PINCTRL_PIN(S32G_MSCR_PK_06), 589 S32_PINCTRL_PIN(S32G_MSCR_PK_07), 590 S32_PINCTRL_PIN(S32G_MSCR_PK_08), 591 S32_PINCTRL_PIN(S32G_MSCR_PK_09), 592 S32_PINCTRL_PIN(S32G_MSCR_PK_10), 593 S32_PINCTRL_PIN(S32G_MSCR_PK_11), 594 S32_PINCTRL_PIN(S32G_MSCR_PK_12), 595 S32_PINCTRL_PIN(S32G_MSCR_PK_13), 596 S32_PINCTRL_PIN(S32G_MSCR_PK_14), 597 S32_PINCTRL_PIN(S32G_MSCR_PK_15), 598 S32_PINCTRL_PIN(S32G_MSCR_PL_00), 599 S32_PINCTRL_PIN(S32G_MSCR_PL_01), 600 S32_PINCTRL_PIN(S32G_MSCR_PL_02), 601 S32_PINCTRL_PIN(S32G_MSCR_PL_03), 602 S32_PINCTRL_PIN(S32G_MSCR_PL_04), 603 S32_PINCTRL_PIN(S32G_MSCR_PL_05), 604 S32_PINCTRL_PIN(S32G_MSCR_PL_06), 605 S32_PINCTRL_PIN(S32G_MSCR_PL_07), 606 S32_PINCTRL_PIN(S32G_MSCR_PL_08), 607 S32_PINCTRL_PIN(S32G_MSCR_PL_09), 608 S32_PINCTRL_PIN(S32G_MSCR_PL_10), 609 S32_PINCTRL_PIN(S32G_MSCR_PL_11), 610 S32_PINCTRL_PIN(S32G_MSCR_PL_12), 611 S32_PINCTRL_PIN(S32G_MSCR_PL_13), 612 S32_PINCTRL_PIN(S32G_MSCR_PL_14), 613 614 S32_PINCTRL_PIN(S32G_IMCR_FlexRay0_A_RX), 615 S32_PINCTRL_PIN(S32G_IMCR_FlexRay0_B_RX), 616 S32_PINCTRL_PIN(S32G_IMCR_FlexTimer0_CH0), 617 S32_PINCTRL_PIN(S32G_IMCR_FlexTimer1_CH0), 618 S32_PINCTRL_PIN(S32G_IMCR_FlexTimer0_CH1), 619 S32_PINCTRL_PIN(S32G_IMCR_FlexTimer1_CH1), 620 S32_PINCTRL_PIN(S32G_IMCR_FlexTimer0_CH2), 621 S32_PINCTRL_PIN(S32G_IMCR_FlexTimer1_CH2), 622 S32_PINCTRL_PIN(S32G_IMCR_FlexTimer0_CH3), 623 S32_PINCTRL_PIN(S32G_IMCR_FlexTimer1_CH3), 624 S32_PINCTRL_PIN(S32G_IMCR_FlexTimer0_CH4), 625 S32_PINCTRL_PIN(S32G_IMCR_FlexTimer1_CH4), 626 S32_PINCTRL_PIN(S32G_IMCR_FlexTimer0_CH5), 627 S32_PINCTRL_PIN(S32G_IMCR_FlexTimer1_CH5), 628 S32_PINCTRL_PIN(S32G_IMCR_FlexTimer0_EXTCLK), 629 S32_PINCTRL_PIN(S32G_IMCR_FlexTimer1_EXTCLK), 630 S32_PINCTRL_PIN(S32G_IMCR_I2C1_SCL), 631 S32_PINCTRL_PIN(S32G_IMCR_I2C1_SDA), 632 S32_PINCTRL_PIN(S32G_IMCR_I2C2_SCL), 633 S32_PINCTRL_PIN(S32G_IMCR_I2C2_SDA), 634 S32_PINCTRL_PIN(S32G_IMCR_I2C3_SCL), 635 S32_PINCTRL_PIN(S32G_IMCR_I2C3_SDA), 636 S32_PINCTRL_PIN(S32G_IMCR_I2C4_SCL), 637 S32_PINCTRL_PIN(S32G_IMCR_I2C4_SDA), 638 S32_PINCTRL_PIN(S32G_IMCR_LIN1_RX), 639 S32_PINCTRL_PIN(S32G_IMCR_LIN2_RX), 640 S32_PINCTRL_PIN(S32G_IMCR_DSPI0_PCS0), 641 S32_PINCTRL_PIN(S32G_IMCR_DSPI0_SCK), 642 S32_PINCTRL_PIN(S32G_IMCR_DSPI0_SIN), 643 S32_PINCTRL_PIN(S32G_IMCR_DSPI1_PCS0), 644 S32_PINCTRL_PIN(S32G_IMCR_DSPI1_SCK), 645 S32_PINCTRL_PIN(S32G_IMCR_DSPI1_SIN), 646 S32_PINCTRL_PIN(S32G_IMCR_DSPI2_PCS0), 647 S32_PINCTRL_PIN(S32G_IMCR_DSPI2_SCK), 648 S32_PINCTRL_PIN(S32G_IMCR_DSPI2_SIN), 649 S32_PINCTRL_PIN(S32G_IMCR_DSPI3_PCS0), 650 S32_PINCTRL_PIN(S32G_IMCR_DSPI3_SCK), 651 S32_PINCTRL_PIN(S32G_IMCR_DSPI3_SIN), 652 S32_PINCTRL_PIN(S32G_IMCR_DSPI4_PCS0), 653 S32_PINCTRL_PIN(S32G_IMCR_DSPI4_SCK), 654 S32_PINCTRL_PIN(S32G_IMCR_DSPI4_SIN), 655 S32_PINCTRL_PIN(S32G_IMCR_DSPI5_PCS0), 656 S32_PINCTRL_PIN(S32G_IMCR_DSPI5_SCK), 657 S32_PINCTRL_PIN(S32G_IMCR_DSPI5_SIN), 658 S32_PINCTRL_PIN(S32G_IMCR_LLCE_CAN0_RXD), 659 S32_PINCTRL_PIN(S32G_IMCR_LLCE_CAN1_RXD), 660 S32_PINCTRL_PIN(S32G_IMCR_LLCE_CAN2_RXD), 661 S32_PINCTRL_PIN(S32G_IMCR_LLCE_CAN3_RXD), 662 S32_PINCTRL_PIN(S32G_IMCR_LLCE_CAN4_RXD), 663 S32_PINCTRL_PIN(S32G_IMCR_LLCE_CAN5_RXD), 664 S32_PINCTRL_PIN(S32G_IMCR_LLCE_CAN6_RXD), 665 S32_PINCTRL_PIN(S32G_IMCR_LLCE_CAN7_RXD), 666 S32_PINCTRL_PIN(S32G_IMCR_LLCE_CAN8_RXD), 667 S32_PINCTRL_PIN(S32G_IMCR_LLCE_CAN9_RXD), 668 S32_PINCTRL_PIN(S32G_IMCR_LLCE_CAN10_RXD), 669 S32_PINCTRL_PIN(S32G_IMCR_LLCE_CAN11_RXD), 670 S32_PINCTRL_PIN(S32G_IMCR_LLCE_CAN12_RXD), 671 S32_PINCTRL_PIN(S32G_IMCR_LLCE_CAN13_RXD), 672 S32_PINCTRL_PIN(S32G_IMCR_LLCE_CAN14_RXD), 673 S32_PINCTRL_PIN(S32G_IMCR_LLCE_CAN15_RXD), 674 S32_PINCTRL_PIN(S32G_IMCR_LLCE_UART0_RXD), 675 S32_PINCTRL_PIN(S32G_IMCR_LLCE_UART1_RXD), 676 S32_PINCTRL_PIN(S32G_IMCR_LLCE_UART2_RXD), 677 S32_PINCTRL_PIN(S32G_IMCR_LLCE_UART3_RXD), 678 S32_PINCTRL_PIN(S32G_IMCR_LLCE_LPSPI2_PCS0), 679 S32_PINCTRL_PIN(S32G_IMCR_LLCE_LPSPI2_SCK), 680 S32_PINCTRL_PIN(S32G_IMCR_LLCE_LPSPI2_SIN), 681 S32_PINCTRL_PIN(S32G_IMCR_CAN1_RXD), 682 S32_PINCTRL_PIN(S32G_IMCR_CAN2_RXD), 683 S32_PINCTRL_PIN(S32G_IMCR_CAN3_RXD), 684 S32_PINCTRL_PIN(S32G_IMCR_USB_CLK), 685 S32_PINCTRL_PIN(S32G_IMCR_USB_DATA0), 686 S32_PINCTRL_PIN(S32G_IMCR_USB_DATA1), 687 S32_PINCTRL_PIN(S32G_IMCR_USB_DATA2), 688 S32_PINCTRL_PIN(S32G_IMCR_USB_DATA3), 689 S32_PINCTRL_PIN(S32G_IMCR_USB_DATA4), 690 S32_PINCTRL_PIN(S32G_IMCR_USB_DATA5), 691 S32_PINCTRL_PIN(S32G_IMCR_USB_DATA6), 692 S32_PINCTRL_PIN(S32G_IMCR_USB_DATA7), 693 S32_PINCTRL_PIN(S32G_IMCR_USB_DIR), 694 S32_PINCTRL_PIN(S32G_IMCR_USB_NXT), 695 S32_PINCTRL_PIN(S32G_IMCR_PFE_EMAC_0_MDIO), 696 S32_PINCTRL_PIN(S32G_IMCR_PFE_EMAC_0_CRS), 697 S32_PINCTRL_PIN(S32G_IMCR_PFE_EMAC_0_COL), 698 S32_PINCTRL_PIN(S32G_IMCR_PFE_EMAC_0_RX_D0), 699 S32_PINCTRL_PIN(S32G_IMCR_PFE_EMAC_0_RX_D1), 700 S32_PINCTRL_PIN(S32G_IMCR_PFE_EMAC_0_RX_D2), 701 S32_PINCTRL_PIN(S32G_IMCR_PFE_EMAC_0_RX_D3), 702 S32_PINCTRL_PIN(S32G_IMCR_PFE_EMAC_0_RX_ER), 703 S32_PINCTRL_PIN(S32G_IMCR_PFE_EMAC_0_RX_CLK), 704 S32_PINCTRL_PIN(S32G_IMCR_PFE_EMAC_0_RX_DV), 705 S32_PINCTRL_PIN(S32G_IMCR_PFE_EMAC_0_TX_CLK), 706 S32_PINCTRL_PIN(S32G_IMCR_PFE_EMAC_0_REF_CLK), 707 S32_PINCTRL_PIN(S32G_IMCR_PFE_EMAC_1_MDIO), 708 S32_PINCTRL_PIN(S32G_IMCR_PFE_EMAC_1_CRS), 709 S32_PINCTRL_PIN(S32G_IMCR_PFE_EMAC_1_COL), 710 S32_PINCTRL_PIN(S32G_IMCR_PFE_EMAC_1_RX_D0), 711 S32_PINCTRL_PIN(S32G_IMCR_PFE_EMAC_1_RX_D1), 712 S32_PINCTRL_PIN(S32G_IMCR_PFE_EMAC_1_RX_D2), 713 S32_PINCTRL_PIN(S32G_IMCR_PFE_EMAC_1_RX_D3), 714 S32_PINCTRL_PIN(S32G_IMCR_PFE_EMAC_1_RX_ER), 715 S32_PINCTRL_PIN(S32G_IMCR_PFE_EMAC_1_RX_CLK), 716 S32_PINCTRL_PIN(S32G_IMCR_PFE_EMAC_1_RX_DV), 717 S32_PINCTRL_PIN(S32G_IMCR_PFE_EMAC_1_TX_CLK), 718 S32_PINCTRL_PIN(S32G_IMCR_PFE_EMAC_1_REF_CLK), 719 S32_PINCTRL_PIN(S32G_IMCR_PFE_EMAC_2_MDIO), 720 S32_PINCTRL_PIN(S32G_IMCR_PFE_EMAC_2_CRS), 721 S32_PINCTRL_PIN(S32G_IMCR_PFE_EMAC_2_COL), 722 S32_PINCTRL_PIN(S32G_IMCR_PFE_EMAC_2_RX_D0), 723 S32_PINCTRL_PIN(S32G_IMCR_PFE_EMAC_2_RX_D1), 724 S32_PINCTRL_PIN(S32G_IMCR_PFE_EMAC_2_RX_D2), 725 S32_PINCTRL_PIN(S32G_IMCR_PFE_EMAC_2_RX_D3), 726 S32_PINCTRL_PIN(S32G_IMCR_PFE_EMAC_2_RX_ER), 727 S32_PINCTRL_PIN(S32G_IMCR_PFE_EMAC_2_RX_CLK), 728 S32_PINCTRL_PIN(S32G_IMCR_PFE_EMAC_2_RX_DV), 729 S32_PINCTRL_PIN(S32G_IMCR_PFE_EMAC_2_TX_CLK), 730 S32_PINCTRL_PIN(S32G_IMCR_PFE_EMAC_2_REF_CLK), 731 S32_PINCTRL_PIN(S32G_IMCR_SIUL_EIRQ0), 732 S32_PINCTRL_PIN(S32G_IMCR_SIUL_EIRQ1), 733 S32_PINCTRL_PIN(S32G_IMCR_SIUL_EIRQ2), 734 S32_PINCTRL_PIN(S32G_IMCR_SIUL_EIRQ3), 735 S32_PINCTRL_PIN(S32G_IMCR_SIUL_EIRQ4), 736 S32_PINCTRL_PIN(S32G_IMCR_SIUL_EIRQ5), 737 S32_PINCTRL_PIN(S32G_IMCR_SIUL_EIRQ6), 738 S32_PINCTRL_PIN(S32G_IMCR_SIUL_EIRQ7), 739 S32_PINCTRL_PIN(S32G_IMCR_SIUL_EIRQ8), 740 S32_PINCTRL_PIN(S32G_IMCR_SIUL_EIRQ9), 741 S32_PINCTRL_PIN(S32G_IMCR_SIUL_EIRQ10), 742 S32_PINCTRL_PIN(S32G_IMCR_SIUL_EIRQ11), 743 S32_PINCTRL_PIN(S32G_IMCR_SIUL_EIRQ12), 744 S32_PINCTRL_PIN(S32G_IMCR_SIUL_EIRQ13), 745 S32_PINCTRL_PIN(S32G_IMCR_SIUL_EIRQ14), 746 S32_PINCTRL_PIN(S32G_IMCR_SIUL_EIRQ15), 747 S32_PINCTRL_PIN(S32G_IMCR_SIUL_EIRQ16), 748 S32_PINCTRL_PIN(S32G_IMCR_SIUL_EIRQ17), 749 S32_PINCTRL_PIN(S32G_IMCR_SIUL_EIRQ18), 750 S32_PINCTRL_PIN(S32G_IMCR_SIUL_EIRQ19), 751 S32_PINCTRL_PIN(S32G_IMCR_SIUL_EIRQ20), 752 S32_PINCTRL_PIN(S32G_IMCR_SIUL_EIRQ21), 753 S32_PINCTRL_PIN(S32G_IMCR_SIUL_EIRQ22), 754 S32_PINCTRL_PIN(S32G_IMCR_SIUL_EIRQ23), 755 S32_PINCTRL_PIN(S32G_IMCR_SIUL_EIRQ24), 756 S32_PINCTRL_PIN(S32G_IMCR_SIUL_EIRQ25), 757 S32_PINCTRL_PIN(S32G_IMCR_SIUL_EIRQ26), 758 S32_PINCTRL_PIN(S32G_IMCR_SIUL_EIRQ27), 759 S32_PINCTRL_PIN(S32G_IMCR_SIUL_EIRQ28), 760 S32_PINCTRL_PIN(S32G_IMCR_SIUL_EIRQ29), 761 S32_PINCTRL_PIN(S32G_IMCR_SIUL_EIRQ30), 762 S32_PINCTRL_PIN(S32G_IMCR_SIUL_EIRQ31), 763 }; 764 765 static const struct s32_pin_range s32_pin_ranges_siul2[] = { 766 /* MSCR pin ID ranges */ 767 S32_PIN_RANGE(0, 101), 768 S32_PIN_RANGE(112, 122), 769 S32_PIN_RANGE(144, 190), 770 /* IMCR pin ID ranges */ 771 S32_PIN_RANGE(512, 595), 772 S32_PIN_RANGE(631, 909), 773 S32_PIN_RANGE(942, 1007), 774 }; 775 776 static const struct s32_pinctrl_soc_data s32_pinctrl_data = { 777 .pins = s32_pinctrl_pads_siul2, 778 .npins = ARRAY_SIZE(s32_pinctrl_pads_siul2), 779 .mem_pin_ranges = s32_pin_ranges_siul2, 780 .mem_regions = ARRAY_SIZE(s32_pin_ranges_siul2), 781 }; 782 783 static const struct of_device_id s32_pinctrl_of_match[] = { 784 { 785 .compatible = "nxp,s32g2-siul2-pinctrl", 786 .data = &s32_pinctrl_data, 787 }, 788 { /* sentinel */ } 789 }; 790 MODULE_DEVICE_TABLE(of, s32_pinctrl_of_match); 791 792 static int s32g_pinctrl_probe(struct platform_device *pdev) 793 { 794 const struct s32_pinctrl_soc_data *soc_data; 795 796 soc_data = of_device_get_match_data(&pdev->dev); 797 798 return s32_pinctrl_probe(pdev, soc_data); 799 } 800 801 static const struct dev_pm_ops s32g_pinctrl_pm_ops = { 802 LATE_SYSTEM_SLEEP_PM_OPS(s32_pinctrl_suspend, s32_pinctrl_resume) 803 }; 804 805 static struct platform_driver s32g_pinctrl_driver = { 806 .driver = { 807 .name = "s32g-siul2-pinctrl", 808 .of_match_table = s32_pinctrl_of_match, 809 .pm = pm_sleep_ptr(&s32g_pinctrl_pm_ops), 810 .suppress_bind_attrs = true, 811 }, 812 .probe = s32g_pinctrl_probe, 813 }; 814 builtin_platform_driver(s32g_pinctrl_driver); 815 816 MODULE_AUTHOR("Matthew Nunez <matthew.nunez@nxp.com>"); 817 MODULE_DESCRIPTION("NXP S32G pinctrl driver"); 818 MODULE_LICENSE("GPL"); 819