All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] dt-bindings: regulator/clock/mfd: Reorganize S2M/S5M bindings
@ 2015-12-04  1:10 Krzysztof Kozlowski
  2015-12-04  1:10 ` [PATCH 1/3] dt-bindings: regulator/clock/mfd: Reorganize S2MPS-family bindings Krzysztof Kozlowski
                   ` (2 more replies)
  0 siblings, 3 replies; 20+ messages in thread
From: Krzysztof Kozlowski @ 2015-12-04  1:10 UTC (permalink / raw)
  To: Sangbeom Kim, Krzysztof Kozlowski, Rob Herring, Pawel Moll,
	Mark Rutland, Ian Campbell, Kumar Gala, Lee Jones, Kukjin Kim,
	linux-kernel, linux-samsung-soc, devicetree, Michael Turquette,
	Stephen Boyd, Liam Girdwood, Mark Brown
  Cc: linux-clk

Hi,


The patchset tries to bring some order to the chaotic bindings for family
of Samsung PMIC devices: S2MPS/S2MPA/S5M.

Beside of renaming and removal of common parts I also tried to make
a consistent style used in the files. The bindings itself were not
modified.

The patchset should be probably pulled at once (later patches depend on
previous). With respective acks maybe through MFD tree?


Best regards,
Krzysztof

Krzysztof Kozlowski (3):
  dt-bindings: regulator/clock/mfd: Reorganize S2MPS-family bindings
  dt-bindings: regulator/mfd: Reorganize S5M8767 bindings
  dt-bindings: regulator/mfd: Reorganize S2MPA01 bindings

 .../devicetree/bindings/clock/samsung,s2mps11.txt  |  49 +++++++
 Documentation/devicetree/bindings/mfd/s2mpa01.txt  |  90 ------------
 Documentation/devicetree/bindings/mfd/s2mps11.txt  | 153 -------------------
 .../devicetree/bindings/mfd/samsung,sec-core.txt   |  88 +++++++++++
 .../bindings/regulator/s5m8767-regulator.txt       | 163 ---------------------
 .../bindings/regulator/samsung,s2mpa01.txt         |  79 ++++++++++
 .../bindings/regulator/samsung,s2mps11.txt         | 102 +++++++++++++
 .../bindings/regulator/samsung,s5m8767.txt         | 145 ++++++++++++++++++
 MAINTAINERS                                        |   6 +-
 9 files changed, 467 insertions(+), 408 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/clock/samsung,s2mps11.txt
 delete mode 100644 Documentation/devicetree/bindings/mfd/s2mpa01.txt
 delete mode 100644 Documentation/devicetree/bindings/mfd/s2mps11.txt
 create mode 100644 Documentation/devicetree/bindings/mfd/samsung,sec-core.txt
 delete mode 100644 Documentation/devicetree/bindings/regulator/s5m8767-regulator.txt
 create mode 100644 Documentation/devicetree/bindings/regulator/samsung,s2mpa01.txt
 create mode 100644 Documentation/devicetree/bindings/regulator/samsung,s2mps11.txt
 create mode 100644 Documentation/devicetree/bindings/regulator/samsung,s5m8767.txt

-- 
1.9.1


^ permalink raw reply	[flat|nested] 20+ messages in thread

* [PATCH 1/3] dt-bindings: regulator/clock/mfd: Reorganize S2MPS-family bindings
  2015-12-04  1:10 [PATCH 0/3] dt-bindings: regulator/clock/mfd: Reorganize S2M/S5M bindings Krzysztof Kozlowski
@ 2015-12-04  1:10 ` Krzysztof Kozlowski
  2015-12-04 12:06   ` Mark Brown
                     ` (4 more replies)
  2015-12-04  1:10 ` [PATCH 2/3] dt-bindings: regulator/mfd: Reorganize S5M8767 bindings Krzysztof Kozlowski
  2015-12-04  1:10 ` [PATCH 3/3] dt-bindings: regulator/mfd: Reorganize S2MPA01 bindings Krzysztof Kozlowski
  2 siblings, 5 replies; 20+ messages in thread
From: Krzysztof Kozlowski @ 2015-12-04  1:10 UTC (permalink / raw)
  To: Sangbeom Kim, Krzysztof Kozlowski, Rob Herring, Pawel Moll,
	Mark Rutland, Ian Campbell, Kumar Gala, Lee Jones, Kukjin Kim,
	linux-kernel, linux-samsung-soc, devicetree, Michael Turquette,
	Stephen Boyd, Liam Girdwood, Mark Brown
  Cc: linux-clk

Bindings for Samsung S2M and S5M family PMICs are in mess. They are
spread over different files and subdirectories in a non-consistent way.
The devices and respective drivers for them share a lot in common so
everything could be organized in a more readable way.

Reorganize the S2MPS11/13/14/15 Device Tree bindings to match the
drivers for this family of devices:
 - move mfd/s2mps11.txt to mfd/samsung,sec-core.txt for the main MFD
   driver (common for entire family),
 - split clock block to clock/samsung,s2mps11.txt,
 - split regulator block to regulator/samsung,s2mps11.txt.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
---
 .../devicetree/bindings/clock/samsung,s2mps11.txt  |  49 +++++++
 Documentation/devicetree/bindings/mfd/s2mps11.txt  | 153 ---------------------
 .../devicetree/bindings/mfd/samsung,sec-core.txt   |  84 +++++++++++
 .../bindings/regulator/samsung,s2mps11.txt         | 102 ++++++++++++++
 MAINTAINERS                                        |   4 +-
 5 files changed, 238 insertions(+), 154 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/clock/samsung,s2mps11.txt
 delete mode 100644 Documentation/devicetree/bindings/mfd/s2mps11.txt
 create mode 100644 Documentation/devicetree/bindings/mfd/samsung,sec-core.txt
 create mode 100644 Documentation/devicetree/bindings/regulator/samsung,s2mps11.txt

diff --git a/Documentation/devicetree/bindings/clock/samsung,s2mps11.txt b/Documentation/devicetree/bindings/clock/samsung,s2mps11.txt
new file mode 100644
index 000000000000..2726c1d58a79
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/samsung,s2mps11.txt
@@ -0,0 +1,49 @@
+Binding for Samsung S2M and S5M family clock generator block
+============================================================
+
+This is a part of device tree bindings for S2M and S5M family multi-function
+devices.
+More information can be found in bindings/mfd/sec-core.txt file.
+
+The S2MPS11/13/15 and S5M8767 provide three(AP/CP/BT) buffered 32.768 kHz
+outputs. The S2MPS14 provides two (AP/BT) buffered 32.768 KHz outputs.
+
+To register these as clocks with common clock framework instantiate under
+main device node a sub-node named "clocks".
+
+It uses the common clock binding documented in:
+ - Documentation/devicetree/bindings/clock/clock-bindings.txt
+
+
+Required properties of the "clocks" sub-node:
+ - #clock-cells: should be 1.
+ - compatible: Should be one of: "samsung,s2mps11-clk", "samsung,s2mps13-clk",
+               "samsung,s2mps14-clk", "samsung,s5m8767-clk"
+   The S2MPS15 uses the same compatible as S2MPS13, as both provides similar
+   clocks.
+
+
+Each clock is assigned an identifier and client nodes use this identifier
+to specify the clock which they consume.
+    Clock               ID           Devices
+    ----------------------------------------------------------
+    32KhzAP		0            S2MPS11/13/14/15, S5M8767
+    32KhzCP		1            S2MPS11/13/15, S5M8767
+    32KhzBT		2            S2MPS11/13/14/15, S5M8767
+
+Include dt-bindings/clock/samsung,s2mps11.h file to use preprocessor defines
+in device tree sources.
+
+
+Example:
+
+	s2mps11_pmic@66 {
+		compatible = "samsung,s2mps11-pmic";
+		reg = <0x66>;
+
+		s2m_osc: clocks {
+			compatible = "samsung,s2mps11-clk";
+			#clock-cells = <1>;
+			clock-output-names = "xx", "yy", "zz";
+		};
+	};
diff --git a/Documentation/devicetree/bindings/mfd/s2mps11.txt b/Documentation/devicetree/bindings/mfd/s2mps11.txt
deleted file mode 100644
index 09b94c97faac..000000000000
--- a/Documentation/devicetree/bindings/mfd/s2mps11.txt
+++ /dev/null
@@ -1,153 +0,0 @@
-
-* Samsung S2MPS11/13/14/15 and S2MPU02 Voltage and Current Regulator
-
-The Samsung S2MPS11 is a multi-function device which includes voltage and
-current regulators, RTC, charger controller and other sub-blocks. 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.
-
-Required properties:
-- compatible: Should be one of the following
-	- "samsung,s2mps11-pmic"
-	- "samsung,s2mps13-pmic"
-	- "samsung,s2mps14-pmic"
-	- "samsung,s2mps15-pmic"
-	- "samsung,s2mpu02-pmic".
-- reg: Specifies the I2C slave address of the pmic block. It should be 0x66.
-
-Optional properties:
-- interrupt-parent: Specifies the phandle of the interrupt controller to which
-  the interrupts from s2mps11 are delivered to.
-- interrupts: Interrupt specifiers for interrupt sources.
-- samsung,s2mps11-wrstbi-ground: Indicates that WRSTBI pin of PMIC is pulled
-  down. When the system is suspended it will always go down thus triggerring
-  unwanted buck warm reset (setting buck voltages to default values).
-- samsung,s2mps11-acokb-ground: Indicates that ACOKB pin of S2MPS11 PMIC is
-  connected to the ground so the PMIC must manually set PWRHOLD bit in CTRL1
-  register to turn off the power. Usually the ACOKB is pulled up to VBATT so
-  when PWRHOLD pin goes low, the rising ACOKB will trigger power off.
-
-Optional nodes:
-- clocks: s2mps11, s2mps13, s2mps15 and s5m8767 provide three(AP/CP/BT) buffered 32.768
-  KHz outputs, so to register these as clocks with common clock framework
-  instantiate a sub-node named "clocks". It uses the common clock binding
-  documented in :
-  [Documentation/devicetree/bindings/clock/clock-bindings.txt]
-  The s2mps14 provides two (AP/BT) buffered 32.768 KHz outputs.
-  - #clock-cells: should be 1.
-
-  - The following is the list of clocks generated by the controller. Each clock
-    is assigned an identifier and client nodes use this identifier to specify
-    the clock which they consume.
-    Clock               ID           Devices
-    ----------------------------------------------------------
-    32KhzAP		0            S2MPS11, S2MPS13, S2MPS14, S2MPS15, S5M8767
-    32KhzCP		1            S2MPS11, S2MPS13, S2MPS15, S5M8767
-    32KhzBT		2            S2MPS11, S2MPS13, S2MPS14, S2MPS15, S5M8767
-
-  - compatible: Should be one of: "samsung,s2mps11-clk", "samsung,s2mps13-clk",
-		"samsung,s2mps14-clk", "samsung,s5m8767-clk"
-    The s2msp15 uses the same compatible as s2mps13, as both provides similar clocks.
-
-- regulators: The regulators of s2mps11 that have to be instantiated should be
-included in a sub-node named 'regulators'. Regulator nodes included in this
-sub-node should be of the format as listed below.
-
-	regulator_name {
-		[standard regulator constraints....];
-	};
-
- regulator-ramp-delay for BUCKs = [6250/12500/25000(default)/50000] uV/us
-
- BUCK[2/3/4/6] supports disabling ramp delay on hardware, so explicitly
- regulator-ramp-delay = <0> can be used for them to disable ramp delay.
- 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<value>.
-Grouping of BUCKs sharing ramp rate setting is as follow : BUCK[1, 6],
-BUCK[3, 4], and BUCK[7, 8, 10]
-
-On S2MPS14 the LDO10, LDO11 and LDO12 can be configured to external control
-over GPIO. To turn this feature on this property must be added to the regulator
-sub-node:
-	- samsung,ext-control-gpios: GPIO specifier for one GPIO
-		controlling this regulator (enable/disable);
-Example:
-	LDO12 {
-		regulator-name = "V_EMMC_2.8V";
-		regulator-min-microvolt = <2800000>;
-		regulator-max-microvolt = <2800000>;
-		samsung,ext-control-gpios = <&gpk0 2 0>;
-	};
-
-
-The regulator constraints inside the regulator nodes use the standard regulator
-bindings which are documented elsewhere.
-
-The following are the names of the regulators that the s2mps11 pmic block
-supports. Note: The 'n' in LDOn and BUCKn represents the LDO or BUCK number
-as per the datasheet of s2mps11.
-
-	- LDOn
-		  - valid values for n are:
-			- S2MPS11: 1 to 38
-			- S2MPS13: 1 to 40
-			- S2MPS14: 1 to 25
-			- S2MPS15: 1 to 27
-			- S2MPU02: 1 to 28
-		  - Example: LDO1, LDO2, LDO28
-	- BUCKn
-		  - valid values for n are:
-			- S2MPS11: 1 to 10
-			- S2MPS13: 1 to 10
-			- S2MPS14: 1 to 5
-			- S2MPS15: 1 to 10
-			- S2MPU02: 1 to 7
-		  - Example: BUCK1, BUCK2, BUCK9
-
-Example:
-
-	s2mps11_pmic@66 {
-		compatible = "samsung,s2mps11-pmic";
-		reg = <0x66>;
-
-		s2m_osc: clocks {
-			compatible = "samsung,s2mps11-clk";
-			#clock-cells = <1>;
-			clock-output-names = "xx", "yy", "zz";
-		};
-
-		regulators {
-			ldo1_reg: LDO1 {
-				regulator-name = "VDD_ABB_3.3V";
-				regulator-min-microvolt = <3300000>;
-				regulator-max-microvolt = <3300000>;
-			};
-
-			ldo2_reg: LDO2 {
-				regulator-name = "VDD_ALIVE_1.1V";
-				regulator-min-microvolt = <1100000>;
-				regulator-max-microvolt = <1100000>;
-				regulator-always-on;
-			};
-
-			buck1_reg: BUCK1 {
-				regulator-name = "vdd_mif";
-				regulator-min-microvolt = <950000>;
-				regulator-max-microvolt = <1350000>;
-				regulator-always-on;
-				regulator-boot-on;
-			};
-
-			buck2_reg: BUCK2 {
-				regulator-name = "vdd_arm";
-				regulator-min-microvolt = <950000>;
-				regulator-max-microvolt = <1350000>;
-				regulator-always-on;
-				regulator-boot-on;
-				regulator-ramp-delay = <50000>;
-			};
-		};
-	};
diff --git a/Documentation/devicetree/bindings/mfd/samsung,sec-core.txt b/Documentation/devicetree/bindings/mfd/samsung,sec-core.txt
new file mode 100644
index 000000000000..ef0166d0f643
--- /dev/null
+++ b/Documentation/devicetree/bindings/mfd/samsung,sec-core.txt
@@ -0,0 +1,84 @@
+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
+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
+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,s2mps11.txt
+ - bindings/clock/samsung,s2mps11.txt
+
+
+Required properties:
+ - compatible: Should be one of the following
+	- "samsung,s2mps11-pmic",
+	- "samsung,s2mps13-pmic",
+	- "samsung,s2mps14-pmic",
+	- "samsung,s2mps15-pmic",
+	- "samsung,s2mpu02-pmic".
+ - reg: Specifies the I2C slave address of the pmic block. It should be 0x66.
+
+Optional properties:
+ - interrupt-parent: Specifies the phandle of the interrupt controller to which
+   the interrupts from s2mps11 are delivered to.
+ - interrupts: Interrupt specifiers for interrupt sources.
+ - samsung,s2mps11-wrstbi-ground: Indicates that WRSTBI pin of PMIC is pulled
+   down. When the system is suspended it will always go down thus triggerring
+   unwanted buck warm reset (setting buck voltages to default values).
+ - samsung,s2mps11-acokb-ground: Indicates that ACOKB pin of S2MPS11 PMIC is
+   connected to the ground so the PMIC must manually set PWRHOLD bit in CTRL1
+   register to turn off the power. Usually the ACOKB is pulled up to VBATT so
+   when PWRHOLD pin goes low, the rising ACOKB will trigger power off.
+
+Example:
+
+	s2mps11_pmic@66 {
+		compatible = "samsung,s2mps11-pmic";
+		reg = <0x66>;
+
+		s2m_osc: clocks {
+			compatible = "samsung,s2mps11-clk";
+			#clock-cells = <1>;
+			clock-output-names = "xx", "yy", "zz";
+		};
+
+		regulators {
+			ldo1_reg: LDO1 {
+				regulator-name = "VDD_ABB_3.3V";
+				regulator-min-microvolt = <3300000>;
+				regulator-max-microvolt = <3300000>;
+			};
+
+			ldo2_reg: LDO2 {
+				regulator-name = "VDD_ALIVE_1.1V";
+				regulator-min-microvolt = <1100000>;
+				regulator-max-microvolt = <1100000>;
+				regulator-always-on;
+			};
+
+			buck1_reg: BUCK1 {
+				regulator-name = "vdd_mif";
+				regulator-min-microvolt = <950000>;
+				regulator-max-microvolt = <1350000>;
+				regulator-always-on;
+				regulator-boot-on;
+			};
+
+			buck2_reg: BUCK2 {
+				regulator-name = "vdd_arm";
+				regulator-min-microvolt = <950000>;
+				regulator-max-microvolt = <1350000>;
+				regulator-always-on;
+				regulator-boot-on;
+				regulator-ramp-delay = <50000>;
+			};
+		};
+	};
diff --git a/Documentation/devicetree/bindings/regulator/samsung,s2mps11.txt b/Documentation/devicetree/bindings/regulator/samsung,s2mps11.txt
new file mode 100644
index 000000000000..27a48bf1b185
--- /dev/null
+++ b/Documentation/devicetree/bindings/regulator/samsung,s2mps11.txt
@@ -0,0 +1,102 @@
+Binding for Samsung S2M family regulator block
+==============================================
+
+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 S2MPS11/13/14/15 and S2MPU02 devices provide buck and LDO regulators.
+
+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
+
+
+Names of regulators supported by different devices:
+	- LDOn
+		  - valid values for n are:
+			- S2MPS11: 1 to 38
+			- S2MPS13: 1 to 40
+			- S2MPS14: 1 to 25
+			- S2MPS15: 1 to 27
+			- S2MPU02: 1 to 28
+		  - Example: LDO1, LDO2, LDO28
+	- BUCKn
+		  - valid values for n are:
+			- S2MPS11: 1 to 10
+			- S2MPS13: 1 to 10
+			- S2MPS14: 1 to 5
+			- S2MPS15: 1 to 10
+			- S2MPU02: 1 to 7
+		  - 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 the nodes under "regulators" sub-node:
+ - regulator-ramp-delay: ramp delay in uV/us. May be 6250, 12500,
+   25000 (default) or 50000.
+
+   Additionally S2MPS11 supports disabling ramp delay for BUCK{2,3,4,6}
+   by setting it to <0>.
+
+   Note: On S2MPS11 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{3,4},
+    - buck{7,8,10}.
+
+ - samsung,ext-control-gpios: On S2MPS14 the LDO10, LDO11 and LDO12 can be
+   configured to external control over GPIO. To turn this feature on this
+   property must be added to the regulator sub-node:
+    - samsung,ext-control-gpios: GPIO specifier for one GPIO
+                                 controlling this regulator (enable/disable)
+  Example:
+	LDO12 {
+		regulator-name = "V_EMMC_2.8V";
+		regulator-min-microvolt = <2800000>;
+		regulator-max-microvolt = <2800000>;
+		samsung,ext-control-gpios = <&gpk0 2 0>;
+	};
+
+
+Example:
+
+	s2mps11_pmic@66 {
+		compatible = "samsung,s2mps11-pmic";
+		reg = <0x66>;
+
+		regulators {
+			ldo1_reg: LDO1 {
+				regulator-name = "VDD_ABB_3.3V";
+				regulator-min-microvolt = <3300000>;
+				regulator-max-microvolt = <3300000>;
+			};
+
+			ldo2_reg: LDO2 {
+				regulator-name = "VDD_ALIVE_1.1V";
+				regulator-min-microvolt = <1100000>;
+				regulator-max-microvolt = <1100000>;
+				regulator-always-on;
+			};
+
+			buck1_reg: BUCK1 {
+				regulator-name = "vdd_mif";
+				regulator-min-microvolt = <950000>;
+				regulator-max-microvolt = <1350000>;
+				regulator-always-on;
+				regulator-boot-on;
+			};
+
+			buck2_reg: BUCK2 {
+				regulator-name = "vdd_arm";
+				regulator-min-microvolt = <950000>;
+				regulator-max-microvolt = <1350000>;
+				regulator-always-on;
+				regulator-boot-on;
+				regulator-ramp-delay = <50000>;
+			};
+		};
+	};
diff --git a/MAINTAINERS b/MAINTAINERS
index f3de00113ae8..137284e37250 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -9234,7 +9234,9 @@ F:	drivers/clk/clk-s2mps11.c
 F:	drivers/rtc/rtc-s5m.c
 F:	include/linux/mfd/samsung/
 F:	Documentation/devicetree/bindings/regulator/s5m8767-regulator.txt
-F:	Documentation/devicetree/bindings/mfd/s2mp*.txt
+F:	Documentation/devicetree/bindings/mfd/samsung,sec-core.txt
+F:	Documentation/devicetree/bindings/regulator/samsung,s2m*.txt
+F:	Documentation/devicetree/bindings/clock/samsung,s2mps11.txt
 
 SAMSUNG S5P/EXYNOS4 SOC SERIES CAMERA SUBSYSTEM DRIVERS
 M:	Kyungmin Park <kyungmin.park@samsung.com>
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH 2/3] dt-bindings: regulator/mfd: Reorganize S5M8767 bindings
  2015-12-04  1:10 [PATCH 0/3] dt-bindings: regulator/clock/mfd: Reorganize S2M/S5M bindings Krzysztof Kozlowski
  2015-12-04  1:10 ` [PATCH 1/3] dt-bindings: regulator/clock/mfd: Reorganize S2MPS-family bindings Krzysztof Kozlowski
@ 2015-12-04  1:10 ` Krzysztof Kozlowski
  2015-12-04 12:07   ` Mark Brown
                     ` (3 more replies)
  2015-12-04  1:10 ` [PATCH 3/3] dt-bindings: regulator/mfd: Reorganize S2MPA01 bindings Krzysztof Kozlowski
  2 siblings, 4 replies; 20+ messages in thread
From: Krzysztof Kozlowski @ 2015-12-04  1:10 UTC (permalink / raw)
  To: Sangbeom Kim, Krzysztof Kozlowski, Rob Herring, Pawel Moll,
	Mark Rutland, Ian Campbell, Kumar Gala, Lee Jones, Kukjin Kim,
	linux-kernel, linux-samsung-soc, devicetree, Michael Turquette,
	Stephen Boyd, Liam Girdwood, Mark Brown
  Cc: linux-clk

The regulator/s5m8767-regulator.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,s5m8767.txt),
 - remove duplicated information,
 - reorganize the contents to match style of
   regulator/samsung,s2mps11.txt.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
---
 .../devicetree/bindings/mfd/samsung,sec-core.txt   |   4 +-
 .../bindings/regulator/s5m8767-regulator.txt       | 163 ---------------------
 .../bindings/regulator/samsung,s5m8767.txt         | 145 ++++++++++++++++++
 MAINTAINERS                                        |   2 +-
 4 files changed, 149 insertions(+), 165 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/regulator/s5m8767-regulator.txt
 create mode 100644 Documentation/devicetree/bindings/regulator/samsung,s5m8767.txt

diff --git a/Documentation/devicetree/bindings/mfd/samsung,sec-core.txt b/Documentation/devicetree/bindings/mfd/samsung,sec-core.txt
index ef0166d0f643..4aeb95c82304 100644
--- a/Documentation/devicetree/bindings/mfd/samsung,sec-core.txt
+++ b/Documentation/devicetree/bindings/mfd/samsung,sec-core.txt
@@ -14,6 +14,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,s2mps11.txt
+ - bindings/regulator/samsung,s5m8767.txt
  - bindings/clock/samsung,s2mps11.txt
 
 
@@ -23,7 +24,8 @@ Required properties:
 	- "samsung,s2mps13-pmic",
 	- "samsung,s2mps14-pmic",
 	- "samsung,s2mps15-pmic",
-	- "samsung,s2mpu02-pmic".
+	- "samsung,s2mpu02-pmic",
+	- "samsung,s5m8767-pmic".
  - reg: Specifies the I2C slave address of the pmic block. It should be 0x66.
 
 Optional properties:
