All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 2/3] clk: shmobile: Add MSTP clock support
Date: Wed, 30 Oct 2013 00:06:04 +0000	[thread overview]
Message-ID: <1481817.doGcO1nQB0@avalon> (raw)
In-Reply-To: <F8268ACF-E4E8-4411-84F1-D967450BE440@codeaurora.org>

Hi Kumar,

Thank you for the review.

On Tuesday 29 October 2013 18:36:06 Kumar Gala wrote:
> On Oct 29, 2013, at 9:55 AM, Laurent Pinchart wrote:
> > MSTP clocks are gate clocks controlled through a register that handles
> > up to 32 clocks. The register is often sparsely populated.
> > 
> > Those clocks are found on Renesas ARM SoCs.
> > 
> > Signed-off-by: Laurent Pinchart
> > <laurent.pinchart+renesas@ideasonboard.com>
> > ---
> > .../bindings/clock/renesas,cpg-mstp-clocks.txt     |  47 +++++
> > drivers/clk/shmobile/Makefile                      |   1 +
> > drivers/clk/shmobile/clk-mstp.c                    | 229 +++++++++++++++++
> > include/dt-bindings/clock/r8a7790-clock.h          |  56 +++++
> > 4 files changed, 333 insertions(+)
> > create mode 100644
> > Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txt
> > create mode 100644 drivers/clk/shmobile/clk-mstp.c
> > create mode 100644 include/dt-bindings/clock/r8a7790-clock.h
> > 
> > diff --git
> > a/Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txt
> > b/Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txt new
> > file mode 100644
> > index 0000000..b3a1ce0
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txt
> > @@ -0,0 +1,47 @@
> > +* Renesas R8A7790 MSTP Clocks
> 
> can we spell out MSTP once in the heading?

Sure thing. It stands for Module Stop.

> > +
> > +The CPG can gate SoC device clocks. The gates are organized in groups of
> > up to
> > +32 gates.
> > +
> > +This device tree binding describes a single 32 gate clocks group per
> > node.
> > +Clocks are referenced by user nodes by the MSTP node phandle and the
> > clock
> > +index in the group, from 0 to 31.
> > +
> > +Required Properties:
> > +
> > +  - compatible: Must be one of the following
> > +    - "renesas,r8a7790-mstp-clocks" for R8A7790 (R-Car H2) MSTP gate
> > clocks
> > +    - "renesas,cpg-mstp-clock" for generic MSTP gate clocks
> > +  - reg: Base address and length of the memory resource used by the MSTP
> > +    clocks
> > +  - clocks: Reference to the parent clocks
> > +  - #clock-cells: Must be 1
> > +  - clock-output-names: The name of the clocks as free-form strings
> > +  - renesas,indices: Index of the gate clocks (0 to 31)
> 
> Index of the gate clock into what?

Into the 32 gates clock group. Groups have 32 entries with a 32-bit register 
that controls 32 gate clocks. The groups (and thus registers) are sparsly 
populated, this property lists the indices for the register bits corresponding 
to the clocks.

Would

  - renesas,indices: Indices of the gate clocks into the group (0 to 31)

be explicit enough ?

> > +
> > +The clocks, clock-output-names and renesas,indices properties contain one
> > +entry per gate. The MSTP groups are sparsely populated. Unimplemented
> > gates
> per gate clock. (?)

I'll change that.

> > +must not be declared.
> > +
> > +
> > +Example
> > +-------
> > +
> > +	#include <dt-bindings/clock/r8a7790-clock.h>
> > +
> > +	mstp3_clks: mstp3_clks {

mstp3_clks@e615013c I suppose.

> > +		compatible = "renesas,r8a7790-mstp-clocks", "renesas,cpg-mstp-
clocks";
> > +		reg = <0 0xe615013c 0 4>, <0 0xe6150048 0 4>;
> > +		clocks = <&cp_clk>, <&mmc1_clk>, <&sd3_clk>, <&sd2_clk>,
> > +			 <&cpg_clocks R8A7790_CLK_SD1>, <&cpg_clocks 
R8A7790_CLK_SD0>,
> > +			 <&mmc0_clk>;
> > +		#clock-cells = <1>;
> > +		clock-output-names > > +			"tpu0", "mmcif1", "sdhi3", "sdhi2",
> > +			 "sdhi1", "sdhi0", "mmcif0";
> > +		renesas,clock-indices = <
> > +			R8A7790_CLK_TPU0 R8A7790_CLK_MMCIF1 R8A7790_CLK_SDHI3
> > +			R8A7790_CLK_SDHI2 R8A7790_CLK_SDHI1 R8A7790_CLK_SDHI0
> > +			R8A7790_CLK_MMCIF0
> > +		>;
> > +	};

