diff mbox series

ARM: dts: rockchip: use DMA channels for UARTs of TinkerBoard

Message ID 20200314142327.25568-1-katsuhiro@katsuster.net (mailing list archive)
State New, archived
Headers show
Series ARM: dts: rockchip: use DMA channels for UARTs of TinkerBoard | expand

Commit Message

Katsuhiro Suzuki March 14, 2020, 2:23 p.m. UTC
This patch enables to use DMAC for all UARTs that are connected to
dmac_peri core for TinkerBoard.

Only uart2 is connected different DMAC (dmac_bus_s) so keep current
settings on this patch.

Signed-off-by: Katsuhiro Suzuki <katsuhiro@katsuster.net>
---
 arch/arm/boot/dts/rk3288-tinker.dtsi | 8 ++++++++
 1 file changed, 8 insertions(+)

Comments

Heiko Stübner March 14, 2020, 3:09 p.m. UTC | #1
Hi,

Am Samstag, 14. März 2020, 15:23:27 CET schrieb Katsuhiro Suzuki:
> This patch enables to use DMAC for all UARTs that are connected to
> dmac_peri core for TinkerBoard.
> 
> Only uart2 is connected different DMAC (dmac_bus_s) so keep current
> settings on this patch.

This belongs in rk3288.dtsi, as this is definitly not board-specific, as
the dma-uart connection is done inside the soc.

At least on arm64 (rk3328, px30, probably more) we already have the
uart dmas in the core dtsi without any problems.

Is there any reason why you only did add it to the tinker board only?


Heiko


> Signed-off-by: Katsuhiro Suzuki <katsuhiro@katsuster.net>
> ---
>  arch/arm/boot/dts/rk3288-tinker.dtsi | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/rk3288-tinker.dtsi b/arch/arm/boot/dts/rk3288-tinker.dtsi
> index 312582c1bd37..6efabeaf3c6d 100644
> --- a/arch/arm/boot/dts/rk3288-tinker.dtsi
> +++ b/arch/arm/boot/dts/rk3288-tinker.dtsi
> @@ -491,10 +491,14 @@ &tsadc {
>  };
>  
>  &uart0 {
> +	dmas = <&dmac_peri 1>, <&dmac_peri 2>;
> +	dma-names = "tx", "rx";
>  	status = "okay";
>  };
>  
>  &uart1 {
> +	dmas = <&dmac_peri 3>, <&dmac_peri 4>;
> +	dma-names = "tx", "rx";
>  	status = "okay";
>  };
>  
> @@ -503,10 +507,14 @@ &uart2 {
>  };
>  
>  &uart3 {
> +	dmas = <&dmac_peri 7>, <&dmac_peri 8>;
> +	dma-names = "tx", "rx";
>  	status = "okay";
>  };
>  
>  &uart4 {
> +	dmas = <&dmac_peri 9>, <&dmac_peri 10>;
> +	dma-names = "tx", "rx";
>  	status = "okay";
>  };
>  
>
Katsuhiro Suzuki March 15, 2020, 9:44 a.m. UTC | #2
Hello Heiko,

> This belongs in rk3288.dtsi, as this is definitly not board-specific, as
> the dma-uart connection is done inside the soc.
> 
> At least on arm64 (rk3328, px30, probably more) we already have the
> uart dmas in the core dtsi without any problems.
> 
> Is there any reason why you only did add it to the tinker board only?

There is no special reason. Simply I don't have and not tested on other
boards of RK3288. But I hope these DMA settings can work correctly on
other boards.

I'll resend patch for rk3288.dtsi.

Best Regards,
Katsuhiro Suzuki


On 2020/03/15 0:09, Heiko Stübner wrote:
> Hi,
> 
> Am Samstag, 14. März 2020, 15:23:27 CET schrieb Katsuhiro Suzuki:
>> This patch enables to use DMAC for all UARTs that are connected to
>> dmac_peri core for TinkerBoard.
>>
>> Only uart2 is connected different DMAC (dmac_bus_s) so keep current
>> settings on this patch.
> 
> This belongs in rk3288.dtsi, as this is definitly not board-specific, as
> the dma-uart connection is done inside the soc.
> 
> At least on arm64 (rk3328, px30, probably more) we already have the
> uart dmas in the core dtsi without any problems.
> 
> Is there any reason why you only did add it to the tinker board only?
> 
> 
> Heiko
> 
> 
>> Signed-off-by: Katsuhiro Suzuki <katsuhiro@katsuster.net>
>> ---
>>   arch/arm/boot/dts/rk3288-tinker.dtsi | 8 ++++++++
>>   1 file changed, 8 insertions(+)
>>
>> diff --git a/arch/arm/boot/dts/rk3288-tinker.dtsi b/arch/arm/boot/dts/rk3288-tinker.dtsi
>> index 312582c1bd37..6efabeaf3c6d 100644
>> --- a/arch/arm/boot/dts/rk3288-tinker.dtsi
>> +++ b/arch/arm/boot/dts/rk3288-tinker.dtsi
>> @@ -491,10 +491,14 @@ &tsadc {
>>   };
>>   
>>   &uart0 {
>> +	dmas = <&dmac_peri 1>, <&dmac_peri 2>;
>> +	dma-names = "tx", "rx";
>>   	status = "okay";
>>   };
>>   
>>   &uart1 {
>> +	dmas = <&dmac_peri 3>, <&dmac_peri 4>;
>> +	dma-names = "tx", "rx";
>>   	status = "okay";
>>   };
>>   
>> @@ -503,10 +507,14 @@ &uart2 {
>>   };
>>   
>>   &uart3 {
>> +	dmas = <&dmac_peri 7>, <&dmac_peri 8>;
>> +	dma-names = "tx", "rx";
>>   	status = "okay";
>>   };
>>   
>>   &uart4 {
>> +	dmas = <&dmac_peri 9>, <&dmac_peri 10>;
>> +	dma-names = "tx", "rx";
>>   	status = "okay";
>>   };
>>   
>>
> 
> 
> 
> 
>
diff mbox series

Patch

diff --git a/arch/arm/boot/dts/rk3288-tinker.dtsi b/arch/arm/boot/dts/rk3288-tinker.dtsi
index 312582c1bd37..6efabeaf3c6d 100644
--- a/arch/arm/boot/dts/rk3288-tinker.dtsi
+++ b/arch/arm/boot/dts/rk3288-tinker.dtsi
@@ -491,10 +491,14 @@  &tsadc {
 };
 
 &uart0 {
+	dmas = <&dmac_peri 1>, <&dmac_peri 2>;
+	dma-names = "tx", "rx";
 	status = "okay";
 };
 
 &uart1 {
+	dmas = <&dmac_peri 3>, <&dmac_peri 4>;
+	dma-names = "tx", "rx";
 	status = "okay";
 };
 
@@ -503,10 +507,14 @@  &uart2 {
 };
 
 &uart3 {
+	dmas = <&dmac_peri 7>, <&dmac_peri 8>;
+	dma-names = "tx", "rx";
 	status = "okay";
 };
 
 &uart4 {
+	dmas = <&dmac_peri 9>, <&dmac_peri 10>;
+	dma-names = "tx", "rx";
 	status = "okay";
 };