* [PATCH 3/3] ARM: dts: socfpga: add gpio pieces [not found] ` <1395345324-18299-1-git-send-email-bigeasy-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org> @ 2014-03-20 19:55 ` Sebastian Andrzej Siewior 2014-03-21 17:24 ` Gerhard Sittig 2014-03-21 18:14 ` delicious quinoa 0 siblings, 2 replies; 9+ messages in thread From: Sebastian Andrzej Siewior @ 2014-03-20 19:55 UTC (permalink / raw) To: Alan Tull Cc: Linus Walleij, Alexandre Courbot, linux-gpio-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA, Dinh Nguyen, Sebastian Andrzej Siewior, devicetree-u79uwXL29TY76Z2rM5mHXA The cycloneV has three gpio controllers, each one with 29 gpios. This patch adds the three controller with the gpio driver which is now sitting the gpio tree. Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Signed-off-by: Sebastian Andrzej Siewior <bigeasy-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org> --- arch/arm/boot/dts/socfpga.dtsi | 60 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/arch/arm/boot/dts/socfpga.dtsi b/arch/arm/boot/dts/socfpga.dtsi index 537f1a5..c3a97e1 100644 --- a/arch/arm/boot/dts/socfpga.dtsi +++ b/arch/arm/boot/dts/socfpga.dtsi @@ -463,6 +463,66 @@ status = "disabled"; }; + gpio@ff708000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "snps,dw-apb-gpio"; + reg = <0xff708000 0x1000>; + clocks = <&per_base_clk>; + status = "disabled"; + + gpio0: gpio-controller@0 { + compatible = "snps,dw-apb-gpio-port"; + gpio-controller; + #gpio-cells = <1>; + snps,nr-gpios = <29>; + reg = <0>; + interrupt-controller; + #interrupt-cells = <2>; + interrupts = <0 164 4>; + }; + }; + + gpio@ff709000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "snps,dw-apb-gpio"; + reg = <0xff709000 0x1000>; + clocks = <&per_base_clk>; + status = "disabled"; + + gpio1: gpio-controller@0 { + compatible = "snps,dw-apb-gpio-port"; + gpio-controller; + #gpio-cells = <1>; + snps,nr-gpios = <29>; + reg = <0>; + interrupt-controller; + #interrupt-cells = <2>; + interrupts = <0 165 4>; + }; + }; + + gpio@ff70a000 { + #address-cells = <1>; + #size-cells = <0>; + compatible = "snps,dw-apb-gpio"; + reg = <0xff70a000 0x1000>; + clocks = <&per_base_clk>; + status = "disabled"; + + gpio2: gpio-controller@0 { + compatible = "snps,dw-apb-gpio-port"; + gpio-controller; + #gpio-cells = <1>; + snps,nr-gpios = <29>; + reg = <0>; + interrupt-controller; + #interrupt-cells = <2>; + interrupts = <0 166 4>; + }; + }; + L2: l2-cache@fffef000 { compatible = "arm,pl310-cache"; reg = <0xfffef000 0x1000>; -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 3/3] ARM: dts: socfpga: add gpio pieces 2014-03-20 19:55 ` [PATCH 3/3] ARM: dts: socfpga: add gpio pieces Sebastian Andrzej Siewior @ 2014-03-21 17:24 ` Gerhard Sittig 2014-03-21 19:10 ` Sebastian Andrzej Siewior 2014-03-21 18:14 ` delicious quinoa 1 sibling, 1 reply; 9+ messages in thread From: Gerhard Sittig @ 2014-03-21 17:24 UTC (permalink / raw) To: Sebastian Andrzej Siewior Cc: Alan Tull, Linus Walleij, Alexandre Courbot, linux-gpio, linux-kernel, Dinh Nguyen, devicetree On Thu, Mar 20, 2014 at 20:55 +0100, Sebastian Andrzej Siewior wrote: > > The cycloneV has three gpio controllers, each one with 29 gpios. This patch > adds the three controller with the gpio driver which is now sitting the > gpio tree. The third bank should have 27 pins, only the first two have 29. The commit message probably should not discuss which git tree a driver currently resides in. This is just a temporary detail which no longer applies to the mainline source base where your patch will end up in. virtually yours Gerhard Sittig -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr. 5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office@denx.de ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 3/3] ARM: dts: socfpga: add gpio pieces 2014-03-21 17:24 ` Gerhard Sittig @ 2014-03-21 19:10 ` Sebastian Andrzej Siewior 2014-03-21 22:06 ` delicious quinoa 0 siblings, 1 reply; 9+ messages in thread From: Sebastian Andrzej Siewior @ 2014-03-21 19:10 UTC (permalink / raw) To: Gerhard Sittig Cc: Alan Tull, Linus Walleij, Alexandre Courbot, linux-gpio, linux-kernel, Dinh Nguyen, devicetree On 03/21/2014 06:24 PM, Gerhard Sittig wrote: > On Thu, Mar 20, 2014 at 20:55 +0100, Sebastian Andrzej Siewior wrote: >> >> The cycloneV has three gpio controllers, each one with 29 gpios. This patch >> adds the three controller with the gpio driver which is now sitting the >> gpio tree. > > The third bank should have 27 pins, only the first two have 29. It is not a bank it is a complete controller. Why 27 pins? The reference manual says that there register 0…28. > The commit message probably should not discuss which git tree a > driver currently resides in. This is just a temporary detail > which no longer applies to the mainline source base where your > patch will end up in. This patch adds a binding which is not in kernel. It is worth to mention. > > > virtually yours > Gerhard Sittig > Sebastian -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 3/3] ARM: dts: socfpga: add gpio pieces 2014-03-21 19:10 ` Sebastian Andrzej Siewior @ 2014-03-21 22:06 ` delicious quinoa 0 siblings, 0 replies; 9+ messages in thread From: delicious quinoa @ 2014-03-21 22:06 UTC (permalink / raw) To: Sebastian Andrzej Siewior Cc: Gerhard Sittig, Alan Tull, Linus Walleij, Alexandre Courbot, linux-gpio@vger.kernel.org, linux-kernel, Dinh Nguyen, devicetree@vger.kernel.org On Fri, Mar 21, 2014 at 2:10 PM, Sebastian Andrzej Siewior <bigeasy@linutronix.de> wrote: > On 03/21/2014 06:24 PM, Gerhard Sittig wrote: >> On Thu, Mar 20, 2014 at 20:55 +0100, Sebastian Andrzej Siewior wrote: >>> >>> The cycloneV has three gpio controllers, each one with 29 gpios. This patch >>> adds the three controller with the gpio driver which is now sitting the >>> gpio tree. >> >> The third bank should have 27 pins, only the first two have 29. > > It is not a bank it is a complete controller. Why 27 pins? The > reference manual says that there register 0...28. Hi Sebastian, The ref manual is wrong. It is 27. The last two aren't pinned out. Alan Tull aka delicious quinoa ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 3/3] ARM: dts: socfpga: add gpio pieces 2014-03-20 19:55 ` [PATCH 3/3] ARM: dts: socfpga: add gpio pieces Sebastian Andrzej Siewior 2014-03-21 17:24 ` Gerhard Sittig @ 2014-03-21 18:14 ` delicious quinoa 2014-03-21 19:08 ` Sebastian Andrzej Siewior [not found] ` <CANk1AXRa4V1ADNaT+T3pYF4zyxni9Y8rmU9UYRoA_7NxW8KWEg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 1 sibling, 2 replies; 9+ messages in thread From: delicious quinoa @ 2014-03-21 18:14 UTC (permalink / raw) To: Sebastian Andrzej Siewior Cc: Alan Tull, Linus Walleij, Alexandre Courbot, linux-gpio@vger.kernel.org, linux-kernel, Dinh Nguyen, devicetree@vger.kernel.org On Thu, Mar 20, 2014 at 2:55 PM, Sebastian Andrzej Siewior <bigeasy@linutronix.de> wrote: > The cycloneV has three gpio controllers, each one with 29 gpios. This patch > adds the three controller with the gpio driver which is now sitting the > gpio tree. > > Cc: devicetree@vger.kernel.org > Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> > --- > arch/arm/boot/dts/socfpga.dtsi | 60 ++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 60 insertions(+) > > diff --git a/arch/arm/boot/dts/socfpga.dtsi b/arch/arm/boot/dts/socfpga.dtsi > index 537f1a5..c3a97e1 100644 > --- a/arch/arm/boot/dts/socfpga.dtsi > +++ b/arch/arm/boot/dts/socfpga.dtsi > @@ -463,6 +463,66 @@ > status = "disabled"; > }; > > + gpio@ff708000 { > + #address-cells = <1>; > + #size-cells = <0>; > + compatible = "snps,dw-apb-gpio"; > + reg = <0xff708000 0x1000>; > + clocks = <&per_base_clk>; > + status = "disabled"; > + > + gpio0: gpio-controller@0 { > + compatible = "snps,dw-apb-gpio-port"; > + gpio-controller; > + #gpio-cells = <1>; #gpio-cells = <2>; I applied this patch, fixed the gpio-cells, tested on a cyclone5 soc devkit, and see that it breaks the interrupts. Did you test this? Alan > + snps,nr-gpios = <29>; > + reg = <0>; > + interrupt-controller; > + #interrupt-cells = <2>; > + interrupts = <0 164 4>; > + }; > + }; > + > + gpio@ff709000 { > + #address-cells = <1>; > + #size-cells = <0>; > + compatible = "snps,dw-apb-gpio"; > + reg = <0xff709000 0x1000>; > + clocks = <&per_base_clk>; > + status = "disabled"; > + > + gpio1: gpio-controller@0 { > + compatible = "snps,dw-apb-gpio-port"; > + gpio-controller; > + #gpio-cells = <1>; > + snps,nr-gpios = <29>; > + reg = <0>; > + interrupt-controller; > + #interrupt-cells = <2>; > + interrupts = <0 165 4>; > + }; > + }; > + > + gpio@ff70a000 { > + #address-cells = <1>; > + #size-cells = <0>; > + compatible = "snps,dw-apb-gpio"; > + reg = <0xff70a000 0x1000>; > + clocks = <&per_base_clk>; > + status = "disabled"; > + > + gpio2: gpio-controller@0 { > + compatible = "snps,dw-apb-gpio-port"; > + gpio-controller; > + #gpio-cells = <1>; > + snps,nr-gpios = <29>; > + reg = <0>; > + interrupt-controller; > + #interrupt-cells = <2>; > + interrupts = <0 166 4>; > + }; > + }; > + > L2: l2-cache@fffef000 { > compatible = "arm,pl310-cache"; > reg = <0xfffef000 0x1000>; > -- > 1.9.1 > > -- > To unsubscribe from this list: send the line "unsubscribe devicetree" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 3/3] ARM: dts: socfpga: add gpio pieces 2014-03-21 18:14 ` delicious quinoa @ 2014-03-21 19:08 ` Sebastian Andrzej Siewior [not found] ` <CANk1AXRa4V1ADNaT+T3pYF4zyxni9Y8rmU9UYRoA_7NxW8KWEg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 1 sibling, 0 replies; 9+ messages in thread From: Sebastian Andrzej Siewior @ 2014-03-21 19:08 UTC (permalink / raw) To: delicious quinoa Cc: Alan Tull, Linus Walleij, Alexandre Courbot, linux-gpio@vger.kernel.org, linux-kernel, Dinh Nguyen, devicetree@vger.kernel.org On 03/21/2014 07:14 PM, delicious quinoa wrote: >> + gpio@ff708000 { >> + #address-cells = <1>; >> + #size-cells = <0>; >> + compatible = "snps,dw-apb-gpio"; >> + reg = <0xff708000 0x1000>; >> + clocks = <&per_base_clk>; >> + status = "disabled"; >> + >> + gpio0: gpio-controller@0 { >> + compatible = "snps,dw-apb-gpio-port"; >> + gpio-controller; >> + #gpio-cells = <1>; > > #gpio-cells = <2>; > > I applied this patch, fixed the gpio-cells, tested on a cyclone5 soc > devkit, and see that it breaks the interrupts. Did you test this? No, as I said. in 0/3. Will take a look on that at somepoint next week. > > Alan Sebastian ^ permalink raw reply [flat|nested] 9+ messages in thread
[parent not found: <CANk1AXRa4V1ADNaT+T3pYF4zyxni9Y8rmU9UYRoA_7NxW8KWEg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: [PATCH 3/3] ARM: dts: socfpga: add gpio pieces [not found] ` <CANk1AXRa4V1ADNaT+T3pYF4zyxni9Y8rmU9UYRoA_7NxW8KWEg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2014-03-21 22:15 ` delicious quinoa 2014-03-22 11:28 ` Sebastian Andrzej Siewior 0 siblings, 1 reply; 9+ messages in thread From: delicious quinoa @ 2014-03-21 22:15 UTC (permalink / raw) To: Sebastian Andrzej Siewior Cc: Alan Tull, Linus Walleij, Alexandre Courbot, linux-gpio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel, Dinh Nguyen, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org On Fri, Mar 21, 2014 at 1:14 PM, delicious quinoa <delicious.quinoa-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > On Thu, Mar 20, 2014 at 2:55 PM, Sebastian Andrzej Siewior > <bigeasy-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org> wrote: >> The cycloneV has three gpio controllers, each one with 29 gpios. This patch >> adds the three controller with the gpio driver which is now sitting the >> gpio tree. >> >> Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org >> Signed-off-by: Sebastian Andrzej Siewior <bigeasy-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org> >> --- >> arch/arm/boot/dts/socfpga.dtsi | 60 ++++++++++++++++++++++++++++++++++++++++++ >> 1 file changed, 60 insertions(+) >> >> diff --git a/arch/arm/boot/dts/socfpga.dtsi b/arch/arm/boot/dts/socfpga.dtsi >> index 537f1a5..c3a97e1 100644 >> --- a/arch/arm/boot/dts/socfpga.dtsi >> +++ b/arch/arm/boot/dts/socfpga.dtsi >> @@ -463,6 +463,66 @@ >> status = "disabled"; >> }; >> >> + gpio@ff708000 { >> + #address-cells = <1>; >> + #size-cells = <0>; >> + compatible = "snps,dw-apb-gpio"; >> + reg = <0xff708000 0x1000>; >> + clocks = <&per_base_clk>; >> + status = "disabled"; >> + >> + gpio0: gpio-controller@0 { >> + compatible = "snps,dw-apb-gpio-port"; >> + gpio-controller; >> + #gpio-cells = <1>; > > #gpio-cells = <2>; > > I applied this patch, fixed the gpio-cells, tested on a cyclone5 soc > devkit, and see that it breaks the interrupts. Did you test this? > > Alan > >> + snps,nr-gpios = <29>; >> + reg = <0>; >> + interrupt-controller; >> + #interrupt-cells = <2>; >> + interrupts = <0 164 4>; >> + }; >> + }; >> + >> + gpio@ff709000 { >> + #address-cells = <1>; >> + #size-cells = <0>; >> + compatible = "snps,dw-apb-gpio"; >> + reg = <0xff709000 0x1000>; >> + clocks = <&per_base_clk>; >> + status = "disabled"; >> + >> + gpio1: gpio-controller@0 { >> + compatible = "snps,dw-apb-gpio-port"; >> + gpio-controller; >> + #gpio-cells = <1>; >> + snps,nr-gpios = <29>; >> + reg = <0>; >> + interrupt-controller; >> + #interrupt-cells = <2>; >> + interrupts = <0 165 4>; >> + }; >> + }; >> + >> + gpio@ff70a000 { >> + #address-cells = <1>; >> + #size-cells = <0>; >> + compatible = "snps,dw-apb-gpio"; >> + reg = <0xff70a000 0x1000>; >> + clocks = <&per_base_clk>; >> + status = "disabled"; >> + >> + gpio2: gpio-controller@0 { >> + compatible = "snps,dw-apb-gpio-port"; >> + gpio-controller; >> + #gpio-cells = <1>; >> + snps,nr-gpios = <29>; snps,nr-gpios = <27>; As noted on other thread, gpio2 is 27 wide, despite what the documentation says. When I made that change and remove your other two patches the gpios worked for me on a cyclone5 devkit board. So if you fix the "#gpio-cells = <2>;" for all 3 gpios and fix "snps,nr-gpios = <27>;" for gpio2, then this one patch looks good to me. With these changes, Acked-by: Alan Tull <atull-EIB2kfCEclfQT0dZR+AlfA@public.gmane.org> Alan Tull aka delicous quinoa >> + reg = <0>; >> + interrupt-controller; >> + #interrupt-cells = <2>; >> + interrupts = <0 166 4>; >> + }; >> + }; >> + >> L2: l2-cache@fffef000 { >> compatible = "arm,pl310-cache"; >> reg = <0xfffef000 0x1000>; >> -- >> 1.9.1 >> >> -- >> To unsubscribe from this list: send the line "unsubscribe devicetree" in >> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org >> More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 3/3] ARM: dts: socfpga: add gpio pieces 2014-03-21 22:15 ` delicious quinoa @ 2014-03-22 11:28 ` Sebastian Andrzej Siewior 2014-03-26 15:29 ` Dinh Nguyen 0 siblings, 1 reply; 9+ messages in thread From: Sebastian Andrzej Siewior @ 2014-03-22 11:28 UTC (permalink / raw) To: delicious quinoa Cc: Alan Tull, Linus Walleij, Alexandre Courbot, linux-gpio@vger.kernel.org, linux-kernel, Dinh Nguyen, devicetree@vger.kernel.org On 03/21/2014 11:15 PM, delicious quinoa wrote: > snps,nr-gpios = <27>; > > As noted on other thread, gpio2 is 27 wide, despite what the > documentation says. When I made that change and remove your other two > patches the gpios worked for me on a cyclone5 devkit board. > > So if you fix the "#gpio-cells = <2>;" for all 3 gpios and fix > "snps,nr-gpios = <27>;" for gpio2, then this one patch looks good to > me. With these changes, Okay will do. And I also add a note that the reference manual is wrong here. > > Acked-by: Alan Tull <atull@altera.com> > > Alan Tull > aka > delicous quinoa Sebastian ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 3/3] ARM: dts: socfpga: add gpio pieces 2014-03-22 11:28 ` Sebastian Andrzej Siewior @ 2014-03-26 15:29 ` Dinh Nguyen 0 siblings, 0 replies; 9+ messages in thread From: Dinh Nguyen @ 2014-03-26 15:29 UTC (permalink / raw) To: Sebastian Andrzej Siewior, delicious quinoa Cc: Alan Tull, Linus Walleij, Alexandre Courbot, linux-gpio@vger.kernel.org, linux-kernel, Dinh Nguyen, devicetree@vger.kernel.org On 03/22/2014 06:28 AM, Sebastian Andrzej Siewior wrote: > On 03/21/2014 11:15 PM, delicious quinoa wrote: >> snps,nr-gpios = <27>; >> >> As noted on other thread, gpio2 is 27 wide, despite what the >> documentation says. When I made that change and remove your other two >> patches the gpios worked for me on a cyclone5 devkit board. >> >> So if you fix the "#gpio-cells = <2>;" for all 3 gpios and fix >> "snps,nr-gpios = <27>;" for gpio2, then this one patch looks good to >> me. With these changes, > > Okay will do. And I also add a note that the reference manual is wrong > here. > I've applied this patch to rocketboards/linux-socfpga-next/next-dt. I will take through the arm-soc tree for 3.16. Dinh >> >> Acked-by: Alan Tull <atull@altera.com> >> >> Alan Tull >> aka >> delicous quinoa > > Sebastian > -- > To unsubscribe from this list: send the line "unsubscribe devicetree" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2014-03-26 15:29 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <1395345324-18299-1-git-send-email-bigeasy@linutronix.de> [not found] ` <1395345324-18299-1-git-send-email-bigeasy-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org> 2014-03-20 19:55 ` [PATCH 3/3] ARM: dts: socfpga: add gpio pieces Sebastian Andrzej Siewior 2014-03-21 17:24 ` Gerhard Sittig 2014-03-21 19:10 ` Sebastian Andrzej Siewior 2014-03-21 22:06 ` delicious quinoa 2014-03-21 18:14 ` delicious quinoa 2014-03-21 19:08 ` Sebastian Andrzej Siewior [not found] ` <CANk1AXRa4V1ADNaT+T3pYF4zyxni9Y8rmU9UYRoA_7NxW8KWEg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2014-03-21 22:15 ` delicious quinoa 2014-03-22 11:28 ` Sebastian Andrzej Siewior 2014-03-26 15:29 ` Dinh Nguyen
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).