linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/7] Add RS485 support to DW UART
@ 2022-03-02  9:55 Ilpo Järvinen
  2022-03-02  9:56 ` [PATCH 1/7] serial: 8250_dwlib: RS485 HW half duplex support Ilpo Järvinen
                   ` (6 more replies)
  0 siblings, 7 replies; 34+ messages in thread
From: Ilpo Järvinen @ 2022-03-02  9:55 UTC (permalink / raw)
  To: linux-serial, Jiri Slaby, Greg Kroah-Hartman
  Cc: linux-kernel, Lukas Wunner, Johan Hovold, Andy Shevchenko,
	Heikki Krogerus, Ilpo Järvinen

This patchset adds RS-485 support to the DW UART driver. The patchset
has two main parts. The first part adds HW support for RS-485 itself
in various modes of operation and the second part focuses on enabling
9th bit addressing mode that can be used on a multipoint RS-485
communications line.

SW half-duplex patch (3/7) depends on UART_CAP_NOTEMT for which there
is existing work from others:
  https://marc.info/?l=linux-kernel&m=161245538311420&w=2
That patchset is not yet applied (and requires revision from its
author).

To configure multipoint addressing, ADDRB flag is added to termios
and two new IOCTLs are added into serial core. On the driver side,
I looked into using mux subsystem but its model didn't seem to match
well enough to how RS-485 multipoint can be operated.

I'm aware of the RS485 changes Lino Sanfilippo recently posted
which will make one assignment in the patchset redundant. I'll make
the adjustment if those get applied.

Ilpo Järvinen (7):
  serial: 8250_dwlib: RS485 HW half duplex support
  serial: 8250_dwlib: RS485 HW full duplex support
  serial: 8250_dwlib: Implement SW half duplex support
  dt_bindings: snps-dw-apb-uart: Add RS485
  serial: termbits: ADDRB to indicate 9th bit addressing mode
  serial: General support for multipoint addresses
  serial: 8250_dwlib: Support for 9th bit multipoint addressing

 .../bindings/serial/snps-dw-apb-uart.yaml     |  17 ++
 .../driver-api/serial/serial-rs485.rst        |  23 +-
 arch/alpha/include/uapi/asm/ioctls.h          |   3 +
 arch/alpha/include/uapi/asm/termbits.h        |   1 +
 arch/mips/include/uapi/asm/ioctls.h           |   3 +
 arch/mips/include/uapi/asm/termbits.h         |   1 +
 arch/parisc/include/uapi/asm/ioctls.h         |   3 +
 arch/parisc/include/uapi/asm/termbits.h       |   1 +
 arch/powerpc/include/uapi/asm/ioctls.h        |   3 +
 arch/powerpc/include/uapi/asm/termbits.h      |   1 +
 arch/sh/include/uapi/asm/ioctls.h             |   3 +
 arch/sparc/include/uapi/asm/ioctls.h          |   3 +
 arch/sparc/include/uapi/asm/termbits.h        |   1 +
 arch/xtensa/include/uapi/asm/ioctls.h         |   3 +
 drivers/tty/amiserial.c                       |   6 +-
 drivers/tty/moxa.c                            |   1 +
 drivers/tty/mxser.c                           |   1 +
 drivers/tty/serial/8250/8250_core.c           |   2 +
 drivers/tty/serial/8250/8250_dwlib.c          | 246 +++++++++++++++++-
 drivers/tty/serial/8250/8250_dwlib.h          |   6 +
 drivers/tty/serial/serial_core.c              |  62 +++++
 drivers/tty/tty_ioctl.c                       |   2 +
 drivers/usb/serial/usb-serial.c               |   5 +-
 include/linux/serial_core.h                   |   6 +
 include/uapi/asm-generic/ioctls.h             |   3 +
 include/uapi/asm-generic/termbits.h           |   1 +
 include/uapi/linux/serial.h                   |  10 +
 27 files changed, 410 insertions(+), 7 deletions(-)

-- 
2.30.2


^ permalink raw reply	[flat|nested] 34+ messages in thread

end of thread, other threads:[~2022-03-10 14:11 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-02  9:55 [PATCH 0/7] Add RS485 support to DW UART Ilpo Järvinen
2022-03-02  9:56 ` [PATCH 1/7] serial: 8250_dwlib: RS485 HW half duplex support Ilpo Järvinen
2022-03-06 18:48   ` Lukas Wunner
2022-03-06 22:07     ` Andy Shevchenko
2022-03-07  9:19       ` Ilpo Järvinen
2022-03-07 19:18         ` Lukas Wunner
2022-03-07 19:39           ` Andy Shevchenko
2022-03-08 12:16             ` Ilpo Järvinen
2022-03-08 12:22               ` Lukas Wunner
2022-03-08 12:59                 ` Ilpo Järvinen
2022-03-08 14:50                   ` Lukas Wunner
2022-03-08 14:53                     ` Andy Shevchenko
2022-03-08 20:30                       ` Lukas Wunner
2022-03-09  9:51                         ` Ilpo Järvinen
2022-03-07 10:54     ` Ilpo Järvinen
2022-03-09  8:52       ` Lukas Wunner
2022-03-09 12:19       ` Ilpo Järvinen
2022-03-09 12:59         ` Lukas Wunner
2022-03-02  9:56 ` [PATCH 2/7] serial: 8250_dwlib: RS485 HW full " Ilpo Järvinen
2022-03-06 18:51   ` Lukas Wunner
2022-03-07  9:22     ` Ilpo Järvinen
2022-03-02  9:56 ` [RFC PATCH 3/7] serial: 8250_dwlib: Implement SW half " Ilpo Järvinen
2022-03-06 19:21   ` Lukas Wunner
2022-03-06 22:13     ` Andy Shevchenko
2022-03-02  9:56 ` [PATCH 4/7] dt_bindings: snps-dw-apb-uart: Add RS485 Ilpo Järvinen
2022-03-02 17:47   ` Rob Herring
2022-03-02  9:56 ` [RFC PATCH 5/7] serial: termbits: ADDRB to indicate 9th bit addressing mode Ilpo Järvinen
2022-03-02  9:56 ` [RFC PATCH 6/7] serial: General support for multipoint addresses Ilpo Järvinen
2022-03-06 19:40   ` Lukas Wunner
2022-03-07  9:48     ` Ilpo Järvinen
2022-03-09 19:05       ` Lukas Wunner
2022-03-10 12:29         ` Ilpo Järvinen
2022-03-10 14:09         ` Andy Shevchenko
2022-03-02  9:56 ` [RFC PATCH 7/7] serial: 8250_dwlib: Support for 9th bit multipoint addressing Ilpo Järvinen

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).