From: Gregory CLEMENT <gregory.clement@free-electrons.com>
To: Rob Herring <robh@kernel.org>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,
Alexandre Courbot <gnurou@gmail.com>,
Jason Cooper <jason@lakedaemon.net>, Andrew Lunn <andrew@lunn.ch>,
Linus Walleij <linus.walleij@linaro.org>,
Omri Itach <omrii@marvell.com>,
linux-kernel@vger.kernel.org, Nadav Haklai <nadavh@marvell.com>,
linux-gpio@vger.kernel.org, devicetree@vger.kernel.org,
Neta Zur Hershkovits <neta@marvell.com>,
Kostya Porotchkin <kostap@marvell.com>,
Shadi Ammouri <shadi@marvell.com>,
Marcin Wojtas <mw@semihalf.com>,
Russell King <rmk+kernel@armlinux.org.uk>,
linux-arm-kernel@lists.infradead.org,
Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Subject: Re: [PATCH 3/6] gpio: dt-bindings: Add documentation for gpio controllers on Armada 7K/8K
Date: Thu, 01 Jun 2017 19:33:27 +0200 [thread overview]
Message-ID: <87zidrr4t4.fsf@free-electrons.com> (raw)
In-Reply-To: <87fufltk76.fsf@free-electrons.com> (Gregory CLEMENT's message of "Wed, 31 May 2017 12:05:49 +0200")
Hi Rob,
On mer., mai 31 2017, Gregory CLEMENT <gregory.clement@free-electrons.com> wrote:
> Hi Rob,
>
> On mer., mai 31 2017, Rob Herring <robh@kernel.org> wrote:
>>>
>>> Required properties:
>>>
>>> -- compatible : Should be "marvell,orion-gpio", "marvell,mv78200-gpio"
>>> - or "marvell,armadaxp-gpio". "marvell,orion-gpio" should be used for
>>> - Orion, Kirkwood, Dove, Discovery (except MV78200) and Armada
>>> - 370. "marvell,mv78200-gpio" should be used for the Discovery
>>> - MV78200. "marvel,armadaxp-gpio" should be used for all Armada XP
>>> - SoCs (MV78230, MV78260, MV78460).
>>> +- compatible : Should be "marvell,orion-gpio", "marvell,mv78200-gpio",
>>> + "marvell,armadaxp-gpio" or "marvell,armada-8k-gpio".
>>> +
>>> + "marvell,orion-gpio" should be used for Orion, Kirkwood, Dove,
>>> + Discovery (except MV78200) and Armada 370. "marvell,mv78200-gpio"
>>> + should be used for the Discovery MV78200.
>>> +
>>> + "marvel,armadaxp-gpio" should be used for all Armada XP SoCs
>>> + (MV78230, MV78260, MV78460).
>>> +
>>> + "marvell,armada-8k-gpio" should be used for the Armada 7K and 8K
>>> + SoCs (either from AP or CP), see
>>> + Documentation/devicetree/bindings/arm/marvell/cp110-system-controller0.txt
>>> + and
>>> + Documentation/devicetree/bindings/arm/marvell/ap806-system-controller.txt
>>> + for specific details about the offset property.
>>>
>>> - reg: Address and length of the register set for the device. Only one
>>> entry is expected, except for the "marvell,armadaxp-gpio" variant
>>> for which two entries are expected: one for the general registers,
>>> - one for the per-cpu registers.
>>> + one for the per-cpu registers. Not used for marvell,armada-8k-gpio.
>>
>> Why can't use you use reg instead of offset?
>
> I looked for how the other syscon user did, and I found the offset
> usage. So I assumed it was the way to do it. But if you wan I can use a
> reg property.
I had a closer looked to the binding when syscon is used with several
subnodes. And actually the reg usage is very uncommon, I only find it in
drivers/regulator/pbias-regulator.c but for legacy.
I am not sure that we have any benefit with this reg property: we won't
use the length of the register and we need to add a range property in
the parent node.
An other way to pass this information is to have a different compatible
string which will match the different offset available. In this case the
reg property won't be used in a syscon node. However, while it makes
sens for the difference between AP806 and CP110, it would be strange to
have a different compatible string for gpio bank 1 and gpio bank 2.
So, in the end I would prefer to use the offset. From my point of view
it is better to not use the reg property for two different purposes:
mmio address vs offset in a syscon.
But if you think that from the point of view of the device tree
compliance we have to use the reg property, of course I will change it.
Thanks,
Gregory
>
> Gregory
>
>>
>> Rob
>
> --
> Gregory Clement, Free Electrons
> Kernel, drivers, real-time and embedded Linux
> development, consulting, training and support.
> http://free-electrons.com
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
--
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
WARNING: multiple messages have this Message-ID (diff)
From: gregory.clement@free-electrons.com (Gregory CLEMENT)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/6] gpio: dt-bindings: Add documentation for gpio controllers on Armada 7K/8K
Date: Thu, 01 Jun 2017 19:33:27 +0200 [thread overview]
Message-ID: <87zidrr4t4.fsf@free-electrons.com> (raw)
In-Reply-To: <87fufltk76.fsf@free-electrons.com> (Gregory CLEMENT's message of "Wed, 31 May 2017 12:05:49 +0200")
Hi Rob,
On mer., mai 31 2017, Gregory CLEMENT <gregory.clement@free-electrons.com> wrote:
> Hi Rob,
>
> On mer., mai 31 2017, Rob Herring <robh@kernel.org> wrote:
>>>
>>> Required properties:
>>>
>>> -- compatible : Should be "marvell,orion-gpio", "marvell,mv78200-gpio"
>>> - or "marvell,armadaxp-gpio". "marvell,orion-gpio" should be used for
>>> - Orion, Kirkwood, Dove, Discovery (except MV78200) and Armada
>>> - 370. "marvell,mv78200-gpio" should be used for the Discovery
>>> - MV78200. "marvel,armadaxp-gpio" should be used for all Armada XP
>>> - SoCs (MV78230, MV78260, MV78460).
>>> +- compatible : Should be "marvell,orion-gpio", "marvell,mv78200-gpio",
>>> + "marvell,armadaxp-gpio" or "marvell,armada-8k-gpio".
>>> +
>>> + "marvell,orion-gpio" should be used for Orion, Kirkwood, Dove,
>>> + Discovery (except MV78200) and Armada 370. "marvell,mv78200-gpio"
>>> + should be used for the Discovery MV78200.
>>> +
>>> + "marvel,armadaxp-gpio" should be used for all Armada XP SoCs
>>> + (MV78230, MV78260, MV78460).
>>> +
>>> + "marvell,armada-8k-gpio" should be used for the Armada 7K and 8K
>>> + SoCs (either from AP or CP), see
>>> + Documentation/devicetree/bindings/arm/marvell/cp110-system-controller0.txt
>>> + and
>>> + Documentation/devicetree/bindings/arm/marvell/ap806-system-controller.txt
>>> + for specific details about the offset property.
>>>
>>> - reg: Address and length of the register set for the device. Only one
>>> entry is expected, except for the "marvell,armadaxp-gpio" variant
>>> for which two entries are expected: one for the general registers,
>>> - one for the per-cpu registers.
>>> + one for the per-cpu registers. Not used for marvell,armada-8k-gpio.
>>
>> Why can't use you use reg instead of offset?
>
> I looked for how the other syscon user did, and I found the offset
> usage. So I assumed it was the way to do it. But if you wan I can use a
> reg property.
I had a closer looked to the binding when syscon is used with several
subnodes. And actually the reg usage is very uncommon, I only find it in
drivers/regulator/pbias-regulator.c but for legacy.
I am not sure that we have any benefit with this reg property: we won't
use the length of the register and we need to add a range property in
the parent node.
An other way to pass this information is to have a different compatible
string which will match the different offset available. In this case the
reg property won't be used in a syscon node. However, while it makes
sens for the difference between AP806 and CP110, it would be strange to
have a different compatible string for gpio bank 1 and gpio bank 2.
So, in the end I would prefer to use the offset. From my point of view
it is better to not use the reg property for two different purposes:
mmio address vs offset in a syscon.
But if you think that from the point of view of the device tree
compliance we have to use the reg property, of course I will change it.
Thanks,
Gregory
>
> Gregory
>
>>
>> Rob
>
> --
> Gregory Clement, Free Electrons
> Kernel, drivers, real-time and embedded Linux
> development, consulting, training and support.
> http://free-electrons.com
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
--
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
next prev parent reply other threads:[~2017-06-01 17:33 UTC|newest]
Thread overview: 65+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-19 16:09 [PATCH 0/6] Extend mvebu gpio driver to support the controllers of the Marvell Armada 7K/8K Gregory CLEMENT
2017-05-19 16:09 ` Gregory CLEMENT
2017-05-19 16:09 ` [PATCH 1/6] gpio: mvebu: sort header include Gregory CLEMENT
2017-05-19 16:09 ` Gregory CLEMENT
2017-05-23 9:15 ` Linus Walleij
2017-05-23 9:15 ` Linus Walleij
2017-05-23 9:15 ` Linus Walleij
2017-05-19 16:09 ` [PATCH 2/6] gpio: mvebu: switch to regmap for register access Gregory CLEMENT
2017-05-19 16:09 ` Gregory CLEMENT
2017-05-23 9:16 ` Linus Walleij
2017-05-23 9:16 ` Linus Walleij
2017-05-23 9:16 ` Linus Walleij
2017-05-19 16:09 ` [PATCH 3/6] gpio: dt-bindings: Add documentation for gpio controllers on Armada 7K/8K Gregory CLEMENT
2017-05-19 16:09 ` Gregory CLEMENT
2017-05-23 9:20 ` Linus Walleij
2017-05-23 9:20 ` Linus Walleij
2017-05-23 9:20 ` Linus Walleij
2017-05-23 13:06 ` Gregory CLEMENT
2017-05-23 13:06 ` Gregory CLEMENT
2017-05-23 13:06 ` Gregory CLEMENT
2017-05-29 8:08 ` Linus Walleij
2017-05-29 8:08 ` Linus Walleij
2017-05-29 8:08 ` Linus Walleij
2017-05-30 22:23 ` Rob Herring
2017-05-30 22:23 ` Rob Herring
2017-05-30 22:23 ` Rob Herring
2017-05-31 10:02 ` Gregory CLEMENT
2017-05-31 10:02 ` Gregory CLEMENT
2017-05-31 10:02 ` Gregory CLEMENT
2017-05-31 10:43 ` Michael Turquette
2017-05-31 10:43 ` Michael Turquette
2017-05-31 10:43 ` Michael Turquette
2017-05-31 14:41 ` Gregory CLEMENT
2017-05-31 14:41 ` Gregory CLEMENT
2017-05-31 14:41 ` Gregory CLEMENT
[not found] ` <306395ff39de3d3d3c8f55e5da4de8def29ae8d1.1495210061.git-series.gregory.clement-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2017-05-30 22:29 ` Rob Herring
2017-05-30 22:29 ` Rob Herring
2017-05-30 22:29 ` Rob Herring
2017-05-31 10:05 ` Gregory CLEMENT
2017-05-31 10:05 ` Gregory CLEMENT
2017-06-01 17:33 ` Gregory CLEMENT [this message]
2017-06-01 17:33 ` Gregory CLEMENT
2017-05-19 16:09 ` [PATCH 4/6] gpio: mvebu: allow building driver for " Gregory CLEMENT
2017-05-19 16:09 ` Gregory CLEMENT
2017-05-19 16:09 ` Gregory CLEMENT
2017-05-23 9:21 ` Linus Walleij
2017-05-23 9:21 ` Linus Walleij
2017-05-23 9:21 ` Linus Walleij
[not found] ` <cover.e10718b9c0f9fdd07327ae14e213be8da5b1f7ef.1495210061.git-series.gregory.clement-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2017-05-19 16:09 ` [PATCH 5/6] gpio: mvebu: Add support for the Armada 7K/8K SoCs Gregory CLEMENT
2017-05-19 16:09 ` Gregory CLEMENT
2017-05-19 16:09 ` Gregory CLEMENT
[not found] ` <54efbdfb0a9800b2c72c6fa1d945c87182b242b4.1495210061.git-series.gregory.clement-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2017-05-19 16:24 ` Russell King - ARM Linux
2017-05-19 16:24 ` Russell King - ARM Linux
2017-05-19 16:24 ` Russell King - ARM Linux
2017-05-19 16:27 ` Russell King - ARM Linux
2017-05-19 16:27 ` Russell King - ARM Linux
[not found] ` <20170519162736.GU22219-l+eeeJia6m9URfEZ8mYm6t73F7V6hmMc@public.gmane.org>
2017-05-19 17:05 ` Thomas Petazzoni
2017-05-19 17:05 ` Thomas Petazzoni
2017-05-19 17:05 ` Thomas Petazzoni
2017-05-19 16:09 ` [PATCH 6/6] arm64: dts: marvell: add gpio support for Armada 7K/8K Gregory CLEMENT
2017-05-19 16:09 ` Gregory CLEMENT
2017-05-19 16:09 ` Gregory CLEMENT
2017-05-31 9:16 ` [PATCH 0/6] Extend mvebu gpio driver to support the controllers of the Marvell " Thomas Petazzoni
2017-05-31 9:16 ` Thomas Petazzoni
2017-05-31 9:16 ` Thomas Petazzoni
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=87zidrr4t4.fsf@free-electrons.com \
--to=gregory.clement@free-electrons.com \
--cc=andrew@lunn.ch \
--cc=devicetree@vger.kernel.org \
--cc=gnurou@gmail.com \
--cc=jason@lakedaemon.net \
--cc=kostap@marvell.com \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mw@semihalf.com \
--cc=nadavh@marvell.com \
--cc=neta@marvell.com \
--cc=omrii@marvell.com \
--cc=rmk+kernel@armlinux.org.uk \
--cc=robh@kernel.org \
--cc=sebastian.hesselbarth@gmail.com \
--cc=shadi@marvell.com \
--cc=thomas.petazzoni@free-electrons.com \
/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.