linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 11/15] dt-bindings: pinctrl: milbeaut: Add Milbeaut M10V pinctrl description
@ 2019-02-08 12:33 Sugaya Taichi
  2019-02-08 13:32 ` Linus Walleij
  0 siblings, 1 reply; 3+ messages in thread
From: Sugaya Taichi @ 2019-02-08 12:33 UTC (permalink / raw)
  To: linux-gpio, devicetree, linux-arm-kernel, linux-kernel
  Cc: Linus Walleij, Rob Herring, Mark Rutland, Takao Orito,
	Kazuhiro Kasai, Shinji Kanematsu, Jassi Brar, Masami Hiramatsu,
	Sugaya Taichi

Add DT bindings document for Milbeaut M10V pinctrl.

Signed-off-by: Sugaya Taichi <sugaya.taichi@socionext.com>
---
 .../pinctrl/socionext,milbeaut-pinctrl.txt         | 35 ++++++++++++++++++++++
 1 file changed, 35 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/pinctrl/socionext,milbeaut-pinctrl.txt

diff --git a/Documentation/devicetree/bindings/pinctrl/socionext,milbeaut-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/socionext,milbeaut-pinctrl.txt
new file mode 100644
index 0000000..6b54191
--- /dev/null
+++ b/Documentation/devicetree/bindings/pinctrl/socionext,milbeaut-pinctrl.txt
@@ -0,0 +1,35 @@
+Milbeaut SoCs pin controller
+
+Required properties:
+- compatible: should be one of the following:
+    "socionext,milbeaut-m10v-pinctrl"  - for m10v SoC
+- reg: offset and length of the register set.
+- reg-names: should be "pinctrl", "exiu".
+- gpio-controller: marks the device node as a gpio controller.
+- gpio-cells: should be 2.
+- interrupt-controller: marks the device node as a interrupt controller.
+- interrupt-cells: should be 2.
+- clocks: phandle to the input clock.
+- interrupts: three interrupts specifer.
+- interrupt-names: corresponds "interrupts" factor.
+
+Example:
+	pinctrl: pinctrl@1d022000 {
+		compatible = "socionext,milbeaut-m10v-pinctrl";
+		reg = <0x1d022000 0x1000>,
+			<0x1c26f000 0x1000>;
+		reg-names = "pinctrl", "exiu";
+		gpio-controller;
+		#gpio-cells = <2>;
+		interrupt-controller;
+		#interrupt-cells = <2>;
+		clocks = <&clk 2>;
+		interrupts = <0 54 4>, <0 55 4>, <0 56 4>, <0 57 4>,
+				<0 58 4>, <0 59 4>, <0 60 4>, <0 61 4>,
+				<0 62 4>, <0 63 4>, <0 64 4>, <0 65 4>,
+				<0 66 4>, <0 67 4>, <0 68 4>, <0 69 4>;
+		interrupt-names = "pin-48", "pin-49", "pin-50", "pin-51",
+				"pin-52", "pin-53", "pin-54", "pin-55",
+				"pin-56", "pin-57", "pin-58", "pin-59",
+				"pin-60", "pin-61", "pin-62", "pin-63";
+	}
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2 11/15] dt-bindings: pinctrl: milbeaut: Add Milbeaut M10V pinctrl description
  2019-02-08 12:33 [PATCH v2 11/15] dt-bindings: pinctrl: milbeaut: Add Milbeaut M10V pinctrl description Sugaya Taichi
@ 2019-02-08 13:32 ` Linus Walleij
  2019-02-13  5:10   ` Sugaya, Taichi
  0 siblings, 1 reply; 3+ messages in thread
From: Linus Walleij @ 2019-02-08 13:32 UTC (permalink / raw)
  To: Sugaya Taichi
  Cc: open list:GPIO SUBSYSTEM,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Linux ARM, linux-kernel@vger.kernel.org, Rob Herring,
	Mark Rutland, Takao Orito, Kazuhiro Kasai, Shinji Kanematsu,
	Jassi Brar, Masami Hiramatsu, Marc Zyngier

Hi Sugaya,

thanks for your patch!

On Fri, Feb 8, 2019 at 1:32 PM Sugaya Taichi
<sugaya.taichi@socionext.com> wrote:

> Add DT bindings document for Milbeaut M10V pinctrl.
>
> Signed-off-by: Sugaya Taichi <sugaya.taichi@socionext.com>

(...)
> +- interrupts: three interrupts specifer.
> +- interrupt-names: corresponds "interrupts" factor.
(...)
> +               interrupts = <0 54 4>, <0 55 4>, <0 56 4>, <0 57 4>,
> +                               <0 58 4>, <0 59 4>, <0 60 4>, <0 61 4>,
> +                               <0 62 4>, <0 63 4>, <0 64 4>, <0 65 4>,
> +                               <0 66 4>, <0 67 4>, <0 68 4>, <0 69 4>;
> +               interrupt-names = "pin-48", "pin-49", "pin-50", "pin-51",
> +                               "pin-52", "pin-53", "pin-54", "pin-55",
> +                               "pin-56", "pin-57", "pin-58", "pin-59",
> +                               "pin-60", "pin-61", "pin-62", "pin-63";

As mentioned in the review of the driver, don't do this.

This is a hierarchical interrupt controller, so these
GIC-offset-to-GPIO-interrupt-offests should be hardcoded in
the driver.

If these interrupt offsets differ between difference instances of
this pin controller, they should have different compatible strings.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2 11/15] dt-bindings: pinctrl: milbeaut: Add Milbeaut M10V pinctrl description
  2019-02-08 13:32 ` Linus Walleij
