* [PATCH v2 0/2] serial: 8250_dw: Add support for UltraRISC DP1000 uart
@ 2026-03-16 6:33 Jia Wang via B4 Relay
2026-03-16 6:33 ` [PATCH v2 1/2] dt-bindings: serial: update bindings of ultrarisc dp1000 uart Jia Wang via B4 Relay
2026-03-16 6:33 ` [PATCH v2 2/2] riscv: ultrarisc: 8250_dw: support DP1000 uart Jia Wang via B4 Relay
0 siblings, 2 replies; 8+ messages in thread
From: Jia Wang via B4 Relay @ 2026-03-16 6:33 UTC (permalink / raw)
To: Ilpo Järvinen, Andy Shevchenko, Greg Kroah-Hartman,
Jiri Slaby, Paul Walmsley, Palmer Dabbelt, Albert Ou,
Alexandre Ghiti, Rob Herring, Krzysztof Kozlowski, Conor Dooley
Cc: linux-kernel, linux-serial, linux-riscv, devicetree, Jia Wang,
Yao Zi, Zhang Xincheng
This is version 2 of the patch series.
Previous version was sent via local SMTP, some recipients received it.
This series is now sent via official web endpoint.
This patch series adds support for the UltraRISC DP1000 UART controller.
The series includes two patches:
1. Update device tree bindings to document the DP1000 UART compatible string
and required properties.
2. Add driver support in the 8250_dw driver by handling the DP1000-specific
initialization and configuration.
The patches have been tested on Ultrarisc DP1000 development board with
Linux v7.0-rc2, verifying basic UART functionality and runtime suspend/resume.
Signed-off-by: Jia Wang <wangjia@ultrarisc.com>
---
Changes in v2:
- Rebased on Linux v7.0-rc4 (previously on v7.0-rc2).
- Reordered patch series: DT binding patch comes before driver changes.
- Updated commit message for DT binding patch.
- Link to v1: https://patch.msgid.link/20260316-ultrarisc-serial-v1-0-c464f3e933a5@ultrarisc.com
---
Jia Wang (1):
dt-bindings: serial: update bindings of ultrarisc dp1000 uart
Zhang Xincheng (1):
riscv: ultrarisc: 8250_dw: support DP1000 uart
.../devicetree/bindings/serial/snps-dw-apb-uart.yaml | 2 ++
drivers/tty/serial/8250/8250_dw.c | 12 ++++++++++++
2 files changed, 14 insertions(+)
---
base-commit: f338e77383789c0cae23ca3d48adcc5e9e137e3c
change-id: 20260309-ultrarisc-serial-64ff637edf26
Best regards,
--
Jia Wang <wangjia@ultrarisc.com>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v2 1/2] dt-bindings: serial: update bindings of ultrarisc dp1000 uart
2026-03-16 6:33 [PATCH v2 0/2] serial: 8250_dw: Add support for UltraRISC DP1000 uart Jia Wang via B4 Relay
@ 2026-03-16 6:33 ` Jia Wang via B4 Relay
2026-03-16 8:11 ` Krzysztof Kozlowski
2026-03-16 8:12 ` Krzysztof Kozlowski
2026-03-16 6:33 ` [PATCH v2 2/2] riscv: ultrarisc: 8250_dw: support DP1000 uart Jia Wang via B4 Relay
1 sibling, 2 replies; 8+ messages in thread
From: Jia Wang via B4 Relay @ 2026-03-16 6:33 UTC (permalink / raw)
To: Ilpo Järvinen, Andy Shevchenko, Greg Kroah-Hartman,
Jiri Slaby, Paul Walmsley, Palmer Dabbelt, Albert Ou,
Alexandre Ghiti, Rob Herring, Krzysztof Kozlowski, Conor Dooley
Cc: linux-kernel, linux-serial, linux-riscv, devicetree, Jia Wang,
Yao Zi
From: Jia Wang <wangjia@ultrarisc.com>
Add DP1000 UART compatible information
Signed-off-by: Jia Wang <wangjia@ultrarisc.com>
Reviewed-by: Yao Zi <me@ziyao.cc>
---
Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml b/Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml
index 6efe43089a74..0040ed28e35b 100644
--- a/Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml
+++ b/Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml
@@ -78,6 +78,8 @@ properties:
- starfive,jh7100-uart
- starfive,jh7110-uart
- const: snps,dw-apb-uart
+ - items:
+ - const: ultrarisc,dp1000-uart
- const: snps,dw-apb-uart
reg:
--
2.34.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v2 2/2] riscv: ultrarisc: 8250_dw: support DP1000 uart
2026-03-16 6:33 [PATCH v2 0/2] serial: 8250_dw: Add support for UltraRISC DP1000 uart Jia Wang via B4 Relay
2026-03-16 6:33 ` [PATCH v2 1/2] dt-bindings: serial: update bindings of ultrarisc dp1000 uart Jia Wang via B4 Relay
@ 2026-03-16 6:33 ` Jia Wang via B4 Relay
2026-03-16 11:35 ` Andy Shevchenko
1 sibling, 1 reply; 8+ messages in thread
From: Jia Wang via B4 Relay @ 2026-03-16 6:33 UTC (permalink / raw)
To: Ilpo Järvinen, Andy Shevchenko, Greg Kroah-Hartman,
Jiri Slaby, Paul Walmsley, Palmer Dabbelt, Albert Ou,
Alexandre Ghiti, Rob Herring, Krzysztof Kozlowski, Conor Dooley
Cc: linux-kernel, linux-serial, linux-riscv, devicetree, Jia Wang,
Zhang Xincheng
From: Zhang Xincheng <zhangxincheng@ultrarisc.com>
The UART of DP1000 does not support automatic detection of
buffer size. skip_autocfg needs to be set to true
Signed-off-by: Zhang Xincheng <zhangxincheng@ultrarisc.com>
Signed-off-by: Jia Wang <wangjia@ultrarisc.com>
---
drivers/tty/serial/8250/8250_dw.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/drivers/tty/serial/8250/8250_dw.c b/drivers/tty/serial/8250/8250_dw.c
index db73b2ae17fa..6a2acf173331 100644
--- a/drivers/tty/serial/8250/8250_dw.c
+++ b/drivers/tty/serial/8250/8250_dw.c
@@ -56,6 +56,7 @@
#define DW_UART_QUIRK_IS_DMA_FC BIT(3)
#define DW_UART_QUIRK_APMC0D08 BIT(4)
#define DW_UART_QUIRK_CPR_VALUE BIT(5)
+#define DW_UART_QUIRK_FIXED_TYPE BIT(6)
struct dw8250_platform_data {
u8 usr_reg;
@@ -514,6 +515,11 @@ static void dw8250_quirks(struct uart_port *p, struct dw8250_data *data)
data->data.dma.prepare_tx_dma = dw8250_prepare_tx_dma;
data->data.dma.prepare_rx_dma = dw8250_prepare_rx_dma;
}
+ if (quirks & DW_UART_QUIRK_FIXED_TYPE) {
+ p->flags |= UPF_FIXED_TYPE;
+ p->type = PORT_16550A;
+ data->skip_autocfg = true;
+ }
if (quirks & DW_UART_QUIRK_APMC0D08) {
p->iotype = UPIO_MEM32;
p->regshift = 2;
@@ -789,6 +795,11 @@ static const struct dw8250_platform_data dw8250_skip_set_rate_data = {
.quirks = DW_UART_QUIRK_SKIP_SET_RATE,
};
+static const struct dw8250_platform_data dw8250_ultrarisc_dp1000_data = {
+ .usr_reg = DW_UART_USR,
+ .quirks = DW_UART_QUIRK_FIXED_TYPE,
+};
+
static const struct of_device_id dw8250_of_match[] = {
{ .compatible = "snps,dw-apb-uart", .data = &dw8250_dw_apb },
{ .compatible = "cavium,octeon-3860-uart", .data = &dw8250_octeon_3860_data },
@@ -796,6 +807,7 @@ static const struct of_device_id dw8250_of_match[] = {
{ .compatible = "renesas,rzn1-uart", .data = &dw8250_renesas_rzn1_data },
{ .compatible = "sophgo,sg2044-uart", .data = &dw8250_skip_set_rate_data },
{ .compatible = "starfive,jh7100-uart", .data = &dw8250_skip_set_rate_data },
+ { .compatible = "ultrarisc,dp1000-uart", .data = &dw8250_ultrarisc_dp1000_data },
{ /* Sentinel */ }
};
MODULE_DEVICE_TABLE(of, dw8250_of_match);
--
2.34.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH v2 1/2] dt-bindings: serial: update bindings of ultrarisc dp1000 uart
2026-03-16 6:33 ` [PATCH v2 1/2] dt-bindings: serial: update bindings of ultrarisc dp1000 uart Jia Wang via B4 Relay
@ 2026-03-16 8:11 ` Krzysztof Kozlowski
2026-03-16 8:12 ` Krzysztof Kozlowski
1 sibling, 0 replies; 8+ messages in thread
From: Krzysztof Kozlowski @ 2026-03-16 8:11 UTC (permalink / raw)
To: Jia Wang
Cc: Ilpo Järvinen, Andy Shevchenko, Greg Kroah-Hartman,
Jiri Slaby, Paul Walmsley, Palmer Dabbelt, Albert Ou,
Alexandre Ghiti, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
linux-kernel, linux-serial, linux-riscv, devicetree, Yao Zi
On Mon, Mar 16, 2026 at 02:33:22PM +0800, Jia Wang wrote:
> Add DP1000 UART compatible information
We see this from the diff. Why this is not compatible with
snps,dw-apb-uart? What are the differences. You have entire commit msg
to explain the hardware.
>
> Signed-off-by: Jia Wang <wangjia@ultrarisc.com>
> Reviewed-by: Yao Zi <me@ziyao.cc>
> ---
> Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml b/Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml
> index 6efe43089a74..0040ed28e35b 100644
> --- a/Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml
> +++ b/Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml
> @@ -78,6 +78,8 @@ properties:
> - starfive,jh7100-uart
> - starfive,jh7110-uart
> - const: snps,dw-apb-uart
> + - items:
Drop, not needed.
> + - const: ultrarisc,dp1000-uart
> - const: snps,dw-apb-uart
So just enum with the snps one.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2 1/2] dt-bindings: serial: update bindings of ultrarisc dp1000 uart
2026-03-16 6:33 ` [PATCH v2 1/2] dt-bindings: serial: update bindings of ultrarisc dp1000 uart Jia Wang via B4 Relay
2026-03-16 8:11 ` Krzysztof Kozlowski
@ 2026-03-16 8:12 ` Krzysztof Kozlowski
1 sibling, 0 replies; 8+ messages in thread
From: Krzysztof Kozlowski @ 2026-03-16 8:12 UTC (permalink / raw)
To: Jia Wang
Cc: Ilpo Järvinen, Andy Shevchenko, Greg Kroah-Hartman,
Jiri Slaby, Paul Walmsley, Palmer Dabbelt, Albert Ou,
Alexandre Ghiti, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
linux-kernel, linux-serial, linux-riscv, devicetree, Yao Zi
On Mon, Mar 16, 2026 at 02:33:22PM +0800, Jia Wang wrote:
> Add DP1000 UART compatible information
>
A nit, subject: drop second/last, redundant "bindings". The
"dt-bindings" prefix is already stating that these are bindings.
See also:
https://elixir.bootlin.com/linux/v6.17-rc3/source/Documentation/devicetree/bindings/submitting-patches.rst#L18
And anything can be "update". Be specific. Look at other commits how
commits and their subjects are written.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2 2/2] riscv: ultrarisc: 8250_dw: support DP1000 uart
2026-03-16 6:33 ` [PATCH v2 2/2] riscv: ultrarisc: 8250_dw: support DP1000 uart Jia Wang via B4 Relay
@ 2026-03-16 11:35 ` Andy Shevchenko
2026-04-17 7:32 ` Jia Wang
0 siblings, 1 reply; 8+ messages in thread
From: Andy Shevchenko @ 2026-03-16 11:35 UTC (permalink / raw)
To: wangjia
Cc: Ilpo Järvinen, Greg Kroah-Hartman, Jiri Slaby, Paul Walmsley,
Palmer Dabbelt, Albert Ou, Alexandre Ghiti, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, linux-kernel, linux-serial,
linux-riscv, devicetree, Zhang Xincheng
On Mon, Mar 16, 2026 at 02:33:23PM +0800, Jia Wang via B4 Relay wrote:
> The UART of DP1000 does not support automatic detection of
> buffer size. skip_autocfg needs to be set to true
Missed period at the end.
...
> +#define DW_UART_QUIRK_FIXED_TYPE BIT(6)
Seems unrequired.
But to make sure, can you elaborate what's going on here?
What is the reads from UCV and CPR registers?
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2 2/2] riscv: ultrarisc: 8250_dw: support DP1000 uart
2026-03-16 11:35 ` Andy Shevchenko
@ 2026-04-17 7:32 ` Jia Wang
2026-04-17 7:46 ` Andy Shevchenko
0 siblings, 1 reply; 8+ messages in thread
From: Jia Wang @ 2026-04-17 7:32 UTC (permalink / raw)
To: Andy Shevchenko
Cc: wangjia, Ilpo Järvinen, Greg Kroah-Hartman, Jiri Slaby,
Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-kernel,
linux-serial, linux-riscv, devicetree, Zhang Xincheng
On 2026-03-16 13:35 +0200, Andy Shevchenko wrote:
> On Mon, Mar 16, 2026 at 02:33:23PM +0800, Jia Wang via B4 Relay wrote:
>
> > The UART of DP1000 does not support automatic detection of
> > buffer size. skip_autocfg needs to be set to true
>
> Missed period at the end.
>
Thanks, I will fix the missing period.
>
> ...
>
> > +#define DW_UART_QUIRK_FIXED_TYPE BIT(6)
>
> Seems unrequired.
>
> But to make sure, can you elaborate what's going on here?
> What is the reads from UCV and CPR registers?
>
Apologies for the delayed response.
Our DW UART implementation on DP1000 does not provide the CPR/UCV capability
registers, and reads from both registers always return 0. As a result, the
autodetection logic in 8250_dw cannot obtain meaningful capability
information.
To handle this, the current approach is to skip autodetection and rely on
fixed configuration via a quirk.
If there is a preferred or more appropriate way to support DW UART instances
without CPR/UCV, I would be happy to adjust the implementation based on your
suggestions.
> --
> With Best Regards,
> Andy Shevchenko
>
>
>
Best Regards,
Jia Wang
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2 2/2] riscv: ultrarisc: 8250_dw: support DP1000 uart
2026-04-17 7:32 ` Jia Wang
@ 2026-04-17 7:46 ` Andy Shevchenko
0 siblings, 0 replies; 8+ messages in thread
From: Andy Shevchenko @ 2026-04-17 7:46 UTC (permalink / raw)
To: Jia Wang
Cc: Ilpo Järvinen, Greg Kroah-Hartman, Jiri Slaby, Paul Walmsley,
Palmer Dabbelt, Albert Ou, Alexandre Ghiti, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, linux-kernel, linux-serial,
linux-riscv, devicetree, Zhang Xincheng
On Fri, Apr 17, 2026 at 03:32:17PM +0800, Jia Wang wrote:
> On 2026-03-16 13:35 +0200, Andy Shevchenko wrote:
> > On Mon, Mar 16, 2026 at 02:33:23PM +0800, Jia Wang via B4 Relay wrote:
...
> > > +#define DW_UART_QUIRK_FIXED_TYPE BIT(6)
> >
> > Seems unrequired.
> >
> > But to make sure, can you elaborate what's going on here?
> > What is the reads from UCV and CPR registers?
>
> Apologies for the delayed response.
>
> Our DW UART implementation on DP1000 does not provide the CPR/UCV capability
> registers, and reads from both registers always return 0. As a result, the
> autodetection logic in 8250_dw cannot obtain meaningful capability
> information.
>
> To handle this, the current approach is to skip autodetection and rely on
> fixed configuration via a quirk.
>
> If there is a preferred or more appropriate way to support DW UART instances
> without CPR/UCV, I would be happy to adjust the implementation based on your
> suggestions.
Why can't you provide a CPR value via the existing quirk?
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2026-04-17 7:46 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-16 6:33 [PATCH v2 0/2] serial: 8250_dw: Add support for UltraRISC DP1000 uart Jia Wang via B4 Relay
2026-03-16 6:33 ` [PATCH v2 1/2] dt-bindings: serial: update bindings of ultrarisc dp1000 uart Jia Wang via B4 Relay
2026-03-16 8:11 ` Krzysztof Kozlowski
2026-03-16 8:12 ` Krzysztof Kozlowski
2026-03-16 6:33 ` [PATCH v2 2/2] riscv: ultrarisc: 8250_dw: support DP1000 uart Jia Wang via B4 Relay
2026-03-16 11:35 ` Andy Shevchenko
2026-04-17 7:32 ` Jia Wang
2026-04-17 7:46 ` Andy Shevchenko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox