devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] Add OF support to the sh-sci serial port driver
@ 2013-10-29 10:29 Laurent Pinchart
  2013-10-29 10:29 ` [PATCH 5/5] serial: sh-sci: Add device tree bindings documentation Laurent Pinchart
  2013-10-31  5:21 ` [PATCH 0/5] Add OF support to the sh-sci serial port driver Simon Horman
  0 siblings, 2 replies; 9+ messages in thread
From: Laurent Pinchart @ 2013-10-29 10:29 UTC (permalink / raw)
  To: linux-sh; +Cc: linux-serial, Bastian Hecht, Paul Mundt, devicetree

Hello,

This patch set adds device tree bindings for the sh sci serial port devices
and adds OF parsing to the sh-sci driver.

The bindings are based on Bastian Hecht's proposal (see
http://www.spinics.net/lists/arm-kernel/msg228129.html). The approach taken
here is more minimalistic: instead of describing all hardware characteristics
that vary between the SCI device revisions in DT (such as registers layout),
that information is stored in the driver and selected based on the compatible
property value. Only SCI revisions used on ARM devices are supported through
DT, as DT support for SuperH is nowhere down the line.

The first three patches clean up the sh-sci driver. They're not strictly
required for OF support but make sense nonetheless. The last two patches add
OF parsing to the sh-sci driver and create DT bindings documentation.

The patches have been test on a Lager board (r8a7790-based). Support for other
SoCs will be added as needed. Note that all current Renesas ARM SoCs seem to
be compatible with the generic (H)SCI(F)(AB) devices, but the plan is for
their DT bindings to list the SoC-specific version in case incompatibilities
are found later.

Cc: devicetree@vger.kernel.org

Bastian Hecht (1):
  serial: sh-sci: Add OF support

Laurent Pinchart (4):
  serial: sh-sci: Sort headers alphabetically
  serial: sh-sci: Remove baud rate calculation algorithm 5
  serial: sh-sci: Simplify baud rate calculation algorithms
  serial: sh-sci: Add device tree bindings documentation

 .../bindings/serial/renesas,sci-serial.txt         |  51 ++++++
 drivers/tty/serial/sh-sci.c                        | 192 +++++++++++++++++----
 include/linux/serial_sci.h                         |   9 +-
 3 files changed, 217 insertions(+), 35 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/serial/renesas,sci-serial.txt

-- 
Regards,

Laurent Pinchart


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

* [PATCH 5/5] serial: sh-sci: Add device tree bindings documentation
  2013-10-29 10:29 [PATCH 0/5] Add OF support to the sh-sci serial port driver Laurent Pinchart
