Greetings-
We're using an IMX8MP (MIMX8ML6DVNLZAB) in a custom board design with a Yocto poky build system for our Linux development. I'm trying connect an NL-NAU88C10 audio codec via the SAI7 and i2c3 interfaces. The relevant device tree bindings are as follows:
//sound device in root
sound {
compatible = "simple-audio-card";
simple-audio-card,name = "NAU8810-Card";
simple-audio-card,format = "i2s";
simple-audio-card,bitclock-master = <&cpu_dai>;
simple-audio-card,frame-master = <&cpu_dai>;
simple-audio-card,widgets = "Microphone", "Microphone Jack", "Speaker", "External Speaker";
simple-audio-card,routing = "MIC_IN", "Microphone Jack", "External Speaker", "LINE_OUT";
cpu_dai: simple-audio-card,cpu {
sound-dai = <&sai7>;
};
simple-audio-card,codec {
sound-dai = <&nau8810>;
};
};
&i2c3 {
clock-frequency = <400000>;
pinctrl-names = "default", "gpio";
pinctrl-0 = <&pinctrl_i2c3>;
pinctrl-1 = <&pinctrl_i2c3_gpio>;
sda-gpios = <&gpio5 19 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
scl-gpios = <&gpio5 18 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
status = "okay";
nau8810: codec@1a {
#sound-dai-cells = <0>;
compatible = "nuvoton,nau8810";
reg = <0x1a>;
};
};
&sai7 {
#sound-dai-cells = <0>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_sai7>;
assigned-clocks = <&clk IMX8MP_CLK_SAI7>;
assigned-clock-parents = <&clk IMX8MP_AUDIO_PLL1_OUT>;
assigned-clock-rates = <12288000>;
fsl,sai-mclk-direction-input;
status = "okay";
};
//iomuxc
pinctrl_sai7: sai7grp {
fsl,pins = <
MX8MP_IOMUXC_ECSPI1_MISO__AUDIOMIX_SAI7_RX_DATA00 0x00000106
MX8MP_IOMUXC_ECSPI1_MOSI__AUDIOMIX_SAI7_RX_BCLK 0x00000106
MX8MP_IOMUXC_ECSPI1_SCLK__AUDIOMIX_SAI7_RX_SYNC 0x00000106
MX8MP_IOMUXC_ECSPI1_SS0__AUDIOMIX_SAI7_TX_SYNC 0x00000106
MX8MP_IOMUXC_ECSPI2_MISO__AUDIOMIX_SAI7_MCLK 0x00000106
MX8MP_IOMUXC_ECSPI2_MOSI__AUDIOMIX_SAI7_TX_DATA00 0x00000106
MX8MP_IOMUXC_ECSPI2_SCLK__AUDIOMIX_SAI7_TX_BCLK 0x00000106
>;
};
The i2c connection appears to be working in the kernel, as i2cdetect shows the codec's address, but on boot this message appears regarding the SAI7 device:
fsl-sai 30c80000.sai: failed to get bus clock: -517
In my troubleshooting I have not been able to identify what this code means, and the ALSA we have loaded also does not recognize any audio device besides the dummy.
We've put an oscilloscope on the clock lines between the codec and the IMX8MP to verify our clock signal and it is present- is there something wrong with the device tree configuration?
Any help is greatly appreciated.