Skip to contentSkip to conversation

arm64: dts: meson-axg: add spdif input

PATCH Applied Jerome Brunet 2 participants 5 messages Dec 13, 2018 – Jan 11, 2019

Subsystems (2)
lore
Share & tools
lore

Jerome Brunet

author reviewer
#0 lore raw

cover arm64: dts: meson-axg: add spdif input

This patchset adds spdif input support to the axg SoC family and the s400 reference design.

Kevin, ASoC support for this spdif input (including the binding doc) just got merged in the ASoC tree [0]. Until the related patches hit mainline, you may get a warning about using undocumented bindings.

[0]: https://lkml.kernel.org/r/[email protected]

Jerome Brunet (3):
arm64: dts: meson-axg: add spdifin
arm64: dts: meson-axg: s400: add spdif-dir codec
arm64: dts: meson-axg: s400: add spdifin to the sound card

 .../arm64/boot/dts/amlogic/meson-axg-s400.dts | 24 +++++++++++++++++++
 arch/arm64/boot/dts/amlogic/meson-axg.dtsi    | 12 ++++++++++
 2 files changed, 36 insertions(+)
Signature · 1 line
2.19.2
author reviewer
#1 lore raw

PATCH 1/3 arm64: dts: meson-axg: add spdifin

Add the SPDIF input device of the axg audio subsystem

---
 arch/arm64/boot/dts/amlogic/meson-axg.dtsi | 12 ++++++++++++
 1 file changed, 12 insertions(+)
arch/arm64/boot/dts/amlogic/meson-axg.dtsi +12 -0
index fffd55787981..781632bd60ed 100644
@@ -1260,6 +1260,18 @@
 				status = "disabled";
 			};
 
+			spdifin: audio-controller@400 {
+				compatible = "amlogic,axg-spdifin";
+				reg = <0x0 0x400 0x0 0x30>;
+				#sound-dai-cells = <0>;
+				sound-name-prefix = "SPDIFIN";
+				interrupts = <GIC_SPI 87 IRQ_TYPE_EDGE_RISING>;
+				clocks = <&clkc_audio AUD_CLKID_SPDIFIN>,
+					 <&clkc_audio AUD_CLKID_SPDIFIN_CLK>;
+				clock-names = "pclk", "refclk";
+				status = "disabled";
+			};
+
 			spdifout: audio-controller@480 {
 				compatible = "amlogic,axg-spdifout";
 				reg = <0x0 0x480 0x0 0x50>;
Signature · 1 line
2.19.2
author reviewer
#2 lore raw

PATCH 2/3 arm64: dts: meson-axg: s400: add spdif-dir codec

In reply to Jerome Brunet

Add the SPDIF capture codec to the axg s400 board

---
 arch/arm64/boot/dts/amlogic/meson-axg-s400.dts | 7 +++++++
 1 file changed, 7 insertions(+)
arch/arm64/boot/dts/amlogic/meson-axg-s400.dts +7 -0
index af2f2619bbc1..2f622a0b599a 100644
@@ -95,6 +95,13 @@
 		sound-name-prefix = "MIC";
 	};
 
+	spdif_dir: audio-codec-4 {
+		#sound-dai-cells = <0>;
+		compatible = "linux,spdif-dir";
+		status = "okay";
+		sound-name-prefix = "DIR";
+	};
+
 	emmc_pwrseq: emmc-pwrseq {
 		compatible = "mmc-pwrseq-emmc";
 		reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>;
Signature · 1 line
2.19.2
author reviewer
#3 lore raw

PATCH 3/3 arm64: dts: meson-axg: s400: add spdifin to the sound card

In reply to Jerome Brunet

Enable spdif input device on the S400 and add it to the card

---
 arch/arm64/boot/dts/amlogic/meson-axg-s400.dts | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
arch/arm64/boot/dts/amlogic/meson-axg-s400.dts +17 -0
index 2f622a0b599a..c8b531ce5c63 100644
@@ -256,6 +256,9 @@
 				"TODDR_A IN 2", "TDMIN_C OUT",
 				"TODDR_B IN 2", "TDMIN_C OUT",
 				"TODDR_C IN 2", "TDMIN_C OUT",
+				"TODDR_A IN 3", "SPDIFIN Capture",
+				"TODDR_B IN 3", "SPDIFIN Capture",
+				"TODDR_C IN 3", "SPDIFIN Capture",
 				"TODDR_A IN 4", "PDM Capture",
 				"TODDR_B IN 4", "PDM Capture",
 				"TODDR_C IN 4", "PDM Capture",
@@ -333,6 +336,14 @@
 		};
 
 		dai-link-8 {
+			sound-dai = <&spdifin>;
+
+			codec {
+				sound-dai = <&spdif_dir>;
+			};
+		};
+
+		dai-link-9 {
 			sound-dai = <&pdm>;
 
 			codec {
@@ -489,6 +500,12 @@
 	vqmmc-supply = <&vddio_boot>;
 };
 
+&spdifin {
+	pinctrl-0 = <&spdif_in_a19_pins>;
+	pinctrl-names = "default";
+	status = "okay";
+};
+
 &spdifout {
 	pinctrl-0 = <&spdif_out_a20_pins>;
 	pinctrl-names = "default";
Signature · 1 line
2.19.2
maintainer Applied
#4 lore raw
In reply to Jerome Brunet
Quoted 8 lines · Jerome Brunet

This patchset adds spdif input support to the axg SoC family and the s400 reference design.

Kevin, ASoC support for this spdif input (including the binding doc) just got merged in the ASoC tree [0]. Until the related patches hit mainline, you may get a warning about using undocumented bindings.

[0]: https://lkml.kernel.org/r/[email protected]

Queued for v5.1 (branch: v5.1/dt64)

Kevin