diff mbox

[1/5] dt: bindings: add means to control flags of specific clocks

Message ID 1462463608-22940-2-git-send-email-kernel@martin.sperl.org (mailing list archive)
State Rejected, archived
Delegated to: Stephen Boyd
Headers show

Commit Message

Martin Sperl May 5, 2016, 3:53 p.m. UTC
From: Martin Sperl <kernel@martin.sperl.org>

Add documentation for "brcm,clock-index" and "brcm,clock-flags"
which allows to set flags to enable the use of parent clocks
that may be different from the default.

In the future this may also contain flags that would allow
enabling higher order mash dividers.

Signed-off-by: Martin Sperl <kernel@martin.sperl.org>
---
 .../devicetree/bindings/clock/brcm,bcm2835-cprman.txt      | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

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

Comments

Rob Herring (Arm) May 9, 2016, 7:11 p.m. UTC | #1
On Thu, May 05, 2016 at 03:53:24PM +0000, kernel@martin.sperl.org wrote:
> From: Martin Sperl <kernel@martin.sperl.org>
> 
> Add documentation for "brcm,clock-index" and "brcm,clock-flags"
> which allows to set flags to enable the use of parent clocks
> that may be different from the default.

assigned-clocks provides a way to do this already though that does mean 
exposing all the parents to DT. Does that not work for you?

> In the future this may also contain flags that would allow
> enabling higher order mash dividers.
> 
> Signed-off-by: Martin Sperl <kernel@martin.sperl.org>
> ---
>  .../devicetree/bindings/clock/brcm,bcm2835-cprman.txt      | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/clock/brcm,bcm2835-cprman.txt b/Documentation/devicetree/bindings/clock/brcm,bcm2835-cprman.txt
> index e56a1df..cbcca56 100644
> --- a/Documentation/devicetree/bindings/clock/brcm,bcm2835-cprman.txt
> +++ b/Documentation/devicetree/bindings/clock/brcm,bcm2835-cprman.txt
> @@ -18,6 +18,15 @@ Required properties:
>  - reg:		Specifies base physical address and size of the registers
>  - clocks:	The external oscillator clock phandle
> 
> +Optional properties:
> +- brcm,clock-index: clock id to which the corresponding brcm,clock-flags
> +		      value applies
> +- brcm,clock-flags: flags for the specific clock id given in
> +		      brcm,clock-index - the bits are defined in
> +		      include/dt-bindings/clock/bcm2835.h
> +		      of which the bottom 16 bits are reserved for
> +		      parent clock selection.

These are an array or single value?

I tend to think these should be generic properties or not at all. I'd 
like to hear Mike's and/or Stephen's opinion on it.

Rob
--
To unsubscribe from this list: send the line "unsubscribe linux-clk" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/Documentation/devicetree/bindings/clock/brcm,bcm2835-cprman.txt b/Documentation/devicetree/bindings/clock/brcm,bcm2835-cprman.txt
index e56a1df..cbcca56 100644
--- a/Documentation/devicetree/bindings/clock/brcm,bcm2835-cprman.txt
+++ b/Documentation/devicetree/bindings/clock/brcm,bcm2835-cprman.txt
@@ -18,6 +18,15 @@  Required properties:
 - reg:		Specifies base physical address and size of the registers
 - clocks:	The external oscillator clock phandle

+Optional properties:
+- brcm,clock-index: clock id to which the corresponding brcm,clock-flags
+		      value applies
+- brcm,clock-flags: flags for the specific clock id given in
+		      brcm,clock-index - the bits are defined in
+		      include/dt-bindings/clock/bcm2835.h
+		      of which the bottom 16 bits are reserved for
+		      parent clock selection.
+
 Example:

 	clk_osc: clock@3 {
@@ -33,7 +42,11 @@  Example:
 		#clock-cells = <1>;
 		reg = <0x7e101000 0x2000>;
 		clocks = <&clk_osc>;
+		/* the pcm clock should use the non-standard pllc-per parent */
+		brcm,clock-index = <BCM2835_CLOCK_PCM>;
+		brcm,clock-flags = <((1 <<BCM2835_PER_PARENT_GND)|
+				     (1 <<BCM2835_PER_PARENT_OSC)|
+				     (1 <<BCM2835_PER_PARENT_PLLC))>;
 	};

 	i2c0: i2c@7e205000 {
--