Skip to contentSkip to conversation

ARM: dts: imx7d-nitrogen7: Use mmc-pwrseq to activate the Wifi clock

RFC Applied Fabio Estevam 3 participants 3 messages Nov 29, 2018 – Dec 5, 2018

Subsystems (2)
lore
Share & tools
lore

Fabio Estevam

author reviewer
#0 lore raw

RFC 1/1 ARM: dts: imx7d-nitrogen7: Use mmc-pwrseq to activate the Wifi clock

In order to turn on the Wifi clock the correct location for describing the CLKO2 clock is via a mmc-pwrseq handle, so do it accordingly.

---
Hi Gary/Troy,

I don't have access to this board, but I was working on something similar for imx7d-pico-pi and needed to add mmc-pwrseq in order to turn on the 32kHz clock:
http://lists.infradead.org/pipermail/linux-arm-kernel/2018-November/616048.html

Is the 32kHz clock still needed for the Wifi chip used in the latest version of nitrogen7?

What do you think about this patch?

Thanks

 arch/arm/boot/dts/imx7d-nitrogen7.dts | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
arch/arm/boot/dts/imx7d-nitrogen7.dts +7 -2
index 4fb7e84..9ba9084 100644
@@ -87,13 +87,17 @@
 		compatible = "regulator-fixed";
 		regulator-min-microvolt = <3300000>;
 		regulator-max-microvolt = <3300000>;
-		clocks = <&clks IMX7D_CLKO2_ROOT_DIV>;
-		clock-names = "slow";
 		regulator-name = "reg_wlan";
 		startup-delay-us = <70000>;
 		gpio = <&gpio4 21 GPIO_ACTIVE_HIGH>;
 		enable-active-high;
 	};
+
+	usdhc2_pwrseq: usdhc2_pwrseq {
+		compatible = "mmc-pwrseq-simple";
+		clocks = <&clks IMX7D_CLKO2_ROOT_DIV>;
+		clock-names = "slow";
+	};
 };
 
 &adc1 {
@@ -376,6 +380,7 @@
 	bus-width = <4>;
 	non-removable;
 	vmmc-supply = <&reg_wlan>;
+	mmc-pwrseq = <&usdhc2_pwrseq>;
 	cap-power-off-card;
 	keep-power-in-suspend;
 	status = "okay";
Signature · 1 line
2.7.4
Acked-by on v1 1/1
#1 lore raw
Quoted 27 lines · Fabio Estevam

In order to turn on the Wifi clock the correct location for describing the CLKO2 clock is via a mmc-pwrseq handle, so do it accordingly.

---
Hi Gary/Troy,

I don't have access to this board, but I was working on something similar for imx7d-pico-pi and needed to add mmc-pwrseq in order to turn on the 32kHz clock:
http://lists.infradead.org/pipermail/linux-arm-kernel/2018-November/616048.html

Is the 32kHz clock still needed for the Wifi chip used in the latest version of nitrogen7?

What do you think about this patch?

Thanks

 arch/arm/boot/dts/imx7d-nitrogen7.dts | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
arch/arm/boot/dts/imx7d-nitrogen7.dts +0 -0
index 4fb7e84..9ba9084 100644

arch/arm/boot/dts/imx7d-nitrogen7.dts line 91

Quoted 5 lines
arch/arm/boot/dts/imx7d-nitrogen7.dts +0 -2
@@ -87,13 +87,17 @@
 		compatible = "regulator-fixed";
 		regulator-min-microvolt = <3300000>;
 		regulator-max-microvolt = <3300000>;
-		clocks = <&clks IMX7D_CLKO2_ROOT_DIV>;
-		clock-names = "slow";

Yes, since mainline does not know about a clock in a fixed regulator, your patch is needed.

Thanks

Quoted 16 lines
arch/arm/boot/dts/imx7d-nitrogen7.dts +6 -0
 		regulator-name = "reg_wlan";
 		startup-delay-us = <70000>;
 		gpio = <&gpio4 21 GPIO_ACTIVE_HIGH>;
 		enable-active-high;
 	};
+
+	usdhc2_pwrseq: usdhc2_pwrseq {
+		compatible = "mmc-pwrseq-simple";
+		clocks = <&clks IMX7D_CLKO2_ROOT_DIV>;
+		clock-names = "slow";
+	};
 };
 
 &adc1 {

arch/arm/boot/dts/imx7d-nitrogen7.dts line 386

Quoted 7 lines
arch/arm/boot/dts/imx7d-nitrogen7.dts +1 -0
@@ -376,6 +380,7 @@
 	bus-width = <4>;
 	non-removable;
 	vmmc-supply = <&reg_wlan>;
+	mmc-pwrseq = <&usdhc2_pwrseq>;
 	cap-power-off-card;
 	keep-power-in-suspend;
 	status = "okay";

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel