Skip to contentSkip to conversation

ARM: dts: imx7s-warp: Let the codec control MCLK pinctrl

PATCH New Fabio Estevam 2 participants 2 messages Aug 25, 2016 – Aug 29, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: dts: imx7s-warp: Let the codec control MCLK pinctrl

sgtl5000 codec needs MCLK clock to be provided so that it can successfully read/write via I2C, so we should better let the codec control the pinctrl for such pin.

Thanks to Stefan Agner who provided the fix on Toradex's tree:
http://git.toradex.com/cgit/linux-toradex.git/commit/?h=toradex_imx_4.1.15_1.0.0_ga-next&id=0a55a7e5f58d46eef0d4d1d357d89e36d0c32fa4

---
 arch/arm/boot/dts/imx7s-warp.dts | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
arch/arm/boot/dts/imx7s-warp.dts +8 -1
index 92d9c857..7c3f110e 100644
@@ -199,6 +199,8 @@
 		reg = <0x0a>;
 		compatible = "fsl,sgtl5000";
 		clocks = <&clks IMX7D_AUDIO_MCLK_ROOT_CLK>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_sai1_mclk>;
 		VDDA-supply = <&vgen4_reg>;
 		VDDIO-supply = <&vgen4_reg>;
 		VDDD-supply = <&vgen2_reg>;
@@ -291,7 +293,12 @@
 			MX7D_PAD_SAI1_TX_BCLK__SAI1_TX_BCLK	0x1f
 			MX7D_PAD_SAI1_TX_SYNC__SAI1_TX_SYNC	0x1f
 			MX7D_PAD_SAI1_TX_DATA__SAI1_TX_DATA0	0x30
-			MX7D_PAD_SAI1_MCLK__SAI1_MCLK		0x1f
+		>;
+	};
+
+	pinctrl_sai1_mclk: sai1grp_mclk {
+		fsl,pins = <
+			MX7D_PAD_SAI1_MCLK__SAI1_MCLK           0x1f
 		>;
 	};
 
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/1 ARM: dts: imx7s-warp: Let the codec control MCLK pinctrl

Quoted 26 lines · Fabio Estevam

sgtl5000 codec needs MCLK clock to be provided so that it can successfully read/write via I2C, so we should better let the codec control the pinctrl for such pin.

Thanks to Stefan Agner who provided the fix on Toradex's tree:
http://git.toradex.com/cgit/linux-toradex.git/commit/?h=toradex_imx_4.1.15_1.0.0_ga-next&id=0a55a7e5f58d46eef0d4d1d357d89e36d0c32fa4

---
 arch/arm/boot/dts/imx7s-warp.dts | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
arch/arm/boot/dts/imx7s-warp.dts +2 -0
index 92d9c857..7c3f110e 100644
@@ -199,6 +199,8 @@
 		reg = <0x0a>;
 		compatible = "fsl,sgtl5000";
 		clocks = <&clks IMX7D_AUDIO_MCLK_ROOT_CLK>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_sai1_mclk>;
 		VDDA-supply = <&vgen4_reg>;
 		VDDIO-supply = <&vgen4_reg>;
 		VDDD-supply = <&vgen2_reg>;

arch/arm/boot/dts/imx7s-warp.dts line 299

Quoted 8 lines
arch/arm/boot/dts/imx7s-warp.dts +4 -1
@@ -291,7 +293,12 @@
 			MX7D_PAD_SAI1_TX_BCLK__SAI1_TX_BCLK	0x1f
 			MX7D_PAD_SAI1_TX_SYNC__SAI1_TX_SYNC	0x1f
 			MX7D_PAD_SAI1_TX_DATA__SAI1_TX_DATA0	0x30
-			MX7D_PAD_SAI1_MCLK__SAI1_MCLK		0x1f
+		>;
+	};
+
+	pinctrl_sai1_mclk: sai1grp_mclk {

We do not use underscore in node name. I changed it to sai1mclkgrp and applied the patch.

Shawn

Quoted 13 lines
arch/arm/boot/dts/imx7s-warp.dts +2 -0
+		fsl,pins = <
+			MX7D_PAD_SAI1_MCLK__SAI1_MCLK           0x1f
 		>;
 	};
 
Signature · 7 lines
1.9.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel