* Support for RS485 on 8250 clone
@ 2014-07-28 15:19 Ricardo Ribalda Delgado
2014-07-28 16:40 ` Grant Edwards
2014-07-29 6:10 ` Jiří Prchal
0 siblings, 2 replies; 3+ messages in thread
From: Ricardo Ribalda Delgado @ 2014-07-28 15:19 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-serial
Hello
I have a device with a Fintek F81216A LPC to 4 Uart device.
One of the uarts is used as half duplex rs485 serial port. This means
that it needs to be configured properly (logical level of rts, delays,
etc...)
I see that there is an API on the kernel to do this (TIOCGRS485),
unfortunately the 8250 driver does not support it.
1) Is there any interest on supporting this kind of hardware on the kernel?
2) Some driver that I could use for inspiration?
Thanks and best regards!
--
Ricardo Ribalda
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Support for RS485 on 8250 clone
2014-07-28 15:19 Support for RS485 on 8250 clone Ricardo Ribalda Delgado
@ 2014-07-28 16:40 ` Grant Edwards
2014-07-29 6:10 ` Jiří Prchal
1 sibling, 0 replies; 3+ messages in thread
From: Grant Edwards @ 2014-07-28 16:40 UTC (permalink / raw)
To: linux-serial
On 2014-07-28, Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> wrote:
> Hello
>
> I have a device with a Fintek F81216A LPC to 4 Uart device.
>
> One of the uarts is used as half duplex rs485 serial port. This means
> that it needs to be configured properly (logical level of rts, delays,
> etc...)
>
> I see that there is an API on the kernel to do this (TIOCGRS485),
> unfortunately the 8250 driver does not support it.
That's mostly due to how crappy the 8250 UART design is.
> 1) Is there any interest on supporting this kind of hardware on the
> kernel?
Sure. That would be brilliant.
Many years ago, I tried to do implement half-duplex support for the
8250 but failed. It would work on one motherboard but not the next.
There didn't seem to be a reliable way to know when the last stop bit
had been sent: the tx shift register empty status didn't go active at
a predicatble point. On some implementations it went true before the
stop bit was sent. On some afterwards. On some, part way through the
stop bit.
Even if the tx shift register empty bit did work predictably, you have
to do a busy/wait polling loop because that status bit can't generate
an interrupt, so there's no way trigger the required action (shut off
RTS or start a delay timer to do the same).
> 2) Some driver that I could use for inspiration?
Not that I know of.
--
Grant Edwards grant.b.edwards Yow! Are we THERE yet?
at
gmail.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Support for RS485 on 8250 clone
2014-07-28 15:19 Support for RS485 on 8250 clone Ricardo Ribalda Delgado
2014-07-28 16:40 ` Grant Edwards
@ 2014-07-29 6:10 ` Jiří Prchal
1 sibling, 0 replies; 3+ messages in thread
From: Jiří Prchal @ 2014-07-29 6:10 UTC (permalink / raw)
To: Ricardo Ribalda Delgado, Greg Kroah-Hartman, linux-serial
Hi,
as I know, the 8250 chip does not support RS485 rx/tx hw switching. You can do sw switching on some gpio.
HW switching suports 16550 or higher.
Dne 28.7.2014 v 17:19 Ricardo Ribalda Delgado napsal(a):
> Hello
>
> I have a device with a Fintek F81216A LPC to 4 Uart device.
>
> One of the uarts is used as half duplex rs485 serial port. This means
> that it needs to be configured properly (logical level of rts, delays,
> etc...)
>
> I see that there is an API on the kernel to do this (TIOCGRS485),
> unfortunately the 8250 driver does not support it.
>
> 1) Is there any interest on supporting this kind of hardware on the kernel?
It would be nice.
>
> 2) Some driver that I could use for inspiration?
Try Advantech web site, they have some, but not GPL.
>
> Thanks and best regards!
>
>
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-07-29 6:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-28 15:19 Support for RS485 on 8250 clone Ricardo Ribalda Delgado
2014-07-28 16:40 ` Grant Edwards
2014-07-29 6:10 ` Jiří Prchal
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).