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: 693e3ffaae5a ("ARM: dts: imx6: Add support for Toradex Apalis iMX6Q/D SoM")
Signed-off-by: Fabio Estevam <festevam@gmail.com>
---
arch/arm/boot/dts/imx6qdl-apalis.dtsi | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
From: Tim Harvey <tharvey@gateworks.com> Date: 2022-03-28 19:03:29
On Sat, Mar 26, 2022 at 8:16 AM Fabio Estevam [off-list ref] wrote:
quoted hunk
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: 693e3ffaae5a ("ARM: dts: imx6: Add support for Toradex Apalis iMX6Q/D SoM")
Signed-off-by: Fabio Estevam <festevam@gmail.com>
---
arch/arm/boot/dts/imx6qdl-apalis.dtsi | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
Fabio,
Intesting... was there a specific kernel version or set of conditions
such as what's configured as modules that made this issue show up? It
looks like there are a lot of IMX6 boards that define the MCLK in the
audmuxgrp.... some use simple-audio-card and some do not in case that
matters.
Best Regards,
Tim
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Hi Tim,
On Mon, Mar 28, 2022 at 4:02 PM Tim Harvey [off-list ref] wrote:
Fabio,
Intesting... was there a specific kernel version or set of conditions
such as what's configured as modules that made this issue show up? It
looks like there are a lot of IMX6 boards that define the MCLK in the
audmuxgrp.... some use simple-audio-card and some do not in case that
matters.
I observed this issue running a custom defconfig.
To be on the safe side, we should better not rely on kernel probe
order/defconfig and let the sgtl5000 node
to configure the MCLK pintctrl early, so that the MCLK becomes
available and the codec registers can be read safely read.
Regards,
Fabio Estevam
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
From: Tim Harvey <tharvey@gateworks.com> Date: 2022-03-28 19:18:23
On Mon, Mar 28, 2022 at 12:13 PM Fabio Estevam [off-list ref] wrote:
Hi Tim,
On Mon, Mar 28, 2022 at 4:02 PM Tim Harvey [off-list ref] wrote:
quoted
Fabio,
Intesting... was there a specific kernel version or set of conditions
such as what's configured as modules that made this issue show up? It
looks like there are a lot of IMX6 boards that define the MCLK in the
audmuxgrp.... some use simple-audio-card and some do not in case that
matters.
I observed this issue running a custom defconfig.
To be on the safe side, we should better not rely on kernel probe
order/defconfig and let the sgtl5000 node
to configure the MCLK pintctrl early, so that the MCLK becomes
available and the codec registers can be read safely read.
Regards,
Fabio Estevam
Fabio,
Agreed - the MCLK is needed for the codec not for audmux.
Reviewed-by: Tim Harvey <tharvey@gateworks.com>
Best Regards,
Tim
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
From: Max Krummenacher <hidden> Date: 2022-03-30 15:43:12
On Sat, 2022-03-26 at 12:14 -0300, Fabio Estevam wrote:
quoted hunk
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: 693e3ffaae5a ("ARM: dts: imx6: Add support for Toradex Apalis iMX6Q/D SoM")
Signed-off-by: Fabio Estevam <festevam@gmail.com>
---
arch/arm/boot/dts/imx6qdl-apalis.dtsi | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
On Sat, Mar 26, 2022 at 12:14:55PM -0300, Fabio Estevam wrote:
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: 693e3ffaae5a ("ARM: dts: imx6: Add support for Toradex Apalis iMX6Q/D SoM")
Signed-off-by: Fabio Estevam <festevam@gmail.com>