Cyril Chemparathy | 692a7af | 2010-06-07 14:13:32 -0400 | [diff] [blame] | 1 | /* |
| 2 | * TNETV107X: Pinmux APIs |
| 3 | * |
Wolfgang Denk | d79de1d | 2013-07-08 09:37:19 +0200 | [diff] [blame^] | 4 | * SPDX-License-Identifier: GPL-2.0+ |
Cyril Chemparathy | 692a7af | 2010-06-07 14:13:32 -0400 | [diff] [blame] | 5 | */ |
| 6 | |
| 7 | #ifndef __ASM_ARCH_MUX_H |
| 8 | #define __ASM_ARCH_MUX_H |
| 9 | |
| 10 | struct pin_config { |
| 11 | unsigned char reg_index; |
| 12 | unsigned char mask_offset; |
| 13 | unsigned char mode; |
| 14 | }; |
| 15 | |
| 16 | #define TNETV107X_MUX_CFG(reg, offset, mux_mode) \ |
| 17 | { reg, offset, mux_mode } |
| 18 | |
| 19 | int mux_select_pin(short index); |
| 20 | int mux_select_pins(const short *pins); |
| 21 | |
| 22 | enum tnetv107x_pin_mux_index { |
| 23 | TNETV107X_PIN_ASR_A00, |
| 24 | TNETV107X_PIN_GPIO32, |
| 25 | TNETV107X_PIN_ASR_A01, |
| 26 | TNETV107X_PIN_GPIO33, |
| 27 | TNETV107X_PIN_ASR_A02, |
| 28 | TNETV107X_PIN_GPIO34, |
| 29 | TNETV107X_PIN_ASR_A03, |
| 30 | TNETV107X_PIN_GPIO35, |
| 31 | TNETV107X_PIN_ASR_A04, |
| 32 | TNETV107X_PIN_GPIO36, |
| 33 | TNETV107X_PIN_ASR_A05, |
| 34 | TNETV107X_PIN_GPIO37, |
| 35 | TNETV107X_PIN_ASR_A06, |
| 36 | TNETV107X_PIN_GPIO38, |
| 37 | TNETV107X_PIN_ASR_A07, |
| 38 | TNETV107X_PIN_GPIO39, |
| 39 | TNETV107X_PIN_ASR_A08, |
| 40 | TNETV107X_PIN_GPIO40, |
| 41 | TNETV107X_PIN_ASR_A09, |
| 42 | TNETV107X_PIN_GPIO41, |
| 43 | TNETV107X_PIN_ASR_A10, |
| 44 | TNETV107X_PIN_GPIO42, |
| 45 | TNETV107X_PIN_ASR_A11, |
| 46 | TNETV107X_PIN_BOOT_STRP_0, |
| 47 | TNETV107X_PIN_ASR_A12, |
| 48 | TNETV107X_PIN_BOOT_STRP_1, |
| 49 | TNETV107X_PIN_ASR_A13, |
| 50 | TNETV107X_PIN_GPIO43, |
| 51 | TNETV107X_PIN_ASR_A14, |
| 52 | TNETV107X_PIN_GPIO44, |
| 53 | TNETV107X_PIN_ASR_A15, |
| 54 | TNETV107X_PIN_GPIO45, |
| 55 | TNETV107X_PIN_ASR_A16, |
| 56 | TNETV107X_PIN_GPIO46, |
| 57 | TNETV107X_PIN_ASR_A17, |
| 58 | TNETV107X_PIN_GPIO47, |
| 59 | TNETV107X_PIN_ASR_A18, |
| 60 | TNETV107X_PIN_GPIO48, |
| 61 | TNETV107X_PIN_SDIO1_DATA3_0, |
| 62 | TNETV107X_PIN_ASR_A19, |
| 63 | TNETV107X_PIN_GPIO49, |
| 64 | TNETV107X_PIN_SDIO1_DATA2_0, |
| 65 | TNETV107X_PIN_ASR_A20, |
| 66 | TNETV107X_PIN_GPIO50, |
| 67 | TNETV107X_PIN_SDIO1_DATA1_0, |
| 68 | TNETV107X_PIN_ASR_A21, |
| 69 | TNETV107X_PIN_GPIO51, |
| 70 | TNETV107X_PIN_SDIO1_DATA0_0, |
| 71 | TNETV107X_PIN_ASR_A22, |
| 72 | TNETV107X_PIN_GPIO52, |
| 73 | TNETV107X_PIN_SDIO1_CMD_0, |
| 74 | TNETV107X_PIN_ASR_A23, |
| 75 | TNETV107X_PIN_GPIO53, |
| 76 | TNETV107X_PIN_SDIO1_CLK_0, |
| 77 | TNETV107X_PIN_ASR_BA_1, |
| 78 | TNETV107X_PIN_GPIO54, |
| 79 | TNETV107X_PIN_SYS_PLL_CLK, |
| 80 | TNETV107X_PIN_ASR_CS0, |
| 81 | TNETV107X_PIN_ASR_CS1, |
| 82 | TNETV107X_PIN_ASR_CS2, |
| 83 | TNETV107X_PIN_TDM_PLL_CLK, |
| 84 | TNETV107X_PIN_ASR_CS3, |
| 85 | TNETV107X_PIN_ETH_PHY_CLK, |
| 86 | TNETV107X_PIN_ASR_D00, |
| 87 | TNETV107X_PIN_GPIO55, |
| 88 | TNETV107X_PIN_ASR_D01, |
| 89 | TNETV107X_PIN_GPIO56, |
| 90 | TNETV107X_PIN_ASR_D02, |
| 91 | TNETV107X_PIN_GPIO57, |
| 92 | TNETV107X_PIN_ASR_D03, |
| 93 | TNETV107X_PIN_GPIO58, |
| 94 | TNETV107X_PIN_ASR_D04, |
| 95 | TNETV107X_PIN_GPIO59_0, |
| 96 | TNETV107X_PIN_ASR_D05, |
| 97 | TNETV107X_PIN_GPIO60_0, |
| 98 | TNETV107X_PIN_ASR_D06, |
| 99 | TNETV107X_PIN_GPIO61_0, |
| 100 | TNETV107X_PIN_ASR_D07, |
| 101 | TNETV107X_PIN_GPIO62_0, |
| 102 | TNETV107X_PIN_ASR_D08, |
| 103 | TNETV107X_PIN_GPIO63_0, |
| 104 | TNETV107X_PIN_ASR_D09, |
| 105 | TNETV107X_PIN_GPIO64_0, |
| 106 | TNETV107X_PIN_ASR_D10, |
| 107 | TNETV107X_PIN_SDIO1_DATA3_1, |
| 108 | TNETV107X_PIN_ASR_D11, |
| 109 | TNETV107X_PIN_SDIO1_DATA2_1, |
| 110 | TNETV107X_PIN_ASR_D12, |
| 111 | TNETV107X_PIN_SDIO1_DATA1_1, |
| 112 | TNETV107X_PIN_ASR_D13, |
| 113 | TNETV107X_PIN_SDIO1_DATA0_1, |
| 114 | TNETV107X_PIN_ASR_D14, |
| 115 | TNETV107X_PIN_SDIO1_CMD_1, |
| 116 | TNETV107X_PIN_ASR_D15, |
| 117 | TNETV107X_PIN_SDIO1_CLK_1, |
| 118 | TNETV107X_PIN_ASR_OE, |
| 119 | TNETV107X_PIN_BOOT_STRP_2, |
| 120 | TNETV107X_PIN_ASR_RNW, |
| 121 | TNETV107X_PIN_GPIO29_0, |
| 122 | TNETV107X_PIN_ASR_WAIT, |
| 123 | TNETV107X_PIN_GPIO30_0, |
| 124 | TNETV107X_PIN_ASR_WE, |
| 125 | TNETV107X_PIN_BOOT_STRP_3, |
| 126 | TNETV107X_PIN_ASR_WE_DQM0, |
| 127 | TNETV107X_PIN_GPIO31, |
| 128 | TNETV107X_PIN_LCD_PD17_0, |
| 129 | TNETV107X_PIN_ASR_WE_DQM1, |
| 130 | TNETV107X_PIN_ASR_BA0_0, |
| 131 | TNETV107X_PIN_VLYNQ_CLK, |
| 132 | TNETV107X_PIN_GPIO14, |
| 133 | TNETV107X_PIN_LCD_PD19_0, |
| 134 | TNETV107X_PIN_VLYNQ_RXD0, |
| 135 | TNETV107X_PIN_GPIO15, |
| 136 | TNETV107X_PIN_LCD_PD20_0, |
| 137 | TNETV107X_PIN_VLYNQ_RXD1, |
| 138 | TNETV107X_PIN_GPIO16, |
| 139 | TNETV107X_PIN_LCD_PD21_0, |
| 140 | TNETV107X_PIN_VLYNQ_TXD0, |
| 141 | TNETV107X_PIN_GPIO17, |
| 142 | TNETV107X_PIN_LCD_PD22_0, |
| 143 | TNETV107X_PIN_VLYNQ_TXD1, |
| 144 | TNETV107X_PIN_GPIO18, |
| 145 | TNETV107X_PIN_LCD_PD23_0, |
| 146 | TNETV107X_PIN_SDIO0_CLK, |
| 147 | TNETV107X_PIN_GPIO19, |
| 148 | TNETV107X_PIN_SDIO0_CMD, |
| 149 | TNETV107X_PIN_GPIO20, |
| 150 | TNETV107X_PIN_SDIO0_DATA0, |
| 151 | TNETV107X_PIN_GPIO21, |
| 152 | TNETV107X_PIN_SDIO0_DATA1, |
| 153 | TNETV107X_PIN_GPIO22, |
| 154 | TNETV107X_PIN_SDIO0_DATA2, |
| 155 | TNETV107X_PIN_GPIO23, |
| 156 | TNETV107X_PIN_SDIO0_DATA3, |
| 157 | TNETV107X_PIN_GPIO24, |
| 158 | TNETV107X_PIN_EMU0, |
| 159 | TNETV107X_PIN_EMU1, |
| 160 | TNETV107X_PIN_RTCK, |
| 161 | TNETV107X_PIN_TRST_N, |
| 162 | TNETV107X_PIN_TCK, |
| 163 | TNETV107X_PIN_TDI, |
| 164 | TNETV107X_PIN_TDO, |
| 165 | TNETV107X_PIN_TMS, |
| 166 | TNETV107X_PIN_TDM1_CLK, |
| 167 | TNETV107X_PIN_TDM1_RX, |
| 168 | TNETV107X_PIN_TDM1_TX, |
| 169 | TNETV107X_PIN_TDM1_FS, |
| 170 | TNETV107X_PIN_KEYPAD_R0, |
| 171 | TNETV107X_PIN_KEYPAD_R1, |
| 172 | TNETV107X_PIN_KEYPAD_R2, |
| 173 | TNETV107X_PIN_KEYPAD_R3, |
| 174 | TNETV107X_PIN_KEYPAD_R4, |
| 175 | TNETV107X_PIN_KEYPAD_R5, |
| 176 | TNETV107X_PIN_KEYPAD_R6, |
| 177 | TNETV107X_PIN_GPIO12, |
| 178 | TNETV107X_PIN_KEYPAD_R7, |
| 179 | TNETV107X_PIN_GPIO10, |
| 180 | TNETV107X_PIN_KEYPAD_C0, |
| 181 | TNETV107X_PIN_KEYPAD_C1, |
| 182 | TNETV107X_PIN_KEYPAD_C2, |
| 183 | TNETV107X_PIN_KEYPAD_C3, |
| 184 | TNETV107X_PIN_KEYPAD_C4, |
| 185 | TNETV107X_PIN_KEYPAD_C5, |
| 186 | TNETV107X_PIN_KEYPAD_C6, |
| 187 | TNETV107X_PIN_GPIO13, |
| 188 | TNETV107X_PIN_TEST_CLK_IN, |
| 189 | TNETV107X_PIN_KEYPAD_C7, |
| 190 | TNETV107X_PIN_GPIO11, |
| 191 | TNETV107X_PIN_SSP0_0, |
| 192 | TNETV107X_PIN_SCC_DCLK, |
| 193 | TNETV107X_PIN_LCD_PD20_1, |
| 194 | TNETV107X_PIN_SSP0_1, |
| 195 | TNETV107X_PIN_SCC_CS_N, |
| 196 | TNETV107X_PIN_LCD_PD21_1, |
| 197 | TNETV107X_PIN_SSP0_2, |
| 198 | TNETV107X_PIN_SCC_D, |
| 199 | TNETV107X_PIN_LCD_PD22_1, |
| 200 | TNETV107X_PIN_SSP0_3, |
| 201 | TNETV107X_PIN_SCC_RESETN, |
| 202 | TNETV107X_PIN_LCD_PD23_1, |
| 203 | TNETV107X_PIN_SSP1_0, |
| 204 | TNETV107X_PIN_GPIO25, |
| 205 | TNETV107X_PIN_UART2_CTS, |
| 206 | TNETV107X_PIN_SSP1_1, |
| 207 | TNETV107X_PIN_GPIO26, |
| 208 | TNETV107X_PIN_UART2_RD, |
| 209 | TNETV107X_PIN_SSP1_2, |
| 210 | TNETV107X_PIN_GPIO27, |
| 211 | TNETV107X_PIN_UART2_RTS, |
| 212 | TNETV107X_PIN_SSP1_3, |
| 213 | TNETV107X_PIN_GPIO28, |
| 214 | TNETV107X_PIN_UART2_TD, |
| 215 | TNETV107X_PIN_UART0_CTS, |
| 216 | TNETV107X_PIN_UART0_RD, |
| 217 | TNETV107X_PIN_UART0_RTS, |
| 218 | TNETV107X_PIN_UART0_TD, |
| 219 | TNETV107X_PIN_UART1_RD, |
| 220 | TNETV107X_PIN_UART1_TD, |
| 221 | TNETV107X_PIN_LCD_AC_NCS, |
| 222 | TNETV107X_PIN_LCD_HSYNC_RNW, |
| 223 | TNETV107X_PIN_LCD_VSYNC_A0, |
| 224 | TNETV107X_PIN_LCD_MCLK, |
| 225 | TNETV107X_PIN_LCD_PD16_0, |
| 226 | TNETV107X_PIN_LCD_PCLK_E, |
| 227 | TNETV107X_PIN_LCD_PD00, |
| 228 | TNETV107X_PIN_LCD_PD01, |
| 229 | TNETV107X_PIN_LCD_PD02, |
| 230 | TNETV107X_PIN_LCD_PD03, |
| 231 | TNETV107X_PIN_LCD_PD04, |
| 232 | TNETV107X_PIN_LCD_PD05, |
| 233 | TNETV107X_PIN_LCD_PD06, |
| 234 | TNETV107X_PIN_LCD_PD07, |
| 235 | TNETV107X_PIN_LCD_PD08, |
| 236 | TNETV107X_PIN_GPIO59_1, |
| 237 | TNETV107X_PIN_LCD_PD09, |
| 238 | TNETV107X_PIN_GPIO60_1, |
| 239 | TNETV107X_PIN_LCD_PD10, |
| 240 | TNETV107X_PIN_ASR_BA0_1, |
| 241 | TNETV107X_PIN_GPIO61_1, |
| 242 | TNETV107X_PIN_LCD_PD11, |
| 243 | TNETV107X_PIN_GPIO62_1, |
| 244 | TNETV107X_PIN_LCD_PD12, |
| 245 | TNETV107X_PIN_GPIO63_1, |
| 246 | TNETV107X_PIN_LCD_PD13, |
| 247 | TNETV107X_PIN_GPIO64_1, |
| 248 | TNETV107X_PIN_LCD_PD14, |
| 249 | TNETV107X_PIN_GPIO29_1, |
| 250 | TNETV107X_PIN_LCD_PD15, |
| 251 | TNETV107X_PIN_GPIO30_1, |
| 252 | TNETV107X_PIN_EINT0, |
| 253 | TNETV107X_PIN_GPIO08, |
| 254 | TNETV107X_PIN_EINT1, |
| 255 | TNETV107X_PIN_GPIO09, |
| 256 | TNETV107X_PIN_GPIO00, |
| 257 | TNETV107X_PIN_LCD_PD20_2, |
| 258 | TNETV107X_PIN_TDM_CLK_IN_2, |
| 259 | TNETV107X_PIN_GPIO01, |
| 260 | TNETV107X_PIN_LCD_PD21_2, |
| 261 | TNETV107X_PIN_24M_CLK_OUT_1, |
| 262 | TNETV107X_PIN_GPIO02, |
| 263 | TNETV107X_PIN_LCD_PD22_2, |
| 264 | TNETV107X_PIN_GPIO03, |
| 265 | TNETV107X_PIN_LCD_PD23_2, |
| 266 | TNETV107X_PIN_GPIO04, |
| 267 | TNETV107X_PIN_LCD_PD16_1, |
| 268 | TNETV107X_PIN_USB0_RXERR, |
| 269 | TNETV107X_PIN_GPIO05, |
| 270 | TNETV107X_PIN_LCD_PD17_1, |
| 271 | TNETV107X_PIN_TDM_CLK_IN_1, |
| 272 | TNETV107X_PIN_GPIO06, |
| 273 | TNETV107X_PIN_LCD_PD18, |
| 274 | TNETV107X_PIN_24M_CLK_OUT_2, |
| 275 | TNETV107X_PIN_GPIO07, |
| 276 | TNETV107X_PIN_LCD_PD19_1, |
| 277 | TNETV107X_PIN_USB1_RXERR, |
| 278 | TNETV107X_PIN_ETH_PLL_CLK, |
| 279 | TNETV107X_PIN_MDIO, |
| 280 | TNETV107X_PIN_MDC, |
| 281 | TNETV107X_PIN_AIC_MUTE_STAT_N, |
| 282 | TNETV107X_PIN_TDM0_CLK, |
| 283 | TNETV107X_PIN_AIC_HNS_EN_N, |
| 284 | TNETV107X_PIN_TDM0_FS, |
| 285 | TNETV107X_PIN_AIC_HDS_EN_STAT_N, |
| 286 | TNETV107X_PIN_TDM0_TX, |
| 287 | TNETV107X_PIN_AIC_HNF_EN_STAT_N, |
| 288 | TNETV107X_PIN_TDM0_RX, |
| 289 | }; |
| 290 | |
| 291 | #endif |