diff --git a/Documentation/devicetree/bindings/regulator/s5m8767-regulator.txt b/Documentation/devicetree/bindings/regulator/s5m8767-regulator.txt
deleted file mode 100644
index 20191315e444..000000000000
--- a/Documentation/devicetree/bindings/regulator/s5m8767-regulator.txt
+++ /dev/null
@@ -1,163 +0,0 @@
-* Samsung S5M8767 Voltage and Current Regulator
-
-The Samsung S5M8767 is a multi-function device which includes voltage and
-current regulators, rtc, charger controller and other sub-blocks. It is
-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 s5m8767.
-
-Required properties:
-- compatible: Should be "samsung,s5m8767-pmic".
-- reg: Specifies the i2c slave address of the pmic block. It should be 0x66.
-
-- s5m8767,pmic-buck2-dvs-voltage: A set of 8 voltage values in micro-volt (uV)
-  units for buck2 when changing voltage using gpio dvs. Refer to [1] below
-  for additional information.
-
-- s5m8767,pmic-buck3-dvs-voltage: A set of 8 voltage values in micro-volt (uV)
-  units for buck3 when changing voltage using gpio dvs. Refer to [1] below
-  for additional information.
-
-- s5m8767,pmic-buck4-dvs-voltage: A set of 8 voltage values in micro-volt (uV)
-  units for buck4 when changing voltage using gpio dvs. Refer to [1] below
-  for additional information.
-
-- s5m8767,pmic-buck-ds-gpios: GPIO specifiers for three host gpio's used
-  for selecting GPIO DVS lines. It is one-to-one mapped to dvs gpio lines.
-
-[1] If none of the 's5m8767,pmic-buck[2/3/4]-uses-gpio-dvs' optional
-    property is specified, the 's5m8767,pmic-buck[2/3/4]-dvs-voltage'
-    property should specify atleast one voltage level (which would be a
-    safe operating voltage).
-
-    If either of the 's5m8767,pmic-buck[2/3/4]-uses-gpio-dvs' optional
-    property is specified, then all the eight voltage values for the
-    's5m8767,pmic-buck[2/3/4]-dvs-voltage' should be specified.
-
-Optional properties:
-- interrupt-parent: Specifies the phandle of the interrupt controller to which
-  the interrupts from s5m8767 are delivered to.
-- interrupts: Interrupt specifiers for two interrupt sources.
-  - First interrupt specifier is for 'irq1' interrupt.
-  - Second interrupt specifier is for 'alert' interrupt.
-- s5m8767,pmic-buck2-uses-gpio-dvs: 'buck2' can be controlled by gpio dvs.
-- s5m8767,pmic-buck3-uses-gpio-dvs: 'buck3' can be controlled by gpio dvs.
-- s5m8767,pmic-buck4-uses-gpio-dvs: 'buck4' can be controlled by gpio dvs.
-
-Additional properties required if either of the optional properties are used:
-
-- s5m8767,pmic-buck234-default-dvs-idx: Default voltage setting selected from
-  the possible 8 options selectable by the dvs gpios. The value of this
-  property should be between 0 and 7. If not specified or if out of range, the
-  default value of this property is set to 0.
-
-- s5m8767,pmic-buck-dvs-gpios: GPIO specifiers for three host gpio's used
-  for dvs. The format of the gpio specifier depends in the gpio controller.
-
-Regulators: The regulators of s5m8767 that have to be instantiated should be
-included in a sub-node named 'regulators'. Regulator nodes included in this
-sub-node should be of the format as listed below.
-
-	regulator_name {
-		ldo1_reg: LDO1 {
-			regulator-name = "VDD_ALIVE_1.0V";
-			regulator-min-microvolt = <1100000>;
-			regulator-max-microvolt = <1100000>;
-			regulator-always-on;
-			regulator-boot-on;
-			op_mode = <1>; /* Normal Mode */
-		};
-	};
-The above regulator entries are defined in regulator bindings documentation
-except these properties:
-	- op_mode: describes the different operating modes of the LDO's with
-		power mode change in SOC. The different possible values are,
-		0 - always off mode
-		1 - on in normal mode
-		2 - low power mode
-		3 - suspend mode
-	- s5m8767,pmic-ext-control-gpios: (optional) GPIO specifier for one
-		GPIO controlling this regulator (enable/disable); This is
-		valid only for buck9.
-
-The following are the names of the regulators that the s5m8767 pmic block
-supports. Note: The 'n' in LDOn and BUCKn represents the LDO or BUCK number
-as per the datasheet of s5m8767.
-
-	- LDOn
-		  - valid values for n are 1 to 28
-		  - Example: LDO1, LDO2, LDO28
-	- BUCKn
-		  - valid values for n are 1 to 9.
-		  - Example: BUCK1, BUCK2, BUCK9
-
-The bindings inside the regulator nodes use the standard regulator bindings
-which are documented elsewhere.
-
-Example:
-
-	s5m8767_pmic@66 {
-		compatible = "samsung,s5m8767-pmic";
-		reg = <0x66>;
-
-		s5m8767,pmic-buck2-uses-gpio-dvs;
-		s5m8767,pmic-buck3-uses-gpio-dvs;
-		s5m8767,pmic-buck4-uses-gpio-dvs;
-
-		s5m8767,pmic-buck-default-dvs-idx = <0>;
-
-		s5m8767,pmic-buck-dvs-gpios = <&gpx0 0 0>, /* DVS1 */
-						 <&gpx0 1 0>, /* DVS2 */
-						 <&gpx0 2 0>; /* DVS3 */
-
-		s5m8767,pmic-buck-ds-gpios = <&gpx2 3 0>, /* SET1 */
-						<&gpx2 4 0>, /* SET2 */
-						<&gpx2 5 0>; /* SET3 */
-
-		s5m8767,pmic-buck2-dvs-voltage = <1350000>, <1300000>,
-						 <1250000>, <1200000>,
-						 <1150000>, <1100000>,
-						 <1000000>, <950000>;
-
-		s5m8767,pmic-buck3-dvs-voltage = <1100000>, <1100000>,
-						 <1100000>, <1100000>,
-						 <1000000>, <1000000>,
-						 <1000000>, <1000000>;
-
-		s5m8767,pmic-buck4-dvs-voltage = <1200000>, <1200000>,
-						 <1200000>, <1200000>,
-						 <1200000>, <1200000>,
-						 <1200000>, <1200000>;
-
-		regulators {
-			ldo1_reg: LDO1 {
-				regulator-name = "VDD_ABB_3.3V";
-				regulator-min-microvolt = <3300000>;
-				regulator-max-microvolt = <3300000>;
-				op_mode = <1>; /* Normal Mode */
-			};
-
-			ldo2_reg: LDO2 {
-				regulator-name = "VDD_ALIVE_1.1V";
-				regulator-min-microvolt = <1100000>;
-				regulator-max-microvolt = <1100000>;
-				regulator-always-on;
-			};
-
-			buck1_reg: BUCK1 {
-				regulator-name = "VDD_MIF_1.2V";
-				regulator-min-microvolt = <950000>;
-				regulator-max-microvolt = <1350000>;
-				regulator-always-on;
-				regulator-boot-on;
-			};
-
-			vemmc_reg: BUCK9 {
-				regulator-name = "VMEM_VDD_2.8V";
-				regulator-min-microvolt = <2800000>;
-				regulator-max-microvolt = <2800000>;
-				op_mode = <3>; /* Standby Mode */
-				s5m8767,pmic-ext-control-gpios = <&gpk0 2 0>;
-			};
-		};
-	};
diff --git a/Documentation/devicetree/bindings/regulator/samsung,s5m8767.txt b/Documentation/devicetree/bindings/regulator/samsung,s5m8767.txt
new file mode 100644
index 000000000000..093edda0c8df
--- /dev/null
+++ b/Documentation/devicetree/bindings/regulator/samsung,s5m8767.txt
@@ -0,0 +1,145 @@
+Binding for Samsung S5M8767 regulator block
+===========================================
+
+This is a part of device tree bindings for S5M family multi-function devices.
+More information can be found in bindings/mfd/sec-core.txt file.
+
+The S5M8767 device provide buck and LDO regulators.
+
+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
+
+
+Required properties of the main device node (the parent!):
+ - s5m8767,pmic-buck2-dvs-voltage: A set of 8 voltage values in micro-volt (uV)
+   units for buck2 when changing voltage using gpio dvs. Refer to [1] below
+   for additional information.
+
+ - s5m8767,pmic-buck3-dvs-voltage: A set of 8 voltage values in micro-volt (uV)
+   units for buck3 when changing voltage using gpio dvs. Refer to [1] below
+   for additional information.
+
+ - s5m8767,pmic-buck4-dvs-voltage: A set of 8 voltage values in micro-volt (uV)
+   units for buck4 when changing voltage using gpio dvs. Refer to [1] below
+   for additional information.
+
+ - s5m8767,pmic-buck-ds-gpios: GPIO specifiers for three host gpio's used
+   for selecting GPIO DVS lines. It is one-to-one mapped to dvs gpio lines.
+
+ [1] If none of the 's5m8767,pmic-buck[2/3/4]-uses-gpio-dvs' optional
+     property is specified, the 's5m8767,pmic-buck[2/3/4]-dvs-voltage'
+     property should specify atleast one voltage level (which would be a
+     safe operating voltage).
+
+     If either of the 's5m8767,pmic-buck[2/3/4]-uses-gpio-dvs' optional
+     property is specified, then all the eight voltage values for the
+     's5m8767,pmic-buck[2/3/4]-dvs-voltage' should be specified.
+
+Optional properties of the main device node (the parent!):
+ - s5m8767,pmic-buck2-uses-gpio-dvs: 'buck2' can be controlled by gpio dvs.
+ - s5m8767,pmic-buck3-uses-gpio-dvs: 'buck3' can be controlled by gpio dvs.
+ - s5m8767,pmic-buck4-uses-gpio-dvs: 'buck4' can be controlled by gpio dvs.
+
+Additional properties required if either of the optional properties are used:
+
+ - s5m8767,pmic-buck234-default-dvs-idx: Default voltage setting selected from
+   the possible 8 options selectable by the dvs gpios. The value of this
+   property should be between 0 and 7. If not specified or if out of range, the
+   default value of this property is set to 0.
+
+ - s5m8767,pmic-buck-dvs-gpios: GPIO specifiers for three host gpio's used
+   for dvs. The format of the gpio specifier depends in the gpio controller.
+
+
+Names of regulators supported by S5M8767 device:
+	- LDOn
+		  - valid values for n are 1 to 28
+		  - Example: LDO1, LDO2, LDO28
+	- BUCKn
+		  - valid values for n are 1 to 9.
+		  - 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 the nodes under "regulators" sub-node:
+ - op_mode: describes the different operating modes of the LDO's with
+            power mode change in SOC. The different possible values are,
+             0 - always off mode
+             1 - on in normal mode
+             2 - low power mode
+             3 - suspend mode
+ - s5m8767,pmic-ext-control-gpios: (optional) GPIO specifier for one
+                                   GPIO controlling this regulator
+                                   (enable/disable); This is valid only
+                                   for buck9.
+
+Example:
+
+	s5m8767_pmic@66 {
+		compatible = "samsung,s5m8767-pmic";
+		reg = <0x66>;
+
+		s5m8767,pmic-buck2-uses-gpio-dvs;
+		s5m8767,pmic-buck3-uses-gpio-dvs;
+		s5m8767,pmic-buck4-uses-gpio-dvs;
+
+		s5m8767,pmic-buck-default-dvs-idx = <0>;
+
+		s5m8767,pmic-buck-dvs-gpios = <&gpx0 0 0>, /* DVS1 */
+						 <&gpx0 1 0>, /* DVS2 */
+						 <&gpx0 2 0>; /* DVS3 */
+
+		s5m8767,pmic-buck-ds-gpios = <&gpx2 3 0>, /* SET1 */
+						<&gpx2 4 0>, /* SET2 */
+						<&gpx2 5 0>; /* SET3 */
+
+		s5m8767,pmic-buck2-dvs-voltage = <1350000>, <1300000>,
+						 <1250000>, <1200000>,
+						 <1150000>, <1100000>,
+						 <1000000>, <950000>;
+
+		s5m8767,pmic-buck3-dvs-voltage = <1100000>, <1100000>,
+						 <1100000>, <1100000>,
+						 <1000000>, <1000000>,
+						 <1000000>, <1000000>;
+
+		s5m8767,pmic-buck4-dvs-voltage = <1200000>, <1200000>,
+						 <1200000>, <1200000>,
+						 <1200000>, <1200000>,
+						 <1200000>, <1200000>;
+
+		regulators {
+			ldo1_reg: LDO1 {
+				regulator-name = "VDD_ABB_3.3V";
+				regulator-min-microvolt = <3300000>;
+				regulator-max-microvolt = <3300000>;
+				op_mode = <1>; /* Normal Mode */
+			};
+
+			ldo2_reg: LDO2 {
+				regulator-name = "VDD_ALIVE_1.1V";
+				regulator-min-microvolt = <1100000>;
+				regulator-max-microvolt = <1100000>;
+				regulator-always-on;
+			};
+
+			buck1_reg: BUCK1 {
+				regulator-name = "VDD_MIF_1.2V";
+				regulator-min-microvolt = <950000>;
+				regulator-max-microvolt = <1350000>;
+				regulator-always-on;
+				regulator-boot-on;
+			};
+
+			vemmc_reg: BUCK9 {
+				regulator-name = "VMEM_VDD_2.8V";
+				regulator-min-microvolt = <2800000>;
+				regulator-max-microvolt = <2800000>;
+				op_mode = <3>; /* Standby Mode */
+				s5m8767,pmic-ext-control-gpios = <&gpk0 2 0>;
+			};
+		};
+	};
diff --git a/MAINTAINERS b/MAINTAINERS
index 137284e37250..7e1db5746ee4 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -9233,9 +9233,9 @@ F:	drivers/regulator/s5m*.c
 F:	drivers/clk/clk-s2mps11.c
 F:	drivers/rtc/rtc-s5m.c
 F:	include/linux/mfd/samsung/
-F:	Documentation/devicetree/bindings/regulator/s5m8767-regulator.txt
 F:	Documentation/devicetree/bindings/mfd/samsung,sec-core.txt
 F:	Documentation/devicetree/bindings/regulator/samsung,s2m*.txt
+F:	Documentation/devicetree/bindings/regulator/samsung,s5m*.txt
 F:	Documentation/devicetree/bindings/clock/samsung,s2mps11.txt
 
 SAMSUNG S5P/EXYNOS4 SOC SERIES CAMERA SUBSYSTEM DRIVERS
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH 3/3] dt-bindings: regulator/mfd: Reorganize S2MPA01 bindings
  2015-12-04  1:10 [PATCH 0/3] dt-bindings: regulator/clock/mfd: Reorganize S2M/S5M bindings Krzysztof Kozlowski
  2015-12-04  1:10 ` [PATCH 1/3] dt-bindings: regulator/clock/mfd: Reorganize S2MPS-family bindings Krzysztof Kozlowski
  2015-12-04  1:10 ` [PATCH 2/3] dt-bindings: regulator/mfd: Reorganize S5M8767 bindings Krzysztof Kozlowski
@ 2015-12-04  1:10 ` Krzysztof Kozlowski
  2015-12-04 12:11   ` Mark Brown
                     ` (3 more replies)
  2 siblings, 4 replies; 20+ messages in thread
From: Krzysztof Kozlowski @ 2015-12-04  1:10 UTC (permalink / raw)
  To: Sangbeom Kim, Krzysztof Kozlowski, Rob Herring, Pawel Moll,
	Mark Rutland, Ian Campbell, Kumar Gala, Lee Jones, Kukjin Kim,
	linux-kernel, linux-samsung-soc, devicetree, Michael Turquette,
	Stephen Boyd, Liam Girdwood, Mark Brown
  Cc: linux-clk

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 <k.kozlowski@samsung.com>
---
 Documentation/devicetree/bindings/mfd/s2mpa01.txt  | 90 ----------------------
 .../devicetree/bindings/mfd/samsung,sec-core.txt   |  4 +-
 .../bindings/regulator/samsung,s2mpa01.txt         | 79 +++++++++++++++++++
 3 files changed, 82 insertions(+), 91 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/mfd/s2mpa01.txt
 create mode 100644 Documentation/devicetree/bindings/regulator/samsung,s2mpa01.txt

diff --git a/Documentation/devicetree/bindings/mfd/s2mpa01.txt b/Documentation/devicetree/bindings/mfd/s2mpa01.txt
deleted file mode 100644
index c13d3d8c3947..000000000000
--- a/Documentation/devicetree/bindings/mfd/s2mpa01.txt
+++ /dev/null
@@ -1,90 +0,0 @@
-
-* Samsung S2MPA01 Voltage and Current Regulator
-
-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.
-
-Required properties:
-- compatible: Should be "samsung,s2mpa01-pmic".
-- reg: Specifies the I2C slave address of the PMIC block. It should be 0x66.
-
-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=<value>.
-
-  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.
-
-	- 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
-
-Example:
-
-	s2mpa01_pmic@66 {
-		compatible = "samsung,s2mpa01-pmic";
-		reg = <0x66>;
-
-		regulators {
-			ldo1_reg: LDO1 {
-				regulator-name = "VDD_ALIVE";
-				regulator-min-microvolt = <1000000>;
-				regulator-max-microvolt = <1000000>;
-			};
-
-			ldo2_reg: LDO2 {
-				regulator-name = "VDDQ_MMC2";
-				regulator-min-microvolt = <2800000>;
-				regulator-max-microvolt = <2800000>;
-				regulator-always-on;
-			};
-
-			buck1_reg: BUCK1 {
-				regulator-name = "vdd_mif";
-				regulator-min-microvolt = <950000>;
-				regulator-max-microvolt = <1350000>;
-				regulator-always-on;
-				regulator-boot-on;
-			};
-
-			buck2_reg: BUCK2 {
-				regulator-name = "vdd_arm";
-				regulator-min-microvolt = <950000>;
-				regulator-max-microvolt = <1350000>;
-				regulator-always-on;
-				regulator-boot-on;
-				regulator-ramp-delay = <50000>;
-			};
-		};
-	};
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/regulator/samsung,s2mpa01.txt b/Documentation/devicetree/bindings/regulator/samsung,s2mpa01.txt
new file mode 100644
index 000000000000..bae3c7f838cf
--- /dev/null
+++ b/Documentation/devicetree/bindings/regulator/samsung,s2mpa01.txt
@@ -0,0 +1,79 @@
+Binding for Samsung S2MPA01 regulator block
+===========================================
+
+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 S2MPA01 device provide buck and LDO regulators.
+
+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
+
+
+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:
+
+	s2mpa01_pmic@66 {
+		compatible = "samsung,s2mpa01-pmic";
+		reg = <0x66>;
+
+		regulators {
+			ldo1_reg: LDO1 {
+				regulator-name = "VDD_ALIVE";
+				regulator-min-microvolt = <1000000>;
+				regulator-max-microvolt = <1000000>;
+			};
+
+			ldo2_reg: LDO2 {
+				regulator-name = "VDDQ_MMC2";
+				regulator-min-microvolt = <2800000>;
+				regulator-max-microvolt = <2800000>;
+				regulator-always-on;
+			};
+
+			buck1_reg: BUCK1 {
+				regulator-name = "vdd_mif";
+				regulator-min-microvolt = <950000>;
+				regulator-max-microvolt = <1350000>;
+				regulator-always-on;
+				regulator-boot-on;
+			};
+
+			buck2_reg: BUCK2 {
+				regulator-name = "vdd_arm";
+				regulator-min-microvolt = <950000>;
+				regulator-max-microvolt = <1350000>;
+				regulator-always-on;
+				regulator-boot-on;
+				regulator-ramp-delay = <50000>;
+			};
+		};
+	};
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 20+ messages in thread

* Re: [PATCH 1/3] dt-bindings: regulator/clock/mfd: Reorganize S2MPS-family bindings
  2015-12-04  1:10 ` [PATCH 1/3] dt-bindings: regulator/clock/mfd: Reorganize S2MPS-family bindings Krzysztof Kozlowski
@ 2015-12-04 12:06   ` Mark Brown
  2015-12-04 15:13   ` Rob Herring
                     ` (3 subsequent siblings)
  4 siblings, 0 replies; 20+ messages in thread
From: Mark Brown @ 2015-12-04 12:06 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Sangbeom Kim, Rob Herring, Pawel Moll, Mark Rutland,
	Ian Campbell, Kumar Gala, Lee Jones, Kukjin Kim, linux-kernel,
	linux-samsung-soc, devicetree, Michael Turquette, Stephen Boyd,
	Liam Girdwood, linux-clk

[-- Attachment #1: Type: text/plain, Size: 383 bytes --]

On Fri, Dec 04, 2015 at 10:10:03AM +0900, Krzysztof Kozlowski wrote:
> Bindings for Samsung S2M and S5M family PMICs are in mess. They are
> spread over different files and subdirectories in a non-consistent way.
> The devices and respective drivers for them share a lot in common so
> everything could be organized in a more readable way.

Acked-by: Mark Brown <broonie@kernel.org>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 2/3] dt-bindings: regulator/mfd: Reorganize S5M8767 bindings
  2015-12-04  1:10 ` [PATCH 2/3] dt-bindings: regulator/mfd: Reorganize S5M8767 bindings Krzysztof Kozlowski
@ 2015-12-04 12:07   ` Mark Brown
  2015-12-04 15:20   ` Rob Herring
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 20+ messages in thread
From: Mark Brown @ 2015-12-04 12:07 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Sangbeom Kim, Rob Herring, Pawel Moll, Mark Rutland,
	Ian Campbell, Kumar Gala, Lee Jones, Kukjin Kim, linux-kernel,
	linux-samsung-soc, devicetree, Michael Turquette, Stephen Boyd,
	Liam Girdwood, linux-clk

[-- Attachment #1: Type: text/plain, Size: 294 bytes --]

On Fri, Dec 04, 2015 at 10:10:04AM +0900, Krzysztof Kozlowski wrote:
> The regulator/s5m8767-regulator.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:

Acked-by: Mark Brown <broonie@kernel.org>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 3/3] dt-bindings: regulator/mfd: Reorganize S2MPA01 bindings
  2015-12-04  1:10 ` [PATCH 3/3] dt-bindings: regulator/mfd: Reorganize S2MPA01 bindings Krzysztof Kozlowski
@ 2015-12-04 12:11   ` Mark Brown
  2015-12-07  1:07     ` Krzysztof Kozlowski
  2016-01-11  7:56     ` Lee Jones
  2015-12-04 15:55   ` Rob Herring
                     ` (2 subsequent siblings)
  3 siblings, 2 replies; 20+ messages in thread
From: Mark Brown @ 2015-12-04 12:11 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Sangbeom Kim, Rob Herring, Pawel Moll, Mark Rutland,
	Ian Campbell, Kumar Gala, Lee Jones, Kukjin Kim, linux-kernel,
	linux-samsung-soc, devicetree, Michael Turquette, Stephen Boyd,
	Liam Girdwood, linux-clk

[-- Attachment #1: Type: text/plain, Size: 497 bytes --]

On Fri, Dec 04, 2015 at 10:10:05AM +0900, Krzysztof Kozlowski wrote:
> 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:

Acked-by: Mark Brown <broonie@kernel.org>

>  - add company prefix to file name (regulator/samsung,s2mpa01.txt),

I'm not 100% convinced about these prefixes BTW, the duplication isn't
usually an issue within a subsystem.  They don't do any harm either
though.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 1/3] dt-bindings: regulator/clock/mfd: Reorganize S2MPS-family bindings
  2015-12-04  1:10 ` [PATCH 1/3] dt-bindings: regulator/clock/mfd: Reorganize S2MPS-family bindings Krzysztof Kozlowski
  2015-12-04 12:06   ` Mark Brown
