diff mbox

[3/5] clk: max77686: Add DT binding details for PMIC MAX77620

Message ID 1466000018-16784-4-git-send-email-ldewangan@nvidia.com (mailing list archive)
State Superseded
Headers show

Commit Message

Laxman Dewangan June 15, 2016, 2:13 p.m. UTC
Maxim has used the same clock IP on multiple PMICs like
MAX77686, MAX77802, MAX77620. Only differences are the
number of clocks from these PMICs.

Add clock binding details and example for the max77620 in
maxim,max77686.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
CC: Krzysztof Kozlowski <k.kozlowski@samsung.com>
CC: Javier Martinez Canillas <javier@dowhile0.org>
---
 .../devicetree/bindings/clock/maxim,max77686.txt   | 38 +++++++++++++++++++---
 include/dt-bindings/mfd/max77620.h                 |  4 +++
 2 files changed, 38 insertions(+), 4 deletions(-)

Comments

Javier Martinez Canillas June 15, 2016, 3:24 p.m. UTC | #1
Hello Laxman,

On 06/15/2016 10:13 AM, Laxman Dewangan wrote:
> Maxim has used the same clock IP on multiple PMICs like
> MAX77686, MAX77802, MAX77620. Only differences are the
> number of clocks from these PMICs.
> 
> Add clock binding details and example for the max77620 in
> maxim,max77686.
> 
> Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
> CC: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> CC: Javier Martinez Canillas <javier@dowhile0.org>
> ---
>  .../devicetree/bindings/clock/maxim,max77686.txt   | 38 +++++++++++++++++++---
>  include/dt-bindings/mfd/max77620.h                 |  4 +++

[snip]

> +		};
> diff --git a/include/dt-bindings/mfd/max77620.h b/include/dt-bindings/mfd/max77620.h
> index b911a07..e1bd08c 100644
> --- a/include/dt-bindings/mfd/max77620.h
> +++ b/include/dt-bindings/mfd/max77620.h
> @@ -36,4 +36,8 @@
>  #define MAX77620_FPS_SRC_NONE			3
>  #define MAX77620_FPS_SRC_DEF			4
>  
> +/* MAX77686 clocks */
> +#define MAX77620_CLKS_NUM			1
> +#define MAX77620_CLK_32K_OUT0			0
> +
>  #endif
> 

The clocks for the other Maxim PMICs define their clocks in the clock subdir
instead, so I wonder if include/dt-bindings/clock/maxim,max77620.h wouldn't
be better for consistency?

Best regards,
Krzysztof Kozlowski June 16, 2016, 9:49 a.m. UTC | #2
On 06/15/2016 04:13 PM, Laxman Dewangan wrote:
> Maxim has used the same clock IP on multiple PMICs like
> MAX77686, MAX77802, MAX77620. Only differences are the
> number of clocks from these PMICs.
> 
> Add clock binding details and example for the max77620 in
> maxim,max77686.
> 
> Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
> CC: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> CC: Javier Martinez Canillas <javier@dowhile0.org>
> ---
>  .../devicetree/bindings/clock/maxim,max77686.txt   | 38 +++++++++++++++++++---
>  include/dt-bindings/mfd/max77620.h                 |  4 +++
>  2 files changed, 38 insertions(+), 4 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/clock/maxim,max77686.txt b/Documentation/devicetree/bindings/clock/maxim,max77686.txt
> index 354e5ab..24deb19 100644
> --- a/Documentation/devicetree/bindings/clock/maxim,max77686.txt
> +++ b/Documentation/devicetree/bindings/clock/maxim,max77686.txt
> @@ -1,8 +1,11 @@
> -Binding for Maxim MAX77686/MAX77802 32k clock generator block
> +Binding for Maxim MAX77686/MAX77802/MAX77620 32k clock generator block
>  
> -This is a part of device tree bindings of MAX77686/MAX77802 multi-function
> -device. More information can be found in bindings/mfd/max77686.txt file for
> -MAX77686 and bindings/mfd/max77802.txt for MAX77802.
> +This is a part of device tree bindings of MAX77686/MAX77802/MAX77620
> +multi-function device. More information can be found in MFD DT binding
> +doc as follows:
> +	bindings/mfd/max77686.txt for MAX77686 and
> +	bindings/mfd/max77802.txt for MAX77802 and
> +	bindings/mfd/max77620.txt for MAX77620.
>  
>  The MAX77686 contains three 32.768khz clock outputs that can be controlled
>  (gated/ungated) over I2C.
> @@ -10,6 +13,9 @@ The MAX77686 contains three 32.768khz clock outputs that can be controlled
>  The MAX77802 contains two 32.768khz clock outputs that can be controlled
>  (gated/ungated) over I2C.
>  
> +The MAX77686 contains one 32.768khz clock outputs that can be controlled
> +(gated/ungated) over I2C.
> +
>  Following properties should be presend in main device node of the MFD chip.

