AnsweredAssumed Answered

i.MX53 : How to activate spdif output in device tree ?

Question asked by Nicolas KATIC on Jan 12, 2017
Latest reply on Jan 17, 2017 by Nicolas KATIC

Hi,

 


I have a product based on i.MX536 with an spdif output. I have created the device tree for my board for the linux kernel 4.4.39 (mainline) . All are OK except the spdif output.

 

the actual spdif controller declaration I used is :

 

    spdif: spdif@50028000 {
        compatible = "fsl,imx53-spdif", "fsl,imx35-spdif";
        reg = <0x50028000 0x4000>;
        interrupts = <0 67 IRQ_TYPE_LEVEL_HIGH>;
        dmas = <&sdma 14 18 0>, <&sdma 15 18 0>;
        dma-names = "rx", "tx";
        clocks =     <&clks IMX5_CLK_PLL4_SW>,     // core : core clock
                    <&clks IMX5_CLK_SPDIF_XTAL_SEL>,         // 0
                    <&clks IMX5_CLK_SPDIF0_SEL>,         // 1 : Clock source selection for rx/tx clock
                    <&clks IMX5_CLK_DUMMY>,                // 2
                    <&clks IMX5_CLK_DUMMY>,             // 3
                    <&clks IMX5_CLK_DUMMY>,                // 4
                    <&clks IMX5_CLK_SPDIF_IPG_GATE>,        // 5 : sysclock for rx clock
                    <&clks IMX5_CLK_DUMMY>,                // 6
                    <&clks IMX5_CLK_DUMMY>;                // 7
        clocks-names = "core", "rxtx0",
                        "rxtx1", "rxtx2",
                        "rxtx3", "rxtx4",
                        "rxtx5", "rxtx6",
                        "rxtx7" ;
        status = "okay" ;
    };
    
    codec: spdif-transmitter {
        compatible = "linux,spdif-dit";
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_spdif>;
    };

 

    sound-spdif {
        compatible = "fsl,imx-audio-spdif";
        model = "imx-spdif";
        /* IMX6 doesn't implement this yet */
        spdif-controller = <&spdif>;
        spdif-out;
        };

 

 

        pinctrl_spdif: spdifgrp {
            fsl,pins = <MX53_PAD_GPIO_17__SPDIF_OUT1     MX53_NO_PAD_CTL
                        MX53_PAD_GPIO_7__SPDIF_PLOCK     MX53_NO_PAD_CTL
                        MX53_PAD_GPIO_10__GPIO4_0        MX53_NO_PAD_CTL
                        MX53_PAD_GPIO_11__GPIO4_1        MX53_NO_PAD_CTL
                    >;
        };

 

The must bigger problem is the clocks configuration. All were wrong and I don't find how to configure them.

 

The kernel messages displayed when the kernel boot for the spdif controller are :

[    9.870876] fsl-spdif-dai 50028000.spdif: regmap init failed
[    9.925795] fsl-spdif-dai: probe of 50028000.spdif failed with error -2
[   11.274576] imx-spdif sound-spdif: ASoC: CPU DAI (null) not registered
[   11.281140] imx-spdif sound-spdif: snd_soc_register_card failed: -517
[   11.465361] imx-spdif sound-spdif: ASoC: CPU DAI (null) not registered
[   11.472079] imx-spdif sound-spdif: snd_soc_register_card failed: -517
[   12.795591] imx-spdif sound-spdif: ASoC: CPU DAI (null) not registered
[   12.802348] imx-spdif sound-spdif: snd_soc_register_card failed: -517
[   12.819190] imx-spdif sound-spdif: ASoC: CPU DAI (null) not registered
[   12.825932] imx-spdif sound-spdif: snd_soc_register_card failed: -517

 

 

Is there anyone can help me ?

 

Regards,

 

Nicolas

Outcomes