I am upgrading my i.MX6 kernel to version 4.1.15. I am using the same device tree as the previous version 3.14.28. Audio worked great on the earlier version but I am now getting the following error:
sgtl5000 2-000a: sgtl5000 revision 0x11
imx-sgtl5000 sound: phandle missing or invalid
imx-sgtl5000: probe of sound failed with error -22
My question is has anybody seen this problem? Have the device tree entries for the SGTL5000 changed with the new kernel version?
已解决! 转到解答。
Thanks Jimmy!
I had already looked at this but your post made me double check. The imx-sgtl5000.c has indeed changed. Previously the OF parse looked for 'cpu-dai' as a parameter but now it looks for 'ssi-controller'. Made the change in the device tree and everything is good again. Why do they make this kind of unnecessary code change????
Dear Paul,
I am facing the same issue, which you have said in the query
"
I am upgrading my i.MX6 kernel to version 4.1.15. I am using the same device tree as the previous version 3.14.28. Audio worked great on the earlier version but I am now getting the following error:
sgtl5000 2-000a: sgtl5000 revision 0x11
imx-sgtl5000 sound: phandle missing or invalid
imx-sgtl5000: probe of sound failed with error -22
My question is has anybody seen this problem? Have the device tree entries for the SGTL5000 changed with the new kernel version?
"
If you have any solution for the above issue, please share with me.
Here are the relevant sections I have in my device tree. Make sure your mux-int-port and mux-ext-port numbers are correct.
sound {
compatible = "fsl,imx6q-c420-sgtl5000",
"fsl,imx-audio-sgtl5000";
model = "sgtl5000-audio";
cpu-dai = <&ssi2>;
audio-codec = <&sgtl5000>;
audio-routing = "Line Out Jack", "LINE_OUT";
mux-int-port = <2>;
mux-ext-port = <5>;
};
&i2c3 {
clock-frequency = <100000>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_i2c3>;
status = "okay";
sgtl5000: sgtl5000@0a {
compatible = "fsl,sgtl5000";
reg = <0x0a>;
VDDA-supply = <®_v3p3a>;
VDDD-supply = <&sw4_reg>;
VDDIO-supply = <®_v3p3a>;
clocks = <&codec_osc>;
};
eeprom@50 {
compatible = "st-micro,24c256";
reg = <0x50>;
pagesize = <64>;
};
};
in the imx-sgtl5000.c
ssi_np = of_parse_phandle(pdev->dev.of_node, "ssi-controller", 0);
codec_np = of_parse_phandle(pdev->dev.of_node, "audio-codec", 0);
if (!ssi_np || !codec_np) {
dev_err(&pdev->dev, "phandle missing or invalid\n");
ret = -EINVAL;
goto fail;
}
So, please check the "ssi-controller" and "audio-codec" are setting correctly in your dtsi file. you can take imx6qdl-sabrelite.dtsi for reference.
Thanks Jimmy!
I had already looked at this but your post made me double check. The imx-sgtl5000.c has indeed changed. Previously the OF parse looked for 'cpu-dai' as a parameter but now it looks for 'ssi-controller'. Made the change in the device tree and everything is good again. Why do they make this kind of unnecessary code change????