diff mbox

[3/3] Documentation: add Actions S900 clock bindings

Message ID 1509479663-8985-4-git-send-email-manivannan.sadhasivam@linaro.org (mailing list archive)
State Changes Requested, archived
Headers show

Commit Message

Manivannan Sadhasivam Oct. 31, 2017, 7:54 p.m. UTC
This patch adds clock bindings for Actions Semi S900 SoC.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
---
 .../bindings/clock/actions,s900-clock.txt          | 47 ++++++++++++++++++++++
 1 file changed, 47 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/clock/actions,s900-clock.txt

Comments

Rob Herring (Arm) Nov. 2, 2017, 12:04 a.m. UTC | #1
On Wed, Nov 01, 2017 at 01:24:23AM +0530, Manivannan Sadhasivam wrote:
> This patch adds clock bindings for Actions Semi S900 SoC.

"dt-bindings: clock: " for the subject.

This patch should come before the dts and driver changes.

> 
> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> ---
>  .../bindings/clock/actions,s900-clock.txt          | 47 ++++++++++++++++++++++
>  1 file changed, 47 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/clock/actions,s900-clock.txt
> 
> diff --git a/Documentation/devicetree/bindings/clock/actions,s900-clock.txt b/Documentation/devicetree/bindings/clock/actions,s900-clock.txt
> new file mode 100644
> index 0000000..951d6ad
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/clock/actions,s900-clock.txt
> @@ -0,0 +1,47 @@
> +* Actions s900 Clock Controller
> +
> +The Actions s900 clock controller generates and supplies clock to various
> +controllers within the SoC. The clock binding described here is applicable to
> +s900 SoC.
> +
> +Required Properties:
> +
> +- compatible: should be "actions,s900-clock"
> +- reg: physical base address of the controller and length of memory mapped
> +  region.
> +- #clock-cells: should be 1.
> +
> +Each clock is assigned an identifier and client nodes can use this identifier
> +to specify the clock which they consume.
> +
> +All available clocks are defined as preprocessor macros in
> +dt-bindings/clock/actions,s900-clock.h header and can be used in device
> +tree sources.
> +
> +External clocks:
> +
> +The hosc clock used as input for the plls is generated outside the SoC. It is
> +expected that it is defined using standard clock bindings as "hosc".
> +
> +Actions s900 Clock Controller also require two more clocks:
> + - "losc" - internal low frequency oscillator
> + - "diff_24M" - internal differential 24MHz clock
> +
> +Example: Clock controller node:
> +
> +        clock: clock-controller@e0160000 {
> +		compatible = "actions,s900-clock";
> +		reg = <0 0xe0160000 0 0x1000>;
> +		#clock-cells = <1>;
> +	};
> +
> +Example: UART controller node that consumes clock generated by the clock
> +controller:
> +
> +	serial5: uart@e012a000 {

serial@...

> +		compatible = "actions,s900-uart", "actions,owl-uart";
> +		reg = <0x0 0xe012a000 0x0 0x2000>;
> +		interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
> +		clocks = <&clock CLK_UART5>;
> +		clock-names = "uart";
> +	};
> -- 
> 2.7.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
Manivannan Sadhasivam Nov. 2, 2017, 6:47 p.m. UTC | #2
On Wed, Nov 01, 2017 at 07:04:48PM -0500, Rob Herring wrote:
> On Wed, Nov 01, 2017 at 01:24:23AM +0530, Manivannan Sadhasivam wrote:
> > This patch adds clock bindings for Actions Semi S900 SoC.
> 
> "dt-bindings: clock: " for the subject.
> 
> This patch should come before the dts and driver changes.
>
Ack. Will incorporate in next revision.

