I have been trying for the last month to get a HAT I've designed that contains a TI TLV320AIC3110 audio code chip to be recognized at boot or even by using modprobe to load the driver. I can't get ALSA to see the chip. This is on a RPi5
I have really tried to search online for solutions, but nothing seem to work.
I am using UBUNTU 24.04 Server, as I need ubuntu-frame and wpe-mir-kiosk for my dedicated IoT with no HDMI connections. This setup doesn't offer vcdbg and I can't seem to get ANY debug info.
Just to add that I can see the device with as 0x18 and can send commands to it
I will post my .dts file here if anybody can point me to what's wrong.
Any help would be appreciated. I can supply the schematics of the PCB also
I have really tried to search online for solutions, but nothing seem to work.
I am using UBUNTU 24.04 Server, as I need ubuntu-frame and wpe-mir-kiosk for my dedicated IoT with no HDMI connections. This setup doesn't offer vcdbg and I can't seem to get ANY debug info.
Just to add that I can see the device with
Code:
i2cdetect -y 1
I will post my .dts file here if anybody can point me to what's wrong.
Code:
/dts-v1/;/plugin/;/ { compatible = "brcm,bcm2712"; /* "brcm,bcm2712", "brcm,bcm2711", "brcm,bcm2835"; */ /* * Fragment@0: Enable the I2S (PCM) interface */ fragment@0 { target = <&i2s>; __overlay__ { status = "okay"; pinctrl-names = "default"; pinctrl-0 = <&tlv320aic3110_pins>; #sound-dai-cells = <0>; brcm,enable-mclk = <1>; // Enable MCLK output brcm,mclk-rate = <12288000>; // 12.288MHz MCLK rate clock-frequency = <12288000>; // Master clock frequency brcm,tx-channels = <2>; // Stereo output brcm,rx-channels = <2>; // Stereo input }; }; fragment@1 { target-path = "/"; __overlay__ { codec_1v8_reg: codec-1v8-reg { compatible = "regulator-fixed"; regulator-name = "tlv320aic3104_1v8"; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>; regulator-always-on; }; }; }; fragment@2 { target = <&gpio>; __overlay__ { codec_rst: codec-rst { brcm,pins = <13>; brcm,function = <0>; }; }; }; fragment@3 { target = <&i2c1>; __overlay__ { #address-cells = <1>; /* Single cell for I2C address */ #size-cells = <0>; /* No size cells for I2C devices */ status = "okay"; tlv320aic3110: tlv320aic3110@18 { compatible = "ti,tlv320aic3110", "ti,tlv320aic311x", "ti,tlv320aic3x"; reg = <0x18>; #sound-dai-cells = <0>; status = "okay"; /* DRVDD-supply = <&vdd_3v3_reg>; */ AVDD-supply = <&vdd_3v3_reg>; DVDD-supply = <&codec_1v8_reg>; HPVDD-supply = <&vdd_3v3_reg>; IOVDD-supply = <&vdd_3v3_reg>; SPRVDD-supply = <&vdd_5v0_reg>; SPLVDD-supply = <&vdd_5v0_reg>; clocks = <&mclk_external>; mclk-frequency = <12288000>; gpio-controller; resets = <&gpio_reset>; /* active-high GPIO4_13 */ reset-gpios = <&gpio 13 0>; /* GPIO 13 as active high */ // Debug properties debug; linux,debug; }; }; }; fragment@4 { target-path = "/"; __overlay__ { gpio_reset: gpio-reset { compatible = "gpio-reset"; reset-gpios = <&gpio 13 0>; /* GPIO 13 active high */ #reset-cells = <0>; reset-delay-us = <10000>; status = "okay"; }; }; }; fragment@5 { target = <&sound>; __overlay__ { compatible = "simple-audio-card"; simple-audio-card,name = "TLV320AIC3110"; simple-audio-card,widgets = "Microphone", "Mic Jack", "Speaker", "Speaker Left", "Speaker", "Speaker Right"; simple-audio-card,routing = "Speaker Left", "SPL", "Speaker Right", "SPR", "MIC1LP", "Mic Jack", "MIC1LM", "Mic Jack"; status = "okay"; simple-audio-card,dai-link { /* I2S format settings */ format = "i2s"; bitclock-master = <&codec_dai>; frame-master = <&codec_dai>; /* DAI link format */ dai-tdm-slot-num = <2>; // Stereo dai-tdm-slot-width = <32>; // 32 bits per sample cpu_dai: cpu { sound-dai = <&bcm2835_i2s>; dai-tdm-slot-num = <2>; dai-tdm-slot-width = <32>; }; codec_dai: codec { sound-dai = <&tlv320aic3110>; /* Clock settings */ system-clock-frequency = <12288000>; // 12.288MHz MCLK system-clock-direction-out; // MCLK is input to codec /* Format settings */ frame-inversion; // Frame sync polarity bitclock-inversion; // Clock polarity }; }; }; }; fragment@6 { target-path = "/"; __overlay__ { mclk_external: mclk_external { compatible = "fixed-clock"; #clock-cells = <0>; clock-frequency = <12288000>; // 12.288 MHz }; }; }; fragment@7 { target = <&gpio>; __overlay__ { tlv320aic3110_pins: tlv320aic3110_pins { brcm,pins = <18 19 20 21>; // PCM_CLK, PCM_FS, PCM_DIN, PCM_DOUT brcm,function = <4>; // ALT0 for I2S function brcm,pull = <0>; // No pull-up/down }; }; };};
Statistics: Posted by laxamar — Tue Dec 31, 2024 4:34 pm — Replies 0 — Views 2