mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Stephen Warren <swarren@wwwdotorg.org>
To: Dong Aisheng <aisheng.dong@freescale.com>
Cc: Dong Aisheng-B29396 <B29396@freescale.com>,
	"linus.walleij@linaro.org" <linus.walleij@linaro.org>,
	"grant.likely@secretlab.ca" <grant.likely@secretlab.ca>,
	"rob.herring@calxeda.com" <rob.herring@calxeda.com>,
	"linus.walleij@stericsson.com" <linus.walleij@stericsson.com>,
	"s.hauer@pengutronix.de" <s.hauer@pengutronix.de>,
	"dongas86@gmail.com" <dongas86@gmail.com>,
	"shawn.guo@linaro.org" <shawn.guo@linaro.org>,
	"thomas.abraham@linaro.org" <thomas.abraham@linaro.org>,
	"tony@atomide.com" <tony@atomide.com>,
	"sjg@chromium.org" <sjg@chromium.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"devicetree-discuss@lists.ozlabs.org" 
	<devicetree-discuss@lists.ozlabs.org>,
	"linux-tegra@vger.kernel.org" <linux-tegra@vger.kernel.org>
Subject: Re: [PATCH V2 5/6] dt: Document Tegra20/30 pinctrl binding
Date: Thu, 22 Mar 2012 09:45:31 -0600	[thread overview]
Message-ID: <4F6B491B.8040506@wwwdotorg.org> (raw)
In-Reply-To: <20120322040024.GB840@shlinux2.ap.freescale.net>

