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.

AM3359: When setting up a UART in device tree, can the Tx be from one mux mode and the Rx from another?

Part Number: AM3359

We're setting up a project that uses 6 UARTS.  0 - 4 are fine.  But UART5 conflicts with other devices (Specifically the LCDC or ethernet.)  For UART5, there are 4 mux modes and a Tx and Rx defined for each (all on different balls)  So:

uart5_tx_mux0  & uart5_rx_mux0
uart5_tx_mux1  & uart5_rx_mux1
uart5_tx_mux2  & uart5_rx_mux2
uart5_tx_mux3  & uart5_rx_mux3

Unfortunately, all 4 mux modes have at least one conflict.  However, I could mix say uart5_tx_mux1 and uart5_rx_mux3.  Will this be understood as intended if I edit the appropriate entry in the devtree?  Or are the mux modes meant to be used together?

Thanks.

  • Hi Christopher,

    Christopher Rodney said:
    However, I could mix say uart5_tx_mux1 and uart5_rx_mux3.

    Which physical pin you refer to when using uart5_tx_mux1? uart5_txd signal can be muxed in below AM335x pins:

    ZCE device: K18, L19, R19, V4

    ZCZ device: H18, J17, M18, U1


    Regarding  uart5_rx_mux3, do you refer to physical pin J19 / H16 ?

    In general, you can use uart5_txd in one mux mode (i.e. mux mode 3) and uart5_rxd in other mux mode (i.e. mux mode 4), this should not be a problem. But you will need to double check this with the pinmux tool. The tool will give you error/warning if this combination is NOT correct.

    You can also check linux kernel am335x-evmsk.dts file for example, where we have different mux modes used (1, 2 and 7) for MMC2 pins.

    Regards,
    Pavel

  • Thanks.  I used H16 for Rx and J17 for Tx and the pinmux tool was happy with it.  So it seems they can generally be mixed at will as long as there are no conflicts.  Thank you.

  • Christopher Rodney said:
    However, I could mix say uart5_tx_mux1 and uart5_rx_mux3.  Will this be understood as intended if I edit the appropriate entry in the devtree?  Or are the mux modes meant to be used together?

    Some interfaces have "iosets", meaning particular mux options have to be together to ensure the signals are correctly lined up relative to each other, but obviously this can only apply if those signals actually have well-defined timing relative to each other. This is of course not the case for the rxd and txd of an uart, which are completely asynchronous to each other, hence you can freely choose their mux options independently.

  • Matthijs,

    Matthijs van Duin said:
    Some interfaces have "iosets", meaning particular mux options have to be together to ensure the signals are correctly lined up relative to each other

    We have "iosets" only for AM57x family of devices.

    Regards,
    Pavel

  • Pavel Botev said:
    We have "iosets" only for AM57x family of devices.

    AM335x datasheet (SPRS717K), section 7 "Peripheral Information and Timings" (emphasis mine):

    The AM335x device contains many peripheral interfaces. In order to reduce package size and lower overall system cost while maintaining maximum functionality, many of the AM335x terminals can multiplex up to eight signal functions. Although there are many combinations of pin multiplexing that are possible, only a certain number of sets, called I/O Sets, are valid due to timing limitations. These valid I/O Sets were carefully chosen to provide many possible application scenarios for the user.

    Texas Instruments has developed a Windows-based application called Pin Mux Utility that helps a system designer select the appropriate pin-multiplexing configuration for their AM335x-based product design. The Pin Mux Utility provides a way to select valid I/O Sets of specific peripheral interfaces to ensure the pin-multiplexing configuration selected for a design only uses valid I/O Sets supported by the AM335x device.

    And last time I checked (which was a fair while ago) the online pin mux utility did indeed define iosets for the AM335x.

    (It actually puzzles me a bit why the AM572x also has iosets, I had expected that iodelay would make iosets unnecessary)

  • Matthijs,

    Yes, you are correct. My point was that these AM335x I/O sets can only be checked with the Pinmux tool, while AM57x I/O sets are fully provided in the AM57x datasheet.

    Note also we have AM335x errata advisory 3.1.5 Pin Multiplexing: Valid IO Sets and Restrictions

    Regards,
    Pavel

  • Pavel Botev said:
    Yes, you are correct. My point was that these AM335x I/O sets can only be checked with the Pinmux tool, while AM57x I/O sets are fully provided in the AM57x datasheet.

    Yeah it's pretty annoying that the AM335x I/O sets are not documented in its datasheet. I've included them in my pins spreadsheet however (the "IOSets" tab).