-- 
Regards,

Laurent Pinchart


WARNING: multiple messages have this Message-ID (diff)
From: laurent.pinchart@ideasonboard.com (Laurent Pinchart)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/3] clk: shmobile: Add MSTP clock support
Date: Wed, 30 Oct 2013 01:06:04 +0100	[thread overview]
Message-ID: <1481817.doGcO1nQB0@avalon> (raw)
In-Reply-To: <F8268ACF-E4E8-4411-84F1-D967450BE440@codeaurora.org>

Hi Kumar,

Thank you for the review.

On Tuesday 29 October 2013 18:36:06 Kumar Gala wrote:
> On Oct 29, 2013, at 9:55 AM, Laurent Pinchart wrote:
> > MSTP clocks are gate clocks controlled through a register that handles
> > up to 32 clocks. The register is often sparsely populated.
> > 
> > Those clocks are found on Renesas ARM SoCs.
> > 
> > Signed-off-by: Laurent Pinchart
> > <laurent.pinchart+renesas@ideasonboard.com>
> > ---
> > .../bindings/clock/renesas,cpg-mstp-clocks.txt     |  47 +++++
> > drivers/clk/shmobile/Makefile                      |   1 +
> > drivers/clk/shmobile/clk-mstp.c                    | 229 +++++++++++++++++
> > include/dt-bindings/clock/r8a7790-clock.h          |  56 +++++
> > 4 files changed, 333 insertions(+)
> > create mode 100644
> > Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txt
> > create mode 100644 drivers/clk/shmobile/clk-mstp.c
> > create mode 100644 include/dt-bindings/clock/r8a7790-clock.h
> > 
> > diff --git
> > a/Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txt
> > b/Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txt new
> > file mode 100644
> > index 0000000..b3a1ce0
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txt
> > @@ -0,0 +1,47 @@
> > +* Renesas R8A7790 MSTP Clocks
> 
> can we spell out MSTP once in the heading?

Sure thing. It stands for Module Stop.

> > +
> > +The CPG can gate SoC device clocks. The gates are organized in groups of
> > up to
> > +32 gates.
> > +
> > +This device tree binding describes a single 32 gate clocks group per
> > node.
> > +Clocks are referenced by user nodes by the MSTP node phandle and the
> > clock
> > +index in the group, from 0 to 31.
> > +
> > +Required Properties:
> > +
> > +  - compatible: Must be one of the following
> > +    - "renesas,r8a7790-mstp-clocks" for R8A7790 (R-Car H2) MSTP gate
> > clocks
> > +    - "renesas,cpg-mstp-clock" for generic MSTP gate clocks
> > +  - reg: Base address and length of the memory resource used by the MSTP
> > +    clocks
> > +  - clocks: Reference to the parent clocks
> > +  - #clock-cells: Must be 1
> > +  - clock-output-names: The name of the clocks as free-form strings
> > +  - renesas,indices: Index of the gate clocks (0 to 31)
> 
> Index of the gate clock into what?

Into the 32 gates clock group. Groups have 32 entries with a 32-bit register 
that controls 32 gate clocks. The groups (and thus registers) are sparsly 
populated, this property lists the indices for the register bits corresponding 
to the clocks.

Would

  - renesas,indices: Indices of the gate clocks into the group (0 to 31)

be explicit enough ?

> > +
> > +The clocks, clock-output-names and renesas,indices properties contain one
> > +entry per gate. The MSTP groups are sparsely populated. Unimplemented
> > gates
> per gate clock. (?)

I'll change that.

