public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Michel Pollet <michel.pollet@bp.renesas.com>
Cc: linux-renesas-soc@vger.kernel.org,
	Simon Horman <horms@verge.net.au>,
	phil.edworthy@renesas.com,
	Michel Pollet <buserror+upstream@gmail.com>,
	Magnus Damm <magnus.damm@gmail.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@kernel.org>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-clk@vger.kernel.org
Subject: Re: [PATCH v6 3/6] dt-bindings: clock: renesas,rzn1-clocks: document RZ/N1 clock driver
Date: Tue, 22 May 2018 11:09:13 -0500	[thread overview]
Message-ID: <20180522160913.GA7755@rob-hp-laptop> (raw)
In-Reply-To: <1526983321-41949-4-git-send-email-michel.pollet@bp.renesas.com>

On Tue, May 22, 2018 at 11:01:23AM +0100, Michel Pollet wrote:
> The Renesas RZ/N1 Family (Part #R9A06G0xx) requires a driver
> to provide the SoC clock infrastructure for Linux.
> 
> This documents the driver bindings.
> 
> Signed-off-by: Michel Pollet <michel.pollet@bp.renesas.com>
> ---
>  .../bindings/clock/renesas,rzn1-clocks.txt         | 44 ++++++++++++++++++++++
>  1 file changed, 44 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/clock/renesas,rzn1-clocks.txt
> 
> diff --git a/Documentation/devicetree/bindings/clock/renesas,rzn1-clocks.txt b/Documentation/devicetree/bindings/clock/renesas,rzn1-clocks.txt
> new file mode 100644
> index 0000000..0c41137
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/clock/renesas,rzn1-clocks.txt
> @@ -0,0 +1,44 @@
> +* Renesas RZ/N1 Clock Driver
> +
> +This driver provides the clock infrastructure used by all the other drivers.

Bindings document h/w not drivers.

> +
> +One of the 'special' feature of this infrastructure is that Linux doesn't

Bindings are not just for Linux.

> +necessary 'own' all the clocks on the SoC, some other OS runs on
> +the Cortex-M3 core and that OS can access and claim it's own clocks.

How is this relevant to the binding?

> +
> +Required Properties:
> +
> +  - compatible: Must be
> +    - "renesas,r9a06g032-clocks" for the RZ/N1D
> +    and "renesas,rzn1-clocks" as a fallback.

Is "clocks" how the chip reference manual refers to this block?

> +  - reg: Base address and length of the memory resource used by the driver
> +  - #clock-cells: Must be 1
> +
> +Examples
> +--------
> +
> +  - Clock driver device node:
> +
> +	clock: clocks@4000c000 {

clock-controller@...

> +		compatible = "renesas,r9a06g032-clocks",
> +				"renesas,rzn1-clocks";
> +		reg = <0x4000c000 0x1000>;
> +		status = "okay";

Don't show status in examples. (Plus, I doubt you ever want to have this 
disabled, so you don't need the property in your dts files either).

> +		#clock-cells = <1>;
> +	};
> +
> +
> +  - Other drivers can use the clocks as in:

s/drivers/nodes/

> +
> +	uart0: serial@40060000 {
> +		compatible = "snps,dw-apb-uart";
> +		reg = <0x40060000 0x400>;
> +		interrupts = <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>;
> +		reg-shift = <2>;
> +		reg-io-width = <4>;
> +		clocks = <&clock RZN1_CLK_UART0>;
> +		clock-names = "baudclk";
> +	};
> +    Note the use of RZN1_CLK_UART0 -- these constants are declared in
> +    the rzn1-clocks.h header file. These are not hardware based constants
> +    and are Linux specific.

No, they are not Linux specific. They are part of the DT ABI. 

While it is not a requirement to base them on some h/w numbering, it is 
preferred if you can. That usually only works if you can base them on 
bit positions or register offsets.

Rob

  reply	other threads:[~2018-05-22 16:09 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-22 10:01 [PATCH v6 0/6] arm: Base support for Renesas RZN1D-DB Board Michel Pollet
2018-05-22 10:01 ` [PATCH v6 1/6] dt-bindings: arm: Document the RZN1D-DB board Michel Pollet
2018-05-23  8:57   ` Simon Horman
2018-05-23  9:03   ` Geert Uytterhoeven
2018-05-23  9:20     ` Simon Horman
2018-05-22 10:01 ` [PATCH v6 2/6] dt-bindings: Add the rzn1-clocks.h file Michel Pollet
2018-05-22 16:00   ` Rob Herring
2018-05-22 18:44   ` Geert Uytterhoeven
2018-05-23  6:44     ` M P
2018-05-23  7:26       ` Geert Uytterhoeven
2018-05-23  8:17         ` M P
2018-05-25  9:12           ` Geert Uytterhoeven
2018-05-30 13:30             ` Phil Edworthy
2018-05-30 13:36               ` Geert Uytterhoeven
2018-05-30 13:49                 ` Phil Edworthy
2018-05-22 10:01 ` [PATCH v6 3/6] dt-bindings: clock: renesas,rzn1-clocks: document RZ/N1 clock driver Michel Pollet
2018-05-22 16:09   ` Rob Herring [this message]
2018-05-23  6:52     ` M P
2018-05-23 15:42       ` Rob Herring
2018-05-22 18:42   ` Geert Uytterhoeven
2018-05-22 10:01 ` [PATCH v6 4/6] ARM: dts: Renesas RZ/N1 SoC base device tree file Michel Pollet
2018-05-23  9:06   ` Simon Horman
2018-05-23  9:12   ` Geert Uytterhoeven
2018-05-23  9:20     ` M P
2018-05-23 11:18       ` Geert Uytterhoeven
2018-05-23 11:53         ` M P
2018-05-22 10:01 ` [PATCH v6 5/6] ARM: dts: Renesas RZN1D-DB Board base file Michel Pollet
2018-05-23  9:13   ` Geert Uytterhoeven
2018-05-24  0:03   ` kbuild test robot
2018-05-22 10:01 ` [PATCH v6 6/6] clk: renesas: Renesas RZ/N1 clock driver Michel Pollet
2018-05-24  0:17   ` kbuild test robot

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=20180522160913.GA7755@rob-hp-laptop \
    --to=robh@kernel.org \
    --cc=buserror+upstream@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=geert+renesas@glider.be \
    --cc=horms@verge.net.au \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    --cc=mark.rutland@arm.com \
    --cc=michel.pollet@bp.renesas.com \
    --cc=mturquette@baylibre.com \
    --cc=phil.edworthy@renesas.com \
    --cc=sboyd@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