Other Parts Discussed in Thread: TLV320AIC32, , DRA72
Tool/software: Linux
Hello,
I am trying to set up drivers of TLV320AIC32 to linux(core - 4.14.79-gbde58ab01e).
I've uderstood that I have to use a pack - Linux Driver for TLV320AIC32X4. But I found some strange things here.
Firstly, in the documentation about dts is written -
- supply-*: Required supply regulators are: "iov" - digital IO power supply "ldoin" - LDO power supply "dv" - Digital core power supply "av" - Analog core power supply
It looks as if I have to use "supply-iov", "supply-ldoin" and so on. But in code I see an ordinary form with *-supply. So, I use "iov-supply", "dv-supply" and "av-supply".
I have a fixed external voltage regulation, so my sound part in dts there
/ { model = "AM5708 p38 rev 1.0"; compatible = "ti,am5718", "ti,dra718-evm", "ti,dra718", "ti,dra722", "ti,dra72", "ti,dra7"; aliases { sound0 = &sound0; }; chosen { stdout-path = &uart3; }; memory@0 { device_type = "memory"; reg = <0x0 0x80000000 0x0 0x40000000>; /* 1024 MB */ }; sound0: sound0 { compatible = "simple-audio-card"; simple-audio-card,name = "DRA7xx-EVM"; simple-audio-card,widgets = "Headphone", "Headphone Jack", "Line", "Line Out", "Microphone", "Mic Jack", "Line", "Line In"; simple-audio-card,routing = "Headphone Jack", "HPLOUT", "Headphone Jack", "HPROUT", "Line Out", "LLOUT", "Line Out", "RLOUT", "MIC3L", "Mic Jack", "MIC3R", "Mic Jack", "Mic Jack", "Mic Bias", "LINE1L", "Line In", "LINE1R", "Line In"; simple-audio-card,format = "dsp_b"; simple-audio-card,bitclock-master = <&sound0_master>; simple-audio-card,frame-master = <&sound0_master>; simple-audio-card,bitclock-inversion; sound0_master: simple-audio-card,cpu { sound-dai = <&mcasp1>; system-clock-frequency = <5644800>; }; simple-audio-card,codec { sound-dai = <&tlv320aic32>; clocks = <&atl_clkin2_ck>; }; }; reserved-memory { #address-cells = <2>; #size-cells = <2>; ranges; ipu2_memory_region: ipu2-memory@95800000 { compatible = "shared-dma-pool"; reg = <0x0 0x95800000 0x0 0x3800000>; reusable; status = "okay"; }; dsp1_memory_region: dsp1-memory@99000000 { compatible = "shared-dma-pool"; reg = <0x0 0x99000000 0x0 0x4000000>; reusable; status = "okay"; }; ipu1_memory_region: ipu1-memory@9d000000 { compatible = "shared-dma-pool"; reg = <0x0 0x9d000000 0x0 0x2000000>; reusable; status = "okay"; }; }; reg3: fixedregulator@0 { status = "okay"; regulator-name = "3vs"; regulator-min-microvolt = <3000000>; regulator-max-microvolt = <3000000>; regulator-always-on; regulator-boot-on; }; reg18: fixedregulator@1 { status = "okay"; regulator-name = "18vd"; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>; regulator-always-on; regulator-boot-on; }; mclk: fpgaosc { status = "okay"; compatible = "fixed-clock"; #clock-cells = <1>; clock-frequency = <12000000>; clock-output-names = "mclk"; }; }; &mcasp1 { #sound-dai-cells = <0>; status = "okay"; op-mode = <0>; tdm-slots = <2>; serial-dir = < 1 2 0 0 /* 0: INACTIVE, 1: TX, 2: RX */ 0 0 0 0 0 0 0 0 0 0 0 0 >; }; &i2c1 { status = "okay"; clock-frequency = <400000>; tlv320aic32: tlv320aic32@18 { #sound-dai-cells = <0>; compatible = "ti,tlv320aic32x4"; reg = <0x18>; adc-settle-ms = <40>; ai3x-micbias-vg = <1>; /* 2.0V */ status = "okay"; av-supply = <®3>; dv-supply = <®18>; iov-supply = <®18>; clocks = <&mclk 0>; clock-names = "mclk"; }; };
Secondly, a directory "Menuconfig location" has not, hmmm, location. There are three config flags(two of them repeated, I don't undestand why) without location.
I haven't found a decision better then change a "KConfig" file. So, I changed next -
config SND_SOC_TLV320AIC32X4
tristate
config SND_SOC_TLV320AIC32X4_I2C
tristate
depends on I2C
select SND_SOC_TLV320AIC32X4
to -
config SND_SOC_TLV320AIC32X4
tristate "Texas Instruments TLV320AIC32X4 audio CODEC"
config SND_SOC_TLV320AIC32X4_I2C
tristate "Texas Instruments TLV320AIC32X4 audio CODEC - I2C"
depends on I2C
select SND_SOC_TLV320AIC32X4
After that I got this flags in menuconfig.
I compiled my project and got next error during the kernel loading -
[ 59.682391] tlv320aic32x4 0-0018: Missing supply 'iov' [ 59.688691] tlv320aic32x4 0-0018: Failed to setup regulators
I checked what the error number was returned. It is 517. I guess it was set in core.c on next lines -
if (!try_module_get(rdev->owner)) { regulator = ERR_PTR(-EPROBE_DEFER); put_device(&rdev->dev); return regulator; }
But I am not sure. Anyway, there I've decided to stop and ask some help about that. Becouse I think if I made a mistake early, when was preparing the driver.
Thank for your help