> > +must not be declared.
> > +
> > +
> > +Example
> > +-------
> > +
> > +	#include <dt-bindings/clock/r8a7790-clock.h>
> > +
> > +	mstp3_clks: mstp3_clks {

mstp3_clks at e615013c I suppose.

> > +		compatible = "renesas,r8a7790-mstp-clocks", "renesas,cpg-mstp-
clocks";
> > +		reg = <0 0xe615013c 0 4>, <0 0xe6150048 0 4>;
> > +		clocks = <&cp_clk>, <&mmc1_clk>, <&sd3_clk>, <&sd2_clk>,
> > +			 <&cpg_clocks R8A7790_CLK_SD1>, <&cpg_clocks 
R8A7790_CLK_SD0>,
> > +			 <&mmc0_clk>;
> > +		#clock-cells = <1>;
> > +		clock-output-names =
> > +			"tpu0", "mmcif1", "sdhi3", "sdhi2",
> > +			 "sdhi1", "sdhi0", "mmcif0";
> > +		renesas,clock-indices = <
> > +			R8A7790_CLK_TPU0 R8A7790_CLK_MMCIF1 R8A7790_CLK_SDHI3
> > +			R8A7790_CLK_SDHI2 R8A7790_CLK_SDHI1 R8A7790_CLK_SDHI0
> > +			R8A7790_CLK_MMCIF0
> > +		>;
> > +	};

-- 
Regards,

Laurent Pinchart

WARNING: multiple messages have this Message-ID (diff)
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Kumar Gala <galak@codeaurora.org>
Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>,
	linux-sh@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	devicetree@vger.kernel.org,
	Mike Turquette <mturquette@linaro.org>
Subject: Re: [PATCH 2/3] clk: shmobile: Add MSTP clock support
Date: Wed, 30 Oct 2013 01:06:04 +0100	[thread overview]
Message-ID: <1481817.doGcO1nQB0@avalon> (raw)
In-Reply-To: <F8268ACF-E4E8-4411-84F1-D967450BE440@codeaurora.org>

Hi Kumar,

Thank you for the review.

On Tuesday 29 October 2013 18:36:06 Kumar Gala wrote:
> On Oct 29, 2013, at 9:55 AM, Laurent Pinchart wrote:
> > MSTP clocks are gate clocks controlled through a register that handles
> > up to 32 clocks. The register is often sparsely populated.
> > 
> > Those clocks are found on Renesas ARM SoCs.
> > 
> > Signed-off-by: Laurent Pinchart
> > <laurent.pinchart+renesas@ideasonboard.com>
> > ---
> > .../bindings/clock/renesas,cpg-mstp-clocks.txt     |  47 +++++
> > drivers/clk/shmobile/Makefile                      |   1 +
> > drivers/clk/shmobile/clk-mstp.c                    | 229 +++++++++++++++++
> > include/dt-bindings/clock/r8a7790-clock.h          |  56 +++++
> > 4 files changed, 333 insertions(+)
> > create mode 100644
> > Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txt
> > create mode 100644 drivers/clk/shmobile/clk-mstp.c
> > create mode 100644 include/dt-bindings/clock/r8a7790-clock.h
> > 
> > diff --git
> > a/Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txt
> > b/Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txt new
> > file mode 100644
> > index 0000000..b3a1ce0
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txt
> > @@ -0,0 +1,47 @@
> > +* Renesas R8A7790 MSTP Clocks
> 
> can we spell out MSTP once in the heading?

Sure thing. It stands for Module Stop.

> > +
> > +The CPG can gate SoC device clocks. The gates are organized in groups of
> > up to
> > +32 gates.
> > +
> > +This device tree binding describes a single 32 gate clocks group per
> > node.
> > +Clocks are referenced by user nodes by the MSTP node phandle and the
> > clock
> > +index in the group, from 0 to 31.
> > +
> > +Required Properties:
> > +
> > +  - compatible: Must be one of the following
> > +    - "renesas,r8a7790-mstp-clocks" for R8A7790 (R-Car H2) MSTP gate
> > clocks
> > +    - "renesas,cpg-mstp-clock" for generic MSTP gate clocks
> > +  - reg: Base address and length of the memory resource used by the MSTP
> > +    clocks
> > +  - clocks: Reference to the parent clocks
> > +  - #clock-cells: Must be 1
> > +  - clock-output-names: The name of the clocks as free-form strings
> > +  - renesas,indices: Index of the gate clocks (0 to 31)
> 
> Index of the gate clock into what?

