From patchwork Mon Nov 7 10:09:32 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pankaj Dubey X-Patchwork-Id: 9414597 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 93B386022E for ; Mon, 7 Nov 2016 10:06:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8521128963 for ; Mon, 7 Nov 2016 10:06:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 79F5028A41; Mon, 7 Nov 2016 10:06:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 28AF728963 for ; Mon, 7 Nov 2016 10:06:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752436AbcKGKGz (ORCPT ); Mon, 7 Nov 2016 05:06:55 -0500 Received: from mailout1.samsung.com ([203.254.224.24]:39282 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751134AbcKGKGy (ORCPT ); Mon, 7 Nov 2016 05:06:54 -0500 Received: from epcpsbgm2new.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OG901JPAO2XHN20@mailout1.samsung.com>; Mon, 07 Nov 2016 19:06:40 +0900 (KST) X-AuditID: cbfee61b-f796f6d000004092-ef-582052305aee Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2new.samsung.com (EPCPMTA) with SMTP id 9A.A8.16530.03250285; Mon, 7 Nov 2016 19:06:40 +0900 (KST) Received: from pankaj.sisodomain.com ([107.108.83.125]) by mmp1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OG90041ZO2UTC50@mmp1.samsung.com>; Mon, 07 Nov 2016 19:06:40 +0900 (KST) From: Pankaj Dubey To: linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: krzk@kernel.org, javier@osg.samsung.com, kgene@kernel.org, thomas.ab@samsung.com, myungjoo.ham@samsung.com, Pankaj Dubey , Michael Turquette , Rob Herring , devicetree@vger.kernel.org, linux-clk@vger.kernel.org Subject: [PATCH 2/6] dt-bindings: clk: max8997: Add DT binding documentation Date: Mon, 07 Nov 2016 15:39:32 +0530 Message-id: <1478513376-14307-3-git-send-email-pankaj.dubey@samsung.com> X-Mailer: git-send-email 2.7.4 In-reply-to: <1478513376-14307-1-git-send-email-pankaj.dubey@samsung.com> References: <1478513376-14307-1-git-send-email-pankaj.dubey@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupkkeLIzCtJLcpLzFFi42I5/e+xgK5BkEKEwbbJmhbzj5xjtXjzdg2T Rf/j18wW589vYLfY9Pgaq8XHnnusFjPO72OyuHjK1eJ24wo2i0Vbv7BbtO49wm7RsYzRgcfj /Y1Wdo9NqzrZPDYvqffY0n+X3aNvyypGj8+b5ALYotxsMlITU1KLFFLzkvNTMvPSbZVCQ9x0 LZQU8hJzU22VInR9Q4KUFMoSc0qBPCMDNODgHOAerKRvl+CWMWnKF6aC3eIV89ZNZG9gvCPc xcjJISFgIrF3wnsWCFtM4sK99WxdjFwcQgJLGSVO9d5jgXB+MkqsP9TOClLFJqAr8eT9XGYQ W0TAW2Lymb/sIEXMAkuZJFY9+gs2SljAR+LmgoVsIDaLgKrE6ubJYDavgIfEoaN32CHWyUnc PNcJNohTwFPi84y1YDVCQDXrtm1gmcDIu4CRYRWjRGpBckFxUnquUV5quV5xYm5xaV66XnJ+ 7iZGcDQ8k97BeHiX+yFGAQ5GJR7eCU4KEUKsiWXFlbmHGCU4mJVEeFn9gEK8KYmVValF+fFF pTmpxYcYTYEOm8gsJZqcD4zUvJJ4QxNzE3NjAwtzS0sTIyVx3sbZz8KFBNITS1KzU1MLUotg +pg4OKUaGNNqXp6Yv/neKVdv+TuaK2w3xR9+fWNu3feMxOMZBj3P3JWXVTAv7kz5wBCSlVPa G/d7nUM6w3IXh/Xvn3FPCmt1PHd98r8p6oEvHlWtDfdlX7ivUyM5Rk7X4MQhO3MRUVtt9ron v5ZlbIww7vpfLf4hpGrbD4/vs/bP87Pv2GXmv4ZX/W//ZCWW4oxEQy3mouJEAEFtOPacAgAA X-MTR: 20000000000000000@CPGS Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add Device Tree binding documentation for the clocks outputs in the Maxim-8997 Power Management IC. CC: Michael Turquette CC: Rob Herring CC: devicetree@vger.kernel.org CC: linux-clk@vger.kernel.org Signed-off-by: Pankaj Dubey Reviewed-by: Javier Martinez Canillas Acked-by: Rob Herring --- .../devicetree/bindings/clock/maxim,max8997.txt | 44 ++++++++++++++++++++++ .../bindings/regulator/max8997-regulator.txt | 3 ++ 2 files changed, 47 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/maxim,max8997.txt diff --git a/Documentation/devicetree/bindings/clock/maxim,max8997.txt b/Documentation/devicetree/bindings/clock/maxim,max8997.txt new file mode 100644 index 0000000..d2e2a74 --- /dev/null +++ b/Documentation/devicetree/bindings/clock/maxim,max8997.txt @@ -0,0 +1,44 @@ +Binding for Maxim MAX8997 32k clock generator block + +This is a part of device tree bindings of MAX8997 multi-function device. +More information can be found in bindings/regulator/max8997-regulator.txt file. + +The MAX8997 contains two 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: + +- #clock-cells: from common clock binding; shall be set to 1. + +Optional properties: +- clock-output-names: From common clock binding. + +Each clock is assigned an identifier and client nodes can use this identifier +to specify the clock which they consume. Following indices are allowed: + - 0: 32khz_ap clock, + - 1: 32khz_cp clock, + +Clocks are defined as preprocessor macros in dt-bindings/clock/maxim,max8997.h +header and can be used in device tree sources. + +Example: Node of the MFD chip + + max8997: max8997_pmic@66 { + compatible = "maxim,max8997-pmic"; + reg = <0x66>; + interrupt-parent = <&gpx0>; + interrupts = <4 0>, <3 0>; + #clock-cells = <1>; + /* ... */ + }; + +Example: Clock consumer node + + foo@0 { + compatible = "bar,foo"; + /* ... */ + clocks = <&max8997 MAX8997_CLK_AP>; + clock-names = "my-clock"; + }; diff --git a/Documentation/devicetree/bindings/regulator/max8997-regulator.txt b/Documentation/devicetree/bindings/regulator/max8997-regulator.txt index 5c186a7..af1f9c0 100644 --- a/Documentation/devicetree/bindings/regulator/max8997-regulator.txt +++ b/Documentation/devicetree/bindings/regulator/max8997-regulator.txt @@ -6,6 +6,9 @@ interfaced to the host controller using a i2c interface. Each sub-block is addressed by the host system using different i2c slave address. This document describes the bindings for 'pmic' sub-block of max8997. +Binding for the built-in 32k clock generator block is defined separately +in bindings/clk/maxim,max8997.txt file + Required properties: - compatible: Should be "maxim,max8997-pmic". - reg: Specifies the i2c slave address of the pmic block. It should be 0x66.