devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Pulls and drive strengths in the pinctrl world
@ 2013-05-15 16:44 Doug Anderson
  2013-05-15 17:26 ` Tomasz Figa
  2013-05-15 18:29 ` Linus Walleij
  0 siblings, 2 replies; 41+ messages in thread
From: Doug Anderson @ 2013-05-15 16:44 UTC (permalink / raw)
  To: Linus Walleij
  Cc: linux-samsung-soc, devicetree-discuss, Thomas Abraham,
	Tomasz Figa, Simon Glass, Olof Johansson, Kukjin Kim

Linus,

I'm currently working towards adapting exynos5250-snow (the ARM
Chromebook) to work well in the new world of pinctrl.  We've got a
backport of exynos5250 pinctrl in our kernel-3.8 tree and are now
fixing all of the bugs that have popped up.  Patches will be sent
upstream (where applicable) shortly.


...but I'm running into an issue when trying to specify pullups /
pulldowns and drive strengths on lines that are just GPIOs or just
interrupts.  This is important not just for power usage but also for
proper functioning (the default internal pulldown was overpowering the
weak external pullup in one case).  In the old GPIO specifier you
could do specify pulls, but the new simpler one doesn't allow it.

I've managed to make things work and you can see my progress at
<https://gerrit.chromium.org/gerrit/#/c/51232/>, but it feels a bit
awkward.  Is there a better way?  If so, then I'm all ears!  :)


If not, then I guess that what I have will have to do for now.  ...but
I really wish that:

* The GPIO specifier could specify initial drive strength and pull
values for pins.
* The interrupt specifier could specify pull values for pins (drive
strength shouldn't be needed since these are inputs).

Some examples from the gerrit CL referenced above...

Here's how I need to do things when I'm using "just an interrupt":

  pinctrl@11400000 {
    cyapa_irq: cyapa-irq {
      samsung,pins = "gpx1-2";
      samsung,pin-function = <0xf>;
      samsung,pin-pud = <0>;
      samsung,pin-drv = <0>;
    };
  };

  trackpad {
    reg = <0x67>;
    compatible = "cypress,cyapa";
    interrupts = <2 0>;
    interrupt-parent = <&gpx1>;
    pinctrl-names = "default";
    pinctrl-0 = <&cyapa_irq>;
    wakeup-source;
  };


I really wish I could add a 3rd number to the interrupt specifier for
pud and skip the pinctrl bit:

  trackpad {
    reg = <0x67>;
    compatible = "cypress,cyapa";
    interrupts = <2 0 0>;
    interrupt-parent = <&gpx1>;
    wakeup-source;
  };


An example with the GPIO specifier instead of the interrupt one:

  pinctrl@11400000 {
    ptn3460_gpios: ptn3460-gpios {
      samsung,pins = "gpy2-5", "gpx1-5";
      samsung,pin-function = <1>;
      samsung,pin-pud = <0>;
      samsung,pin-drv = <0>;
    };
  };

  ptn3460-bridge@20 {
    compatible = "nxp,ptn3460";
    reg = <0x20>;
    powerdown-gpio = <&gpy2 5 0>;
    reset-gpio = <&gpx1 5 0>;
    edid-emulation = <5>;
    pinctrl-names = "default";
    pinctrl-0 = <&ptn3460_gpios>;
  };


I don't want to specify function/direction (code can handle that), but do wish
I could specify the pulls and strength.  Perhaps:

  ptn3460-bridge@20 {
    compatible = "nxp,ptn3460";
    reg = <0x20>;
    powerdown-gpio = <&gpy2 5 0 0 0>;
    reset-gpio = <&gpx1 5 0 0 0>;
    edid-emulation = <5>;
  };


-Doug

^ permalink raw reply	[flat|nested] 41+ messages in thread

end of thread, other threads:[~2013-05-24  9:10 UTC | newest]

Thread overview: 41+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-15 16:44 Pulls and drive strengths in the pinctrl world Doug Anderson
2013-05-15 17:26 ` Tomasz Figa
2013-05-15 18:15   ` Olof Johansson
2013-05-15 21:19   ` Doug Anderson
2013-05-15 21:36     ` Tomasz Figa
2013-05-15 21:57       ` Doug Anderson
2013-05-15 18:29 ` Linus Walleij
2013-05-15 21:31   ` Doug Anderson
2013-05-15 21:41     ` Tomasz Figa
2013-05-15 21:43       ` Tomasz Figa
2013-05-15 22:01       ` Doug Anderson
2013-05-15 22:06         ` Tomasz Figa
2013-05-15 23:55           ` Doug Anderson
2013-05-16  0:13             ` Tomasz Figa
2013-05-16  0:22               ` Stephen Warren
     [not found]                 ` <519426A8.8090908-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-05-17 12:26                   ` Jean-Christophe PLAGNIOL-VILLARD
2013-05-17 21:17                     ` Tomasz Figa
2013-05-18  8:18                       ` Jean-Christophe PLAGNIOL-VILLARD
2013-05-18 14:57                         ` Tomasz Figa
2013-05-18 16:30                           ` Jean-Christophe PLAGNIOL-VILLARD
2013-05-18 17:13                             ` Tomasz Figa
2013-05-19  9:17                               ` Jean-Christophe PLAGNIOL-VILLARD
2013-05-19  9:46                                 ` Tomasz Figa
2013-05-19 10:39                                   ` Jean-Christophe PLAGNIOL-VILLARD
2013-05-19 10:56                                     ` Tomasz Figa
2013-05-23 21:42                                 ` Stephen Warren
     [not found]                                   ` <519E8D41.9040508-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2013-05-24  9:10                                     ` Jean-Christophe PLAGNIOL-VILLARD
2013-05-23 21:39                             ` Stephen Warren
2013-05-21 18:28                     ` Tomasz Figa
2013-05-21 19:09                       ` Jean-Christophe PLAGNIOL-VILLARD
2013-05-16  0:55               ` Doug Anderson
2013-05-16 18:00                 ` Doug Anderson
2013-05-15 23:51   ` Stephen Warren
2013-05-16  0:03     ` Doug Anderson
2013-05-16  0:19       ` Tomasz Figa
2013-05-16  0:58         ` Doug Anderson
2013-05-17  8:38       ` Linus Walleij
2013-05-17  9:09         ` Tomasz Figa
2013-05-17 11:59           ` Linus Walleij
2013-05-17 12:38             ` Tomasz Figa
2013-05-17 14:56               ` Doug Anderson

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).