Please update the information about allowed IDs.

>  
>  Required properties:
> @@ -82,3 +88,27 @@ Example:
>  			clock-names = "my-clock";
>  			clocks = <&max77802 MAX77802_CLK_32K_AP>;
>  		};
> +
> +
> +3. With MAX77620:
> +
> +#include <dt-bindings/mfd/max77620.h>
> +:::

Same as before: ':::'

> +
> +	Node of the MFD chip
> +		max77620: max77620@3c {
> +			compatible = "maxim,max77620";
> +			reg = <0x3c>;
> +			:::
> +			#clock-cells = <1>;
> +			:::
> +		};
> +
> +	Clock consumer node
> +
> +		foo@0 {
> +			compatible = "bar,foo";
> +			/* ... */
> +			clock-names = "my-clock";
> +			clocks = <&max77620 MAX77620_CLK_32K_OUT0>;
> +		};
> diff --git a/include/dt-bindings/mfd/max77620.h b/include/dt-bindings/mfd/max77620.h
> index b911a07..e1bd08c 100644
> --- a/include/dt-bindings/mfd/max77620.h
> +++ b/include/dt-bindings/mfd/max77620.h
> @@ -36,4 +36,8 @@
>  #define MAX77620_FPS_SRC_NONE			3
>  #define MAX77620_FPS_SRC_DEF			4
>  
> +/* MAX77686 clocks */

copy&paste error.

> +#define MAX77620_CLKS_NUM			1
> +#define MAX77620_CLK_32K_OUT0			0

First clk ID, then NUM.

Best regards,
Krzysztof


> +
>  #endif
> 

--
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/maxim,max77686.txt b/Documentation/devicetree/bindings/clock/maxim,max77686.txt
index 354e5ab..24deb19 100644
--- a/Documentation/devicetree/bindings/clock/maxim,max77686.txt
+++ b/Documentation/devicetree/bindings/clock/maxim,max77686.txt
@@ -1,8 +1,11 @@ 
-Binding for Maxim MAX77686/MAX77802 32k clock generator block
+Binding for Maxim MAX77686/MAX77802/MAX77620 32k clock generator block
 
-This is a part of device tree bindings of MAX77686/MAX77802 multi-function
-device. More information can be found in bindings/mfd/max77686.txt file for
-MAX77686 and bindings/mfd/max77802.txt for MAX77802.
+This is a part of device tree bindings of MAX77686/MAX77802/MAX77620
+multi-function device. More information can be found in MFD DT binding
+doc as follows:
+	bindings/mfd/max77686.txt for MAX77686 and
+	bindings/mfd/max77802.txt for MAX77802 and
+	bindings/mfd/max77620.txt for MAX77620.
 
 The MAX77686 contains three 32.768khz clock outputs that can be controlled
 (gated/ungated) over I2C.
@@ -10,6 +13,9 @@  The MAX77686 contains three 32.768khz clock outputs that can be controlled
 The MAX77802 contains two 32.768khz clock outputs that can be controlled
 (gated/ungated) over I2C.
 
+The MAX77686 contains one 32.768khz clock outputs that can be controlled
+(gated/ungated) over I2C.
+
 Following properties should be presend in main device node of the MFD chip.
 
 Required properties:
@@ -82,3 +88,27 @@  Example:
 			clock-names = "my-clock";
 			clocks = <&max77802 MAX77802_CLK_32K_AP>;
 		};
+
+
+3. With MAX77620:
+
+#include <dt-bindings/mfd/max77620.h>
+:::
+
+	Node of the MFD chip
+		max77620: max77620@3c {
+			compatible = "maxim,max77620";
+			reg = <0x3c>;
+			:::
+			#clock-cells = <1>;
+			:::
+		};
+
+	Clock consumer node
+
+		foo@0 {
+			compatible = "bar,foo";
+			/* ... */
+			clock-names = "my-clock";
+			clocks = <&max77620 MAX77620_CLK_32K_OUT0>;
+		};
diff --git a/include/dt-bindings/mfd/max77620.h b/include/dt-bindings/mfd/max77620.h
index b911a07..e1bd08c 100644
--- a/include/dt-bindings/mfd/max77620.h
+++ b/include/dt-bindings/mfd/max77620.h
@@ -36,4 +36,8 @@ 
 #define MAX77620_FPS_SRC_NONE			3
 #define MAX77620_FPS_SRC_DEF			4
 
+/* MAX77686 clocks */
+#define MAX77620_CLKS_NUM			1
+#define MAX77620_CLK_32K_OUT0			0
+
 #endif