@ 2015-12-04 15:13   ` Rob Herring
  2015-12-07  9:38   ` Lee Jones
                     ` (2 subsequent siblings)
  4 siblings, 0 replies; 20+ messages in thread
From: Rob Herring @ 2015-12-04 15:13 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Sangbeom Kim, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
	Lee Jones, Kukjin Kim, linux-kernel, linux-samsung-soc,
	devicetree, Michael Turquette, Stephen Boyd, Liam Girdwood,
	Mark Brown, linux-clk

On Fri, Dec 04, 2015 at 10:10:03AM +0900, Krzysztof Kozlowski wrote:
> Bindings for Samsung S2M and S5M family PMICs are in mess. They are
> spread over different files and subdirectories in a non-consistent way.
> The devices and respective drivers for them share a lot in common so
> everything could be organized in a more readable way.
> 
> Reorganize the S2MPS11/13/14/15 Device Tree bindings to match the
> drivers for this family of devices:
>  - move mfd/s2mps11.txt to mfd/samsung,sec-core.txt for the main MFD
>    driver (common for entire family),
>  - split clock block to clock/samsung,s2mps11.txt,
>  - split regulator block to regulator/samsung,s2mps11.txt.
> 
> Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>

Acked-by: Rob Herring <robh@kernel.org>

> ---
>  .../devicetree/bindings/clock/samsung,s2mps11.txt  |  49 +++++++
>  Documentation/devicetree/bindings/mfd/s2mps11.txt  | 153 ---------------------
>  .../devicetree/bindings/mfd/samsung,sec-core.txt   |  84 +++++++++++
>  .../bindings/regulator/samsung,s2mps11.txt         | 102 ++++++++++++++
>  MAINTAINERS                                        |   4 +-
>  5 files changed, 238 insertions(+), 154 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/clock/samsung,s2mps11.txt
>  delete mode 100644 Documentation/devicetree/bindings/mfd/s2mps11.txt
>  create mode 100644 Documentation/devicetree/bindings/mfd/samsung,sec-core.txt
>  create mode 100644 Documentation/devicetree/bindings/regulator/samsung,s2mps11.txt
> 
> diff --git a/Documentation/devicetree/bindings/clock/samsung,s2mps11.txt b/Documentation/devicetree/bindings/clock/samsung,s2mps11.txt
> new file mode 100644
> index 000000000000..2726c1d58a79
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/clock/samsung,s2mps11.txt
> @@ -0,0 +1,49 @@
> +Binding for Samsung S2M and S5M family clock generator block
> +============================================================
> +
> +This is a part of device tree bindings for S2M and S5M family multi-function
> +devices.
> +More information can be found in bindings/mfd/sec-core.txt file.
> +
> +The S2MPS11/13/15 and S5M8767 provide three(AP/CP/BT) buffered 32.768 kHz
> +outputs. The S2MPS14 provides two (AP/BT) buffered 32.768 KHz outputs.
> +
> +To register these as clocks with common clock framework instantiate under
> +main device node a sub-node named "clocks".
> +
> +It uses the common clock binding documented in:
> + - Documentation/devicetree/bindings/clock/clock-bindings.txt
> +
> +
> +Required properties of the "clocks" sub-node:
> + - #clock-cells: should be 1.
> + - compatible: Should be one of: "samsung,s2mps11-clk", "samsung,s2mps13-clk",
> +               "samsung,s2mps14-clk", "samsung,s5m8767-clk"
> +   The S2MPS15 uses the same compatible as S2MPS13, as both provides similar
> +   clocks.
> +
> +
> +Each clock is assigned an identifier and client nodes use this identifier
> +to specify the clock which they consume.
> +    Clock               ID           Devices
> +    ----------------------------------------------------------
> +    32KhzAP		0            S2MPS11/13/14/15, S5M8767
> +    32KhzCP		1            S2MPS11/13/15, S5M8767
> +    32KhzBT		2            S2MPS11/13/14/15, S5M8767
> +
> +Include dt-bindings/clock/samsung,s2mps11.h file to use preprocessor defines
> +in device tree sources.
> +
> +
> +Example:
> +
> +	s2mps11_pmic@66 {
> +		compatible = "samsung,s2mps11-pmic";
> +		reg = <0x66>;
> +
> +		s2m_osc: clocks {
> +			compatible = "samsung,s2mps11-clk";
> +			#clock-cells = <1>;
> +			clock-output-names = "xx", "yy", "zz";
> +		};
> +	};
> diff --git a/Documentation/devicetree/bindings/mfd/s2mps11.txt b/Documentation/devicetree/bindings/mfd/s2mps11.txt
> deleted file mode 100644
> index 09b94c97faac..000000000000
> --- a/Documentation/devicetree/bindings/mfd/s2mps11.txt
> +++ /dev/null
> @@ -1,153 +0,0 @@
> -
> -* Samsung S2MPS11/13/14/15 and S2MPU02 Voltage and Current Regulator
> -
> -The Samsung S2MPS11 is a multi-function device which includes voltage and
> -current regulators, RTC, charger controller and other sub-blocks. 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.
> -
> -Required properties:
> -- compatible: Should be one of the following
> -	- "samsung,s2mps11-pmic"
> -	- "samsung,s2mps13-pmic"
> -	- "samsung,s2mps14-pmic"
> -	- "samsung,s2mps15-pmic"
> -	- "samsung,s2mpu02-pmic".
> -- reg: Specifies the I2C slave address of the pmic block. It should be 0x66.
> -
> -Optional properties:
> -- interrupt-parent: Specifies the phandle of the interrupt controller to which
> -  the interrupts from s2mps11 are delivered to.
> -- interrupts: Interrupt specifiers for interrupt sources.
> -- samsung,s2mps11-wrstbi-ground: Indicates that WRSTBI pin of PMIC is pulled
> -  down. When the system is suspended it will always go down thus triggerring
> -  unwanted buck warm reset (setting buck voltages to default values).
> -- samsung,s2mps11-acokb-ground: Indicates that ACOKB pin of S2MPS11 PMIC is
> -  connected to the ground so the PMIC must manually set PWRHOLD bit in CTRL1
> -  register to turn off the power. Usually the ACOKB is pulled up to VBATT so
> -  when PWRHOLD pin goes low, the rising ACOKB will trigger power off.
> -
> -Optional nodes:
> -- clocks: s2mps11, s2mps13, s2mps15 and s5m8767 provide three(AP/CP/BT) buffered 32.768
> -  KHz outputs, so to register these as clocks with common clock framework
> -  instantiate a sub-node named "clocks". It uses the common clock binding
> -  documented in :
> -  [Documentation/devicetree/bindings/clock/clock-bindings.txt]
> -  The s2mps14 provides two (AP/BT) buffered 32.768 KHz outputs.
> -  - #clock-cells: should be 1.
> -
> -  - The following is the list of clocks generated by the controller. Each clock
> -    is assigned an identifier and client nodes use this identifier to specify
> -    the clock which they consume.
> -    Clock               ID           Devices
> -    ----------------------------------------------------------
> -    32KhzAP		0            S2MPS11, S2MPS13, S2MPS14, S2MPS15, S5M8767
> -    32KhzCP		1            S2MPS11, S2MPS13, S2MPS15, S5M8767
> -    32KhzBT		2            S2MPS11, S2MPS13, S2MPS14, S2MPS15, S5M8767
> -
> -  - compatible: Should be one of: "samsung,s2mps11-clk", "samsung,s2mps13-clk",
> -		"samsung,s2mps14-clk", "samsung,s5m8767-clk"
> -    The s2msp15 uses the same compatible as s2mps13, as both provides similar clocks.
> -
> -- regulators: The regulators of s2mps11 that have to be instantiated should be
> -included in a sub-node named 'regulators'. Regulator nodes included in this
> -sub-node should be of the format as listed below.
> -
> -	regulator_name {
> -		[standard regulator constraints....];
> -	};
> -
> - regulator-ramp-delay for BUCKs = [6250/12500/25000(default)/50000] uV/us
> -
> - BUCK[2/3/4/6] supports disabling ramp delay on hardware, so explicitly
> - regulator-ramp-delay = <0> can be used for them to disable ramp delay.
> - 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<value>.
> -Grouping of BUCKs sharing ramp rate setting is as follow : BUCK[1, 6],
> -BUCK[3, 4], and BUCK[7, 8, 10]
> -
> -On S2MPS14 the LDO10, LDO11 and LDO12 can be configured to external control
> -over GPIO. To turn this feature on this property must be added to the regulator
> -sub-node:
> -	- samsung,ext-control-gpios: GPIO specifier for one GPIO
> -		controlling this regulator (enable/disable);
> -Example:
> -	LDO12 {
> -		regulator-name = "V_EMMC_2.8V";
> -		regulator-min-microvolt = <2800000>;
> -		regulator-max-microvolt = <2800000>;
> -		samsung,ext-control-gpios = <&gpk0 2 0>;
> -	};
> -
> -
> -The regulator constraints inside the regulator nodes use the standard regulator
> -bindings which are documented elsewhere.
> -
> -The following are the names of the regulators that the s2mps11 pmic block
> -supports. Note: The 'n' in LDOn and BUCKn represents the LDO or BUCK number
> -as per the datasheet of s2mps11.
> -
> -	- LDOn
> -		  - valid values for n are:
> -			- S2MPS11: 1 to 38
> -			- S2MPS13: 1 to 40
> -			- S2MPS14: 1 to 25
> -			- S2MPS15: 1 to 27
> -			- S2MPU02: 1 to 28
> -		  - Example: LDO1, LDO2, LDO28
> -	- BUCKn
> -		  - valid values for n are:
> -			- S2MPS11: 1 to 10
> -			- S2MPS13: 1 to 10
> -			- S2MPS14: 1 to 5
> -			- S2MPS15: 1 to 10
> -			- S2MPU02: 1 to 7
> -		  - Example: BUCK1, BUCK2, BUCK9
> -
> -Example:
> -
> -	s2mps11_pmic@66 {
> -		compatible = "samsung,s2mps11-pmic";
> -		reg = <0x66>;
> -
> -		s2m_osc: clocks {
> -			compatible = "samsung,s2mps11-clk";
> -			#clock-cells = <1>;
> -			clock-output-names = "xx", "yy", "zz";
> -		};
> -
> -		regulators {
> -			ldo1_reg: LDO1 {
> -				regulator-name = "VDD_ABB_3.3V";
> -				regulator-min-microvolt = <3300000>;
> -				regulator-max-microvolt = <3300000>;
> -			};
> -
> -			ldo2_reg: LDO2 {
> -				regulator-name = "VDD_ALIVE_1.1V";
> -				regulator-min-microvolt = <1100000>;
> -				regulator-max-microvolt = <1100000>;
> -				regulator-always-on;
> -			};
> -
> -			buck1_reg: BUCK1 {
> -				regulator-name = "vdd_mif";
> -				regulator-min-microvolt = <950000>;
> -				regulator-max-microvolt = <1350000>;
> -				regulator-always-on;
> -				regulator-boot-on;
> -			};
> -
> -			buck2_reg: BUCK2 {
> -				regulator-name = "vdd_arm";
> -				regulator-min-microvolt = <950000>;
> -				regulator-max-microvolt = <1350000>;
> -				regulator-always-on;
> -				regulator-boot-on;
> -				regulator-ramp-delay = <50000>;
> -			};
> -		};
> -	};
> diff --git a/Documentation/devicetree/bindings/mfd/samsung,sec-core.txt b/Documentation/devicetree/bindings/mfd/samsung,sec-core.txt
> new file mode 100644
> index 000000000000..ef0166d0f643
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/mfd/samsung,sec-core.txt
> @@ -0,0 +1,84 @@
> +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
> +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
> +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,s2mps11.txt
> + - bindings/clock/samsung,s2mps11.txt
> +
> +
> +Required properties:
> + - compatible: Should be one of the following
> +	- "samsung,s2mps11-pmic",
> +	- "samsung,s2mps13-pmic",
> +	- "samsung,s2mps14-pmic",
> +	- "samsung,s2mps15-pmic",
> +	- "samsung,s2mpu02-pmic".
> + - reg: Specifies the I2C slave address of the pmic block. It should be 0x66.
> +
> +Optional properties:
> + - interrupt-parent: Specifies the phandle of the interrupt controller to which
> +   the interrupts from s2mps11 are delivered to.
> + - interrupts: Interrupt specifiers for interrupt sources.
> + - samsung,s2mps11-wrstbi-ground: Indicates that WRSTBI pin of PMIC is pulled
> +   down. When the system is suspended it will always go down thus triggerring
> +   unwanted buck warm reset (setting buck voltages to default values).
> + - samsung,s2mps11-acokb-ground: Indicates that ACOKB pin of S2MPS11 PMIC is
> +   connected to the ground so the PMIC must manually set PWRHOLD bit in CTRL1
> +   register to turn off the power. Usually the ACOKB is pulled up to VBATT so
> +   when PWRHOLD pin goes low, the rising ACOKB will trigger power off.
> +
> +Example:
> +
> +	s2mps11_pmic@66 {
> +		compatible = "samsung,s2mps11-pmic";
> +		reg = <0x66>;
> +
> +		s2m_osc: clocks {
> +			compatible = "samsung,s2mps11-clk";
> +			#clock-cells = <1>;
> +			clock-output-names = "xx", "yy", "zz";
> +		};
> +
> +		regulators {
> +			ldo1_reg: LDO1 {
> +				regulator-name = "VDD_ABB_3.3V";
> +				regulator-min-microvolt = <3300000>;
> +				regulator-max-microvolt = <3300000>;
> +			};
> +
> +			ldo2_reg: LDO2 {
> +				regulator-name = "VDD_ALIVE_1.1V";
> +				regulator-min-microvolt = <1100000>;
> +				regulator-max-microvolt = <1100000>;
> +				regulator-always-on;
> +			};
> +
> +			buck1_reg: BUCK1 {
> +				regulator-name = "vdd_mif";
> +				regulator-min-microvolt = <950000>;
> +				regulator-max-microvolt = <1350000>;
> +				regulator-always-on;
> +				regulator-boot-on;
> +			};
> +
> +			buck2_reg: BUCK2 {
> +				regulator-name = "vdd_arm";
> +				regulator-min-microvolt = <950000>;
> +				regulator-max-microvolt = <1350000>;
> +				regulator-always-on;
> +				regulator-boot-on;
> +				regulator-ramp-delay = <50000>;
> +			};
> +		};
> +	};
> diff --git a/Documentation/devicetree/bindings/regulator/samsung,s2mps11.txt b/Documentation/devicetree/bindings/regulator/samsung,s2mps11.txt
> new file mode 100644
> index 000000000000..27a48bf1b185
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/regulator/samsung,s2mps11.txt
> @@ -0,0 +1,102 @@
> +Binding for Samsung S2M family regulator block
> +==============================================
> +
> +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 S2MPS11/13/14/15 and S2MPU02 devices provide buck and LDO regulators.
> +
> +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
> +
> +
> +Names of regulators supported by different devices:
> +	- LDOn
> +		  - valid values for n are:
> +			- S2MPS11: 1 to 38
> +			- S2MPS13: 1 to 40
> +			- S2MPS14: 1 to 25
> +			- S2MPS15: 1 to 27
> +			- S2MPU02: 1 to 28
> +		  - Example: LDO1, LDO2, LDO28
> +	- BUCKn
> +		  - valid values for n are:
> +			- S2MPS11: 1 to 10
> +			- S2MPS13: 1 to 10
> +			- S2MPS14: 1 to 5
> +			- S2MPS15: 1 to 10
> +			- S2MPU02: 1 to 7
> +		  - 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 the nodes under "regulators" sub-node:
> + - regulator-ramp-delay: ramp delay in uV/us. May be 6250, 12500,
> +   25000 (default) or 50000.
> +
> +   Additionally S2MPS11 supports disabling ramp delay for BUCK{2,3,4,6}
> +   by setting it to <0>.
> +
> +   Note: On S2MPS11 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{3,4},
> +    - buck{7,8,10}.
> +
> + - samsung,ext-control-gpios: On S2MPS14 the LDO10, LDO11 and LDO12 can be
> +   configured to external control over GPIO. To turn this feature on this
> +   property must be added to the regulator sub-node:
> +    - samsung,ext-control-gpios: GPIO specifier for one GPIO
> +                                 controlling this regulator (enable/disable)
> +  Example:
> +	LDO12 {
> +		regulator-name = "V_EMMC_2.8V";
> +		regulator-min-microvolt = <2800000>;
> +		regulator-max-microvolt = <2800000>;
> +		samsung,ext-control-gpios = <&gpk0 2 0>;
> +	};
> +
> +
> +Example:
> +
> +	s2mps11_pmic@66 {
> +		compatible = "samsung,s2mps11-pmic";
> +		reg = <0x66>;
> +
> +		regulators {
> +			ldo1_reg: LDO1 {
> +				regulator-name = "VDD_ABB_3.3V";
> +				regulator-min-microvolt = <3300000>;
> +				regulator-max-microvolt = <3300000>;
> +			};
> +
> +			ldo2_reg: LDO2 {
> +				regulator-name = "VDD_ALIVE_1.1V";
> +				regulator-min-microvolt = <1100000>;
> +				regulator-max-microvolt = <1100000>;
> +				regulator-always-on;
> +			};
> +
> +			buck1_reg: BUCK1 {
> +				regulator-name = "vdd_mif";
> +				regulator-min-microvolt = <950000>;
> +				regulator-max-microvolt = <1350000>;
> +				regulator-always-on;
> +				regulator-boot-on;
> +			};
> +
> +			buck2_reg: BUCK2 {
> +				regulator-name = "vdd_arm";
> +				regulator-min-microvolt = <950000>;
> +				regulator-max-microvolt = <1350000>;
> +				regulator-always-on;
> +				regulator-boot-on;
> +				regulator-ramp-delay = <50000>;
> +			};
> +		};
> +	};
> diff --git a/MAINTAINERS b/MAINTAINERS
> index f3de00113ae8..137284e37250 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -9234,7 +9234,9 @@ F:	drivers/clk/clk-s2mps11.c
>  F:	drivers/rtc/rtc-s5m.c
>  F:	include/linux/mfd/samsung/
>  F:	Documentation/devicetree/bindings/regulator/s5m8767-regulator.txt
> -F:	Documentation/devicetree/bindings/mfd/s2mp*.txt
> +F:	Documentation/devicetree/bindings/mfd/samsung,sec-core.txt
> +F:	Documentation/devicetree/bindings/regulator/samsung,s2m*.txt
> +F:	Documentation/devicetree/bindings/clock/samsung,s2mps11.txt
>  
>  SAMSUNG S5P/EXYNOS4 SOC SERIES CAMERA SUBSYSTEM DRIVERS
>  M:	Kyungmin Park <kyungmin.park@samsung.com>
> -- 
> 1.9.1
> 

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 2/3] dt-bindings: regulator/mfd: Reorganize S5M8767 bindings
  2015-12-04  1:10 ` [PATCH 2/3] dt-bindings: regulator/mfd: Reorganize S5M8767 bindings Krzysztof Kozlowski
  2015-12-04 12:07   ` Mark Brown
@ 2015-12-04 15:20   ` Rob Herring
  2015-12-07  9:37   ` Lee Jones
  2016-01-11  7:51   ` Lee Jones
  3 siblings, 0 replies; 20+ messages in thread
From: Rob Herring @ 2015-12-04 15:20 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Sangbeom Kim, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
	Lee Jones, Kukjin Kim, linux-kernel, linux-samsung-soc,
	devicetree, Michael Turquette, Stephen Boyd, Liam Girdwood,
	Mark Brown, linux-clk

On Fri, Dec 04, 2015 at 10:10:04AM +0900, Krzysztof Kozlowski wrote:
> The regulator/s5m8767-regulator.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,s5m8767.txt),
>  - remove duplicated information,
>  - reorganize the contents to match style of
>    regulator/samsung,s2mps11.txt.
> 
> Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>

Acked-by: Rob Herring <robh@kernel.org>

