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.

Enable UART4 in AM335x

Hello 

       We are designing custom device with AM335x. We need to connect serial device with AM335x processor over UART4. 

UART4 details:-

BALL                  Name

E18                  Uart4_rxd_mux1  (Mode-1)

E17                 Uart4_txd_mux1    (Mode-1)

I tried to enable UART4 in board file but there is no muxing details for UART4 in mux33xx.c, details are,

_AM33XX_MUXENTRY(UART0_CTSN, 0,
                                     "uart0_ctsn", NULL, "d_can1_tx", "i2c1_sda",
                                     "spi1_d0", NULL, NULL, "gpio1_8"),

_AM33XX_MUXENTRY(UART0_RTSN, 0,
                                      "uart0_rtsn", NULL, "d_can1_rx", "i2c1_scl",
                                      "spi1_d1", "spi1_cs0", NULL, "gpio1_9"),

Here no detail for uart4_rx in mode1, here its defined as NULL. 

How to add the entry for UART4 in mux33xx.c ?

And another is question, /dev/ttyO4 configured for T17, U17 ball or it can be modify to E18 & E17 ?

  • Hi,

    The current mux table inside mux33xx.c only has entries that are verified on the evaluation platforms. You can replace the NULL entries with the corresponding mux option you need.

    For example:

        _AM33XX_MUXENTRY(UART0_CTSN, 0,
            "uart0_ctsn", "uart4_rxd", "d_can1_tx", "i2c1_sda",
            "spi1_d0", NULL, NULL, "gpio1_8"),
        _AM33XX_MUXENTRY(UART0_RTSN, 0,
            "uart0_rtsn", "uart4_txd", "d_can1_rx", "i2c1_scl",
            "spi1_d1", "spi1_cs0", NULL, "gpio1_9"),

    Then you need to add a new pinmux_config inside the board-am335xevm.c file. For example:

    static struct pinmux_config uart4_pin_mux[] = {
        {"uart0_ctsn.uart4_rxd", OMAP_MUX_MODE1 | AM33XX_PIN_INPUT_PULLUP},
        {"uart0_rtsn.uar4_txd", OMAP_MUX_MODE1 | AM33XX_PULL_ENBL},
        {NULL, 0},
    };

    !!! Remember to change the pad config options accordingly!!!

    Then add a new uart4_init() function:

    static void uart4_init(int evm_id, int profile)
    {
        setup_pin_mux(uart4_pin_mux);
        return;
    }

    And then add a new entry, pointing to the new function, inside the dev_cfg[] you will be using:

    ...
    {uart4_init, DEV_ON_BASEBOARD, PROFILE_ALL},
    ...

    I haven't tried this, but it should work with or without some small board-speciffic modifications. Please post your progress if you run into any trouble.

    Best regards,
    Miroslav