devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark Rutland <mark.rutland@arm.com>
To: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Cc: "linux-sh@vger.kernel.org" <linux-sh@vger.kernel.org>,
	"linux-serial@vger.kernel.org" <linux-serial@vger.kernel.org>,
	Bastian Hecht <hechtb+renesas@gmail.com>,
	Paul Mundt <lethal@linux-sh.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>
Subject: Re: [PATCH v2 28/29] serial: sh-sci: Add device tree bindings documentation
Date: Mon, 11 Nov 2013 09:40:39 +0000	[thread overview]
Message-ID: <20131111094039.GA21201@e106331-lin.cambridge.arm.com> (raw)
In-Reply-To: <1384054421-13357-29-git-send-email-laurent.pinchart+renesas@ideasonboard.com>

Hi Laurent,

I have a few comments.

On Sun, Nov 10, 2013 at 03:33:40AM +0000, 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>
> Acked-by: Simon Horman <horms+renesas@verge.net.au>
> ---
>  .../bindings/serial/renesas,sci-serial.txt         | 42 ++++++++++++++++++++++
>  1 file changed, 42 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..66d3bca
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
> @@ -0,0 +1,42 @@
> +* Renesas SH-Mobile Serial Communication Interface
> +
> +Required properties:
> +
> +  - compatible: one of the following types (scif, scifa, scifb, hscif).

Minor nit, but would be nice to have "Should contain one of the
following:". We might have future variants whereby the compatible string
will actually be a string list.

> +
> +    - "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.

Is the "-generic" suffix necessary? Why not just "renesas,scif" etc?

> +
> +    When compatible with the generic version, nodes must also list the
> +    SoC-specific version corresponding to the platform.

Presumably the SoC-specific version should come first; it would be nice
to note that.

> +
> +  - reg: Base address and length of the memory resource used by the UART.

I assume by memory resource you mean the memory-mapped registers?
Resource sounds like Linux-internal nomenclature leaking.

> +
> +  - interrupt-parent: Reference to the parent interrupt controller.

I don't think this is strictly necessary. It's implicit by default and
can be added optionally when a system is wired in a complex way. As it's
a completely standard optional property I'm not even sure it needs to be
documented.

> +  - interrupts: Interrupt number.

Minor nit: "Should contain an interrupt-specifier for ..."

I saw the cover mentioned multiple interrupts. Which logical interrupt
output of the device are you expecting here?

> +
> +  - clocks: Reference to the SCIx UART interface clock.

Minor nit: s/Reference to/A phandle + clock-specifier pair for/

> +  - clock-names: Should be "sci_ick".

As we're using clock-names, it would be nicer still to define clocks in
terms of clock-names so as to make it easier to update the document in
future and make the expected use of clock-names clearer:

- clocks: Should contain a phandle + clock-specifier pair for each entry
  in clock-names.

- clock-names: Should contain "sci_ick".

> +
> +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";
> +	};

Otherwise this looks good to me.

Thanks,
Mark.

  parent reply	other threads:[~2013-11-11  9:40 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-10  3:33 [PATCH v2 00/29] Add OF support to the sh-sci serial port driver Laurent Pinchart
2013-11-10  3:33 ` [PATCH v2 28/29] serial: sh-sci: Add device tree bindings documentation Laurent Pinchart
2013-11-10 18:07   ` Sergei Shtylyov
2013-11-11  2:39     ` Laurent Pinchart
2013-11-11  9:40   ` Mark Rutland [this message]
2013-11-11 13:26     ` Laurent Pinchart
2013-11-11 15:48       ` Mark Rutland
2013-11-12 13:56         ` Laurent Pinchart
2013-11-19  1:55 ` [PATCH v2 00/29] Add OF support to the sh-sci serial port driver Simon Horman
2013-11-19 13:12   ` Laurent Pinchart
2013-11-20  0:18     ` Simon Horman

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=20131111094039.GA21201@e106331-lin.cambridge.arm.com \
    --to=mark.rutland@arm.com \
    --cc=devicetree@vger.kernel.org \
    --cc=hechtb+renesas@gmail.com \
    --cc=laurent.pinchart+renesas@ideasonboard.com \
    --cc=lethal@linux-sh.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=linux-sh@vger.kernel.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).