All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 2/2] ARM: shmobile: r8a7794: add GPIO DT support
Date: Wed, 25 Feb 2015 14:08:38 +0000	[thread overview]
Message-ID: <2278267.ajPYsg7oHK@avalon> (raw)
In-Reply-To: <54EDD685.1010802@cogentembedded.com>

Hi Sergei,

On Wednesday 25 February 2015 17:04:53 Sergei Shtylyov wrote:
> On 2/25/2015 1:11 PM, Laurent Pinchart wrote:
> >> Describe GPIO[0-6] controllers in the R8A7794 device tree.
> >> 
> >> Based on original patch by Hisashi Nakamura
> >> <hisashi.nakamura.ak@renesas.com>.
> >> 
> >> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
> >> 
> >> ---
> >> 
> >>   arch/arm/boot/dts/r8a7794.dtsi |   84 +++++++++++++++++++++++++++++++++
> >>   1 file changed, 84 insertions(+)
> >> 
> >> Index: renesas/arch/arm/boot/dts/r8a7794.dtsi
> >> =================================> >> --- renesas.orig/arch/arm/boot/dts/r8a7794.dtsi
> >> +++ renesas/arch/arm/boot/dts/r8a7794.dtsi
> >> @@ -50,6 +50,90 @@
> 
> [...]
> 
> >> +	gpio1: gpio@e6051000 {
> >> +		compatible = "renesas,gpio-r8a7794", "renesas,gpio-rcar";
> >> +		reg = <0 0xe6051000 0 0x50>;
> >> +		interrupts = <0 5 IRQ_TYPE_LEVEL_HIGH>;
> >> +		#gpio-cells = <2>;
> >> +		gpio-controller;
> >> +		gpio-ranges = <&pfc 0 32 32>;
> > 
> > This GPIO block has 26 GPIOs only.
> 
> [...]
> 
> >> +	gpio5: gpio@e6055000 {
> >> +		compatible = "renesas,gpio-r8a7794", "renesas,gpio-rcar";
> >> +		reg = <0 0xe6055000 0 0x50>;
> >> +		interrupts = <0 9 IRQ_TYPE_LEVEL_HIGH>;
> >> +		#gpio-cells = <2>;
> >> +		gpio-controller;
> >> +		gpio-ranges = <&pfc 0 160 32>;
> > 
> > This GPIO block has 28 GPIOs only.
> > 
> >> +		#interrupt-cells = <2>;
> >> +		interrupt-controller;
> >> +		clocks = <&mstp9_clks R8A7794_CLK_GPIO5>;
> >> +	};
> >> +
> >> +	gpio6: gpio@e6055400 {
> >> +		compatible = "renesas,gpio-r8a7794", "renesas,gpio-rcar";
> >> +		reg = <0 0xe6055400 0 0x50>;
> >> +		interrupts = <0 10 IRQ_TYPE_LEVEL_HIGH>;
> >> +		#gpio-cells = <2>;
> >> +		gpio-controller;
> >> +		gpio-ranges = <&pfc 0 192 32>;
> > 
> > This GPIO block has 26 GPIOs only.
> 
> Yes, I know; I just wasn't sure what to do with the "gpio-ranges" prop of
> the following GPIO node. Should I keep the base GPIO # or update it as well?

I think the base number should be kept as-is, as the pfc driver indexes GPIOs 
using 32 * bank + offset. There are thus holes in the pfc pins array, but that 
shouldn't be a big deal (of course if you can find an easy way to optimize 
that, it would be welcome :-)).

-- 
Regards,

Laurent Pinchart

WARNING: multiple messages have this Message-ID (diff)
From: laurent.pinchart@ideasonboard.com (Laurent Pinchart)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] ARM: shmobile: r8a7794: add GPIO DT support
Date: Wed, 25 Feb 2015 16:08:38 +0200	[thread overview]
Message-ID: <2278267.ajPYsg7oHK@avalon> (raw)
In-Reply-To: <54EDD685.1010802@cogentembedded.com>

Hi Sergei,

