1*edad3b2aSLinus Walleij /* 2*edad3b2aSLinus Walleij * Copyright 2012 Freescale Semiconductor, Inc. 3*edad3b2aSLinus Walleij * 4*edad3b2aSLinus Walleij * The code contained herein is licensed under the GNU General Public 5*edad3b2aSLinus Walleij * License. You may obtain a copy of the GNU General Public License 6*edad3b2aSLinus Walleij * Version 2 or later at the following locations: 7*edad3b2aSLinus Walleij * 8*edad3b2aSLinus Walleij * http://www.opensource.org/licenses/gpl-license.html 9*edad3b2aSLinus Walleij * http://www.gnu.org/copyleft/gpl.html 10*edad3b2aSLinus Walleij */ 11*edad3b2aSLinus Walleij 12*edad3b2aSLinus Walleij #include <linux/init.h> 13*edad3b2aSLinus Walleij #include <linux/module.h> 14*edad3b2aSLinus Walleij #include <linux/of_device.h> 15*edad3b2aSLinus Walleij #include <linux/pinctrl/pinctrl.h> 16*edad3b2aSLinus Walleij #include "pinctrl-mxs.h" 17*edad3b2aSLinus Walleij 18*edad3b2aSLinus Walleij enum imx28_pin_enum { 19*edad3b2aSLinus Walleij GPMI_D00 = PINID(0, 0), 20*edad3b2aSLinus Walleij GPMI_D01 = PINID(0, 1), 21*edad3b2aSLinus Walleij GPMI_D02 = PINID(0, 2), 22*edad3b2aSLinus Walleij GPMI_D03 = PINID(0, 3), 23*edad3b2aSLinus Walleij GPMI_D04 = PINID(0, 4), 24*edad3b2aSLinus Walleij GPMI_D05 = PINID(0, 5), 25*edad3b2aSLinus Walleij GPMI_D06 = PINID(0, 6), 26*edad3b2aSLinus Walleij GPMI_D07 = PINID(0, 7), 27*edad3b2aSLinus Walleij GPMI_CE0N = PINID(0, 16), 28*edad3b2aSLinus Walleij GPMI_CE1N = PINID(0, 17), 29*edad3b2aSLinus Walleij GPMI_CE2N = PINID(0, 18), 30*edad3b2aSLinus Walleij GPMI_CE3N = PINID(0, 19), 31*edad3b2aSLinus Walleij GPMI_RDY0 = PINID(0, 20), 32*edad3b2aSLinus Walleij GPMI_RDY1 = PINID(0, 21), 33*edad3b2aSLinus Walleij GPMI_RDY2 = PINID(0, 22), 34*edad3b2aSLinus Walleij GPMI_RDY3 = PINID(0, 23), 35*edad3b2aSLinus Walleij GPMI_RDN = PINID(0, 24), 36*edad3b2aSLinus Walleij GPMI_WRN = PINID(0, 25), 37*edad3b2aSLinus Walleij GPMI_ALE = PINID(0, 26), 38*edad3b2aSLinus Walleij GPMI_CLE = PINID(0, 27), 39*edad3b2aSLinus Walleij GPMI_RESETN = PINID(0, 28), 40*edad3b2aSLinus Walleij LCD_D00 = PINID(1, 0), 41*edad3b2aSLinus Walleij LCD_D01 = PINID(1, 1), 42*edad3b2aSLinus Walleij LCD_D02 = PINID(1, 2), 43*edad3b2aSLinus Walleij LCD_D03 = PINID(1, 3), 44*edad3b2aSLinus Walleij LCD_D04 = PINID(1, 4), 45*edad3b2aSLinus Walleij LCD_D05 = PINID(1, 5), 46*edad3b2aSLinus Walleij LCD_D06 = PINID(1, 6), 47*edad3b2aSLinus Walleij LCD_D07 = PINID(1, 7), 48*edad3b2aSLinus Walleij LCD_D08 = PINID(1, 8), 49*edad3b2aSLinus Walleij LCD_D09 = PINID(1, 9), 50*edad3b2aSLinus Walleij LCD_D10 = PINID(1, 10), 51*edad3b2aSLinus Walleij LCD_D11 = PINID(1, 11), 52*edad3b2aSLinus Walleij LCD_D12 = PINID(1, 12), 53*edad3b2aSLinus Walleij LCD_D13 = PINID(1, 13), 54*edad3b2aSLinus Walleij LCD_D14 = PINID(1, 14), 55*edad3b2aSLinus Walleij LCD_D15 = PINID(1, 15), 56*edad3b2aSLinus Walleij LCD_D16 = PINID(1, 16), 57*edad3b2aSLinus Walleij LCD_D17 = PINID(1, 17), 58*edad3b2aSLinus Walleij LCD_D18 = PINID(1, 18), 59*edad3b2aSLinus Walleij LCD_D19 = PINID(1, 19), 60*edad3b2aSLinus Walleij LCD_D20 = PINID(1, 20), 61*edad3b2aSLinus Walleij LCD_D21 = PINID(1, 21), 62*edad3b2aSLinus Walleij LCD_D22 = PINID(1, 22), 63*edad3b2aSLinus Walleij LCD_D23 = PINID(1, 23), 64*edad3b2aSLinus Walleij LCD_RD_E = PINID(1, 24), 65*edad3b2aSLinus Walleij LCD_WR_RWN = PINID(1, 25), 66*edad3b2aSLinus Walleij LCD_RS = PINID(1, 26), 67*edad3b2aSLinus Walleij LCD_CS = PINID(1, 27), 68*edad3b2aSLinus Walleij LCD_VSYNC = PINID(1, 28), 69*edad3b2aSLinus Walleij LCD_HSYNC = PINID(1, 29), 70*edad3b2aSLinus Walleij LCD_DOTCLK = PINID(1, 30), 71*edad3b2aSLinus Walleij LCD_ENABLE = PINID(1, 31), 72*edad3b2aSLinus Walleij SSP0_DATA0 = PINID(2, 0), 73*edad3b2aSLinus Walleij SSP0_DATA1 = PINID(2, 1), 74*edad3b2aSLinus Walleij SSP0_DATA2 = PINID(2, 2), 75*edad3b2aSLinus Walleij SSP0_DATA3 = PINID(2, 3), 76*edad3b2aSLinus Walleij SSP0_DATA4 = PINID(2, 4), 77*edad3b2aSLinus Walleij SSP0_DATA5 = PINID(2, 5), 78*edad3b2aSLinus Walleij SSP0_DATA6 = PINID(2, 6), 79*edad3b2aSLinus Walleij SSP0_DATA7 = PINID(2, 7), 80*edad3b2aSLinus Walleij SSP0_CMD = PINID(2, 8), 81*edad3b2aSLinus Walleij SSP0_DETECT = PINID(2, 9), 82*edad3b2aSLinus Walleij SSP0_SCK = PINID(2, 10), 83*edad3b2aSLinus Walleij SSP1_SCK = PINID(2, 12), 84*edad3b2aSLinus Walleij SSP1_CMD = PINID(2, 13), 85*edad3b2aSLinus Walleij SSP1_DATA0 = PINID(2, 14), 86*edad3b2aSLinus Walleij SSP1_DATA3 = PINID(2, 15), 87*edad3b2aSLinus Walleij SSP2_SCK = PINID(2, 16), 88*edad3b2aSLinus Walleij SSP2_MOSI = PINID(2, 17), 89*edad3b2aSLinus Walleij SSP2_MISO = PINID(2, 18), 90*edad3b2aSLinus Walleij SSP2_SS0 = PINID(2, 19), 91*edad3b2aSLinus Walleij SSP2_SS1 = PINID(2, 20), 92*edad3b2aSLinus Walleij SSP2_SS2 = PINID(2, 21), 93*edad3b2aSLinus Walleij SSP3_SCK = PINID(2, 24), 94*edad3b2aSLinus Walleij SSP3_MOSI = PINID(2, 25), 95*edad3b2aSLinus Walleij SSP3_MISO = PINID(2, 26), 96*edad3b2aSLinus Walleij SSP3_SS0 = PINID(2, 27), 97*edad3b2aSLinus Walleij AUART0_RX = PINID(3, 0), 98*edad3b2aSLinus Walleij AUART0_TX = PINID(3, 1), 99*edad3b2aSLinus Walleij AUART0_CTS = PINID(3, 2), 100*edad3b2aSLinus Walleij AUART0_RTS = PINID(3, 3), 101*edad3b2aSLinus Walleij AUART1_RX = PINID(3, 4), 102*edad3b2aSLinus Walleij AUART1_TX = PINID(3, 5), 103*edad3b2aSLinus Walleij AUART1_CTS = PINID(3, 6), 104*edad3b2aSLinus Walleij AUART1_RTS = PINID(3, 7), 105*edad3b2aSLinus Walleij AUART2_RX = PINID(3, 8), 106*edad3b2aSLinus Walleij AUART2_TX = PINID(3, 9), 107*edad3b2aSLinus Walleij AUART2_CTS = PINID(3, 10), 108*edad3b2aSLinus Walleij AUART2_RTS = PINID(3, 11), 109*edad3b2aSLinus Walleij AUART3_RX = PINID(3, 12), 110*edad3b2aSLinus Walleij AUART3_TX = PINID(3, 13), 111*edad3b2aSLinus Walleij AUART3_CTS = PINID(3, 14), 112*edad3b2aSLinus Walleij AUART3_RTS = PINID(3, 15), 113*edad3b2aSLinus Walleij PWM0 = PINID(3, 16), 114*edad3b2aSLinus Walleij PWM1 = PINID(3, 17), 115*edad3b2aSLinus Walleij PWM2 = PINID(3, 18), 116*edad3b2aSLinus Walleij SAIF0_MCLK = PINID(3, 20), 117*edad3b2aSLinus Walleij SAIF0_LRCLK = PINID(3, 21), 118*edad3b2aSLinus Walleij SAIF0_BITCLK = PINID(3, 22), 119*edad3b2aSLinus Walleij SAIF0_SDATA0 = PINID(3, 23), 120*edad3b2aSLinus Walleij I2C0_SCL = PINID(3, 24), 121*edad3b2aSLinus Walleij I2C0_SDA = PINID(3, 25), 122*edad3b2aSLinus Walleij SAIF1_SDATA0 = PINID(3, 26), 123*edad3b2aSLinus Walleij SPDIF = PINID(3, 27), 124*edad3b2aSLinus Walleij PWM3 = PINID(3, 28), 125*edad3b2aSLinus Walleij PWM4 = PINID(3, 29), 126*edad3b2aSLinus Walleij LCD_RESET = PINID(3, 30), 127*edad3b2aSLinus Walleij ENET0_MDC = PINID(4, 0), 128*edad3b2aSLinus Walleij ENET0_MDIO = PINID(4, 1), 129*edad3b2aSLinus Walleij ENET0_RX_EN = PINID(4, 2), 130*edad3b2aSLinus Walleij ENET0_RXD0 = PINID(4, 3), 131*edad3b2aSLinus Walleij ENET0_RXD1 = PINID(4, 4), 132*edad3b2aSLinus Walleij ENET0_TX_CLK = PINID(4, 5), 133*edad3b2aSLinus Walleij ENET0_TX_EN = PINID(4, 6), 134*edad3b2aSLinus Walleij ENET0_TXD0 = PINID(4, 7), 135*edad3b2aSLinus Walleij ENET0_TXD1 = PINID(4, 8), 136*edad3b2aSLinus Walleij ENET0_RXD2 = PINID(4, 9), 137*edad3b2aSLinus Walleij ENET0_RXD3 = PINID(4, 10), 138*edad3b2aSLinus Walleij ENET0_TXD2 = PINID(4, 11), 139*edad3b2aSLinus Walleij ENET0_TXD3 = PINID(4, 12), 140*edad3b2aSLinus Walleij ENET0_RX_CLK = PINID(4, 13), 141*edad3b2aSLinus Walleij ENET0_COL = PINID(4, 14), 142*edad3b2aSLinus Walleij ENET0_CRS = PINID(4, 15), 143*edad3b2aSLinus Walleij ENET_CLK = PINID(4, 16), 144*edad3b2aSLinus Walleij JTAG_RTCK = PINID(4, 20), 145*edad3b2aSLinus Walleij EMI_D00 = PINID(5, 0), 146*edad3b2aSLinus Walleij EMI_D01 = PINID(5, 1), 147*edad3b2aSLinus Walleij EMI_D02 = PINID(5, 2), 148*edad3b2aSLinus Walleij EMI_D03 = PINID(5, 3), 149*edad3b2aSLinus Walleij EMI_D04 = PINID(5, 4), 150*edad3b2aSLinus Walleij EMI_D05 = PINID(5, 5), 151*edad3b2aSLinus Walleij EMI_D06 = PINID(5, 6), 152*edad3b2aSLinus Walleij EMI_D07 = PINID(5, 7), 153*edad3b2aSLinus Walleij EMI_D08 = PINID(5, 8), 154*edad3b2aSLinus Walleij EMI_D09 = PINID(5, 9), 155*edad3b2aSLinus Walleij EMI_D10 = PINID(5, 10), 156*edad3b2aSLinus Walleij EMI_D11 = PINID(5, 11), 157*edad3b2aSLinus Walleij EMI_D12 = PINID(5, 12), 158*edad3b2aSLinus Walleij EMI_D13 = PINID(5, 13), 159*edad3b2aSLinus Walleij EMI_D14 = PINID(5, 14), 160*edad3b2aSLinus Walleij EMI_D15 = PINID(5, 15), 161*edad3b2aSLinus Walleij EMI_ODT0 = PINID(5, 16), 162*edad3b2aSLinus Walleij EMI_DQM0 = PINID(5, 17), 163*edad3b2aSLinus Walleij EMI_ODT1 = PINID(5, 18), 164*edad3b2aSLinus Walleij EMI_DQM1 = PINID(5, 19), 165*edad3b2aSLinus Walleij EMI_DDR_OPEN_FB = PINID(5, 20), 166*edad3b2aSLinus Walleij EMI_CLK = PINID(5, 21), 167*edad3b2aSLinus Walleij EMI_DQS0 = PINID(5, 22), 168*edad3b2aSLinus Walleij EMI_DQS1 = PINID(5, 23), 169*edad3b2aSLinus Walleij EMI_DDR_OPEN = PINID(5, 26), 170*edad3b2aSLinus Walleij EMI_A00 = PINID(6, 0), 171*edad3b2aSLinus Walleij EMI_A01 = PINID(6, 1), 172*edad3b2aSLinus Walleij EMI_A02 = PINID(6, 2), 173*edad3b2aSLinus Walleij EMI_A03 = PINID(6, 3), 174*edad3b2aSLinus Walleij EMI_A04 = PINID(6, 4), 175*edad3b2aSLinus Walleij EMI_A05 = PINID(6, 5), 176*edad3b2aSLinus Walleij EMI_A06 = PINID(6, 6), 177*edad3b2aSLinus Walleij EMI_A07 = PINID(6, 7), 178*edad3b2aSLinus Walleij EMI_A08 = PINID(6, 8), 179*edad3b2aSLinus Walleij EMI_A09 = PINID(6, 9), 180*edad3b2aSLinus Walleij EMI_A10 = PINID(6, 10), 181*edad3b2aSLinus Walleij EMI_A11 = PINID(6, 11), 182*edad3b2aSLinus Walleij EMI_A12 = PINID(6, 12), 183*edad3b2aSLinus Walleij EMI_A13 = PINID(6, 13), 184*edad3b2aSLinus Walleij EMI_A14 = PINID(6, 14), 185*edad3b2aSLinus Walleij EMI_BA0 = PINID(6, 16), 186*edad3b2aSLinus Walleij EMI_BA1 = PINID(6, 17), 187*edad3b2aSLinus Walleij EMI_BA2 = PINID(6, 18), 188*edad3b2aSLinus Walleij EMI_CASN = PINID(6, 19), 189*edad3b2aSLinus Walleij EMI_RASN = PINID(6, 20), 190*edad3b2aSLinus Walleij EMI_WEN = PINID(6, 21), 191*edad3b2aSLinus Walleij EMI_CE0N = PINID(6, 22), 192*edad3b2aSLinus Walleij EMI_CE1N = PINID(6, 23), 193*edad3b2aSLinus Walleij EMI_CKE = PINID(6, 24), 194*edad3b2aSLinus Walleij }; 195*edad3b2aSLinus Walleij 196*edad3b2aSLinus Walleij static const struct pinctrl_pin_desc imx28_pins[] = { 197*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(GPMI_D00), 198*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(GPMI_D01), 199*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(GPMI_D02), 200*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(GPMI_D03), 201*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(GPMI_D04), 202*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(GPMI_D05), 203*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(GPMI_D06), 204*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(GPMI_D07), 205*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(GPMI_CE0N), 206*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(GPMI_CE1N), 207*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(GPMI_CE2N), 208*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(GPMI_CE3N), 209*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(GPMI_RDY0), 210*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(GPMI_RDY1), 211*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(GPMI_RDY2), 212*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(GPMI_RDY3), 213*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(GPMI_RDN), 214*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(GPMI_WRN), 215*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(GPMI_ALE), 216*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(GPMI_CLE), 217*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(GPMI_RESETN), 218*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(LCD_D00), 219*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(LCD_D01), 220*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(LCD_D02), 221*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(LCD_D03), 222*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(LCD_D04), 223*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(LCD_D05), 224*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(LCD_D06), 225*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(LCD_D07), 226*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(LCD_D08), 227*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(LCD_D09), 228*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(LCD_D10), 229*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(LCD_D11), 230*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(LCD_D12), 231*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(LCD_D13), 232*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(LCD_D14), 233*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(LCD_D15), 234*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(LCD_D16), 235*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(LCD_D17), 236*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(LCD_D18), 237*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(LCD_D19), 238*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(LCD_D20), 239*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(LCD_D21), 240*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(LCD_D22), 241*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(LCD_D23), 242*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(LCD_RD_E), 243*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(LCD_WR_RWN), 244*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(LCD_RS), 245*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(LCD_CS), 246*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(LCD_VSYNC), 247*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(LCD_HSYNC), 248*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(LCD_DOTCLK), 249*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(LCD_ENABLE), 250*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(SSP0_DATA0), 251*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(SSP0_DATA1), 252*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(SSP0_DATA2), 253*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(SSP0_DATA3), 254*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(SSP0_DATA4), 255*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(SSP0_DATA5), 256*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(SSP0_DATA6), 257*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(SSP0_DATA7), 258*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(SSP0_CMD), 259*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(SSP0_DETECT), 260*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(SSP0_SCK), 261*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(SSP1_SCK), 262*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(SSP1_CMD), 263*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(SSP1_DATA0), 264*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(SSP1_DATA3), 265*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(SSP2_SCK), 266*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(SSP2_MOSI), 267*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(SSP2_MISO), 268*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(SSP2_SS0), 269*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(SSP2_SS1), 270*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(SSP2_SS2), 271*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(SSP3_SCK), 272*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(SSP3_MOSI), 273*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(SSP3_MISO), 274*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(SSP3_SS0), 275*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(AUART0_RX), 276*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(AUART0_TX), 277*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(AUART0_CTS), 278*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(AUART0_RTS), 279*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(AUART1_RX), 280*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(AUART1_TX), 281*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(AUART1_CTS), 282*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(AUART1_RTS), 283*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(AUART2_RX), 284*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(AUART2_TX), 285*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(AUART2_CTS), 286*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(AUART2_RTS), 287*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(AUART3_RX), 288*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(AUART3_TX), 289*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(AUART3_CTS), 290*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(AUART3_RTS), 291*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(PWM0), 292*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(PWM1), 293*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(PWM2), 294*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(SAIF0_MCLK), 295*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(SAIF0_LRCLK), 296*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(SAIF0_BITCLK), 297*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(SAIF0_SDATA0), 298*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(I2C0_SCL), 299*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(I2C0_SDA), 300*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(SAIF1_SDATA0), 301*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(SPDIF), 302*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(PWM3), 303*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(PWM4), 304*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(LCD_RESET), 305*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(ENET0_MDC), 306*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(ENET0_MDIO), 307*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(ENET0_RX_EN), 308*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(ENET0_RXD0), 309*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(ENET0_RXD1), 310*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(ENET0_TX_CLK), 311*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(ENET0_TX_EN), 312*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(ENET0_TXD0), 313*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(ENET0_TXD1), 314*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(ENET0_RXD2), 315*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(ENET0_RXD3), 316*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(ENET0_TXD2), 317*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(ENET0_TXD3), 318*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(ENET0_RX_CLK), 319*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(ENET0_COL), 320*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(ENET0_CRS), 321*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(ENET_CLK), 322*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(JTAG_RTCK), 323*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(EMI_D00), 324*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(EMI_D01), 325*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(EMI_D02), 326*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(EMI_D03), 327*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(EMI_D04), 328*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(EMI_D05), 329*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(EMI_D06), 330*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(EMI_D07), 331*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(EMI_D08), 332*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(EMI_D09), 333*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(EMI_D10), 334*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(EMI_D11), 335*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(EMI_D12), 336*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(EMI_D13), 337*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(EMI_D14), 338*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(EMI_D15), 339*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(EMI_ODT0), 340*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(EMI_DQM0), 341*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(EMI_ODT1), 342*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(EMI_DQM1), 343*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(EMI_DDR_OPEN_FB), 344*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(EMI_CLK), 345*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(EMI_DQS0), 346*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(EMI_DQS1), 347*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(EMI_DDR_OPEN), 348*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(EMI_A00), 349*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(EMI_A01), 350*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(EMI_A02), 351*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(EMI_A03), 352*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(EMI_A04), 353*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(EMI_A05), 354*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(EMI_A06), 355*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(EMI_A07), 356*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(EMI_A08), 357*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(EMI_A09), 358*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(EMI_A10), 359*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(EMI_A11), 360*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(EMI_A12), 361*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(EMI_A13), 362*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(EMI_A14), 363*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(EMI_BA0), 364*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(EMI_BA1), 365*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(EMI_BA2), 366*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(EMI_CASN), 367*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(EMI_RASN), 368*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(EMI_WEN), 369*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(EMI_CE0N), 370*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(EMI_CE1N), 371*edad3b2aSLinus Walleij MXS_PINCTRL_PIN(EMI_CKE), 372*edad3b2aSLinus Walleij }; 373*edad3b2aSLinus Walleij 374*edad3b2aSLinus Walleij static struct mxs_regs imx28_regs = { 375*edad3b2aSLinus Walleij .muxsel = 0x100, 376*edad3b2aSLinus Walleij .drive = 0x300, 377*edad3b2aSLinus Walleij .pull = 0x600, 378*edad3b2aSLinus Walleij }; 379*edad3b2aSLinus Walleij 380*edad3b2aSLinus Walleij static struct mxs_pinctrl_soc_data imx28_pinctrl_data = { 381*edad3b2aSLinus Walleij .regs = &imx28_regs, 382*edad3b2aSLinus Walleij .pins = imx28_pins, 383*edad3b2aSLinus Walleij .npins = ARRAY_SIZE(imx28_pins), 384*edad3b2aSLinus Walleij }; 385*edad3b2aSLinus Walleij 386*edad3b2aSLinus Walleij static int imx28_pinctrl_probe(struct platform_device *pdev) 387*edad3b2aSLinus Walleij { 388*edad3b2aSLinus Walleij return mxs_pinctrl_probe(pdev, &imx28_pinctrl_data); 389*edad3b2aSLinus Walleij } 390*edad3b2aSLinus Walleij 391*edad3b2aSLinus Walleij static const struct of_device_id imx28_pinctrl_of_match[] = { 392*edad3b2aSLinus Walleij { .compatible = "fsl,imx28-pinctrl", }, 393*edad3b2aSLinus Walleij { /* sentinel */ } 394*edad3b2aSLinus Walleij }; 395*edad3b2aSLinus Walleij MODULE_DEVICE_TABLE(of, imx28_pinctrl_of_match); 396*edad3b2aSLinus Walleij 397*edad3b2aSLinus Walleij static struct platform_driver imx28_pinctrl_driver = { 398*edad3b2aSLinus Walleij .driver = { 399*edad3b2aSLinus Walleij .name = "imx28-pinctrl", 400*edad3b2aSLinus Walleij .owner = THIS_MODULE, 401*edad3b2aSLinus Walleij .of_match_table = imx28_pinctrl_of_match, 402*edad3b2aSLinus Walleij }, 403*edad3b2aSLinus Walleij .probe = imx28_pinctrl_probe, 404*edad3b2aSLinus Walleij .remove = mxs_pinctrl_remove, 405*edad3b2aSLinus Walleij }; 406*edad3b2aSLinus Walleij 407*edad3b2aSLinus Walleij static int __init imx28_pinctrl_init(void) 408*edad3b2aSLinus Walleij { 409*edad3b2aSLinus Walleij return platform_driver_register(&imx28_pinctrl_driver); 410*edad3b2aSLinus Walleij } 411*edad3b2aSLinus Walleij postcore_initcall(imx28_pinctrl_init); 412*edad3b2aSLinus Walleij 413*edad3b2aSLinus Walleij static void __exit imx28_pinctrl_exit(void) 414*edad3b2aSLinus Walleij { 415*edad3b2aSLinus Walleij platform_driver_unregister(&imx28_pinctrl_driver); 416*edad3b2aSLinus Walleij } 417*edad3b2aSLinus Walleij module_exit(imx28_pinctrl_exit); 418*edad3b2aSLinus Walleij 419*edad3b2aSLinus Walleij MODULE_AUTHOR("Shawn Guo <shawn.guo@linaro.org>"); 420*edad3b2aSLinus Walleij MODULE_DESCRIPTION("Freescale i.MX28 pinctrl driver"); 421*edad3b2aSLinus Walleij MODULE_LICENSE("GPL v2"); 422