All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Ben Hutchings <ben.hutchings@codethink.co.uk>
Cc: Ian Molton <ian@mnementh.co.uk>,
	linux-mmc@vger.kernel.org, linux-sh@vger.kernel.org,
	linux-gpio@vger.kernel.org, linux-kernel@lists.codethink.co.uk,
	Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>,
	Simon Horman <horms@verge.net.au>,
	Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
	Linus Walleij <linus.walleij@linaro.org>
Subject: Re: [PATCH v2 3/6] pinctrl: sh-pfc: r8a7790: Add separate functions for SDHI 1.8V operation
Date: Mon, 15 Jun 2015 02:02:50 +0000	[thread overview]
Message-ID: <11872302.fE1vlhM93k@avalon> (raw)
In-Reply-To: <1434328840.25446.50.camel@codethink.co.uk>

Hi Ben,

On Monday 15 June 2015 01:40:40 Ben Hutchings wrote:
> On Fri, 2015-06-12 at 22:07 +0300, Laurent Pinchart wrote:
> > On Friday 12 June 2015 14:23:55 Ben Hutchings wrote:
> >> On Fri, 2015-06-12 at 10:18 +0300, Laurent Pinchart wrote:
> >>> On Wednesday 10 June 2015 00:23:31 Ben Hutchings wrote:
> >>>> All the SHDIs can operate with either 3.3V or 1.8V signals,
> >>>> depending on negotiation with the card.
> >>>> 
> >>>> Add separate functions for the 1.8V mode, and implement the set_mux
> >>>> operation on all SDHI functions to configure the voltage for each
> >>>> group of pins.
> >>> 
> >>> I don't think duplicating all functions for 1.8V and 3.3V is the right
> >>> way to go. Can't we use the pinconf API instead, and in particular the
> >>> PIN_CONFIG_POWER_SOURCE configuration ?
> >> 
> >> [...]
> >> 
> >> So far as I could see, you can't use the pinconf API with pinmux groups.
> > 
> > Can't you ? Both Documentation/devicetree/bindings/pinctrl/pinctrl-
> > bindings.txt and Documentation/devicetree/bindings/pinctrl/renesas,pfc-
> > pinctrl.txt document the usage of pinconf with groups (see for instance
> > example 3 in the latter).
> 
> Sorry, I should say you can't use them with pinmux *functions*.  You can
> either bind a group to a function *or* set the various pinconf
> properties for the group, but not both.  Unless I'm very much mistaken.

One of us probably is :-)

I'd have to recheck whether this is really a standard behaviour, but the PFC 
driver at least supports setting both functions and configuration as far as I 
can tell. The relevant example from the PFC bindings is

        mmcif_pins: mmcif {
                mux {
                        renesas,groups = "mmc0_data8_0", "mmc0_ctrl_0";
                        renesas,function = "mmc0";
                };
                cfg {
                        renesas,groups = "mmc0_data8_0";
                        renesas,pins = "PORT279";
                        bias-pull-up;
                };
        };

It's a bit more verbose than I'd like, but I think the following should work 
too.

        mmcif_pins: mmcif {
                renesas,groups = "mmc0_data8_0";
                renesas,function = "mmc0";
                bias-pull-up;
        };

(it requires all pins from the groups to use the same configuration though)

I believe the former is the intended way to set both function and config, 
while the latter is a PFC "extension".

On a side note, I have a patch to support the standard "groups", "functions" 
and "pins" properties instead of the Renesas-specific versions, I'll try to 
revive it.

-- 
Regards,

Laurent Pinchart


WARNING: multiple messages have this Message-ID (diff)
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Ben Hutchings <ben.hutchings@codethink.co.uk>
Cc: Ian Molton <ian@mnementh.co.uk>,
	linux-mmc@vger.kernel.org, linux-sh@vger.kernel.org,
	linux-gpio@vger.kernel.org, linux-kernel@lists.codethink.co.uk,
	Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>,
	Simon Horman <horms@verge.net.au>,
	Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
	Linus Walleij <linus.walleij@linaro.org>
Subject: Re: [PATCH v2 3/6] pinctrl: sh-pfc: r8a7790: Add separate functions for SDHI 1.8V operation
Date: Mon, 15 Jun 2015 05:02:50 +0300	[thread overview]
Message-ID: <11872302.fE1vlhM93k@avalon> (raw)
In-Reply-To: <1434328840.25446.50.camel@codethink.co.uk>

Hi Ben,

On Monday 15 June 2015 01:40:40 Ben Hutchings wrote:
> On Fri, 2015-06-12 at 22:07 +0300, Laurent Pinchart wrote:
> > On Friday 12 June 2015 14:23:55 Ben Hutchings wrote:
> >> On Fri, 2015-06-12 at 10:18 +0300, Laurent Pinchart wrote:
> >>> On Wednesday 10 June 2015 00:23:31 Ben Hutchings wrote:
> >>>> All the SHDIs can operate with either 3.3V or 1.8V signals,
> >>>> depending on negotiation with the card.
> >>>> 
> >>>> Add separate functions for the 1.8V mode, and implement the set_mux
> >>>> operation on all SDHI functions to configure the voltage for each
> >>>> group of pins.
> >>> 
> >>> I don't think duplicating all functions for 1.8V and 3.3V is the right
> >>> way to go. Can't we use the pinconf API instead, and in particular the
> >>> PIN_CONFIG_POWER_SOURCE configuration ?
> >> 
> >> [...]
> >> 
> >> So far as I could see, you can't use the pinconf API with pinmux groups.
> > 
> > Can't you ? Both Documentation/devicetree/bindings/pinctrl/pinctrl-
> > bindings.txt and Documentation/devicetree/bindings/pinctrl/renesas,pfc-
> > pinctrl.txt document the usage of pinconf with groups (see for instance
> > example 3 in the latter).
> 
> Sorry, I should say you can't use them with pinmux *functions*.  You can
> either bind a group to a function *or* set the various pinconf
> properties for the group, but not both.  Unless I'm very much mistaken.

