From: mporter@ti.com (Matt Porter)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: dts: AM33XX: fix gpio node numbering to match hardware
Date: Tue, 11 Sep 2012 07:29:05 -0400 [thread overview]
Message-ID: <20120911112905.GM27758@beef> (raw)
In-Reply-To: <79CD15C6BA57404B839C016229A409A83EAB03D3@DBDE01.ent.ti.com>
On Tue, Sep 11, 2012 at 04:57:08AM +0000, Hiremath, Vaibhav wrote:
> On Mon, Sep 10, 2012 at 21:50:20, Porter, Matt wrote:
> > On AM33xx, the datasheet and TRM refer to four GPIO instances that
> > are 0-based, GPIO0-3.
> >
>
> Thanks Matt,
> I think Anil labeled it as gpio1-4 due to hwmod naming convention, as you
> can not have gpioo id = 0 (refer to arch/arm/mach-omap2/gpio.c).
Right, and that convention originally came from the assumption that
everything would be 1-based like OMAP3/4.
> But in case of DT we should simply follow TRM/Spec, as naming convention is
> based on base-addr and not id, so your patch looks good me.
Yes, my biggest concern here was the coming frustration that the end
"user" or system integrator would have with these labels not matching
the docs that have been around for a year. It would be !sane to have
somebody look at a schematic and then write their dts with a value that
doesn't match the h/w. That would run counter to the fundamental
requirement that DT is a description of the hardware. The user led patch
was already the first example of that where the comments mentioned gpio1
in the pinmux data but the data referenced the gpio2 label.
-Matt
> > Signed-off-by: Matt Porter <mporter@ti.com>
> > ---
> > arch/arm/boot/dts/am33xx.dtsi | 8 ++++----
> > 1 file changed, 4 insertions(+), 4 deletions(-)
> >
> > diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi
> > index bb31bff..1369bfc 100644
> > --- a/arch/arm/boot/dts/am33xx.dtsi
> > +++ b/arch/arm/boot/dts/am33xx.dtsi
> > @@ -62,7 +62,7 @@
> > reg = <0x48200000 0x1000>;
> > };
> >
> > - gpio1: gpio at 44e07000 {
> > + gpio0: gpio at 44e07000 {
> > compatible = "ti,omap4-gpio";
> > ti,hwmods = "gpio1";
> > gpio-controller;
> > @@ -74,7 +74,7 @@
> > interrupts = <96>;
> > };
> >
> > - gpio2: gpio at 4804c000 {
> > + gpio1: gpio at 4804c000 {
> > compatible = "ti,omap4-gpio";
> > ti,hwmods = "gpio2";
> > gpio-controller;
> > @@ -86,7 +86,7 @@
> > interrupts = <98>;
> > };
> >
> > - gpio3: gpio at 481ac000 {
> > + gpio2: gpio at 481ac000 {
> > compatible = "ti,omap4-gpio";
> > ti,hwmods = "gpio3";
> > gpio-controller;
> > @@ -98,7 +98,7 @@
> > interrupts = <32>;
> > };
> >
> > - gpio4: gpio at 481ae000 {
> > + gpio3: gpio at 481ae000 {
> > compatible = "ti,omap4-gpio";
> > ti,hwmods = "gpio4";
> > gpio-controller;
> > --
> > 1.7.9.5
> >
> >
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
next prev parent reply other threads:[~2012-09-11 11:29 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-10 16:20 [PATCH] ARM: dts: AM33XX: fix gpio node numbering to match hardware Matt Porter
2012-09-10 16:34 ` Benoit Cousson
2012-09-10 16:52 ` Matt Porter
2012-09-10 16:59 ` Benoit Cousson
2012-09-10 19:51 ` Matt Porter
2012-09-11 5:00 ` Hiremath, Vaibhav
2012-09-10 17:03 ` Tony Lindgren
2012-09-11 4:57 ` Hiremath, Vaibhav
2012-09-11 11:29 ` Matt Porter [this message]
2012-09-11 11:30 ` Hiremath, Vaibhav
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=20120911112905.GM27758@beef \
--to=mporter@ti.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).