Skip to content

Commit fa51e1d

Browse files
fabioestevamShawn Guo
authored andcommitted
ARM: dts: imx6qdl-apalis: Fix sgtl5000 detection issue
On a custom carrier board with a i.MX6Q Apalis SoM, the sgtl5000 codec on the SoM is often not detected and the following error message is seen when the sgtl5000 driver tries to read the ID register: sgtl5000 1-000a: Error reading chip id -6 The reason for the error is that the MCLK clock is not provided early enough. Fix the problem by describing the MCLK pinctrl inside the codec node instead of placing it inside the audmux pinctrl group. With this change applied the sgtl5000 is always detected on every boot. Fixes: 693e3ff ("ARM: dts: imx6: Add support for Toradex Apalis iMX6Q/D SoM") Signed-off-by: Fabio Estevam <festevam@gmail.com> Reviewed-by: Tim Harvey <tharvey@gateworks.com> Acked-by: Max Krummenacher <max.krummenacher@toradex.com> Signed-off-by: Shawn Guo <shawnguo@kernel.org>
1 parent e2aa165 commit fa51e1d

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

arch/arm/boot/dts/imx6qdl-apalis.dtsi

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,8 @@
286286
codec: sgtl5000@a {
287287
compatible = "fsl,sgtl5000";
288288
reg = <0x0a>;
289+
pinctrl-names = "default";
290+
pinctrl-0 = <&pinctrl_sgtl5000>;
289291
clocks = <&clks IMX6QDL_CLK_CKO>;
290292
VDDA-supply = <&reg_module_3v3_audio>;
291293
VDDIO-supply = <&reg_module_3v3>;
@@ -517,8 +519,6 @@
517519
MX6QDL_PAD_DISP0_DAT21__AUD4_TXD 0x130b0
518520
MX6QDL_PAD_DISP0_DAT22__AUD4_TXFS 0x130b0
519521
MX6QDL_PAD_DISP0_DAT23__AUD4_RXD 0x130b0
520-
/* SGTL5000 sys_mclk */
521-
MX6QDL_PAD_GPIO_5__CCM_CLKO1 0x130b0
522522
>;
523523
};
524524

@@ -811,6 +811,12 @@
811811
>;
812812
};
813813

814+
pinctrl_sgtl5000: sgtl5000grp {
815+
fsl,pins = <
816+
MX6QDL_PAD_GPIO_5__CCM_CLKO1 0x130b0
817+
>;
818+
};
819+
814820
pinctrl_spdif: spdifgrp {
815821
fsl,pins = <
816822
MX6QDL_PAD_GPIO_16__SPDIF_IN 0x1b0b0

0 commit comments

Comments
 (0)