Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Vitaly Andrianov | 680ec77 | 2015-09-19 16:26:45 +0530 | [diff] [blame] | 2 | /* |
| 3 | * K2G EVM: Pinmux configuration |
| 4 | * |
| 5 | * (C) Copyright 2015 |
| 6 | * Texas Instruments Incorporated, <www.ti.com> |
Vitaly Andrianov | 680ec77 | 2015-09-19 16:26:45 +0530 | [diff] [blame] | 7 | */ |
| 8 | |
Simon Glass | f11478f | 2019-12-28 10:45:07 -0700 | [diff] [blame] | 9 | #include <hang.h> |
Vitaly Andrianov | 680ec77 | 2015-09-19 16:26:45 +0530 | [diff] [blame] | 10 | #include <asm/io.h> |
| 11 | #include <asm/arch/mux-k2g.h> |
| 12 | #include <asm/arch/hardware.h> |
Cooper Jr., Franklin | f4bfac8 | 2017-06-16 17:25:23 -0500 | [diff] [blame] | 13 | #include "board.h" |
| 14 | |
| 15 | struct pin_cfg k2g_generic_pin_cfg[] = { |
| 16 | /* UART0 */ |
| 17 | { 115, MODE(0) }, /* SOC_UART0_RXD */ |
| 18 | { 116, MODE(0) }, /* SOC_UART0_TXD */ |
| 19 | |
| 20 | /* I2C 0 */ |
| 21 | { 223, MODE(0) }, /* SOC_I2C0_SCL */ |
| 22 | { 224, MODE(0) }, /* SOC_I2C0_SDA */ |
| 23 | |
| 24 | /* I2C 1 */ |
| 25 | { 225, MODE(0) }, /* SOC_I2C1_SCL */ |
| 26 | { 226, MODE(0) }, /* SOC_I2C1_SDA */ |
| 27 | { MAX_PIN_N, } |
| 28 | }; |
Vitaly Andrianov | 680ec77 | 2015-09-19 16:26:45 +0530 | [diff] [blame] | 29 | |
| 30 | struct pin_cfg k2g_evm_pin_cfg[] = { |
| 31 | /* GPMC */ |
| 32 | { 0, MODE(0) }, /* GPMCAD0 */ |
| 33 | { 1, MODE(0) }, /* GPMCAD1 */ |
| 34 | { 2, MODE(0) }, /* GPMCAD2 */ |
| 35 | { 3, MODE(0) }, /* GPMCAD3 */ |
| 36 | { 4, MODE(0) }, /* GPMCAD4 */ |
| 37 | { 5, MODE(0) }, /* GPMCAD5 */ |
| 38 | { 6, MODE(0) }, /* GPMCAD6 */ |
| 39 | { 7, MODE(0) }, /* GPMCAD7 */ |
| 40 | { 8, MODE(0) }, /* GPMCAD8 */ |
| 41 | { 9, MODE(0) }, /* GPMCAD9 */ |
| 42 | { 10, MODE(0) }, /* GPMCAD10 */ |
| 43 | { 11, MODE(0) }, /* GPMCAD11 */ |
| 44 | { 12, MODE(0) }, /* GPMCAD12 */ |
| 45 | { 13, MODE(0) }, /* GPMCAD13 */ |
| 46 | { 14, MODE(0) }, /* GPMCAD14 */ |
| 47 | { 15, MODE(0) }, /* GPMCAD15 */ |
| 48 | { 17, MODE(0) }, /* GPMCADVNALE */ |
| 49 | { 18, MODE(0) }, /* GPMCOENREN */ |
| 50 | { 19, MODE(0) }, /* GPMCWEN */ |
| 51 | { 20, MODE(0) }, /* GPMCBE0NCLE */ |
| 52 | { 22, MODE(0) }, /* GPMCWAIT0 */ |
| 53 | { 24, MODE(0) }, /* GPMCWPN */ |
| 54 | { 26, MODE(0) }, /* GPMCCSN0 */ |
| 55 | |
| 56 | /* GPIOs */ |
| 57 | { 16, MODE(3) | PIN_IEN }, /* GPIO0_16 - PRSNT1# */ |
| 58 | { 21, MODE(3) | PIN_IEN }, /* GPIO0_21 - DC_BRD_DET */ |
| 59 | { 82, MODE(3) | PIN_IEN }, /* GPIO0_82 - TPS_INT1 */ |
| 60 | { 83, MODE(3) }, /* GPIO0_83 - TPS_SLEEP */ |
| 61 | { 84, MODE(3) }, /* GPIO0_84 - SEL_HDMIn_GPIO */ |
| 62 | { 87, MODE(3) }, /* GPIO0_87 - SD_LP2996A */ |
| 63 | { 106, MODE(3) | PIN_IEN}, /* GPIO0_100 - SOC_INT */ |
| 64 | { 201, MODE(3) | PIN_IEN}, /* GPIO1_26 - GPIO_EXP_INT */ |
| 65 | { 202, MODE(3) }, /* GPIO1_27 - SEL_LCDn_GPIO */ |
| 66 | { 203, MODE(3) | PIN_IEN}, /* GPIO1_28 - SOC_MLB_GPIO2 */ |
| 67 | { 204, MODE(3) | PIN_IEN}, /* GPIO1_29 - SOC_PCIE_WAKEn */ |
| 68 | { 205, MODE(3) | PIN_IEN}, /* GPIO1_30 - BMC_INT1 */ |
| 69 | { 206, MODE(3) | PIN_IEN}, /* GPIO1_31 - HDMI_INTn*/ |
| 70 | { 207, MODE(3) | PIN_IEN}, /* GPIO1_32 - CS2000_AUX_OUT */ |
| 71 | { 208, MODE(3) | PIN_IEN}, /* GPIO1_33 - TEMP_INT */ |
| 72 | { 209, MODE(3) | PIN_IEN}, /* GPIO1_34 - WLAN_IRQ */ |
| 73 | { 216, MODE(3) }, /* GPIO1_41 - FLASH_HOLD */ |
| 74 | { 217, MODE(3) | PIN_IEN}, /* GPIO1_42 - TOUCH_INTn */ |
| 75 | |
| 76 | /* MLB */ |
| 77 | { 23, MODE(2) }, /* SOC_MLBCLK */ |
| 78 | { 25, MODE(2) }, /* SOC_MLBSIG */ |
| 79 | { 27, MODE(2) }, /* SOC_MLBDAT */ |
| 80 | |
| 81 | /* DSS */ |
| 82 | { 30, MODE(0) }, /* SOC_DSSDATA23 */ |
| 83 | { 31, MODE(0) }, /* SOC_DSSDATA22 */ |
| 84 | { 32, MODE(0) }, /* SOC_DSSDATA21 */ |
| 85 | { 33, MODE(0) }, /* SOC_DSSDATA20 */ |
| 86 | { 34, MODE(0) }, /* SOC_DSSDATA19 */ |
| 87 | { 35, MODE(0) }, /* SOC_DSSDATA18 */ |
| 88 | { 36, MODE(0) }, /* SOC_DSSDATA17 */ |
| 89 | { 37, MODE(0) }, /* SOC_DSSDATA16 */ |
| 90 | { 38, MODE(0) }, /* SOC_DSSDATA15 */ |
| 91 | { 39, MODE(0) }, /* SOC_DSSDATA14 */ |
| 92 | { 40, MODE(0) }, /* SOC_DSSDATA13 */ |
| 93 | { 41, MODE(0) }, /* SOC_DSSDATA12 */ |
| 94 | { 42, MODE(0) }, /* SOC_DSSDATA11 */ |
| 95 | { 43, MODE(0) }, /* SOC_DSSDATA10 */ |
| 96 | { 44, MODE(0) }, /* SOC_DSSDATA9 */ |
| 97 | { 45, MODE(0) }, /* SOC_DSSDATA8 */ |
| 98 | { 46, MODE(0) }, /* SOC_DSSDATA7 */ |
| 99 | { 47, MODE(0) }, /* SOC_DSSDATA6 */ |
| 100 | { 48, MODE(0) }, /* SOC_DSSDATA5 */ |
| 101 | { 49, MODE(0) }, /* SOC_DSSDATA4 */ |
| 102 | { 50, MODE(0) }, /* SOC_DSSDATA3 */ |
| 103 | { 51, MODE(0) }, /* SOC_DSSDATA2 */ |
| 104 | { 52, MODE(0) }, /* SOC_DSSDATA1 */ |
| 105 | { 53, MODE(0) }, /* SOC_DSSDATA0 */ |
| 106 | { 54, MODE(0) }, /* SOC_DSSVSYNC */ |
| 107 | { 55, MODE(0) }, /* SOC_DSSHSYNC */ |
| 108 | { 56, MODE(0) }, /* SOC_DSSPCLK */ |
| 109 | { 57, MODE(0) }, /* SOC_DSS_DE */ |
| 110 | { 58, MODE(0) }, /* SOC_DSS_FID */ |
| 111 | { 221, MODE(4) }, /* PWM0 - SOC_BACKLIGHT_PWM */ |
| 112 | |
| 113 | /* MMC1 */ |
| 114 | { 59, MODE(0) }, /* SOC_MMC1_DAT7 */ |
| 115 | { 60, MODE(0) }, /* SOC_MMC1_DAT6 */ |
| 116 | { 61, MODE(0) }, /* SOC_MMC1_DAT5 */ |
| 117 | { 62, MODE(0) }, /* SOC_MMC1_DAT4 */ |
| 118 | { 63, MODE(0) }, /* SOC_MMC1_DAT3 */ |
| 119 | { 64, MODE(0) }, /* SOC_MMC1_DAT2 */ |
| 120 | { 65, MODE(0) }, /* SOC_MMC1_DAT1 */ |
| 121 | { 66, MODE(0) }, /* SOC_MMC1_DAT0 */ |
| 122 | { 67, MODE(0) }, /* SOC_MMC1_CLK */ |
| 123 | { 68, MODE(0) }, /* SOC_MMC1_CMD */ |
| 124 | { 69, MODE(0) }, /* MMC1SDCD TP125 */ |
| 125 | { 70, MODE(0) }, /* SOC_MMC1_SDWP */ |
| 126 | { 71, MODE(0) }, /* MMC1POW TP124 */ |
| 127 | |
Murali Karicheri | 057489c | 2019-02-21 12:02:02 -0500 | [diff] [blame] | 128 | /* EMAC */ |
Murali Karicheri | d7961ab | 2019-02-25 15:27:33 -0500 | [diff] [blame] | 129 | { 72, BUFFER_CLASS_D | PIN_PDIS | MODE(1) }, /* RGMII_RXC */ |
Murali Karicheri | 057489c | 2019-02-21 12:02:02 -0500 | [diff] [blame] | 130 | { 77, BUFFER_CLASS_D | PIN_PDIS | MODE(1) }, /* RGMII_RXD3 */ |
Murali Karicheri | d7961ab | 2019-02-25 15:27:33 -0500 | [diff] [blame] | 131 | { 78, BUFFER_CLASS_D | PIN_PDIS | MODE(1) }, /* RGMII_RXD2 */ |
| 132 | { 79, BUFFER_CLASS_D | PIN_PDIS | MODE(1) }, /* RGMII_RXD1 */ |
Murali Karicheri | 057489c | 2019-02-21 12:02:02 -0500 | [diff] [blame] | 133 | { 80, BUFFER_CLASS_D | PIN_PDIS | MODE(1) }, /* RGMII_RXD0 */ |
Murali Karicheri | d7961ab | 2019-02-25 15:27:33 -0500 | [diff] [blame] | 134 | { 81, BUFFER_CLASS_D | PIN_PDIS | MODE(1) }, /* RGMII_RXCTL */ |
Murali Karicheri | 057489c | 2019-02-21 12:02:02 -0500 | [diff] [blame] | 135 | { 85, BUFFER_CLASS_D | PIN_PDIS | MODE(1) }, /* RGMII_TXC */ |
Murali Karicheri | d7961ab | 2019-02-25 15:27:33 -0500 | [diff] [blame] | 136 | { 91, BUFFER_CLASS_D | PIN_PDIS | MODE(1) }, /* RGMII_TXD3 */ |
| 137 | { 92, BUFFER_CLASS_D | PIN_PDIS | MODE(1) }, /* RGMII_TXD2 */ |
| 138 | { 93, BUFFER_CLASS_D | PIN_PDIS | MODE(1) }, /* RGMII_TXD1 */ |
| 139 | { 94, BUFFER_CLASS_D | PIN_PDIS | MODE(1) }, /* RGMII_TXD0 */ |
Murali Karicheri | 057489c | 2019-02-21 12:02:02 -0500 | [diff] [blame] | 140 | { 95, BUFFER_CLASS_D | PIN_PDIS | MODE(1) }, /* RGMII_TXCTL */ |
Murali Karicheri | 057489c | 2019-02-21 12:02:02 -0500 | [diff] [blame] | 141 | |
| 142 | /* MDIO */ |
Murali Karicheri | 057489c | 2019-02-21 12:02:02 -0500 | [diff] [blame] | 143 | { 98, BUFFER_CLASS_B | PIN_PDIS | MODE(0) }, /* MDIO_DATA */ |
Murali Karicheri | d7961ab | 2019-02-25 15:27:33 -0500 | [diff] [blame] | 144 | { 99, BUFFER_CLASS_B | PIN_PDIS | MODE(0) }, /* MDIO_CLK */ |
Vitaly Andrianov | 680ec77 | 2015-09-19 16:26:45 +0530 | [diff] [blame] | 145 | |
| 146 | /* PWM */ |
| 147 | { 73, MODE(4) }, /* SOC_EHRPWM3A */ |
| 148 | { 74, MODE(4) }, /* SOC_EHRPWM3B */ |
| 149 | { 75, MODE(4) }, /* SOC_EHRPWM3_SYNCI */ |
| 150 | { 76, MODE(4) }, /* SOC_EHRPWM3_SYNCO */ |
| 151 | { 96, MODE(4) }, /* SOC_EHRPWM_TRIPZONE_INPUT3 */ |
| 152 | { 198, MODE(4) }, /* SOC_EHRPWM_TRIPZONE_INPUT4 */ |
| 153 | { 199, MODE(4) }, /* SOC_EHRPWM4A */ |
| 154 | { 200, MODE(4) }, /* SOC_EHRPWM4B */ |
| 155 | { 218, MODE(4) }, /* SOC_EHRPWM_TRIPZONE_INPUT5 */ |
| 156 | { 219, MODE(4) }, /* SOC_EHRPWM5A */ |
| 157 | { 220, MODE(4) }, /* SOC_EHRPWM5B */ |
| 158 | { 222, MODE(4) }, /* SOC_ECAP1_IN_PWM1_OUT */ |
| 159 | |
| 160 | /* SPI3 */ |
| 161 | { 86, MODE(1) }, /* SOC_SPI3_SCS0 */ |
| 162 | { 88, MODE(1) }, /* SOC_SPI3_CLK */ |
| 163 | { 89, MODE(1) }, /* SOC_SPI3_MISO */ |
| 164 | { 90, MODE(1) }, /* SOC_SPI3_MOSI */ |
| 165 | |
| 166 | /* CLK */ |
| 167 | { 97, MODE(0) }, /* SMD - TP132 */ |
| 168 | |
| 169 | /* SPI0 */ |
| 170 | { 100, MODE(0) }, /* SOC_SPI0_SCS0 */ |
| 171 | { 101, MODE(0) }, /* SOC_SPI0_SCS1 */ |
| 172 | { 102, MODE(0) }, /* SOC_SPI0_CLK */ |
| 173 | { 103, MODE(0) }, /* SOC_SPI0_MISO */ |
| 174 | { 104, MODE(0) }, /* SOC_SPI0_MOSI */ |
| 175 | |
| 176 | /* SPI1 NORFLASH */ |
| 177 | { 105, MODE(0) }, /* SOC_SPI1_SCS0 */ |
| 178 | { 107, MODE(0) }, /* SOC_SPI1_CLK */ |
| 179 | { 108, MODE(0) }, /* SOC_SPI1_MISO */ |
| 180 | { 109, MODE(0) }, /* SOC_SPI1_MOSI */ |
| 181 | |
| 182 | /* SPI2 */ |
| 183 | { 110, MODE(0) }, /* SOC_SPI2_SCS0 */ |
| 184 | { 111, MODE(1) }, /* SOC_HOUT */ |
| 185 | { 112, MODE(0) }, /* SOC_SPI2_CLK */ |
| 186 | { 113, MODE(0) }, /* SOC_SPI2_MISO */ |
| 187 | { 114, MODE(0) }, /* SOC_SPI2_MOSI */ |
| 188 | |
| 189 | /* UART0 */ |
| 190 | { 115, MODE(0) }, /* SOC_UART0_RXD */ |
| 191 | { 116, MODE(0) }, /* SOC_UART0_TXD */ |
| 192 | { 117, MODE(0) }, /* SOC_UART0_CTSn */ |
| 193 | { 118, MODE(0) }, /* SOC_UART0_RTSn */ |
| 194 | |
| 195 | /* UART1 */ |
| 196 | { 119, MODE(0) }, /* SOC_UART1_RXD */ |
| 197 | { 120, MODE(0) }, /* SOC_UART1_TXD */ |
| 198 | { 121, MODE(0) }, /* SOC_UART1_CTSn */ |
| 199 | { 122, MODE(0) }, /* SOC_UART1_RTSn */ |
| 200 | |
| 201 | /* UART2 */ |
| 202 | { 123, MODE(0) }, /* SOC_UART2_RXD */ |
| 203 | { 124, MODE(0) }, /* SOC_UART2_TXD */ |
| 204 | { 125, MODE(0) }, /* UART0_TXVR_EN */ |
| 205 | { 126, MODE(4) }, /* SOC_CPTS_TS_COMP */ |
| 206 | |
| 207 | /* DCAN */ |
| 208 | { 127, MODE(0) }, /* SOC_DCAN0_TX */ |
| 209 | { 128, MODE(0) }, /* SOC_DCAN0_RX */ |
| 210 | { 137, MODE(1) }, /* SOC_DCAN1_TX */ |
| 211 | { 138, MODE(1) }, /* SOC_DCAN1_RX */ |
| 212 | |
| 213 | /* QSPI */ |
| 214 | { 129, MODE(0) }, /* SOC_QSPI_CLK */ |
| 215 | { 130, MODE(0) }, /* SOC_QSPI_RTCLK */ |
| 216 | { 131, MODE(0) }, /* SOC_QSPI_D0 */ |
| 217 | { 132, MODE(0) }, /* SOC_QSPI_D1 */ |
| 218 | { 133, MODE(0) }, /* SOC_QSPI_D2 */ |
| 219 | { 134, MODE(0) }, /* SOC_QSPI_D3 */ |
| 220 | { 135, MODE(0) }, /* SOC_QSPI_CSN0 */ |
| 221 | { 136, MODE(1) }, /* DNI <-> WLAN_SLOW_CLK */ |
| 222 | |
| 223 | /* MCASP2 */ |
| 224 | { 139, MODE(3) }, /* SOC_MCASP2AXR0 - (GPIO0_108)SOC_LED0 */ |
| 225 | { 140, MODE(4) }, /* SOC_MCASP2AXR1 */ |
| 226 | { 141, MODE(4) }, /* SOC_MCASP2AXR2 */ |
| 227 | { 142, MODE(4) }, /* SOC_MCASP2AXR3 */ |
| 228 | { 143, MODE(4) }, /* SOC_MCASP2AXR4 */ |
| 229 | { 144, MODE(4) }, /* SOC_MCASP2AXR5 */ |
| 230 | { 145, MODE(4) }, /* SOC_McASP2ACLKR */ |
| 231 | { 146, MODE(4) }, /* SOC_McASP2FSR */ |
| 232 | { 147, MODE(4) }, /* SOC_McASP2AHCLKR */ |
| 233 | { 148, MODE(3) }, /* GPIO0_117 - WLAN_TRANS_EN */ |
| 234 | { 149, MODE(4) }, /* SOC_McASP2FSX */ |
| 235 | { 150, MODE(4) }, /* SOC_McASP2AHCLKX */ |
| 236 | { 151, MODE(4) }, /* SOC_McASP2ACLKX */ |
| 237 | |
| 238 | /* MCASP1 */ |
| 239 | { 152, MODE(4) }, /* SOC_MCASP1ACLKR */ |
| 240 | { 153, MODE(4) }, /* SOC_MCASP1FSR */ |
| 241 | { 154, MODE(4) }, /* SOC_MCASP1AHCLKR */ |
| 242 | { 155, MODE(4) }, /* SOC_MCASP1ACLKX */ |
| 243 | { 156, MODE(4) }, /* SOC_MCASP1FSX */ |
| 244 | { 157, MODE(4) }, /* SOC_MCASP1AHCLKX */ |
| 245 | { 158, MODE(4) }, /* SOC_MCASP1AMUTE */ |
| 246 | { 159, MODE(4) }, /* SOC_MCASP1AXR0 */ |
| 247 | { 160, MODE(4) }, /* SOC_MCASP1AXR1 */ |
| 248 | { 161, MODE(4) }, /* SOC_MCASP1AXR2 */ |
| 249 | { 162, MODE(4) }, /* SOC_MCASP1AXR3 */ |
| 250 | { 163, MODE(4) }, /* SOC_MCASP1AXR4 */ |
| 251 | { 164, MODE(4) }, /* SOC_MCASP1AXR5 */ |
| 252 | { 165, MODE(4) }, /* SOC_MCASP1AXR6 */ |
| 253 | { 166, MODE(4) }, /* SOC_MCASP1AXR7 */ |
| 254 | { 167, MODE(4) }, /* SOC_MCASP1AXR8 */ |
| 255 | { 168, MODE(4) }, /* SOC_MCASP1AXR9 */ |
| 256 | |
| 257 | /* MCASP0 */ |
| 258 | { 169, MODE(4) }, /* SOC_MCASP0AMUTE */ |
| 259 | { 170, MODE(4) }, /* SOC_MCASP0ACLKR */ |
| 260 | { 171, MODE(4) }, /* SOC_MCASP0FSR */ |
| 261 | { 172, MODE(4) }, /* SOC_MCASP0AHCLKR */ |
| 262 | { 173, MODE(4) }, /* SOC_MCASP0ACLKX */ |
| 263 | { 174, MODE(4) }, /* SOC_MCASP0FSX */ |
| 264 | { 175, MODE(4) }, /* SOC_MCASP0AHCLKX */ |
| 265 | { 176, MODE(4) }, /* SOC_MCASP0AXR0 */ |
| 266 | { 177, MODE(4) }, /* SOC_MCASP0AXR1 */ |
| 267 | { 178, MODE(4) }, /* SOC_MCASP0AXR2 */ |
| 268 | { 179, MODE(4) }, /* SOC_MCASP0AXR3 */ |
| 269 | { 180, MODE(4) }, /* SOC_MCASP0AXR4 */ |
| 270 | { 181, MODE(4) }, /* SOC_MCASP0AXR5 */ |
| 271 | { 182, MODE(4) }, /* SOC_MCASP0AXR6 */ |
| 272 | { 183, MODE(4) }, /* SOC_MCASP0AXR7 */ |
| 273 | { 184, MODE(4) }, /* SOC_MCASP0AXR8 */ |
| 274 | { 185, MODE(4) }, /* SOC_MCASP0AXR9 */ |
| 275 | { 186, MODE(3) }, /* SOC_MCASP0AXR10 - (GPIO1_11)SOC_LED1 */ |
| 276 | { 188, MODE(4) }, /* SOC_MCASP0AXR12 */ |
| 277 | { 189, MODE(4) }, /* SOC_MCASP0AXR13 */ |
| 278 | { 190, MODE(4) }, /* SOC_MCASP0AXR14 */ |
| 279 | { 191, MODE(4) }, /* SOC_MCASP0AXR15 */ |
| 280 | |
| 281 | /* MMC0 */ |
| 282 | { 192, MODE(2) }, /* SOC_MMC0_DAT3 */ |
| 283 | { 193, MODE(2) }, /* SOC_MMC0_DAT2 */ |
| 284 | { 194, MODE(2) }, /* SOC_MMC0_DAT1 */ |
| 285 | { 195, MODE(2) }, /* SOC_MMC0_DAT0 */ |
| 286 | { 196, MODE(2) }, /* SOC_MMC0_CLK */ |
| 287 | { 197, MODE(2) }, /* SOC_MMC0_CMD */ |
| 288 | { 187, MODE(2) }, /* SOC_MMC0_SDCD */ |
| 289 | |
| 290 | /* McBSP */ |
| 291 | { 28, MODE(2) | PIN_IEN }, /* SOC_TIMI1 */ |
| 292 | { 29, MODE(2) }, /* SOC_TIMO1 */ |
| 293 | { 210, MODE(2) }, /* SOC_MCBSPDR */ |
| 294 | { 211, MODE(2) }, /* SOC_MCBSPDX */ |
| 295 | { 212, MODE(2) }, /* SOC_MCBSPFSX */ |
| 296 | { 213, MODE(2) }, /* SOC_MCBSPCLKX */ |
| 297 | { 214, MODE(2) }, /* SOC_MCBSPFSR */ |
| 298 | { 215, MODE(2) }, /* SOC_MCBSPCLKR */ |
| 299 | |
| 300 | /* I2C */ |
| 301 | { 223, MODE(0) }, /* SOC_I2C0_SCL */ |
| 302 | { 224, MODE(0) }, /* SOC_I2C0_SDA */ |
| 303 | { 225, MODE(0) }, /* SOC_I2C1_SCL */ |
| 304 | { 226, MODE(0) }, /* SOC_I2C1_SDA */ |
| 305 | { 227, MODE(0) }, /* SOC_I2C2_SCL */ |
| 306 | { 228, MODE(0) }, /* SOC_I2C2_SDA */ |
| 307 | { 229, MODE(0) }, /* NMIz */ |
| 308 | { 230, MODE(0) }, /* LRESETz */ |
| 309 | { 231, MODE(0) }, /* LRESETNMIENz */ |
| 310 | |
| 311 | { 235, MODE(0) }, |
| 312 | { 236, MODE(0) }, |
| 313 | { 237, MODE(0) }, |
| 314 | { 238, MODE(0) }, |
| 315 | { 239, MODE(0) }, |
| 316 | { 240, MODE(0) }, |
| 317 | { 241, MODE(0) }, |
| 318 | { 242, MODE(0) }, |
| 319 | { 243, MODE(0) }, |
| 320 | { 244, MODE(0) }, |
| 321 | |
| 322 | { 258, MODE(0) }, /* USB0DRVVBUS */ |
| 323 | { 259, MODE(0) }, /* USB1DRVVBUS */ |
| 324 | { MAX_PIN_N, } |
| 325 | }; |
| 326 | |
Cooper Jr., Franklin | f4bfac8 | 2017-06-16 17:25:23 -0500 | [diff] [blame] | 327 | struct pin_cfg k2g_ice_evm_pin_cfg[] = { |
| 328 | /* MMC 1 */ |
| 329 | { 63, MODE(0) | PIN_PTD }, /* MMC1_DAT3.MMC1_DAT3 */ |
| 330 | { 64, MODE(0) | PIN_PTU }, /* MMC1_DAT2.MMC1_DAT2 */ |
| 331 | { 65, MODE(0) | PIN_PTU }, /* MMC1_DAT1.MMC1_DAT1 */ |
| 332 | { 66, MODE(0) | PIN_PTD }, /* MMC1_DAT0.MMC1_DAT0 */ |
| 333 | { 67, MODE(0) | PIN_PTD }, /* MMC1_CLK.MMC1_CLK */ |
| 334 | { 68, MODE(0) | PIN_PTD }, /* MMC1_CMD.MMC1_CMD */ |
| 335 | { 69, MODE(3) | PIN_PTU }, /* MMC1_SDCD.GPIO0_69 */ |
| 336 | { 70, MODE(0) | PIN_PTU }, /* MMC1_SDWP.MMC1_SDWP */ |
| 337 | { 71, MODE(0) | PIN_PTD }, /* MMC1_POW.MMC1_POW */ |
| 338 | |
| 339 | /* I2C 0 */ |
| 340 | { 223, MODE(0) }, /* SOC_I2C0_SCL */ |
| 341 | { 224, MODE(0) }, /* SOC_I2C0_SDA */ |
Vignesh R | 824b1ba | 2018-01-31 21:08:26 +0530 | [diff] [blame] | 342 | |
| 343 | /* QSPI */ |
| 344 | { 129, MODE(0) }, /* SOC_QSPI_CLK */ |
| 345 | { 130, MODE(0) }, /* SOC_QSPI_RTCLK */ |
| 346 | { 131, MODE(0) }, /* SOC_QSPI_D0 */ |
| 347 | { 132, MODE(0) }, /* SOC_QSPI_D1 */ |
| 348 | { 133, MODE(0) }, /* SOC_QSPI_D2 */ |
| 349 | { 134, MODE(0) }, /* SOC_QSPI_D3 */ |
| 350 | { 135, MODE(0) }, /* SOC_QSPI_CSN0 */ |
Murali Karicheri | a9c7a19 | 2019-02-21 12:02:01 -0500 | [diff] [blame] | 351 | |
| 352 | /* EMAC */ |
Murali Karicheri | 11bdb5d | 2019-02-25 15:27:34 -0500 | [diff] [blame] | 353 | { 72, BUFFER_CLASS_D | PIN_PDIS | MODE(1) }, /* RGMII_RXC */ |
Murali Karicheri | a9c7a19 | 2019-02-21 12:02:01 -0500 | [diff] [blame] | 354 | { 77, BUFFER_CLASS_D | PIN_PDIS | MODE(1) }, /* RGMII_RXD3 */ |
Murali Karicheri | 11bdb5d | 2019-02-25 15:27:34 -0500 | [diff] [blame] | 355 | { 78, BUFFER_CLASS_D | PIN_PDIS | MODE(1) }, /* RGMII_RXD2 */ |
| 356 | { 79, BUFFER_CLASS_D | PIN_PDIS | MODE(1) }, /* RGMII_RXD1 */ |
Murali Karicheri | a9c7a19 | 2019-02-21 12:02:01 -0500 | [diff] [blame] | 357 | { 80, BUFFER_CLASS_D | PIN_PDIS | MODE(1) }, /* RGMII_RXD0 */ |
Murali Karicheri | 11bdb5d | 2019-02-25 15:27:34 -0500 | [diff] [blame] | 358 | { 81, BUFFER_CLASS_D | PIN_PDIS | MODE(1) }, /* RGMII_RXCTL */ |
Murali Karicheri | a9c7a19 | 2019-02-21 12:02:01 -0500 | [diff] [blame] | 359 | { 85, BUFFER_CLASS_D | PIN_PDIS | MODE(1) }, /* RGMII_TXC */ |
Murali Karicheri | 11bdb5d | 2019-02-25 15:27:34 -0500 | [diff] [blame] | 360 | { 91, BUFFER_CLASS_D | PIN_PDIS | MODE(1) }, /* RGMII_TXD3 */ |
| 361 | { 92, BUFFER_CLASS_D | PIN_PDIS | MODE(1) }, /* RGMII_TXD2 */ |
| 362 | { 93, BUFFER_CLASS_D | PIN_PDIS | MODE(1) }, /* RGMII_TXD1 */ |
| 363 | { 94, BUFFER_CLASS_D | PIN_PDIS | MODE(1) }, /* RGMII_TXD0 */ |
Murali Karicheri | a9c7a19 | 2019-02-21 12:02:01 -0500 | [diff] [blame] | 364 | { 95, BUFFER_CLASS_D | PIN_PDIS | MODE(1) }, /* RGMII_TXCTL */ |
Murali Karicheri | a9c7a19 | 2019-02-21 12:02:01 -0500 | [diff] [blame] | 365 | |
| 366 | /* MDIO */ |
Murali Karicheri | a9c7a19 | 2019-02-21 12:02:01 -0500 | [diff] [blame] | 367 | { 98, BUFFER_CLASS_B | PIN_PDIS | MODE(0) }, /* MDIO_DATA */ |
Murali Karicheri | 11bdb5d | 2019-02-25 15:27:34 -0500 | [diff] [blame] | 368 | { 99, BUFFER_CLASS_B | PIN_PDIS | MODE(0) }, /* MDIO_CLK */ |
Murali Karicheri | a9c7a19 | 2019-02-21 12:02:01 -0500 | [diff] [blame] | 369 | |
Suman Anna | f26c3b9 | 2021-07-26 18:22:48 -0500 | [diff] [blame] | 370 | /* ICSS1 Padconf Workaround */ |
| 371 | { 202, MODE(1) | PIN_PDIS }, /* PR1_PRU1_GPO1.PR1_PRU1_GPI1 (PR1_MII1_RXD1) */ |
| 372 | |
Cooper Jr., Franklin | f4bfac8 | 2017-06-16 17:25:23 -0500 | [diff] [blame] | 373 | { MAX_PIN_N, } |
| 374 | }; |
| 375 | |
Vitaly Andrianov | 680ec77 | 2015-09-19 16:26:45 +0530 | [diff] [blame] | 376 | void k2g_mux_config(void) |
| 377 | { |
Cooper Jr., Franklin | f4bfac8 | 2017-06-16 17:25:23 -0500 | [diff] [blame] | 378 | if (!board_ti_was_eeprom_read()) { |
| 379 | configure_pin_mux(k2g_generic_pin_cfg); |
Rex Chang | 4df43d4 | 2017-12-28 20:39:59 +0530 | [diff] [blame] | 380 | } else if (board_is_k2g_gp() || board_is_k2g_g1()) { |
Cooper Jr., Franklin | f4bfac8 | 2017-06-16 17:25:23 -0500 | [diff] [blame] | 381 | configure_pin_mux(k2g_evm_pin_cfg); |
Lokesh Vutla | ac38c92 | 2020-12-17 22:58:07 +0530 | [diff] [blame] | 382 | } else if (board_is_k2g_ice() || board_is_k2g_i1()) { |
Cooper Jr., Franklin | f4bfac8 | 2017-06-16 17:25:23 -0500 | [diff] [blame] | 383 | configure_pin_mux(k2g_ice_evm_pin_cfg); |
| 384 | } else { |
| 385 | puts("Unknown board, cannot configure pinmux."); |
| 386 | hang(); |
| 387 | } |
Vitaly Andrianov | 680ec77 | 2015-09-19 16:26:45 +0530 | [diff] [blame] | 388 | } |