From: Binbin Zhou <zhoubinbin@loongson.cn>
To: Binbin Zhou <zhoubb.aaron@gmail.com>,
Huacai Chen <chenhuacai@loongson.cn>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jiri Slaby <jirislaby@kernel.org>,
Haowei Zheng <zhenghaowei@loongson.cn>
Cc: Huacai Chen <chenhuacai@kernel.org>,
Xuerui Wang <kernel@xen0n.name>,
loongarch@lists.linux.dev, ilpo.jarvinen@linux.intel.com,
linux-serial@vger.kernel.org,
Binbin Zhou <zhoubinbin@loongson.cn>
Subject: [PATCH v6 0/3] uart: Introduce uart driver for the Loongson family
Date: Sat, 11 Oct 2025 15:16:46 +0800 [thread overview]
Message-ID: <cover.1760166651.git.zhoubinbin@loongson.cn> (raw)
Hi all:
For various reasons, I will be taking over from Haowei and continuing to
push forward with this patch set. Thanks to Haowei for his efforts so
far.
This patchset introduce a generic UART framework driver for Loongson family.
It can be found on Loongson3 series cpus, Loongson-2K series cpus and Loongson
LS7A bridge chips.
Thanks.
------
V6:
Patch-1:
- Add Conor's Acked-by tag, thanks.
Patch-2:
- Add more missing #include;
- Convert mcr_invert/msr_invert from int to u8;
- Split serial_fixup() on a preceding line;
- Add macro definition to avoid magic numbers, such as
LOONGSON_QUOT_FRAC_MASK;
- Rework the relevant data structures, where `loongson_uart_ddata`
represents the Soc's driver_data;
- Drop `PORT_LOONGSON` and use PORT_16550A instead.
- devm_platform_get_and_ioremap_resource() instead of platform_get_resource();
- Use uart_read_port_properties() and parse the clock attributes;
- Use switch-case instead of if-else in serial_fixup().
Link to V5:
https://lore.kernel.org/all/cover.1758676290.git.zhoubinbin@loongson.cn/
V5:
Patch-1:
- Since the Loongson UART is NS8250A-compatible, simply add ls2k* compatible to 8250.yaml.
DTS{i} tested by `make dtbs_check W=1`
Link to V4:
https://lore.kernel.org/all/cover.1757318368.git.zhoubinbin@loongson.cn/
V4:
Patch-1:
- Rename binding name from loongson,uart.yaml to
loongson,ls2k0500-uart.yaml;
- Drop ls7a compatible;
- According to the manual, ls3a and ls2k uart are the same, so merge their
compatible.
Patch-2:
- Format code;
- Add the LOONGSON_UART_DLF macro definition to avoid magic numbers;
- Simplify the code, merge flags and quirks, and remove struct
loongson_uart_config;
- Use DEFINE_SIMPLE_DEV_PM_OPS;
- Drop loongson,ls7a-uart compatible.
Patch-3:
- Add ls2k* compatible string, and ns16550a as the fallback
compatible.
Link to V3:
https://lore.kernel.org/all/20240826024705.55474-1-zhenghaowei@loongson.cn/
Binbin Zhou (3):
dt-bindings: serial: 8250: Add Loongson uart compatible
serial: 8250: Add Loongson uart driver support
LoongArch: dts: Add uart new compatible string
.../devicetree/bindings/serial/8250.yaml | 14 ++
arch/loongarch/boot/dts/loongson-2k0500.dtsi | 2 +-
arch/loongarch/boot/dts/loongson-2k1000.dtsi | 2 +-
arch/loongarch/boot/dts/loongson-2k2000.dtsi | 2 +-
drivers/tty/serial/8250/8250_loongson.c | 238 ++++++++++++++++++
drivers/tty/serial/8250/Kconfig | 10 +
drivers/tty/serial/8250/Makefile | 1 +
7 files changed, 266 insertions(+), 3 deletions(-)
create mode 100644 drivers/tty/serial/8250/8250_loongson.c
base-commit: 0d97f2067c166eb495771fede9f7b73999c67f66
--
2.47.3
next reply other threads:[~2025-10-11 7:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-11 7:16 Binbin Zhou [this message]
2025-10-11 7:16 ` [PATCH v6 1/3] dt-bindings: serial: 8250: Add Loongson uart compatible Binbin Zhou
2025-10-11 7:16 ` [PATCH v6 2/3] serial: 8250: Add Loongson uart driver support Binbin Zhou
2025-10-11 7:16 ` [PATCH v6 3/3] LoongArch: dts: Add uart new compatible string Binbin Zhou
2025-10-16 14:37 ` [PATCH v6 0/3] uart: Introduce uart driver for the Loongson family Huacai Chen
2025-10-31 2:36 ` Binbin Zhou
2025-10-31 16:30 ` Greg Kroah-Hartman
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=cover.1760166651.git.zhoubinbin@loongson.cn \
--to=zhoubinbin@loongson.cn \
--cc=chenhuacai@kernel.org \
--cc=chenhuacai@loongson.cn \
--cc=gregkh@linuxfoundation.org \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=jirislaby@kernel.org \
--cc=kernel@xen0n.name \
--cc=linux-serial@vger.kernel.org \
--cc=loongarch@lists.linux.dev \
--cc=zhenghaowei@loongson.cn \
--cc=zhoubb.aaron@gmail.com \
/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