All of lore.kernel.org
 help / color / mirror / Atom feed
From: shawnguo@kernel.org (Shawn Guo)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/3] ARM: dts: imx6sx-udoo-neo: Add SD
Date: Mon, 15 Aug 2016 20:38:23 +0800	[thread overview]
Message-ID: <20160815123823.GC500@tiger> (raw)
In-Reply-To: <16912a4e-88c8-b11a-16bb-927ee6bf1775@suse.de>

On Mon, Aug 08, 2016 at 05:00:41PM +0200, Andreas F?rber wrote:
> Am 08.08.2016 um 16:12 schrieb Shawn Guo:
> > On Tue, Jul 05, 2016 at 06:04:10AM +0200, Andreas F?rber wrote:
> >> Enable the SDHC node and model the SDIO_PWR GPIO as a regulator.
> >> Use the SD card as default trigger for the red LED.
> >>
> >> Cc: Ettore Chimenti <ettore.chimenti@udoo.org>
> >> Signed-off-by: Andreas F?rber <afaerber@suse.de>
> >> ---
> >>  
> >>
> >>  arch/arm/boot/dts/imx6sx-udoo-neo.dtsi | 34 ++++++++++++++++++++++++++++++++++
> >>  1 file changed, 34 insertions(+)
> >>
> >> diff --git a/arch/arm/boot/dts/imx6sx-udoo-neo.dtsi b/arch/arm/boot/dts/imx6sx-udoo-neo.dtsi
> >> index e074409644d8..85f5e8606dab 100644
> >> --- a/arch/arm/boot/dts/imx6sx-udoo-neo.dtsi
> >> +++ b/arch/arm/boot/dts/imx6sx-udoo-neo.dtsi
> >> @@ -56,6 +56,7 @@
> >>  			label = "udoo-neo:red:mmc";
> >>  			gpios = <&gpio6 0 GPIO_ACTIVE_HIGH>;
> >>  			default-state = "off";
> >> +			linux,default-trigger = "mmc0";
> >>  		};
> >>  
> >>  		orange {
> >> @@ -64,6 +65,17 @@
> >>  			default-state = "keep";
> >>  		};
> >>  	};
> >> +
> >> +	sdio_pwr_reg: sd-gpio-regulator {
> >> +		compatible = "regulator-fixed";
> >> +		gpio = <&gpio6 1 GPIO_ACTIVE_HIGH>;
> >> +		enable-active-high;
> >> +		regulator-name = "SDIO_PWR";
> >> +		regulator-min-microvolt = <3300000>;
> >> +		regulator-max-microvolt = <3300000>;
> >> +		regulator-boot-on;
> >> +		regulator-always-on;
> >> +	};
> > 
> > Is it correct to model SDIO power control GPIO as a boot-on and
> > always-on fixed regulator?  It will be powered-on even when SDIO driver
> > is not enabled or loaded.
> 
> AFAIR the issue was that the driver does not use any -supply properties
> where we could hook this regulator up for enabling. So modeling it as an
> always-on regulator seemed like the only way to ensure it gets enabled
> without relying on the bootloader?

If I understand it correctly, SDHCI driver calls
mmc_regulator_get_supply() to handle vmmc and vqmmc supply.  Can
vmmc-supply be used here?

Shawn

WARNING: multiple messages have this Message-ID (diff)
From: Shawn Guo <shawnguo-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: "Andreas Färber" <afaerber-l3A5Bk7waGM@public.gmane.org>
Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
	devicetree <devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Russell King <linux-I+IVW8TIWO2tmTQ+vhA3Yw@public.gmane.org>,
	LKML <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Ettore Chimenti <ettore.chimenti-GcR40IO4/Fc@public.gmane.org>,
	Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Sascha Hauer <kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>,
	Fabio Estevam <fabio.estevam-3arQi8VN3Tc@public.gmane.org>
Subject: Re: [PATCH 3/3] ARM: dts: imx6sx-udoo-neo: Add SD
Date: Mon, 15 Aug 2016 20:38:23 +0800	[thread overview]
Message-ID: <20160815123823.GC500@tiger> (raw)
In-Reply-To: <16912a4e-88c8-b11a-16bb-927ee6bf1775-l3A5Bk7waGM@public.gmane.org>

