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.

Linux/AM5718: Pinmux of McSPI D0 and D1

Part Number: AM5718

Tool/software: Linux

Dear Team,

I am working on AM571x based IDK

I see from the u-boot pin-mux is configured using , do_set_mux32((*ctrl)->control_padconf_core_base, pconf, pconf_sz);

It is using following settings defined in array core_padconf_array_0essential_am571x_idk

In the pin-mux array D0 & D1 are configured as input pull-up in pad configuration

    {SPI2_SCLK, (M0 | PIN_INPUT_PULLDOWN)},    /* spi2_sclk.spi2_sclk */
    {SPI2_D1, (M0 | PIN_INPUT_SLEW)},    /* spi2_d1.spi2_d1 */
    {SPI2_D0, (M0 | PIN_INPUT_SLEW)},    /* spi2_d0.spi2_d0 */
    {SPI2_CS0, (M0 | PIN_INPUT_PULLUP | SLEWCONTROL)},    /* spi2_cs0.spi2_cs0 */

In the kernel spi-omap2-mcspi.c in the channel configuration they are congigured with D0 as input and D1 as output or vice versa.

if (mcspi->pin_dir == MCSPI_PINDIR_D0_IN_D1_OUT) {
        l &= ~OMAP2_MCSPI_CHCONF_IS;
        l &= ~OMAP2_MCSPI_CHCONF_DPE1;
        l |= OMAP2_MCSPI_CHCONF_DPE0;
    } else {
        l |= OMAP2_MCSPI_CHCONF_IS;
        l |= OMAP2_MCSPI_CHCONF_DPE1;
        l &= ~OMAP2_MCSPI_CHCONF_DPE0;
    }

Following are my questions:

1) Why in U-boot D1 is not configured as output, or is it configured elsewhere in u-boot ?

2) By programming the channel configuration register of SPI peripheral will it effect the pad configuration register?

Thanks,

Vamshi