mbox series

[V2,0/2] Add rs485 support to uartps driver

Message ID 20231011145602.3619616-1-manikanta.guntupalli@amd.com
Headers show
Series Add rs485 support to uartps driver | expand

Message

Manikanta Guntupalli Oct. 11, 2023, 2:56 p.m. UTC
Add optional gpio property to uartps node to support rs485.
Add rs485 support to uartps driver.
---
Changes for V2:
Modify optional gpio name to xlnx,phy-ctrl-gpios.
Update commit description.
Add support for RTS, delay_rts_before_send and delay_rts_after_send in RS485 mode.

Manikanta Guntupalli (2):
  dt-bindings: Add optional gpio property to uartps node to support
    rs485
  tty: serial: uartps: Add rs485 support to uartps driver

 .../devicetree/bindings/serial/cdns,uart.yaml |   6 +
 drivers/tty/serial/xilinx_uartps.c            | 116 +++++++++++++++++-
 2 files changed, 121 insertions(+), 1 deletion(-)

Comments

Maarten Brock Oct. 13, 2023, 11:17 a.m. UTC | #1
Rob Herring wrote on 2023-10-12 22:51:
>> How about introducing an rs485 generic gpios property instead of xlnx
>> private one? See also rs485-term-gpios and rs485-rx-during-tx-gpios.
>> 
>> Also note that every kernel driver expects to use RTS for this 
>> purpose.
>> So why not give this driver the option to choose a gpio instead of its
>> native RTS? And from there on use the rts route?
>> What if someone wants to use normal (non-rs485) RTS on a GPIO instead
>> of the native pin?
>> 
>> @Rob Herring
>> I am curious to know how the rs485 maintainers look at this.
> 
> Ask them.

Funny, your name is the only one listed under the maintainers in
Documentation/devicetree/bindings/serial/rs485.yaml

And there is no mention of (RS-)485 in MAINTAINERS.

> We already have 'rts-gpios'. If that's what's always used, then perhaps
> we should use that in the RS485 case too?
> 
> Rob

Sounds like a good idea.

Maarten