> ---
>  .../devicetree/bindings/mfd/samsung,sec-core.txt   |   4 +-
>  .../bindings/regulator/s5m8767-regulator.txt       | 163 ---------------------
>  .../bindings/regulator/samsung,s5m8767.txt         | 145 ++++++++++++++++++
>  MAINTAINERS                                        |   2 +-
>  4 files changed, 149 insertions(+), 165 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/regulator/s5m8767-regulator.txt
>  create mode 100644 Documentation/devicetree/bindings/regulator/samsung,s5m8767.txt
> 
> diff --git a/Documentation/devicetree/bindings/mfd/samsung,sec-core.txt b/Documentation/devicetree/bindings/mfd/samsung,sec-core.txt
> index ef0166d0f643..4aeb95c82304 100644
> --- a/Documentation/devicetree/bindings/mfd/samsung,sec-core.txt
> +++ b/Documentation/devicetree/bindings/mfd/samsung,sec-core.txt
> @@ -14,6 +14,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,s2mps11.txt
> + - bindings/regulator/samsung,s5m8767.txt
>   - bindings/clock/samsung,s2mps11.txt
>  
>  
> @@ -23,7 +24,8 @@ Required properties:
>  	- "samsung,s2mps13-pmic",
>  	- "samsung,s2mps14-pmic",
>  	- "samsung,s2mps15-pmic",
> -	- "samsung,s2mpu02-pmic".
> +	- "samsung,s2mpu02-pmic",
> +	- "samsung,s5m8767-pmic".
>   - reg: Specifies the I2C slave address of the pmic block. It should be 0x66.
>  
>  Optional properties:
> diff --git a/Documentation/devicetree/bindings/regulator/s5m8767-regulator.txt b/Documentation/devicetree/bindings/regulator/s5m8767-regulator.txt
> deleted file mode 100644
> index 20191315e444..000000000000
> --- a/Documentation/devicetree/bindings/regulator/s5m8767-regulator.txt
> +++ /dev/null
> @@ -1,163 +0,0 @@
> -* Samsung S5M8767 Voltage and Current Regulator
> -
> -The Samsung S5M8767 is a multi-function device which includes voltage and
> -current regulators, rtc, charger controller and other sub-blocks. It is
> -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 s5m8767.
> -
> -Required properties:
> -- compatible: Should be "samsung,s5m8767-pmic".
> -- reg: Specifies the i2c slave address of the pmic block. It should be 0x66.
> -
> -- s5m8767,pmic-buck2-dvs-voltage: A set of 8 voltage values in micro-volt (uV)
> -  units for buck2 when changing voltage using gpio dvs. Refer to [1] below
> -  for additional information.
> -
> -- s5m8767,pmic-buck3-dvs-voltage: A set of 8 voltage values in micro-volt (uV)
> -  units for buck3 when changing voltage using gpio dvs. Refer to [1] below
> -  for additional information.
> -
> -- s5m8767,pmic-buck4-dvs-voltage: A set of 8 voltage values in micro-volt (uV)
> -  units for buck4 when changing voltage using gpio dvs. Refer to [1] below
> -  for additional information.
> -
> -- s5m8767,pmic-buck-ds-gpios: GPIO specifiers for three host gpio's used
> -  for selecting GPIO DVS lines. It is one-to-one mapped to dvs gpio lines.
> -
> -[1] If none of the 's5m8767,pmic-buck[2/3/4]-uses-gpio-dvs' optional
> -    property is specified, the 's5m8767,pmic-buck[2/3/4]-dvs-voltage'
> -    property should specify atleast one voltage level (which would be a
> -    safe operating voltage).
> -
> -    If either of the 's5m8767,pmic-buck[2/3/4]-uses-gpio-dvs' optional
> -    property is specified, then all the eight voltage values for the
> -    's5m8767,pmic-buck[2/3/4]-dvs-voltage' should be specified.
> -
> -Optional properties:
> -- interrupt-parent: Specifies the phandle of the interrupt controller to which
> -  the interrupts from s5m8767 are delivered to.
> -- interrupts: Interrupt specifiers for two interrupt sources.
> -  - First interrupt specifier is for 'irq1' interrupt.
> -  - Second interrupt specifier is for 'alert' interrupt.
> -- s5m8767,pmic-buck2-uses-gpio-dvs: 'buck2' can be controlled by gpio dvs.
> -- s5m8767,pmic-buck3-uses-gpio-dvs: 'buck3' can be controlled by gpio dvs.
> -- s5m8767,pmic-buck4-uses-gpio-dvs: 'buck4' can be controlled by gpio dvs.
> -
> -Additional properties required if either of the optional properties are used:
> -
> -- s5m8767,pmic-buck234-default-dvs-idx: Default voltage setting selected from
> -  the possible 8 options selectable by the dvs gpios. The value of this
> -  property should be between 0 and 7. If not specified or if out of range, the
> -  default value of this property is set to 0.
> -
> -- s5m8767,pmic-buck-dvs-gpios: GPIO specifiers for three host gpio's used
> -  for dvs. The format of the gpio specifier depends in the gpio controller.
> -
> -Regulators: The regulators of s5m8767 that have to be instantiated should be
> -included in a sub-node named 'regulators'. Regulator nodes included in this
> -sub-node should be of the format as listed below.
> -
> -	regulator_name {
> -		ldo1_reg: LDO1 {
> -			regulator-name = "VDD_ALIVE_1.0V";
> -			regulator-min-microvolt = <1100000>;
> -			regulator-max-microvolt = <1100000>;
> -			regulator-always-on;
> -			regulator-boot-on;
> -			op_mode = <1>; /* Normal Mode */
> -		};
> -	};
> -The above regulator entries are defined in regulator bindings documentation
> -except these properties:
> -	- op_mode: describes the different operating modes of the LDO's with
> -		power mode change in SOC. The different possible values are,
> -		0 - always off mode
> -		1 - on in normal mode
> -		2 - low power mode
> -		3 - suspend mode
> -	- s5m8767,pmic-ext-control-gpios: (optional) GPIO specifier for one
> -		GPIO controlling this regulator (enable/disable); This is
> -		valid only for buck9.
> -
> -The following are the names of the regulators that the s5m8767 pmic block
> -supports. Note: The 'n' in LDOn and BUCKn represents the LDO or BUCK number
> -as per the datasheet of s5m8767.
> -
> -	- LDOn
> -		  - valid values for n are 1 to 28
> -		  - Example: LDO1, LDO2, LDO28
> -	- BUCKn
> -		  - valid values for n are 1 to 9.
> -		  - Example: BUCK1, BUCK2, BUCK9
> -
> -The bindings inside the regulator nodes use the standard regulator bindings
> -which are documented elsewhere.
> -
> -Example:
> -
> -	s5m8767_pmic@66 {
> -		compatible = "samsung,s5m8767-pmic";
> -		reg = <0x66>;
> -
> -		s5m8767,pmic-buck2-uses-gpio-dvs;
> -		s5m8767,pmic-buck3-uses-gpio-dvs;
> -		s5m8767,pmic-buck4-uses-gpio-dvs;
> -
> -		s5m8767,pmic-buck-default-dvs-idx = <0>;
> -
> -		s5m8767,pmic-buck-dvs-gpios = <&gpx0 0 0>, /* DVS1 */
> -						 <&gpx0 1 0>, /* DVS2 */
> -						 <&gpx0 2 0>; /* DVS3 */
> -
> -		s5m8767,pmic-buck-ds-gpios = <&gpx2 3 0>, /* SET1 */
> -						<&gpx2 4 0>, /* SET2 */
> -						<&gpx2 5 0>; /* SET3 */
> -
> -		s5m8767,pmic-buck2-dvs-voltage = <1350000>, <1300000>,
> -						 <1250000>, <1200000>,
> -						 <1150000>, <1100000>,
> -						 <1000000>, <950000>;
> -
> -		s5m8767,pmic-buck3-dvs-voltage = <1100000>, <1100000>,
> -						 <1100000>, <1100000>,
> -						 <1000000>, <1000000>,
> -						 <1000000>, <1000000>;
> -
> -		s5m8767,pmic-buck4-dvs-voltage = <1200000>, <1200000>,
> -						 <1200000>, <1200000>,
> -						 <1200000>, <1200000>,
> -						 <1200000>, <1200000>;
> -
> -		regulators {
> -			ldo1_reg: LDO1 {
> -				regulator-name = "VDD_ABB_3.3V";
> -				regulator-min-microvolt = <3300000>;
> -				regulator-max-microvolt = <3300000>;
> -				op_mode = <1>; /* Normal Mode */
> -			};
> -
> -			ldo2_reg: LDO2 {
> -				regulator-name = "VDD_ALIVE_1.1V";
> -				regulator-min-microvolt = <1100000>;
> -				regulator-max-microvolt = <1100000>;
> -				regulator-always-on;
> -			};
> -
> -			buck1_reg: BUCK1 {
> -				regulator-name = "VDD_MIF_1.2V";
> -				regulator-min-microvolt = <950000>;
> -				regulator-max-microvolt = <1350000>;
> -				regulator-always-on;
> -				regulator-boot-on;
> -			};
> -
> -			vemmc_reg: BUCK9 {
> -				regulator-name = "VMEM_VDD_2.8V";
> -				regulator-min-microvolt = <2800000>;
> -				regulator-max-microvolt = <2800000>;
> -				op_mode = <3>; /* Standby Mode */
> -				s5m8767,pmic-ext-control-gpios = <&gpk0 2 0>;
> -			};
> -		};
> -	};
> diff --git a/Documentation/devicetree/bindings/regulator/samsung,s5m8767.txt b/Documentation/devicetree/bindings/regulator/samsung,s5m8767.txt
> new file mode 100644
> index 000000000000..093edda0c8df
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/regulator/samsung,s5m8767.txt
> @@ -0,0 +1,145 @@
> +Binding for Samsung S5M8767 regulator block
> +===========================================
> +
> +This is a part of device tree bindings for S5M family multi-function devices.
> +More information can be found in bindings/mfd/sec-core.txt file.
> +
> +The S5M8767 device provide buck and LDO regulators.
> +
> +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
> +
> +
> +Required properties of the main device node (the parent!):
> + - s5m8767,pmic-buck2-dvs-voltage: A set of 8 voltage values in micro-volt (uV)
> +   units for buck2 when changing voltage using gpio dvs. Refer to [1] below
> +   for additional information.
> +
> + - s5m8767,pmic-buck3-dvs-voltage: A set of 8 voltage values in micro-volt (uV)
> +   units for buck3 when changing voltage using gpio dvs. Refer to [1] below
> +   for additional information.
> +
> + - s5m8767,pmic-buck4-dvs-voltage: A set of 8 voltage values in micro-volt (uV)
> +   units for buck4 when changing voltage using gpio dvs. Refer to [1] below
> +   for additional information.
> +
> + - s5m8767,pmic-buck-ds-gpios: GPIO specifiers for three host gpio's used
> +   for selecting GPIO DVS lines. It is one-to-one mapped to dvs gpio lines.
> +
> + [1] If none of the 's5m8767,pmic-buck[2/3/4]-uses-gpio-dvs' optional
> +     property is specified, the 's5m8767,pmic-buck[2/3/4]-dvs-voltage'
> +     property should specify atleast one voltage level (which would be a
> +     safe operating voltage).
> +
> +     If either of the 's5m8767,pmic-buck[2/3/4]-uses-gpio-dvs' optional
> +     property is specified, then all the eight voltage values for the
> +     's5m8767,pmic-buck[2/3/4]-dvs-voltage' should be specified.
> +
> +Optional properties of the main device node (the parent!):
> + - s5m8767,pmic-buck2-uses-gpio-dvs: 'buck2' can be controlled by gpio dvs.
> + - s5m8767,pmic-buck3-uses-gpio-dvs: 'buck3' can be controlled by gpio dvs.
> + - s5m8767,pmic-buck4-uses-gpio-dvs: 'buck4' can be controlled by gpio dvs.
> +
> +Additional properties required if either of the optional properties are used:
> +
> + - s5m8767,pmic-buck234-default-dvs-idx: Default voltage setting selected from
> +   the possible 8 options selectable by the dvs gpios. The value of this
> +   property should be between 0 and 7. If not specified or if out of range, the
> +   default value of this property is set to 0.
> +
> + - s5m8767,pmic-buck-dvs-gpios: GPIO specifiers for three host gpio's used
> +   for dvs. The format of the gpio specifier depends in the gpio controller.
> +
> +
> +Names of regulators supported by S5M8767 device:
> +	- LDOn
> +		  - valid values for n are 1 to 28
> +		  - Example: LDO1, LDO2, LDO28
> +	- BUCKn
> +		  - valid values for n are 1 to 9.
> +		  - 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 the nodes under "regulators" sub-node:
> + - op_mode: describes the different operating modes of the LDO's with
> +            power mode change in SOC. The different possible values are,
> +             0 - always off mode
> +             1 - on in normal mode
> +             2 - low power mode
> +             3 - suspend mode
> + - s5m8767,pmic-ext-control-gpios: (optional) GPIO specifier for one
> +                                   GPIO controlling this regulator
> +                                   (enable/disable); This is valid only
> +                                   for buck9.
> +
> +Example:
> +
> +	s5m8767_pmic@66 {
> +		compatible = "samsung,s5m8767-pmic";
> +		reg = <0x66>;
> +
> +		s5m8767,pmic-buck2-uses-gpio-dvs;
> +		s5m8767,pmic-buck3-uses-gpio-dvs;
> +		s5m8767,pmic-buck4-uses-gpio-dvs;
> +
> +		s5m8767,pmic-buck-default-dvs-idx = <0>;
> +
> +		s5m8767,pmic-buck-dvs-gpios = <&gpx0 0 0>, /* DVS1 */
> +						 <&gpx0 1 0>, /* DVS2 */
> +						 <&gpx0 2 0>; /* DVS3 */
> +
> +		s5m8767,pmic-buck-ds-gpios = <&gpx2 3 0>, /* SET1 */
> +						<&gpx2 4 0>, /* SET2 */
> +						<&gpx2 5 0>; /* SET3 */
> +
> +		s5m8767,pmic-buck2-dvs-voltage = <1350000>, <1300000>,
> +						 <1250000>, <1200000>,
> +						 <1150000>, <1100000>,
> +						 <1000000>, <950000>;
> +
> +		s5m8767,pmic-buck3-dvs-voltage = <1100000>, <1100000>,
> +						 <1100000>, <1100000>,
> +						 <1000000>, <1000000>,
> +						 <1000000>, <1000000>;
> +
> +		s5m8767,pmic-buck4-dvs-voltage = <1200000>, <1200000>,
> +						 <1200000>, <1200000>,
> +						 <1200000>, <1200000>,
> +						 <1200000>, <1200000>;
> +
> +		regulators {
> +			ldo1_reg: LDO1 {
> +				regulator-name = "VDD_ABB_3.3V";
> +				regulator-min-microvolt = <3300000>;
> +				regulator-max-microvolt = <3300000>;
> +				op_mode = <1>; /* Normal Mode */
> +			};
> +
> +			ldo2_reg: LDO2 {
> +				regulator-name = "VDD_ALIVE_1.1V";
> +				regulator-min-microvolt = <1100000>;
> +				regulator-max-microvolt = <1100000>;
> +				regulator-always-on;
> +			};
> +
> +			buck1_reg: BUCK1 {
> +				regulator-name = "VDD_MIF_1.2V";
> +				regulator-min-microvolt = <950000>;
> +				regulator-max-microvolt = <1350000>;
> +				regulator-always-on;
> +				regulator-boot-on;
> +			};
> +
> +			vemmc_reg: BUCK9 {
> +				regulator-name = "VMEM_VDD_2.8V";
> +				regulator-min-microvolt = <2800000>;
> +				regulator-max-microvolt = <2800000>;
> +				op_mode = <3>; /* Standby Mode */
> +				s5m8767,pmic-ext-control-gpios = <&gpk0 2 0>;
> +			};
> +		};
> +	};
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 137284e37250..7e1db5746ee4 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -9233,9 +9233,9 @@ F:	drivers/regulator/s5m*.c
>  F:	drivers/clk/clk-s2mps11.c
>  F:	drivers/rtc/rtc-s5m.c
>  F:	include/linux/mfd/samsung/
> -F:	Documentation/devicetree/bindings/regulator/s5m8767-regulator.txt
>  F:	Documentation/devicetree/bindings/mfd/samsung,sec-core.txt
>  F:	Documentation/devicetree/bindings/regulator/samsung,s2m*.txt
> +F:	Documentation/devicetree/bindings/regulator/samsung,s5m*.txt
>  F:	Documentation/devicetree/bindings/clock/samsung,s2mps11.txt
>  
>  SAMSUNG S5P/EXYNOS4 SOC SERIES CAMERA SUBSYSTEM DRIVERS
> -- 
> 1.9.1
> 

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 3/3] dt-bindings: regulator/mfd: Reorganize S2MPA01 bindings
  2015-12-04  1:10 ` [PATCH 3/3] dt-bindings: regulator/mfd: Reorganize S2MPA01 bindings Krzysztof Kozlowski
  2015-12-04 12:11   ` Mark Brown
@ 2015-12-04 15:55   ` Rob Herring
  2015-12-07  1:05     ` Krzysztof Kozlowski
  2015-12-07  9:37   ` Lee Jones
  2016-01-11  7:51   ` Lee Jones
  3 siblings, 1 reply; 20+ messages in thread
From: Rob Herring @ 2015-12-04 15:55 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Sangbeom Kim, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
	Lee Jones, Kukjin Kim, linux-kernel, linux-samsung-soc,
	devicetree, Michael Turquette, Stephen Boyd, Liam Girdwood,
	Mark Brown, linux-clk

On Fri, Dec 04, 2015 at 10:10:05AM +0900, Krzysztof Kozlowski wrote:
> 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 <k.kozlowski@samsung.com>

Next time, use git format-patch -M option.

Acked-by: Rob Herring <robh@kernel.org>

> ---
>  Documentation/devicetree/bindings/mfd/s2mpa01.txt  | 90 ----------------------
>  .../devicetree/bindings/mfd/samsung,sec-core.txt   |  4 +-
>  .../bindings/regulator/samsung,s2mpa01.txt         | 79 +++++++++++++++++++
>  3 files changed, 82 insertions(+), 91 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/mfd/s2mpa01.txt
>  create mode 100644 Documentation/devicetree/bindings/regulator/samsung,s2mpa01.txt
> 
> diff --git a/Documentation/devicetree/bindings/mfd/s2mpa01.txt b/Documentation/devicetree/bindings/mfd/s2mpa01.txt
> deleted file mode 100644
> index c13d3d8c3947..000000000000
> --- a/Documentation/devicetree/bindings/mfd/s2mpa01.txt
> +++ /dev/null
> @@ -1,90 +0,0 @@
> -
> -* Samsung S2MPA01 Voltage and Current Regulator
> -
> -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.
> -
> -Required properties:
> -- compatible: Should be "samsung,s2mpa01-pmic".
> -- reg: Specifies the I2C slave address of the PMIC block. It should be 0x66.
> -
> -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=<value>.
> -
> -  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.
> -
> -	- 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
> -
> -Example:
> -
> -	s2mpa01_pmic@66 {
> -		compatible = "samsung,s2mpa01-pmic";
> -		reg = <0x66>;
> -
> -		regulators {
> -			ldo1_reg: LDO1 {
> -				regulator-name = "VDD_ALIVE";
> -				regulator-min-microvolt = <1000000>;
> -				regulator-max-microvolt = <1000000>;
> -			};
> -
> -			ldo2_reg: LDO2 {
> -				regulator-name = "VDDQ_MMC2";
> -				regulator-min-microvolt = <2800000>;
> -				regulator-max-microvolt = <2800000>;
> -				regulator-always-on;
> -			};
> -
> -			buck1_reg: BUCK1 {
> -				regulator-name = "vdd_mif";
> -				regulator-min-microvolt = <950000>;
> -				regulator-max-microvolt = <1350000>;
> -				regulator-always-on;
> -				regulator-boot-on;
> -			};
> -
> -			buck2_reg: BUCK2 {
> -				regulator-name = "vdd_arm";
> -				regulator-min-microvolt = <950000>;
> -				regulator-max-microvolt = <1350000>;
> -				regulator-always-on;
> -				regulator-boot-on;
> -				regulator-ramp-delay = <50000>;
> -			};
> -		};
> -	};
> 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/regulator/samsung,s2mpa01.txt b/Documentation/devicetree/bindings/regulator/samsung,s2mpa01.txt
> new file mode 100644
> index 000000000000..bae3c7f838cf
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/regulator/samsung,s2mpa01.txt
> @@ -0,0 +1,79 @@
> +Binding for Samsung S2MPA01 regulator block
> +===========================================
> +
> +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 S2MPA01 device provide buck and LDO regulators.
> +
> +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
> +
> +
> +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:
> +
> +	s2mpa01_pmic@66 {
> +		compatible = "samsung,s2mpa01-pmic";
> +		reg = <0x66>;
> +
> +		regulators {
> +			ldo1_reg: LDO1 {
> +				regulator-name = "VDD_ALIVE";
> +				regulator-min-microvolt = <1000000>;
> +				regulator-max-microvolt = <1000000>;
> +			};
> +
> +			ldo2_reg: LDO2 {
> +				regulator-name = "VDDQ_MMC2";
> +				regulator-min-microvolt = <2800000>;
> +				regulator-max-microvolt = <2800000>;
> +				regulator-always-on;
> +			};
> +
> +			buck1_reg: BUCK1 {
> +				regulator-name = "vdd_mif";
> +				regulator-min-microvolt = <950000>;
> +				regulator-max-microvolt = <1350000>;
> +				regulator-always-on;
> +				regulator-boot-on;
> +			};
> +
> +			buck2_reg: BUCK2 {
> +				regulator-name = "vdd_arm";
> +				regulator-min-microvolt = <950000>;
> +				regulator-max-microvolt = <1350000>;
> +				regulator-always-on;
> +				regulator-boot-on;
> +				regulator-ramp-delay = <50000>;
> +			};
> +		};
> +	};
> -- 
> 1.9.1
> 

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 3/3] dt-bindings: regulator/mfd: Reorganize S2MPA01 bindings
  2015-12-04 15:55   ` Rob Herring
@ 2015-12-07  1:05     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 20+ messages in thread
From: Krzysztof Kozlowski @ 2015-12-07  1:05 UTC (permalink / raw)
  To: Rob Herring
  Cc: Sangbeom Kim, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
	Lee Jones, Kukjin Kim, linux-kernel, linux-samsung-soc,
	devicetree, Michael Turquette, Stephen Boyd, Liam Girdwood,
	Mark Brown, linux-clk

On 05.12.2015 00:55, Rob Herring wrote:
> On Fri, Dec 04, 2015 at 10:10:05AM +0900, Krzysztof Kozlowski wrote:
>> 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 <k.kozlowski@samsung.com>
> 
> Next time, use git format-patch -M option.
> 
> Acked-by: Rob Herring <robh@kernel.org>
> 

It is already used but I also changed the style and formatting to the
similarity dropped below default level of 50%. I could of course first
rename and then change formatting/contents but that would be a little
bit too much for this simple patchset, don't you think?

Anyway thanks for acks!

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 3/3] dt-bindings: regulator/mfd: Reorganize S2MPA01 bindings
  2015-12-04 12:11   ` Mark Brown
@ 2015-12-07  1:07     ` Krzysztof Kozlowski
  2016-01-11  7:56     ` Lee Jones
  1 sibling, 0 replies; 20+ messages in thread
From: Krzysztof Kozlowski @ 2015-12-07  1:07 UTC (permalink / raw)
  To: Mark Brown
  Cc: Sangbeom Kim, Rob Herring, Pawel Moll, Mark Rutland,
	Ian Campbell, Kumar Gala, Lee Jones, Kukjin Kim, linux-kernel,
	linux-samsung-soc, devicetree, Michael Turquette, Stephen Boyd,
	Liam Girdwood, linux-clk

On 04.12.2015 21:11, Mark Brown wrote:
> On Fri, Dec 04, 2015 at 10:10:05AM +0900, Krzysztof Kozlowski wrote:
>> 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:
> 
> Acked-by: Mark Brown <broonie@kernel.org>
> 
>>  - add company prefix to file name (regulator/samsung,s2mpa01.txt),
> 
> I'm not 100% convinced about these prefixes BTW, the duplication isn't
> usually an issue within a subsystem.  They don't do any harm either
> though.
> 

I am not convinced neither... Some of newer documents use prefixes so I
had an impression that this is a more organized way. If there are
objections I can drop it.

Thanks for ack!

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 3/3] dt-bindings: regulator/mfd: Reorganize S2MPA01 bindings
  2015-12-04  1:10 ` [PATCH 3/3] dt-bindings: regulator/mfd: Reorganize S2MPA01 bindings Krzysztof Kozlowski
  2015-12-04 12:11   ` Mark Brown
  2015-12-04 15:55   ` Rob Herring
@ 2015-12-07  9:37   ` Lee Jones
  2016-01-11  7:51   ` Lee Jones
  3 siblings, 0 replies; 20+ messages in thread
From: Lee Jones @ 2015-12-07  9:37 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Sangbeom Kim, Rob Herring, Pawel Moll, Mark Rutland,
	Ian Campbell, Kumar Gala, Kukjin Kim, linux-kernel,
	linux-samsung-soc, devicetree, Michael Turquette, Stephen Boyd,
	Liam Girdwood, Mark Brown, linux-clk

On Fri, 04 Dec 2015, Krzysztof Kozlowski wrote:

> 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 <k.kozlowski@samsung.com>
> ---
>  Documentation/devicetree/bindings/mfd/s2mpa01.txt  | 90 ----------------------
>  .../devicetree/bindings/mfd/samsung,sec-core.txt   |  4 +-

Acked-by: Lee Jones <lee.jones@linaro.org>

>  .../bindings/regulator/samsung,s2mpa01.txt         | 79 +++++++++++++++++++
>  3 files changed, 82 insertions(+), 91 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/mfd/s2mpa01.txt
>  create mode 100644 Documentation/devicetree/bindings/regulator/samsung,s2mpa01.txt
> 
> diff --git a/Documentation/devicetree/bindings/mfd/s2mpa01.txt b/Documentation/devicetree/bindings/mfd/s2mpa01.txt
> deleted file mode 100644
> index c13d3d8c3947..000000000000
> --- a/Documentation/devicetree/bindings/mfd/s2mpa01.txt
> +++ /dev/null
> @@ -1,90 +0,0 @@
> -
> -* Samsung S2MPA01 Voltage and Current Regulator
> -
> -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.
> -
> -Required properties:
> -- compatible: Should be "samsung,s2mpa01-pmic".
> -- reg: Specifies the I2C slave address of the PMIC block. It should be 0x66.
> -
> -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=<value>.
> -
> -  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.
> -
> -	- 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
> -
> -Example:
> -
> -	s2mpa01_pmic@66 {
> -		compatible = "samsung,s2mpa01-pmic";
> -		reg = <0x66>;
> -
> -		regulators {
> -			ldo1_reg: LDO1 {
> -				regulator-name = "VDD_ALIVE";
> -				regulator-min-microvolt = <1000000>;
> -				regulator-max-microvolt = <1000000>;
> -			};
> -
> -			ldo2_reg: LDO2 {
> -				regulator-name = "VDDQ_MMC2";
> -				regulator-min-microvolt = <2800000>;
> -				regulator-max-microvolt = <2800000>;
> -				regulator-always-on;
> -			};
> -
> -			buck1_reg: BUCK1 {
> -				regulator-name = "vdd_mif";
> -				regulator-min-microvolt = <950000>;
> -				regulator-max-microvolt = <1350000>;
> -				regulator-always-on;
> -				regulator-boot-on;
> -			};
> -
> -			buck2_reg: BUCK2 {
> -				regulator-name = "vdd_arm";
> -				regulator-min-microvolt = <950000>;
> -				regulator-max-microvolt = <1350000>;
> -				regulator-always-on;
> -				regulator-boot-on;
> -				regulator-ramp-delay = <50000>;
> -			};
> -		};
> -	};
> 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/regulator/samsung,s2mpa01.txt b/Documentation/devicetree/bindings/regulator/samsung,s2mpa01.txt
> new file mode 100644
> index 000000000000..bae3c7f838cf
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/regulator/samsung,s2mpa01.txt
> @@ -0,0 +1,79 @@
> +Binding for Samsung S2MPA01 regulator block
> +===========================================
> +
> +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 S2MPA01 device provide buck and LDO regulators.
> +
> +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
> +
> +
> +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:
> +
> +	s2mpa01_pmic@66 {
> +		compatible = "samsung,s2mpa01-pmic";
> +		reg = <0x66>;
> +
> +		regulators {
> +			ldo1_reg: LDO1 {
> +				regulator-name = "VDD_ALIVE";
> +				regulator-min-microvolt = <1000000>;
> +				regulator-max-microvolt = <1000000>;
> +			};
> +
> +			ldo2_reg: LDO2 {
> +				regulator-name = "VDDQ_MMC2";
> +				regulator-min-microvolt = <2800000>;
> +				regulator-max-microvolt = <2800000>;
> +				regulator-always-on;
> +			};
> +
> +			buck1_reg: BUCK1 {
> +				regulator-name = "vdd_mif";
> +				regulator-min-microvolt = <950000>;
> +				regulator-max-microvolt = <1350000>;
> +				regulator-always-on;
> +				regulator-boot-on;
> +			};
> +
> +			buck2_reg: BUCK2 {
> +				regulator-name = "vdd_arm";
> +				regulator-min-microvolt = <950000>;
> +				regulator-max-microvolt = <1350000>;
> +				regulator-always-on;
> +				regulator-boot-on;
> +				regulator-ramp-delay = <50000>;
> +			};
> +		};
> +	};

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 2/3] dt-bindings: regulator/mfd: Reorganize S5M8767 bindings
  2015-12-04  1:10 ` [PATCH 2/3] dt-bindings: regulator/mfd: Reorganize S5M8767 bindings Krzysztof Kozlowski
  2015-12-04 12:07   ` Mark Brown
  2015-12-04 15:20   ` Rob Herring
@ 2015-12-07  9:37   ` Lee Jones
  2016-01-11  7:51   ` Lee Jones
  3 siblings, 0 replies; 20+ messages in thread
From: Lee Jones @ 2015-12-07  9:37 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Sangbeom Kim, Rob Herring, Pawel Moll, Mark Rutland,
	Ian Campbell, Kumar Gala, Kukjin Kim, linux-kernel,
	linux-samsung-soc, devicetree, Michael Turquette, Stephen Boyd,
	Liam Girdwood, Mark Brown, linux-clk

On Fri, 04 Dec 2015, Krzysztof Kozlowski wrote:

> The regulator/s5m8767-regulator.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,s5m8767.txt),
>  - remove duplicated information,
>  - reorganize the contents to match style of
>    regulator/samsung,s2mps11.txt.
> 
> Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> ---
>  .../devicetree/bindings/mfd/samsung,sec-core.txt   |   4 +-

Acked-by: Lee Jones <lee.jones@linaro.org>

