Allwinner H6 SPDIF support
Subsystems (2)
v5 cover Allwinner H6 SPDIF support
Allwinner H6 SoC has a SPDIF controller called One Wire Audio (OWA) which is different from the previous H3 generation and not compatible.
Difference are an increase of fifo sizes, some memory mapping are different and there is now the possibility to output the master clock on a pin.
Actually all these features are unused and only a bit for flushing the TX fifo is required.
Changes since v4:
- rename audio card name to sun50i-h6-spdif
- drop patches already merged
Changes since v3:
- rename reg_fctl_ftx to val_fctl_ftx
- rebase this series on sound-next
- fix dt-bindings due to change in sound-next
- change node name sound_spdif to sound-spdif
Changes since v2:
- Split quirks and H6 support patch
- Add specific section for quirks comment
Changes since v1:
- Remove H3 compatible
- Add TX fifo bit flush quirks
- Add H6 bindings in SPDIF driver
Clément Péron (3):
arm64: dts: allwinner: Add SPDIF node for Allwinner H6
arm64: dts: allwinner: h6: Enable SPDIF for Beelink GS1
arm64: defconfig: Enable Sun4i SPDIF module
.../dts/allwinner/sun50i-h6-beelink-gs1.dts | 4 ++ arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 38 +++++++++++++++++++ arch/arm64/configs/defconfig | 1 + 3 files changed, 43 insertions(+)
Signature · 6 lines
2.20.1 -- 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+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected] To view this discussion on the web, visit https://groups.google.com/d/msgid/linux-sunxi/20190811203144.5999-1-peron.clem%40gmail.com.
PATCH v5 1/3 arm64: dts: allwinner: Add SPDIF node for Allwinner H6
The Allwinner H6 has a SPDIF controller called OWA (One Wire Audio).
Only one pinmuxing is available so set it as default.
--- arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 38 ++++++++++++++++++++ 1 file changed, 38 insertions(+)
arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi +38 -0
@@ -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";
Signature · 6 lines
2.20.1 -- 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+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected] 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
maintainerRe: [linux-sunxi] [PATCH v5 1/3] arm64: dts: allwinner: Add SPDIF node for Allwinner H6
Hi,
Quoted 26 lines · 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 <[email protected]>--- arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 38 ++++++++++++++++++++ 1 file changed, 38 insertions(+)arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi +8
-0@@ -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>; + }; +
arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi line 103
Quoted 10 lines
arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi +10
-0+ simple-audio-card,codec { + sound-dai = <&spdif_out>; + }; + }; + + spdif_out: spdif-out { + #sound-dai-cells = <0>; + compatible = "linux,spdif-dit"; + }; +
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
Quoted 44 lines
arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi +20
-1timer { 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
--
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 [email protected]. 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
maintainerRe: [linux-sunxi] [PATCH v5 1/3] arm64: dts: allwinner: Add SPDIF node for Allwinner H6
Quoted 44 lines · Chen-Yu Tsai
Hi,
Quoted 26 lines · 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 <[email protected]>--- arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 38 ++++++++++++++++++++ 1 file changed, 38 insertions(+)arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi +8
-0@@ -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>; + }; +arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi line 103
Quoted 10 lines
arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi +10
-0+ simple-audio-card,codec { + sound-dai = <&spdif_out>; + }; + }; + + spdif_out: spdif-out { + #sound-dai-cells = <0>; + compatible = "linux,spdif-dit"; + }; +We've always had this part in the board dts. It isn't relevant to boards that don't have SPDIF output.
Quoted 5 lines
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.
Forgot to mention. Both patches and all parts in this patch are OK. It's just the parts the need to be moved.
Quoted 47 lines
ChenYu
Quoted 44 lines
arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi +20
-1timer { 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
--
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 [email protected]. To view this discussion on the web, visit https://groups.google.com/d/msgid/linux-sunxi/20190811203144.5999-2-peron.clem%40gmail.com.
Re: [linux-sunxi] [PATCH v5 1/3] arm64: dts: allwinner: Add SPDIF node for Allwinner H6
Hi Chen-Yu,
Quoted 46 lines · Chen-Yu Tsai
Quoted 44 lines · Chen-Yu Tsai
Hi,
Quoted 26 lines · 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 <[email protected]>--- arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 38 ++++++++++++++++++++ 1 file changed, 38 insertions(+)arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi +8
-0@@ -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>; + }; +arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi line 103
Quoted 10 lines
arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi +10
-0+ simple-audio-card,codec { + sound-dai = <&spdif_out>; + }; + }; + + spdif_out: spdif-out { + #sound-dai-cells = <0>; + compatible = "linux,spdif-dit"; + }; +We've always had this part in the board dts. It isn't relevant to boards that don't have SPDIF output.
Quoted 5 lines
Quoted 5 lines
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.
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
Quoted 52 lines
Forgot to mention. Both patches and all parts in this patch are OK. It's just the parts the need to be moved.
Quoted 47 lines
ChenYu
Quoted 44 lines
arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi +20
-1timer { 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
--
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 [email protected]. To view this discussion on the web, visit https://groups.google.com/d/msgid/linux-sunxi/20190811203144.5999-2-peron.clem%40gmail.com.
PATCH v5 2/3 arm64: dts: allwinner: h6: Enable SPDIF for Beelink GS1
In reply to Clément PéronBeelink GS1 board has a SPDIF out connector, so enable it in the device-tree.
--- arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts | 4 ++++ 1 file changed, 4 insertions(+)
arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts +4 -0
@@ -243,6 +243,10 @@ vcc-pm-supply = <®_aldo1>; }; +&spdif { + status = "okay"; +}; + &uart0 { pinctrl-names = "default"; pinctrl-0 = <&uart0_ph_pins>;
Signature · 6 lines
2.20.1 -- 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+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected] To view this discussion on the web, visit https://groups.google.com/d/msgid/linux-sunxi/20190811203144.5999-3-peron.clem%40gmail.com.
PATCH v5 3/3 arm64: defconfig: Enable Sun4i SPDIF module
In reply to Clément PéronAllwinner A64 and H6 use the Sun4i SPDIF driver.
Enable this to allow a proper support.
--- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+)
arch/arm64/configs/defconfig +1 -0
@@ -558,6 +558,7 @@ CONFIG_SND_SOC_ROCKCHIP_RT5645=m CONFIG_SND_SOC_RK3399_GRU_SOUND=m CONFIG_SND_SOC_SAMSUNG=y CONFIG_SND_SOC_RCAR=m +CONFIG_SND_SUN4I_SPDIF=m CONFIG_SND_SOC_AK4613=m CONFIG_SND_SOC_ES7134=m CONFIG_SND_SOC_ES7241=m
Signature · 6 lines
2.20.1 -- 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+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected] To view this discussion on the web, visit https://groups.google.com/d/msgid/linux-sunxi/20190811203144.5999-4-peron.clem%40gmail.com.
Re: [linux-sunxi] [PATCH v5 3/3] arm64: defconfig: Enable Sun4i SPDIF module
Quoted 6 lines · Clément Péron
Allwinner A64 and H6 use the Sun4i SPDIF driver.
Enable this to allow a proper support.
Signed-off-by Clément Péron <[email protected]>
Applied. Thanks.
_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel