2021-10-15 19:56:54

by Nicolas Frattaroli

[permalink] [raw]
Subject: [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.

Signed-off-by: Peter Geis <[email protected]>
---
arch/arm64/boot/dts/rockchip/rk356x.dtsi | 14 ++++++++++++++
1 file changed, 14 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk356x.dtsi b/arch/arm64/boot/dts/rockchip/rk356x.dtsi
index b721a34ffa8c..f0e3fe445ace 100644
--- a/arch/arm64/boot/dts/rockchip/rk356x.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk356x.dtsi
@@ -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>;
--
2.33.0


2021-10-15 19:56:57

by Nicolas Frattaroli

[permalink] [raw]
Subject: [PATCH 2/2] arm64: dts: rockchip: enable spdif on Quartz64 A

Co-developed-by: Peter Geis <[email protected]>
Signed-off-by: Peter Geis <[email protected]>
Signed-off-by: Nicolas Frattaroli <[email protected]>
---
.../boot/dts/rockchip/rk3566-quartz64-a.dts | 23 +++++++++++++++++++
1 file changed, 23 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3566-quartz64-a.dts b/arch/arm64/boot/dts/rockchip/rk3566-quartz64-a.dts
index a244f7b87e38..d272839405c5 100644
--- a/arch/arm64/boot/dts/rockchip/rk3566-quartz64-a.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3566-quartz64-a.dts
@@ -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>;
--
2.33.0

2021-10-18 03:38:34

by Heiko Stuebner

[permalink] [raw]
Subject: Re: [PATCH 1/2] arm64: dts: rockchip: add spdif node to rk356x

On Fri, 15 Oct 2021 13:13:01 +0200, Nicolas Frattaroli wrote:
> 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,
--
Heiko Stuebner <[email protected]>