>  .../bindings/regulator/s5m8767-regulator.txt       | 163 ---------------------
>  .../bindings/regulator/samsung,s5m8767.txt         | 145 ++++++++++++++++++
>  MAINTAINERS                                        |   2 +-
>  4 files changed, 149 insertions(+), 165 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/regulator/s5m8767-regulator.txt
>  create mode 100644 Documentation/devicetree/bindings/regulator/samsung,s5m8767.txt
> 
> diff --git a/Documentation/devicetree/bindings/mfd/samsung,sec-core.txt b/Documentation/devicetree/bindings/mfd/samsung,sec-core.txt
> index ef0166d0f643..4aeb95c82304 100644
> --- a/Documentation/devicetree/bindings/mfd/samsung,sec-core.txt
> +++ b/Documentation/devicetree/bindings/mfd/samsung,sec-core.txt
> @@ -14,6 +14,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,s2mps11.txt
> + - bindings/regulator/samsung,s5m8767.txt
>   - bindings/clock/samsung,s2mps11.txt
>  
>  
> @@ -23,7 +24,8 @@ Required properties:
>  	- "samsung,s2mps13-pmic",
>  	- "samsung,s2mps14-pmic",
>  	- "samsung,s2mps15-pmic",
> -	- "samsung,s2mpu02-pmic".
> +	- "samsung,s2mpu02-pmic",
> +	- "samsung,s5m8767-pmic".
>   - reg: Specifies the I2C slave address of the pmic block. It should be 0x66.
>  
>  Optional properties:
> diff --git a/Documentation/devicetree/bindings/regulator/s5m8767-regulator.txt b/Documentation/devicetree/bindings/regulator/s5m8767-regulator.txt
> deleted file mode 100644
> index 20191315e444..000000000000
> --- a/Documentation/devicetree/bindings/regulator/s5m8767-regulator.txt
> +++ /dev/null
> @@ -1,163 +0,0 @@
> -* Samsung S5M8767 Voltage and Current Regulator
> -
> -The Samsung S5M8767 is a multi-function device which includes voltage and
> -current regulators, rtc, charger controller and other sub-blocks. It is
> -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 s5m8767.
> -
> -Required properties:
> -- compatible: Should be "samsung,s5m8767-pmic".
> -- reg: Specifies the i2c slave address of the pmic block. It should be 0x66.
> -
> -- s5m8767,pmic-buck2-dvs-voltage: A set of 8 voltage values in micro-volt (uV)
> -  units for buck2 when changing voltage using gpio dvs. Refer to [1] below
> -  for additional information.
> -
> -- s5m8767,pmic-buck3-dvs-voltage: A set of 8 voltage values in micro-volt (uV)
> -  units for buck3 when changing voltage using gpio dvs. Refer to [1] below
> -  for additional information.
> -
> -- s5m8767,pmic-buck4-dvs-voltage: A set of 8 voltage values in micro-volt (uV)
> -  units for buck4 when changing voltage using gpio dvs. Refer to [1] below
> -  for additional information.
> -
> -- s5m8767,pmic-buck-ds-gpios: GPIO specifiers for three host gpio's used
> -  for selecting GPIO DVS lines. It is one-to-one mapped to dvs gpio lines.
> -
> -[1] If none of the 's5m8767,pmic-buck[2/3/4]-uses-gpio-dvs' optional
> -    property is specified, the 's5m8767,pmic-buck[2/3/4]-dvs-voltage'
> -    property should specify atleast one voltage level (which would be a
> -    safe operating voltage).
> -
> -    If either of the 's5m8767,pmic-buck[2/3/4]-uses-gpio-dvs' optional
> -    property is specified, then all the eight voltage values for the
> -    's5m8767,pmic-buck[2/3/4]-dvs-voltage' should be specified.
> -
> -Optional properties:
> -- interrupt-parent: Specifies the phandle of the interrupt controller to which
> -  the interrupts from s5m8767 are delivered to.
> -- interrupts: Interrupt specifiers for two interrupt sources.
> -  - First interrupt specifier is for 'irq1' interrupt.
> -  - Second interrupt specifier is for 'alert' interrupt.
> -- s5m8767,pmic-buck2-uses-gpio-dvs: 'buck2' can be controlled by gpio dvs.
> -- s5m8767,pmic-buck3-uses-gpio-dvs: 'buck3' can be controlled by gpio dvs.
> -- s5m8767,pmic-buck4-uses-gpio-dvs: 'buck4' can be controlled by gpio dvs.
> -
> -Additional properties required if either of the optional properties are used:
> -
> -- s5m8767,pmic-buck234-default-dvs-idx: Default voltage setting selected from
> -  the possible 8 options selectable by the dvs gpios. The value of this
> -  property should be between 0 and 7. If not specified or if out of range, the
> -  default value of this property is set to 0.
> -
> -- s5m8767,pmic-buck-dvs-gpios: GPIO specifiers for three host gpio's used
> -  for dvs. The format of the gpio specifier depends in the gpio controller.
> -
> -Regulators: The regulators of s5m8767 that have to be instantiated should be
> -included in a sub-node named 'regulators'. Regulator nodes included in this
> -sub-node should be of the format as listed below.
> -
> -	regulator_name {
> -		ldo1_reg: LDO1 {
> -			regulator-name = "VDD_ALIVE_1.0V";
> -			regulator-min-microvolt = <1100000>;
> -			regulator-max-microvolt = <1100000>;
> -			regulator-always-on;
> -			regulator-boot-on;
> -			op_mode = <1>; /* Normal Mode */
> -		};
> -	};
> -The above regulator entries are defined in regulator bindings documentation
> -except these properties:
> -	- op_mode: describes the different operating modes of the LDO's with
> -		power mode change in SOC. The different possible values are,
> -		0 - always off mode
> -		1 - on in normal mode
> -		2 - low power mode
> -		3 - suspend mode
> -	- s5m8767,pmic-ext-control-gpios: (optional) GPIO specifier for one
> -		GPIO controlling this regulator (enable/disable); This is
> -		valid only for buck9.
> -
> -The following are the names of the regulators that the s5m8767 pmic block
> -supports. Note: The 'n' in LDOn and BUCKn represents the LDO or BUCK number
> -as per the datasheet of s5m8767.
> -
> -	- LDOn
> -		  - valid values for n are 1 to 28
> -		  - Example: LDO1, LDO2, LDO28
> -	- BUCKn
> -		  - valid values for n are 1 to 9.
> -		  - Example: BUCK1, BUCK2, BUCK9
> -
> -The bindings inside the regulator nodes use the standard regulator bindings
> -which are documented elsewhere.
> -
> -Example:
> -
> -	s5m8767_pmic@66 {
> -		compatible = "samsung,s5m8767-pmic";
> -		reg = <0x66>;
> -
> -		s5m8767,pmic-buck2-uses-gpio-dvs;
> -		s5m8767,pmic-buck3-uses-gpio-dvs;
> -		s5m8767,pmic-buck4-uses-gpio-dvs;
> -
> -		s5m8767,pmic-buck-default-dvs-idx = <0>;
> -
> -		s5m8767,pmic-buck-dvs-gpios = <&gpx0 0 0>, /* DVS1 */
> -						 <&gpx0 1 0>, /* DVS2 */
> -						 <&gpx0 2 0>; /* DVS3 */
> -
> -		s5m8767,pmic-buck-ds-gpios = <&gpx2 3 0>, /* SET1 */
> -						<&gpx2 4 0>, /* SET2 */
> -						<&gpx2 5 0>; /* SET3 */
> -
> -		s5m8767,pmic-buck2-dvs-voltage = <1350000>, <1300000>,
> -						 <1250000>, <1200000>,
> -						 <1150000>, <1100000>,
> -						 <1000000>, <950000>;
> -
> -		s5m8767,pmic-buck3-dvs-voltage = <1100000>, <1100000>,
> -						 <1100000>, <1100000>,
> -						 <1000000>, <1000000>,
> -						 <1000000>, <1000000>;
> -
> -		s5m8767,pmic-buck4-dvs-voltage = <1200000>, <1200000>,
> -						 <1200000>, <1200000>,
> -						 <1200000>, <1200000>,
> -						 <1200000>, <1200000>;
> -
> -		regulators {
> -			ldo1_reg: LDO1 {
> -				regulator-name = "VDD_ABB_3.3V";
> -				regulator-min-microvolt = <3300000>;
> -				regulator-max-microvolt = <3300000>;
> -				op_mode = <1>; /* Normal Mode */
> -			};
> -
> -			ldo2_reg: LDO2 {
> -				regulator-name = "VDD_ALIVE_1.1V";
> -				regulator-min-microvolt = <1100000>;
> -				regulator-max-microvolt = <1100000>;
> -				regulator-always-on;
> -			};
> -
> -			buck1_reg: BUCK1 {
> -				regulator-name = "VDD_MIF_1.2V";
> -				regulator-min-microvolt = <950000>;
> -				regulator-max-microvolt = <1350000>;
> -				regulator-always-on;
> -				regulator-boot-on;
> -			};
> -
> -			vemmc_reg: BUCK9 {
> -				regulator-name = "VMEM_VDD_2.8V";
> -				regulator-min-microvolt = <2800000>;
> -				regulator-max-microvolt = <2800000>;
> -				op_mode = <3>; /* Standby Mode */
> -				s5m8767,pmic-ext-control-gpios = <&gpk0 2 0>;
> -			};
> -		};
> -	};
> diff --git a/Documentation/devicetree/bindings/regulator/samsung,s5m8767.txt b/Documentation/devicetree/bindings/regulator/samsung,s5m8767.txt
> new file mode 100644
> index 000000000000..093edda0c8df
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/regulator/samsung,s5m8767.txt
> @@ -0,0 +1,145 @@
> +Binding for Samsung S5M8767 regulator block
> +===========================================
> +
> +This is a part of device tree bindings for S5M family multi-function devices.
> +More information can be found in bindings/mfd/sec-core.txt file.
> +
> +The S5M8767 device provide buck and LDO regulators.
> +
> +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
> +
> +
> +Required properties of the main device node (the parent!):
> + - s5m8767,pmic-buck2-dvs-voltage: A set of 8 voltage values in micro-volt (uV)
> +   units for buck2 when changing voltage using gpio dvs. Refer to [1] below
> +   for additional information.
> +
> + - s5m8767,pmic-buck3-dvs-voltage: A set of 8 voltage values in micro-volt (uV)
> +   units for buck3 when changing voltage using gpio dvs. Refer to [1] below
> +   for additional information.
> +
> + - s5m8767,pmic-buck4-dvs-voltage: A set of 8 voltage values in micro-volt (uV)
> +   units for buck4 when changing voltage using gpio dvs. Refer to [1] below
> +   for additional information.
> +
> + - s5m8767,pmic-buck-ds-gpios: GPIO specifiers for three host gpio's used
> +   for selecting GPIO DVS lines. It is one-to-one mapped to dvs gpio lines.
> +
> + [1] If none of the 's5m8767,pmic-buck[2/3/4]-uses-gpio-dvs' optional
> +     property is specified, the 's5m8767,pmic-buck[2/3/4]-dvs-voltage'
> +     property should specify atleast one voltage level (which would be a
> +     safe operating voltage).
> +
> +     If either of the 's5m8767,pmic-buck[2/3/4]-uses-gpio-dvs' optional
> +     property is specified, then all the eight voltage values for the
> +     's5m8767,pmic-buck[2/3/4]-dvs-voltage' should be specified.
> +
> +Optional properties of the main device node (the parent!):
> + - s5m8767,pmic-buck2-uses-gpio-dvs: 'buck2' can be controlled by gpio dvs.
> + - s5m8767,pmic-buck3-uses-gpio-dvs: 'buck3' can be controlled by gpio dvs.
> + - s5m8767,pmic-buck4-uses-gpio-dvs: 'buck4' can be controlled by gpio dvs.
> +
> +Additional properties required if either of the optional properties are used:
> +
> + - s5m8767,pmic-buck234-default-dvs-idx: Default voltage setting selected from
> +   the possible 8 options selectable by the dvs gpios. The value of this
> +   property should be between 0 and 7. If not specified or if out of range, the
> +   default value of this property is set to 0.
> +
> + - s5m8767,pmic-buck-dvs-gpios: GPIO specifiers for three host gpio's used
> +   for dvs. The format of the gpio specifier depends in the gpio controller.
> +
> +
> +Names of regulators supported by S5M8767 device:
> +	- LDOn
> +		  - valid values for n are 1 to 28
> +		  - Example: LDO1, LDO2, LDO28
> +	- BUCKn
> +		  - valid values for n are 1 to 9.
> +		  - 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 the nodes under "regulators" sub-node:
> + - op_mode: describes the different operating modes of the LDO's with
> +            power mode change in SOC. The different possible values are,
> +             0 - always off mode
> +             1 - on in normal mode
> +             2 - low power mode
> +             3 - suspend mode
> + - s5m8767,pmic-ext-control-gpios: (optional) GPIO specifier for one
> +                                   GPIO controlling this regulator
> +                                   (enable/disable); This is valid only
> +                                   for buck9.
> +
> +Example:
> +
> +	s5m8767_pmic@66 {
> +		compatible = "samsung,s5m8767-pmic";
> +		reg = <0x66>;
> +
> +		s5m8767,pmic-buck2-uses-gpio-dvs;
> +		s5m8767,pmic-buck3-uses-gpio-dvs;
> +		s5m8767,pmic-buck4-uses-gpio-dvs;
> +
> +		s5m8767,pmic-buck-default-dvs-idx = <0>;
> +
> +		s5m8767,pmic-buck-dvs-gpios = <&gpx0 0 0>, /* DVS1 */
> +						 <&gpx0 1 0>, /* DVS2 */
> +						 <&gpx0 2 0>; /* DVS3 */
> +
> +		s5m8767,pmic-buck-ds-gpios = <&gpx2 3 0>, /* SET1 */
> +						<&gpx2 4 0>, /* SET2 */
> +						<&gpx2 5 0>; /* SET3 */
> +
> +		s5m8767,pmic-buck2-dvs-voltage = <1350000>, <1300000>,
> +						 <1250000>, <1200000>,
> +						 <1150000>, <1100000>,
> +						 <1000000>, <950000>;
> +
> +		s5m8767,pmic-buck3-dvs-voltage = <1100000>, <1100000>,
> +						 <1100000>, <1100000>,
> +						 <1000000>, <1000000>,
> +						 <1000000>, <1000000>;
> +
> +		s5m8767,pmic-buck4-dvs-voltage = <1200000>, <1200000>,
> +						 <1200000>, <1200000>,
> +						 <1200000>, <1200000>,
> +						 <1200000>, <1200000>;
> +
> +		regulators {
> +			ldo1_reg: LDO1 {
> +				regulator-name = "VDD_ABB_3.3V";
> +				regulator-min-microvolt = <3300000>;
> +				regulator-max-microvolt = <3300000>;
> +				op_mode = <1>; /* Normal Mode */
> +			};
> +
> +			ldo2_reg: LDO2 {
> +				regulator-name = "VDD_ALIVE_1.1V";
> +				regulator-min-microvolt = <1100000>;
> +				regulator-max-microvolt = <1100000>;
> +				regulator-always-on;
> +			};
> +
> +			buck1_reg: BUCK1 {
> +				regulator-name = "VDD_MIF_1.2V";
> +				regulator-min-microvolt = <950000>;
> +				regulator-max-microvolt = <1350000>;
> +				regulator-always-on;
> +				regulator-boot-on;
> +			};
> +
> +			vemmc_reg: BUCK9 {
> +				regulator-name = "VMEM_VDD_2.8V";
> +				regulator-min-microvolt = <2800000>;
> +				regulator-max-microvolt = <2800000>;
> +				op_mode = <3>; /* Standby Mode */
> +				s5m8767,pmic-ext-control-gpios = <&gpk0 2 0>;
> +			};
> +		};
> +	};
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 137284e37250..7e1db5746ee4 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -9233,9 +9233,9 @@ F:	drivers/regulator/s5m*.c
>  F:	drivers/clk/clk-s2mps11.c
>  F:	drivers/rtc/rtc-s5m.c
>  F:	include/linux/mfd/samsung/
> -F:	Documentation/devicetree/bindings/regulator/s5m8767-regulator.txt
>  F:	Documentation/devicetree/bindings/mfd/samsung,sec-core.txt
>  F:	Documentation/devicetree/bindings/regulator/samsung,s2m*.txt
> +F:	Documentation/devicetree/bindings/regulator/samsung,s5m*.txt
>  F:	Documentation/devicetree/bindings/clock/samsung,s2mps11.txt
>  
>  SAMSUNG S5P/EXYNOS4 SOC SERIES CAMERA SUBSYSTEM DRIVERS

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 1/3] dt-bindings: regulator/clock/mfd: Reorganize S2MPS-family bindings
  2015-12-04  1:10 ` [PATCH 1/3] dt-bindings: regulator/clock/mfd: Reorganize S2MPS-family bindings Krzysztof Kozlowski
  2015-12-04 12:06   ` Mark Brown
  2015-12-04 15:13   ` Rob Herring
@ 2015-12-07  9:38   ` Lee Jones
  2015-12-24  7:20   ` Michael Turquette
  2016-01-11  7:50   ` Lee Jones
  4 siblings, 0 replies; 20+ messages in thread
From: Lee Jones @ 2015-12-07  9:38 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Sangbeom Kim, Rob Herring, Pawel Moll, Mark Rutland,
	Ian Campbell, Kumar Gala, Kukjin Kim, linux-kernel,
	linux-samsung-soc, devicetree, Michael Turquette, Stephen Boyd,
	Liam Girdwood, Mark Brown, linux-clk

On Fri, 04 Dec 2015, Krzysztof Kozlowski wrote:

> Bindings for Samsung S2M and S5M family PMICs are in mess. They are
> spread over different files and subdirectories in a non-consistent way.
> The devices and respective drivers for them share a lot in common so
> everything could be organized in a more readable way.
> 
> Reorganize the S2MPS11/13/14/15 Device Tree bindings to match the
> drivers for this family of devices:
>  - move mfd/s2mps11.txt to mfd/samsung,sec-core.txt for the main MFD
>    driver (common for entire family),
>  - split clock block to clock/samsung,s2mps11.txt,
>  - split regulator block to regulator/samsung,s2mps11.txt.
> 
> Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> ---
>  .../devicetree/bindings/clock/samsung,s2mps11.txt  |  49 +++++++
>  Documentation/devicetree/bindings/mfd/s2mps11.txt  | 153 ---------------------
>  .../devicetree/bindings/mfd/samsung,sec-core.txt   |  84 +++++++++++

Acked-by: Lee Jones <lee.jones@linaro.org>

