From: Chris Ball <cjb@laptop.org>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: spear-devel@list.st.com, linux-mmc@vger.kernel.org,
devicetree-discuss@lists.ozlabs.org, sr@denx.de
Subject: Re: [PATCH Resend 1/2] mmc: sdhci-spear: add device tree bindings
Date: Fri, 28 Sep 2012 05:03:41 -0400 [thread overview]
Message-ID: <87lifuv7rm.fsf@octavius.laptop.org> (raw)
In-Reply-To: <a42729885c593f61bb62c45f229174d9f7370c40.1348809217.git.viresh.kumar2@arm.com> (Viresh Kumar's message of "Fri, 28 Sep 2012 10:48:08 +0530")
Hi Viresh,
On Fri, Sep 28 2012, Viresh Kumar wrote:
> This adds simple DT bindings for SDHCI SPEAr controller. It uses cd-gpios from
> common mmc bindings.
>
> This also fixes spear300-evb.dts with correct name for card detect binding.
>
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> ---
> V1->resend:
> - Use cd-gpios instead of int-gpio as binding for card detect gpio.
> - Fix spear300-evb.dts binding name for cd-gpios
>
> .../devicetree/bindings/mmc/sdhci-spear.txt | 28 +++++++++
> arch/arm/boot/dts/spear300-evb.dts | 2 +-
> drivers/mmc/host/sdhci-spear.c | 71 +++++++++++++++++++++-
> 3 files changed, 98 insertions(+), 3 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/mmc/sdhci-spear.txt
>
> diff --git a/Documentation/devicetree/bindings/mmc/sdhci-spear.txt b/Documentation/devicetree/bindings/mmc/sdhci-spear.txt
> new file mode 100644
> index 0000000..cd34a05
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/mmc/sdhci-spear.txt
> @@ -0,0 +1,28 @@
> +* SPEAr SDHCI Controller
> +
> +Required properties:
> +- compatible : "st,spear300-sdhci"
> +- reg : Address range of the sdhci
> +- interrupt-parent: Should be the phandle for the interrupt controller
> + that services interrupts for this device
> +- interrupt: Should contain the sdhci interrupt number
You don't have to mention reg/interrupts, because they're already
covered in mmc.txt.
> +Optional Properties:
> +- cd-gpios: card detect gpio, with zero flags.
> +- power-gpio: specifies the power gpio pin with flags: active low:1, active
> + high:0
> +- power_always_enb: power should be on before inserting the card and so can't be
> + switched off. Only valid when power gpio is supported.
power-gpio should be "power-gpios" (even though there's only one), and
power_always_enb should use hyphens instead of underscores, but I have
a more fundamental request:
You should use a fixed regulator instead of this power-gpio hack.
It's easy to hook up a fixed regulator to a gpio:
vmmc1: fixedregulator@0 {
compatible = "regulator-fixed";
regulator-name = "fixed-supply";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
gpio = <&gpio1 16 0>;
startup-delay-us = <70000>;
vin-supply = <&parent_reg>;
};
and then you can encode the regulator inside your SD host:
sdhci@fc000000 {
compatible = "st,spear300-sdhci";
reg = <0xfc000000 0x1000>;
cd-gpios = <&gpio0 6 0>;
vmmc-supply = <&vmmc1>;
};
and the MMC core will take care of making sure that it's powered up
only when needed. What do you think?
Thanks,
- Chris.
--
Chris Ball <cjb@laptop.org> <http://printf.net/>
One Laptop Per Child
next prev parent reply other threads:[~2012-09-28 9:03 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-28 5:18 [PATCH Resend 1/2] mmc: sdhci-spear: add device tree bindings Viresh Kumar
2012-09-28 5:18 ` [PATCH Resend 2/2] mmc: sdhci-spear: Add clk_{un}prepare() support Viresh Kumar
2012-09-28 9:03 ` Chris Ball [this message]
2012-09-28 9:49 ` [PATCH Resend 1/2] mmc: sdhci-spear: add device tree bindings viresh kumar
2012-09-28 10:13 ` Chris Ball
2012-09-28 10:18 ` viresh kumar
2012-09-28 9:59 ` viresh kumar
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=87lifuv7rm.fsf@octavius.laptop.org \
--to=cjb@laptop.org \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=linux-mmc@vger.kernel.org \
--cc=spear-devel@list.st.com \
--cc=sr@denx.de \
--cc=viresh.kumar@linaro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox