This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TDA4VM: McASP configuration on Linux via device tree

Part Number: TDA4VM
Other Parts Discussed in Thread: TLV320AIC3104, , AM5729

I am trying to get McASP0 to work with the TDA4VM on Beaglebone AI 64 on Linux. I am using a TLV320AIC3104 codec. The docs are lacking. I tried to port this dtbo which was working on AM5729 (BBAI32). As there is no support for overlays on BBAI64, yet, I integrated it in the main dtb  via : 

@@ -735,6 +738,40 @@
#clock-cells = <0>;
clock-frequency = <25000000>;
};
+#define SOUND_CARD
+#ifdef SOUND_CARD
+ sound {
+ compatible = "simple-audio-card";
+ simple-audio-card,name = "AudioCapeAI";
+ simple-audio-card,widgets =
+ "Headphone", "Headphone Jack",
+ "Line", "Line In";
+ simple-audio-card,routing =
+ "Headphone Jack", "HPLOUT",
+ "Headphone Jack", "HPROUT",
+ "LINE1L", "Line In",
+ "LINE1R", "Line In";
+ simple-audio-card,format = "dsp_b";
+ simple-audio-card,bitclock-master = <&sound_master>;
+ simple-audio-card,frame-master = <&sound_master>;
+ simple-audio-card,bitclock-inversion;
+
+ simple-audio-card,cpu {
+ sound-dai = <&mcasp0>;
+ compatible = "fixed-clock";
+ system-clock-frequency = <20000000>;
+ system-clock-direction-out = <0>;
+ };
+
+ sound_master: simple-audio-card,codec {
+ #sound-dai-cells = <0>;
+ sound-dai = <&tlv320aic3104>;
+ //clocks = <???>;
+ clock-frequency = <22579200>;
+ clock-names = "mclk";
+ };
+ };
+#endif // SOUND_CARD

};

&main_pmx0 {
@@ -1910,6 +1948,13 @@ bone_i2c_2: &main_i2c2 {
pinctrl-0 = <&main_i2c2_pins_default>;
clock-frequency = <400000>;
symlink = "bone/i2c/2";
+#ifdef SOUND_CARD
+ tlv320aic3104: tlv320aic3104@18 {
+ #sound-dai-cells = <0>;
+ compatible = "ti,tlv320aic3104";
+ reg = <0x18>;
+ };
+#endif // SOUND_CARD
};

&main_i2c3 {

However I am not sure how to fill in the relevant clock sections. The above gives me a flood of these:

Jul 18 15:34:44 BeagleBone kernel: aic3x_hw_params(): unable to setup PLL
Jul 18 15:34:44 BeagleBone kernel: tlv320aic3x-codec 5-0018: ASoC: error at snd_soc_dai_hw_params on tlv320aic3x-hifi: -22

Is there a working example of a device tree for McASP on the TDA4VM/J721E ?