ARM: imx: enable emi_slow_gate clock for imx5
PATCH 1/2 ARM: imx: enable emi_slow_gate clock for imx5
The imx5 common clock migration causes a regression with smsc911x driver on imx53-ard board, where a smsc lan9220 controller gets connected on imx53 with EIM interface. EIM needs clock emi_slow_gate to be functional. In the new imx5 clock driver, there is no use count incremented for the clock by enabling it, so the framework closes the clock at late init time and makes EIM stop working then.
Enable emi_slow_gate in clock driver initialization to fix the regression.
--- arch/arm/mach-imx/clk-imx51-imx53.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
arch/arm/mach-imx/clk-imx51-imx53.c +1 -0
@@ -303,6 +303,7 @@ static void __init mx5_clocks_common_init(unsigned long rate_ckil,clk_prepare_enable (clk[aips_tz2]);/* fec */ clk_prepare_enable (clk[spba]);clk_prepare_enable (clk[emi_fast_gate]);/* fec */ +clk_prepare_enable (clk[emi_slow_gate]);clk_prepare_enable (clk[tmax1]);clk_prepare_enable (clk[tmax2]);/* esdhc2, fec */ clk_prepare_enable (clk[tmax3]);/* esdhc1, esdhc4 */
Signature · 1 line
1.7.5.4
PATCH 2/2 ARM: dts: imx53-ard: add regulators for lan9220
Since commit c7e963f (net/smsc911x: Add regulator support), the lan9220 device tree probe fails on imx53-ard board, because the commit makes VDD33A and VDDVARIO supplies mandatory for the driver.
Add a fixed dummy 3V3 supplying lan9220 to fix the regression.
--- arch/arm/boot/dts/imx53-ard.dts | 20 ++++++++++++++++++++ 1 files changed, 20 insertions(+), 0 deletions(-)
arch/arm/boot/dts/imx53-ard.dts +20 -0
@@ -66,10 +66,30 @@ interrupt-parent = <&gpio2>; interrupts = <31>; reg-io-width = <4>; + /* + * VDD33A and VDDVARIO of LAN9220 are supplied by + * SW4_3V3 of LTC3589. Before the regulator driver + * for this PMIC is available, we use a fixed dummy + * 3V3 regulator to get LAN9220 driver probing work. + */ + vdd33a-supply = <®_3p3v>; + vddvario-supply = <®_3p3v>; smsc,irq-push-pull; }; }; + regulators { + compatible = "simple-bus"; + + reg_3p3v: 3p3v { + compatible = "regulator-fixed"; + regulator-name = "3P3V"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + }; + }; + gpio-keys { compatible = "gpio-keys";
Signature · 1 line
1.7.5.4
Sascha Hauer
maintainerPATCH 1/2 ARM: imx: enable emi_slow_gate clock for imx5
In reply to Shawn GuoQuoted 9 lines · Shawn Guo
The imx5 common clock migration causes a regression with smsc911x driver on imx53-ard board, where a smsc lan9220 controller gets connected on imx53 with EIM interface. EIM needs clock
emi_slow_gateto be functional. In the new imx5 clock driver, there is no use count incremented for the clock by enabling it, so the framework closes the clock at late init time and makes EIM stop working then.Enable
emi_slow_gatein clock driver initialization to fix the regression.
Can we add a comment that emi_slow_gate is needed for the EIM interface? It's not obvious from the datasheet and this information might help people who want to clean up the now unconditionally enabled clocks.
Otherwise:
Sascha
Quoted 24 lines
Cc stable at vger.kernel.orgSigned-off-by Shawn Guo <[email protected]>--- arch/arm/mach-imx/clk-imx51-imx53.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)arch/arm/mach-imx/clk-imx51-imx53.c +1
-0@@ -303,6 +303,7 @@ static void __init mx5_clocks_common_init(unsigned long rate_ckil,clk_prepare_enable (clk[aips_tz2]);/* fec */ clk_prepare_enable (clk[spba]);clk_prepare_enable (clk[emi_fast_gate]);/* fec */ +clk_prepare_enable (clk[emi_slow_gate]);clk_prepare_enable (clk[tmax1]);clk_prepare_enable (clk[tmax2]);/* esdhc2, fec */ clk_prepare_enable (clk[tmax3]);/* esdhc1, esdhc4 */ Signature · 1 line
1.7.5.4
Signature · 4 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
PATCH 1/2 ARM: imx: enable emi_slow_gate clock for imx5
Quoted 4 lines · Sascha Hauer
Can we add a comment that
emi_slow_gateis needed for the EIM interface? It's not obvious from the datasheet and this information might help people who want to clean up the now unconditionally enabled clocks.
Ok, will amend the following change.
arch/arm/mach-imx/clk-imx51-imx53.c +1 -1
@@ -303,7 +303,7 @@ static void __init mx5_clocks_common_init(unsigned long rate_ckil,clk_prepare_enable (clk[aips_tz2]);/* fec */ clk_prepare_enable (clk[spba]);clk_prepare_enable (clk[emi_fast_gate]);/* fec */ -clk_prepare_enable (clk[emi_slow_gate]); +clk_prepare_enable (clk[emi_slow_gate]);/* eim */ clk_prepare_enable (clk[tmax1]);clk_prepare_enable (clk[tmax2]);/* esdhc2, fec */ clk_prepare_enable (clk[tmax3]);/* esdhc1, esdhc4 */
Quoted 4 lines
Otherwise:
Acked-by Sascha Hauer <[email protected]>
Thanks.
Signature · 2 lines
Regards, Shawn