HDMI Audio on RK356x/Quartz64 Model A
Subsystems (2)
v3 cover HDMI Audio on RK356x/Quartz64 Model A
This enables HDMI audio on Quartz64 Model A, and the RK356x SoC in general.
i2s0 on the RK356x is connected to HDMI, and only has one DMA. I've confirmed this with the TRM.
To test this, one needs a video clock, i.e. there is no audio if your screen is off. The framebuffer console or something else needs to be running to get audio output.
Changes in v3:
- rebased onto next-20220610
Changes in v2:
- reordered nodes in rk356x.dtsi to conform
- reordered properties in rk356x.dtsi to conform
- add Michael Riesch's Tested-by to rk356x.dtsi
Nicolas Frattaroli (2):
arm64: dts: rockchip: rk356x: Add HDMI audio nodes
arm64: dts: rockchip: Enable HDMI audio on Quartz64 A
.../boot/dts/rockchip/rk3566-quartz64-a.dts | 8 +++++ arch/arm64/boot/dts/rockchip/rk356x.dtsi | 33 +++++++++++++++++++ 2 files changed, 41 insertions(+)
Signature · 1 line
2.36.1
PATCH v3 1/2 arm64: dts: rockchip: rk356x: Add HDMI audio nodes
This adds the i2s0 node and an hdmi-sound sound device to the rk356x device tree. On the rk356[68], the i2s0 controller is connected to HDMI audio.
--- arch/arm64/boot/dts/rockchip/rk356x.dtsi | 33 ++++++++++++++++++++++++ 1 file changed, 33 insertions(+)
arch/arm64/boot/dts/rockchip/rk356x.dtsi +33 -0
@@ -183,6 +183,22 @@ opp-800000000 { }; }; + hdmi_sound: hdmi-sound { + compatible = "simple-audio-card"; + simple-audio-card,name = "HDMI"; + simple-audio-card,format = "i2s"; + simple-audio-card,mclk-fs = <256>; + status = "disabled"; + + simple-audio-card,codec { + sound-dai = <&hdmi>; + }; + + simple-audio-card,cpu { + sound-dai = <&i2s0_8ch>; + }; + }; + pmu { compatible = "arm,cortex-a55-pmu"; interrupts = <GIC_SPI 228 IRQ_TYPE_LEVEL_HIGH>,
@@ -951,6 +967,23 @@ spdif: spdif@fe460000 { status = "disabled"; }; + i2s0_8ch: i2s@fe400000 { + compatible = "rockchip,rk3568-i2s-tdm"; + reg = <0x0 0xfe400000 0x0 0x1000>; + interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>; + assigned-clocks = <&cru CLK_I2S0_8CH_TX_SRC>, <&cru CLK_I2S0_8CH_RX_SRC>; + assigned-clock-rates = <1188000000>, <1188000000>; + clocks = <&cru MCLK_I2S0_8CH_TX>, <&cru MCLK_I2S0_8CH_RX>, <&cru HCLK_I2S0_8CH>; + clock-names = "mclk_tx", "mclk_rx", "hclk"; + dmas = <&dmac1 0>; + dma-names = "tx"; + resets = <&cru SRST_M_I2S0_8CH_TX>, <&cru SRST_M_I2S0_8CH_RX>; + reset-names = "tx-m", "rx-m"; + rockchip,grf = <&grf>; + #sound-dai-cells = <0>; + status = "disabled"; + }; + i2s1_8ch: i2s@fe410000 { compatible = "rockchip,rk3568-i2s-tdm"; reg = <0x0 0xfe410000 0x0 0x1000>;
Signature · 1 line
2.36.1
PATCH v3 2/2 arm64: dts: rockchip: Enable HDMI audio on Quartz64 A
In reply to Nicolas FrattaroliThis enables the i2s0 controller and the hdmi-sound node on the PINE64 Quartz64 Model A single-board computer.
--- arch/arm64/boot/dts/rockchip/rk3566-quartz64-a.dts | 8 ++++++++ 1 file changed, 8 insertions(+)
arch/arm64/boot/dts/rockchip/rk3566-quartz64-a.dts +8 -0
@@ -310,6 +310,10 @@ hdmi_out_con: endpoint { }; }; +&hdmi_sound { + status = "okay"; +}; + &i2c0 { status = "okay";
@@ -540,6 +544,10 @@ &i2c3 { status = "okay"; }; +&i2s0_8ch { + status = "okay"; +}; + &i2s1_8ch { pinctrl-names = "default"; pinctrl-0 = <&i2s1m0_sclktx
Signature · 1 line
2.36.1
Quoted 10 lines · Nicolas Frattaroli
This enables HDMI audio on Quartz64 Model A, and the RK356x SoC in general.
i2s0 on the RK356x is connected to HDMI, and only has one DMA. I've confirmed this with the TRM.
To test this, one needs a video clock, i.e. there is no audio if your screen is off. The framebuffer console or something else needs to be running to get audio output.
Excellent work!
Tested on Quartz64 Model A.
Quoted 20 lines
Changes in v3:
- rebased onto next-20220610Changes in v2:
- reordered nodes inrk356x.dtsito conform
- reordered properties inrk356x.dtsito conform
- add Michael Riesch's Tested-by tork356x.dtsiNicolas Frattaroli (2):
arm64: dts: rockchip: rk356x: Add HDMI audio nodes
arm64: dts: rockchip: Enable HDMI audio on Quartz64 A.../boot/dts/rockchip/rk3566-quartz64-a.dts | 8 +++++ arch/arm64/boot/dts/rockchip/rk356x.dtsi | 33 +++++++++++++++++++ 2 files changed, 41 insertions(+)--
2.36.1
Quoted 11 lines · Nicolas Frattaroli
This enables HDMI audio on Quartz64 Model A, and the RK356x SoC in general.
i2s0 on the RK356x is connected to HDMI, and only has one DMA. I've confirmed this with the TRM.
To test this, one needs a video clock, i.e. there is no audio if your screen is off. The framebuffer console or something else needs to be running to get audio output.
[...]
Applied, thanks!
[1/2] arm64: dts: rockchip: rk356x: Add HDMI audio nodes
commit: 697ee8546e241bd5fc175c0cfd5d8b0c8ce39697
[2/2] arm64: dts: rockchip: Enable HDMI audio on Quartz64 A
commit: 4188962d993ef3633a61f66ba5afe9e43088f3c5Best regards,
Signature · 1 line
Heiko Stuebner <[email protected]>