@ 2013-10-29 10:29 ` Laurent Pinchart
  2013-10-31 14:42   ` Kumar Gala
  2013-10-31  5:21 ` [PATCH 0/5] Add OF support to the sh-sci serial port driver Simon Horman
  1 sibling, 1 reply; 9+ messages in thread
From: Laurent Pinchart @ 2013-10-29 10:29 UTC (permalink / raw)
  To: linux-sh; +Cc: linux-serial, Bastian Hecht, Paul Mundt, devicetree

Document the device tree bindings for the sci serial port devices.

Cc: devicetree@vger.kernel.org
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
 .../bindings/serial/renesas,sci-serial.txt         | 51 ++++++++++++++++++++++
 1 file changed, 51 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/serial/renesas,sci-serial.txt

diff --git a/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt b/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
new file mode 100644
index 0000000..5658b4f
--- /dev/null
+++ b/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
@@ -0,0 +1,51 @@
+* Renesas SH-Mobile Serial Communication Interface
+
+Required properties:
+
+  - compatible: should be one of the following.
+
+    - "renesas,scif-r8a7790" for R8A7790 (R-Car H2) SCIF compatible UART.
+    - "renesas,scifa-r8a7790" for R8A7790 (R-Car H2) SCIFA compatible UART.
+    - "renesas,scifb-r8a7790" for R8A7790 (R-Car H2) SCIFB compatible UART.
+    - "renesas,hscif-r8a7790" for R8A7790 (R-Car H2) HSCIF compatible UART.
+    - "renesas,scif-generic" for generic SCIF compatible UART.
+    - "renesas,scifa-generic" for generic SCIFA compatible UART.
+    - "renesas,scifb-generic" for generic SCIFB compatible UART.
+    - "renesas,hscif-generic" for generic HSCIF compatible UART.
+
+    When compatible with the generic version, nodes must also list the
+    SoC-specific version corresponding to the platform.
+
+  - reg: Base address and length of the memory resource used by the UART.
+
+  - interrupt-parent: Reference to the parent interrupt controller.
+  - interrupts: Interrupt number(s). Depending on the SoC SCIx UARTs are tied
+    to one or multiple interrupt lines. When using multiple interrupt lines,
+    specify the interrupt names as described below.
+
+  - clocks: Reference to the SCIx UART interface clock.
+  - clock-names: Should be "sci_ick".
+
+Optional properties:
+
+  - interrupt-names: When using multiple interrupts, report the interrupt
+    names as "eri" (receive error), "rxi" (receive), "txi" (transmit) and
+    "bri" (break). When using a single interrupt this property should not be
+    present.
+
+Note: Each enabled SCIx UART should have an alias correctly numbered in the
+"aliases" node.
+
+Example:
+	aliases {
+		serial0 = &scifa0;
+	};
+
+	scifa0: serial@e6c40000 {
+		compatible = "renesas,scifa-r8a7790", "renesas,scifa-generic";
+		reg = <0 0xe6c40000 0 64>;
+		interrupt-parent = <&gic>;
+		interrupts = <0 144 4>;
+		clocks = <&mstp2_clks 4>;
+		clock-names = "sci_ick";
+	};
-- 
1.8.1.5


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

* Re: [PATCH 0/5] Add OF support to the sh-sci serial port driver
  2013-10-29 10:29 [PATCH 0/5] Add OF support to the sh-sci serial port driver Laurent Pinchart
  2013-10-29 10:29 ` [PATCH 5/5] serial: sh-sci: Add device tree bindings documentation Laurent Pinchart
@ 2013-10-31  5:21 ` Simon Horman
  2013-10-31 12:30   ` Laurent Pinchart
  1 sibling, 1 reply; 9+ messages in thread
From: Simon Horman @ 2013-10-31  5:21 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: linux-sh, linux-serial, Bastian Hecht, Paul Mundt, devicetree,
	Greg Kroah-Hartman

[ CCed Greg KH. It is my assumption that he will take this series
  once it is ready ]

On Tue, Oct 29, 2013 at 11:29:54AM +0100, Laurent Pinchart wrote:
> Hello,
> 
> This patch set adds device tree bindings for the sh sci serial port devices
> and adds OF parsing to the sh-sci driver.
> 
> The bindings are based on Bastian Hecht's proposal (see
> http://www.spinics.net/lists/arm-kernel/msg228129.html). The approach taken
> here is more minimalistic: instead of describing all hardware characteristics
> that vary between the SCI device revisions in DT (such as registers layout),
> that information is stored in the driver and selected based on the compatible
> property value. Only SCI revisions used on ARM devices are supported through
> DT, as DT support for SuperH is nowhere down the line.
> 
> The first three patches clean up the sh-sci driver. They're not strictly
> required for OF support but make sense nonetheless. The last two patches add
> OF parsing to the sh-sci driver and create DT bindings documentation.
> 
> The patches have been test on a Lager board (r8a7790-based). Support for other
> SoCs will be added as needed. Note that all current Renesas ARM SoCs seem to
> be compatible with the generic (H)SCI(F)(AB) devices, but the plan is for
> their DT bindings to list the SoC-specific version in case incompatibilities
> are found later.
> 
> Cc: devicetree@vger.kernel.org
> 
> Bastian Hecht (1):
>   serial: sh-sci: Add OF support
> 
> Laurent Pinchart (4):
>   serial: sh-sci: Sort headers alphabetically
>   serial: sh-sci: Remove baud rate calculation algorithm 5
>   serial: sh-sci: Simplify baud rate calculation algorithms
>   serial: sh-sci: Add device tree bindings documentation

Acked-by: Simon Horman <horms+renesas@verge.net.au>

Laurent, is this series waiting on anything other than
a review of the bindings from the Device-Tree people?

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