@ 2019-02-13  5:10   ` Sugaya, Taichi
  0 siblings, 0 replies; 3+ messages in thread
From: Sugaya, Taichi @ 2019-02-13  5:10 UTC (permalink / raw)
  To: Linus Walleij
  Cc: open list:GPIO SUBSYSTEM,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Linux ARM, linux-kernel@vger.kernel.org, Rob Herring,
	Mark Rutland, Takao Orito, Kazuhiro Kasai, Shinji Kanematsu,
	Jassi Brar, Masami Hiramatsu, Marc Zyngier

Hi,

Thank you for your comments.

On 2019/02/08 22:32, Linus Walleij wrote:
> Hi Sugaya,
> 
> thanks for your patch!
> 
> On Fri, Feb 8, 2019 at 1:32 PM Sugaya Taichi
> <sugaya.taichi@socionext.com> wrote:
> 
>> Add DT bindings document for Milbeaut M10V pinctrl.
>>
>> Signed-off-by: Sugaya Taichi <sugaya.taichi@socionext.com>
> 
> (...)
>> +- interrupts: three interrupts specifer.
>> +- interrupt-names: corresponds "interrupts" factor.
> (...)
>> +               interrupts = <0 54 4>, <0 55 4>, <0 56 4>, <0 57 4>,
>> +                               <0 58 4>, <0 59 4>, <0 60 4>, <0 61 4>,
>> +                               <0 62 4>, <0 63 4>, <0 64 4>, <0 65 4>,
>> +                               <0 66 4>, <0 67 4>, <0 68 4>, <0 69 4>;
>> +               interrupt-names = "pin-48", "pin-49", "pin-50", "pin-51",
>> +                               "pin-52", "pin-53", "pin-54", "pin-55",
>> +                               "pin-56", "pin-57", "pin-58", "pin-59",
>> +                               "pin-60", "pin-61", "pin-62", "pin-63";
> 
> As mentioned in the review of the driver, don't do this.
> 
> This is a hierarchical interrupt controller, so these
> GIC-offset-to-GPIO-interrupt-offests should be hardcoded in
> the driver.
> 
> If these interrupt offsets differ between difference instances of
> this pin controller, they should have different compatible strings.
> 
> Yours,
> Linus Walleij
> 

I understand.
I am sure the content of bindings will change as a whole as driver changes.
Try it.

Thanks,
Sugaya Taichi

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-02-13  5:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-08 12:33 [PATCH v2 11/15] dt-bindings: pinctrl: milbeaut: Add Milbeaut M10V pinctrl description Sugaya Taichi
2019-02-08 13:32 ` Linus Walleij
2019-02-13  5:10   ` Sugaya, Taichi

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).