diff mbox series

[7/7] arm64: dts: allwinner: h616: Add SPDIF device node

Message ID 20240122170518.3090814-8-wens@kernel.org (mailing list archive)
State Superseded
Headers show
Series arm64: sun50i-h616: Add DMA and SPDIF controllers | expand

Commit Message

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

The H616 SoC has an SPDIF transmitter hardware block, which has the same
layout as the one in the H6, minus the receiver side.

Add a device node for it, and a default pinmux.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
---
 .../arm64/boot/dts/allwinner/sun50i-h616.dtsi | 20 +++++++++++++++++++
 1 file changed, 20 insertions(+)

Comments

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

Hi,

> From: Chen-Yu Tsai <wens@csie.org>
> 
> The H616 SoC has an SPDIF transmitter hardware block, which has the same
> layout as the one in the H6, minus the receiver side.
> 
> Add a device node for it, and a default pinmux.
>
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>

Compared the details against the manual, the clock driver, and the
binding, they match:

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

Cheers,
Andre

> ---
>  .../arm64/boot/dts/allwinner/sun50i-h616.dtsi | 20 +++++++++++++++++++
>  1 file changed, 20 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
> index a0268439f3be..fd4c080b8e62 100644
> --- a/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
> @@ -253,6 +253,11 @@ spi1_cs0_pin: spi1-cs0-pin {
>  				function = "spi1";
>  			};
>  
> +			spdif_tx_pin: spdif-tx-pin {
> +				pins = "PH4";
> +				function = "spdif";
> +			};
> +
>  			uart0_ph_pins: uart0-ph-pins {
>  				pins = "PH0", "PH1";
>  				function = "uart0";
> @@ -550,6 +555,21 @@ mdio0: mdio {
>  			};
>  		};
>  
> +		spdif: spdif@5093000 {
> +			compatible = "allwinner,sun50i-h616-spdif";
> +			reg = <0x05093000 0x400>;
> +			interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
> +			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>;
> +			#sound-dai-cells = <0>;
> +			status = "disabled";
> +		};
> +
>  		usbotg: usb@5100000 {
>  			compatible = "allwinner,sun50i-h616-musb",
>  				     "allwinner,sun8i-h3-musb";
Jernej Škrabec Jan. 23, 2024, 5:53 p.m. UTC | #2
Dne ponedeljek, 22. januar 2024 ob 18:05:18 CET je Chen-Yu Tsai napisal(a):
> From: Chen-Yu Tsai <wens@csie.org>
> 
> The H616 SoC has an SPDIF transmitter hardware block, which has the same
> layout as the one in the H6, minus the receiver side.
> 
> Add a device node for it, and a default pinmux.
> 
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>

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

Best regards,
Jernej
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
index a0268439f3be..fd4c080b8e62 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
@@ -253,6 +253,11 @@  spi1_cs0_pin: spi1-cs0-pin {
 				function = "spi1";
 			};
 
+			spdif_tx_pin: spdif-tx-pin {
+				pins = "PH4";
+				function = "spdif";
+			};
+
 			uart0_ph_pins: uart0-ph-pins {
 				pins = "PH0", "PH1";
 				function = "uart0";
@@ -550,6 +555,21 @@  mdio0: mdio {
 			};
 		};
 
+		spdif: spdif@5093000 {
+			compatible = "allwinner,sun50i-h616-spdif";
+			reg = <0x05093000 0x400>;
+			interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
+			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>;
+			#sound-dai-cells = <0>;
+			status = "disabled";
+		};
+
 		usbotg: usb@5100000 {
 			compatible = "allwinner,sun50i-h616-musb",
 				     "allwinner,sun8i-h3-musb";