On Wednesday 25 February 2015 17:04:53 Sergei Shtylyov wrote:
> On 2/25/2015 1:11 PM, Laurent Pinchart wrote:
> >> Describe GPIO[0-6] controllers in the R8A7794 device tree.
> >> 
> >> Based on original patch by Hisashi Nakamura
> >> <hisashi.nakamura.ak@renesas.com>.
> >> 
> >> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
> >> 
> >> ---
> >> 
> >>   arch/arm/boot/dts/r8a7794.dtsi |   84 +++++++++++++++++++++++++++++++++
> >>   1 file changed, 84 insertions(+)
> >> 
> >> Index: renesas/arch/arm/boot/dts/r8a7794.dtsi
> >> ===================================================================
> >> --- renesas.orig/arch/arm/boot/dts/r8a7794.dtsi
> >> +++ renesas/arch/arm/boot/dts/r8a7794.dtsi
> >> @@ -50,6 +50,90 @@
> 
> [...]
> 
> >> +	gpio1: gpio at e6051000 {
> >> +		compatible = "renesas,gpio-r8a7794", "renesas,gpio-rcar";
> >> +		reg = <0 0xe6051000 0 0x50>;
> >> +		interrupts = <0 5 IRQ_TYPE_LEVEL_HIGH>;
> >> +		#gpio-cells = <2>;
> >> +		gpio-controller;
> >> +		gpio-ranges = <&pfc 0 32 32>;
> > 
> > This GPIO block has 26 GPIOs only.
> 
> [...]
> 
> >> +	gpio5: gpio at e6055000 {
> >> +		compatible = "renesas,gpio-r8a7794", "renesas,gpio-rcar";
> >> +		reg = <0 0xe6055000 0 0x50>;
> >> +		interrupts = <0 9 IRQ_TYPE_LEVEL_HIGH>;
> >> +		#gpio-cells = <2>;
> >> +		gpio-controller;
> >> +		gpio-ranges = <&pfc 0 160 32>;
> > 
> > This GPIO block has 28 GPIOs only.
> > 
> >> +		#interrupt-cells = <2>;
> >> +		interrupt-controller;
> >> +		clocks = <&mstp9_clks R8A7794_CLK_GPIO5>;
> >> +	};
> >> +
> >> +	gpio6: gpio at e6055400 {
> >> +		compatible = "renesas,gpio-r8a7794", "renesas,gpio-rcar";
> >> +		reg = <0 0xe6055400 0 0x50>;
> >> +		interrupts = <0 10 IRQ_TYPE_LEVEL_HIGH>;
> >> +		#gpio-cells = <2>;
> >> +		gpio-controller;
> >> +		gpio-ranges = <&pfc 0 192 32>;
> > 
> > This GPIO block has 26 GPIOs only.
> 
> Yes, I know; I just wasn't sure what to do with the "gpio-ranges" prop of
> the following GPIO node. Should I keep the base GPIO # or update it as well?

I think the base number should be kept as-is, as the pfc driver indexes GPIOs 
using 32 * bank + offset. There are thus holes in the pfc pins array, but that 
shouldn't be a big deal (of course if you can find an easy way to optimize 
that, it would be welcome :-)).

-- 
Regards,

Laurent Pinchart

WARNING: multiple messages have this Message-ID (diff)
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Cc: horms@verge.net.au, linux-sh@vger.kernel.org, robh+dt@kernel.org,
	pawel.moll@arm.com, mark.rutland@arm.com,
	ijc+devicetree@hellion.org.uk, galak@codeaurora.org,
	devicetree@vger.kernel.org, magnus.damm@gmail.com,
	linux@arm.linux.org.uk, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 2/2] ARM: shmobile: r8a7794: add GPIO DT support
Date: Wed, 25 Feb 2015 16:08:38 +0200	[thread overview]
Message-ID: <2278267.ajPYsg7oHK@avalon> (raw)
In-Reply-To: <54EDD685.1010802@cogentembedded.com>

Hi Sergei,

