devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] libata, dt: Add clocks to sata_rcar bindings
@ 2014-01-16 22:07 Valentine Barshak
  2014-01-19 20:16 ` Laurent Pinchart
  0 siblings, 1 reply; 4+ messages in thread
From: Valentine Barshak @ 2014-01-16 22:07 UTC (permalink / raw)
  To: linux-sh, linux-ide, devicetree
  Cc: Tejun Heo, Simon Horman, Magnus Damm, Kuninori Morimoto,
	Laurent Pinchart


Now that the clocks are available in the R-Car Gen2 DT,
add clocks property description to the sata_rcar bindings.
The clocks have been tested on r8a7791 so we use that
as an example of the R-Car SATA node.

The patch is against for-next branch of the libata git repo.

Signed-off-by: Valentine Barshak <valentine.barshak@cogentembedded.com>
---
 Documentation/devicetree/bindings/ata/sata_rcar.txt | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/Documentation/devicetree/bindings/ata/sata_rcar.txt b/Documentation/devicetree/bindings/ata/sata_rcar.txt
index 1e61113..6da60c0 100644
--- a/Documentation/devicetree/bindings/ata/sata_rcar.txt
+++ b/Documentation/devicetree/bindings/ata/sata_rcar.txt
@@ -7,12 +7,14 @@ Required properties:
 			  - "renesas,sata-r8a7791" for R-Car M2
 - reg			: address and length of the SATA registers;
 - interrupts		: must consist of one interrupt specifier.
+- clocks		: must contain a phandle and clock-specifier pair.
 
 Example:
 
-sata: sata@fc600000 {
-	compatible = "renesas,sata-r8a7779";
-	reg = <0xfc600000 0x2000>;
+sata0: sata@ee300000 {
+	compatible = "renesas,sata-r8a7791";
+	reg = <0 0xee300000 0 0x2000>;
 	interrupt-parent = <&gic>;
-	interrupts = <0 100 IRQ_TYPE_LEVEL_HIGH>;
+	interrupts = <0 105 IRQ_TYPE_LEVEL_HIGH>;
+	clocks = <&mstp8_clks R8A7791_CLK_SATA0>;
 };
-- 
1.8.3.1


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

* Re: [PATCH] libata, dt: Add clocks to sata_rcar bindings
  2014-01-16 22:07 [PATCH] libata, dt: Add clocks to sata_rcar bindings Valentine Barshak
@ 2014-01-19 20:16 ` Laurent Pinchart
  2014-01-20  9:31   ` Mark Rutland
  0 siblings, 1 reply; 4+ messages in thread
From: Laurent Pinchart @ 2014-01-19 20:16 UTC (permalink / raw)
  To: Valentine Barshak
  Cc: linux-sh, linux-ide, devicetree, Tejun Heo, Simon Horman,
	Magnus Damm, Kuninori Morimoto

Hi Valentine,

Thank you for the patch.

On Friday 17 January 2014 02:07:42 Valentine Barshak wrote:
> Now that the clocks are available in the R-Car Gen2 DT,
> add clocks property description to the sata_rcar bindings.
> The clocks have been tested on r8a7791 so we use that
> as an example of the R-Car SATA node.
> 
> The patch is against for-next branch of the libata git repo.
> 
> Signed-off-by: Valentine Barshak <valentine.barshak@cogentembedded.com>
> ---
>  Documentation/devicetree/bindings/ata/sata_rcar.txt | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/ata/sata_rcar.txt
> b/Documentation/devicetree/bindings/ata/sata_rcar.txt index
> 1e61113..6da60c0 100644
> --- a/Documentation/devicetree/bindings/ata/sata_rcar.txt
> +++ b/Documentation/devicetree/bindings/ata/sata_rcar.txt
> @@ -7,12 +7,14 @@ Required properties:
>  			  - "renesas,sata-r8a7791" for R-Car M2
>  - reg			: address and length of the SATA registers;
>  - interrupts		: must consist of one interrupt specifier.
> +- clocks		: must contain a phandle and clock-specifier pair.

I would say "must contain a reference to the functional clock.", as the clock 
could be referenced by a phandle only depending on the SATA IP core 
integration in the SoC.

Wouldn't it be time to have standard wordings for clocks (and interrupt) 
bindings ? 

>  Example:
> 
> -sata: sata@fc600000 {
> -	compatible = "renesas,sata-r8a7779";
> -	reg = <0xfc600000 0x2000>;
> +sata0: sata@ee300000 {
> +	compatible = "renesas,sata-r8a7791";
> +	reg = <0 0xee300000 0 0x2000>;
>  	interrupt-parent = <&gic>;
> -	interrupts = <0 100 IRQ_TYPE_LEVEL_HIGH>;
> +	interrupts = <0 105 IRQ_TYPE_LEVEL_HIGH>;
> +	clocks = <&mstp8_clks R8A7791_CLK_SATA0>;
>  };

-- 
Regards,

Laurent Pinchart


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

* Re: [PATCH] libata, dt: Add clocks to sata_rcar bindings
  2014-01-19 20:16 ` Laurent Pinchart
@ 2014-01-20  9:31   ` Mark Rutland
  2014-01-20 15:29     ` Laurent Pinchart
  0 siblings, 1 reply; 4+ messages in thread
From: Mark Rutland @ 2014-01-20  9:31 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: Valentine Barshak, linux-sh@vger.kernel.org,
	linux-ide@vger.kernel.org, devicetree@vger.kernel.org, Tejun Heo,
	Simon Horman, Magnus Damm, Kuninori Morimoto