* Re: [PATCH 0/5] Add OF support to the sh-sci serial port driver
  2013-10-31  5:21 ` [PATCH 0/5] Add OF support to the sh-sci serial port driver Simon Horman
@ 2013-10-31 12:30   ` Laurent Pinchart
  2013-11-01  0:17     ` Simon Horman
  0 siblings, 1 reply; 9+ messages in thread
From: Laurent Pinchart @ 2013-10-31 12:30 UTC (permalink / raw)
  To: Simon Horman
  Cc: Laurent Pinchart, linux-sh, linux-serial, Bastian Hecht,
	Paul Mundt, devicetree, Greg Kroah-Hartman

Hi Simon,

On Thursday 31 October 2013 14:21:16 Simon Horman wrote:
> [ CCed Greg KH. It is my assumption that he will take this series
>   once it is ready ]
> 
> On Tue, Oct 29, 2013 at 11:29:54AM +0100, Laurent Pinchart wrote:
> > Hello,
> > 
> > This patch set adds device tree bindings for the sh sci serial port
> > devices and adds OF parsing to the sh-sci driver.
> > 
> > The bindings are based on Bastian Hecht's proposal (see
> > http://www.spinics.net/lists/arm-kernel/msg228129.html). The approach
> > taken here is more minimalistic: instead of describing all hardware
> > characteristics that vary between the SCI device revisions in DT (such as
> > registers layout), that information is stored in the driver and selected
> > based on the compatible property value. Only SCI revisions used on ARM
> > devices are supported through DT, as DT support for SuperH is nowhere
> > down the line.
> > 
> > The first three patches clean up the sh-sci driver. They're not strictly
> > required for OF support but make sense nonetheless. The last two patches
> > add OF parsing to the sh-sci driver and create DT bindings documentation.
> > 
> > The patches have been test on a Lager board (r8a7790-based). Support for
> > other SoCs will be added as needed. Note that all current Renesas ARM
> > SoCs seem to be compatible with the generic (H)SCI(F)(AB) devices, but
> > the plan is for their DT bindings to list the SoC-specific version in
> > case incompatibilities are found later.
> > 
> > Cc: devicetree@vger.kernel.org
> > 
> > Bastian Hecht (1):
> >   serial: sh-sci: Add OF support
> > 
> > Laurent Pinchart (4):
> >   serial: sh-sci: Sort headers alphabetically
> >   serial: sh-sci: Remove baud rate calculation algorithm 5
> >   serial: sh-sci: Simplify baud rate calculation algorithms
> >   serial: sh-sci: Add device tree bindings documentation
> 
> Acked-by: Simon Horman <horms+renesas@verge.net.au>
> 
> Laurent, is this series waiting on anything other than a review of the
> bindings from the Device-Tree people?

It's only waiting for review of the DT bindings and their implementation 
(patches 4/5 and 5/5). As I've modified Bastian's patch in 4/5 I'd like to 
give him an opportunity to review it as well.

-- 
Regards,

Laurent Pinchart


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

* Re: [PATCH 5/5] serial: sh-sci: Add device tree bindings documentation
  2013-10-29 10:29 ` [PATCH 5/5] serial: sh-sci: Add device tree bindings documentation Laurent Pinchart
@ 2013-10-31 14:42   ` Kumar Gala
  2013-10-31 14:55     ` Laurent Pinchart
  0 siblings, 1 reply; 9+ messages in thread
From: Kumar Gala @ 2013-10-31 14:42 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: linux-sh, linux-serial, Bastian Hecht, Paul Mundt, devicetree


On Oct 29, 2013, at 5:29 AM, Laurent Pinchart wrote:

> Document the device tree bindings for the sci serial port devices.
> 
> Cc: devicetree@vger.kernel.org
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> ---
> .../bindings/serial/renesas,sci-serial.txt         | 51 ++++++++++++++++++++++
> 1 file changed, 51 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
> 
> diff --git a/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt b/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
> new file mode 100644
> index 0000000..5658b4f
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
> @@ -0,0 +1,51 @@
> +* Renesas SH-Mobile Serial Communication Interface
> +
> +Required properties:
> +
> +  - compatible: should be one of the following.

Being pedantic, but how about saying 'one of the following types (scif, scifa, scifb, or hscif)