On Mon, Aug 08, 2016 at 05:00:41PM +0200, Andreas Färber wrote:
> Am 08.08.2016 um 16:12 schrieb Shawn Guo:
> > On Tue, Jul 05, 2016 at 06:04:10AM +0200, Andreas Färber wrote:
> >> Enable the SDHC node and model the SDIO_PWR GPIO as a regulator.
> >> Use the SD card as default trigger for the red LED.
> >>
> >> Cc: Ettore Chimenti <ettore.chimenti-GcR40IO4/Fc@public.gmane.org>
> >> Signed-off-by: Andreas Färber <afaerber-l3A5Bk7waGM@public.gmane.org>
> >> ---
> >>  
> >>
> >>  arch/arm/boot/dts/imx6sx-udoo-neo.dtsi | 34 ++++++++++++++++++++++++++++++++++
> >>  1 file changed, 34 insertions(+)
> >>
> >> diff --git a/arch/arm/boot/dts/imx6sx-udoo-neo.dtsi b/arch/arm/boot/dts/imx6sx-udoo-neo.dtsi
> >> index e074409644d8..85f5e8606dab 100644
> >> --- a/arch/arm/boot/dts/imx6sx-udoo-neo.dtsi
> >> +++ b/arch/arm/boot/dts/imx6sx-udoo-neo.dtsi
> >> @@ -56,6 +56,7 @@
> >>  			label = "udoo-neo:red:mmc";
> >>  			gpios = <&gpio6 0 GPIO_ACTIVE_HIGH>;
> >>  			default-state = "off";
> >> +			linux,default-trigger = "mmc0";
> >>  		};
> >>  
> >>  		orange {
> >> @@ -64,6 +65,17 @@
> >>  			default-state = "keep";
> >>  		};
> >>  	};
> >> +
> >> +	sdio_pwr_reg: sd-gpio-regulator {
> >> +		compatible = "regulator-fixed";
> >> +		gpio = <&gpio6 1 GPIO_ACTIVE_HIGH>;
> >> +		enable-active-high;
> >> +		regulator-name = "SDIO_PWR";
> >> +		regulator-min-microvolt = <3300000>;
> >> +		regulator-max-microvolt = <3300000>;
> >> +		regulator-boot-on;
> >> +		regulator-always-on;
> >> +	};
> > 
> > Is it correct to model SDIO power control GPIO as a boot-on and
> > always-on fixed regulator?  It will be powered-on even when SDIO driver
> > is not enabled or loaded.
> 
> AFAIR the issue was that the driver does not use any -supply properties
> where we could hook this regulator up for enabling. So modeling it as an
> always-on regulator seemed like the only way to ensure it gets enabled
> without relying on the bootloader?

If I understand it correctly, SDHCI driver calls
mmc_regulator_get_supply() to handle vmmc and vqmmc supply.  Can
vmmc-supply be used here?

Shawn
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

WARNING: multiple messages have this Message-ID (diff)
From: Shawn Guo <shawnguo@kernel.org>
To: "Andreas Färber" <afaerber@suse.de>
Cc: linux-arm-kernel@lists.infradead.org,
	Mark Rutland <mark.rutland@arm.com>,
	devicetree <devicetree@vger.kernel.org>,
	Russell King <linux@armlinux.org.uk>,
	LKML <linux-kernel@vger.kernel.org>,
	Ettore Chimenti <ettore.chimenti@udoo.org>,
	Rob Herring <robh+dt@kernel.org>,
	Sascha Hauer <kernel@pengutronix.de>,
	Fabio Estevam <fabio.estevam@nxp.com>
Subject: Re: [PATCH 3/3] ARM: dts: imx6sx-udoo-neo: Add SD
Date: Mon, 15 Aug 2016 20:38:23 +0800	[thread overview]
Message-ID: <20160815123823.GC500@tiger> (raw)
In-Reply-To: <16912a4e-88c8-b11a-16bb-927ee6bf1775@suse.de>