Into the 32 gates clock group. Groups have 32 entries with a 32-bit register 
that controls 32 gate clocks. The groups (and thus registers) are sparsly 
populated, this property lists the indices for the register bits corresponding 
to the clocks.

Would

  - renesas,indices: Indices of the gate clocks into the group (0 to 31)

be explicit enough ?

> > +
> > +The clocks, clock-output-names and renesas,indices properties contain one
> > +entry per gate. The MSTP groups are sparsely populated. Unimplemented
> > gates
> per gate clock. (?)

I'll change that.

> > +must not be declared.
> > +
> > +
> > +Example
> > +-------
> > +
> > +	#include <dt-bindings/clock/r8a7790-clock.h>
> > +
> > +	mstp3_clks: mstp3_clks {

mstp3_clks@e615013c I suppose.

> > +		compatible = "renesas,r8a7790-mstp-clocks", "renesas,cpg-mstp-
clocks";
> > +		reg = <0 0xe615013c 0 4>, <0 0xe6150048 0 4>;
> > +		clocks = <&cp_clk>, <&mmc1_clk>, <&sd3_clk>, <&sd2_clk>,
> > +			 <&cpg_clocks R8A7790_CLK_SD1>, <&cpg_clocks 
R8A7790_CLK_SD0>,
> > +			 <&mmc0_clk>;
> > +		#clock-cells = <1>;
> > +		clock-output-names =
> > +			"tpu0", "mmcif1", "sdhi3", "sdhi2",
> > +			 "sdhi1", "sdhi0", "mmcif0";
> > +		renesas,clock-indices = <
> > +			R8A7790_CLK_TPU0 R8A7790_CLK_MMCIF1 R8A7790_CLK_SDHI3
> > +			R8A7790_CLK_SDHI2 R8A7790_CLK_SDHI1 R8A7790_CLK_SDHI0
> > +			R8A7790_CLK_MMCIF0
> > +		>;
> > +	};

-- 
Regards,

Laurent Pinchart


  reply	other threads:[~2013-10-30  0:06 UTC|newest]

