Skip to contentSkip to conversation

arm64: dts: rockchip: add spdif node to rk356x

PATCH Applied Nicolas Frattaroli 2 participants 3 messages Oct 15, 2021 – Oct 16, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 arm64: dts: rockchip: add spdif node to rk356x

From: Peter Geis <[email protected]>

This adds the spdif node to the rk356x device tree.

---
 arch/arm64/boot/dts/rockchip/rk356x.dtsi | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
arch/arm64/boot/dts/rockchip/rk356x.dtsi +14 -0
index b721a34ffa8c..f0e3fe445ace 100644
@@ -608,6 +608,20 @@ sdhci: mmc@fe310000 {
 		status = "disabled";
 	};
 
+	spdif: spdif@fe460000 {
+		compatible = "rockchip,rk3568-spdif";
+		reg = <0x0 0xfe460000 0x0 0x1000>;
+		interrupts = <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>;
+		dmas = <&dmac1 1>;
+		dma-names = "tx";
+		clock-names = "mclk", "hclk";
+		clocks = <&cru MCLK_SPDIF_8CH>, <&cru HCLK_SPDIF_8CH>;
+		#sound-dai-cells = <0>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&spdifm0_tx>;
+		status = "disabled";
+	};
+
 	dmac0: dmac@fe530000 {
 		compatible = "arm,pl330", "arm,primecell";
 		reg = <0x0 0xfe530000 0x0 0x4000>;
Signature · 1 line
2.33.0
#1 lore raw

PATCH 2/2 arm64: dts: rockchip: enable spdif on Quartz64 A

---
 .../boot/dts/rockchip/rk3566-quartz64-a.dts   | 23 +++++++++++++++++++
 1 file changed, 23 insertions(+)
arch/arm64/boot/dts/rockchip/rk3566-quartz64-a.dts +23 -0
index a244f7b87e38..d272839405c5 100644
@@ -58,6 +58,25 @@ led-diy {
 		};
 	};
 
+	spdif_sound: spdif-sound {
+		compatible = "simple-audio-card";
+		simple-audio-card,name = "SPDIF";
+
+		simple-audio-card,cpu {
+			sound-dai = <&spdif>;
+		};
+
+		simple-audio-card,codec {
+			sound-dai = <&spdif_dit>;
+		};
+	};
+
+	spdif_dit: spdif-dit {
+		compatible = "linux,spdif-dit";
+		#sound-dai-cells = <0>;
+	};
+
+
 	vcc12v_dcin: vcc12v_dcin {
 		compatible = "regulator-fixed";
 		regulator-name = "vcc12v_dcin";
@@ -458,6 +477,10 @@ &sdmmc0 {
 	status = "okay";
 };
 
+&spdif {
+	status = "okay";
+};
+
 &tsadc {
 	/* tshut mode 0:CRU 1:GPIO */
 	rockchip,hw-tshut-mode = <1>;
Signature · 1 line
2.33.0
maintainer Applied
#2 lore raw
In reply to Nicolas Frattaroli
Quoted 1 line · Nicolas Frattaroli

This adds the spdif node to the rk356x device tree.

Applied, thanks!

I did a tiny bit of (alphabetical) sorting
(clocks about dma)

[1/2] arm64: dts: rockchip: add spdif node to rk356x

      commit: a65e6523e6dcf1dc4ea167ab78ca6fad01f16d91
[2/2] arm64: dts: rockchip: enable spdif on Quartz64 A
      commit: 7ab91acd3624de261d785e94cdfc01a703786e7a

Best regards,

Signature · 1 line
Heiko Stuebner <[email protected]>