On Mon, Aug 08, 2016 at 05:00:41PM +0200, Andreas Färber wrote:
> Am 08.08.2016 um 16:12 schrieb Shawn Guo:
> > On Tue, Jul 05, 2016 at 06:04:10AM +0200, Andreas Färber wrote:
> >> Enable the SDHC node and model the SDIO_PWR GPIO as a regulator.
> >> Use the SD card as default trigger for the red LED.
> >>
> >> Cc: Ettore Chimenti <ettore.chimenti@udoo.org>
> >> Signed-off-by: Andreas Färber <afaerber@suse.de>
> >> ---
> >>  
> >>
> >>  arch/arm/boot/dts/imx6sx-udoo-neo.dtsi | 34 ++++++++++++++++++++++++++++++++++
> >>  1 file changed, 34 insertions(+)
> >>
> >> diff --git a/arch/arm/boot/dts/imx6sx-udoo-neo.dtsi b/arch/arm/boot/dts/imx6sx-udoo-neo.dtsi
> >> index e074409644d8..85f5e8606dab 100644
> >> --- a/arch/arm/boot/dts/imx6sx-udoo-neo.dtsi
> >> +++ b/arch/arm/boot/dts/imx6sx-udoo-neo.dtsi
> >> @@ -56,6 +56,7 @@
> >>  			label = "udoo-neo:red:mmc";
> >>  			gpios = <&gpio6 0 GPIO_ACTIVE_HIGH>;
> >>  			default-state = "off";
> >> +			linux,default-trigger = "mmc0";
> >>  		};
> >>  
> >>  		orange {
> >> @@ -64,6 +65,17 @@
> >>  			default-state = "keep";
> >>  		};
> >>  	};
> >> +
> >> +	sdio_pwr_reg: sd-gpio-regulator {
> >> +		compatible = "regulator-fixed";
> >> +		gpio = <&gpio6 1 GPIO_ACTIVE_HIGH>;
> >> +		enable-active-high;
> >> +		regulator-name = "SDIO_PWR";
> >> +		regulator-min-microvolt = <3300000>;
> >> +		regulator-max-microvolt = <3300000>;
> >> +		regulator-boot-on;
> >> +		regulator-always-on;
> >> +	};
> > 
> > Is it correct to model SDIO power control GPIO as a boot-on and
> > always-on fixed regulator?  It will be powered-on even when SDIO driver
> > is not enabled or loaded.
> 
> AFAIR the issue was that the driver does not use any -supply properties
> where we could hook this regulator up for enabling. So modeling it as an
> always-on regulator seemed like the only way to ensure it gets enabled
> without relying on the bootloader?

If I understand it correctly, SDHCI driver calls
mmc_regulator_get_supply() to handle vmmc and vqmmc supply.  Can
vmmc-supply be used here?

Shawn

  reply	other threads:[~2016-08-15 12:38 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-05  4:04 [PATCH 0/3] ARM: dts: imx6sx: Initial UDOO Neo enablement Andreas Färber
2016-07-05  4:04 ` Andreas Färber
2016-07-05  4:04 ` [PATCH 1/3] ARM: dts: imx6sx-sabreauto: Fix misspelled property Andreas Färber
2016-07-05  4:04   ` Andreas Färber
2016-07-05  4:04   ` Andreas Färber
2016-07-05  8:54   ` Sudeep Holla
2016-07-05  8:54     ` Sudeep Holla
2016-07-05  8:54     ` Sudeep Holla
2016-08-08 13:58   ` Shawn Guo
2016-08-08 13:58     ` Shawn Guo
2016-08-08 13:58     ` Shawn Guo
2016-07-05  4:04 ` [PATCH 2/3] ARM: dts: imx6sx: Add UDOO Neo support Andreas Färber
2016-07-05  4:04   ` Andreas Färber
2016-07-05  4:04   ` Andreas Färber
2016-07-05  6:27   ` Uwe Kleine-König
2016-07-05  6:27     ` Uwe Kleine-König
2016-07-05  6:27     ` Uwe Kleine-König
2016-07-05 14:46     ` Andreas Färber
2016-07-05 14:46       ` Andreas Färber
2016-07-05 14:46       ` Andreas Färber
2016-07-05 12:04   ` Fabio Estevam
2016-07-05 12:04     ` Fabio Estevam
2016-07-05 12:04     ` Fabio Estevam
2016-07-05 13:55     ` Andreas Färber
2016-07-05 13:55       ` Andreas Färber
2016-07-05 13:55       ` Andreas Färber
2016-07-05 18:33       ` Uwe Kleine-König
2016-07-05 18:33         ` Uwe Kleine-König
2016-08-08 14:04   ` Shawn Guo
2016-08-08 14:04     ` Shawn Guo
2016-08-08 14:04     ` Shawn Guo
2016-07-05  4:04 ` [PATCH 3/3] ARM: dts: imx6sx-udoo-neo: Add SD Andreas Färber
2016-07-05  4:04   ` Andreas Färber
2016-07-05  4:04   ` Andreas Färber
2016-08-08 14:12   ` Shawn Guo
2016-08-08 14:12     ` Shawn Guo
2016-08-08 15:00     ` Andreas Färber
2016-08-08 15:00       ` Andreas Färber
2016-08-15 12:38       ` Shawn Guo [this message]
2016-08-15 12:38         ` Shawn Guo
2016-08-15 12:38         ` Shawn Guo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160815123823.GC500@tiger \
    --to=shawnguo@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.