diff mbox series

[3/3] ARM: dts: omap4: embt2ws: Add audio support

Message ID 20230705190324.355282-4-andreas@kemnade.info
State New
Headers show
Series [1/3] ASoC: ti: omap-mcbsp: Ignore errors for getting fck_src | expand

Commit Message

Andreas Kemnade July 5, 2023, 7:03 p.m. UTC
There is a headset jack on the connection between control unit
and display. Wire things up to have audio output with MCBSP2 as a master.

Signed-off-by: Andreas Kemnade <andreas@kemnade.info>
---
 arch/arm/boot/dts/omap4-epson-embt2ws.dts | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

Comments

Mark Brown July 5, 2023, 7:23 p.m. UTC | #1
On Wed, Jul 05, 2023 at 09:03:24PM +0200, Andreas Kemnade wrote:

> +	sound {
> +		compatible = "simple-audio-card";

For new usage audio-graph-card2 is preferred, it's a superset of the
functionality and much more flexible.

> +		simple-audio-card,codec {
> +			sound-dai = <&tlv320aic3x>;
> +			system-clock-frequency = <24000000>;
> +		};
> +	};

Are you *sure* the BCLK always comes out at this rate?
diff mbox series

Patch

diff --git a/arch/arm/boot/dts/omap4-epson-embt2ws.dts b/arch/arm/boot/dts/omap4-epson-embt2ws.dts
index 5e9a997f686b0..ee86981b2e448 100644
--- a/arch/arm/boot/dts/omap4-epson-embt2ws.dts
+++ b/arch/arm/boot/dts/omap4-epson-embt2ws.dts
@@ -46,6 +46,24 @@  key-lock {
 		};
 	};
 
+	sound {
+		compatible = "simple-audio-card";
+		simple-audio-card,name = "BT2 Sound";
+		simple-audio-card,format = "left_j";
+		simple-audio-card,bitclock-master = <&sound_master>;
+		simple-audio-card,frame-master = <&sound_master>;
+
+		sound_master: simple-audio-card,cpu {
+			system-clock-frequency = <24000000>;
+			sound-dai = <&mcbsp2>;
+		};
+
+		simple-audio-card,codec {
+			sound-dai = <&tlv320aic3x>;
+			system-clock-frequency = <24000000>;
+		};
+	};
+
 	unknown_supply: unknown-supply {
 		compatible = "regulator-fixed";
 		regulator-name = "unknown";
@@ -274,6 +292,9 @@  &mcbsp2 {
 	#sound-dai-cells = <0>;
 	pinctrl-names = "default";
 	pinctrl-0 = <&mcbsp2_pins>;
+	assigned-clocks = <&abe_clkctrl OMAP4_MCBSP2_CLKCTRL 24>;
+	assigned-clock-parents = <&abe_clkctrl OMAP4_MCBSP2_CLKCTRL 26>;
+
 	status = "okay";
 };