From patchwork Mon Dec 28 01:15:14 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 7924351 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id D8D179F32E for ; Mon, 28 Dec 2015 01:18:04 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C21842026D for ; Mon, 28 Dec 2015 01:18:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 83FD72024C for ; Mon, 28 Dec 2015 01:18:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751464AbbL1BR7 (ORCPT ); Sun, 27 Dec 2015 20:17:59 -0500 Received: from mailout1.w1.samsung.com ([210.118.77.11]:38411 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751163AbbL1BPn (ORCPT ); Sun, 27 Dec 2015 20:15:43 -0500 Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244]) by mailout1.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0O010022JNI4EW10@mailout1.w1.samsung.com>; Mon, 28 Dec 2015 01:15:40 +0000 (GMT) X-AuditID: cbfec7f4-f79026d00000418a-38-56808d3b5ddf Received: from eusync2.samsung.com ( [203.254.199.212]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id AC.19.16778.B3D80865; Mon, 28 Dec 2015 01:15:39 +0000 (GMT) Received: from localhost.localdomain ([10.113.63.52]) by eusync2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0O0100E1ANHGEV10@eusync2.samsung.com>; Mon, 28 Dec 2015 01:15:39 +0000 (GMT) From: Krzysztof Kozlowski To: Sangbeom Kim , Krzysztof Kozlowski , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Lee Jones , Mark Brown , Alim Akhtar , linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org, devicetree@vger.kernel.org, Liam Girdwood , Michael Turquette , Stephen Boyd , linux-clk@vger.kernel.org Subject: [PATCH v2 3/3] dt-bindings: regulator/mfd: Reorganize S2MPA01 bindings Date: Mon, 28 Dec 2015 10:15:14 +0900 Message-id: <1451265314-4232-4-git-send-email-k.kozlowski@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1451265314-4232-1-git-send-email-k.kozlowski@samsung.com> References: <1451265314-4232-1-git-send-email-k.kozlowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrNLMWRmVeSWpSXmKPExsVy+t/xK7rWvQ1hBhPX61o8mLeNzWLqwyds FvOPnGO16H+zkNXi3KuVjBavXxha3P96lNHi25UOJouPPfdYLS7vmsNmMeP8PiaLpdcvMllc POVqMWH6WhaL1r1H2C0urvjCZPHjTDeLg6DHmnlrGD3e32hl97jc18vksXPWXXaPlcu/sHls WtXJ5nHn2h42j74tqxg9Pm+SC+CM4rJJSc3JLEst0rdL4Mq49+E7U8E9w4o1HxqYGhinaHYx cnJICJhIbH3+jhXCFpO4cG89WxcjF4eQwFJGicaW9WAJIYH/jBItbbogNpuAscTm5UvAikQE frNIfLt0jQUkISzgLzHn6BxmEJtFQFXi9LO3YHFeATeJma++MENskJM4eWwy0FAODk4Bd4n/ pzgg5rtJfLg0jWkCI88CRoZVjKKppckFxUnpuYZ6xYm5xaV56XrJ+bmbGCFB/GUH4+JjVocY BTgYlXh4DRoawoRYE8uKK3MPMUpwMCuJ8K6JBgrxpiRWVqUW5ccXleakFh9ilOZgURLnnbvr fYiQQHpiSWp2ampBahFMlomDU6qBcVGikZm+3rfjTSJSvSnbukM//Hp/NqT6TM/UPCmRWwwi s17esJM2+t+i39joct9VSeeQzGbt1clPX6h9VO6dumrJptNez2otlJNu+EjWlcwMVM94Y78s 4KzlhpDjQRcOt564kLPx9Ob2qKyyzxkRByYJTbmwZ/ej2QrLF+aWdb+qlVi+JF9xvhJLcUai oRZzUXEiABLQpnZeAgAA Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The mfd/s2mpa01.txt duplicates some of the information about bindings with old mfd/s2mps11.txt. Now common part exists entirely in mfd/samsung,sec-core.txt so: - add company prefix to file name (regulator/samsung,s2mpa01.txt), - remove duplicated information, - reorganize the contents to match style of regulator/samsung,s2mps11.txt. Signed-off-by: Krzysztof Kozlowski Acked-by: Mark Brown Acked-by: Rob Herring Acked-by: Lee Jones --- Changes since v1: 1. Added accumulated acks. 2. Use -M20% so renames will be more visible (formatting is changed so default -M50% does not consider it as renames). --- .../devicetree/bindings/mfd/samsung,sec-core.txt | 4 +- .../s2mpa01.txt => regulator/samsung,s2mpa01.txt} | 69 +++++++++------------- 2 files changed, 32 insertions(+), 41 deletions(-) rename Documentation/devicetree/bindings/{mfd/s2mpa01.txt => regulator/samsung,s2mpa01.txt} (37%) diff --git a/Documentation/devicetree/bindings/mfd/samsung,sec-core.txt b/Documentation/devicetree/bindings/mfd/samsung,sec-core.txt index 4aeb95c82304..cdd079bfc287 100644 --- a/Documentation/devicetree/bindings/mfd/samsung,sec-core.txt +++ b/Documentation/devicetree/bindings/mfd/samsung,sec-core.txt @@ -4,7 +4,7 @@ Binding for Samsung S2M and S5M family multi-function device This is a part of device tree bindings for S2M and S5M family multi-function devices. -The Samsung S2MPS11/13/14/15, S2MPU02 and S5M8767 is a family +The Samsung S2MPA01, S2MPS11/13/14/15, S2MPU02 and S5M8767 is a family of multi-function devices which include voltage and current regulators, RTC, charger controller, clock outputs and other sub-blocks. It is interfaced to the host controller using an I2C interface. Each sub-block is usually @@ -13,6 +13,7 @@ addressed by the host system using different I2C slave addresses. This document describes bindings for main device node. Optional sub-blocks must be a sub-nodes to it. Bindings for them can be found in: + - bindings/regulator/samsung,s2mpa01.txt - bindings/regulator/samsung,s2mps11.txt - bindings/regulator/samsung,s5m8767.txt - bindings/clock/samsung,s2mps11.txt @@ -20,6 +21,7 @@ must be a sub-nodes to it. Bindings for them can be found in: Required properties: - compatible: Should be one of the following + - "samsung,s2mpa01-pmic", - "samsung,s2mps11-pmic", - "samsung,s2mps13-pmic", - "samsung,s2mps14-pmic", diff --git a/Documentation/devicetree/bindings/mfd/s2mpa01.txt b/Documentation/devicetree/bindings/regulator/samsung,s2mpa01.txt similarity index 37% rename from Documentation/devicetree/bindings/mfd/s2mpa01.txt rename to Documentation/devicetree/bindings/regulator/samsung,s2mpa01.txt index c13d3d8c3947..bae3c7f838cf 100644 --- a/Documentation/devicetree/bindings/mfd/s2mpa01.txt +++ b/Documentation/devicetree/bindings/regulator/samsung,s2mpa01.txt @@ -1,54 +1,43 @@ +Binding for Samsung S2MPA01 regulator block +=========================================== -* Samsung S2MPA01 Voltage and Current Regulator +This is a part of device tree bindings for S2M family multi-function devices. +More information can be found in bindings/mfd/sec-core.txt file. -The Samsung S2MPA01 is a multi-function device which includes high -efficiency buck converters including Dual-Phase buck converter, various LDOs, -and an RTC. It is interfaced to the host controller using an I2C interface. -Each sub-block is addressed by the host system using different I2C slave -addresses. +The S2MPA01 device provide buck and LDO regulators. -Required properties: -- compatible: Should be "samsung,s2mpa01-pmic". -- reg: Specifies the I2C slave address of the PMIC block. It should be 0x66. +To register these with regulator framework instantiate under main device node +a sub-node named "regulators" with more sub-nodes for each regulator using the +common regulator binding documented in: + - Documentation/devicetree/bindings/regulator/regulator.txt -Optional properties: -- interrupt-parent: Specifies the phandle of the interrupt controller to which - the interrupts from s2mpa01 are delivered to. -- interrupts: An interrupt specifier for the sole interrupt generated by the - device. - -Optional nodes: -- regulators: The regulators of s2mpa01 that have to be instantiated should be - included in a sub-node named 'regulators'. Regulator nodes and constraints - included in this sub-node use the standard regulator bindings which are - documented elsewhere. - -Properties for BUCK regulator nodes: -- regulator-ramp-delay: ramp delay in uV/us. May be 6250, 12500 - (default), 25000, or 50000. May be 0 for disabling the ramp delay on - BUCK{1,2,3,4}. - - In the absence of the regulator-ramp-delay property, the default ramp - delay will be used. - - NOTE: Some BUCKs share the ramp rate setting i.e. same ramp value will be set - for a particular group of BUCKs. So provide same regulator-ramp-delay=. - - The following BUCKs share ramp settings: - * 1 and 6 - * 2 and 4 - * 8, 9, and 10 - -The following are the names of the regulators that the s2mpa01 PMIC block -supports. Note: The 'n' in LDOn and BUCKn represents the LDO or BUCK number -as per the datasheet of s2mpa01. +Names of regulators supported by S2MPA01 device: - LDOn - valid values for n are 1 to 26 - Example: LDO1, LD02, LDO26 - BUCKn - valid values for n are 1 to 10. - Example: BUCK1, BUCK2, BUCK9 +Note: The 'n' in LDOn and BUCKn represents the LDO or BUCK number +as per the datasheet of device. + + +Optional properties of buck regulator nodes under "regulators" sub-node: + - regulator-ramp-delay: ramp delay in uV/us. May be 6250, 12500 + (default), 25000, or 50000. May be 0 for disabling the ramp delay on + BUCK{1,2,3,4}. + + In the absence of the regulator-ramp-delay property, the default ramp + delay will be used. + + Note: Some bucks share the ramp rate setting i.e. same ramp value + will be set for a particular group of bucks so provide the same + regulator-ramp-delay value for them. + Groups sharing ramp rate: + - buck{1,6}, + - buck{2,4}, + - buck{8,9,10}. Example: