[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200927192912.46323-12-peron.clem@gmail.com>
Date: Sun, 27 Sep 2020 21:29:03 +0200
From: Clément Péron <peron.clem@...il.com>
To: Maxime Ripard <mripard@...nel.org>, Chen-Yu Tsai <wens@...e.org>,
Rob Herring <robh+dt@...nel.org>,
Mark Brown <broonie@...nel.org>,
Liam Girdwood <lgirdwood@...il.com>
Cc: Jaroslav Kysela <perex@...ex.cz>, Takashi Iwai <tiwai@...e.com>,
Marcus Cooper <codekipper@...il.com>,
Jernej Skrabec <jernej.skrabec@...l.net>,
alsa-devel@...a-project.org, devicetree@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
linux-sunxi@...glegroups.com,
Clément Péron <peron.clem@...il.com>
Subject: [PATCH v5 11/20] arm: dts: sunxi: h3/h5: Add DAI node and soundcard for HDMI
From: Marcus Cooper <codekipper@...il.com>
Add the new DAI block for I2S2 which is used for HDMI audio and
a simple-soundcard to link audio between HDMI and I2S.
Note that the HDMI codec requires an inverted frame clock and
a fixed I2S width. As there is no such option for I2S we use
TDM property of the simple-soundcard to do that.
Signed-off-by: Jernej Skrabec <jernej.skrabec@...l.net>
Signed-off-by: Marcus Cooper <codekipper@...il.com>
Signed-off-by: Clément Péron <peron.clem@...il.com>
---
arch/arm/boot/dts/sunxi-h3-h5.dtsi | 33 ++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)
diff --git a/arch/arm/boot/dts/sunxi-h3-h5.dtsi b/arch/arm/boot/dts/sunxi-h3-h5.dtsi
index 22d533d18992..7168e9412410 100644
--- a/arch/arm/boot/dts/sunxi-h3-h5.dtsi
+++ b/arch/arm/boot/dts/sunxi-h3-h5.dtsi
@@ -105,6 +105,25 @@ de: display-engine {
status = "disabled";
};
+ hdmi_sound: hdmi-sound {
+ compatible = "simple-audio-card";
+ simple-audio-card,format = "i2s";
+ simple-audio-card,name = "sun8i-h3-hdmi";
+ simple-audio-card,mclk-fs = <128>;
+ simple-audio-card,frame-inversion;
+ status = "disabled";
+
+ simple-audio-card,codec {
+ sound-dai = <&hdmi>;
+ };
+
+ simple-audio-card,cpu {
+ sound-dai = <&i2s2>;
+ dai-tdm-slot-num = <2>;
+ dai-tdm-slot-width = <32>;
+ };
+ };
+
soc {
compatible = "simple-bus";
#address-cells = <1>;
@@ -662,6 +681,19 @@ i2s1: i2s@...2400 {
status = "disabled";
};
+ i2s2: i2s@...2800 {
+ #sound-dai-cells = <0>;
+ compatible = "allwinner,sun8i-h3-i2s";
+ reg = <0x01c22800 0x400>;
+ interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&ccu CLK_BUS_I2S2>, <&ccu CLK_I2S2>;
+ clock-names = "apb", "mod";
+ dmas = <&dma 27>, <&dma 27>;
+ resets = <&ccu RST_BUS_I2S2>;
+ dma-names = "rx", "tx";
+ status = "disabled";
+ };
+
codec: codec@...2c00 {
#sound-dai-cells = <0>;
compatible = "allwinner,sun8i-h3-codec";
@@ -793,6 +825,7 @@ csi: camera@...0000 {
};
hdmi: hdmi@...0000 {
+ #sound-dai-cells = <0>;
compatible = "allwinner,sun8i-h3-dw-hdmi",
"allwinner,sun8i-a83t-dw-hdmi";
reg = <0x01ee0000 0x10000>;
--
2.25.1
Powered by blists - more mailing lists