iMX8QM SOM Audio Master Clock on pin 215

Hello,

I’m trying to get the MCLK_OUT1 functionality enabled on pin 215 of the iMX8QM SOM.
I’ve enabled it in the device tree entry but am not having any luck getting it to work.
Are there any additional steps beyond a device tree entry to get it working?

&mclkout1_lpcg {
status = “okay”;
};

Thanks in advance,
Ben

I’ve also done the following:
*** configured the pin as MCLK_OUT1**
pinctrl_codec_clk: codec_clk {
fsl,pins = <
IMX8QM_SPDIF0_TX_AUD_ACM_MCLK_OUT1 0xc0000020

;
};

*** Disabled SPDIF**

*** Tied the clock to the CODEC**
audio_codec: simple-audio-card,codec {
clocks = <&mclkout1_lpcg>;
sound-dai = <&pcm3168a>;
};

*** Configured CODEC clock**
pcm3168a: audio-codec@47 {
compatible = “ti,pcm3168a”;
#sound-dai-cells = <1>;
reg = <0x47>;
clocks = <&mclkout1_lpcg>;
clock-names = “scki”;
reset-gpios = <&lsio_gpio2 7 GPIO_ACTIVE_LOW>;

VDD1-supply = <&snd_3v3>;
VDD2-supply = <&snd_3v3>;
VCCAD1-supply = <&snd_5v0>;
VCCAD2-supply = <&snd_5v0>;
VCCDA1-supply = <&snd_5v0>;
VCCDA2-supply = <&snd_5v0>;

};

Have you removed this pin muxing?

We are using branch 5.4-2.3.x-imx and this DTS file as the basis for ours.
http://git.toradex.com/cgit/linux-toradex.git/tree/arch/arm64/boot/dts/freescale/imx8-apalis-v1.1.dtsi?h=toradex_5.4-2.3.x-imx

I have removed all original pin muxing related to this pin and configured it as
IMX8QM_SPDIF0_TX_AUD_ACM_MCLK_OUT1

Have you checked that your new DT was compiled and applied properly?

Hi Alex,

Yes, I confirmed that my DT was compiled correctly, applied correctly and there were no overlapping declarations.

I used fdtdump to view the final dtb file and confirm settings.

I now have the clock working and the issue turned out to be declaring the clock pin inside the CODEC I2C definition.

pcm3168a: audio-codec@47 {
    	compatible = "ti,pcm3168a";
    	reg = <0x47>;
        reset-gpio = <&lsio_gpio2 7 GPIO_ACTIVE_LOW>;
        clocks = <&mclkout1_lpcg 0>;
    	clock-names = "scki";
->    pinctrl-names = "default";
->	pinctrl-0 = <&pinctrl_codec_clk>;
        #sound-dai-cells = <0>;
    	VDD1-supply	= <&snd_3v3>;
    	VDD2-supply	= <&snd_3v3>;
    	VCCAD1-supply	= <&snd_5v0>;
    	VCCAD2-supply	= <&snd_5v0>;
    	VCCDA1-supply	= <&snd_5v0>;
    	VCCDA2-supply	= <&snd_5v0>;
};

Thanks for your help.

Glad your problem was solved. Thank you for the update.