From: manivannan.sadhasivam@linaro.org (Manivannan Sadhasivam)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v4 05/10] dt-bindings: gpio: Add gpio nodes for Actions S900 SoC
Date: Thu, 8 Mar 2018 01:35:43 +0530 [thread overview]
Message-ID: <20180307200543.scpqbh7rb635b7c3@linaro.org> (raw)
In-Reply-To: <20180307195233.bstixvrmwo4ozino@rob-hp-laptop>
Hi Rob,
Thanks for the review.
On Wed, Mar 07, 2018 at 01:52:33PM -0600, Rob Herring wrote:
> On Fri, Mar 02, 2018 at 09:20:40AM +0530, Manivannan Sadhasivam wrote:
> > Add gpio nodes for Actions Semi S900 SoC.
> >
> > Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> > ---
> > .../devicetree/bindings/gpio/actions,owl-gpio.txt | 95 ++++++++++++++++++++++
> > 1 file changed, 95 insertions(+)
> > create mode 100644 Documentation/devicetree/bindings/gpio/actions,owl-gpio.txt
> >
> > diff --git a/Documentation/devicetree/bindings/gpio/actions,owl-gpio.txt b/Documentation/devicetree/bindings/gpio/actions,owl-gpio.txt
> > new file mode 100644
> > index 000000000000..d2939ca6cfaf
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/gpio/actions,owl-gpio.txt
> > @@ -0,0 +1,95 @@
> > +* Actions Semi OWL GPIO controller bindings
> > +
> > +The GPIOs are organized as individual banks/ports with variable number
> > +of GPIOs. Each bank is represented as an individual GPIO controller.
> > +
> > +Required properties:
> > +- compatible : Should be "actions,s900-gpio"
> > +- reg : Address and range of the GPIO controller registers.
> > +- gpio-controller : Marks the device node as a GPIO controller.
> > +- #gpio-cells : Should be <2>. The first cell is the gpio number
> > + and the second cell is used to specify optional
> > + parameters.
> > +- interrupt-controller : Marks the device node as an interrupt controller.
> > +- #interrupt-cells : Specifies the number of cells needed to encode an
> > + interrupt. Shall be set to 2. The first cell
> > + defines the interrupt number, the second encodes
> > + the trigger flags described in
> > + bindings/interrupt-controller/interrupts.txt
> > +
> > +Optional properties:
> > +- gpio-ranges : Mapping between GPIO and pinctrl
> > +
> > +Note: Each GPIO port should have an alias correctly numbered in "aliases"
> > +node.
>
> Why? Please don't use aliases for gpios.
>
Okay.
> > +
> > +Examples:
> > +
> > +aliases {
> > + gpio0 = &gpioa;
> > + gpio1 = &gpiob;
> > + gpio2 = &gpioc;
> > + gpio3 = &gpiod;
> > + gpio4 = &gpioe;
> > + gpio5 = &gpiof;
> > +};
> > +
> > + gpioa: gpioa at e01b0000 {
>
> Use generic node names (gpio).
>
Okay. But how about the label? Should it be gpioa... or gpio1...
In datasheet, the registers are named from gpioa to gpiof.
> > + compatible = "actions,s900-gpio";
> > + reg = <0x0 0xe01b0000 0x0 0x1000>;
> > + gpio-controller;
> > + #gpio-cells = <2>;
> > + gpio-ranges = <&pinctrl 0 0 32>;
> > + interrupt-controller;
> > + #interrupt-cells = <2>;
> > + };
> > +
> > + gpiob: gpiob at e01b0000 {
>
> Ah, but your are duplicating addresses here which you shouldn't do
> either. These should be all one node if you can avoid overlapping.
>
Hmmm. Okay. Then I can use the sub address for all nodes. But having a single
node doesn't makes sense here since each bank has its own interrupt
domain and somewhat resembles an individual controller.
Thanks,
Mani
> > + compatible = "actions,s900-gpio";
> > + reg = <0x0 0xe01b0000 0x0 0x1000>;
> > + gpio-controller;
> > + #gpio-cells = <2>;
> > + gpio-ranges = <&pinctrl 0 32 32>;
> > + interrupt-controller;
> > + #interrupt-cells = <2>;
> > + };
> > +
> > + gpioc: gpioc at e01b0000 {
> > + compatible = "actions,s900-gpio";
> > + reg = <0x0 0xe01b0000 0x0 0x1000>;
> > + gpio-controller;
> > + #gpio-cells = <2>;
> > + gpio-ranges = <&pinctrl 0 64 12>;
> > + interrupt-controller;
> > + #interrupt-cells = <2>;
> > + };
> > +
> > + gpiod: gpiod at e01b0000 {
> > + compatible = "actions,s900-gpio";
> > + reg = <0x0 0xe01b0000 0x0 0x1000>;
> > + gpio-controller;
> > + #gpio-cells = <2>;
> > + gpio-ranges = <&pinctrl 0 76 30>;
> > + interrupt-controller;
> > + #interrupt-cells = <2>;
> > + };
> > +
> > + gpioe: gpioe at e01b0000 {
> > + compatible = "actions,s900-gpio";
> > + reg = <0x0 0xe01b0000 0x0 0x1000>;
> > + gpio-controller;
> > + #gpio-cells = <2>;
> > + gpio-ranges = <&pinctrl 0 106 32>;
> > + interrupt-controller;
> > + #interrupt-cells = <2>;
> > + };
> > +
> > + gpiof: gpiof at e01b0000 {
> > + compatible = "actions,s900-gpio";
> > + reg = <0x0 0xe01b0000 0x0 0x1000>;
> > + gpio-controller;
> > + #gpio-cells = <2>;
> > + gpio-ranges = <&pinctrl 0 138 8>;
> > + interrupt-controller;
> > + #interrupt-cells = <2>;
> > + };
> > --
> > 2.14.1
> >
next prev parent reply other threads:[~2018-03-07 20:05 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-02 3:50 [PATCH v4 00/10] Add Actions Semi S900 pinctrl and gpio support Manivannan Sadhasivam
2018-03-02 3:50 ` [PATCH v4 01/10] dt-bindings: pinctrl: Add bindings for Actions S900 SoC Manivannan Sadhasivam
2018-03-02 13:10 ` Linus Walleij
2018-03-02 3:50 ` [PATCH v4 02/10] arm64: dts: actions: Add pinctrl node for S900 Manivannan Sadhasivam
2018-03-02 13:11 ` Linus Walleij
2018-03-02 3:50 ` [PATCH v4 03/10] arm64: actions: Enable PINCTRL in platforms Kconfig Manivannan Sadhasivam
2018-03-02 13:12 ` Linus Walleij
2018-03-02 3:50 ` [PATCH v4 04/10] pinctrl: actions: Add Actions S900 pinctrl driver Manivannan Sadhasivam
2018-03-02 13:21 ` Linus Walleij
2018-03-02 17:56 ` Manivannan Sadhasivam
2018-03-02 3:50 ` [PATCH v4 05/10] dt-bindings: gpio: Add gpio nodes for Actions S900 SoC Manivannan Sadhasivam
2018-03-07 19:52 ` Rob Herring
2018-03-07 20:05 ` Manivannan Sadhasivam [this message]
2018-03-02 3:50 ` [PATCH v4 06/10] arm64: dts: actions: Add S900 gpio nodes Manivannan Sadhasivam
2018-03-02 3:50 ` [PATCH v4 07/10] arm64: dts: actions: Add gpio line names to Bubblegum-96 board Manivannan Sadhasivam
2018-03-22 15:28 ` Linus Walleij
2018-03-02 3:50 ` [PATCH v4 08/10] gpio: Add gpio driver for Actions OWL S900 SoC Manivannan Sadhasivam
2018-03-02 3:50 ` [PATCH v4 09/10] MAINTAINERS: Add reviewer for ACTIONS platforms Manivannan Sadhasivam
2018-03-02 13:23 ` Linus Walleij
2018-03-02 3:50 ` [PATCH v4 10/10] MAINTAINERS: Add Actions Semi S900 pinctrl and gpio entries Manivannan Sadhasivam
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=20180307200543.scpqbh7rb635b7c3@linaro.org \
--to=manivannan.sadhasivam@linaro.org \
--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).