>  .../bindings/regulator/samsung,s2mps11.txt         | 102 ++++++++++++++
>  MAINTAINERS                                        |   4 +-
>  5 files changed, 238 insertions(+), 154 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/clock/samsung,s2mps11.txt
>  delete mode 100644 Documentation/devicetree/bindings/mfd/s2mps11.txt
>  create mode 100644 Documentation/devicetree/bindings/mfd/samsung,sec-core.txt
>  create mode 100644 Documentation/devicetree/bindings/regulator/samsung,s2mps11.txt
> 
> diff --git a/Documentation/devicetree/bindings/clock/samsung,s2mps11.txt b/Documentation/devicetree/bindings/clock/samsung,s2mps11.txt
> new file mode 100644
> index 000000000000..2726c1d58a79
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/clock/samsung,s2mps11.txt
> @@ -0,0 +1,49 @@
> +Binding for Samsung S2M and S5M family clock generator block
> +============================================================
> +
> +This is a part of device tree bindings for S2M and S5M family multi-function
> +devices.
> +More information can be found in bindings/mfd/sec-core.txt file.
> +
> +The S2MPS11/13/15 and S5M8767 provide three(AP/CP/BT) buffered 32.768 kHz
> +outputs. The S2MPS14 provides two (AP/BT) buffered 32.768 KHz outputs.
> +
> +To register these as clocks with common clock framework instantiate under
> +main device node a sub-node named "clocks".
> +
> +It uses the common clock binding documented in:
> + - Documentation/devicetree/bindings/clock/clock-bindings.txt
> +
> +
> +Required properties of the "clocks" sub-node:
> + - #clock-cells: should be 1.
> + - compatible: Should be one of: "samsung,s2mps11-clk", "samsung,s2mps13-clk",
> +               "samsung,s2mps14-clk", "samsung,s5m8767-clk"
> +   The S2MPS15 uses the same compatible as S2MPS13, as both provides similar
> +   clocks.
> +
> +
> +Each clock is assigned an identifier and client nodes use this identifier
> +to specify the clock which they consume.
> +    Clock               ID           Devices
> +    ----------------------------------------------------------
> +    32KhzAP		0            S2MPS11/13/14/15, S5M8767
> +    32KhzCP		1            S2MPS11/13/15, S5M8767
> +    32KhzBT		2            S2MPS11/13/14/15, S5M8767
> +
> +Include dt-bindings/clock/samsung,s2mps11.h file to use preprocessor defines
> +in device tree sources.
> +
> +
> +Example:
> +
> +	s2mps11_pmic@66 {
> +		compatible = "samsung,s2mps11-pmic";
> +		reg = <0x66>;
> +
> +		s2m_osc: clocks {
> +			compatible = "samsung,s2mps11-clk";
> +			#clock-cells = <1>;
> +			clock-output-names = "xx", "yy", "zz";
> +		};
> +	};
> diff --git a/Documentation/devicetree/bindings/mfd/s2mps11.txt b/Documentation/devicetree/bindings/mfd/s2mps11.txt
> deleted file mode 100644
> index 09b94c97faac..000000000000
> --- a/Documentation/devicetree/bindings/mfd/s2mps11.txt
> +++ /dev/null
> @@ -1,153 +0,0 @@
> -
> -* Samsung S2MPS11/13/14/15 and S2MPU02 Voltage and Current Regulator
> -
> -The Samsung S2MPS11 is a multi-function device which includes voltage and
> -current regulators, RTC, charger controller and other sub-blocks. 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.
> -
> -Required properties:
> -- compatible: Should be one of the following
> -	- "samsung,s2mps11-pmic"
> -	- "samsung,s2mps13-pmic"
> -	- "samsung,s2mps14-pmic"
> -	- "samsung,s2mps15-pmic"
> -	- "samsung,s2mpu02-pmic".
> -- reg: Specifies the I2C slave address of the pmic block. It should be 0x66.
> -
> -Optional properties:
> -- interrupt-parent: Specifies the phandle of the interrupt controller to which
> -  the interrupts from s2mps11 are delivered to.
> -- interrupts: Interrupt specifiers for interrupt sources.
> -- samsung,s2mps11-wrstbi-ground: Indicates that WRSTBI pin of PMIC is pulled
> -  down. When the system is suspended it will always go down thus triggerring
> -  unwanted buck warm reset (setting buck voltages to default values).
> -- samsung,s2mps11-acokb-ground: Indicates that ACOKB pin of S2MPS11 PMIC is
> -  connected to the ground so the PMIC must manually set PWRHOLD bit in CTRL1
> -  register to turn off the power. Usually the ACOKB is pulled up to VBATT so
> -  when PWRHOLD pin goes low, the rising ACOKB will trigger power off.
> -
> -Optional nodes:
> -- clocks: s2mps11, s2mps13, s2mps15 and s5m8767 provide three(AP/CP/BT) buffered 32.768
> -  KHz outputs, so to register these as clocks with common clock framework
> -  instantiate a sub-node named "clocks". It uses the common clock binding
> -  documented in :
> -  [Documentation/devicetree/bindings/clock/clock-bindings.txt]
> -  The s2mps14 provides two (AP/BT) buffered 32.768 KHz outputs.
> -  - #clock-cells: should be 1.
> -
> -  - The following is the list of clocks generated by the controller. Each clock
> -    is assigned an identifier and client nodes use this identifier to specify
> -    the clock which they consume.
> -    Clock               ID           Devices
> -    ----------------------------------------------------------
> -    32KhzAP		0            S2MPS11, S2MPS13, S2MPS14, S2MPS15, S5M8767
> -    32KhzCP		1            S2MPS11, S2MPS13, S2MPS15, S5M8767
> -    32KhzBT		2            S2MPS11, S2MPS13, S2MPS14, S2MPS15, S5M8767
> -
> -  - compatible: Should be one of: "samsung,s2mps11-clk", "samsung,s2mps13-clk",
> -		"samsung,s2mps14-clk", "samsung,s5m8767-clk"
> -    The s2msp15 uses the same compatible as s2mps13, as both provides similar clocks.
> -
> -- regulators: The regulators of s2mps11 that have to be instantiated should be
> -included in a sub-node named 'regulators'. Regulator nodes included in this
> -sub-node should be of the format as listed below.
> -
> -	regulator_name {
> -		[standard regulator constraints....];
> -	};
> -
> - regulator-ramp-delay for BUCKs = [6250/12500/25000(default)/50000] uV/us
> -
> - BUCK[2/3/4/6] supports disabling ramp delay on hardware, so explicitly
> - regulator-ramp-delay = <0> can be used for them to disable ramp delay.
> - 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<value>.
> -Grouping of BUCKs sharing ramp rate setting is as follow : BUCK[1, 6],
> -BUCK[3, 4], and BUCK[7, 8, 10]
> -
> -On S2MPS14 the LDO10, LDO11 and LDO12 can be configured to external control
> -over GPIO. To turn this feature on this property must be added to the regulator
> -sub-node:
> -	- samsung,ext-control-gpios: GPIO specifier for one GPIO
> -		controlling this regulator (enable/disable);
> -Example:
> -	LDO12 {
> -		regulator-name = "V_EMMC_2.8V";
> -		regulator-min-microvolt = <2800000>;
> -		regulator-max-microvolt = <2800000>;
> -		samsung,ext-control-gpios = <&gpk0 2 0>;
> -	};
> -
> -
> -The regulator constraints inside the regulator nodes use the standard regulator
> -bindings which are documented elsewhere.
> -
> -The following are the names of the regulators that the s2mps11 pmic block
> -supports. Note: The 'n' in LDOn and BUCKn represents the LDO or BUCK number
> -as per the datasheet of s2mps11.
> -
> -	- LDOn
> -		  - valid values for n are:
> -			- S2MPS11: 1 to 38
> -			- S2MPS13: 1 to 40
> -			- S2MPS14: 1 to 25
> -			- S2MPS15: 1 to 27
> -			- S2MPU02: 1 to 28
> -		  - Example: LDO1, LDO2, LDO28
> -	- BUCKn
> -		  - valid values for n are:
> -			- S2MPS11: 1 to 10
> -			- S2MPS13: 1 to 10
> -			- S2MPS14: 1 to 5
> -			- S2MPS15: 1 to 10
> -			- S2MPU02: 1 to 7
> -		  - Example: BUCK1, BUCK2, BUCK9
> -
> -Example:
> -
> -	s2mps11_pmic@66 {
> -		compatible = "samsung,s2mps11-pmic";
> -		reg = <0x66>;
> -
> -		s2m_osc: clocks {
> -			compatible = "samsung,s2mps11-clk";
> -			#clock-cells = <1>;
> -			clock-output-names = "xx", "yy", "zz";
> -		};
> -
> -		regulators {
> -			ldo1_reg: LDO1 {
> -				regulator-name = "VDD_ABB_3.3V";
> -				regulator-min-microvolt = <3300000>;
> -				regulator-max-microvolt = <3300000>;
> -			};
> -
> -			ldo2_reg: LDO2 {
> -				regulator-name = "VDD_ALIVE_1.1V";
> -				regulator-min-microvolt = <1100000>;
> -				regulator-max-microvolt = <1100000>;
> -				regulator-always-on;
> -			};
> -
> -			buck1_reg: BUCK1 {
> -				regulator-name = "vdd_mif";
> -				regulator-min-microvolt = <950000>;
> -				regulator-max-microvolt = <1350000>;
> -				regulator-always-on;
> -				regulator-boot-on;
> -			};
> -
> -			buck2_reg: BUCK2 {
> -				regulator-name = "vdd_arm";
> -				regulator-min-microvolt = <950000>;
> -				regulator-max-microvolt = <1350000>;
> -				regulator-always-on;
> -				regulator-boot-on;
> -				regulator-ramp-delay = <50000>;
> -			};
> -		};
> -	};
> diff --git a/Documentation/devicetree/bindings/mfd/samsung,sec-core.txt b/Documentation/devicetree/bindings/mfd/samsung,sec-core.txt
> new file mode 100644
> index 000000000000..ef0166d0f643
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/mfd/samsung,sec-core.txt
> @@ -0,0 +1,84 @@
> +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
> +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
> +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,s2mps11.txt
> + - bindings/clock/samsung,s2mps11.txt
> +
> +
> +Required properties:
> + - compatible: Should be one of the following
> +	- "samsung,s2mps11-pmic",
> +	- "samsung,s2mps13-pmic",
> +	- "samsung,s2mps14-pmic",
> +	- "samsung,s2mps15-pmic",
> +	- "samsung,s2mpu02-pmic".
> + - reg: Specifies the I2C slave address of the pmic block. It should be 0x66.
> +
> +Optional properties:
> + - interrupt-parent: Specifies the phandle of the interrupt controller to which
> +   the interrupts from s2mps11 are delivered to.
> + - interrupts: Interrupt specifiers for interrupt sources.
> + - samsung,s2mps11-wrstbi-ground: Indicates that WRSTBI pin of PMIC is pulled
> +   down. When the system is suspended it will always go down thus triggerring
> +   unwanted buck warm reset (setting buck voltages to default values).
> + - samsung,s2mps11-acokb-ground: Indicates that ACOKB pin of S2MPS11 PMIC is
> +   connected to the ground so the PMIC must manually set PWRHOLD bit in CTRL1
> +   register to turn off the power. Usually the ACOKB is pulled up to VBATT so
> +   when PWRHOLD pin goes low, the rising ACOKB will trigger power off.
> +
> +Example:
> +
> +	s2mps11_pmic@66 {
> +		compatible = "samsung,s2mps11-pmic";
> +		reg = <0x66>;
> +
> +		s2m_osc: clocks {
> +			compatible = "samsung,s2mps11-clk";
> +			#clock-cells = <1>;
> +			clock-output-names = "xx", "yy", "zz";
> +		};
> +
> +		regulators {
> +			ldo1_reg: LDO1 {
> +				regulator-name = "VDD_ABB_3.3V";
> +				regulator-min-microvolt = <3300000>;
> +				regulator-max-microvolt = <3300000>;
> +			};
> +
> +			ldo2_reg: LDO2 {
> +				regulator-name = "VDD_ALIVE_1.1V";
> +				regulator-min-microvolt = <1100000>;
> +				regulator-max-microvolt = <1100000>;
> +				regulator-always-on;
> +			};
> +
> +			buck1_reg: BUCK1 {
> +				regulator-name = "vdd_mif";
> +				regulator-min-microvolt = <950000>;
> +				regulator-max-microvolt = <1350000>;
> +				regulator-always-on;
> +				regulator-boot-on;
> +			};
> +
> +			buck2_reg: BUCK2 {
> +				regulator-name = "vdd_arm";
> +				regulator-min-microvolt = <950000>;
> +				regulator-max-microvolt = <1350000>;
> +				regulator-always-on;
> +				regulator-boot-on;
> +				regulator-ramp-delay = <50000>;
> +			};
> +		};
> +	};
> diff --git a/Documentation/devicetree/bindings/regulator/samsung,s2mps11.txt b/Documentation/devicetree/bindings/regulator/samsung,s2mps11.txt
> new file mode 100644
> index 000000000000..27a48bf1b185
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/regulator/samsung,s2mps11.txt
> @@ -0,0 +1,102 @@
> +Binding for Samsung S2M family regulator block
> +==============================================
> +
> +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 S2MPS11/13/14/15 and S2MPU02 devices provide buck and LDO regulators.
> +
> +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
> +
> +
> +Names of regulators supported by different devices:
> +	- LDOn
> +		  - valid values for n are:
> +			- S2MPS11: 1 to 38
> +			- S2MPS13: 1 to 40
> +			- S2MPS14: 1 to 25
> +			- S2MPS15: 1 to 27
> +			- S2MPU02: 1 to 28
> +		  - Example: LDO1, LDO2, LDO28
> +	- BUCKn
> +		  - valid values for n are:
> +			- S2MPS11: 1 to 10
> +			- S2MPS13: 1 to 10
> +			- S2MPS14: 1 to 5
> +			- S2MPS15: 1 to 10
> +			- S2MPU02: 1 to 7
> +		  - 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 the nodes under "regulators" sub-node:
> + - regulator-ramp-delay: ramp delay in uV/us. May be 6250, 12500,
> +   25000 (default) or 50000.
> +
> +   Additionally S2MPS11 supports disabling ramp delay for BUCK{2,3,4,6}
> +   by setting it to <0>.
> +
> +   Note: On S2MPS11 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{3,4},
> +    - buck{7,8,10}.
> +
> + - samsung,ext-control-gpios: On S2MPS14 the LDO10, LDO11 and LDO12 can be
> +   configured to external control over GPIO. To turn this feature on this
> +   property must be added to the regulator sub-node:
> +    - samsung,ext-control-gpios: GPIO specifier for one GPIO
> +                                 controlling this regulator (enable/disable)
> +  Example:
> +	LDO12 {
> +		regulator-name = "V_EMMC_2.8V";
> +		regulator-min-microvolt = <2800000>;
> +		regulator-max-microvolt = <2800000>;
> +		samsung,ext-control-gpios = <&gpk0 2 0>;
> +	};
> +
> +
> +Example:
> +
> +	s2mps11_pmic@66 {
> +		compatible = "samsung,s2mps11-pmic";
> +		reg = <0x66>;
> +
> +		regulators {
> +			ldo1_reg: LDO1 {
> +				regulator-name = "VDD_ABB_3.3V";
> +				regulator-min-microvolt = <3300000>;
> +				regulator-max-microvolt = <3300000>;
> +			};
> +
> +			ldo2_reg: LDO2 {
> +				regulator-name = "VDD_ALIVE_1.1V";
> +				regulator-min-microvolt = <1100000>;
> +				regulator-max-microvolt = <1100000>;
> +				regulator-always-on;
> +			};
> +
> +			buck1_reg: BUCK1 {
> +				regulator-name = "vdd_mif";
> +				regulator-min-microvolt = <950000>;
> +				regulator-max-microvolt = <1350000>;
> +				regulator-always-on;
> +				regulator-boot-on;
> +			};
> +
> +			buck2_reg: BUCK2 {
> +				regulator-name = "vdd_arm";
> +				regulator-min-microvolt = <950000>;
> +				regulator-max-microvolt = <1350000>;
> +				regulator-always-on;
> +				regulator-boot-on;
> +				regulator-ramp-delay = <50000>;
> +			};
> +		};
> +	};
> diff --git a/MAINTAINERS b/MAINTAINERS
> index f3de00113ae8..137284e37250 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -9234,7 +9234,9 @@ F:	drivers/clk/clk-s2mps11.c
>  F:	drivers/rtc/rtc-s5m.c
>  F:	include/linux/mfd/samsung/
>  F:	Documentation/devicetree/bindings/regulator/s5m8767-regulator.txt
> -F:	Documentation/devicetree/bindings/mfd/s2mp*.txt
> +F:	Documentation/devicetree/bindings/mfd/samsung,sec-core.txt
> +F:	Documentation/devicetree/bindings/regulator/samsung,s2m*.txt
> +F:	Documentation/devicetree/bindings/clock/samsung,s2mps11.txt
>  
>  SAMSUNG S5P/EXYNOS4 SOC SERIES CAMERA SUBSYSTEM DRIVERS
>  M:	Kyungmin Park <kyungmin.park@samsung.com>

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 1/3] dt-bindings: regulator/clock/mfd: Reorganize S2MPS-family bindings
  2015-12-04  1:10 ` [PATCH 1/3] dt-bindings: regulator/clock/mfd: Reorganize S2MPS-family bindings Krzysztof Kozlowski
                     ` (2 preceding siblings ...)
  2015-12-07  9:38   ` Lee Jones
@ 2015-12-24  7:20   ` Michael Turquette
  2016-01-11  7:50   ` Lee Jones
  4 siblings, 0 replies; 20+ messages in thread
From: Michael Turquette @ 2015-12-24  7:20 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Sangbeom Kim, Rob Herring, Pawel Moll, Mark Rutland,
	Ian Campbell, Kumar Gala, Lee Jones, Kukjin Kim,
	Linux Kernel Mailing List, linux-samsung-soc, devicetree,
	Stephen Boyd, Liam Girdwood, Mark Brown, linux-clk

On Thu, Dec 3, 2015 at 5:10 PM, Krzysztof Kozlowski
<k.kozlowski@samsung.com> wrote:
> Bindings for Samsung S2M and S5M family PMICs are in mess. They are
> spread over different files and subdirectories in a non-consistent way.
> The devices and respective drivers for them share a lot in common so
> everything could be organized in a more readable way.
>
> Reorganize the S2MPS11/13/14/15 Device Tree bindings to match the
> drivers for this family of devices:
>  - move mfd/s2mps11.txt to mfd/samsung,sec-core.txt for the main MFD
>    driver (common for entire family),
>  - split clock block to clock/samsung,s2mps11.txt,
>  - split regulator block to regulator/samsung,s2mps11.txt.
>
> Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>

Acked-by: Michael Turquette <mturquette@baylibre.com>

> ---
>  .../devicetree/bindings/clock/samsung,s2mps11.txt  |  49 +++++++
>  Documentation/devicetree/bindings/mfd/s2mps11.txt  | 153 ---------------------
>  .../devicetree/bindings/mfd/samsung,sec-core.txt   |  84 +++++++++++
>  .../bindings/regulator/samsung,s2mps11.txt         | 102 ++++++++++++++
>  MAINTAINERS                                        |   4 +-
>  5 files changed, 238 insertions(+), 154 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/clock/samsung,s2mps11.txt
>  delete mode 100644 Documentation/devicetree/bindings/mfd/s2mps11.txt
>  create mode 100644 Documentation/devicetree/bindings/mfd/samsung,sec-core.txt
>  create mode 100644 Documentation/devicetree/bindings/regulator/samsung,s2mps11.txt
>
> diff --git a/Documentation/devicetree/bindings/clock/samsung,s2mps11.txt b/Documentation/devicetree/bindings/clock/samsung,s2mps11.txt
> new file mode 100644
> index 000000000000..2726c1d58a79
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/clock/samsung,s2mps11.txt
> @@ -0,0 +1,49 @@
> +Binding for Samsung S2M and S5M family clock generator block
> +============================================================
> +
> +This is a part of device tree bindings for S2M and S5M family multi-function
> +devices.
> +More information can be found in bindings/mfd/sec-core.txt file.
> +
> +The S2MPS11/13/15 and S5M8767 provide three(AP/CP/BT) buffered 32.768 kHz
> +outputs. The S2MPS14 provides two (AP/BT) buffered 32.768 KHz outputs.
> +
> +To register these as clocks with common clock framework instantiate under
> +main device node a sub-node named "clocks".
> +
> +It uses the common clock binding documented in:
> + - Documentation/devicetree/bindings/clock/clock-bindings.txt
> +
> +
> +Required properties of the "clocks" sub-node:
> + - #clock-cells: should be 1.
> + - compatible: Should be one of: "samsung,s2mps11-clk", "samsung,s2mps13-clk",
> +               "samsung,s2mps14-clk", "samsung,s5m8767-clk"
> +   The S2MPS15 uses the same compatible as S2MPS13, as both provides similar
> +   clocks.
> +
> +
> +Each clock is assigned an identifier and client nodes use this identifier
> +to specify the clock which they consume.
> +    Clock               ID           Devices
> +    ----------------------------------------------------------
> +    32KhzAP            0            S2MPS11/13/14/15, S5M8767
> +    32KhzCP            1            S2MPS11/13/15, S5M8767
> +    32KhzBT            2            S2MPS11/13/14/15, S5M8767
> +
> +Include dt-bindings/clock/samsung,s2mps11.h file to use preprocessor defines
> +in device tree sources.
> +
> +
> +Example:
> +
> +       s2mps11_pmic@66 {
> +               compatible = "samsung,s2mps11-pmic";
> +               reg = <0x66>;
> +
> +               s2m_osc: clocks {
> +                       compatible = "samsung,s2mps11-clk";
> +                       #clock-cells = <1>;
> +                       clock-output-names = "xx", "yy", "zz";
> +               };
> +       };
> diff --git a/Documentation/devicetree/bindings/mfd/s2mps11.txt b/Documentation/devicetree/bindings/mfd/s2mps11.txt
> deleted file mode 100644
> index 09b94c97faac..000000000000
> --- a/Documentation/devicetree/bindings/mfd/s2mps11.txt
> +++ /dev/null
> @@ -1,153 +0,0 @@
> -
> -* Samsung S2MPS11/13/14/15 and S2MPU02 Voltage and Current Regulator
> -
> -The Samsung S2MPS11 is a multi-function device which includes voltage and
> -current regulators, RTC, charger controller and other sub-blocks. 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.
> -
> -Required properties:
> -- compatible: Should be one of the following
> -       - "samsung,s2mps11-pmic"
> -       - "samsung,s2mps13-pmic"
> -       - "samsung,s2mps14-pmic"
> -       - "samsung,s2mps15-pmic"
> -       - "samsung,s2mpu02-pmic".
> -- reg: Specifies the I2C slave address of the pmic block. It should be 0x66.
> -
> -Optional properties:
> -- interrupt-parent: Specifies the phandle of the interrupt controller to which
> -  the interrupts from s2mps11 are delivered to.
> -- interrupts: Interrupt specifiers for interrupt sources.
> -- samsung,s2mps11-wrstbi-ground: Indicates that WRSTBI pin of PMIC is pulled
> -  down. When the system is suspended it will always go down thus triggerring
> -  unwanted buck warm reset (setting buck voltages to default values).
> -- samsung,s2mps11-acokb-ground: Indicates that ACOKB pin of S2MPS11 PMIC is
> -  connected to the ground so the PMIC must manually set PWRHOLD bit in CTRL1
> -  register to turn off the power. Usually the ACOKB is pulled up to VBATT so
> -  when PWRHOLD pin goes low, the rising ACOKB will trigger power off.
> -
> -Optional nodes:
> -- clocks: s2mps11, s2mps13, s2mps15 and s5m8767 provide three(AP/CP/BT) buffered 32.768
> -  KHz outputs, so to register these as clocks with common clock framework
> -  instantiate a sub-node named "clocks". It uses the common clock binding
> -  documented in :
> -  [Documentation/devicetree/bindings/clock/clock-bindings.txt]
> -  The s2mps14 provides two (AP/BT) buffered 32.768 KHz outputs.
> -  - #clock-cells: should be 1.
> -
> -  - The following is the list of clocks generated by the controller. Each clock
> -    is assigned an identifier and client nodes use this identifier to specify
> -    the clock which they consume.
> -    Clock               ID           Devices
> -    ----------------------------------------------------------
> -    32KhzAP            0            S2MPS11, S2MPS13, S2MPS14, S2MPS15, S5M8767
> -    32KhzCP            1            S2MPS11, S2MPS13, S2MPS15, S5M8767
> -    32KhzBT            2            S2MPS11, S2MPS13, S2MPS14, S2MPS15, S5M8767
> -
> -  - compatible: Should be one of: "samsung,s2mps11-clk", "samsung,s2mps13-clk",
> -               "samsung,s2mps14-clk", "samsung,s5m8767-clk"
> -    The s2msp15 uses the same compatible as s2mps13, as both provides similar clocks.
> -
> -- regulators: The regulators of s2mps11 that have to be instantiated should be
> -included in a sub-node named 'regulators'. Regulator nodes included in this
> -sub-node should be of the format as listed below.
> -
> -       regulator_name {
> -               [standard regulator constraints....];
> -       };
> -
> - regulator-ramp-delay for BUCKs = [6250/12500/25000(default)/50000] uV/us
> -
> - BUCK[2/3/4/6] supports disabling ramp delay on hardware, so explicitly
> - regulator-ramp-delay = <0> can be used for them to disable ramp delay.
> - 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<value>.
> -Grouping of BUCKs sharing ramp rate setting is as follow : BUCK[1, 6],
> -BUCK[3, 4], and BUCK[7, 8, 10]
> -
> -On S2MPS14 the LDO10, LDO11 and LDO12 can be configured to external control
> -over GPIO. To turn this feature on this property must be added to the regulator
> -sub-node:
> -       - samsung,ext-control-gpios: GPIO specifier for one GPIO
> -               controlling this regulator (enable/disable);
> -Example:
> -       LDO12 {
> -               regulator-name = "V_EMMC_2.8V";
> -               regulator-min-microvolt = <2800000>;
> -               regulator-max-microvolt = <2800000>;
> -               samsung,ext-control-gpios = <&gpk0 2 0>;
> -       };
> -
> -
> -The regulator constraints inside the regulator nodes use the standard regulator
> -bindings which are documented elsewhere.
> -
> -The following are the names of the regulators that the s2mps11 pmic block
> -supports. Note: The 'n' in LDOn and BUCKn represents the LDO or BUCK number
> -as per the datasheet of s2mps11.
> -
> -       - LDOn
> -                 - valid values for n are:
> -                       - S2MPS11: 1 to 38
> -                       - S2MPS13: 1 to 40
> -                       - S2MPS14: 1 to 25
> -                       - S2MPS15: 1 to 27
> -                       - S2MPU02: 1 to 28
> -                 - Example: LDO1, LDO2, LDO28
> -       - BUCKn
> -                 - valid values for n are:
> -                       - S2MPS11: 1 to 10
> -                       - S2MPS13: 1 to 10
> -                       - S2MPS14: 1 to 5
> -                       - S2MPS15: 1 to 10
> -                       - S2MPU02: 1 to 7
> -                 - Example: BUCK1, BUCK2, BUCK9
> -
> -Example:
> -
> -       s2mps11_pmic@66 {
> -               compatible = "samsung,s2mps11-pmic";
> -               reg = <0x66>;
> -
> -               s2m_osc: clocks {
> -                       compatible = "samsung,s2mps11-clk";
> -                       #clock-cells = <1>;
> -                       clock-output-names = "xx", "yy", "zz";
> -               };
> -
> -               regulators {
> -                       ldo1_reg: LDO1 {
> -                               regulator-name = "VDD_ABB_3.3V";
> -                               regulator-min-microvolt = <3300000>;
> -                               regulator-max-microvolt = <3300000>;
> -                       };
> -
> -                       ldo2_reg: LDO2 {
> -                               regulator-name = "VDD_ALIVE_1.1V";
> -                               regulator-min-microvolt = <1100000>;
> -                               regulator-max-microvolt = <1100000>;
> -                               regulator-always-on;
> -                       };
> -
> -                       buck1_reg: BUCK1 {
> -                               regulator-name = "vdd_mif";
> -                               regulator-min-microvolt = <950000>;
> -                               regulator-max-microvolt = <1350000>;
> -                               regulator-always-on;
> -                               regulator-boot-on;
> -                       };
> -
> -                       buck2_reg: BUCK2 {
> -                               regulator-name = "vdd_arm";
> -                               regulator-min-microvolt = <950000>;
> -                               regulator-max-microvolt = <1350000>;
> -                               regulator-always-on;
> -                               regulator-boot-on;
> -                               regulator-ramp-delay = <50000>;
> -                       };
> -               };
> -       };
> diff --git a/Documentation/devicetree/bindings/mfd/samsung,sec-core.txt b/Documentation/devicetree/bindings/mfd/samsung,sec-core.txt
> new file mode 100644
> index 000000000000..ef0166d0f643
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/mfd/samsung,sec-core.txt
> @@ -0,0 +1,84 @@
> +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
> +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
> +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,s2mps11.txt
> + - bindings/clock/samsung,s2mps11.txt
> +
> +
> +Required properties:
> + - compatible: Should be one of the following
> +       - "samsung,s2mps11-pmic",
> +       - "samsung,s2mps13-pmic",
> +       - "samsung,s2mps14-pmic",
> +       - "samsung,s2mps15-pmic",
> +       - "samsung,s2mpu02-pmic".
> + - reg: Specifies the I2C slave address of the pmic block. It should be 0x66.
> +
> +Optional properties:
> + - interrupt-parent: Specifies the phandle of the interrupt controller to which
> +   the interrupts from s2mps11 are delivered to.
> + - interrupts: Interrupt specifiers for interrupt sources.
> + - samsung,s2mps11-wrstbi-ground: Indicates that WRSTBI pin of PMIC is pulled
> +   down. When the system is suspended it will always go down thus triggerring
> +   unwanted buck warm reset (setting buck voltages to default values).
> + - samsung,s2mps11-acokb-ground: Indicates that ACOKB pin of S2MPS11 PMIC is
> +   connected to the ground so the PMIC must manually set PWRHOLD bit in CTRL1
> +   register to turn off the power. Usually the ACOKB is pulled up to VBATT so
> +   when PWRHOLD pin goes low, the rising ACOKB will trigger power off.
> +
> +Example:
> +
> +       s2mps11_pmic@66 {
> +               compatible = "samsung,s2mps11-pmic";
> +               reg = <0x66>;
> +
> +               s2m_osc: clocks {
> +                       compatible = "samsung,s2mps11-clk";
> +                       #clock-cells = <1>;
> +                       clock-output-names = "xx", "yy", "zz";
> +               };
> +
> +               regulators {
> +                       ldo1_reg: LDO1 {
> +                               regulator-name = "VDD_ABB_3.3V";
> +                               regulator-min-microvolt = <3300000>;
> +                               regulator-max-microvolt = <3300000>;
> +                       };
> +
> +                       ldo2_reg: LDO2 {
> +                               regulator-name = "VDD_ALIVE_1.1V";
> +                               regulator-min-microvolt = <1100000>;
> +                               regulator-max-microvolt = <1100000>;
> +                               regulator-always-on;
> +                       };
> +
> +                       buck1_reg: BUCK1 {
> +                               regulator-name = "vdd_mif";
> +                               regulator-min-microvolt = <950000>;
> +                               regulator-max-microvolt = <1350000>;
> +                               regulator-always-on;
> +                               regulator-boot-on;
> +                       };
> +
> +                       buck2_reg: BUCK2 {
> +                               regulator-name = "vdd_arm";
> +                               regulator-min-microvolt = <950000>;
> +                               regulator-max-microvolt = <1350000>;
> +                               regulator-always-on;
> +                               regulator-boot-on;
> +                               regulator-ramp-delay = <50000>;
> +                       };
> +               };
> +       };
> diff --git a/Documentation/devicetree/bindings/regulator/samsung,s2mps11.txt b/Documentation/devicetree/bindings/regulator/samsung,s2mps11.txt
> new file mode 100644
> index 000000000000..27a48bf1b185
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/regulator/samsung,s2mps11.txt
> @@ -0,0 +1,102 @@
> +Binding for Samsung S2M family regulator block
> +==============================================
> +
> +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 S2MPS11/13/14/15 and S2MPU02 devices provide buck and LDO regulators.
> +
> +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
> +
> +
> +Names of regulators supported by different devices:
> +       - LDOn
> +                 - valid values for n are:
> +                       - S2MPS11: 1 to 38
> +                       - S2MPS13: 1 to 40
> +                       - S2MPS14: 1 to 25
> +                       - S2MPS15: 1 to 27
> +                       - S2MPU02: 1 to 28
> +                 - Example: LDO1, LDO2, LDO28
> +       - BUCKn
> +                 - valid values for n are:
> +                       - S2MPS11: 1 to 10
> +                       - S2MPS13: 1 to 10
> +                       - S2MPS14: 1 to 5
> +                       - S2MPS15: 1 to 10
> +                       - S2MPU02: 1 to 7
> +                 - 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 the nodes under "regulators" sub-node:
> + - regulator-ramp-delay: ramp delay in uV/us. May be 6250, 12500,
> +   25000 (default) or 50000.
> +
> +   Additionally S2MPS11 supports disabling ramp delay for BUCK{2,3,4,6}
> +   by setting it to <0>.
> +
> +   Note: On S2MPS11 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{3,4},
> +    - buck{7,8,10}.
> +
> + - samsung,ext-control-gpios: On S2MPS14 the LDO10, LDO11 and LDO12 can be
> +   configured to external control over GPIO. To turn this feature on this
> +   property must be added to the regulator sub-node:
> +    - samsung,ext-control-gpios: GPIO specifier for one GPIO
> +                                 controlling this regulator (enable/disable)
> +  Example:
> +       LDO12 {
> +               regulator-name = "V_EMMC_2.8V";
> +               regulator-min-microvolt = <2800000>;
> +               regulator-max-microvolt = <2800000>;
> +               samsung,ext-control-gpios = <&gpk0 2 0>;
> +       };
> +
> +
> +Example:
> +
> +       s2mps11_pmic@66 {
> +               compatible = "samsung,s2mps11-pmic";
> +               reg = <0x66>;
> +
> +               regulators {
> +                       ldo1_reg: LDO1 {
> +                               regulator-name = "VDD_ABB_3.3V";
> +                               regulator-min-microvolt = <3300000>;
> +                               regulator-max-microvolt = <3300000>;
> +                       };
> +
> +                       ldo2_reg: LDO2 {
> +                               regulator-name = "VDD_ALIVE_1.1V";
> +                               regulator-min-microvolt = <1100000>;
> +                               regulator-max-microvolt = <1100000>;
> +                               regulator-always-on;
> +                       };
> +
> +                       buck1_reg: BUCK1 {
> +                               regulator-name = "vdd_mif";
> +                               regulator-min-microvolt = <950000>;
> +                               regulator-max-microvolt = <1350000>;
> +                               regulator-always-on;
> +                               regulator-boot-on;
> +                       };
> +
> +                       buck2_reg: BUCK2 {
> +                               regulator-name = "vdd_arm";
> +                               regulator-min-microvolt = <950000>;
> +                               regulator-max-microvolt = <1350000>;
> +                               regulator-always-on;
> +                               regulator-boot-on;
> +                               regulator-ramp-delay = <50000>;
> +                       };
> +               };
> +       };
> diff --git a/MAINTAINERS b/MAINTAINERS
> index f3de00113ae8..137284e37250 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -9234,7 +9234,9 @@ F:        drivers/clk/clk-s2mps11.c
>  F:     drivers/rtc/rtc-s5m.c
>  F:     include/linux/mfd/samsung/
>  F:     Documentation/devicetree/bindings/regulator/s5m8767-regulator.txt
> -F:     Documentation/devicetree/bindings/mfd/s2mp*.txt
> +F:     Documentation/devicetree/bindings/mfd/samsung,sec-core.txt
> +F:     Documentation/devicetree/bindings/regulator/samsung,s2m*.txt
> +F:     Documentation/devicetree/bindings/clock/samsung,s2mps11.txt
>
>  SAMSUNG S5P/EXYNOS4 SOC SERIES CAMERA SUBSYSTEM DRIVERS
>  M:     Kyungmin Park <kyungmin.park@samsung.com>
> --
> 1.9.1
>



-- 
Michael Turquette
CEO
BayLibre - At the Heart of Embedded Linux
http://baylibre.com/

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 1/3] dt-bindings: regulator/clock/mfd: Reorganize S2MPS-family bindings
  2015-12-04  1:10 ` [PATCH 1/3] dt-bindings: regulator/clock/mfd: Reorganize S2MPS-family bindings Krzysztof Kozlowski
                     ` (3 preceding siblings ...)
  2015-12-24  7:20   ` Michael Turquette