> +
> +    - "renesas,scif-r8a7790" for R8A7790 (R-Car H2) SCIF compatible UART.
> +    - "renesas,scifa-r8a7790" for R8A7790 (R-Car H2) SCIFA compatible UART.
> +    - "renesas,scifb-r8a7790" for R8A7790 (R-Car H2) SCIFB compatible UART.
> +    - "renesas,hscif-r8a7790" for R8A7790 (R-Car H2) HSCIF compatible UART.
> +    - "renesas,scif-generic" for generic SCIF compatible UART.
> +    - "renesas,scifa-generic" for generic SCIFA compatible UART.
> +    - "renesas,scifb-generic" for generic SCIFB compatible UART.
> +    - "renesas,hscif-generic" for generic HSCIF compatible UART.
> +
> +    When compatible with the generic version, nodes must also list the
> +    SoC-specific version corresponding to the platform.
> +
> +  - reg: Base address and length of the memory resource used by the UART.
> +
> +  - interrupt-parent: Reference to the parent interrupt controller.
> +  - interrupts: Interrupt number(s). Depending on the SoC SCIx UARTs are tied
> +    to one or multiple interrupt lines. When using multiple interrupt lines,
> +    specify the interrupt names as described below.
> +
> +  - clocks: Reference to the SCIx UART interface clock.
> +  - clock-names: Should be "sci_ick".
> +
> +Optional properties:
> +
> +  - interrupt-names: When using multiple interrupts, report the interrupt
> +    names as "eri" (receive error), "rxi" (receive), "txi" (transmit) and
> +    "bri" (break). When using a single interrupt this property should not be
> +    present.

Hmm, is there a reason not to just have the 4 interrupts always present and in the case they are all wired to the same interrupt, just have the interrupts all be the same?

example:

interrupts = <0 144 4>, <0 144 4>, <0 144 4>, <0 144 4>;


> +
> +Note: Each enabled SCIx UART should have an alias correctly numbered in the
> +"aliases" node.
> +
> +Example:
> +	aliases {
> +		serial0 = &scifa0;
> +	};
> +
> +	scifa0: serial@e6c40000 {
> +		compatible = "renesas,scifa-r8a7790", "renesas,scifa-generic";
> +		reg = <0 0xe6c40000 0 64>;
> +		interrupt-parent = <&gic>;
> +		interrupts = <0 144 4>;
> +		clocks = <&mstp2_clks 4>;
> +		clock-names = "sci_ick";
> +	};

might be nice to have an example with the 4 interrupts.

- k

-- 
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation


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