Thanks,
Mani 
> > 
> > Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> > ---
> >  .../bindings/clock/actions,s900-clock.txt          | 47 ++++++++++++++++++++++
> >  1 file changed, 47 insertions(+)
> >  create mode 100644 Documentation/devicetree/bindings/clock/actions,s900-clock.txt
> > 
> > diff --git a/Documentation/devicetree/bindings/clock/actions,s900-clock.txt b/Documentation/devicetree/bindings/clock/actions,s900-clock.txt
> > new file mode 100644
> > index 0000000..951d6ad
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/clock/actions,s900-clock.txt
> > @@ -0,0 +1,47 @@
> > +* Actions s900 Clock Controller
> > +
> > +The Actions s900 clock controller generates and supplies clock to various
> > +controllers within the SoC. The clock binding described here is applicable to
> > +s900 SoC.
> > +
> > +Required Properties:
> > +
> > +- compatible: should be "actions,s900-clock"
> > +- reg: physical base address of the controller and length of memory mapped
> > +  region.
> > +- #clock-cells: should be 1.
> > +
> > +Each clock is assigned an identifier and client nodes can use this identifier
> > +to specify the clock which they consume.
> > +
> > +All available clocks are defined as preprocessor macros in
> > +dt-bindings/clock/actions,s900-clock.h header and can be used in device
> > +tree sources.
> > +
> > +External clocks:
> > +
> > +The hosc clock used as input for the plls is generated outside the SoC. It is
> > +expected that it is defined using standard clock bindings as "hosc".
> > +
> > +Actions s900 Clock Controller also require two more clocks:
> > + - "losc" - internal low frequency oscillator
> > + - "diff_24M" - internal differential 24MHz clock
> > +
> > +Example: Clock controller node:
> > +
> > +        clock: clock-controller@e0160000 {
> > +		compatible = "actions,s900-clock";
> > +		reg = <0 0xe0160000 0 0x1000>;
> > +		#clock-cells = <1>;
> > +	};
> > +
> > +Example: UART controller node that consumes clock generated by the clock
> > +controller:
> > +
> > +	serial5: uart@e012a000 {
> 
> serial@...
> 
> > +		compatible = "actions,s900-uart", "actions,owl-uart";
> > +		reg = <0x0 0xe012a000 0x0 0x2000>;
> > +		interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
> > +		clocks = <&clock CLK_UART5>;
> > +		clock-names = "uart";
> > +	};
> > -- 
> > 2.7.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
Andreas Färber Nov. 4, 2017, 8:55 a.m. UTC | #3
Am 01.11.2017 um 03:54 schrieb Manivannan Sadhasivam:
> This patch adds clock bindings for Actions Semi S900 SoC.

"This patch"

> 
> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> ---
>  .../bindings/clock/actions,s900-clock.txt          | 47 ++++++++++++++++++++++
>  1 file changed, 47 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/clock/actions,s900-clock.txt
> 
> diff --git a/Documentation/devicetree/bindings/clock/actions,s900-clock.txt b/Documentation/devicetree/bindings/clock/actions,s900-clock.txt
> new file mode 100644
> index 0000000..951d6ad
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/clock/actions,s900-clock.txt
> @@ -0,0 +1,47 @@
> +* Actions s900 Clock Controller

Please consistently spell it S900 here and below - it looks especially
odd when you upper-case all other words.

> +
> +The Actions s900 clock controller generates and supplies clock to various
> +controllers within the SoC. The clock binding described here is applicable to
> +s900 SoC.
> +
> +Required Properties:
> +
> +- compatible: should be "actions,s900-clock"

What about "actions,s900-cmu" as in Clock Management Unit? (manual
version 1.0 section 1.5, page 6)

> +- reg: physical base address of the controller and length of memory mapped
> +  region.
> +- #clock-cells: should be 1.
> +
> +Each clock is assigned an identifier and client nodes can use this identifier

", and"?

> +to specify the clock which they consume.
> +
> +All available clocks are defined as preprocessor macros in
> +dt-bindings/clock/actions,s900-clock.h header and can be used in device
> +tree sources.

As Rob pointed out, missing here.

> +
> +External clocks:
> +
> +The hosc clock used as input for the plls is generated outside the SoC. It is
> +expected that it is defined using standard clock bindings as "hosc".
> +
> +Actions s900 Clock Controller also require two more clocks:
> + - "losc" - internal low frequency oscillator
> + - "diff_24M" - internal differential 24MHz clock
> +
> +Example: Clock controller node:
> +
> +        clock: clock-controller@e0160000 {
> +		compatible = "actions,s900-clock";
> +		reg = <0 0xe0160000 0 0x1000>;
> +		#clock-cells = <1>;
> +	};

Spaces vs. tab indentation.

Regarding the question in the dts patch, I think cmu would be a better
label here and there.