@ 2016-01-11  7:50   ` Lee Jones
  4 siblings, 0 replies; 20+ messages in thread
From: Lee Jones @ 2016-01-11  7:50 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Sangbeom Kim, Rob Herring, Pawel Moll, Mark Rutland,
	Ian Campbell, Kumar Gala, Kukjin Kim, linux-kernel,
	linux-samsung-soc, devicetree, Michael Turquette, Stephen Boyd,
	Liam Girdwood, Mark Brown, linux-clk

On Fri, 04 Dec 2015, Krzysztof Kozlowski wrote:

> Bindings for Samsung S2M and S5M family PMICs are in mess. They are
> spread over different files and subdirectories in a non-consistent way.
> The devices and respective drivers for them share a lot in common so
> everything could be organized in a more readable way.
> 
> Reorganize the S2MPS11/13/14/15 Device Tree bindings to match the
> drivers for this family of devices:
>  - move mfd/s2mps11.txt to mfd/samsung,sec-core.txt for the main MFD
>    driver (common for entire family),
>  - split clock block to clock/samsung,s2mps11.txt,
>  - split regulator block to regulator/samsung,s2mps11.txt.
> 
> Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> ---
>  .../devicetree/bindings/clock/samsung,s2mps11.txt  |  49 +++++++
>  Documentation/devicetree/bindings/mfd/s2mps11.txt  | 153 ---------------------
>  .../devicetree/bindings/mfd/samsung,sec-core.txt   |  84 +++++++++++
>  .../bindings/regulator/samsung,s2mps11.txt         | 102 ++++++++++++++
>  MAINTAINERS                                        |   4 +-
>  5 files changed, 238 insertions(+), 154 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/clock/samsung,s2mps11.txt
>  delete mode 100644 Documentation/devicetree/bindings/mfd/s2mps11.txt
>  create mode 100644 Documentation/devicetree/bindings/mfd/samsung,sec-core.txt
>  create mode 100644 Documentation/devicetree/bindings/regulator/samsung,s2mps11.txt

Applied, thanks.

> diff --git a/Documentation/devicetree/bindings/clock/samsung,s2mps11.txt b/Documentation/devicetree/bindings/clock/samsung,s2mps11.txt
> new file mode 100644
> index 000000000000..2726c1d58a79
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/clock/samsung,s2mps11.txt
> @@ -0,0 +1,49 @@
> +Binding for Samsung S2M and S5M family clock generator block
> +============================================================
> +
> +This is a part of device tree bindings for S2M and S5M family multi-function
> +devices.
> +More information can be found in bindings/mfd/sec-core.txt file.
> +
> +The S2MPS11/13/15 and S5M8767 provide three(AP/CP/BT) buffered 32.768 kHz
> +outputs. The S2MPS14 provides two (AP/BT) buffered 32.768 KHz outputs.
> +
> +To register these as clocks with common clock framework instantiate under
> +main device node a sub-node named "clocks".
> +
> +It uses the common clock binding documented in:
> + - Documentation/devicetree/bindings/clock/clock-bindings.txt
> +
> +
> +Required properties of the "clocks" sub-node:
> + - #clock-cells: should be 1.
> + - compatible: Should be one of: "samsung,s2mps11-clk", "samsung,s2mps13-clk",
> +               "samsung,s2mps14-clk", "samsung,s5m8767-clk"
> +   The S2MPS15 uses the same compatible as S2MPS13, as both provides similar
> +   clocks.
> +
> +
> +Each clock is assigned an identifier and client nodes use this identifier
> +to specify the clock which they consume.
> +    Clock               ID           Devices
> +    ----------------------------------------------------------
> +    32KhzAP		0            S2MPS11/13/14/15, S5M8767
> +    32KhzCP		1            S2MPS11/13/15, S5M8767
> +    32KhzBT		2            S2MPS11/13/14/15, S5M8767
> +
> +Include dt-bindings/clock/samsung,s2mps11.h file to use preprocessor defines
> +in device tree sources.
> +
> +
> +Example:
> +
> +	s2mps11_pmic@66 {
> +		compatible = "samsung,s2mps11-pmic";
> +		reg = <0x66>;
> +
> +		s2m_osc: clocks {
> +			compatible = "samsung,s2mps11-clk";
> +			#clock-cells = <1>;
> +			clock-output-names = "xx", "yy", "zz";
> +		};
> +	};
> diff --git a/Documentation/devicetree/bindings/mfd/s2mps11.txt b/Documentation/devicetree/bindings/mfd/s2mps11.txt
> deleted file mode 100644
> index 09b94c97faac..000000000000
> --- a/Documentation/devicetree/bindings/mfd/s2mps11.txt
> +++ /dev/null
> @@ -1,153 +0,0 @@
> -
> -* Samsung S2MPS11/13/14/15 and S2MPU02 Voltage and Current Regulator
> -
> -The Samsung S2MPS11 is a multi-function device which includes voltage and
> -current regulators, RTC, charger controller and other sub-blocks. 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.
> -
> -Required properties:
> -- compatible: Should be one of the following
> -	- "samsung,s2mps11-pmic"
> -	- "samsung,s2mps13-pmic"
> -	- "samsung,s2mps14-pmic"
> -	- "samsung,s2mps15-pmic"
> -	- "samsung,s2mpu02-pmic".
> -- reg: Specifies the I2C slave address of the pmic block. It should be 0x66.
> -
> -Optional properties:
> -- interrupt-parent: Specifies the phandle of the interrupt controller to which
> -  the interrupts from s2mps11 are delivered to.
> -- interrupts: Interrupt specifiers for interrupt sources.
> -- samsung,s2mps11-wrstbi-ground: Indicates that WRSTBI pin of PMIC is pulled
> -  down. When the system is suspended it will always go down thus triggerring
> -  unwanted buck warm reset (setting buck voltages to default values).
> -- samsung,s2mps11-acokb-ground: Indicates that ACOKB pin of S2MPS11 PMIC is
> -  connected to the ground so the PMIC must manually set PWRHOLD bit in CTRL1
> -  register to turn off the power. Usually the ACOKB is pulled up to VBATT so
> -  when PWRHOLD pin goes low, the rising ACOKB will trigger power off.
> -
> -Optional nodes:
> -- clocks: s2mps11, s2mps13, s2mps15 and s5m8767 provide three(AP/CP/BT) buffered 32.768
> -  KHz outputs, so to register these as clocks with common clock framework
> -  instantiate a sub-node named "clocks". It uses the common clock binding
> -  documented in :
> -  [Documentation/devicetree/bindings/clock/clock-bindings.txt]
> -  The s2mps14 provides two (AP/BT) buffered 32.768 KHz outputs.
> -  - #clock-cells: should be 1.
> -
> -  - The following is the list of clocks generated by the controller. Each clock
> -    is assigned an identifier and client nodes use this identifier to specify
> -    the clock which they consume.
> -    Clock               ID           Devices
> -    ----------------------------------------------------------
> -    32KhzAP		0            S2MPS11, S2MPS13, S2MPS14, S2MPS15, S5M8767
> -    32KhzCP		1            S2MPS11, S2MPS13, S2MPS15, S5M8767
> -    32KhzBT		2            S2MPS11, S2MPS13, S2MPS14, S2MPS15, S5M8767
> -
> -  - compatible: Should be one of: "samsung,s2mps11-clk", "samsung,s2mps13-clk",
> -		"samsung,s2mps14-clk", "samsung,s5m8767-clk"
> -    The s2msp15 uses the same compatible as s2mps13, as both provides similar clocks.
> -
> -- regulators: The regulators of s2mps11 that have to be instantiated should be
> -included in a sub-node named 'regulators'. Regulator nodes included in this
> -sub-node should be of the format as listed below.
> -
> -	regulator_name {
> -		[standard regulator constraints....];
> -	};
> -
> - regulator-ramp-delay for BUCKs = [6250/12500/25000(default)/50000] uV/us
> -
> - BUCK[2/3/4/6] supports disabling ramp delay on hardware, so explicitly
> - regulator-ramp-delay = <0> can be used for them to disable ramp delay.
> - 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<value>.
> -Grouping of BUCKs sharing ramp rate setting is as follow : BUCK[1, 6],
> -BUCK[3, 4], and BUCK[7, 8, 10]
> -
> -On S2MPS14 the LDO10, LDO11 and LDO12 can be configured to external control
> -over GPIO. To turn this feature on this property must be added to the regulator
> -sub-node:
> -	- samsung,ext-control-gpios: GPIO specifier for one GPIO
> -		controlling this regulator (enable/disable);
> -Example:
> -	LDO12 {
> -		regulator-name = "V_EMMC_2.8V";
> -		regulator-min-microvolt = <2800000>;
> -		regulator-max-microvolt = <2800000>;
> -		samsung,ext-control-gpios = <&gpk0 2 0>;
> -	};
> -
> -
> -The regulator constraints inside the regulator nodes use the standard regulator
> -bindings which are documented elsewhere.
> -
> -The following are the names of the regulators that the s2mps11 pmic block
> -supports. Note: The 'n' in LDOn and BUCKn represents the LDO or BUCK number
> -as per the datasheet of s2mps11.
> -
> -	- LDOn
> -		  - valid values for n are:
> -			- S2MPS11: 1 to 38
> -			- S2MPS13: 1 to 40
> -			- S2MPS14: 1 to 25
> -			- S2MPS15: 1 to 27
> -			- S2MPU02: 1 to 28
> -		  - Example: LDO1, LDO2, LDO28
> -	- BUCKn
> -		  - valid values for n are:
> -			- S2MPS11: 1 to 10
> -			- S2MPS13: 1 to 10
> -			- S2MPS14: 1 to 5
> -			- S2MPS15: 1 to 10
> -			- S2MPU02: 1 to 7
> -		  - Example: BUCK1, BUCK2, BUCK9
> -
> -Example:
> -
> -	s2mps11_pmic@66 {
> -		compatible = "samsung,s2mps11-pmic";
> -		reg = <0x66>;
> -
> -		s2m_osc: clocks {
> -			compatible = "samsung,s2mps11-clk";
> -			#clock-cells = <1>;
> -			clock-output-names = "xx", "yy", "zz";
> -		};
> -
> -		regulators {
> -			ldo1_reg: LDO1 {
> -				regulator-name = "VDD_ABB_3.3V";
> -				regulator-min-microvolt = <3300000>;
> -				regulator-max-microvolt = <3300000>;
> -			};
> -
> -			ldo2_reg: LDO2 {
> -				regulator-name = "VDD_ALIVE_1.1V";
> -				regulator-min-microvolt = <1100000>;
> -				regulator-max-microvolt = <1100000>;
> -				regulator-always-on;
> -			};
> -
> -			buck1_reg: BUCK1 {
> -				regulator-name = "vdd_mif";
> -				regulator-min-microvolt = <950000>;
> -				regulator-max-microvolt = <1350000>;
> -				regulator-always-on;
> -				regulator-boot-on;
> -			};
> -
> -			buck2_reg: BUCK2 {
> -				regulator-name = "vdd_arm";
> -				regulator-min-microvolt = <950000>;
> -				regulator-max-microvolt = <1350000>;
> -				regulator-always-on;
> -				regulator-boot-on;
> -				regulator-ramp-delay = <50000>;
> -			};
> -		};
> -	};
> diff --git a/Documentation/devicetree/bindings/mfd/samsung,sec-core.txt b/Documentation/devicetree/bindings/mfd/samsung,sec-core.txt
> new file mode 100644
> index 000000000000..ef0166d0f643
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/mfd/samsung,sec-core.txt
> @@ -0,0 +1,84 @@
> +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
> +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
> +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,s2mps11.txt
> + - bindings/clock/samsung,s2mps11.txt
> +
> +
> +Required properties:
> + - compatible: Should be one of the following
> +	- "samsung,s2mps11-pmic",
> +	- "samsung,s2mps13-pmic",
> +	- "samsung,s2mps14-pmic",
> +	- "samsung,s2mps15-pmic",
> +	- "samsung,s2mpu02-pmic".
> + - reg: Specifies the I2C slave address of the pmic block. It should be 0x66.
> +
> +Optional properties:
> + - interrupt-parent: Specifies the phandle of the interrupt controller to which
> +   the interrupts from s2mps11 are delivered to.
> + - interrupts: Interrupt specifiers for interrupt sources.
> + - samsung,s2mps11-wrstbi-ground: Indicates that WRSTBI pin of PMIC is pulled
> +   down. When the system is suspended it will always go down thus triggerring
> +   unwanted buck warm reset (setting buck voltages to default values).
> + - samsung,s2mps11-acokb-ground: Indicates that ACOKB pin of S2MPS11 PMIC is
> +   connected to the ground so the PMIC must manually set PWRHOLD bit in CTRL1
> +   register to turn off the power. Usually the ACOKB is pulled up to VBATT so
> +   when PWRHOLD pin goes low, the rising ACOKB will trigger power off.
> +
> +Example:
> +
> +	s2mps11_pmic@66 {
> +		compatible = "samsung,s2mps11-pmic";
> +		reg = <0x66>;
> +
> +		s2m_osc: clocks {
> +			compatible = "samsung,s2mps11-clk";
> +			#clock-cells = <1>;
> +			clock-output-names = "xx", "yy", "zz";
> +		};
> +
> +		regulators {
> +			ldo1_reg: LDO1 {
> +				regulator-name = "VDD_ABB_3.3V";
> +				regulator-min-microvolt = <3300000>;
> +				regulator-max-microvolt = <3300000>;
> +			};
> +
> +			ldo2_reg: LDO2 {
> +				regulator-name = "VDD_ALIVE_1.1V";
> +				regulator-min-microvolt = <1100000>;
> +				regulator-max-microvolt = <1100000>;
> +				regulator-always-on;
> +			};
> +
> +			buck1_reg: BUCK1 {
> +				regulator-name = "vdd_mif";
> +				regulator-min-microvolt = <950000>;
> +				regulator-max-microvolt = <1350000>;
> +				regulator-always-on;
> +				regulator-boot-on;
> +			};
> +
> +			buck2_reg: BUCK2 {
> +				regulator-name = "vdd_arm";
> +				regulator-min-microvolt = <950000>;
> +				regulator-max-microvolt = <1350000>;
> +				regulator-always-on;
> +				regulator-boot-on;
> +				regulator-ramp-delay = <50000>;
> +			};
> +		};
> +	};
> diff --git a/Documentation/devicetree/bindings/regulator/samsung,s2mps11.txt b/Documentation/devicetree/bindings/regulator/samsung,s2mps11.txt
> new file mode 100644
> index 000000000000..27a48bf1b185
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/regulator/samsung,s2mps11.txt
> @@ -0,0 +1,102 @@
> +Binding for Samsung S2M family regulator block
> +==============================================
> +
> +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 S2MPS11/13/14/15 and S2MPU02 devices provide buck and LDO regulators.
> +
> +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
> +
> +
> +Names of regulators supported by different devices:
> +	- LDOn
> +		  - valid values for n are:
> +			- S2MPS11: 1 to 38
> +			- S2MPS13: 1 to 40
> +			- S2MPS14: 1 to 25
> +			- S2MPS15: 1 to 27
> +			- S2MPU02: 1 to 28
> +		  - Example: LDO1, LDO2, LDO28
> +	- BUCKn
> +		  - valid values for n are:
> +			- S2MPS11: 1 to 10
> +			- S2MPS13: 1 to 10
> +			- S2MPS14: 1 to 5
> +			- S2MPS15: 1 to 10
> +			- S2MPU02: 1 to 7
> +		  - 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 the nodes under "regulators" sub-node:
> + - regulator-ramp-delay: ramp delay in uV/us. May be 6250, 12500,
> +   25000 (default) or 50000.
> +
> +   Additionally S2MPS11 supports disabling ramp delay for BUCK{2,3,4,6}
> +   by setting it to <0>.
> +
> +   Note: On S2MPS11 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{3,4},
> +    - buck{7,8,10}.
> +
> + - samsung,ext-control-gpios: On S2MPS14 the LDO10, LDO11 and LDO12 can be
> +   configured to external control over GPIO. To turn this feature on this
> +   property must be added to the regulator sub-node:
> +    - samsung,ext-control-gpios: GPIO specifier for one GPIO
> +                                 controlling this regulator (enable/disable)
> +  Example:
> +	LDO12 {
> +		regulator-name = "V_EMMC_2.8V";
> +		regulator-min-microvolt = <2800000>;
> +		regulator-max-microvolt = <2800000>;
> +		samsung,ext-control-gpios = <&gpk0 2 0>;
> +	};
> +
> +
> +Example:
> +
> +	s2mps11_pmic@66 {
> +		compatible = "samsung,s2mps11-pmic";
> +		reg = <0x66>;
> +
> +		regulators {
> +			ldo1_reg: LDO1 {
> +				regulator-name = "VDD_ABB_3.3V";
> +				regulator-min-microvolt = <3300000>;
> +				regulator-max-microvolt = <3300000>;
> +			};
> +
> +			ldo2_reg: LDO2 {
> +				regulator-name = "VDD_ALIVE_1.1V";
> +				regulator-min-microvolt = <1100000>;
> +				regulator-max-microvolt = <1100000>;
> +				regulator-always-on;
> +			};
> +
> +			buck1_reg: BUCK1 {
> +				regulator-name = "vdd_mif";
> +				regulator-min-microvolt = <950000>;
> +				regulator-max-microvolt = <1350000>;
> +				regulator-always-on;
> +				regulator-boot-on;
> +			};
> +
> +			buck2_reg: BUCK2 {
> +				regulator-name = "vdd_arm";
> +				regulator-min-microvolt = <950000>;
> +				regulator-max-microvolt = <1350000>;
> +				regulator-always-on;
> +				regulator-boot-on;
> +				regulator-ramp-delay = <50000>;
> +			};
> +		};
> +	};
> diff --git a/MAINTAINERS b/MAINTAINERS
> index f3de00113ae8..137284e37250 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -9234,7 +9234,9 @@ F:	drivers/clk/clk-s2mps11.c
>  F:	drivers/rtc/rtc-s5m.c
>  F:	include/linux/mfd/samsung/
>  F:	Documentation/devicetree/bindings/regulator/s5m8767-regulator.txt
> -F:	Documentation/devicetree/bindings/mfd/s2mp*.txt
> +F:	Documentation/devicetree/bindings/mfd/samsung,sec-core.txt
> +F:	Documentation/devicetree/bindings/regulator/samsung,s2m*.txt
> +F:	Documentation/devicetree/bindings/clock/samsung,s2mps11.txt
>  
>  SAMSUNG S5P/EXYNOS4 SOC SERIES CAMERA SUBSYSTEM DRIVERS
>  M:	Kyungmin Park <kyungmin.park@samsung.com>

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 2/3] dt-bindings: regulator/mfd: Reorganize S5M8767 bindings
  2015-12-04  1:10 ` [PATCH 2/3] dt-bindings: regulator/mfd: Reorganize S5M8767 bindings Krzysztof Kozlowski
                     ` (2 preceding siblings ...)
  2015-12-07  9:37   ` Lee Jones