* Re: [PATCH 5/5] serial: sh-sci: Add device tree bindings documentation
  2013-10-31 14:42   ` Kumar Gala
@ 2013-10-31 14:55     ` Laurent Pinchart
  2013-10-31 15:00       ` Kumar Gala
  0 siblings, 1 reply; 9+ messages in thread
From: Laurent Pinchart @ 2013-10-31 14:55 UTC (permalink / raw)
  To: Kumar Gala
  Cc: Laurent Pinchart, linux-sh, linux-serial, Bastian Hecht,
	Paul Mundt, devicetree

Hi Kumar,

Thank you for the review.

On Thursday 31 October 2013 09:42:48 Kumar Gala wrote:
> On Oct 29, 2013, at 5:29 AM, Laurent Pinchart wrote:
> > Document the device tree bindings for the sci serial port devices.
> > 
> > Cc: devicetree@vger.kernel.org
> > Signed-off-by: Laurent Pinchart
> > <laurent.pinchart+renesas@ideasonboard.com>
> > ---
> > .../bindings/serial/renesas,sci-serial.txt         | 51 ++++++++++++++++++
> > 1 file changed, 51 insertions(+)
> > create mode 100644
> > Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
> > 
> > diff --git
> > a/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
> > b/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt new
> > file mode 100644
> > index 0000000..5658b4f
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
> > @@ -0,0 +1,51 @@
> > +* Renesas SH-Mobile Serial Communication Interface
> > +
> > +Required properties:
> > +
> > +  - compatible: should be one of the following.
> 
> Being pedantic, but how about saying 'one of the following types (scif,
> scifa, scifb, or hscif)

Sounds good to me.

> > +
> > +    - "renesas,scif-r8a7790" for R8A7790 (R-Car H2) SCIF compatible UART.
> > +    - "renesas,scifa-r8a7790" for R8A7790 (R-Car H2) SCIFA compatible
> > UART.
> > +    - "renesas,scifb-r8a7790" for R8A7790 (R-Car H2) SCIFB compatible
> > UART.
> > +    - "renesas,hscif-r8a7790" for R8A7790 (R-Car H2) HSCIF compatible
> > UART.
> > +    - "renesas,scif-generic" for generic SCIF compatible UART.
> > +    - "renesas,scifa-generic" for generic SCIFA compatible UART.
> > +    - "renesas,scifb-generic" for generic SCIFB compatible UART.
> > +    - "renesas,hscif-generic" for generic HSCIF compatible UART.
> > +
> > +    When compatible with the generic version, nodes must also list the
> > +    SoC-specific version corresponding to the platform.
> > +
> > +  - reg: Base address and length of the memory resource used by the UART.
> > +
> > +  - interrupt-parent: Reference to the parent interrupt controller.
> > +  - interrupts: Interrupt number(s). Depending on the SoC SCIx UARTs are
> > tied
> > +    to one or multiple interrupt lines. When using multiple interrupt
> > lines,
> > +    specify the interrupt names as described below.
> > +
> > +  - clocks: Reference to the SCIx UART interface clock.
> > +  - clock-names: Should be "sci_ick".
> > +
> > +Optional properties:
> > +
> > +  - interrupt-names: When using multiple interrupts, report the interrupt
> > +    names as "eri" (receive error), "rxi" (receive), "txi" (transmit) and
> > +    "bri" (break). When using a single interrupt this property should not
> > be +    present.
> 
> Hmm, is there a reason not to just have the 4 interrupts always present and
> in the case they are all wired to the same interrupt, just have the
> interrupts all be the same?
> 
> example:
> 
> interrupts = <0 144 4>, <0 144 4>, <0 144 4>, <0 144 4>;

The multiple interrupts case is the exception, I thought it would be easier to 
specify a single interrupt in the general case and have a more complex binding 
for the exceptions.

> > +
> > +Note: Each enabled SCIx UART should have an alias correctly numbered in
> > the +"aliases" node.
> > +
> > +Example:
> > +	aliases {
> > +		serial0 = &scifa0;
> > +	};
> > +
> > +	scifa0: serial@e6c40000 {
> > +		compatible = "renesas,scifa-r8a7790", "renesas,scifa-generic";
> > +		reg = <0 0xe6c40000 0 64>;
> > +		interrupt-parent = <&gic>;
> > +		interrupts = <0 144 4>;
> > +		clocks = <&mstp2_clks 4>;
> > +		clock-names = "sci_ick";
> > +	};
> 
> might be nice to have an example with the 4 interrupts.

The example would be pretty theoretical, as the r8a7790 uses a single 
interrupt in all cases. What about adding such an example when adding an SoC 
that uses multiple interrupts to the DT bindings documentation ?

-- 
Regards,

Laurent Pinchart


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

* Re: [PATCH 5/5] serial: sh-sci: Add device tree bindings documentation
  2013-10-31 14:55     ` Laurent Pinchart
@ 2013-10-31 15:00       ` Kumar Gala
  2013-11-03 17:09         ` Laurent Pinchart
  0 siblings, 1 reply; 9+ messages in thread
From: Kumar Gala @ 2013-10-31 15:00 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: Laurent Pinchart, linux-sh-u79uwXL29TY76Z2rM5mHXA,
	linux-serial-u79uwXL29TY76Z2rM5mHXA, Bastian Hecht, Paul Mundt,
	devicetree-u79uwXL29TY76Z2rM5mHXA


On Oct 31, 2013, at 9:55 AM, Laurent Pinchart wrote:

