I am trying to interface a voice codec from Silicon labs with AM3358 on my custom board based on beaglebone. I am using Sitara SDK 06.01.00.08 with kernel 4.19. I created a codec and compiled with kernel by following Audio DAC Example.
On SiLabs chip the PCLK needs to be one of the following: 512 kHz, 768 kHz, 1.024 MHz, 1.536 MHz, 1.544 MHz, 2.048 MHz, 4.096 MHz, or 8.192 MHz. How can I generate this from MCASP ACLK?
Can you please recommend what changes I need to make on my current device tree for this codec:
&am33xx_pinmux {
mcasp0_pins: mcasp0_pins{
pinctrl-single,pins= <
AM33XX_IOPAD(0x990, PIN_INPUT_PULLDOWN | MUX_MODE0) /* mcasp0_aclkx.mcasp0_aclkx */
AM33XX_IOPAD(0x994, PIN_INPUT_PULLDOWN | MUX_MODE0) /* mcasp0_fsx.mcasp0_fsx, INPUT */
AM33XX_IOPAD(0x998, PIN_INPUT_PULLDOWN | MUX_MODE0) /* mcasp0_axr0.mcasp0_axr0 */
AM33XX_IOPAD(0x99c, PIN_INPUT_PULLDOWN | MUX_MODE2) /* mcasp0_ahclkr.mcasp0_axr2 */
>;
};
};
&mcasp0 {
#sound-dai-cells = <0>;
pinctrl-names = "default";
pinctrl-0 = <&mcasp0_pins>;
status = "okay";
op-mode = <0>; /* MCASP_IIS_MODE */
tdm-slots = <2>;
num-serializer = <4>;
serial-dir = < /* 0: INACTIVE, 1: TX, 2: RX */
2 0 1 0
>;
tx-num-evt = <8>;
rx-num-evt = <8>;
};
/{
si32178: si32178 {
#sound-dai-cells = <0>;
compatible = "silabs,si32178";
status = "okay";
};
sound0: sound@0 {
compatible = "simple-audio-card";
simple-audio-card,name = "SI32178";
simple-audio-card,widgets =
"Speaker", "Speaker External",
"Line", "Line In";
simple-audio-card,routing =
"Speaker External", "LINE_OUT",
"LINE1L", "Line In",
"LINE1R", "Line In";
simple-audio-card,format = "i2s";
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>;
};
sound_master: simple-audio-card,codec {
#sound-dai-cells = <0>;
sound-dai = <&si32178>;
clocks = <&clk_mcasp0_fixed>;
clock-names = "mclk";
};
};
};
Thank you