@ 2016-01-11  7:51   ` Lee Jones
  3 siblings, 0 replies; 20+ messages in thread
From: Lee Jones @ 2016-01-11  7:51 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Sangbeom Kim, Rob Herring, Pawel Moll, Mark Rutland,
	Ian Campbell, Kumar Gala, Kukjin Kim, linux-kernel,
	linux-samsung-soc, devicetree, Michael Turquette, Stephen Boyd,
	Liam Girdwood, Mark Brown, linux-clk

On Fri, 04 Dec 2015, Krzysztof Kozlowski wrote:

> The regulator/s5m8767-regulator.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,s5m8767.txt),
>  - remove duplicated information,
>  - reorganize the contents to match style of
>    regulator/samsung,s2mps11.txt.
> 
> Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> ---
>  .../devicetree/bindings/mfd/samsung,sec-core.txt   |   4 +-
>  .../bindings/regulator/s5m8767-regulator.txt       | 163 ---------------------
>  .../bindings/regulator/samsung,s5m8767.txt         | 145 ++++++++++++++++++
>  MAINTAINERS                                        |   2 +-
>  4 files changed, 149 insertions(+), 165 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/regulator/s5m8767-regulator.txt
>  create mode 100644 Documentation/devicetree/bindings/regulator/samsung,s5m8767.txt

Applied, thanks.

> diff --git a/Documentation/devicetree/bindings/mfd/samsung,sec-core.txt b/Documentation/devicetree/bindings/mfd/samsung,sec-core.txt
> index ef0166d0f643..4aeb95c82304 100644
> --- a/Documentation/devicetree/bindings/mfd/samsung,sec-core.txt
> +++ b/Documentation/devicetree/bindings/mfd/samsung,sec-core.txt
> @@ -14,6 +14,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,s2mps11.txt
> + - bindings/regulator/samsung,s5m8767.txt
>   - bindings/clock/samsung,s2mps11.txt
>  
>  
> @@ -23,7 +24,8 @@ Required properties:
>  	- "samsung,s2mps13-pmic",
>  	- "samsung,s2mps14-pmic",
>  	- "samsung,s2mps15-pmic",
> -	- "samsung,s2mpu02-pmic".
> +	- "samsung,s2mpu02-pmic",
> +	- "samsung,s5m8767-pmic".
>   - reg: Specifies the I2C slave address of the pmic block. It should be 0x66.
>  
>  Optional properties:
> diff --git a/Documentation/devicetree/bindings/regulator/s5m8767-regulator.txt b/Documentation/devicetree/bindings/regulator/s5m8767-regulator.txt
> deleted file mode 100644
> index 20191315e444..000000000000
> --- a/Documentation/devicetree/bindings/regulator/s5m8767-regulator.txt
> +++ /dev/null
> @@ -1,163 +0,0 @@
> -* Samsung S5M8767 Voltage and Current Regulator
> -
> -The Samsung S5M8767 is a multi-function device which includes voltage and
> -current regulators, rtc, charger controller and other sub-blocks. It is
> -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 s5m8767.
> -
> -Required properties:
> -- compatible: Should be "samsung,s5m8767-pmic".
> -- reg: Specifies the i2c slave address of the pmic block. It should be 0x66.
> -
> -- s5m8767,pmic-buck2-dvs-voltage: A set of 8 voltage values in micro-volt (uV)
> -  units for buck2 when changing voltage using gpio dvs. Refer to [1] below
> -  for additional information.
> -
> -- s5m8767,pmic-buck3-dvs-voltage: A set of 8 voltage values in micro-volt (uV)
> -  units for buck3 when changing voltage using gpio dvs. Refer to [1] below
> -  for additional information.
> -
> -- s5m8767,pmic-buck4-dvs-voltage: A set of 8 voltage values in micro-volt (uV)
> -  units for buck4 when changing voltage using gpio dvs. Refer to [1] below
> -  for additional information.
> -
> -- s5m8767,pmic-buck-ds-gpios: GPIO specifiers for three host gpio's used
> -  for selecting GPIO DVS lines. It is one-to-one mapped to dvs gpio lines.
> -
> -[1] If none of the 's5m8767,pmic-buck[2/3/4]-uses-gpio-dvs' optional
> -    property is specified, the 's5m8767,pmic-buck[2/3/4]-dvs-voltage'
> -    property should specify atleast one voltage level (which would be a
> -    safe operating voltage).
> -
> -    If either of the 's5m8767,pmic-buck[2/3/4]-uses-gpio-dvs' optional
> -    property is specified, then all the eight voltage values for the
> -    's5m8767,pmic-buck[2/3/4]-dvs-voltage' should be specified.
> -
> -Optional properties:
> -- interrupt-parent: Specifies the phandle of the interrupt controller to which
> -  the interrupts from s5m8767 are delivered to.
> -- interrupts: Interrupt specifiers for two interrupt sources.
> -  - First interrupt specifier is for 'irq1' interrupt.
> -  - Second interrupt specifier is for 'alert' interrupt.
> -- s5m8767,pmic-buck2-uses-gpio-dvs: 'buck2' can be controlled by gpio dvs.
> -- s5m8767,pmic-buck3-uses-gpio-dvs: 'buck3' can be controlled by gpio dvs.
> -- s5m8767,pmic-buck4-uses-gpio-dvs: 'buck4' can be controlled by gpio dvs.
> -
> -Additional properties required if either of the optional properties are used:
> -
> -- s5m8767,pmic-buck234-default-dvs-idx: Default voltage setting selected from
> -  the possible 8 options selectable by the dvs gpios. The value of this
> -  property should be between 0 and 7. If not specified or if out of range, the
> -  default value of this property is set to 0.
> -
> -- s5m8767,pmic-buck-dvs-gpios: GPIO specifiers for three host gpio's used
> -  for dvs. The format of the gpio specifier depends in the gpio controller.
> -
> -Regulators: The regulators of s5m8767 that have to be instantiated should be
> -included in a sub-node named 'regulators'. Regulator nodes included in this
> -sub-node should be of the format as listed below.
> -
> -	regulator_name {
> -		ldo1_reg: LDO1 {
> -			regulator-name = "VDD_ALIVE_1.0V";
> -			regulator-min-microvolt = <1100000>;
> -			regulator-max-microvolt = <1100000>;
> -			regulator-always-on;
> -			regulator-boot-on;
> -			op_mode = <1>; /* Normal Mode */
> -		};
> -	};
> -The above regulator entries are defined in regulator bindings documentation
> -except these properties:
> -	- op_mode: describes the different operating modes of the LDO's with
> -		power mode change in SOC. The different possible values are,
> -		0 - always off mode
> -		1 - on in normal mode
> -		2 - low power mode
> -		3 - suspend mode
> -	- s5m8767,pmic-ext-control-gpios: (optional) GPIO specifier for one
> -		GPIO controlling this regulator (enable/disable); This is
> -		valid only for buck9.
> -
> -The following are the names of the regulators that the s5m8767 pmic block
> -supports. Note: The 'n' in LDOn and BUCKn represents the LDO or BUCK number
> -as per the datasheet of s5m8767.
> -
> -	- LDOn
> -		  - valid values for n are 1 to 28
> -		  - Example: LDO1, LDO2, LDO28
> -	- BUCKn
> -		  - valid values for n are 1 to 9.
> -		  - Example: BUCK1, BUCK2, BUCK9
> -
> -The bindings inside the regulator nodes use the standard regulator bindings
> -which are documented elsewhere.
> -
> -Example:
> -
> -	s5m8767_pmic@66 {
> -		compatible = "samsung,s5m8767-pmic";
> -		reg = <0x66>;
> -
> -		s5m8767,pmic-buck2-uses-gpio-dvs;
> -		s5m8767,pmic-buck3-uses-gpio-dvs;
> -		s5m8767,pmic-buck4-uses-gpio-dvs;
> -
> -		s5m8767,pmic-buck-default-dvs-idx = <0>;
> -
> -		s5m8767,pmic-buck-dvs-gpios = <&gpx0 0 0>, /* DVS1 */
> -						 <&gpx0 1 0>, /* DVS2 */
> -						 <&gpx0 2 0>; /* DVS3 */
> -
> -		s5m8767,pmic-buck-ds-gpios = <&gpx2 3 0>, /* SET1 */
> -						<&gpx2 4 0>, /* SET2 */
> -						<&gpx2 5 0>; /* SET3 */
> -
> -		s5m8767,pmic-buck2-dvs-voltage = <1350000>, <1300000>,
> -						 <1250000>, <1200000>,
> -						 <1150000>, <1100000>,
> -						 <1000000>, <950000>;
> -
> -		s5m8767,pmic-buck3-dvs-voltage = <1100000>, <1100000>,
> -						 <1100000>, <1100000>,
> -						 <1000000>, <1000000>,
> -						 <1000000>, <1000000>;
> -
> -		s5m8767,pmic-buck4-dvs-voltage = <1200000>, <1200000>,
> -						 <1200000>, <1200000>,
> -						 <1200000>, <1200000>,
> -						 <1200000>, <1200000>;
> -
> -		regulators {
> -			ldo1_reg: LDO1 {
> -				regulator-name = "VDD_ABB_3.3V";
> -				regulator-min-microvolt = <3300000>;
> -				regulator-max-microvolt = <3300000>;
> -				op_mode = <1>; /* Normal Mode */
> -			};
> -
> -			ldo2_reg: LDO2 {
> -				regulator-name = "VDD_ALIVE_1.1V";
> -				regulator-min-microvolt = <1100000>;
> -				regulator-max-microvolt = <1100000>;
> -				regulator-always-on;
> -			};
> -
> -			buck1_reg: BUCK1 {
> -				regulator-name = "VDD_MIF_1.2V";
> -				regulator-min-microvolt = <950000>;
> -				regulator-max-microvolt = <1350000>;
> -				regulator-always-on;
> -				regulator-boot-on;
> -			};
> -
> -			vemmc_reg: BUCK9 {
> -				regulator-name = "VMEM_VDD_2.8V";
> -				regulator-min-microvolt = <2800000>;
> -				regulator-max-microvolt = <2800000>;
> -				op_mode = <3>; /* Standby Mode */
> -				s5m8767,pmic-ext-control-gpios = <&gpk0 2 0>;
> -			};
> -		};
> -	};
> diff --git a/Documentation/devicetree/bindings/regulator/samsung,s5m8767.txt b/Documentation/devicetree/bindings/regulator/samsung,s5m8767.txt
> new file mode 100644
> index 000000000000..093edda0c8df
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/regulator/samsung,s5m8767.txt
> @@ -0,0 +1,145 @@
> +Binding for Samsung S5M8767 regulator block
> +===========================================
> +
> +This is a part of device tree bindings for S5M family multi-function devices.
> +More information can be found in bindings/mfd/sec-core.txt file.
> +
> +The S5M8767 device provide buck and LDO regulators.
> +
> +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
> +
> +
> +Required properties of the main device node (the parent!):
> + - s5m8767,pmic-buck2-dvs-voltage: A set of 8 voltage values in micro-volt (uV)
> +   units for buck2 when changing voltage using gpio dvs. Refer to [1] below
> +   for additional information.
> +
> + - s5m8767,pmic-buck3-dvs-voltage: A set of 8 voltage values in micro-volt (uV)
> +   units for buck3 when changing voltage using gpio dvs. Refer to [1] below
> +   for additional information.
> +
> + - s5m8767,pmic-buck4-dvs-voltage: A set of 8 voltage values in micro-volt (uV)
> +   units for buck4 when changing voltage using gpio dvs. Refer to [1] below
> +   for additional information.
> +
> + - s5m8767,pmic-buck-ds-gpios: GPIO specifiers for three host gpio's used
> +   for selecting GPIO DVS lines. It is one-to-one mapped to dvs gpio lines.
> +
> + [1] If none of the 's5m8767,pmic-buck[2/3/4]-uses-gpio-dvs' optional
> +     property is specified, the 's5m8767,pmic-buck[2/3/4]-dvs-voltage'
> +     property should specify atleast one voltage level (which would be a
> +     safe operating voltage).
> +
> +     If either of the 's5m8767,pmic-buck[2/3/4]-uses-gpio-dvs' optional
> +     property is specified, then all the eight voltage values for the
> +     's5m8767,pmic-buck[2/3/4]-dvs-voltage' should be specified.
> +
> +Optional properties of the main device node (the parent!):
> + - s5m8767,pmic-buck2-uses-gpio-dvs: 'buck2' can be controlled by gpio dvs.
> + - s5m8767,pmic-buck3-uses-gpio-dvs: 'buck3' can be controlled by gpio dvs.
> + - s5m8767,pmic-buck4-uses-gpio-dvs: 'buck4' can be controlled by gpio dvs.
> +
> +Additional properties required if either of the optional properties are used:
> +
> + - s5m8767,pmic-buck234-default-dvs-idx: Default voltage setting selected from
> +   the possible 8 options selectable by the dvs gpios. The value of this
> +   property should be between 0 and 7. If not specified or if out of range, the
> +   default value of this property is set to 0.
> +
> + - s5m8767,pmic-buck-dvs-gpios: GPIO specifiers for three host gpio's used
> +   for dvs. The format of the gpio specifier depends in the gpio controller.
> +
> +
> +Names of regulators supported by S5M8767 device:
> +	- LDOn
> +		  - valid values for n are 1 to 28
> +		  - Example: LDO1, LDO2, LDO28
> +	- BUCKn
> +		  - valid values for n are 1 to 9.
> +		  - 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 the nodes under "regulators" sub-node:
> + - op_mode: describes the different operating modes of the LDO's with
> +            power mode change in SOC. The different possible values are,
> +             0 - always off mode
> +             1 - on in normal mode
> +             2 - low power mode
> +             3 - suspend mode
> + - s5m8767,pmic-ext-control-gpios: (optional) GPIO specifier for one
> +                                   GPIO controlling this regulator
> +                                   (enable/disable); This is valid only
> +                                   for buck9.
> +
> +Example:
> +
> +	s5m8767_pmic@66 {
> +		compatible = "samsung,s5m8767-pmic";
> +		reg = <0x66>;
> +
> +		s5m8767,pmic-buck2-uses-gpio-dvs;
> +		s5m8767,pmic-buck3-uses-gpio-dvs;
> +		s5m8767,pmic-buck4-uses-gpio-dvs;
> +
> +		s5m8767,pmic-buck-default-dvs-idx = <0>;
> +
> +		s5m8767,pmic-buck-dvs-gpios = <&gpx0 0 0>, /* DVS1 */
> +						 <&gpx0 1 0>, /* DVS2 */
> +						 <&gpx0 2 0>; /* DVS3 */
> +
> +		s5m8767,pmic-buck-ds-gpios = <&gpx2 3 0>, /* SET1 */
> +						<&gpx2 4 0>, /* SET2 */
> +						<&gpx2 5 0>; /* SET3 */
> +
> +		s5m8767,pmic-buck2-dvs-voltage = <1350000>, <1300000>,
> +						 <1250000>, <1200000>,
> +						 <1150000>, <1100000>,
> +						 <1000000>, <950000>;
> +
> +		s5m8767,pmic-buck3-dvs-voltage = <1100000>, <1100000>,
> +						 <1100000>, <1100000>,
> +						 <1000000>, <1000000>,
> +						 <1000000>, <1000000>;
> +
> +		s5m8767,pmic-buck4-dvs-voltage = <1200000>, <1200000>,
> +						 <1200000>, <1200000>,
> +						 <1200000>, <1200000>,
> +						 <1200000>, <1200000>;
> +
> +		regulators {
> +			ldo1_reg: LDO1 {
> +				regulator-name = "VDD_ABB_3.3V";
> +				regulator-min-microvolt = <3300000>;
> +				regulator-max-microvolt = <3300000>;
> +				op_mode = <1>; /* Normal Mode */
> +			};
> +
> +			ldo2_reg: LDO2 {
> +				regulator-name = "VDD_ALIVE_1.1V";
> +				regulator-min-microvolt = <1100000>;
> +				regulator-max-microvolt = <1100000>;
> +				regulator-always-on;
> +			};
> +
> +			buck1_reg: BUCK1 {
> +				regulator-name = "VDD_MIF_1.2V";
> +				regulator-min-microvolt = <950000>;
> +				regulator-max-microvolt = <1350000>;
> +				regulator-always-on;
> +				regulator-boot-on;
> +			};
> +
> +			vemmc_reg: BUCK9 {
> +				regulator-name = "VMEM_VDD_2.8V";
> +				regulator-min-microvolt = <2800000>;
> +				regulator-max-microvolt = <2800000>;
> +				op_mode = <3>; /* Standby Mode */
> +				s5m8767,pmic-ext-control-gpios = <&gpk0 2 0>;
> +			};
> +		};
> +	};
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 137284e37250..7e1db5746ee4 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -9233,9 +9233,9 @@ F:	drivers/regulator/s5m*.c
>  F:	drivers/clk/clk-s2mps11.c
>  F:	drivers/rtc/rtc-s5m.c
>  F:	include/linux/mfd/samsung/
> -F:	Documentation/devicetree/bindings/regulator/s5m8767-regulator.txt
>  F:	Documentation/devicetree/bindings/mfd/samsung,sec-core.txt
>  F:	Documentation/devicetree/bindings/regulator/samsung,s2m*.txt
> +F:	Documentation/devicetree/bindings/regulator/samsung,s5m*.txt
>  F:	Documentation/devicetree/bindings/clock/samsung,s2mps11.txt
>  
>  SAMSUNG S5P/EXYNOS4 SOC SERIES CAMERA SUBSYSTEM DRIVERS

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 3/3] dt-bindings: regulator/mfd: Reorganize S2MPA01 bindings
  2015-12-04  1:10 ` [PATCH 3/3] dt-bindings: regulator/mfd: Reorganize S2MPA01 bindings Krzysztof Kozlowski
                     ` (2 preceding siblings ...)
  2015-12-07  9:37   ` Lee Jones
@ 2016-01-11  7:51   ` Lee Jones
  3 siblings, 0 replies; 20+ messages in thread
From: Lee Jones @ 2016-01-11  7:51 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Sangbeom Kim, Rob Herring, Pawel Moll, Mark Rutland,
	Ian Campbell, Kumar Gala, Kukjin Kim, linux-kernel,
	linux-samsung-soc, devicetree, Michael Turquette, Stephen Boyd,
	Liam Girdwood, Mark Brown, linux-clk

On Fri, 04 Dec 2015, Krzysztof Kozlowski wrote:

> 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 <k.kozlowski@samsung.com>
> ---
>  Documentation/devicetree/bindings/mfd/s2mpa01.txt  | 90 ----------------------
>  .../devicetree/bindings/mfd/samsung,sec-core.txt   |  4 +-
>  .../bindings/regulator/samsung,s2mpa01.txt         | 79 +++++++++++++++++++
>  3 files changed, 82 insertions(+), 91 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/mfd/s2mpa01.txt
>  create mode 100644 Documentation/devicetree/bindings/regulator/samsung,s2mpa01.txt

Applied, thanks.

> diff --git a/Documentation/devicetree/bindings/mfd/s2mpa01.txt b/Documentation/devicetree/bindings/mfd/s2mpa01.txt
> deleted file mode 100644
> index c13d3d8c3947..000000000000
> --- a/Documentation/devicetree/bindings/mfd/s2mpa01.txt
> +++ /dev/null
> @@ -1,90 +0,0 @@
> -
> -* Samsung S2MPA01 Voltage and Current Regulator
> -
> -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.
> -
> -Required properties:
> -- compatible: Should be "samsung,s2mpa01-pmic".
> -- reg: Specifies the I2C slave address of the PMIC block. It should be 0x66.
> -
> -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=<value>.
> -
> -  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.
> -
> -	- 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
> -
> -Example:
> -
> -	s2mpa01_pmic@66 {
> -		compatible = "samsung,s2mpa01-pmic";
> -		reg = <0x66>;
> -
> -		regulators {
> -			ldo1_reg: LDO1 {
> -				regulator-name = "VDD_ALIVE";
> -				regulator-min-microvolt = <1000000>;
> -				regulator-max-microvolt = <1000000>;
> -			};
> -
> -			ldo2_reg: LDO2 {
> -				regulator-name = "VDDQ_MMC2";
> -				regulator-min-microvolt = <2800000>;
> -				regulator-max-microvolt = <2800000>;
> -				regulator-always-on;
> -			};
> -
> -			buck1_reg: BUCK1 {
> -				regulator-name = "vdd_mif";
> -				regulator-min-microvolt = <950000>;
> -				regulator-max-microvolt = <1350000>;
> -				regulator-always-on;
> -				regulator-boot-on;
> -			};
> -
> -			buck2_reg: BUCK2 {
> -				regulator-name = "vdd_arm";
> -				regulator-min-microvolt = <950000>;
> -				regulator-max-microvolt = <1350000>;
> -				regulator-always-on;
> -				regulator-boot-on;
> -				regulator-ramp-delay = <50000>;
> -			};
> -		};
> -	};
> 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/regulator/samsung,s2mpa01.txt b/Documentation/devicetree/bindings/regulator/samsung,s2mpa01.txt
> new file mode 100644
> index 000000000000..bae3c7f838cf
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/regulator/samsung,s2mpa01.txt
> @@ -0,0 +1,79 @@
> +Binding for Samsung S2MPA01 regulator block
> +===========================================
> +
> +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 S2MPA01 device provide buck and LDO regulators.
> +
> +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
> +
> +
> +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:
> +
> +	s2mpa01_pmic@66 {
> +		compatible = "samsung,s2mpa01-pmic";
> +		reg = <0x66>;
> +
> +		regulators {
> +			ldo1_reg: LDO1 {
> +				regulator-name = "VDD_ALIVE";
> +				regulator-min-microvolt = <1000000>;
> +				regulator-max-microvolt = <1000000>;
> +			};
> +
> +			ldo2_reg: LDO2 {
> +				regulator-name = "VDDQ_MMC2";
> +				regulator-min-microvolt = <2800000>;
> +				regulator-max-microvolt = <2800000>;
> +				regulator-always-on;
> +			};
> +
> +			buck1_reg: BUCK1 {
> +				regulator-name = "vdd_mif";
> +				regulator-min-microvolt = <950000>;
> +				regulator-max-microvolt = <1350000>;
> +				regulator-always-on;
> +				regulator-boot-on;
> +			};
> +
> +			buck2_reg: BUCK2 {
> +				regulator-name = "vdd_arm";
> +				regulator-min-microvolt = <950000>;
> +				regulator-max-microvolt = <1350000>;
> +				regulator-always-on;
> +				regulator-boot-on;
> +				regulator-ramp-delay = <50000>;
> +			};
> +		};
> +	};

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 3/3] dt-bindings: regulator/mfd: Reorganize S2MPA01 bindings
  2015-12-04 12:11   ` Mark Brown
  2015-12-07  1:07     ` Krzysztof Kozlowski
@ 2016-01-11  7:56     ` Lee Jones
  1 sibling, 0 replies; 20+ messages in thread
From: Lee Jones @ 2016-01-11  7:56 UTC (permalink / raw)
  To: Mark Brown
  Cc: Krzysztof Kozlowski, Sangbeom Kim, Rob Herring, Pawel Moll,
	Mark Rutland, Ian Campbell, Kumar Gala, Kukjin Kim, linux-kernel,
	linux-samsung-soc, devicetree, Michael Turquette, Stephen Boyd,
	Liam Girdwood, linux-clk

On Fri, 04 Dec 2015, Mark Brown wrote:

> On Fri, Dec 04, 2015 at 10:10:05AM +0900, Krzysztof Kozlowski wrote:
> > 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:
> 
> Acked-by: Mark Brown <broonie@kernel.org>
> 
> >  - add company prefix to file name (regulator/samsung,s2mpa01.txt),
> 
> I'm not 100% convinced about these prefixes BTW, the duplication isn't
> usually an issue within a subsystem.  They don't do any harm either
> though.

I think they're ugly and would prefer not to accept them, but lots of
people are submitting them now and I can't be bothered to fight it, so
meh!

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2016-01-11  7:56 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-04  1:10 [PATCH 0/3] dt-bindings: regulator/clock/mfd: Reorganize S2M/S5M bindings Krzysztof Kozlowski
2015-12-04  1:10 ` [PATCH 1/3] dt-bindings: regulator/clock/mfd: Reorganize S2MPS-family bindings Krzysztof Kozlowski
2015-12-04 12:06   ` Mark Brown
2015-12-04 15:13   ` Rob Herring
2015-12-07  9:38   ` Lee Jones
2015-12-24  7:20   ` Michael Turquette
2016-01-11  7:50   ` Lee Jones
2015-12-04  1:10 ` [PATCH 2/3] dt-bindings: regulator/mfd: Reorganize S5M8767 bindings Krzysztof Kozlowski
2015-12-04 12:07   ` Mark Brown
2015-12-04 15:20   ` Rob Herring
2015-12-07  9:37   ` Lee Jones
2016-01-11  7:51   ` Lee Jones
2015-12-04  1:10 ` [PATCH 3/3] dt-bindings: regulator/mfd: Reorganize S2MPA01 bindings Krzysztof Kozlowski
2015-12-04 12:11   ` Mark Brown
2015-12-07  1:07     ` Krzysztof Kozlowski
2016-01-11  7:56     ` Lee Jones
2015-12-04 15:55   ` Rob Herring
2015-12-07  1:05     ` Krzysztof Kozlowski
2015-12-07  9:37   ` Lee Jones
2016-01-11  7:51   ` Lee Jones

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.