Question
I2S3 Audio codec clock
Hi all,
i am trying to interface es8388 to I2S3 bus,
Here are fragments from device tree :
sound {
compatible = "audio-graph-card";
label = "STM32MP1-SOM";
routing =
"Playback" , "MCLK",
"Capture" , "MCLK",
"MICL" , "Mic Bias";
dais = <&i2s3_port>;
status = "okay";
};
.............................................
&pinctrl {
i2s3_pins_a: i2s3-0 {
pins {
pinmux = <STM32_PINMUX('A', 8, AF5)>, /* I2S3_SDO */
<STM32_PINMUX('A', 4, AF6)>, /* I2S3_WS */
<STM32_PINMUX('B', 3, AF6)>, /* I2S3_CK */
<STM32_PINMUX('B', 4, AF6)>, /* I2S3_SDI */
<STM32_PINMUX('C', 7, AF6)>; /* I2S3_MCK */
slew-rate = <1>;
drive-push-pull;
bias-disable;
};
};
i2s3_pins_sleep_a: i2s3-1 {
pins {
pinmux = <STM32_PINMUX('A', 8, ANALOG)>, /* I2S3_SDO */
<STM32_PINMUX('A', 4, ANALOG)>, /* I2S3_WS */
<STM32_PINMUX('B', 3, ANALOG)>, /* I2S3_CK */
<STM32_PINMUX('B', 4, ANALOG)>, /* I2S3_SDI */
<STM32_PINMUX('C', 7, ANALOG)>; /* I2S3_MCK */
};
};
}
&i2s3 {
clocks = <&rcc SPI3>, <&rcc SPI3_K>, <&rcc PLL3_Q>, <&rcc PLL4_Q>;
clock-names = "pclk", "i2sclk", "x8k", "x11k";
pinctrl-names = "default", "sleep";
pinctrl-0 = <&i2s3_pins_a>;
pinctrl-1 = <&i2s3_pins_sleep_a>;
status = "okay";
i2s3_port: port {
i2s3_endpoint: endpoint {
remote-endpoint = <&es8388_endpoint>;
format = "i2s";
mclk-fs = <256>;
};
};
};
&i2c5 {
pinctrl-names = "default";
pinctrl-0 = <&i2c5_pins_a>;
i2c-scl-rising-time-ns = <185>;
i2c-scl-falling-time-ns = <20>;
status = "okay";
es8388: es8388@20 {
compatible = "everest,es8388", "everest,es8328";
reg = <0x20>;
AVDD-supply = <&vdd_sd3v3>;
DVDD-supply = <&vdd_sd3v3>;
HPVDD-supply = <&vdd_sd3v3>;
PVDD-supply = <&vdd_sd3v3>;
clocks = <&sai2a>; //change me
clock-names = "MCLK1";
es8388_tx_port: port@0 {
#address-cells = <1>;
#size-cells = <0>;
es8388_endpoint: endpoint {
remote-endpoint = <&i2s3_endpoint>;
};
};
};
};I'm struggling with es8388 clock property, i cant find example in documentation or document about clock source.
Experimented with sai2a clock but without success.
My question is , is my dts correct, and which clock source to use for es8388
Thanks,
Best Regards