One of us probably is :-)

I'd have to recheck whether this is really a standard behaviour, but the PFC 
driver at least supports setting both functions and configuration as far as I 
can tell. The relevant example from the PFC bindings is

        mmcif_pins: mmcif {
                mux {
                        renesas,groups = "mmc0_data8_0", "mmc0_ctrl_0";
                        renesas,function = "mmc0";
                };
                cfg {
                        renesas,groups = "mmc0_data8_0";
                        renesas,pins = "PORT279";
                        bias-pull-up;
                };
        };

It's a bit more verbose than I'd like, but I think the following should work 
too.

        mmcif_pins: mmcif {
                renesas,groups = "mmc0_data8_0";
                renesas,function = "mmc0";
                bias-pull-up;
        };

(it requires all pins from the groups to use the same configuration though)

I believe the former is the intended way to set both function and config, 
while the latter is a PFC "extension".

On a side note, I have a patch to support the standard "groups", "functions" 
and "pins" properties instead of the Renesas-specific versions, I'll try to 
revive it.

-- 
Regards,

Laurent Pinchart


  reply	other threads:[~2015-06-15  2:02 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-09 23:21 [PATCH v2 0/6] UHS-I support for sh_mobile_sdhi Ben Hutchings
2015-06-09 23:21 ` Ben Hutchings
2015-06-09 23:22 ` [PATCH v2 1/6] mmc: tmio: Add UHS-I mode support Ben Hutchings
2015-06-09 23:22   ` Ben Hutchings
2015-06-09 23:23 ` [PATCH v2 2/6] pinctrl: sh-pfc: Add set_mux operation to struct sh_pfc_function Ben Hutchings
2015-06-09 23:23   ` Ben Hutchings
2015-06-09 23:23 ` [PATCH v2 3/6] pinctrl: sh-pfc: r8a7790: Add separate functions for SDHI 1.8V operation Ben Hutchings
2015-06-09 23:23   ` Ben Hutchings
2015-06-12  7:18   ` Laurent Pinchart
2015-06-12  7:18     ` Laurent Pinchart
2015-06-12 13:23     ` Ben Hutchings
2015-06-12 13:23       ` Ben Hutchings
2015-06-12 19:07       ` Laurent Pinchart
2015-06-12 19:07         ` Laurent Pinchart
2015-06-15  0:40         ` Ben Hutchings
2015-06-15  0:40           ` Ben Hutchings
2015-06-15  2:02           ` Laurent Pinchart [this message]
2015-06-15  2:02             ` Laurent Pinchart
2015-06-30  6:05             ` Linus Walleij
2015-06-30  6:05               ` Linus Walleij
2015-06-30  8:30               ` Laurent Pinchart
2015-06-30  8:30                 ` Laurent Pinchart
2015-06-09 23:23 ` [PATCH v2 4/6] mmc: sh_mobile_sdhi: Add UHS-I mode support Ben Hutchings
2015-06-09 23:23   ` Ben Hutchings
2015-06-09 23:24 ` [PATCH v2 5/6] ARM: shmobile: lager: Set clock rates for SDHI Ben Hutchings
2015-06-09 23:24   ` Ben Hutchings
2015-06-11  1:20   ` Kuninori Morimoto
2015-06-11  1:47     ` Ben Hutchings
2015-06-11  1:47       ` Ben Hutchings
2015-06-09 23:24 ` [PATCH v2 6/6] ARM: shmobile: lager: Enable UHS-I SDR-50 Ben Hutchings
2015-06-09 23:24   ` Ben Hutchings
2015-06-10  9:16 ` [PATCH v2 0/6] UHS-I support for sh_mobile_sdhi Ulf Hansson
2015-06-10  9:16   ` Ulf Hansson
2015-06-10 23:57   ` Ben Hutchings
2015-06-10 23:57     ` Ben Hutchings
2015-06-11  2:49     ` Simon Horman
2015-06-11  2:49       ` Simon Horman
2015-06-11 15:02       ` Ben Hutchings
2015-06-11 15:02         ` Ben Hutchings
2015-06-14  7:36         ` Geert Uytterhoeven
2015-06-14  7:36           ` Geert Uytterhoeven
2015-06-15  0:30           ` Ben Hutchings
2015-06-15  0:30             ` Ben Hutchings
2015-06-15  0:30           ` Ben Hutchings
2015-06-15  0:30             ` Ben Hutchings

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=11872302.fE1vlhM93k@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=ben.hutchings@codethink.co.uk \
    --cc=horms@verge.net.au \
    --cc=ian@mnementh.co.uk \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@lists.codethink.co.uk \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=sergei.shtylyov@cogentembedded.com \
    /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.