--- Begin Message ---
- To: Sudeep Holla <sudeep.holla@xxxxxxx>, Cristian Marussi <cristian.marussi@xxxxxxx>, Rob Herring <robh+dt@xxxxxxxxxx>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@xxxxxxxxxx>, Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>, Liam Girdwood <lgirdwood@xxxxxxxxx>, Mark Brown <broonie@xxxxxxxxxx>, Nicolas Frattaroli <frattaroli.nicolas@xxxxxxxxx>, Heiko Stuebner <heiko@xxxxxxxxx>, Jaroslav Kysela <perex@xxxxxxxx>, Takashi Iwai <tiwai@xxxxxxxx>, Paul Walmsley <paul.walmsley@xxxxxxxxxx>, Palmer Dabbelt <palmer@xxxxxxxxxxx>, Albert Ou <aou@xxxxxxxxxxxxxxxxx>, Daniel Drake <drake@xxxxxxxxxxxx>, Katsuhiro Suzuki <katsuhiro@xxxxxxxxxxxxx>
- Subject: [PATCH 02/11] dt-bindings: serial: snps-dw-apb-uart: Relax dma-names order constraint
- From: Cristian Ciocaltea <cristian.ciocaltea@xxxxxxxxxxxxx>
- Date: Wed, 15 Mar 2023 13:47:57 +0200
- Cc: linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, devicetree@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, linux-serial@xxxxxxxxxxxxxxx, alsa-devel@xxxxxxxxxxxxxxxx, linux-rockchip@xxxxxxxxxxxxxxxxxxx, linux-riscv@xxxxxxxxxxxxxxxxxxx, kernel@xxxxxxxxxxxxx
- In-reply-to: <20230315114806.3819515-1-cristian.ciocaltea@collabora.com>
- References: <20230315114806.3819515-1-cristian.ciocaltea@collabora.com>
Commit 370f696e4474 ("dt-bindings: serial: snps-dw-apb-uart: add dma &
dma-names properties") documented dma-names property to handle Allwiner
D1 dtbs_check warnings, but relies on a strict rx->tx ordering, which is
the reverse of what a different board expects:
rk3326-odroid-go2.dtb: serial@ff030000: dma-names:0: 'rx' was expected
A quick and incomplete check shows the inconsistency is present in many
other DT files:
$ git grep -A10 snps,dw-apb-uart | grep dma-names | sort -u
arch/arm64/boot/dts/rockchip/px30.dtsi- dma-names = "tx", "rx";
arch/arm64/boot/dts/rockchip/rk3328.dtsi- dma-names = "tx", "rx";
arch/arm64/boot/dts/rockchip/rk3588s.dtsi- dma-names = "tx", "rx";
arch/arm/boot/dts/rk3066a.dtsi- dma-names = "tx", "rx";
arch/arm/boot/dts/rk3128.dtsi- dma-names = "tx", "rx";
arch/arm/boot/dts/rk3288.dtsi- dma-names = "tx", "rx";
arch/arm/boot/dts/rv1126.dtsi- dma-names = "tx", "rx";
arch/arm/boot/dts/socfpga.dtsi- dma-names = "tx", "rx";
arch/arm/boot/dts/sun6i-a31.dtsi- dma-names = "rx", "tx";
arch/arm/boot/dts/sun8i-a23-a33.dtsi- dma-names = "rx", "tx";
arch/arm/boot/dts/sun8i-v3s.dtsi- dma-names = "rx", "tx";
arch/arm/boot/dts/sunxi-h3-h5.dtsi- dma-names = "rx", "tx";
arch/riscv/boot/dts/allwinner/sunxi-d1s-t113.dtsi- dma-names = "rx", "tx";
Do not enforce the order of the dma-names items.
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@xxxxxxxxxxxxx>
---
.../devicetree/bindings/serial/snps-dw-apb-uart.yaml | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml b/Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml
index 2becdfab4f15..d374844a61a5 100644
--- a/Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml
+++ b/Documentation/devicetree/bindings/serial/snps-dw-apb-uart.yaml
@@ -71,9 +71,13 @@ properties:
minItems: 2
dma-names:
- items:
- - const: rx
- - const: tx
+ oneOf:
+ - items:
+ - const: tx
+ - const: rx
+ - items:
+ - const: rx
+ - const: tx
snps,uart-16550-compatible:
description: reflects the value of UART_16550_COMPATIBLE configuration
--
2.39.1
--- End Message ---