public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Andy Pont <andy.pont@sdcsystems.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3 4/4] x86: minnowmax: initialize the pin-muxing from device tree
Date: Tue, 26 May 2015 09:01:44 +0100	[thread overview]
Message-ID: <001501d0978a$3c9a4a90$b5cedfb0$@pont@sdcsystems.com> (raw)
In-Reply-To: <5564050A.80802@huau-gabriel.fr>

Hi Gabriel,

> 
>          soc_gpio_s5_0 at 0 {
>              gpio-offset = <0x80 0>;
>              pad-offset = <0x1d0>;
>              mode-gpio;
>              output-value = <0>;
>              direction = <PIN_OUTPUT>;
>          };
> 
>          soc_gpio_s5_1 at 0 {
>              gpio-offset = <0x80 1>;
>              pad-offset = <0x210>;
>              mode-gpio;
>              output-value = <0>;
>              direction = <PIN_OUTPUT>;
>          };
> 
>          soc_gpio_s5_2 at 0 {
>              gpio-offset = <0x80 2>;
>              pad-offset = <0x1e0>;
>              mode-gpio;
>              output-value = <0>;
>              direction = <PIN_OUTPUT>;
>          };
> 
> And after, you can use the GPIO commands:
> 
> => gpio set E0
> gpio: pin E0 (gpio 128) value is 1
> => gpio clear E0
> gpio: pin E0 (gpio 128) value is 0
> => gpio set E2
> gpio: pin E2 (gpio 130) value is 1
> => gpio clear E2
> gpio: pin E2 (gpio 130) value is 0
> 
> E0 E1 and E2 correspond to the GPIO0 1 and 2.

Is there, or can someone add, some documentation somewhere as to how to
convert between the device tree definition and the value used for "pin" in
the gpio commands as it doesn't seem intuitive or obvious to me that what
you have defined translates to E0, E1 and E2.

Thanks,

Andy.

  reply	other threads:[~2015-05-26  8:01 UTC|newest]

Thread overview: 61+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-23 16:16 [U-Boot] [PATCH 0/4] x86: support of pin-muxing from device tree Gabriel Huau
2015-04-23 16:16 ` [U-Boot] [PATCH 1/4] x86: baytrail: fix the GPIOBASE address Gabriel Huau
2015-04-23 16:45   ` [U-Boot] unassigned-patches/139: " u-boot at bugs.denx.de
2015-04-24  1:40   ` [U-Boot] " Bin Meng
2015-04-24  3:25     ` Simon Glass
2015-04-25 20:14   ` [U-Boot] [PATCH 1/5 v2] " Gabriel Huau
2015-04-25 20:16   ` [U-Boot] [PATCH 1/4 v3] " Gabriel Huau
2015-04-26 13:52     ` Bin Meng
2015-04-28 13:53       ` Simon Glass
2015-04-28 15:39         ` Simon Glass
2015-04-23 16:16 ` [U-Boot] [PATCH 2/4] x86: minnowmax: add GPIO banks in the device tree Gabriel Huau
2015-04-23 16:45   ` [U-Boot] unassigned-patches/140: " u-boot at bugs.denx.de
2015-04-24  2:03   ` [U-Boot] " Bin Meng
2015-04-24  5:05     ` [U-Boot] unassigned-patches/146: " u-boot at bugs.denx.de
2015-04-24  3:26   ` [U-Boot] " Simon Glass
2015-04-24  5:05     ` [U-Boot] unassigned-patches/147: " u-boot at bugs.denx.de
2015-04-25 20:16   ` [U-Boot] [PATCH 2/4 v2] " Gabriel Huau
2015-04-26 13:54     ` Bin Meng
2015-04-28 13:53       ` Simon Glass
2015-04-28 15:39         ` Simon Glass
2015-04-23 16:16 ` [U-Boot] [PATCH 3/4] x86: gpio: add pinctrl support from " Gabriel Huau
2015-04-23 16:45   ` [U-Boot] unassigned-patches/138: " u-boot at bugs.denx.de
2015-04-24  3:14   ` [U-Boot] " Bin Meng
2015-04-24 14:32     ` Gabriel Huau
2015-04-24  3:35   ` Simon Glass
2015-04-24  4:40     ` [U-Boot] unassigned-patches/144: " u-boot at bugs.denx.de
2015-04-24 14:37     ` [U-Boot] " Gabriel Huau
2015-04-24 17:55       ` [U-Boot] unassigned-patches/150: " u-boot at bugs.denx.de
2015-04-25 20:17   ` [U-Boot] [PATCH 3/4 v2] " Gabriel Huau
2015-04-28 13:53     ` Simon Glass
2015-04-28 15:22       ` Stephen Warren
2015-05-12  3:34         ` gabriel huau
2015-05-12  3:33       ` gabriel huau
2015-05-12  6:17   ` [U-Boot] [PATCH v3 3/4] " Gabriel Huau
2015-05-26  5:27   ` [U-Boot] [PATCH v4 " Gabriel Huau
2015-06-04 15:17     ` Simon Glass
2015-04-23 16:16 ` [U-Boot] [PATCH 4/4] x86: minnowmax: initialize the pin-muxing from " Gabriel Huau
2015-04-23 16:55   ` [U-Boot] unassigned-patches/143: " u-boot at bugs.denx.de
2015-04-24  3:37   ` [U-Boot] " Simon Glass
2015-04-24  4:45     ` [U-Boot] unassigned-patches/145: " u-boot at bugs.denx.de
2015-04-25 20:18   ` [U-Boot] [PATCH 4/4 v2] " Gabriel Huau
2015-04-28 13:53     ` Simon Glass
2015-05-12  6:18   ` [U-Boot] [PATCH v3 4/4] " Gabriel Huau
2015-06-04 15:17     ` Simon Glass
2015-04-23 16:55 ` [U-Boot] unassigned-patches/142: [PATCH 0/4] x86: support of " u-boot at bugs.denx.de
2015-04-24  3:23 ` [U-Boot] " Bin Meng
2015-04-24  5:05   ` [U-Boot] unassigned-patches/148: " u-boot at bugs.denx.de
2015-04-24 14:40   ` [U-Boot] " Gabriel Huau
2015-04-24 17:55     ` [U-Boot] unassigned-patches/151: " u-boot at bugs.denx.de
2015-05-12  6:10 ` [U-Boot] [PATCH v3 3/4] x86: gpio: add pinctrl support from the " Gabriel Huau
2015-05-12  6:20   ` gabriel huau
2015-05-12  6:12 ` [U-Boot] [PATCH v3 4/4] x86: minnowmax: initialize the pin-muxing from " Gabriel Huau
2015-05-12  6:20   ` gabriel huau
2015-05-20 14:21     ` Simon Glass
2015-05-26  5:30       ` gabriel huau
2015-05-26  8:01         ` Andy Pont [this message]
2015-05-26 14:41           ` Gabriel Huau
2015-06-04  9:28             ` Simon Glass
2015-06-04  9:28         ` Simon Glass
2015-05-12  6:15 ` [U-Boot] [PATCH v3 3/4] x86: gpio: add pinctrl support from the " Gabriel Huau
2015-05-12  6:21   ` gabriel huau

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='001501d0978a$3c9a4a90$b5cedfb0$@pont@sdcsystems.com' \
    --to=andy.pont@sdcsystems.com \
    --cc=u-boot@lists.denx.de \
    /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