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.

8250_omap serial driver RS-485 support

I need to have RS-485 TXEN support in a serial device. I had it working fine, after configuring the UART2 in the device tree as follows:

&uart2 {
	pinctrl-names = "default", "sleep";
	pinctrl-0 = <&xxxx_pins>;
	pinctrl-1 = <&xxxx_pins_sleep>;

	/* GPIO1 pin 17 for data direction */
	rts-gpio = <&gpio1 17 GPIO_ACTIVE_HIGH>;
	rs485-rts-active-high;
	rs485-rts-delay = <0 0>;		/* in milliseconds */
	linux,rs485-enabled-at-boot-time;

	status = "okay";
};

But I found that after pulling in some recent linux-ti-staging kernel changes from the last week or so, it has stopped working. I see a commit 37de5ba0b1 comment "Switch to newer 8250_omap driver supporting DMA" so it looks as though a different driver is now in use.

I'm using the linux-ti-staging kernel, branch ti-linux-3.14.y, from Yocto, using the meta-ti layer.

Does this new driver support RS-485? If not, what are TI's plans for future RS-485 support with this driver?

In the short term, what is needed to regain RS-485 support? Is it as simple as reverting the kernel config change in git commit 37de5ba0b1?

  • Hi Craig,

    Craig McQueen said:
    In the short term, what is needed to regain RS-485 support? Is it as simple as reverting the kernel config change in git commit 37de5ba0b1?

    For a short term solution revert back to the commit that works for you.

    Has the commit, with comment "Switch to newer 8250_omap driver supporting ", been approved?

    What I get from http://processors.wiki.ti.com/index.php/Sitara_Linux_SDK_UART_-_Switching_to_8250_Driver#Overview TI is currently migrating from the old omap-serial driver to the generic 8250 serial driver:
    "The 8250 UART driver framework has been used for many years for several processors including x86. Therefore, TI plans on shifting away from omap-serial driver to the generic 8250 framework. 8250 support for OMAP devices was accepted into mainline 3.19 kernel."

    I would expect that there may be some problems with 8250 driver, especially if you use sources on which there is some ongoing development.

    Best Regards,

    Yordan

  • Thank you, I have reverted the driver change in the short term.

    > Has the commit, with comment "Switch to newer 8250_omap driver supporting ", been approved?

    I don't think I understand TI's Linux kernel support policy (where is it documented?). I'm using the kernel 3.14.x that is in the meta-ti layer, master branch, for Yocto. The commit is included in that.

    Going forward, will the 8250 omap driver have RS-485 support? That is a valuable feature, and I'm sure there will be others who also want it.
  • Hi Craig,

    Sorry for the delayed response.

    Craig McQueen said:
    I don't think I understand TI's Linux kernel support policy (where is it documented?).

    I mean is there some code review system on the repository, where the community shares its findings with the patches... but this is different for every repository. This is not TI support policy,

    Craig McQueen said:
    Going forward, will the 8250 omap driver have RS-485 support?

    I think it should support itl.

    Best Regards,
    Yordan

  • Has this been fixed in the meta-ti layer yet? I am having a parsing error with the rs485 RTS gpio conifg in 3.14.47.

    of_get_named_gpiod_flags: can't parse gpios property of node '/ocp/serial@48024000[0]'

    Chuck
  • I don't know; I've just been using the older driver with the following kernel config changes:

    CONFIG_SERIAL_8250_OMAP=n
    CONFIG_SERIAL_8250_OMAP_TTYO_FIXUP=n
    CONFIG_SERIAL_OMAP=y