Anthony Posted March 10, 2020 Posted March 10, 2020 Hello, I'm actually working on the implementation of the MAX9860 Mono Audio Voice Codec in the devicetree. TheTLV320AIC3204 audio codec works fine and the operating system (Linux embedded) can see it with the command "aplay -l". So in the kernel, i have activated the MAX9860 audio codec, however, i don't know how to declare it in the device tree next to my TLV codec. So i have tried something like this in my i2c node: max9860: max9860@10 { compatible = "maxim,max9860"; reg = <0x10>; clocks = <&max9860_clock>; clock-names = "mclk"; supply-av = <®_aud_avdd>; supply-dv = <®_aud_dvdd>; supply-dvddio = <®_aud_dvddio>; }; Then, i have added a regulator reg_aud_dvddio: reg_aud_dvddio { compatible = "regulator-fixed"; regulator-name = "dvddio"; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>; regulator-always-on; }; then, i have created a child node "max9860_clock" in "clocks" clocks{ codec_clock: clk12M { compatible = "fixed-clock"; #clock-cells = <0>; clock-frequency = <12000000>; }; max9860_clock: clkmax9860{ compatible = "fixed-clock"; #clock-cells = <0>; clock-frequency = <12288000>; }; }; When i declare it like that, the devicetree compile well, and when I put "i2cdetect -y 0" on the command line on my embedded system linux, theb address 0x10 (MAX9860) appears UU. but when i do the command "aplay -l" on linux, the codec does not appear. so my sound node seems like this: sound { compatible = "eukrea,asoc-tlv320"; eukrea,model = "TLV320AIC3204 audio codec"; ssi-controller = <&ssi1>; codec-handle = <&codec>; fsl,mux-int-port = <1>; fsl,mux-ext-port = <3>; status = "okay"; }; &ssi1 { codec-handle = <&codec>; fsl,mode = "i2s-slave"; status = "okay"; }; &ssi2 { codec-handle = <&max9860>; fsl,mode = "i2s-slave"; status = "okay"; }; I know I should modify the sound node to specify the MAX9860, but I've tried to do it, and it was not a success, i had compilation errors: ****************************************************************************** sound0:sound@0{ compatible = "simple-audio-card"; simple-audio-card,widgets = "Headphone", "Headphone Jack"; simple-audio-card,routing = "Headphone Jack", "HPLEFT", "Headphone Jack", "HPRIGHT", "LEFTIN", "HPL", "RIGHTIN", "HPR"; simple-audio-card,cpu { sound-dai = <&ssi2>; }; simple-audio-card,codec { sound-dai = <&max9860>; clocks = <&max9860_clock>; }; } sound1:sound@1 { compatible = "eukrea,asoc-tlv320"; } sound { compatible = "eukrea,asoc-tlv320"; eukrea,model = "TLV320AIC3204 audio codec"; ssi-controller = <&ssi1>; codec-handle = <&codec>; fsl,mux-int-port = <1>; fsl,mux-ext-port = <3>; status = "okay"; }; ****************************************************************************** I'm pretty new in this environment, so If someone has got an idea that could help, thanks :-) Kind regards, Anthony
Recommended Posts