linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ulf Hansson <ulf.hansson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
To: "H. Nikolaus Schaller" <hns-xXXSsgcRVICgSpxsJD1C4w@public.gmane.org>
Cc: "Benoît Cousson"
	<bcousson-rdvid1DuHRBWk0Htik3J/w@public.gmane.org>,
	"Tony Lindgren" <tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>,
	"Rob Herring" <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	"Mark Rutland" <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
	"Russell King" <linux-I+IVW8TIWO2tmTQ+vhA3Yw@public.gmane.org>,
	"Kalle Valo" <kvalo-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
	"Mike Rapoport" <rppt-tEXmvtCZX7AybS5Ee8rs3A@public.gmane.org>,
	"David Sterba" <dsterba-IBi9RG/b67k@public.gmane.org>,
	"Rafael J. Wysocki"
	<rafael.j.wysocki-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	"Petr Mladek" <pmladek-IBi9RG/b67k@public.gmane.org>,
	"Sakari Ailus"
	<sakari.ailus-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>,
	"Kefeng Wang"
	<wangkefeng.wang-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>,
	"Yangtao Li"
	<tiny.windzz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	"Alexios Zavras"
	<alexios.zavras-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	"Thomas Gleixner" <tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>,
	"Allison Randal"
	<allison-wcfNWazeolPR7s880joybQ@public.gmane.org>,
	"Greg Kroah-Hartman"
	<gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org>,
	"John Stultz"
	<john.stultz-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	"Bjorn Helgaas"
	<bhelgaas-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
Subject: Re: [PATCH v2 03/11] DTS: ARM: pandora-common: define wl1251 as child node of mmc3
Date: Thu, 31 Oct 2019 17:59:05 +0100	[thread overview]
Message-ID: <CAPDyKFrbOH=ROv_JefSQsEnmGqN6oFVfbhpqscOK=KUqJgzarw@mail.gmail.com> (raw)
In-Reply-To: <D9A82904-35BE-41F2-A308-9A49606428B1-xXXSsgcRVICgSpxsJD1C4w@public.gmane.org>

