ARM: dts: imx53-qsb: Let the codec control MCLK pinctrl
Subsystems (2)
Fabio Estevam
reviewerPATCH 1/1 ARM: dts: imx53-qsb: Let the codec control MCLK pinctrl
From: Fabio Estevam <[email protected]>
sgtl5000 codec needs MCLK clock to be present so that it can successfully read/write via I2C.
In the case of imx53-qsb, MCLK is provided viaMX53_PAD_GPIO_0__CCM_SSI_EXT1_CLK pad.
Move the MCLK pinctrl from hog group to the codec group, so that the codec clock can be present prior to reading the codec ID.
This avoids the following sgtl5000 probe error:
sgtl5000 1-000a: Error reading chip id -6
--- arch/arm/boot/dts/imx53-qsb-common.dtsi | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
arch/arm/boot/dts/imx53-qsb-common.dtsi +8 -1
@@ -153,7 +153,6 @@ imx53-qsb { pinctrl_hog: hoggrp { fsl,pins = < - MX53_PAD_GPIO_0__CCM_SSI_EXT1_CLK 0x80000000 MX53_PAD_GPIO_8__GPIO1_8 0x80000000 MX53_PAD_PATA_DATA14__GPIO2_14 0x80000000 MX53_PAD_PATA_DATA15__GPIO2_15 0x80000000
@@ -180,6 +179,12 @@ >; }; + pinctrl_codec: codecgrp { + fsl,pins = < + MX53_PAD_GPIO_0__CCM_SSI_EXT1_CLK 0x1c4 + >; + }; + pinctrl_esdhc1: esdhc1grp { fsl,pins = < MX53_PAD_SD1_DATA0__ESDHC1_DAT0 0x1d5
@@ -310,6 +315,8 @@ sgtl5000: codec@a { compatible = "fsl,sgtl5000"; reg = <0x0a>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_codec>; #sound-dai-cells = <0>; VDDA-supply = <®_3p2v>; VDDIO-supply = <®_3p2v>;
Signature · 1 line
2.7.4
PATCH 1/1 ARM: dts: imx53-qsb: Let the codec control MCLK pinctrl
Quoted 10 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
sgtl5000 codec needs MCLK clock to be present so that it can successfully read/write via I2C.
In the case of imx53-qsb, MCLK is provided via
MX53_PAD_GPIO_0__CCM_SSI_EXT1_CLKpad.Move the MCLK pinctrl from hog group to the codec group, so that the codec clock can be present prior to reading the codec ID.
Are you saying that pins in hog group hasn't been set up yet when codec driver probes?
Shawn
Quoted 47 lines
This avoids the following sgtl5000 probe error:
sgtl5000 1-000a: Error reading chip id -6
Signed-off-by Fabio Estevam <[email protected]>--- arch/arm/boot/dts/imx53-qsb-common.dtsi | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)arch/arm/boot/dts/imx53-qsb-common.dtsi +8
-1@@ -153,7 +153,6 @@ imx53-qsb { pinctrl_hog: hoggrp { fsl,pins = < - MX53_PAD_GPIO_0__CCM_SSI_EXT1_CLK 0x80000000 MX53_PAD_GPIO_8__GPIO1_8 0x80000000 MX53_PAD_PATA_DATA14__GPIO2_14 0x80000000 MX53_PAD_PATA_DATA15__GPIO2_15 0x80000000@@ -180,6 +179,12 @@ >; }; + pinctrl_codec: codecgrp { + fsl,pins = < + MX53_PAD_GPIO_0__CCM_SSI_EXT1_CLK 0x1c4 + >; + }; + pinctrl_esdhc1: esdhc1grp { fsl,pins = < MX53_PAD_SD1_DATA0__ESDHC1_DAT0 0x1d5@@ -310,6 +315,8 @@ sgtl5000: codec at a { compatible = "fsl,sgtl5000"; reg = <0x0a>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_codec>; #sound-dai-cells = <0>; VDDA-supply = <®_3p2v>; VDDIO-supply = <®_3p2v>;Signature · 1 line
2.7.4
Fabio Estevam
reviewerPATCH 1/1 ARM: dts: imx53-qsb: Let the codec control MCLK pinctrl
Hi Shawn,
Quoted 2 lines · Shawn Guo
Are you saying that pins in hog group hasn't been set up yet when codec driver probes?
After further investigation I found the root cause as to why pinctrl_hog pins were failling and sent a fix for it:
https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git/commit/?h=fixes&id=bc3322bc166a2905bc91f774d7b22773dc7c063a
We can drop this dts patch.
Moving from hog to codec group is still a good idea though. I can respin this patch later, but it will be a cleanup, not a bug fix.
Thanks