Thread overview: 105+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-29 14:55 [PATCH 0/3] Renesas R8A7790 Common Clock Framework support Laurent Pinchart
2013-10-29 14:55 ` Laurent Pinchart
2013-10-29 14:55 ` Laurent Pinchart
2013-10-29 14:55 ` [PATCH 1/3] clk: shmobile: Add DIV6 clock support Laurent Pinchart
2013-10-29 14:55   ` Laurent Pinchart
2013-10-29 14:55   ` Laurent Pinchart
2013-10-29 23:33   ` Kumar Gala
2013-10-29 23:33     ` Kumar Gala
2013-10-29 23:33     ` Kumar Gala
2013-10-29 23:54     ` Laurent Pinchart
2013-10-29 23:54       ` Laurent Pinchart
2013-10-29 23:54       ` Laurent Pinchart
2013-10-29 23:56       ` Kumar Gala
2013-10-29 23:56         ` Kumar Gala
2013-10-29 23:56         ` Kumar Gala
2013-10-29 14:55 ` [PATCH 2/3] clk: shmobile: Add MSTP " Laurent Pinchart
2013-10-29 14:55   ` Laurent Pinchart
2013-10-29 14:55   ` Laurent Pinchart
2013-10-29 23:36   ` Kumar Gala
2013-10-29 23:36     ` Kumar Gala
2013-10-29 23:36     ` Kumar Gala
2013-10-30  0:06     ` Laurent Pinchart [this message]
2013-10-30  0:06       ` Laurent Pinchart
2013-10-30  0:06       ` Laurent Pinchart
2013-10-30  0:19       ` Kumar Gala
2013-10-30  0:19         ` Kumar Gala
2013-10-30  0:19         ` Kumar Gala
2013-10-31 15:15         ` Laurent Pinchart
2013-10-31 15:15           ` Laurent Pinchart
2013-10-31 15:15           ` Laurent Pinchart
2013-11-06  2:09   ` Simon Horman
2013-11-06  2:09     ` Simon Horman
2013-11-06  2:09     ` Simon Horman
2013-11-06 12:22     ` Laurent Pinchart
2013-11-06 12:22       ` Laurent Pinchart
2013-11-06 12:22       ` Laurent Pinchart
2013-11-06  8:33   ` Magnus Damm
2013-11-06  8:33     ` Magnus Damm
2013-11-06  8:33     ` Magnus Damm
2013-11-06 12:13     ` Laurent Pinchart
2013-11-06 12:13       ` Laurent Pinchart
2013-11-06 12:13       ` Laurent Pinchart
2013-10-29 14:55 ` [PATCH 3/3] clk: shmobile: Add R8A7790 clocks support Laurent Pinchart
2013-10-29 14:55   ` Laurent Pinchart
2013-10-29 14:55   ` Laurent Pinchart
2013-10-29 23:56   ` Kumar Gala
2013-10-29 23:56     ` Kumar Gala
2013-10-29 23:56     ` Kumar Gala
2013-11-05  7:56   ` Magnus Damm
2013-11-05  7:56     ` Magnus Damm
2013-11-05  7:56     ` Magnus Damm
2013-11-05 23:47     ` Laurent Pinchart
2013-11-05 23:47       ` Laurent Pinchart
2013-11-05 23:47       ` Laurent Pinchart
2013-11-06  8:19       ` Magnus Damm
2013-11-06  8:19         ` Magnus Damm
2013-11-06  8:19         ` Magnus Damm
2013-11-06 12:45         ` Laurent Pinchart
2013-11-06 12:45           ` Laurent Pinchart
2013-11-06 12:45           ` Laurent Pinchart
2013-11-05  8:52   ` Kuninori Morimoto
2013-11-05  8:52     ` Kuninori Morimoto
2013-11-05  8:52     ` Kuninori Morimoto
2013-11-05 23:57     ` Laurent Pinchart
2013-11-05 23:57       ` Laurent Pinchart
2013-11-05 23:57       ` Laurent Pinchart
2013-11-06  0:54       ` Kuninori Morimoto
2013-11-06  0:54         ` Kuninori Morimoto
2013-11-06  0:54         ` Kuninori Morimoto
2013-11-06  1:00         ` Laurent Pinchart
2013-11-06  1:00           ` Laurent Pinchart
2013-11-06  1:00           ` Laurent Pinchart
2013-11-06  2:31           ` Kuninori Morimoto
2013-11-06  2:31             ` Kuninori Morimoto
2013-11-06  2:31             ` Kuninori Morimoto
2013-11-06 12:41             ` Laurent Pinchart
2013-11-06 12:41               ` Laurent Pinchart
2013-11-06 12:41               ` Laurent Pinchart
2013-11-07  3:22               ` Kuninori Morimoto
2013-11-07  3:22                 ` Kuninori Morimoto
2013-11-07  3:22                 ` Kuninori Morimoto
2013-11-07  7:20                 ` Kuninori Morimoto
2013-11-07  7:20                   ` Kuninori Morimoto
2013-11-07  7:20                   ` Kuninori Morimoto
2013-11-07 12:15                   ` Laurent Pinchart
2013-11-07 12:15                     ` Laurent Pinchart
2013-11-07 12:15                     ` Laurent Pinchart
2013-11-08  0:06                     ` Kuninori Morimoto
2013-11-08  0:06                       ` Kuninori Morimoto
2013-11-08  0:06                       ` Kuninori Morimoto
2013-11-08  1:00                       ` Laurent Pinchart
2013-11-08  1:00                         ` Laurent Pinchart
2013-11-08  1:00                         ` Laurent Pinchart
2013-11-08  6:02                         ` Kuninori Morimoto
2013-11-08  6:02                           ` Kuninori Morimoto
2013-11-08  6:02                           ` Kuninori Morimoto
2013-11-06  7:18   ` Simon Horman
2013-11-06  7:18     ` Simon Horman
2013-11-06  7:18     ` Simon Horman
2013-11-06 12:56     ` Laurent Pinchart
2013-11-06 12:56       ` Laurent Pinchart
2013-11-06 12:56       ` Laurent Pinchart
2013-11-08  6:34       ` Simon Horman
2013-11-08  6:34         ` Simon Horman
2013-11-08  6:34         ` 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=1481817.doGcO1nQB0@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=linux-arm-kernel@lists.infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.