From: Jan Glauber <jan.glauber@caviumnetworks.com>
To: David Daney <ddaney@caviumnetworks.com>
Cc: Ulf Hansson <ulf.hansson@linaro.org>,
"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Steven J . Hill" <Steven.Hill@cavium.com>
Subject: Re: [PATCH v10 0/8] Cavium MMC driver
Date: Fri, 20 Jan 2017 11:37:58 +0100 [thread overview]
Message-ID: <20170120103758.GC3908@hardcore> (raw)
In-Reply-To: <0f721117-24aa-cb69-56fe-0a48f9012852@caviumnetworks.com>
On Thu, Jan 19, 2017 at 09:47:33AM -0800, David Daney wrote:
> On 01/19/2017 06:50 AM, Jan Glauber wrote:
> [...]
> >
> >>4) GPIO powers should be modelled as GPIO regulators. I believe we
> >>have discussed this earlier as well (I don't really recall in detail
> >>about the last things). It gives us the opportunity to via the
> >>regulator framework to find out the supported voltage levels. This is
> >>the generic method which is used by mmc drivers, you need to adopt to
> >>this as well.
> >
> >I've added a fixed regulator to DT:
> >
> > vcc_3v3: regulator-vcc_3v3 {
> > compatible = "regulator-fixed";
> > regulator-name = "VCC_3V3";
>
>
> Very minor point not really directly related to the MMC driver:
> "VCC_3V3" implies a general purpose supply for many things on the
> board. This is not the case for these boards. The "regulator"
> controls power only to eMMC and SD devices, so a name that conveys
> that function should be invented.
OK, I'll rename it to:
mmc_supply_3v3: mmc_supply_3v3 {
compatible = "regulator-fixed";
regulator-name = "mmc_supply_3v3";
[...]
> Actually on some boards GPIO 8 doesn't even control a regulator, but
> instead only activates a bus isolator on the control and data
> signals to the eMMC and SD devices. In this case we would be using
> the regulator framework only because the code is already there and
> it happens to work, not because we actually have a regulator.
>
> > regulator-min-microvolt = <3300000>;
> > regulator-max-microvolt = <3300000>;
> >
> > gpio = <&gpio_6_0 8 0>;
> > /* enable-gpio = <&gpio_6_0 8 0>; */
> > enable-active-high;
> > };
> >
> >This seems to enable the gpio. Is this sufficient or do I need the
> >gpio-regulator?
> >
>
> Does the "regulator-fixed" allow us to properly turn it on and off?
Yes, I've disabled all gpio calls from our mmc driver, with only the gpio
settings in the regulator entry I get:
root@sff:~# cat /sys/kernel/debug/gpio
gpiochip0: GPIOs 464-511, parent: pci/0000:00:06.0, gpio_thunderx:
gpio-472 ( |mmc_supply_3v3 ) out hi
So the regulator driver enables GPIO 8 as it should.
> If not, we may have to switch to "gpio-regulator". Which ever is
> simplest should be used.
"regulator-fixed" seems sufficient to me as we don't need the additional
power states that "gpio-regulator" supports.
> [...]
next prev parent reply other threads:[~2017-01-20 10:38 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-19 12:15 [PATCH v10 0/8] Cavium MMC driver Jan Glauber
2016-12-19 12:15 ` [PATCH v10 1/8] mmc: cavium: Add core MMC driver for Cavium SOCs Jan Glauber
2016-12-19 12:15 ` [PATCH v10 2/8] mmc: octeon: Add MMC platform driver for Octeon SOCs Jan Glauber
2016-12-19 12:15 ` [PATCH v10 3/8] mmc: octeon: Work-around hardware bug on cn6xxx and cnf7xxx Jan Glauber
2016-12-19 12:15 ` [PATCH v10 4/8] mmc: octeon: Add support for Octeon cn7890 Jan Glauber
2016-12-19 12:15 ` [PATCH v10 5/8] mmc: thunderx: Add MMC PCI driver for ThunderX SOCs Jan Glauber
2016-12-19 12:15 ` [PATCH v10 6/8] mmc: thunderx: Add scatter-gather DMA support Jan Glauber
2016-12-19 12:15 ` [PATCH v10 7/8] mmc: thunderx: Support DDR mode for eMMC devices Jan Glauber
2016-12-19 12:15 ` [PATCH v10 8/8] dt-bindings: mmc: Add Cavium SOCs MMC bindings Jan Glauber
2016-12-22 20:32 ` Rob Herring
2017-01-09 15:05 ` Jan Glauber
2016-12-20 12:10 ` [PATCH v10 0/8] Cavium MMC driver Ulf Hansson
2016-12-20 12:24 ` Jan Glauber
2016-12-20 12:38 ` Ulf Hansson
2017-01-19 14:50 ` Jan Glauber
2017-01-19 17:47 ` David Daney
2017-01-20 10:37 ` Jan Glauber [this message]
2017-01-19 21:38 ` Ulf Hansson
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=20170120103758.GC3908@hardcore \
--to=jan.glauber@caviumnetworks.com \
--cc=Steven.Hill@cavium.com \
--cc=ddaney@caviumnetworks.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=ulf.hansson@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;
as well as URLs for NNTP newsgroup(s).