[PATCH v5 1/3] arm64: dts: allwinner: Add SPDIF node for Allwinner H6

80 views
Skip to first unread message

Clément Péron

unread,
Aug 11, 2019, 4:31:57 PM8/11/19
to Maxime Ripard, Rob Herring, linux-ar...@lists.infradead.org, devic...@vger.kernel.org, linux-...@vger.kernel.org, linux...@googlegroups.com, Clément Péron
The Allwinner H6 has a SPDIF controller called OWA (One Wire Audio).

Only one pinmuxing is available so set it as default.

Signed-off-by: Clément Péron <peron...@gmail.com>
---
arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 38 ++++++++++++++++++++
1 file changed, 38 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
index 7628a7c83096..677eb374678d 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
@@ -83,6 +83,24 @@
method = "smc";
};

+ sound-spdif {
+ compatible = "simple-audio-card";
+ simple-audio-card,name = "sun50i-h6-spdif";
+
+ simple-audio-card,cpu {
+ sound-dai = <&spdif>;
+ };
+
+ simple-audio-card,codec {
+ sound-dai = <&spdif_out>;
+ };
+ };
+
+ spdif_out: spdif-out {
+ #sound-dai-cells = <0>;
+ compatible = "linux,spdif-dit";
+ };
+
timer {
compatible = "arm,armv8-timer";
interrupts = <GIC_PPI 13
@@ -282,6 +300,11 @@
bias-pull-up;
};

+ spdif_tx_pin: spdif-tx-pin {
+ pins = "PH7";
+ function = "spdif";
+ };
+
uart0_ph_pins: uart0-ph-pins {
pins = "PH0", "PH1";
function = "uart0";
@@ -411,6 +434,21 @@
};
};

+ spdif: spdif@5093000 {
+ #sound-dai-cells = <0>;
+ compatible = "allwinner,sun50i-h6-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>;
+ status = "disabled";
+ };
+
usb2otg: usb@5100000 {
compatible = "allwinner,sun50i-h6-musb",
"allwinner,sun8i-a33-musb";
--
2.20.1

Chen-Yu Tsai

unread,
Aug 12, 2019, 12:53:15 AM8/12/19
to Clément Péron, Maxime Ripard, Rob Herring, linux-arm-kernel, devicetree, linux-kernel, linux-sunxi
Hi,
We've always had this part in the board dts. It isn't relevant to boards
that don't have SPDIF output.

Also, not so relevant here, but there are different simple sound card
constructs. Some support multiple audio streams with dynamic PCM routing.
How these are configured really depends on what interfaces are usable.

So keeping this at the board level is IMO a better choice.

ChenYu
> --
> You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi...@googlegroups.com.
> To view this discussion on the web, visit https://groups.google.com/d/msgid/linux-sunxi/20190811203144.5999-2-peron.clem%40gmail.com.

Chen-Yu Tsai

unread,
Aug 12, 2019, 2:35:06 AM8/12/19
to Clément Péron, Chen-Yu Tsai, Maxime Ripard, Rob Herring, linux-arm-kernel, devicetree, linux-kernel, linux-sunxi
Forgot to mention. Both patches and all parts in this patch are OK. It's
just the parts the need to be moved.

Clément Péron

unread,
Aug 12, 2019, 3:12:03 AM8/12/19
to Chen-Yu Tsai, Maxime Ripard, Rob Herring, linux-arm-kernel, devicetree, linux-kernel, linux-sunxi
Hi Chen-Yu,
I Agree, I try to keep coherency with sun50i-a64.dtsi.
But sound routing is really at board level not SoC one.

Regards,
Clément
Reply all
Reply to author
Forward
0 new messages