serial: 8250: Add Loongson-2K3000 UART support
Subsystems (3)
v2 cover serial: 8250: Add Loongson-2K3000 UART support
Hi all:
This series add UART support for Loongson-2K3000.
Thanks.
Binbin
========
V2:
- Add Reviewed-by tag;
- Remove the original patch for the Loongson-2K0300 UART;
- Add ls2k3000-uart to the existing enum instead of adding a separate two-item block.
Link to V1:
https://lore.kernel.org/all/[email protected]/
Binbin Zhou (2):
dt-bindings: serial: 8250: Document Loongson-2K3000 UART compatible
serial: 8250_loongson: Add Loongson-2K3000 UART support
Documentation/devicetree/bindings/serial/8250.yaml | 1 + drivers/tty/serial/8250/8250_loongson.c | 7 +++++++ 2 files changed, 8 insertions(+)
base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4
Signature · 1 line
2.52.0
PATCH v2 1/2 dt-bindings: serial: 8250: Document Loongson-2K3000 UART compatible
The Loongson-2K3000 UART does not require MCR/MSR signal inversion, unlike earlier Loongson UARTs. Add a dedicated compatible so the driver can distinguish it from the existing Loongson UART variants.
--- Documentation/devicetree/bindings/serial/8250.yaml | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/serial/8250.yaml +1 -0
@@ -137,6 +137,7 @@ properties: - ti,da830-uart - loongson,ls2k0500-uart - loongson,ls2k1500-uart + - loongson,ls2k3000-uart - const: ns16550a - items: - enum:
Signature · 1 line
2.52.0
PATCH v2 2/2 serial: 8250_loongson: Add Loongson-2K3000 UART support
In reply to Binbin ZhouThe Loongson-2K3000 UART differs from earlier Loongson UARTs in that it does not require MCR/MSR signal inversion. It also supports a fractional baud rate divisor.
Add the corresponding OF match entry for loongson,ls2k3000-uart so the driver can probe with the new driver data.
--- drivers/tty/serial/8250/8250_loongson.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/tty/serial/8250/8250_loongson.c +7 -0
@@ -43,6 +43,12 @@ static const struct loongson_uart_ddata ls2k1500_uart_data = { .msr_invert = 0, }; +static const struct loongson_uart_ddata ls2k3000_uart_data = { + .has_frac = true, + .mcr_invert =0 , + .msr_invert =0 , +}; +struct loongson_uart_priv {struct uart_8250_port *uport;struct clk *clk;
@@ -216,6 +222,7 @@ static DEFINE_SIMPLE_DEV_PM_OPS(loongson_uart_pm_ops, loongson_uart_suspend,static const struct of_device_id loongson_uart_of_ids[] = { { .compatible ="loongson,ls2k0500-uart" , .data = &ls2k0500_uart_data }, { .compatible ="loongson,ls2k1500-uart" , .data = &ls2k1500_uart_data }, + { .compatible ="loongson,ls2k3000-uart" , .data = &ls2k3000_uart_data }, { }, };MODULE_DEVICE_TABLE (of, loongson_uart_of_ids);
Signature · 1 line
2.52.0
[email protected]
AI reviewSashiko has reviewed this 2-patch series and found no issues.
Sashiko has reviewed this 2-patch series and found no issues.
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]