On Wed, 30 Oct 2019 at 18:25, H. Nikolaus Schaller <hns-xXXSsgcRVICgSpxsJD1C4w@public.gmane.org> wrote:
>
>
> > Am 30.10.2019 um 17:44 schrieb Ulf Hansson <ulf.hansson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>:
> >
> > On Sat, 19 Oct 2019 at 20:42, H. Nikolaus Schaller <hns-xXXSsgcRVICgSpxsJD1C4w@public.gmane.org> wrote:
> >>
> >> Since v4.7 the dma initialization requires that there is a
> >> device tree property for "rx" and "tx" channels which is
> >> not provided by the pdata-quirks initialization.
> >>
> >> By conversion of the mmc3 setup to device tree this will
> >> finally allows to remove the OpenPandora wlan specific omap3
> >> data-quirks.
> >>
> >> Fixes: 81eef6ca9201 ("mmc: omap_hsmmc: Use dma_request_chan() for requesting DMA channel")
> >>
> >> Signed-off-by: H. Nikolaus Schaller <hns-xXXSsgcRVICgSpxsJD1C4w@public.gmane.org>
> >> Cc: <stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.org> # 4.7.0
> >> ---
> >> arch/arm/boot/dts/omap3-pandora-common.dtsi | 37 +++++++++++++++++++--
> >> 1 file changed, 35 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/arch/arm/boot/dts/omap3-pandora-common.dtsi b/arch/arm/boot/dts/omap3-pandora-common.dtsi
> >> index ec5891718ae6..c595b3eb314d 100644
> >> --- a/arch/arm/boot/dts/omap3-pandora-common.dtsi
> >> +++ b/arch/arm/boot/dts/omap3-pandora-common.dtsi
> >> @@ -226,6 +226,18 @@
> >>                gpio = <&gpio6 4 GPIO_ACTIVE_HIGH>;     /* GPIO_164 */
> >>        };
> >>
> >> +       /* wl1251 wifi+bt module */
> >> +       wlan_en: fixed-regulator-wg7210_en {
> >> +               compatible = "regulator-fixed";
> >> +               regulator-name = "vwlan";
> >> +               regulator-min-microvolt = <1800000>;
> >> +               regulator-max-microvolt = <1800000>;
> >
> > I doubt these are correct.
> >
> > I guess this should be in the range of 2.7V-3.6V.
>
> Well, it is a gpio which enables some LDO inside the
> wifi chip. We do not really know the voltage it produces
> and it does not matter. The gpio voltage is 1.8V.
>
> Basically we use a fixed-regulator to "translate" a
> regulator into a control gpio because the mmc interface
> wants to see a vmmc-supply.

The vmmc supply represent the core power to the SDIO card (or
SD/(e)MMC). Depending on what voltage range the vmmc supply supports,
the so called OCR mask is created by the mmc core. The mask is then
used to let the core negotiate the voltage level with the SDIO card,
during the card initialization. This is not to confuse with the I/O
voltage level, which is a different regulator.

Anyway, according to the TI WiLink series specifications, it looks
like vmmc should be a regulator supporting 3-3.3V (in many schematics
it's called VBAT).

Furthermore I decided to dig into various DTS files that specifies the
vmmc regulator, of course for mmc nodes having a subnode specifying an
SDIO card for a TI WiLink. In most cases a 1.8V fixed GPIO regulator
is used. This looks wrong to me. The fixed GPIO regulator isn't really
the one that should model vmmc.

The proper solution, would rather be to use separate regulator for
vmmc and instead use a so called mmc-pwrseq node to manage the GPIO.

To conclude from my side, as we have lots of DTS that are wrong, I
don't really care if we add another one in the way you suggest above.
But feel free to look into the mmc-pwrseq option.

>
> >
> >> +               startup-delay-us = <50000>;
> >> +               regulator-always-on;
> >
> > Always on?
>
> Oops. Yes, that is something to check!

As it's a GPIO regulator, for sure it's not always on.

>
> >
> >> +               enable-active-high;
> >> +               gpio = <&gpio1 23 GPIO_ACTIVE_HIGH>;
> >> +       };
> >> +
> >>        /* wg7210 (wifi+bt module) 32k clock buffer */
> >>        wg7210_32k: fixed-regulator-wg7210_32k {
> >>                compatible = "regulator-fixed";
> >> @@ -522,9 +534,30 @@
> >>        /*wp-gpios = <&gpio4 31 GPIO_ACTIVE_HIGH>;*/    /* GPIO_127 */
> >> };
> >>
> >> -/* mmc3 is probed using pdata-quirks to pass wl1251 card data */
> >> &mmc3 {
> >> -       status = "disabled";
> >> +       vmmc-supply = <&wlan_en>;
> >> +
> >> +       bus-width = <4>;
> >> +       non-removable;
> >> +       ti,non-removable;
> >> +       cap-power-off-card;
> >> +
> >> +       pinctrl-names = "default";
> >> +       pinctrl-0 = <&mmc3_pins>;
> >> +
> >> +       #address-cells = <1>;
> >> +       #size-cells = <0>;
> >> +
> >> +       wlan: wl1251@1 {
> >> +               compatible = "ti,wl1251";
> >> +
> >> +               reg = <1>;
> >> +
> >> +               interrupt-parent = <&gpio1>;
> >> +               interrupts = <21 IRQ_TYPE_LEVEL_HIGH>;  /* GPIO_21 */
> >> +
> >> +               ti,wl1251-has-eeprom;
> >> +       };
> >> };
> >>
> >> /* bluetooth*/
> >> --
> >> 2.19.1
> >>
>
> BR and thanks,
> Nikolaus
>

Kind regards
Uffe

  parent reply	other threads:[~2019-10-31 16:59 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-19 18:41 [PATCH v2 00/11] OpenPandora: make wl1251 connected to mmc3 sdio port of OpenPandora work again H. Nikolaus Schaller
2019-10-19 18:41 ` [PATCH v2 01/11] Documentation: dt: wireless: update wl1251 for sdio H. Nikolaus Schaller
2019-10-25 21:13   ` Rob Herring
2019-10-26  8:24     ` H. Nikolaus Schaller
2019-10-19 18:41 ` [PATCH v2 02/11] net: wireless: ti: wl1251 add device tree support H. Nikolaus Schaller
2019-10-19 18:41 ` [PATCH v2 03/11] DTS: ARM: pandora-common: define wl1251 as child node of mmc3 H. Nikolaus Schaller
2019-10-30 16:44   ` Ulf Hansson
2019-10-30 17:24     ` H. Nikolaus Schaller
     [not found]       ` <D9A82904-35BE-41F2-A308-9A49606428B1-xXXSsgcRVICgSpxsJD1C4w@public.gmane.org>
2019-10-31 16:59         ` Ulf Hansson [this message]
2019-10-19 18:41 ` [PATCH v2 04/11] mmc: host: omap_hsmmc: add code for special init of wl1251 to get rid of pandora_wl1251_init_card H. Nikolaus Schaller
2019-10-30 15:51   ` Ulf Hansson
2019-10-30 17:24     ` H. Nikolaus Schaller
2019-10-31 16:23       ` Ulf Hansson
2019-10-19 18:41 ` [PATCH v2 05/11] omap: pdata-quirks: revert pandora specific gpiod additions H. Nikolaus Schaller
2019-10-19 18:41 ` [PATCH v2 06/11] omap: pdata-quirks: remove openpandora quirks for mmc3 and wl1251 H. Nikolaus Schaller
2019-10-19 18:41 ` [PATCH v2 07/11] omap: remove old hsmmc.[ch] and in Makefile H. Nikolaus Schaller
     [not found]   ` <9bd4c0bb0df26523d7f5265cdb06d86d63dafba8.1571510481.git.hns-xXXSsgcRVICgSpxsJD1C4w@public.gmane.org>
2019-10-21 14:30     ` Tony Lindgren
2019-10-21 17:07       ` H. Nikolaus Schaller
2019-10-21 17:11         ` Tony Lindgren
     [not found]           ` <20191021171104.GY5610-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
2019-10-22  6:58             ` Ulf Hansson
2019-10-19 18:41 ` [PATCH v2 08/11] mmc: sdio: fix wl1251 vendor id H. Nikolaus Schaller
2019-10-19 18:41 ` [PATCH v2 09/11] mmc: core: fix wl1251 sdio quirks H. Nikolaus Schaller
2019-10-19 18:41 ` [PATCH v2 10/11] net: wireless: ti: wl1251 use new SDIO_VENDOR_ID_TI_WL1251 definition H. Nikolaus Schaller
2019-10-19 18:41 ` [PATCH v2 11/11] net: wireless: ti: remove local VENDOR_ID and DEVICE_ID definitions H. Nikolaus Schaller

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='CAPDyKFrbOH=ROv_JefSQsEnmGqN6oFVfbhpqscOK=KUqJgzarw@mail.gmail.com' \
    --to=ulf.hansson-qsej5fyqhm4dnm+yrofe0a@public.gmane.org \
    --cc=alexios.zavras-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=allison-wcfNWazeolPR7s880joybQ@public.gmane.org \
    --cc=bcousson-rdvid1DuHRBWk0Htik3J/w@public.gmane.org \
    --cc=bhelgaas-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
    --cc=dsterba-IBi9RG/b67k@public.gmane.org \
    --cc=gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org \
    --cc=hns-xXXSsgcRVICgSpxsJD1C4w@public.gmane.org \
    --cc=john.stultz-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=kvalo-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    --cc=linux-I+IVW8TIWO2tmTQ+vhA3Yw@public.gmane.org \
    --cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
    --cc=pmladek-IBi9RG/b67k@public.gmane.org \
    --cc=rafael.j.wysocki-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=rppt-tEXmvtCZX7AybS5Ee8rs3A@public.gmane.org \
    --cc=sakari.ailus-VuQAYsv1563Yd54FQh9/CA@public.gmane.org \
    --cc=tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org \
    --cc=tiny.windzz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org \
    --cc=wangkefeng.wang-hv44wF8Li93QT0dZR+AlfA@public.gmane.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).