#define I2C_PINMUX(_pingroup, _mux, _pupd, _tri, _io, _lock, _od) \ { \ .pingroup = TEGRA_PINGROUP_##_pingroup, \ .func = TEGRA_MUX_##_mux, \ .pupd = TEGRA_PUPD_##_pupd, \ .tristate = TEGRA_TRI_##_tri, \ .io = TEGRA_PIN_##_io, \ .lock = TEGRA_PIN_LOCK_##_lock, \ .od = TEGRA_PIN_OD_##_od, \ .ioreset = TEGRA_PIN_IO_RESET_DEFAULT, \ } static __initdata struct tegra_pingroup_config enrc2_pinmux_common[] = { /* I2C1 pinmux */ I2C_PINMUX(GEN1_I2C_SCL, I2C1, NORMAL, NORMAL, INPUT, DISABLE, DISABLE), I2C_PINMUX(GEN1_I2C_SDA, I2C1, NORMAL, NORMAL, INPUT, DISABLE, DISABLE), /* I2C2 pinmux */ I2C_PINMUX(GEN2_I2C_SCL, I2C2, NORMAL, NORMAL, INPUT, DISABLE, DISABLE), I2C_PINMUX(GEN2_I2C_SDA, I2C2, NORMAL, NORMAL, INPUT, DISABLE, DISABLE), /* I2C3 pinmux */ I2C_PINMUX(CAM_I2C_SCL, I2C3, NORMAL, NORMAL, INPUT, DISABLE, DISABLE), I2C_PINMUX(CAM_I2C_SDA, I2C3, NORMAL, NORMAL, INPUT, DISABLE, DISABLE), /* I2C4 pinmux */ I2C_PINMUX(DDC_SCL, I2C4, NORMAL, NORMAL, INPUT, DISABLE, DISABLE), I2C_PINMUX(DDC_SDA, I2C4, NORMAL, NORMAL, INPUT, DISABLE, DISABLE), /* Power I2C pinmux */
// Port B DEFAULT_PINMUX(GMI_A17, UARTD, NORMAL, NORMAL, INPUT), // MDM_IMC_UART_RX DEFAULT_PINMUX(GMI_A18, UARTD, NORMAL, NORMAL, INPUT), // MDM_IMC_UART_CTS DEFAULT_PINMUX(LCD_PWR0, RSVD, NORMAL, NORMAL, INPUT), // AUD_3V3_EN DEFAULT_PINMUX(LCD_PCLK, DISPLAYA, NORMAL, NORMAL, INPUT), // NC DEFAULT_PINMUX(SDMMC3_DAT3, SDMMC3, PULL_UP, NORMAL, INPUT), // WIFI_SDIO_DATA3 DEFAULT_PINMUX(SDMMC3_DAT2, SDMMC3, PULL_UP, NORMAL, INPUT), // WIFI_SDIO_DATA2 DEFAULT_PINMUX(SDMMC3_DAT1, SDMMC3, PULL_UP, NORMAL, INPUT), // WIFI_SDIO_DATA1 DEFAULT_PINMUX(SDMMC3_DAT0, SDMMC3, PULL_UP, NORMAL, INPUT), // WIFI_SDIO_DATA0 // Port C DEFAULT_PINMUX(UART3_RTS_N, UARTC, NORMAL, NORMAL, OUTPUT), // BT_UART_RTS DEFAULT_PINMUX(LCD_PWR1, RSVD2, NORMAL, NORMAL, OUTPUT), // MDM_AP2BB_RST_PWRDWN DEFAULT_PINMUX(UART2_TXD, IRDA, NORMAL, NORMAL, OUTPUT), // DEFAULT_PINMUX(UART2_RXD, IRDA, NORMAL, NORMAL, INPUT), // I2C_PINMUX(GEN1_I2C_SCL, I2C1, NORMAL, NORMAL, INPUT, DISABLE, DISABLE), // PER_SENSOR_I2C_SCL I2C_PINMUX(GEN1_I2C_SDA, I2C1, NORMAL, NORMAL, INPUT, DISABLE, DISABLE), // PER_SENSOR_I2C_SDA DEFAULT_PINMUX(LCD_PWR2, DISPLAYA, NORMAL, NORMAL, OUTPUT), // MDM_AP2BB_SLAVE_WAKEUP_1 DEFAULT_PINMUX(GMI_WP_N, RSVD1, PULL_UP, NORMAL, INPUT), // MHL_INT // Port D DEFAULT_PINMUX(SDMMC3_DAT5, SDMMC3, PULL_UP, NORMAL, INPUT), // NC DEFAULT_PINMUX(SDMMC3_DAT4, SDMMC3, PULL_UP, NORMAL, INPUT), // NC DEFAULT_PINMUX(LCD_DC1, RSVD2, NORMAL, NORMAL, INPUT), // AUD_A1V8_EN DEFAULT_PINMUX(SDMMC3_DAT6, RSVD1, NORMAL, NORMAL, INPUT), // NC DEFAULT_PINMUX(SDMMC3_DAT7, RSVD1, NORMAL, NORMAL, INPUT), // NC // Port E DEFAULT_PINMUX(LCD_D0, DISPLAYA, NORMAL, NORMAL, OUTPUT), // MHL_USB_SEL DEFAULT_PINMUX(LCD_D1, DISPLAYA, NORMAL, NORMAL, INPUT), // NC DEFAULT_PINMUX(LCD_D2, RSVD1, NORMAL, NORMAL, OUTPUT), // PEH_CAP_INT
DEFAULT_PINMUX(ULPI_DATA1, UARTA, PULL_UP, NORMAL, INPUT), /* UART2 pinmux */ DEFAULT_PINMUX(UART2_RXD, IRDA, PULL_UP, NORMAL, INPUT), DEFAULT_PINMUX(UART2_TXD, IRDA, PULL_UP, NORMAL, OUTPUT), /* UART4 pinmux */ DEFAULT_PINMUX(ULPI_CLK, UARTD, NORMAL, NORMAL, OUTPUT), DEFAULT_PINMUX(ULPI_DIR, UARTD, NORMAL, NORMAL, INPUT), /* UART5 pinmux */ DEFAULT_PINMUX(SDMMC1_DAT2, UARTE, PULL_UP, NORMAL, INPUT), DEFAULT_PINMUX(SDMMC1_DAT3, UARTE, PULL_UP, NORMAL, OUTPUT), /* I2C1 pinmux */ I2C_PINMUX(GEN1_I2C_SCL, I2C1, NORMAL, NORMAL, INPUT, DISABLE, ENABLE), I2C_PINMUX(GEN1_I2C_SDA, I2C1, NORMAL, NORMAL, INPUT, DISABLE, ENABLE), /* I2C2 pinmux */ I2C_PINMUX(GEN2_I2C_SCL, I2C2, NORMAL, NORMAL, INPUT, DISABLE, ENABLE), I2C_PINMUX(GEN2_I2C_SDA, I2C2, NORMAL, NORMAL, INPUT, DISABLE, ENABLE), /* PowerI2C pinmux */ I2C_PINMUX(PWR_I2C_SCL, I2CPWR, NORMAL, NORMAL, INPUT, DISABLE, ENABLE), I2C_PINMUX(PWR_I2C_SDA, I2CPWR, NORMAL, NORMAL, INPUT, DISABLE, ENABLE), /* SPI2 pinmux */ DEFAULT_PINMUX(ULPI_DATA4, SPI2, PULL_UP, NORMAL, INPUT), DEFAULT_PINMUX(ULPI_DATA5, SPI2, PULL_UP, NORMAL, INPUT), DEFAULT_PINMUX(ULPI_DATA6, SPI2, PULL_UP, NORMAL, INPUT),
DEFAULT_PINMUX(KB_ROW8, SDMMC2, PULL_UP, NORMAL, INPUT), DEFAULT_PINMUX(KB_ROW9, SDMMC2, PULL_UP, NORMAL, INPUT), /* SDMMC3 pinmux */ DEFAULT_PINMUX(SDMMC3_CLK, SDMMC3, NORMAL, NORMAL, INPUT), DEFAULT_PINMUX(SDMMC3_CMD, SDMMC3, PULL_UP, NORMAL, INPUT), DEFAULT_PINMUX(SDMMC3_DAT0, SDMMC3, PULL_UP, NORMAL, INPUT), DEFAULT_PINMUX(SDMMC3_DAT1, SDMMC3, PULL_UP, NORMAL, INPUT), DEFAULT_PINMUX(SDMMC3_DAT2, SDMMC3, PULL_UP, NORMAL, INPUT), DEFAULT_PINMUX(SDMMC3_DAT3, SDMMC3, PULL_UP, NORMAL, INPUT), /* SDMMC4 pinmux */ DEFAULT_PINMUX(CAM_MCLK, POPSDMMC4, NORMAL, NORMAL, INPUT), DEFAULT_PINMUX(GPIO_PCC1, POPSDMMC4, NORMAL, NORMAL, INPUT), DEFAULT_PINMUX(GPIO_PBB0, POPSDMMC4, PULL_UP, NORMAL, INPUT), I2C_PINMUX(CAM_I2C_SCL, POPSDMMC4, PULL_UP, NORMAL, INPUT, DISABLE, DISABLE), I2C_PINMUX(CAM_I2C_SDA, POPSDMMC4, PULL_UP, NORMAL, INPUT, DISABLE, DISABLE), DEFAULT_PINMUX(GPIO_PBB3, POPSDMMC4, PULL_UP, NORMAL, INPUT), DEFAULT_PINMUX(GPIO_PBB4, POPSDMMC4, PULL_UP, NORMAL, INPUT), DEFAULT_PINMUX(GPIO_PBB5, POPSDMMC4, PULL_UP, NORMAL, INPUT), DEFAULT_PINMUX(GPIO_PBB6, POPSDMMC4, PULL_UP, NORMAL, INPUT), DEFAULT_PINMUX(GPIO_PBB7, POPSDMMC4, PULL_UP, NORMAL, INPUT), /* UART1 pinmux */ DEFAULT_PINMUX(ULPI_DATA0, UARTA, NORMAL, NORMAL, OUTPUT), DEFAULT_PINMUX(ULPI_DATA1, UARTA, NORMAL, NORMAL, INPUT), DEFAULT_PINMUX(ULPI_DATA2, UARTA, NORMAL, NORMAL, INPUT), DEFAULT_PINMUX(ULPI_DATA3, UARTA, NORMAL, NORMAL, OUTPUT), /* UART2 pinmux */ DEFAULT_PINMUX(UART2_RXD, IRDA, NORMAL, NORMAL, INPUT),
#endif /* SDMMC4 pinmux */ DEFAULT_PINMUX(SDMMC4_CLK, SDMMC4, NORMAL, NORMAL, INPUT), //eMMC_CLK DEFAULT_PINMUX(SDMMC4_CMD, SDMMC4, PULL_UP, NORMAL, INPUT), //eMMC_CMD DEFAULT_PINMUX(SDMMC4_DAT0, SDMMC4, PULL_UP, NORMAL, INPUT), //eMMC_DAT0 DEFAULT_PINMUX(SDMMC4_DAT1, SDMMC4, PULL_UP, NORMAL, INPUT), //eMMC_DAT1 DEFAULT_PINMUX(SDMMC4_DAT2, SDMMC4, PULL_UP, NORMAL, INPUT), //eMMC_DAT2 DEFAULT_PINMUX(SDMMC4_DAT3, SDMMC4, PULL_UP, NORMAL, INPUT), //eMMC_DAT3 DEFAULT_PINMUX(SDMMC4_DAT4, SDMMC4, PULL_UP, NORMAL, INPUT), //eMMC_DAT4 DEFAULT_PINMUX(SDMMC4_DAT5, SDMMC4, PULL_UP, NORMAL, INPUT), //eMMC_DAT5 DEFAULT_PINMUX(SDMMC4_DAT6, SDMMC4, PULL_UP, NORMAL, INPUT), //eMMC_DAT6 DEFAULT_PINMUX(SDMMC4_DAT7, SDMMC4, PULL_UP, NORMAL, INPUT), //eMMC_DAT7 DEFAULT_PINMUX(SDMMC4_RST_N, RSVD1, PULL_DOWN, NORMAL, INPUT), //eMMC_RST_N /* I2C1 pinmux */ I2C_PINMUX(GEN1_I2C_SCL, I2C1, NORMAL, NORMAL, INPUT, DEFAULT, DEFAULT), I2C_PINMUX(GEN1_I2C_SDA, I2C1, NORMAL, NORMAL, INPUT, DEFAULT, DEFAULT), // /* I2C2 pinmux */ #if 0// I2C_PINMUX(GEN2_I2C_SCL, I2C2, NORMAL, NORMAL, INPUT, DEFAULT, DEFAULT),//MUIC_INIT I2C_PINMUX(GEN2_I2C_SDA, I2C2, NORMAL, NORMAL, INPUT, DEFAULT, DEFAULT),//MUIC_INIT #else I2C_PINMUX(GEN2_I2C_SCL, I2C2, PULL_UP, NORMAL, INPUT, DISABLE, DISABLE),//MUIC_INIT I2C_PINMUX(GEN2_I2C_SDA, I2C2, PULL_UP, NORMAL, INPUT, DISABLE, DISABLE),//MUIC_INIT #endif// // /* I2C3 pinmux */ I2C_PINMUX(CAM_I2C_SCL, I2C3, NORMAL, NORMAL, INPUT, DEFAULT, DEFAULT),
DEFAULT_PINMUX(GMI_AD13, GMI, NORMAL, NORMAL, OUTPUT), DEFAULT_PINMUX(GMI_AD14, GMI, NORMAL, NORMAL, OUTPUT), DEFAULT_PINMUX(GMI_AD8, GMI, NORMAL, NORMAL, OUTPUT), DEFAULT_PINMUX(GMI_ADV_N, GMI, NORMAL, NORMAL, INPUT), DEFAULT_PINMUX(GMI_CLK, GMI, NORMAL, NORMAL, OUTPUT), DEFAULT_PINMUX(GMI_CS0_N, GMI, NORMAL, NORMAL, INPUT), DEFAULT_PINMUX(GMI_CS3_N, GMI, NORMAL, NORMAL, OUTPUT), DEFAULT_PINMUX(GMI_CS4_N, GMI, NORMAL, NORMAL, INPUT), DEFAULT_PINMUX(GMI_CS7_N, GMI, NORMAL, NORMAL, INPUT), DEFAULT_PINMUX(GMI_IORDY, GMI, NORMAL, NORMAL, INPUT), DEFAULT_PINMUX(GMI_RST_N, GMI, NORMAL, NORMAL, INPUT), /* VDDIO_HV_AP */ DEFAULT_PINMUX(OWR, OWR, NORMAL, TRISTATE, INPUT), CEC_PINMUX(HDMI_CEC, CEC, NORMAL, TRISTATE, INPUT, DISABLE, ENABLE), I2C_PINMUX(DDC_SCL, I2C4, NORMAL, TRISTATE, INPUT, DEFAULT, DEFAULT), I2C_PINMUX(DDC_SDA, I2C4, NORMAL, TRISTATE, INPUT, DEFAULT, DEFAULT), USB_PINMUX(USB_VBUS_EN0, RSVD3, NORMAL, NORMAL, OUTPUT, DISABLE, DISABLE), }; #endif /* THIS IS FOR EXPERIMENTAL OR WORKAROUND PURPOSES. ANYTHING INSIDE THIS TABLE * SHOULD BE CONSIDERED TO BE PUSHED TO PINMUX SPREADSHEET FOR CONSISTENCY */ static __initdata struct tegra_pingroup_config manual_config_pinmux[] = { }; static void __init pluto_gpio_init_configure(void) { int len; int i;