diff mbox series

[5/7] arm64: dts: allwinner: h6: Add RX DMA channel for SPDIF

Message ID 20240122170518.3090814-6-wens@kernel.org
State New
Headers show
Series None | expand

Commit Message

Chen-Yu Tsai Jan. 22, 2024, 5:05 p.m. UTC
From: Chen-Yu Tsai <wens@csie.org>

The SPDIF hardware found on the H6 supports both transmit and receive
functions. However it is missing the RX DMA channel.

Add the SPDIF hardware block's RX DMA channel. Also remove the
by-default pinmux, since the end device can choose to implement
either or both functionalities.

Fixes: f95b598df419 ("arm64: dts: allwinner: Add SPDIF node for Allwinner H6")
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
 arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts | 2 ++
 arch/arm64/boot/dts/allwinner/sun50i-h6-tanix.dtsi      | 2 ++
 arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi            | 7 +++----
 3 files changed, 7 insertions(+), 4 deletions(-)

Comments

Andre Przywara Jan. 23, 2024, 12:39 a.m. UTC | #1
On Tue, 23 Jan 2024 01:05:16 +0800
Chen-Yu Tsai <wens@kernel.org> wrote:

> From: Chen-Yu Tsai <wens@csie.org>
> 
> The SPDIF hardware found on the H6 supports both transmit and receive
> functions. However it is missing the RX DMA channel.
> 
> Add the SPDIF hardware block's RX DMA channel. Also remove the
> by-default pinmux, since the end device can choose to implement
> either or both functionalities.
> 
> Fixes: f95b598df419 ("arm64: dts: allwinner: Add SPDIF node for Allwinner H6")
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>

Looks alright, just moving lines around, order of rx, tx DMA is correct:

Reviewed-by: Andre Przywara <andre.przywara@arm.com>

Cheers,
Andre

> ---
>  arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts | 2 ++
>  arch/arm64/boot/dts/allwinner/sun50i-h6-tanix.dtsi      | 2 ++
>  arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi            | 7 +++----
>  3 files changed, 7 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts
> index 9ec49ac2f6fd..381d58cea092 100644
> --- a/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts
> @@ -291,6 +291,8 @@ sw {
>  };
>  
>  &spdif {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&spdif_tx_pin>;
>  	status = "okay";
>  };
>  
> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-tanix.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6-tanix.dtsi
> index 4903d6358112..855b7d43bc50 100644
> --- a/arch/arm64/boot/dts/allwinner/sun50i-h6-tanix.dtsi
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-tanix.dtsi
> @@ -166,6 +166,8 @@ &r_ir {
>  };
>  
>  &spdif {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&spdif_tx_pin>;
>  	status = "okay";
>  };
>  
> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
> index ca1d287a0a01..d11e5041bae9 100644
> --- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
> @@ -406,6 +406,7 @@ spi1_cs_pin: spi1-cs-pin {
>  				function = "spi1";
>  			};
>  
> +			/omit-if-no-ref/
>  			spdif_tx_pin: spdif-tx-pin {
>  				pins = "PH7";
>  				function = "spdif";
> @@ -655,10 +656,8 @@ spdif: spdif@5093000 {
>  			clocks = <&ccu CLK_BUS_SPDIF>, <&ccu CLK_SPDIF>;
>  			clock-names = "apb", "spdif";
>  			resets = <&ccu RST_BUS_SPDIF>;
> -			dmas = <&dma 2>;
> -			dma-names = "tx";
> -			pinctrl-names = "default";
> -			pinctrl-0 = <&spdif_tx_pin>;
> +			dmas = <&dma 2>, <&dma 2>;
> +			dma-names = "rx", "tx";
>  			status = "disabled";
>  		};
>
Jernej Škrabec Jan. 23, 2024, 5:52 p.m. UTC | #2
Dne ponedeljek, 22. januar 2024 ob 18:05:16 CET je Chen-Yu Tsai napisal(a):
> From: Chen-Yu Tsai <wens@csie.org>
> 
> The SPDIF hardware found on the H6 supports both transmit and receive
> functions. However it is missing the RX DMA channel.
> 
> Add the SPDIF hardware block's RX DMA channel. Also remove the
> by-default pinmux, since the end device can choose to implement
> either or both functionalities.
> 
> Fixes: f95b598df419 ("arm64: dts: allwinner: Add SPDIF node for Allwinner H6")
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>

Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>

Best regards,
Jernej
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts
index 9ec49ac2f6fd..381d58cea092 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts
@@ -291,6 +291,8 @@  sw {
 };
 
 &spdif {
+	pinctrl-names = "default";
+	pinctrl-0 = <&spdif_tx_pin>;
 	status = "okay";
 };
 
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-tanix.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6-tanix.dtsi
index 4903d6358112..855b7d43bc50 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6-tanix.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-tanix.dtsi
@@ -166,6 +166,8 @@  &r_ir {
 };
 
 &spdif {
+	pinctrl-names = "default";
+	pinctrl-0 = <&spdif_tx_pin>;
 	status = "okay";
 };
 
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
index ca1d287a0a01..d11e5041bae9 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
@@ -406,6 +406,7 @@  spi1_cs_pin: spi1-cs-pin {
 				function = "spi1";
 			};
 
+			/omit-if-no-ref/
 			spdif_tx_pin: spdif-tx-pin {
 				pins = "PH7";
 				function = "spdif";
@@ -655,10 +656,8 @@  spdif: spdif@5093000 {
 			clocks = <&ccu CLK_BUS_SPDIF>, <&ccu CLK_SPDIF>;
 			clock-names = "apb", "spdif";
 			resets = <&ccu RST_BUS_SPDIF>;
-			dmas = <&dma 2>;
-			dma-names = "tx";
-			pinctrl-names = "default";
-			pinctrl-0 = <&spdif_tx_pin>;
+			dmas = <&dma 2>, <&dma 2>;
+			dma-names = "rx", "tx";
 			status = "disabled";
 		};