> +
> +Example: UART controller node that consumes clock generated by the clock
> +controller:
> +
> +	serial5: uart@e012a000 {
> +		compatible = "actions,s900-uart", "actions,owl-uart";
> +		reg = <0x0 0xe012a000 0x0 0x2000>;
> +		interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
> +		clocks = <&clock CLK_UART5>;
> +		clock-names = "uart";

Better not use a clock name here that is not defined in the uart binding.

> +	};

Regards,
Andreas
Manivannan Sadhasivam Nov. 4, 2017, 9:28 a.m. UTC | #4
On Wed, Nov 01, 2017 at 07:04:48PM -0500, Rob Herring wrote:
> On Wed, Nov 01, 2017 at 01:24:23AM +0530, Manivannan Sadhasivam wrote:
> > This patch adds clock bindings for Actions Semi S900 SoC.
> 
> "dt-bindings: clock: " for the subject.
> 
> This patch should come before the dts and driver changes.
>
Sure. Will incorporate in next revision.

Thanks,
Mani 
> > 
> > Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> > ---
> >  .../bindings/clock/actions,s900-clock.txt          | 47 ++++++++++++++++++++++
> >  1 file changed, 47 insertions(+)
> >  create mode 100644 Documentation/devicetree/bindings/clock/actions,s900-clock.txt
> > 
> > diff --git a/Documentation/devicetree/bindings/clock/actions,s900-clock.txt b/Documentation/devicetree/bindings/clock/actions,s900-clock.txt
> > new file mode 100644
> > index 0000000..951d6ad
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/clock/actions,s900-clock.txt
> > @@ -0,0 +1,47 @@
> > +* Actions s900 Clock Controller
> > +
> > +The Actions s900 clock controller generates and supplies clock to various
> > +controllers within the SoC. The clock binding described here is applicable to
> > +s900 SoC.
> > +
> > +Required Properties:
> > +
> > +- compatible: should be "actions,s900-clock"
> > +- reg: physical base address of the controller and length of memory mapped
> > +  region.
> > +- #clock-cells: should be 1.
> > +
> > +Each clock is assigned an identifier and client nodes can use this identifier
> > +to specify the clock which they consume.
> > +
> > +All available clocks are defined as preprocessor macros in
> > +dt-bindings/clock/actions,s900-clock.h header and can be used in device
> > +tree sources.
> > +
> > +External clocks:
> > +
> > +The hosc clock used as input for the plls is generated outside the SoC. It is
> > +expected that it is defined using standard clock bindings as "hosc".
> > +
> > +Actions s900 Clock Controller also require two more clocks:
> > + - "losc" - internal low frequency oscillator
> > + - "diff_24M" - internal differential 24MHz clock
> > +
> > +Example: Clock controller node:
> > +
> > +        clock: clock-controller@e0160000 {
> > +		compatible = "actions,s900-clock";
> > +		reg = <0 0xe0160000 0 0x1000>;
> > +		#clock-cells = <1>;
> > +	};
> > +
> > +Example: UART controller node that consumes clock generated by the clock
> > +controller:
> > +
> > +	serial5: uart@e012a000 {
> 
> serial@...
> 
> > +		compatible = "actions,s900-uart", "actions,owl-uart";
> > +		reg = <0x0 0xe012a000 0x0 0x2000>;
> > +		interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
> > +		clocks = <&clock CLK_UART5>;
> > +		clock-names = "uart";
> > +	};
> > -- 
> > 2.7.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
Manivannan Sadhasivam Nov. 4, 2017, 9:41 a.m. UTC | #5
Hi Andreas,
On Sat, Nov 04, 2017 at 04:55:04PM +0800, Andreas Färber wrote:
> Am 01.11.2017 um 03:54 schrieb Manivannan Sadhasivam:
> > This patch adds clock bindings for Actions Semi S900 SoC.
> 
> "This patch"
>
Ack. 
> > 
> > Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> > ---
> >  .../bindings/clock/actions,s900-clock.txt          | 47 ++++++++++++++++++++++
> >  1 file changed, 47 insertions(+)
> >  create mode 100644 Documentation/devicetree/bindings/clock/actions,s900-clock.txt
> > 
> > diff --git a/Documentation/devicetree/bindings/clock/actions,s900-clock.txt b/Documentation/devicetree/bindings/clock/actions,s900-clock.txt
> > new file mode 100644
> > index 0000000..951d6ad
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/clock/actions,s900-clock.txt
> > @@ -0,0 +1,47 @@
> > +* Actions s900 Clock Controller
> 
> Please consistently spell it S900 here and below - it looks especially
> odd when you upper-case all other words.
> 
Ack.
> > +
> > +The Actions s900 clock controller generates and supplies clock to various
> > +controllers within the SoC. The clock binding described here is applicable to
> > +s900 SoC.
> > +
> > +Required Properties:
> > +
> > +- compatible: should be "actions,s900-clock"
> 
> What about "actions,s900-cmu" as in Clock Management Unit? (manual
> version 1.0 section 1.5, page 6)
> 
"cmu" makes sense, will change it.
> > +- reg: physical base address of the controller and length of memory mapped
> > +  region.
> > +- #clock-cells: should be 1.
> > +
> > +Each clock is assigned an identifier and client nodes can use this identifier
> 
> ", and"?
> 
Ack.
> > +to specify the clock which they consume.
> > +
> > +All available clocks are defined as preprocessor macros in
> > +dt-bindings/clock/actions,s900-clock.h header and can be used in device
> > +tree sources.
> 
> As Rob pointed out, missing here.
> 
Will add this header to dt-bindings patch in next revision.
> > +
> > +External clocks:
> > +
> > +The hosc clock used as input for the plls is generated outside the SoC. It is
> > +expected that it is defined using standard clock bindings as "hosc".
> > +
> > +Actions s900 Clock Controller also require two more clocks:
> > + - "losc" - internal low frequency oscillator
> > + - "diff_24M" - internal differential 24MHz clock
> > +
> > +Example: Clock controller node:
> > +
> > +        clock: clock-controller@e0160000 {
> > +		compatible = "actions,s900-clock";
> > +		reg = <0 0xe0160000 0 0x1000>;
> > +		#clock-cells = <1>;
> > +	};
> 
> Spaces vs. tab indentation.
> 
Ack.
> Regarding the question in the dts patch, I think cmu would be a better
> label here and there.
> 
Yeah. Will use cmu.
> > +
> > +Example: UART controller node that consumes clock generated by the clock
> > +controller:
> > +
> > +	serial5: uart@e012a000 {
> > +		compatible = "actions,s900-uart", "actions,owl-uart";
> > +		reg = <0x0 0xe012a000 0x0 0x2000>;
> > +		interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
> > +		clocks = <&clock CLK_UART5>;
> > +		clock-names = "uart";
> 
> Better not use a clock name here that is not defined in the uart binding.
> 
Agree.

Thanks,
Mani
> > +	};
> 
> Regards,
> Andreas
> 
> -- 
> SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
> GF: Felix Imendörffer, Jane Smithard, Graham Norton
> HRB 21284 (AG Nürnberg)
--
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/actions,s900-clock.txt b/Documentation/devicetree/bindings/clock/actions,s900-clock.txt
new file mode 100644
index 0000000..951d6ad
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/actions,s900-clock.txt
@@ -0,0 +1,47 @@ 
+* Actions s900 Clock Controller
+
+The Actions s900 clock controller generates and supplies clock to various
+controllers within the SoC. The clock binding described here is applicable to
+s900 SoC.
+
+Required Properties:
+
+- compatible: should be "actions,s900-clock"
+- reg: physical base address of the controller and length of memory mapped
+  region.
+- #clock-cells: should be 1.
+
+Each clock is assigned an identifier and client nodes can use this identifier
+to specify the clock which they consume.
+
+All available clocks are defined as preprocessor macros in
+dt-bindings/clock/actions,s900-clock.h header and can be used in device
+tree sources.
+
+External clocks:
+
+The hosc clock used as input for the plls is generated outside the SoC. It is
+expected that it is defined using standard clock bindings as "hosc".
+
+Actions s900 Clock Controller also require two more clocks:
+ - "losc" - internal low frequency oscillator
+ - "diff_24M" - internal differential 24MHz clock
+
+Example: Clock controller node:
+
+        clock: clock-controller@e0160000 {
+		compatible = "actions,s900-clock";
+		reg = <0 0xe0160000 0 0x1000>;
+		#clock-cells = <1>;
+	};
+
+Example: UART controller node that consumes clock generated by the clock
+controller:
+
+	serial5: uart@e012a000 {
+		compatible = "actions,s900-uart", "actions,owl-uart";
+		reg = <0x0 0xe012a000 0x0 0x2000>;
+		interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&clock CLK_UART5>;
+		clock-names = "uart";
+	};