On 03/21/2012 10:00 PM, Dong Aisheng wrote:
> On Wed, Mar 21, 2012 at 11:57:14PM +0800, Stephen Warren wrote:
>> On 03/21/2012 03:19 AM, Dong Aisheng wrote:
>>> On Wed, Mar 21, 2012 at 01:44:38AM +0800, Stephen Warren wrote:
>>>> Define a new binding for the Tegra pin controller, which is capable of
>>>> defining all aspects of desired pin multiplexing and pin configuration.
>>>> This is all based on the new common pinctrl bindings.
>>>>
>>>> Add Tegra30 binding based on Tegra20 binding.
...
>>>> +Example board file extract:
>>>> +
>>>> +	pinctrl@70000000 {
>>>> +		sdmmc4_default: pinmux {
>>>> +			sdmmc4_clk_pcc4 {
>>>> +				nvidia,pins =	"sdmmc4_clk_pcc4",
>>>> +						"sdmmc4_rst_n_pcc3";
>>>> +				nvidia,function = "sdmmc4";
>>>> +				nvidia,pull = <0>;
>>>> +				nvidia,tristate = <0>;
>>>> +			};
>>>> +			sdmmc4_dat0_paa0 {
>>>> +				nvidia,pins =	"sdmmc4_dat0_paa0",
>>>> +						"sdmmc4_dat1_paa1",
>>>> +						"sdmmc4_dat2_paa2",
>>>> +						"sdmmc4_dat3_paa3",
>>>> +						"sdmmc4_dat4_paa4",
>>>> +						"sdmmc4_dat5_paa5",
>>>> +						"sdmmc4_dat6_paa6",
>>>> +						"sdmmc4_dat7_paa7";
>>>> +				nvidia,function = "sdmmc4";
>>>> +				nvidia,pull = <2>;
>>>> +				nvidia,tristate = <0>;
>>>
>>> It seems it does not support per pin config for tegra30 and we have to
>>> separate them in different nodes with same group config value, right?
>>
>> Sorry, I don't understand the question.
>
> I meant for tegra, the config(not mux) in one pinctrl node functions
> on all entities in nvidia,pins, IOW, all pin or group must have the
> same config.
> So we can not set them differently in one node.
> 
> For example, considering if  sdmmc4_dat0_paa0 is nvidia,pull <0>
> while sdmmc4_dat1_paa1 is nvidia,pull <1>.
> Then we need to separate them in different pinctrl nodes, right?

Yes, that's true.

However, note that you can have more than one node affecting a
particular pin or group if you want. For example, you could have one set
of nodes that sets the mux, another set of nodes that sets
pullup/down/none, another set that sets tristate/driven. That way,
within each set of nodes, you get to group together all pins with
similar properties. This is all because we take the list of affected
pins/groups from the nvidia,pins property, rather than e.g. the node
name, so it's possible to list the same pin/group in multiple nodes. An
example from the Tegra Harmony board file:

There's one node for each mux function that's used, specifying which
pins/groups it's used on:

    ata {
            pins = "ata";
            function = "ide";
    };
    atb {
            nvidia,pins = "atb", "gma", "gme";
            nvidia,function = "sdio4";
    };
    ... many other nodes for other functions

There's also one node for each combination of pull and tristate that's
used, specifying which pins/groups it's used on:

    conf_ata {
            nvidia,pins = "ata", "atb", "atc", "atd", "ate",
                    "cdev1", "dap1", "dtb", "gma", "gmb",
                    "gmc", "gmd", "gme", "gpu7", "gpv",
                    "i2cp", "pta", "rm", "slxa", "slxk",
                    "spia", "spib";
            nvidia,pull = <0>;
            nvidia,tristate = <0>;
    };
    ... many other nodes for other pull/tristate combinations

I ran a script to group the various pins into nodes in different ways,
and this particular combination seemed to generate the smallest device
tree source file for Harmony.

  reply	other threads:[~2012-03-22 15:45 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-20 17:44 [PATCH V2 1/6] dt: add property iteration helpers Stephen Warren
2012-03-20 17:44 ` [PATCH V2 2/6] dt: pinctrl: Document device tree binding Stephen Warren
2012-03-20 19:50   ` Simon Glass
2012-03-21  5:37   ` Dong Aisheng
2012-03-20 17:44 ` [PATCH V2 3/6] pinctrl: core device tree mapping table parsing support Stephen Warren
2012-03-21  7:31   ` Dong Aisheng
2012-03-21 15:48     ` Stephen Warren
2012-03-21 17:25       ` Stephen Warren
2012-03-22  5:49         ` Dong Aisheng
2012-03-22  3:39       ` Dong Aisheng
2012-03-20 17:44 ` [PATCH V2 4/6] dt: Move Tegra20 pin mux binding into new pinctrl directory Stephen Warren
2012-03-20 17:44 ` [PATCH V2 5/6] dt: Document Tegra20/30 pinctrl binding Stephen Warren
2012-03-21  9:19   ` Dong Aisheng
2012-03-21 15:57     ` Stephen Warren
2012-03-22  4:00       ` Dong Aisheng
2012-03-22 15:45         ` Stephen Warren [this message]
2012-03-23  4:51           ` Dong Aisheng
2012-03-20 17:44 ` [PATCH V2 6/6] pinctrl: tegra: Add complete device tree support Stephen Warren
2012-03-21  9:35   ` Dong Aisheng
2012-03-21 16:07     ` Stephen Warren
2012-03-22  4:07       ` Dong Aisheng
2012-03-22 17:22         ` Stephen Warren
2012-04-01 17:29   ` Linus Walleij
2012-04-02 15:34     ` Stephen Warren
2012-04-03 21:06       ` Linus Walleij
2012-03-20 20:03 ` [PATCH V2 1/6] dt: add property iteration helpers Rob Herring

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=4F6B491B.8040506@wwwdotorg.org \
    --to=swarren@wwwdotorg.org \
    --cc=B29396@freescale.com \
    --cc=aisheng.dong@freescale.com \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=dongas86@gmail.com \
    --cc=grant.likely@secretlab.ca \
    --cc=linus.walleij@linaro.org \
    --cc=linus.walleij@stericsson.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=rob.herring@calxeda.com \
    --cc=s.hauer@pengutronix.de \
    --cc=shawn.guo@linaro.org \
    --cc=sjg@chromium.org \
    --cc=thomas.abraham@linaro.org \
    --cc=tony@atomide.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome