ARM:OMAP:AM33XX: Add PROFIBUS support
authorAmit Shah <amit.shah@ti.com>
Tue, 22 Nov 2011 13:47:41 +0000 (19:17 +0530)
committerVaibhav Hiremath <hvaibhav@ti.com>
Mon, 23 Jan 2012 19:14:37 +0000 (00:44 +0530)
Added PROFIBUS pinmux settings

Signed-off-by: Amit Shah <amit.shah@ti.com>
Signed-off-by: Amit Shah <amit.shah@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
arch/arm/mach-omap2/board-am335xevm.c
arch/arm/mach-omap2/mux33xx.c

index 231faa5c0f3adfea3d5418a31d7c853ff3c3eb0f..a490a1d79ca58323d138317399b1bf1ef11f3ba1 100644 (file)
@@ -769,6 +769,14 @@ static struct pinmux_config usb1_pin_mux[] = {
        {NULL, 0},
 };
 
+/* pinmux for profibus */
+static struct pinmux_config profibus_pin_mux[] = {
+       {"uart1_rxd.pr1_uart0_rxd_mux1", OMAP_MUX_MODE5 | AM33XX_PIN_INPUT},
+       {"uart1_txd.pr1_uart0_txd_mux1", OMAP_MUX_MODE5 | AM33XX_PIN_OUTPUT},
+       {"mcasp0_fsr.pr1_pru0_pru_r30_5", OMAP_MUX_MODE5 | AM33XX_PIN_OUTPUT},
+       {NULL, 0},
+};
+
 /* Module pin mux for eCAP0 */
 static struct pinmux_config ecap0_pin_mux[] = {
        {"ecap0_in_pwm0_out.gpio0_7", AM33XX_PIN_OUTPUT},
@@ -1303,6 +1311,11 @@ static int am335x_tlk110_phy_fixup(struct phy_device *phydev)
 }
 #endif
 
+static void profibus_init(int evm_id, int profile)
+{
+       setup_pin_mux(profibus_pin_mux);
+       return;
+}
 
 /* Low-Cost EVM */
 static struct evm_dev_cfg low_cost_evm_dev_cfg[] = {
@@ -1350,6 +1363,7 @@ static struct evm_dev_cfg ind_auto_mtrl_evm_dev_cfg[] = {
        {mii1_init,     DEV_ON_DGHTR_BRD, PROFILE_ALL},
        {usb0_init,     DEV_ON_BASEBOARD, PROFILE_ALL},
        {usb1_init,     DEV_ON_BASEBOARD, PROFILE_ALL},
+       {profibus_init, DEV_ON_DGHTR_BRD, PROFILE_ALL},
        {evm_nand_init, DEV_ON_DGHTR_BRD, PROFILE_ALL},
        {spi1_init,     DEV_ON_DGHTR_BRD, PROFILE_ALL},
        {uart3_init,    DEV_ON_DGHTR_BRD, PROFILE_ALL},
index ead79f4f60481b21e75bd066b7d173caf9ed0127..8e9180f5861b7922732d6dbec1ae63305e32cde4 100644 (file)
@@ -322,10 +322,10 @@ static struct omap_mux __initdata am33xx_muxmodes[] = {
                "spi1_cs1", NULL, NULL, NULL),
        _AM33XX_MUXENTRY(UART1_RXD, 0,
                "uart1_rxd", "mmc1_sdwp", NULL, NULL,
-               NULL, NULL, NULL, NULL),
+               NULL, "pr1_uart0_rxd_mux1", NULL, NULL),
        _AM33XX_MUXENTRY(UART1_TXD, 0,
                "uart1_txd", "mmc2_sdwp", NULL, NULL,
-               NULL, NULL, NULL, NULL),
+               NULL, "pr1_uart0_txd_mux1", NULL, NULL),
        _AM33XX_MUXENTRY(I2C0_SDA, 0,
                "i2c0_sda", NULL, NULL, NULL,
                NULL, NULL, NULL, NULL),
@@ -349,7 +349,7 @@ static struct omap_mux __initdata am33xx_muxmodes[] = {
                "mmc0_sdwp", NULL, NULL, NULL),
        _AM33XX_MUXENTRY(MCASP0_FSR, 0,
                "mcasp0_fsr", NULL, "mcasp0_axr3", "mcasp1_fsx",
-               NULL, NULL, NULL, NULL),
+               NULL, "pr1_pru0_pru_r30_5", NULL, NULL),
        _AM33XX_MUXENTRY(MCASP0_AXR1, 0,
                "mcasp0_axr1", NULL, NULL, "mcasp1_axr0",
                NULL, NULL, NULL, NULL),