Linux Serial subsystem development
 help / color / mirror / Atom feed
From: zjzhao@edatec.cn
To: gregkh@linuxfoundation.org
Cc: jirislaby@kernel.org, robh@kernel.org, krzk+dt@kernel.org,
	conor+dt@kernel.org, linux-kernel@vger.kernel.org,
	linux-serial@vger.kernel.org, devicetree@vger.kernel.org,
	Zi Jie Zhao <zjzhao@edatec.cn>
Subject: [PATCH v4 0/2] WK2xxx SPI to UART bridge driver
Date: Tue,  8 Sep 2026 18:31:27 +0800	[thread overview]
Message-ID: <20260908103129.58085-1-zjzhao@edatec.cn> (raw)

From: Zi Jie Zhao <zjzhao@edatec.cn>

Add support for the WK2xxx family of SPI to UART bridge ICs from Chengdu
Weikai Microelectronics (WKmic): WK2124, WK2132, WK2168, WK2202 and WK2204.

Base the driver on the vendor's open-source implementation:
https://github.com/britus/wk2xxx/blob/master/spi-wk2xxx.c

Use the company's website domain, http://www.wkmic.com/, for the vendor
prefix.

Describe the external reference clock with the standard "clocks" property
and model each UART as a "serial@N" child node.

Changes in v4:

- Rename the binding file to "wkmic,wk2124.yaml" so its filename matches a
  compatible string;
- Replace "clock-frequency" with a required standard "clocks" input;
- Document why individual compatible strings are retained: the two-channel
  WK2132 and WK2202 do not have the hardware flow-control and RS-485
  registers present on the four-channel variants;
- Identify the maintainer as Zi Jie Zhao and document the vendor website and
  source attribution;
- Remove the unnecessary "linux/mod_devicetable.h" include;
- Describe hardware flow control and RS-485 support per chip variant;
- Retain the v3 fixes for IRQ setup and teardown, polling lifetime, SPI error
  handling, cache-safe shared buffers, and bounded IRQ processing.

Testing:

- Run dt_binding_check with the WK2xxx binding;
- Build the driver for an ARM64 target;
- IPC12 with WK2132 on SPI0: reboot, load the driver successfully, and
  register ttyWK0 and ttyWK1 with IRQ 184 and base_baud 691200;
- SBC2300 with WK2204: run four-port TX stress and repeated module
  unload/load with closed ports.

Zi Jie Zhao (2):
  dt-bindings: serial: Document WK2xxx SPI UART
  serial: wk2xxx: Add WK2xxx SPI UART driver

 .../bindings/serial/wkmic,wk2124.yaml         |  119 ++
 .../devicetree/bindings/vendor-prefixes.yaml  |    2 +
 drivers/tty/serial/Kconfig                    |   17 +
 drivers/tty/serial/Makefile                   |    1 +
 drivers/tty/serial/wk2xxx.c                   | 1433 +++++++++++++++++
 include/uapi/linux/serial_core.h              |    3 +
 6 files changed, 1575 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/serial/wkmic,wk2124.yaml
 create mode 100644 drivers/tty/serial/wk2xxx.c

-- 
2.43.0

             reply	other threads:[~2026-09-08 10:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-08 10:31 zjzhao [this message]
2026-09-08 10:31 ` [PATCH v4 1/2] dt-bindings: serial: Document WK2xxx SPI UART zjzhao
2026-09-08 10:38   ` sashiko-bot
2026-09-08 17:49   ` Conor Dooley
2026-09-08 10:31 ` [PATCH v4 2/2] serial: wk2xxx: Add WK2xxx SPI UART driver zjzhao
2026-09-08 10:44   ` sashiko-bot
2026-09-08 17:51   ` Hugo Villeneuve

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260908103129.58085-1-zjzhao@edatec.cn \
    --to=zjzhao@edatec.cn \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jirislaby@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox