Re: [PATCH 1/2] ARM: dts: omap3-igep0020: Use MMC pwrseq to init SDIO WiFi

2015-12-04 Thread Enric Balletbo Serra
2015-12-03 19:02 GMT+01:00 Javier Martinez Canillas :
> When the WiFi support was added to the IGEP0020 board, the MMC subsystem
> did not provide a mechanism to define power sequence providers. So a DT
> hack was used to toggle the WiFi chip reset and power down pins by using
> fake fixed regulators whose enable GPIO was the GPIOs connected to these
> pins.
>
> But now the simple MMC power sequence provider can be used for this and
> the workaround removed.
>
> Signed-off-by: Javier Martinez Canillas 
> ---
>
>  arch/arm/boot/dts/omap3-igep0020.dts | 24 
>  1 file changed, 8 insertions(+), 16 deletions(-)
>
> diff --git a/arch/arm/boot/dts/omap3-igep0020.dts 
> b/arch/arm/boot/dts/omap3-igep0020.dts
> index 3835e1569c29..33d6b4ead092 100644
> --- a/arch/arm/boot/dts/omap3-igep0020.dts
> +++ b/arch/arm/boot/dts/omap3-igep0020.dts
> @@ -15,25 +15,17 @@
> model = "IGEPv2 Rev. C (TI OMAP AM/DM37x)";
> compatible = "isee,omap3-igep0020", "ti,omap36xx", "ti,omap3";
>
> -   /* Regulator to trigger the WIFI_PDN signal of the Wifi module */
> -   lbee1usjyc_pdn: lbee1usjyc_pdn {
> +   vmmcsdio_fixed: fixedregulator-mmcsdio {
> compatible = "regulator-fixed";
> -   regulator-name = "regulator-lbee1usjyc-pdn";
> +   regulator-name = "vmmcsdio_fixed";
> regulator-min-microvolt = <330>;
> regulator-max-microvolt = <330>;
> -   gpio = < 10 GPIO_ACTIVE_HIGH>;/* gpio_138 - 
> WIFI_PDN */
> -   startup-delay-us = <1>;
> -   enable-active-high;
> };
>
> -   /* Regulator to trigger the RESET_N_W signal of the Wifi module */
> -   lbee1usjyc_reset_n_w: lbee1usjyc_reset_n_w {
> -   compatible = "regulator-fixed";
> -   regulator-name = "regulator-lbee1usjyc-reset-n-w";
> -   regulator-min-microvolt = <330>;
> -   regulator-max-microvolt = <330>;
> -   gpio = < 11 GPIO_ACTIVE_HIGH>;/* gpio_139 - 
> RESET_N_W */
> -   enable-active-high;
> +   mmc2_pwrseq: mmc2_pwrseq {
> +   compatible = "mmc-pwrseq-simple";
> +   reset-gpios = < 11 GPIO_ACTIVE_LOW>,  /* gpio_139 - 
> RESET_N_W */
> + < 10 GPIO_ACTIVE_LOW>;  /* gpio_138 - 
> WIFI_PDN */
> };
>  };
>
> @@ -51,8 +43,8 @@
>   {
> pinctrl-names = "default";
> pinctrl-0 = <_pins _pins>;
> -   vmmc-supply = <_pdn>;
> -   vmmc_aux-supply = <_reset_n_w>;
> +   vmmc-supply = <_fixed>;
> +   mmc-pwrseq = <_pwrseq>;
> bus-width = <4>;
> non-removable;
>  };
> --
> 2.4.3
>

I also tested these patches

Acked-by: Enric Balletbo Serra 
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 1/2] ARM: dts: omap3-igep0020: Use MMC pwrseq to init SDIO WiFi

2015-12-03 Thread Javier Martinez Canillas
When the WiFi support was added to the IGEP0020 board, the MMC subsystem
did not provide a mechanism to define power sequence providers. So a DT
hack was used to toggle the WiFi chip reset and power down pins by using
fake fixed regulators whose enable GPIO was the GPIOs connected to these
pins.

But now the simple MMC power sequence provider can be used for this and
the workaround removed.

Signed-off-by: Javier Martinez Canillas 
---

 arch/arm/boot/dts/omap3-igep0020.dts | 24 
 1 file changed, 8 insertions(+), 16 deletions(-)

diff --git a/arch/arm/boot/dts/omap3-igep0020.dts 
b/arch/arm/boot/dts/omap3-igep0020.dts
index 3835e1569c29..33d6b4ead092 100644
--- a/arch/arm/boot/dts/omap3-igep0020.dts
+++ b/arch/arm/boot/dts/omap3-igep0020.dts
@@ -15,25 +15,17 @@
model = "IGEPv2 Rev. C (TI OMAP AM/DM37x)";
compatible = "isee,omap3-igep0020", "ti,omap36xx", "ti,omap3";
 
-   /* Regulator to trigger the WIFI_PDN signal of the Wifi module */
-   lbee1usjyc_pdn: lbee1usjyc_pdn {
+   vmmcsdio_fixed: fixedregulator-mmcsdio {
compatible = "regulator-fixed";
-   regulator-name = "regulator-lbee1usjyc-pdn";
+   regulator-name = "vmmcsdio_fixed";
regulator-min-microvolt = <330>;
regulator-max-microvolt = <330>;
-   gpio = < 10 GPIO_ACTIVE_HIGH>;/* gpio_138 - WIFI_PDN 
*/
-   startup-delay-us = <1>;
-   enable-active-high;
};
 
-   /* Regulator to trigger the RESET_N_W signal of the Wifi module */
-   lbee1usjyc_reset_n_w: lbee1usjyc_reset_n_w {
-   compatible = "regulator-fixed";
-   regulator-name = "regulator-lbee1usjyc-reset-n-w";
-   regulator-min-microvolt = <330>;
-   regulator-max-microvolt = <330>;
-   gpio = < 11 GPIO_ACTIVE_HIGH>;/* gpio_139 - RESET_N_W 
*/
-   enable-active-high;
+   mmc2_pwrseq: mmc2_pwrseq {
+   compatible = "mmc-pwrseq-simple";
+   reset-gpios = < 11 GPIO_ACTIVE_LOW>,  /* gpio_139 - 
RESET_N_W */
+ < 10 GPIO_ACTIVE_LOW>;  /* gpio_138 - 
WIFI_PDN */
};
 };
 
@@ -51,8 +43,8 @@
  {
pinctrl-names = "default";
pinctrl-0 = <_pins _pins>;
-   vmmc-supply = <_pdn>;
-   vmmc_aux-supply = <_reset_n_w>;
+   vmmc-supply = <_fixed>;
+   mmc-pwrseq = <_pwrseq>;
bus-width = <4>;
non-removable;
 };
-- 
2.4.3

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html