.../boot/dts/rockchip/rk3566-radxa-zero-3.dtsi | 15 +++++++++++++++ arch/arm64/boot/dts/rockchip/rk356x-base.dtsi | 9 +++++++++ 2 files changed, 24 insertions(+)
The default pinctrl definitions for the Radxa Zero 3W don't match the datasheet. Possibly few people enable extra UARTs and hence it wasn't noticed? I needed all 5 UARTs for a project and the first patch corrects the pinctrl defs. Without this patch, enabling the extra UARTs causes issues such as the MMC devices disappearing, due to collisions. Second patch adds a dma-names property, which appears to be a pre-requisite for enabling DMA on the UARTs. I've applied this to the base rk356x-base.dtsi as it seems like a change that should apply to all SOMs? However, I confess ignorance in this area, so could I ask for a second opinion before anyone applies this? It's tested on my Zero 3W board and appears to function correctly and DMA is reported as enabled. Ed Wildgoose (2): arm64: dts: rockchip: correct uart mux for Radxa ZERO 3 rockchip: dts: Enable UART DMA by adding default dma-names property .../boot/dts/rockchip/rk3566-radxa-zero-3.dtsi | 15 +++++++++++++++ arch/arm64/boot/dts/rockchip/rk356x-base.dtsi | 9 +++++++++ 2 files changed, 24 insertions(+) -- 2.49.0
Based on feedback, I reworked these patches. I've re-presented both as I realise that one had invalid formatting (spaces vs tabs) and I've moved the dma-names definition into the same board level dtsi. At this point it seems reasonable to also squash the two patches, but feedback appreciated? The default pinctrl definitions for the Radxa Zero 3W don't match the datasheet. Possibly few people enable extra UARTs and hence it wasn't noticed? I needed all 5 UARTs for a project and the first patch corrects the pinctrl defs. Without this patch, enabling the extra UARTs causes issues such as the MMC devices disappearing, due to collisions. Second patch adds a dma-names property, which appears to be a pre-requisite for enabling DMA on the UARTs. I've applied this to the board level dts as feedback suggested there could be unintended problems if enabled across the complete rockchip dtsi. It's tested on my Zero 3W board and appears to function correctly and DMA is reported as enabled. Ed Wildgoose (2): arm64: dts: rockchip: correct uart mux for Radxa ZERO 3 rockchip: dts: Enable UART DMA by adding default dma-names property .../dts/rockchip/rk3566-radxa-zero-3.dtsi | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) -- 2.49.0
Hi Ed, Am Donnerstag, 18. September 2025, 11:32:44 Mitteleuropäische Sommerzeit schrieb Ed Wildgoose: > Based on feedback, I reworked these patches. I've re-presented both as > I realise that one had invalid formatting (spaces vs tabs) and I've > moved the dma-names definition into the same board level dtsi. At this > point it seems reasonable to also squash the two patches, but feedback > appreciated? > > The default pinctrl definitions for the Radxa Zero 3W don't match the > datasheet. Possibly few people enable extra UARTs and hence it wasn't > noticed? I needed all 5 UARTs for a project and the first patch corrects > the pinctrl defs. Without this patch, enabling the extra UARTs causes > issues such as the MMC devices disappearing, due to collisions. > > Second patch adds a dma-names property, which appears to be a > pre-requisite for enabling DMA on the UARTs. I've applied this to the > board level dts as feedback suggested there could be unintended problems > if enabled across the complete rockchip dtsi. > > It's tested on my Zero 3W board and appears to function correctly and > DMA is reported as enabled. housekeeping requests: - please don't attach new versions to an old thread, but instead start a new thread - this is supposed to be v2, so patches should be named "[PATCH v2 0/2] ..." etc. At least the cover-letter should contain a changelog what changed between versions. Heiko
The rk3566 has multiplexed pins and the uarts can be moved to a choice
of 2 pin groups. The default rk356x-base.dtsi appears to default to mux0
for all uarts, however, specific hardware might choose to implement
alternatives
The Radxa zero 3 shows that is uses M1 for uarts:
- uart4
- uart5
- uart9
These aren't normally enabled, but we should at least correct the
default pinctrl definitions. Without these changes there will be
conflicts with mmc0/mmc1, leading to the SD or eMMC going missing.
Signed-off-by: Ed Wildgoose <lists@wildgooses.com>
---
.../boot/dts/rockchip/rk3566-radxa-zero-3.dtsi | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3566-radxa-zero-3.dtsi b/arch/arm64/boot/dts/rockchip/rk3566-radxa-zero-3.dtsi
index 1ee5d96a4..e644bfc9c 100644
--- a/arch/arm64/boot/dts/rockchip/rk3566-radxa-zero-3.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3566-radxa-zero-3.dtsi
@@ -492,6 +492,21 @@ &uart2 {
status = "okay";
};
+&uart4{
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart4m1_xfer>;
+};
+
+&uart5 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart5m1_xfer>;
+};
+
+&uart9 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart9m1_xfer>;
+};
+
&usb_host0_xhci {
status = "okay";
};
--
2.49.0
Kernel appears to need a dma-names set for DMA to actually enable. Set a
default dma-names property for all UARTs defined in the board
definition: rk3566-radxa-zero-3.dtsi
This is tested on a Radxa Zero 3W (which has 5x UARTs) and removes the
warnings and enables DMA on this platform
Signed-off-by: Ed Wildgoose <lists@wildgooses.com>
---
arch/arm64/boot/dts/rockchip/rk3566-radxa-zero-3.dtsi | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3566-radxa-zero-3.dtsi b/arch/arm64/boot/dts/rockchip/rk3566-radxa-zero-3.dtsi
index e644bfc9c..fc26a4a52 100644
--- a/arch/arm64/boot/dts/rockchip/rk3566-radxa-zero-3.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3566-radxa-zero-3.dtsi
@@ -488,21 +488,29 @@ &tsadc {
status = "okay";
};
+&uart1 {
+ dma-names = "tx", "rx";
+};
+
&uart2 {
+ dma-names = "tx", "rx";
status = "okay";
};
&uart4{
+ dma-names = "tx", "rx";
pinctrl-names = "default";
pinctrl-0 = <&uart4m1_xfer>;
};
&uart5 {
+ dma-names = "tx", "rx";
pinctrl-names = "default";
pinctrl-0 = <&uart5m1_xfer>;
};
&uart9 {
+ dma-names = "tx", "rx";
pinctrl-names = "default";
pinctrl-0 = <&uart9m1_xfer>;
};
--
2.49.0
Hi, Am Donnerstag, 18. September 2025, 11:32:46 Mitteleuropäische Sommerzeit schrieb Ed Wildgoose: > Kernel appears to need a dma-names set for DMA to actually enable. Set a > default dma-names property for all UARTs defined in the board > definition: rk3566-radxa-zero-3.dtsi > > This is tested on a Radxa Zero 3W (which has 5x UARTs) and removes the > warnings and enables DMA on this platform the kernel does not _need_ the dmas and the uart will work just fine without. And as was pointed out in the previous version, the uarts have possible stability issues, when connected to specific peripherals So I'd prefer to not enable uart dmas "just for fun". Heiko > Signed-off-by: Ed Wildgoose <lists@wildgooses.com> > --- > arch/arm64/boot/dts/rockchip/rk3566-radxa-zero-3.dtsi | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/arch/arm64/boot/dts/rockchip/rk3566-radxa-zero-3.dtsi b/arch/arm64/boot/dts/rockchip/rk3566-radxa-zero-3.dtsi > index e644bfc9c..fc26a4a52 100644 > --- a/arch/arm64/boot/dts/rockchip/rk3566-radxa-zero-3.dtsi > +++ b/arch/arm64/boot/dts/rockchip/rk3566-radxa-zero-3.dtsi > @@ -488,21 +488,29 @@ &tsadc { > status = "okay"; > }; > > +&uart1 { > + dma-names = "tx", "rx"; > +}; > + > &uart2 { > + dma-names = "tx", "rx"; > status = "okay"; > }; > > &uart4{ > + dma-names = "tx", "rx"; > pinctrl-names = "default"; > pinctrl-0 = <&uart4m1_xfer>; > }; > > &uart5 { > + dma-names = "tx", "rx"; > pinctrl-names = "default"; > pinctrl-0 = <&uart5m1_xfer>; > }; > > &uart9 { > + dma-names = "tx", "rx"; > pinctrl-names = "default"; > pinctrl-0 = <&uart9m1_xfer>; > }; >
© 2016 - 2025 Red Hat, Inc.