> Hi Kumar,
> 
> Thank you for the review.
> 
> On Thursday 31 October 2013 09:42:48 Kumar Gala wrote:
>> On Oct 29, 2013, at 5:29 AM, Laurent Pinchart wrote:
>>> Document the device tree bindings for the sci serial port devices.
>>> 
>>> Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
>>> Signed-off-by: Laurent Pinchart
>>> <laurent.pinchart+renesas-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org>
>>> ---
>>> .../bindings/serial/renesas,sci-serial.txt         | 51 ++++++++++++++++++
>>> 1 file changed, 51 insertions(+)
>>> create mode 100644
>>> Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
>>> 
>>> diff --git
>>> a/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
>>> b/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt new
>>> file mode 100644
>>> index 0000000..5658b4f
>>> --- /dev/null
>>> +++ b/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
>>> @@ -0,0 +1,51 @@
>>> +* Renesas SH-Mobile Serial Communication Interface
>>> +
>>> +Required properties:
>>> +
>>> +  - compatible: should be one of the following.
>> 
>> Being pedantic, but how about saying 'one of the following types (scif,
>> scifa, scifb, or hscif)
> 
> Sounds good to me.
> 
>>> +
>>> +    - "renesas,scif-r8a7790" for R8A7790 (R-Car H2) SCIF compatible UART.
>>> +    - "renesas,scifa-r8a7790" for R8A7790 (R-Car H2) SCIFA compatible
>>> UART.
>>> +    - "renesas,scifb-r8a7790" for R8A7790 (R-Car H2) SCIFB compatible
>>> UART.
>>> +    - "renesas,hscif-r8a7790" for R8A7790 (R-Car H2) HSCIF compatible
>>> UART.
>>> +    - "renesas,scif-generic" for generic SCIF compatible UART.
>>> +    - "renesas,scifa-generic" for generic SCIFA compatible UART.
>>> +    - "renesas,scifb-generic" for generic SCIFB compatible UART.
>>> +    - "renesas,hscif-generic" for generic HSCIF compatible UART.
>>> +
>>> +    When compatible with the generic version, nodes must also list the
>>> +    SoC-specific version corresponding to the platform.
>>> +
>>> +  - reg: Base address and length of the memory resource used by the UART.
>>> +
>>> +  - interrupt-parent: Reference to the parent interrupt controller.
>>> +  - interrupts: Interrupt number(s). Depending on the SoC SCIx UARTs are
>>> tied
>>> +    to one or multiple interrupt lines. When using multiple interrupt
>>> lines,
>>> +    specify the interrupt names as described below.
>>> +
>>> +  - clocks: Reference to the SCIx UART interface clock.
>>> +  - clock-names: Should be "sci_ick".
>>> +
>>> +Optional properties:
>>> +
>>> +  - interrupt-names: When using multiple interrupts, report the interrupt
>>> +    names as "eri" (receive error), "rxi" (receive), "txi" (transmit) and
>>> +    "bri" (break). When using a single interrupt this property should not
>>> be +    present.
>> 
>> Hmm, is there a reason not to just have the 4 interrupts always present and
>> in the case they are all wired to the same interrupt, just have the
>> interrupts all be the same?
>> 
>> example:
>> 
>> interrupts = <0 144 4>, <0 144 4>, <0 144 4>, <0 144 4>;
> 
> The multiple interrupts case is the exception, I thought it would be easier to 
> specify a single interrupt in the general case and have a more complex binding 
> for the exceptions.
> 
>>> +
>>> +Note: Each enabled SCIx UART should have an alias correctly numbered in
>>> the +"aliases" node.
>>> +
>>> +Example:
>>> +	aliases {
>>> +		serial0 = &scifa0;
>>> +	};
>>> +
>>> +	scifa0: serial@e6c40000 {
>>> +		compatible = "renesas,scifa-r8a7790", "renesas,scifa-generic";
>>> +		reg = <0 0xe6c40000 0 64>;
>>> +		interrupt-parent = <&gic>;
>>> +		interrupts = <0 144 4>;
>>> +		clocks = <&mstp2_clks 4>;
>>> +		clock-names = "sci_ick";
>>> +	};
>> 
>> might be nice to have an example with the 4 interrupts.
> 
> The example would be pretty theoretical, as the r8a7790 uses a single 
> interrupt in all cases. What about adding such an example when adding an SoC 
> that uses multiple interrupts to the DT bindings documentation ?

I'm fine with that if we strip the multiple interrupt bits out of the binding until a device/compatible exists that needs it.

- k
> 
> -- 
> Regards,
> 
> Laurent Pinchart
> 

-- 
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 0/5] Add OF support to the sh-sci serial port driver
  2013-10-31 12:30   ` Laurent Pinchart
@ 2013-11-01  0:17     ` Simon Horman
  0 siblings, 0 replies; 9+ messages in thread
From: Simon Horman @ 2013-11-01  0:17 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: Laurent Pinchart, linux-sh, linux-serial, Bastian Hecht,
	Paul Mundt, devicetree, Greg Kroah-Hartman

