This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TLV320ADC5140: Device Tree on Raspberry Pi

Part Number: TLV320ADC5140

Hi Folks,

Managed to wrap this one around my neck. Trying to bring up this ADC on a Raspberry Pi to do some experimentation. The driver is being recognised (in that I can see i2c transactions to reset the chip and then wake it up) but I'm seeing these messages in the log and the device doesn't appear;

[   75.487720] tlv320adcx140-codec 1-0054: ASoC: error at snd_soc_component_probe on tlv320adcx140-codec.1-0054: -22
[   75.498363] tlv320adcx140-codec 1-0054: ASoC: failed to probe component -22
[   75.505861] asoc-simple-card soc:sound: ASoC: failed to instantiate card -22

It's going to be something obvious, and I'm certainly no device tree expert, but if anyone has any suggestions on what the issue is I'd be deeply appreciative.

DAVE

// Definitions for tlv320adcx140 multi-channel codec
/dts-v1/;
/plugin/;

/ {
        compatible = "brcm,bcm2837", "brcm,bcm2836", "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709";

        fragment@0 {
                target = <&i2s>;
                __overlay__ {
                        #sound-dai-cells = <0>;
                        status = "okay";
                };
        };

        fragment@1 {
                target-path="/";
                __overlay__ {
                        codec_mclk:codec-mclk {
                                compatible = "fixed-clock";
                                #clock-cells = <0>;
                                clock-frequency = <24000000>;
                        };
                };
        };

        fragment@2 {
                target = <&i2c_arm>;
                __overlay__ {
                        #address-cells = <1>;
                        #size-cells = <0>;
                        status = "okay";

                        codec: tlv320adc5140@54{
                                compatible = "ti,tlv320adc5140";
                                reg = <0x54>;
                                #sound-dai-cells = <0>;
                                ti,use-internal-areg;
                                ti,mic-bias-source = <0>;
                                iov-supply = <&codec_reg_3v3>;                               ldoin-supply = <&codec_reg_3v3>;
                        };
                };
        };

        fragment@3 {
                target-path = "/";
                __overlay__ {
                        codec_reg_3v3: codec-reg-3v3 {
                                compatible = "regulator-fixed";
                                regulator-name = "tlv320adc5140_3v3";
                                regulator-min-microvolt = <3300000>;
                                regulator-max-microvolt = <3300000>;
                                regulator-always-on;
                        };
                };
        };

        fragment@4 {
                target = <&sound>;
                sound_overlay: __overlay__ {
                        compatible = "simple-audio-card";
                         simple-audio-card,name = "technosampler";
                         simple-audio-card,format = "i2s";
                         simple-audio-card,bitclock-master = <&codec_dai>;
                         simple-audio-card,frame-master = <&codec_dai>;
                         simple-audio-card,widgets =
                             "Microphone", "Microphone Jack",
                             "Headphone",  "Headphone Jack",
                             "Speaker", "External Speaker";

                         simple-audio-card,routing =
                         "MIC_IN", "Microphone Jack",
                         "Headphone Jack", "HP_OUT",
                         "External Speaker", "LINE_OUT";
                        status = "okay";
                         cpu_dai: simple-audio-card,cpu {
                                  sound-dai = <&i2s>;
                        };

                        codec_dai: simple-audio-card,codec {
                                 sound-dai = <&codec>;
                                 clocks = <&codec_mclk>;
                                 };
                };
         };
        __overrides__ {
                alsaname = <&sound_overlay>,"simple-audio-card,name";
        };
};