linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: tony@atomide.com (Tony Lindgren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v6 5/8] document: devicetree: bind pinconf with pin single
Date: Fri, 21 Dec 2012 17:22:01 -0800	[thread overview]
Message-ID: <20121222012201.GS21056@atomide.com> (raw)
In-Reply-To: <1356083118-18857-6-git-send-email-haojian.zhuang@linaro.org>

Hi,

* Haojian Zhuang <haojian.zhuang@linaro.org> [121221 01:48]:
>  
> +- pinctrl-single,power-source : array of value that are used to configure
> +  power source in the pinmux register. They're value of power source field
> +  and power source mask.
> +
> +		/* power source, mask */
> +		pinctrl-single,power-source = <0x1000 0x1800>;
> +
> +- pinctrl-single,bias : array of value that are used to configure the input
> +  bias in the pinmux register.  They're value of bias field, bias mask,
> +  bias disable value, bias pull down value & bias pull up value.
> +
> +		/* bias, mask, disable, pull down, pull up */
> +		pinctrl-single,bias = <0xc000 0xe000 0 0xa000 0xc000>;
> +
> +- pinctrl-single,input-schmitt : array of value that are used to configure
> +  input schmitt in the pinmux register. They're value of input schmitt field,
> +  mask, & disable value.
> +
> +		/* input schmitt value, mask, disable */
> +		pinctrl-single,input-schmitt = <0x40 0x70 0x40>;
> +

Hmm we might be able to standardize on just few bindings if we
break the bias into enable, pullup and pulldown. Then we should
have the defval, enable and disable for each of them to allow
setting the board specific config, and to enable and disable
things using the generic pinconf api.

So how about something like this:

pinctrl-single,power-source	 = <defval regmask enableval disableval>;
pinctrl-single,bias-enable	 = <defval regmask enableval disableval>;
pinctrl-single,bias-pullup	 = <defval regmask enableval disableval>;
pinctrl-single,bias-pulldown	 = <defval regmask enableval disableval>;
pinctrl-single,input-schmitt	 = <defval regmask enableval disableval>;

And then we can add support for other things like comparators too:

pinctrl-single,comparator-enable = <defval regmask enableval disableval>;
pinctrl-single,comparator-status = <regmask>;	/* read only status bits */

I'll do some experiments on this with my bit-per-mux testcase,
but please let me know if you see any issues using the format
above meanwhile.

Regards,

Tony

  reply	other threads:[~2012-12-22  1:22 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-21  9:45 [PATCH v6 0/8] pinctrl: support mmp silicon with single driver Haojian Zhuang
2012-12-21  9:45 ` [PATCH v6 1/8] pinctrl: single: support generic pinconf Haojian Zhuang
2012-12-22  1:24   ` Tony Lindgren
2013-01-04  0:14   ` Tony Lindgren
2012-12-21  9:45 ` [PATCH v6 2/8] ARM: dts: support pinctrl single in pxa910 Haojian Zhuang
2013-01-04  0:17   ` Tony Lindgren
2012-12-21  9:45 ` [PATCH v6 3/8] ARM: dts: support pinctrl single in aspenite Haojian Zhuang
2012-12-21  9:45 ` [PATCH v6 4/8] ARM: dts: support pinctrl single in brownstone Haojian Zhuang
2012-12-21  9:45 ` [PATCH v6 5/8] document: devicetree: bind pinconf with pin single Haojian Zhuang
2012-12-22  1:22   ` Tony Lindgren [this message]
2012-12-22  6:33     ` Haojian Zhuang
2012-12-22 17:07       ` Tony Lindgren
2013-01-04  0:25         ` Tony Lindgren
2012-12-21  9:45 ` [PATCH v6 6/8] tty: pxa: configure pin Haojian Zhuang
2013-01-06 23:51   ` Linus Walleij
2012-12-21  9:45 ` [PATCH v6 7/8] i2c: pxa: use devm_kzalloc Haojian Zhuang
2012-12-21  9:45 ` [PATCH v6 8/8] i2c: pxa: configure pinmux Haojian Zhuang
2013-01-06 23:52   ` Linus Walleij

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=20121222012201.GS21056@atomide.com \
    --to=tony@atomide.com \
    --cc=linux-arm-kernel@lists.infradead.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).