On Thu, Oct 31, 2013 at 01:30:12PM +0100, Laurent Pinchart wrote:
> Hi Simon,
> 
> On Thursday 31 October 2013 14:21:16 Simon Horman wrote:
> > [ CCed Greg KH. It is my assumption that he will take this series
> >   once it is ready ]
> > 
> > On Tue, Oct 29, 2013 at 11:29:54AM +0100, Laurent Pinchart wrote:
> > > Hello,
> > > 
> > > This patch set adds device tree bindings for the sh sci serial port
> > > devices and adds OF parsing to the sh-sci driver.
> > > 
> > > The bindings are based on Bastian Hecht's proposal (see
> > > http://www.spinics.net/lists/arm-kernel/msg228129.html). The approach
> > > taken here is more minimalistic: instead of describing all hardware
> > > characteristics that vary between the SCI device revisions in DT (such as
> > > registers layout), that information is stored in the driver and selected
> > > based on the compatible property value. Only SCI revisions used on ARM
> > > devices are supported through DT, as DT support for SuperH is nowhere
> > > down the line.
> > > 
> > > The first three patches clean up the sh-sci driver. They're not strictly
> > > required for OF support but make sense nonetheless. The last two patches
> > > add OF parsing to the sh-sci driver and create DT bindings documentation.
> > > 
> > > The patches have been test on a Lager board (r8a7790-based). Support for
> > > other SoCs will be added as needed. Note that all current Renesas ARM
> > > SoCs seem to be compatible with the generic (H)SCI(F)(AB) devices, but
> > > the plan is for their DT bindings to list the SoC-specific version in
> > > case incompatibilities are found later.
> > > 
> > > Cc: devicetree@vger.kernel.org
> > > 
> > > Bastian Hecht (1):
> > >   serial: sh-sci: Add OF support
> > > 
> > > Laurent Pinchart (4):
> > >   serial: sh-sci: Sort headers alphabetically
> > >   serial: sh-sci: Remove baud rate calculation algorithm 5
> > >   serial: sh-sci: Simplify baud rate calculation algorithms
> > >   serial: sh-sci: Add device tree bindings documentation
> > 
> > Acked-by: Simon Horman <horms+renesas@verge.net.au>
> > 
> > Laurent, is this series waiting on anything other than a review of the
> > bindings from the Device-Tree people?
> 
> It's only waiting for review of the DT bindings and their implementation 
> (patches 4/5 and 5/5). As I've modified Bastian's patch in 4/5 I'd like to 
> give him an opportunity to review it as well.

Understood.

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

* Re: [PATCH 5/5] serial: sh-sci: Add device tree bindings documentation
  2013-10-31 15:00       ` Kumar Gala
@ 2013-11-03 17:09         ` Laurent Pinchart
  0 siblings, 0 replies; 9+ messages in thread
From: Laurent Pinchart @ 2013-11-03 17:09 UTC (permalink / raw)
  To: Kumar Gala
  Cc: Laurent Pinchart, linux-sh, linux-serial, Bastian Hecht,
	Paul Mundt, devicetree

Hi Kumar,

