Hello, I’m working on the implementation of tlv320aic3106 and making a linux soundcard in devicetree.
I declare it like this in the devicetree.
sound{
compatible = “simple-audio-card”;
simple-audio-card,name = “TLV320AIC3106”;
simple-audio-card,format = “i2s”;
simple-audio-card,cpu {
sound-dai = <&ssi1>;
};
simple-audio-card,codec {
sound-dai = <&codec>;
clocks=<&codec_clock>;
};
};
&i2c1 {
pinctrl-names = “default”;
pinctrl-0 = <&pinctrl_i2c1_2>;
clock-frequency = <100000>;
status = “okay”;
codec: codec@18 {
#sound-dai-cells = <0>;
compatible = “ti,tlv320aic3106”;
reg = <0x18>;
clocks=<&codec_clock>;
clock-names = “mclk”;
reset-gpios=<&gpio3 29 GPIO_ACTIVE_LOW>;
AVDD-supply = <®_3p3v>;
IOVDD-supply = <®_aud_iovdd>; /*IOVDD: 3.3V; DVDD: 1.8 V; DRVDD: 3.3V; AVDD_DAC: 3.3V; */
DRVDD-supply = <®_drvdd>;
DVDD-supply = <®_aud_dvdd>;
};
};
&ssi1 {
codec-handle = <&codec>;
fsl,mode = “i2s-slave”;//i2s-slave
status = “okay”;
};
clocks{
codec_clock: clk12M {
compatible = “fixed-clock”;
#clock-cells = <0>;
clock-frequency = <12000000>;
};
};
With these specs, the driver in linux kernel find the codec, the command i2cdetect on bus 0 shows that the codec at address 0x18 appear UU.
The soundcard is also detected, but when I do aplay command, i2s signals don’t work. I don’t know why.
So I tried to change sound node by putting this:
compatible = “eukrea,asoc-tlv320”;
eukrea,model = “TLV320AIC3106 audio codec”;
ssi-controller = <&ssi1>;
codec-handle = <&codec>;
fsl,mux-int-port = <1>;
fsl,mux-ext-port = <3>;
status = “okay”;
To do that, I modified the driver “eukrea,asoc-tlv320”. It works with a tlv320aic3104, but not with tlv320aic3106.
If someone knows what I forget to declare in the first devicetree sound node, or have an idea, thanks.
Best reguards.