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.

AM3352: UART hw flow control (rts,cts) support

Part Number: AM3352

Tool/software:

Hi Expert,

Customer need to add uart flow control support on am3352 linux 3.2 product line.

Please help to let us know how to enable UART hw flow control (rts,cts) support

Both RTS and CTS pin are not pull up/down from oscilloscope.

 

The modification for now:

 

arch\arm\mach-omap2\board-am335xevm.c

static struct pinmux_config uart1_pin_mux[] = {

+      {"uart1_ctsn.uart1_ctsn", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT},

+      {"uart1_rtsn.uart1_rtsn", OMAP_MUX_MODE0 | AM33XX_PIN_OUTPUT},

        {"uart1_rxd.uart1_rxd", OMAP_MUX_MODE0 | AM33XX_PIN_INPUT_PULLUP},

        {"uart1_txd.uart1_txd", OMAP_MUX_MODE0 | AM33XX_PULL_ENBL},

        {NULL, 0},

};

 

Fatek SW do set “sty –F /dev/ttyO1 crtscts” the driver log show(dev_info)

drivers\tty\serial\omap-serial.c

        /* Hardware Flow Control Configuration */

 

        dev_info(up->port.dev, "===>>> Hardware Flow Control Configuration %u\n", termios->c_cflag & CRTSCTS);

        if (termios->c_cflag & CRTSCTS) {

                dev_info(up->port.dev, "===>>> Hardware Flow Control start\n");

                efr |= (UART_EFR_CTS | UART_EFR_RTS);

                serial_out(up, UART_LCR, UART_LCR_CONF_MODE_A);

 

                up->mcr = serial_in(up, UART_MCR);

                serial_out(up, UART_MCR, up->mcr | UART_MCR_TCRTLR);

 

                serial_out(up, UART_LCR, UART_LCR_CONF_MODE_B);

                up->efr = serial_in(up, UART_EFR);

                serial_out(up, UART_EFR, up->efr | UART_EFR_ECB);

 

                serial_out(up, UART_TI752_TCR, OMAP_UART_TCR_TRIG);

                serial_out(up, UART_EFR, efr); /* Enable AUTORTS and AUTOCTS */

                serial_out(up, UART_LCR, UART_LCR_CONF_MODE_A);

                serial_out(up, UART_MCR, up->mcr | UART_MCR_RTS);

                serial_out(up, UART_LCR, cval);

                dev_info(up->port.dev, "===>>> Hardware Flow Control end\n");

        }

 

 

REF A https://e2e.ti.com/support/processors-group/processors/f/processors-forum/337173/am335x-uart-hardware-flow-control-linux-3-2-0-psp04-06-00-11

REF B https://e2e.ti.com/support/processors-group/processors/f/processors-forum/261794/am335x-uart-hardware-handshaking

Thanks

Daniel