From 7a5a48e8a30fc9f1289b31699e1f39a85f6298fe Mon Sep 17 00:00:00 2001 From: Chen Jiali Date: Thu, 5 Sep 2024 17:02:02 +0800 Subject: [PATCH] feat: add rockchip-uart-dma * closes https://github.com/radxa-pkg/radxa-overlays/issues/366 --- .../arm64/boot/dts/rockchip/overlays/Makefile | 3 +- .../rockchip/overlays/rockchip-uart-dma.dts | 53 +++++++++++++++++++ 2 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 arch/arm64/boot/dts/rockchip/overlays/rockchip-uart-dma.dts diff --git a/arch/arm64/boot/dts/rockchip/overlays/Makefile b/arch/arm64/boot/dts/rockchip/overlays/Makefile index 72127751..1613d571 100644 --- a/arch/arm64/boot/dts/rockchip/overlays/Makefile +++ b/arch/arm64/boot/dts/rockchip/overlays/Makefile @@ -564,7 +564,8 @@ dtb-$(CONFIG_CPU_RK3588) += \ rock-5t-radxa-display-10fhd.dtbo \ rock-5t-radxa-display-10hd.dtbo -dtb-$(CONFIG_ARCH_ROCKCHIP) += rockchip-watchdog.dtbo +dtb-$(CONFIG_ARCH_ROCKCHIP) += rockchip-watchdog.dtbo \ + rockchip-uart-dma.dtbo dtbotxt-$(CONFIG_ARCH_ROCKCHIP) += \ README.overlays diff --git a/arch/arm64/boot/dts/rockchip/overlays/rockchip-uart-dma.dts b/arch/arm64/boot/dts/rockchip/overlays/rockchip-uart-dma.dts new file mode 100644 index 00000000..c7dbeda0 --- /dev/null +++ b/arch/arm64/boot/dts/rockchip/overlays/rockchip-uart-dma.dts @@ -0,0 +1,53 @@ +/dts-v1/; +/plugin/; + +/ { + metadata { + title = "Enable DMA transfer mode for all UARTs"; + compatible = "rockchip,rk3566", "rockchip,rk3568", "rockchip,rk3588"; + category = "misc"; + description = "Enable DMA transfer mode for all UARTs. +DMA mode can help alleviating the CPU load when the data rate is high. +It is not necessary to enable it at low data rate, as DMA requires additional resources to set up."; + }; +}; + +&uart0 { + dma-names = "tx", "rx"; +}; + +&uart1 { + dma-names = "tx", "rx"; +}; + +&uart2 { + dma-names = "tx", "rx"; +}; + +&uart3 { + dma-names = "tx", "rx"; +}; + +&uart4 { + dma-names = "tx", "rx"; +}; + +&uart5 { + dma-names = "tx", "rx"; +}; + +&uart6 { + dma-names = "tx", "rx"; +}; + +&uart7 { + dma-names = "tx", "rx"; +}; + +&uart8 { + dma-names = "tx", "rx"; +}; + +&uart9 { + dma-names = "tx", "rx"; +};