diff mbox

[4/6] clk: tegra: add nvidia,tegra132-ccplex-clk binding

Message ID 1405437890-6468-5-git-send-email-pdeschrijver@nvidia.com
State Superseded, archived
Headers show

Commit Message

Peter De Schrijver July 15, 2014, 3:24 p.m. UTC
Tegra132 has a few new clocks for the CPU complex (ccplex).

Signed-off-by: Peter De Schrijver <pdeschrijver@nvidia.com>
---
 .../bindings/clock/nvidia,tegra132-ccplex-clk.txt  |   27 ++++++++++++++++++++
 include/dt-bindings/clock/tegra132-ccplex.h        |   12 +++++++++
 2 files changed, 39 insertions(+), 0 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/clock/nvidia,tegra132-ccplex-clk.txt
 create mode 100644 include/dt-bindings/clock/tegra132-ccplex.h

Comments

Thierry Reding July 16, 2014, 7:32 a.m. UTC | #1
On Tue, Jul 15, 2014 at 06:24:34PM +0300, Peter De Schrijver wrote:
> Tegra132 has a few new clocks for the CPU complex (ccplex).
> 
> Signed-off-by: Peter De Schrijver <pdeschrijver@nvidia.com>
> ---
>  .../bindings/clock/nvidia,tegra132-ccplex-clk.txt  |   27 ++++++++++++++++++++
>  include/dt-bindings/clock/tegra132-ccplex.h        |   12 +++++++++
>  2 files changed, 39 insertions(+), 0 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/clock/nvidia,tegra132-ccplex-clk.txt
>  create mode 100644 include/dt-bindings/clock/tegra132-ccplex.h
> 
> diff --git a/Documentation/devicetree/bindings/clock/nvidia,tegra132-ccplex-clk.txt b/Documentation/devicetree/bindings/clock/nvidia,tegra132-ccplex-clk.txt
> new file mode 100644
> index 0000000..1441e36
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/clock/nvidia,tegra132-ccplex-clk.txt
> @@ -0,0 +1,27 @@
> +NVIDIA Tegra132 ccplex clocks

Perhaps: "NVIDIA Tegra132 CPU complex (ccplex) clocks". Otherwise this
file doesn't expand the ccplex abbreviation at all and it may not be
obvious to everyone.

> +This binding uses the common clock binding:
> +Documentation/devicetree/bindings/clock/clock-bindings.txt

clock-bindings.txt is in the same directory as this file, so a slightly
better wording would be:

	This binding uses the common clock binding as described in the
	clock-bindings.txt file in this directory.

Note that these absolute paths may not remain the same when the device
tree bindings are moved out of the kernel tree.

> +The Tegra132 ccplex clock module on Tegra132 is the HW module responsible
> +for the ccplex related clocks.

The end repeats the beginning of this sentence, so its information
content is rather low. Maybe the last part of this sentence could be:
"... responsible for the CPU and related clocks".

> diff --git a/include/dt-bindings/clock/tegra132-ccplex.h b/include/dt-bindings/clock/tegra132-ccplex.h
[...]
> +#define TEGRA132_CCPLEX_CCLK_G 1
> +#define TEGRA132_PLL_X 2
> +#define TEGRA132_CCPLEX_CLK_MAX 3

Maybe these should use TEGRA132_CLK_ as prefix for consistency with the
CAR binding?

Thierry
Stephen Warren July 22, 2014, 5:18 p.m. UTC | #2
On 07/15/2014 09:24 AM, Peter De Schrijver wrote:
> Tegra132 has a few new clocks for the CPU complex (ccplex).

> diff --git a/Documentation/devicetree/bindings/clock/nvidia,tegra132-ccplex-clk.txt b/Documentation/devicetree/bindings/clock/nvidia,tegra132-ccplex-clk.txt

> +Example SoC include file:
> +
> +/ {
> +	ccplex-clock@0,70040000 {
> +		compatible = "nvidia,tegra132-ccplex-clk";
> +		reg = <0x0 0x70040000 0x0 0x1000>;
> +		status = "okay";

That's the default, so it's not worth including that property.

--
To unsubscribe from this list: send the line "unsubscribe devicetree" 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/nvidia,tegra132-ccplex-clk.txt b/Documentation/devicetree/bindings/clock/nvidia,tegra132-ccplex-clk.txt
new file mode 100644
index 0000000..1441e36
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/nvidia,tegra132-ccplex-clk.txt
@@ -0,0 +1,27 @@ 
+NVIDIA Tegra132 ccplex clocks
+
+This binding uses the common clock binding:
+Documentation/devicetree/bindings/clock/clock-bindings.txt
+
+The Tegra132 ccplex clock module on Tegra132 is the HW module responsible
+for the ccplex related clocks.
+
+Required properties :
+- compatible : Should be "nvidia,tegra132-ccplex-clk"
+- reg : Should contain ccplex clock registers location and length
+- #clock-cells : Should be 1.
+  In clock consumers, this cell represents the clock ID exposed by the
+  ccplex clock module. The assignments may be found in header file
+  <dt-bindings/clock/tegra132-ccplex.h>.
+
+Example SoC include file:
+
+/ {
+	ccplex-clock@0,70040000 {
+		compatible = "nvidia,tegra132-ccplex-clk";
+		reg = <0x0 0x70040000 0x0 0x1000>;
+		status = "okay";
+		#clock-cells = <1>;
+	};
+
+};
diff --git a/include/dt-bindings/clock/tegra132-ccplex.h b/include/dt-bindings/clock/tegra132-ccplex.h
new file mode 100644
index 0000000..58ea190
--- /dev/null
+++ b/include/dt-bindings/clock/tegra132-ccplex.h
@@ -0,0 +1,12 @@ 
+/*
+ * This header provides constants for the binding nvidia,tegra132-ccplex-clk
+ */
+
+#ifndef __DT_BINDINGS_CLOCK_TEGRA132_CCPLEX_H
+#define __DT_BINDINGS_CLOCK_TEGRA132_CCPLEX_H
+
+#define TEGRA132_CCPLEX_CCLK_G 1
+#define TEGRA132_PLL_X 2
+#define TEGRA132_CCPLEX_CLK_MAX 3
+
+#endif