This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM335X pin muxing

Other Parts Discussed in Thread: AM3358

I have a question regarding AM335X pin muxing. We wanted to mux pins for I2C for the custom board that we are making. We found form the linux board file of the evm that SCL (clock of I2C which is an output) was configured as input with pull up enabled whereas it is a clock and it is output

static struct pinmux_config i2c1_pin_mux[] = {
    {"spi0_d1.i2c1_sda",    OMAP_MUX_MODE2 | AM33XX_SLEWCTRL_SLOW |
                    AM33XX_PULL_ENBL | AM33XX_INPUT_EN},
    {"spi0_cs0.i2c1_scl",   OMAP_MUX_MODE2 | AM33XX_SLEWCTRL_SLOW |
                    AM33XX_PULL_ENBL | AM33XX_INPUT_EN},
    {NULL, 0},
};

The LCD pins were however muxed properly as output as below (only one pin shown)

"lcd_data3.lcd_data3",    OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT
        | AM33XX_PULL_DISA},

My question is why is the I2C configured as input even though it is an output. If it is an exception are there other pins with such exception

  • The I2C pins are not configured as an input.  Please take a look at the AM335x ARM Cortex-A8 Microprocessors (MPUs) Technical Reference Manual found on the AM3358 Product Folder in the Control Module Chapter 9.  The Pin configurtation registers are described in Section 9.3.50.  The AM33XX_INPUT_EN corresponds to bit 5 of that register which configures if the Input buffer for the particular pad is enabled.  This would be important for signals which are either inputs or bi-directional, as is the case with both I2C SCL and SDA.  Both of these signals are bi-directional and therefore it is important to enable the receiver (ie. input buffer).

    The definition of AM33XX_INPUT_EN is found in arch/arm/mach-omap2/mux.h and is :
    #define AM33XX_INPUT_EN                 (1 << 5)

    In the case of the LCD data3, this only operates as an output.

    The definition of AM33XX_PIN_OUTPUT is found in arch/arm/mach-omap2/mux.h and is :
    #define AM33XX_PIN_OUTPUT               (0)