Re: [PATCH v4 05/10] dt-bindings: gpio: Add gpio nodes for Actions S900 SoC
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> > --- > > .../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 ..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 = > > +gpio1 = > > +gpio2 = > > +gpio3 = > > +gpio4 = > > +gpio5 = > > +}; > > + > > + gpioa: gpioa@e01b { > > 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 0xe01b 0x0 0x1000>; > > + gpio-controller; > > + #gpio-cells = <2>; > > + gpio-ranges = < 0 0 32>; > > + interrupt-controller; > > + #interrupt-cells = <2>; > > + }; > > + > > + gpiob: gpiob@e01b { > > 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 0xe01b 0x0 0x1000>; > > + gpio-controller; > > + #gpio-cells = <2>; > > + gpio-ranges = < 0 32 32>; > > + interrupt-controller; > > + #interrupt-cells = <2>; > > + }; > > + > > + gpioc: gpioc@e01b { > > + compatible = "actions,s900-gpio"; > > + reg = <0x0 0xe01b 0x0 0x1000>; > > + gpio-controller; > > + #gpio-cells = <2>; > > + gpio-ranges = < 0 64 12>; > > + interrupt-controller; > > + #interrupt-cells = <2>; > > + }; > > + > > + gpiod: gpiod@e01b { > > + compatible = "actions,s900-gpio"; > > + reg = <0x0 0xe01b 0x0 0x1000>; > > + gpio-controller; > > + #gpio-cells = <2>; > > + gpio-ranges = < 0 76 30>; > > + interrupt-controller; > > + #interrupt-cells = <2>; > > + }; > > + > > + gpioe: gpioe@e01b { > > + compatible = "actions,s900-gpio"; > > + reg = <0x0 0xe01b 0x0 0x1000>; > > + gpio-controller; > > + #gpio-cells = <2>; > > + gpio-ranges = < 0 106 32>; > > + interrupt-controller; > > + #interrupt-cells = <2>; > > + }; > > + > > + gpiof: gpiof@e01b { > > + compatible = "actions,s900-gpio"; > > + reg = <0x0 0xe01b 0x0 0x1000>; > > + gpio-controller; > > +
Re: [PATCH v4 05/10] dt-bindings: gpio: Add gpio nodes for Actions S900 SoC
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 > > --- > > .../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 ..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 = > > +gpio1 = > > +gpio2 = > > +gpio3 = > > +gpio4 = > > +gpio5 = > > +}; > > + > > + gpioa: gpioa@e01b { > > 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 0xe01b 0x0 0x1000>; > > + gpio-controller; > > + #gpio-cells = <2>; > > + gpio-ranges = < 0 0 32>; > > + interrupt-controller; > > + #interrupt-cells = <2>; > > + }; > > + > > + gpiob: gpiob@e01b { > > 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 0xe01b 0x0 0x1000>; > > + gpio-controller; > > + #gpio-cells = <2>; > > + gpio-ranges = < 0 32 32>; > > + interrupt-controller; > > + #interrupt-cells = <2>; > > + }; > > + > > + gpioc: gpioc@e01b { > > + compatible = "actions,s900-gpio"; > > + reg = <0x0 0xe01b 0x0 0x1000>; > > + gpio-controller; > > + #gpio-cells = <2>; > > + gpio-ranges = < 0 64 12>; > > + interrupt-controller; > > + #interrupt-cells = <2>; > > + }; > > + > > + gpiod: gpiod@e01b { > > + compatible = "actions,s900-gpio"; > > + reg = <0x0 0xe01b 0x0 0x1000>; > > + gpio-controller; > > + #gpio-cells = <2>; > > + gpio-ranges = < 0 76 30>; > > + interrupt-controller; > > + #interrupt-cells = <2>; > > + }; > > + > > + gpioe: gpioe@e01b { > > + compatible = "actions,s900-gpio"; > > + reg = <0x0 0xe01b 0x0 0x1000>; > > + gpio-controller; > > + #gpio-cells = <2>; > > + gpio-ranges = < 0 106 32>; > > + interrupt-controller; > > + #interrupt-cells = <2>; > > + }; > > + > > + gpiof: gpiof@e01b { > > + compatible = "actions,s900-gpio"; > > + reg = <0x0 0xe01b 0x0 0x1000>; > > + gpio-controller; > > + #gpio-cells = <2>; > > +
Re: [PATCH v4 05/10] dt-bindings: gpio: Add gpio nodes for Actions S900 SoC
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> --- > .../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 ..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. > + > +Examples: > + > +aliases { > +gpio0 = > +gpio1 = > +gpio2 = > +gpio3 = > +gpio4 = > +gpio5 = > +}; > + > + gpioa: gpioa@e01b { Use generic node names (gpio). > + compatible = "actions,s900-gpio"; > + reg = <0x0 0xe01b 0x0 0x1000>; > + gpio-controller; > + #gpio-cells = <2>; > + gpio-ranges = < 0 0 32>; > + interrupt-controller; > + #interrupt-cells = <2>; > + }; > + > + gpiob: gpiob@e01b { Ah, but your are duplicating addresses here which you shouldn't do either. These should be all one node if you can avoid overlapping. > + compatible = "actions,s900-gpio"; > + reg = <0x0 0xe01b 0x0 0x1000>; > + gpio-controller; > + #gpio-cells = <2>; > + gpio-ranges = < 0 32 32>; > + interrupt-controller; > + #interrupt-cells = <2>; > + }; > + > + gpioc: gpioc@e01b { > + compatible = "actions,s900-gpio"; > + reg = <0x0 0xe01b 0x0 0x1000>; > + gpio-controller; > + #gpio-cells = <2>; > + gpio-ranges = < 0 64 12>; > + interrupt-controller; > + #interrupt-cells = <2>; > + }; > + > + gpiod: gpiod@e01b { > + compatible = "actions,s900-gpio"; > + reg = <0x0 0xe01b 0x0 0x1000>; > + gpio-controller; > + #gpio-cells = <2>; > + gpio-ranges = < 0 76 30>; > + interrupt-controller; > + #interrupt-cells = <2>; > + }; > + > + gpioe: gpioe@e01b { > + compatible = "actions,s900-gpio"; > + reg = <0x0 0xe01b 0x0 0x1000>; > + gpio-controller; > + #gpio-cells = <2>; > + gpio-ranges = < 0 106 32>; > + interrupt-controller; > + #interrupt-cells = <2>; > + }; > + > + gpiof: gpiof@e01b { > + compatible = "actions,s900-gpio"; > + reg = <0x0 0xe01b 0x0 0x1000>; > + gpio-controller; > + #gpio-cells = <2>; > + gpio-ranges = < 0 138 8>; > + interrupt-controller; > + #interrupt-cells = <2>; > + }; > -- > 2.14.1 >
Re: [PATCH v4 05/10] dt-bindings: gpio: Add gpio nodes for Actions S900 SoC
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 > --- > .../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 ..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. > + > +Examples: > + > +aliases { > +gpio0 = > +gpio1 = > +gpio2 = > +gpio3 = > +gpio4 = > +gpio5 = > +}; > + > + gpioa: gpioa@e01b { Use generic node names (gpio). > + compatible = "actions,s900-gpio"; > + reg = <0x0 0xe01b 0x0 0x1000>; > + gpio-controller; > + #gpio-cells = <2>; > + gpio-ranges = < 0 0 32>; > + interrupt-controller; > + #interrupt-cells = <2>; > + }; > + > + gpiob: gpiob@e01b { Ah, but your are duplicating addresses here which you shouldn't do either. These should be all one node if you can avoid overlapping. > + compatible = "actions,s900-gpio"; > + reg = <0x0 0xe01b 0x0 0x1000>; > + gpio-controller; > + #gpio-cells = <2>; > + gpio-ranges = < 0 32 32>; > + interrupt-controller; > + #interrupt-cells = <2>; > + }; > + > + gpioc: gpioc@e01b { > + compatible = "actions,s900-gpio"; > + reg = <0x0 0xe01b 0x0 0x1000>; > + gpio-controller; > + #gpio-cells = <2>; > + gpio-ranges = < 0 64 12>; > + interrupt-controller; > + #interrupt-cells = <2>; > + }; > + > + gpiod: gpiod@e01b { > + compatible = "actions,s900-gpio"; > + reg = <0x0 0xe01b 0x0 0x1000>; > + gpio-controller; > + #gpio-cells = <2>; > + gpio-ranges = < 0 76 30>; > + interrupt-controller; > + #interrupt-cells = <2>; > + }; > + > + gpioe: gpioe@e01b { > + compatible = "actions,s900-gpio"; > + reg = <0x0 0xe01b 0x0 0x1000>; > + gpio-controller; > + #gpio-cells = <2>; > + gpio-ranges = < 0 106 32>; > + interrupt-controller; > + #interrupt-cells = <2>; > + }; > + > + gpiof: gpiof@e01b { > + compatible = "actions,s900-gpio"; > + reg = <0x0 0xe01b 0x0 0x1000>; > + gpio-controller; > + #gpio-cells = <2>; > + gpio-ranges = < 0 138 8>; > + interrupt-controller; > + #interrupt-cells = <2>; > + }; > -- > 2.14.1 >