On Thursday 31 October 2013 10:00:36 Kumar Gala wrote:
> On Oct 31, 2013, at 9:55 AM, Laurent Pinchart wrote:
> > On Thursday 31 October 2013 09:42:48 Kumar Gala wrote:
> >> On Oct 29, 2013, at 5:29 AM, Laurent Pinchart wrote:
> >>> Document the device tree bindings for the sci serial port devices.
> >>> 
> >>> Cc: devicetree@vger.kernel.org
> >>> Signed-off-by: Laurent Pinchart
> >>> <laurent.pinchart+renesas@ideasonboard.com>
> >>> ---
> >>> .../bindings/serial/renesas,sci-serial.txt         | 51 ++++++++++++++++
> >>> 1 file changed, 51 insertions(+)
> >>> create mode 100644
> >>> Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
> >>> 
> >>> diff --git
> >>> a/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
> >>> b/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt new
> >>> file mode 100644
> >>> index 0000000..5658b4f
> >>> --- /dev/null
> >>> +++ b/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
> >>> @@ -0,0 +1,51 @@
> >>> +* Renesas SH-Mobile Serial Communication Interface
> >>> +
> >>> +Required properties:
> >>> +
> >>> +  - compatible: should be one of the following.
> >> 
> >> Being pedantic, but how about saying 'one of the following types (scif,
> >> scifa, scifb, or hscif)
> > 
> > Sounds good to me.
> > 
> >>> +
> >>> +    - "renesas,scif-r8a7790" for R8A7790 (R-Car H2) SCIF compatible
> >>> UART.
> >>> +    - "renesas,scifa-r8a7790" for R8A7790 (R-Car H2) SCIFA compatible
> >>> UART.
> >>> +    - "renesas,scifb-r8a7790" for R8A7790 (R-Car H2) SCIFB compatible
> >>> UART.
> >>> +    - "renesas,hscif-r8a7790" for R8A7790 (R-Car H2) HSCIF compatible
> >>> UART.
> >>> +    - "renesas,scif-generic" for generic SCIF compatible UART.
> >>> +    - "renesas,scifa-generic" for generic SCIFA compatible UART.
> >>> +    - "renesas,scifb-generic" for generic SCIFB compatible UART.
> >>> +    - "renesas,hscif-generic" for generic HSCIF compatible UART.
> >>> +
> >>> +    When compatible with the generic version, nodes must also list the
> >>> +    SoC-specific version corresponding to the platform.
> >>> +
> >>> +  - reg: Base address and length of the memory resource used by the
> >>> UART.
> >>> +
> >>> +  - interrupt-parent: Reference to the parent interrupt controller.
> >>> +  - interrupts: Interrupt number(s). Depending on the SoC SCIx UARTs
> >>> are
> >>> tied
> >>> +    to one or multiple interrupt lines. When using multiple interrupt
> >>> lines,
> >>> +    specify the interrupt names as described below.
> >>> +
> >>> +  - clocks: Reference to the SCIx UART interface clock.
> >>> +  - clock-names: Should be "sci_ick".
> >>> +
> >>> +Optional properties:
> >>> +
> >>> +  - interrupt-names: When using multiple interrupts, report the
> >>> interrupt
> >>> +    names as "eri" (receive error), "rxi" (receive), "txi" (transmit)
> >>> and
> >>> +    "bri" (break). When using a single interrupt this property should
> >>> not
> >>> be +    present.
> >> 
> >> Hmm, is there a reason not to just have the 4 interrupts always present
> >> and in the case they are all wired to the same interrupt, just have the
> >> interrupts all be the same?
> >> 
> >> example:
> >> 
> >> interrupts = <0 144 4>, <0 144 4>, <0 144 4>, <0 144 4>;
> > 
> > The multiple interrupts case is the exception, I thought it would be
> > easier to specify a single interrupt in the general case and have a more
> > complex binding for the exceptions.
> > 
> >>> +
> >>> +Note: Each enabled SCIx UART should have an alias correctly numbered in
> >>> the +"aliases" node.
> >>> +
> >>> +Example:
> >>> +	aliases {
> >>> +		serial0 = &scifa0;
> >>> +	};
> >>> +
> >>> +	scifa0: serial@e6c40000 {
> >>> +		compatible = "renesas,scifa-r8a7790", "renesas,scifa-generic";
> >>> +		reg = <0 0xe6c40000 0 64>;
> >>> +		interrupt-parent = <&gic>;
> >>> +		interrupts = <0 144 4>;
> >>> +		clocks = <&mstp2_clks 4>;
> >>> +		clock-names = "sci_ick";
> >>> +	};
> >> 
> >> might be nice to have an example with the 4 interrupts.
> > 
> > The example would be pretty theoretical, as the r8a7790 uses a single
> > interrupt in all cases. What about adding such an example when adding an
> > SoC that uses multiple interrupts to the DT bindings documentation ?
> 
> I'm fine with that if we strip the multiple interrupt bits out of the
> binding until a device/compatible exists that needs it.

I'll do that and repost.

-- 
Regards,

Laurent Pinchart


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

end of thread, other threads:[~2013-11-03 17:09 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-29 10:29 [PATCH 0/5] Add OF support to the sh-sci serial port driver Laurent Pinchart
2013-10-29 10:29 ` [PATCH 5/5] serial: sh-sci: Add device tree bindings documentation Laurent Pinchart
2013-10-31 14:42   ` Kumar Gala
2013-10-31 14:55     ` Laurent Pinchart
2013-10-31 15:00       ` Kumar Gala
2013-11-03 17:09         ` Laurent Pinchart
2013-10-31  5:21 ` [PATCH 0/5] Add OF support to the sh-sci serial port driver Simon Horman
2013-10-31 12:30   ` Laurent Pinchart
2013-11-01  0:17     ` Simon Horman

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