I have an issue of sgtl500 codec with my android 11 system which is runnin on custom board with imx8mq smarc. When first boot up, everything goes fine, ı can play a sound, anything ı need works. But when ı reboot system with command line by using "reboot" command, kernel goes up to sgtl5000 and than stuck there after these line and never goes forward.
3.242678] sgtl5000 0-000a: sgtl5000 revision 0x11
[ 3.781606] sgtl5000 0-000a: Using internal LDO instead of VDDD: check ER1 erratum
I have checked ER1 erratum, check all hardware issue, clock signal and voltage ratings are correct. Please let me explain what ı supply to codec:
VDDIO: 1.8V
VDDD: 1.8V
VDDA: 3.3V
I have attached first boot up dmesg and reboot dmesg output in attachement. Please let me know if you know anything. I thing there shoul be something with device-tree or driver files of SGTL5000.
Please see my related device-tree configuration below.
reg_audio: audio_vdd {
compatible = "regulator-fixed";
regulator-name = "sgtl5000_supply";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
regulator-always-on;
};
reg_1p8v: 1p8v {
compatible = "regulator-fixed";
regulator-name = "1P8V";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-always-on;
};
codec: sgtl5000@a {
compatible = "fsl,sgtl5000";
#sound-dai-cells = <0>;
reg = <0x0a>;
clocks = <&clk IMX8MQ_CLK_SAI2_ROOT>;
clock-names = "mclk";
VDDA-supply = <®_audio>;
VDDIO-supply = <®_1p8v>;
status = "okay";
};
sound-sgtl5000 {
compatible = "simple-audio-card";
simple-audio-card,name = "sgtl5000-audio";
simple-audio-card,format = "i2s";
simple-audio-card,widgets =
"Microphone", "Microphone Jack",
"Headphone", "Headphone Jack",
"Speaker", "Speaker Ext",
"Line", "Line In Jack";
simple-audio-card,routing =
"MIC_IN", "Microphone Jack",
"Microphone Jack", "Mic Bias",
"LINE_IN", "Line In Jack",
"Headphone Jack", "HP_OUT",
"Speaker Ext", "LINE_OUT";
simple-audio-card,cpu {
sound-dai = <&sai2>;
frame-master;
bitclock-master;
};
simple-audio-card,codec {
sound-dai = <&codec>;
frame-master;
bitclock-master;
};
};
Solved! Go to Solution.
First of all, thank you so much for your reply.
I have changed the driver source code as mentioned below. This changing was mentioned in errata sheet. Now, ı can see in dmesg message as SGTL is supplied with external VDDD but same problem still exist.
I have also learned that there should be power sequence in sgtl5000 voltage pins. It says that VDDD should be powered after VDDIO and VDDA are already powered. I have checked this with a manual switch, ı have type reboot and switch the VDDD pin to GND, after 1 sec ı have turned switch off so VDDD is supplied externally after other pins powered on. It works fine now. I have been thinking that the solving of this issue should be as hardware with the method that ı tried. If you have any idea with any other changing with driver, ı prefer to solve this issue as software. IF you have any further suggestion with respect to this information, please let me know.
Best Regards;
Hello all again, ı have solved the problem with a hardware manipulation. I have powered up VDDD after VDDIO and VDDA powered up already acccording to errata sheet. I have used N-CH and P-CH mosfet together, gate signal was RESET_OUT signal so it is no clearly after each reset, VDDD was powerd down and power up when other pins (VDDA and VDDIO ) already powered since they were still power on.
Hello,
The reason of why the driver code is not align with the mentioned in the reference manual and the errata document is because we recently discovered the errata related to the need of the external VDDD, the driver code is not yet updated with this issue, with android 12 and up.
Regards
First of all, thank you so much for your reply.
I have changed the driver source code as mentioned below. This changing was mentioned in errata sheet. Now, ı can see in dmesg message as SGTL is supplied with external VDDD but same problem still exist.
I have also learned that there should be power sequence in sgtl5000 voltage pins. It says that VDDD should be powered after VDDIO and VDDA are already powered. I have checked this with a manual switch, ı have type reboot and switch the VDDD pin to GND, after 1 sec ı have turned switch off so VDDD is supplied externally after other pins powered on. It works fine now. I have been thinking that the solving of this issue should be as hardware with the method that ı tried. If you have any idea with any other changing with driver, ı prefer to solve this issue as software. IF you have any further suggestion with respect to this information, please let me know.
Best Regards;