On Wednesday 25 February 2015 17:04:53 Sergei Shtylyov wrote:
> On 2/25/2015 1:11 PM, Laurent Pinchart wrote:
> >> Describe GPIO[0-6] controllers in the R8A7794 device tree.
> >> 
> >> Based on original patch by Hisashi Nakamura
> >> <hisashi.nakamura.ak@renesas.com>.
> >> 
> >> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
> >> 
> >> ---
> >> 
> >>   arch/arm/boot/dts/r8a7794.dtsi |   84 +++++++++++++++++++++++++++++++++
> >>   1 file changed, 84 insertions(+)
> >> 
> >> Index: renesas/arch/arm/boot/dts/r8a7794.dtsi
> >> ===================================================================
> >> --- renesas.orig/arch/arm/boot/dts/r8a7794.dtsi
> >> +++ renesas/arch/arm/boot/dts/r8a7794.dtsi
> >> @@ -50,6 +50,90 @@
> 
> [...]
> 
> >> +	gpio1: gpio@e6051000 {
> >> +		compatible = "renesas,gpio-r8a7794", "renesas,gpio-rcar";
> >> +		reg = <0 0xe6051000 0 0x50>;
> >> +		interrupts = <0 5 IRQ_TYPE_LEVEL_HIGH>;
> >> +		#gpio-cells = <2>;
> >> +		gpio-controller;
> >> +		gpio-ranges = <&pfc 0 32 32>;
> > 
> > This GPIO block has 26 GPIOs only.
> 
> [...]
> 
> >> +	gpio5: gpio@e6055000 {
> >> +		compatible = "renesas,gpio-r8a7794", "renesas,gpio-rcar";
> >> +		reg = <0 0xe6055000 0 0x50>;
> >> +		interrupts = <0 9 IRQ_TYPE_LEVEL_HIGH>;
> >> +		#gpio-cells = <2>;
> >> +		gpio-controller;
> >> +		gpio-ranges = <&pfc 0 160 32>;
> > 
> > This GPIO block has 28 GPIOs only.
> > 
> >> +		#interrupt-cells = <2>;
> >> +		interrupt-controller;
> >> +		clocks = <&mstp9_clks R8A7794_CLK_GPIO5>;
> >> +	};
> >> +
> >> +	gpio6: gpio@e6055400 {
> >> +		compatible = "renesas,gpio-r8a7794", "renesas,gpio-rcar";
> >> +		reg = <0 0xe6055400 0 0x50>;
> >> +		interrupts = <0 10 IRQ_TYPE_LEVEL_HIGH>;
> >> +		#gpio-cells = <2>;
> >> +		gpio-controller;
> >> +		gpio-ranges = <&pfc 0 192 32>;
> > 
> > This GPIO block has 26 GPIOs only.
> 
> Yes, I know; I just wasn't sure what to do with the "gpio-ranges" prop of
> the following GPIO node. Should I keep the base GPIO # or update it as well?

I think the base number should be kept as-is, as the pfc driver indexes GPIOs 
using 32 * bank + offset. There are thus holes in the pfc pins array, but that 
shouldn't be a big deal (of course if you can find an easy way to optimize 
that, it would be welcome :-)).

-- 
Regards,

Laurent Pinchart

  reply	other threads:[~2015-02-25 14:08 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-21 22:10 [PATCH 0/2] Add R8A7794 GPIO DT support Sergei Shtylyov
2015-02-21 22:10 ` Sergei Shtylyov
2015-02-21 22:10 ` Sergei Shtylyov
2015-02-21 22:11 ` [PATCH 1/2] ARM: shmobile: r8a7794: add GPIO clocks Sergei Shtylyov
2015-02-21 22:11   ` Sergei Shtylyov
2015-02-21 22:11   ` Sergei Shtylyov
2015-02-23 11:08   ` Geert Uytterhoeven
2015-02-23 11:08     ` Geert Uytterhoeven
2015-02-23 11:08     ` Geert Uytterhoeven
2015-02-25  9:57   ` Laurent Pinchart
2015-02-25  9:57     ` Laurent Pinchart
2015-02-25  9:57     ` Laurent Pinchart
2015-02-21 22:12 ` [PATCH 2/2] ARM: shmobile: r8a7794: add GPIO DT support Sergei Shtylyov
2015-02-21 22:12   ` Sergei Shtylyov
2015-02-21 22:12   ` Sergei Shtylyov
2015-02-23 11:11   ` Geert Uytterhoeven
2015-02-23 11:11     ` Geert Uytterhoeven
2015-02-23 11:11     ` Geert Uytterhoeven
2015-02-25 10:11   ` Laurent Pinchart
2015-02-25 10:11     ` Laurent Pinchart
2015-02-25 10:11     ` Laurent Pinchart
2015-02-25 10:27     ` Geert Uytterhoeven
2015-02-25 10:27       ` Geert Uytterhoeven
2015-02-25 10:27       ` Geert Uytterhoeven
2015-02-25 22:10       ` Laurent Pinchart
2015-02-25 22:10         ` Laurent Pinchart
2015-02-25 22:10         ` Laurent Pinchart
2015-02-25 14:04     ` Sergei Shtylyov
2015-02-25 14:04       ` Sergei Shtylyov
2015-02-25 14:04       ` Sergei Shtylyov
2015-02-25 14:08       ` Laurent Pinchart [this message]
2015-02-25 14:08         ` Laurent Pinchart
2015-02-25 14:08         ` Laurent Pinchart
2015-02-23 22:00 ` [PATCH 0/2] Add R8A7794 " Simon Horman
2015-02-23 22:00   ` Simon Horman
2015-02-23 22:00   ` Simon Horman
2015-02-23 23:19   ` Simon Horman
2015-02-23 23:19     ` Simon Horman
2015-02-23 23:19     ` Simon Horman
2015-02-24 14:43     ` Sergei Shtylyov
2015-02-24 14:43       ` Sergei Shtylyov
2015-02-24 14:43       ` Sergei Shtylyov
2015-02-25  8:07       ` Simon Horman
2015-02-25  8:07         ` Simon Horman
2015-02-25  8:07         ` Simon Horman

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=2278267.ajPYsg7oHK@avalon \
    --to=laurent.pinchart@ideasonboard.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.