Hello,
I have a custom board based on AM437x connected to TLV320AIC3107 audio codec. The schematic is attached. The level translator is used because that bank of AM437x is 1.8V. Is the schematic correct?
The problem I am facing is that Linux does not detect any sound cards. I get "ALSA devices list - No soundcards detected" error during bootup, no I2C driver is registered with the device, and there is no /proc/asound/card entry. The relevant parts of the device tree are:
refclk: oscillator {
#clock-cells = <0>;
compatible = "fixed-clock";
clock-frequency = <12000000>;
sound0: sound@0 {
compatible = "simple-audio-card";
simple-audio-card,name = "AM437x-GP-EVM";
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 = <&sound0_master>;
simple-audio-card,frame-master = <&sound0_master>;
simple-audio-card,bitclock-inversion;
simple-audio-card,cpu {
sound-dai = <&mcasp1>;
system-clock-frequency = <12000000>;
};
sound0_master: simple-audio-card,codec {
sound-dai = <&tlv320aic3107>;
system-clock-frequency = <12000000>;
};
};
audio_mstrclk: mclk_osc {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <12000000>;
};
mcasp1_pins_default: mcasp1_pins_default {
pinctrl-single,pins = <
0x10c ( PIN_INPUT_PULLDOWN | MUX_MODE4 ) /* (B14) mii1_crs.mcasp1_aclkx */
0x110 ( PIN_INPUT_PULLDOWN | MUX_MODE4 ) /* (B13) mii1_rx_er.mcasp1_fsx */
0x128 (PIN_OUTPUT_PULLDOWN | MUX_MODE3 ) /* (B15) mii1_txd0.mcasp1_axr2 */
0x144 ( PIN_INPUT_PULLDOWN | MUX_MODE4 ) /* (A16) rmii1_ref_clk.mcasp1_axr3 */
>;
};
/* Optional sleep pin settings. Must manually enter values in the below skeleton. */
mcasp1_pins_sleep: mcasp1_pins_sleep {
pinctrl-single,pins = <
0x10c (PIN_INPUT_PULLDOWN | MUX_MODE7 ) /* (B14) mii1_crs.mcasp1_aclkx */
0x110 (PIN_INPUT_PULLDOWN | MUX_MODE7 ) /* (B13) mii1_rx_er.mcasp1_fsx */
0x128 (PIN_INPUT_PULLDOWN | MUX_MODE7 ) /* (B15) mii1_txd0.mcasp1_axr2 */
0x144 (PIN_INPUT_PULLDOWN | MUX_MODE7 ) /* (A16) rmii1_ref_clk.mcasp1_axr3 */
>;
};
&i2c0{
tlv320aic3107: tlv320aic3107@18 {
#sound-dai-cells = <0>;
compatible = "ti,tlv320aic3107";
reg = <0x18>;
status = "okay";
/* Regulators */
IOVDD-supply = <&evm_v3_3d>; /* V3_3D -> <tps63031> EN: V1_8D -> VBAT */
AVDD-supply = <&evm_v3_3d>; /* v3_3AUD -> V3_3D -> ... */
DRVDD-supply = <&evm_v3_3d>; /* v3_3AUD -> V3_3D -> ... */
DVDD-supply = <&ldo1>; /* V1_8D -> LDO1 */
};
};
&mcasp1 {
#sound-dai-cells = <0>;
pinctrl-names = "default", "sleep";
pinctrl-0 = <&mcasp1_pins_default>;
pinctrl-1 = <&mcasp1_pins_sleep>;
status = "okay";
op-mode = <0>; /* MCASP_IIS_MODE */
tdm-slots = <2>;
/* 4 serializers */
serial-dir = < /* 0: INACTIVE, 1: TX, 2: RX */
0 0 1 2
>;
tx-num-evt = <32>;
rx-num-evt = <32>;
};
I checked the working of the GP-EVM. During bootup, the GP-EVM also gives the same "No soundcards detected" error. However, after booting, it creates a card0 entry in /proc/asound. How does this happen, and how can my problem be solved?
Please let me know what other information I need to provide.
Regards,
Rajat RaoAudio SubSystem.pdf