On Sun, Jan 19, 2014 at 08:16:42PM +0000, Laurent Pinchart wrote:
> Hi Valentine,
> 
> Thank you for the patch.
> 
> On Friday 17 January 2014 02:07:42 Valentine Barshak wrote:
> > Now that the clocks are available in the R-Car Gen2 DT,
> > add clocks property description to the sata_rcar bindings.
> > The clocks have been tested on r8a7791 so we use that
> > as an example of the R-Car SATA node.
> > 
> > The patch is against for-next branch of the libata git repo.
> > 
> > Signed-off-by: Valentine Barshak <valentine.barshak@cogentembedded.com>
> > ---
> >  Documentation/devicetree/bindings/ata/sata_rcar.txt | 10 ++++++----
> >  1 file changed, 6 insertions(+), 4 deletions(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/ata/sata_rcar.txt
> > b/Documentation/devicetree/bindings/ata/sata_rcar.txt index
> > 1e61113..6da60c0 100644
> > --- a/Documentation/devicetree/bindings/ata/sata_rcar.txt
> > +++ b/Documentation/devicetree/bindings/ata/sata_rcar.txt
> > @@ -7,12 +7,14 @@ Required properties:
> >  			  - "renesas,sata-r8a7791" for R-Car M2
> >  - reg			: address and length of the SATA registers;
> >  - interrupts		: must consist of one interrupt specifier.
> > +- clocks		: must contain a phandle and clock-specifier pair.
> 
> I would say "must contain a reference to the functional clock.", as the clock 
> could be referenced by a phandle only depending on the SATA IP core 
> integration in the SoC.

In that case the clock-specifier is simply zero cells (though admittedly
a pair including a zero-cells element is a bit odd).

The wording in the patch is consistent with the form I've been
recommending elsewhere:

- clocks: A list of phandles + clock-specifier pairs, one for each
  entry in clock-names.
- clock-names: Should contain:
  * "fclk" - the functional clock
  * "other_clk" - some other clock.

> 
> Wouldn't it be time to have standard wordings for clocks (and interrupt) 
> bindings ? 

I would certainly like to see consistent wording across bindings
(especially for interrupts given the addition of the interrupts-extended
binding).

Cheers,
Mark.

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

* Re: [PATCH] libata, dt: Add clocks to sata_rcar bindings
  2014-01-20  9:31   ` Mark Rutland
@ 2014-01-20 15:29     ` Laurent Pinchart
  0 siblings, 0 replies; 4+ messages in thread
From: Laurent Pinchart @ 2014-01-20 15:29 UTC (permalink / raw)
  To: Mark Rutland
  Cc: Valentine Barshak, linux-sh@vger.kernel.org,
	linux-ide@vger.kernel.org, devicetree@vger.kernel.org, Tejun Heo,
	Simon Horman, Magnus Damm, Kuninori Morimoto

Hi Mark,

On Monday 20 January 2014 09:31:19 Mark Rutland wrote:
> On Sun, Jan 19, 2014 at 08:16:42PM +0000, Laurent Pinchart wrote:
> > On Friday 17 January 2014 02:07:42 Valentine Barshak wrote:
> > > Now that the clocks are available in the R-Car Gen2 DT,
> > > add clocks property description to the sata_rcar bindings.
> > > The clocks have been tested on r8a7791 so we use that
> > > as an example of the R-Car SATA node.
> > > 
> > > The patch is against for-next branch of the libata git repo.
> > > 
> > > Signed-off-by: Valentine Barshak <valentine.barshak@cogentembedded.com>
> > > ---
> > > 
> > >  Documentation/devicetree/bindings/ata/sata_rcar.txt | 10 ++++++----
> > >  1 file changed, 6 insertions(+), 4 deletions(-)
> > > 
> > > diff --git a/Documentation/devicetree/bindings/ata/sata_rcar.txt
> > > b/Documentation/devicetree/bindings/ata/sata_rcar.txt index
> > > 1e61113..6da60c0 100644
> > > --- a/Documentation/devicetree/bindings/ata/sata_rcar.txt
> > > +++ b/Documentation/devicetree/bindings/ata/sata_rcar.txt
> > > 
> > > @@ -7,12 +7,14 @@ Required properties:
> > >  			  - "renesas,sata-r8a7791" for R-Car M2
> > >  - reg			: address and length of the SATA registers;
> > >  - interrupts		: must consist of one interrupt specifier.
> > > +- clocks		: must contain a phandle and clock-specifier pair.
> > 
> > I would say "must contain a reference to the functional clock.", as the
> > clock could be referenced by a phandle only depending on the SATA IP core
> > integration in the SoC.
> 
> In that case the clock-specifier is simply zero cells (though admittedly
> a pair including a zero-cells element is a bit odd).
> 
> The wording in the patch is consistent with the form I've been
> recommending elsewhere:
> 
> - clocks: A list of phandles + clock-specifier pairs, one for each
>   entry in clock-names.
> - clock-names: Should contain:
>   * "fclk" - the functional clock
>   * "other_clk" - some other clock.
> 
> > Wouldn't it be time to have standard wordings for clocks (and interrupt)
> > bindings ?
> 
> I would certainly like to see consistent wording across bindings
> (especially for interrupts given the addition of the interrupts-extended
> binding).

What about creating a new file in Documentation/devicetree/bindings/ with 
reference wordings for common properties ?

-- 
Regards,

Laurent Pinchart


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

end of thread, other threads:[~2014-01-20 15:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-16 22:07 [PATCH] libata, dt: Add clocks to sata_rcar bindings Valentine Barshak
2014-01-19 20:16 ` Laurent Pinchart
2014-01-20  9:31   ` Mark Rutland
2014-01-20 15:29     ` Laurent Pinchart

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