Modem control lines for RTSCTS hardware flow control via rts-gpio and cts-gpio with IMX

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Greetings,

I have long used modem control lines via GPIO with the IMX driver for
RS485 via rts-gpios in the scenario where an RS485 transceiver
transmit enable is connected to a GPIO representing RTS.

Therefore I 'thought' that one could use rts-gpios and cts-gpios for
hardware flow control on an IMX UART but it appears I may be wrong as
when I define those along with 'uart-has-rtscts' UART communication
ceases between the IMX and a device using hardware flow control.

As an example take the following which describes a UART with RTSCTS
flow control connected to a broadcom Bluetooth HCI radio:

The following works:
&uart4 {
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_uart4>,<&pinctrl_bten>;
        uart-has-rtscts;
        status = "okay";

        bluetooth {
                compatible = "brcm,bcm4330-bt";
                shutdown-gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>;
        };
};

&iomuxc {
        pinctrl_bten: btengrp {
                fsl,pins = <
                        MX6QDL_PAD_GPIO_2__GPIO1_IO02           0x1b0b1
                >;
        };

        pinctrl_uart4: uart4grp {
                fsl,pins = <
                        MX6QDL_PAD_CSI0_DAT12__UART4_TX_DATA    0x1b0b1
                        MX6QDL_PAD_CSI0_DAT13__UART4_RX_DATA    0x1b0b1
                        MX6QDL_PAD_CSI0_DAT16__UART4_RTS_B      0x1b0b1
                        MX6QDL_PAD_CSI0_DAT17__UART4_CTS_B      0x1b0b1
                >;
        };
};

The following where I've replaced the RTS/CTS with gpio does not work:
&uart4 {
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_uart4>,<&pinctrl_bten>;
        rts-gpios = <&gpio6 2 GPIO_ACTIVE_LOW>;
        cts-gpios = <&gpio6 3 GPIO_ACTIVE_LOW>;
        uart-has-rtscts;
        status = "okay";

        bluetooth {
                compatible = "brcm,bcm4330-bt";
                shutdown-gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>;
        };
};

&iomuxc {
        pinctrl_bten: btengrp {
                fsl,pins = <
                        MX6QDL_PAD_GPIO_2__GPIO1_IO02           0x1b0b1
                >;
        };

        pinctrl_uart4: uart4grp {
                fsl,pins = <
                        MX6QDL_PAD_CSI0_DAT12__UART4_TX_DATA    0x1b0b1
                        MX6QDL_PAD_CSI0_DAT13__UART4_RX_DATA    0x1b0b1
                        MX6QDL_PAD_CSI0_DAT16__GPIO6_IO02       0x1b0b1
                        MX6QDL_PAD_CSI0_DAT17__GPIO6_IO03       0x1b0b1
                >;
        };
};

In the above example of course I could simply use the version that
works but the reason I want to use rts-gpios and cts-gpios is that I
have cases where I don't have access to the RTS/CTS pinmux options and
thus can only use gpio's.

I'm hoping perhaps I just have something misconfigured or that perhaps
something simple is missing from drivers/tty/serial/imx.c in order to
use gpio's as hardware flow control. I've tried flipping the rts/cts
gpios and polarity in case I had something simply backwards but that
still did not work.

Any ideas or suggestions?

Best regards,

Tim



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux