Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ed59c8f9 authored by Mark Brown's avatar Mark Brown
Browse files

Merge tag 'regulator-v3.15' into regulator-linus

regulator: Updates for v3.15

This release has lots and lots of small cleanups and fixes in the
regulator subsystem, mainly cleaning up some bad patterns that got
duplicated in DT code, but otherwise very little of note outside
of the scope of the relevant drivers:

 - Support for configuration of the initial state for gpio regulators
   with multi-voltage support.
 - Support for calling regulator_set_voltage() on fixed regulators.
 - New drivers for Broadcom BCM590xx, Freescale pfuze200, Samsung S2MPA01 &
   S2MPS11/4, some PWM controlled regulators found on some ST boards and
   TI TPS65218.

# gpg: Signature made Mon 31 Mar 2014 12:29:14 BST using RSA key ID 7EA229BD
# gpg: Good signature from "Mark Brown <broonie@sirena.org.uk>"
# gpg:                 aka "Mark Brown <broonie@debian.org>"
# gpg:                 aka "Mark Brown <broonie@kernel.org>"
# gpg:                 aka "Mark Brown <broonie@tardis.ed.ac.uk>"
# gpg:                 aka "Mark Brown <broonie@linaro.org>"
# gpg:                 aka "Mark Brown <Mark.Brown@linaro.org>"
parents 455c6fdb 5481b348
Loading
Loading
Loading
Loading
+90 −0
Original line number Original line Diff line number Diff line

* 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>;
			};
		};
	};
+8 −4
Original line number Original line Diff line number Diff line


* Samsung S2MPS11 Voltage and Current Regulator
* Samsung S2MPS11 and S2MPS14 Voltage and Current Regulator


The Samsung S2MPS11 is a multi-function device which includes voltage and
The Samsung S2MPS11 is a multi-function device which includes voltage and
current regulators, RTC, charger controller and other sub-blocks. It is
current regulators, RTC, charger controller and other sub-blocks. It is
@@ -7,7 +7,7 @@ interfaced to the host controller using an I2C interface. Each sub-block is
addressed by the host system using different I2C slave addresses.
addressed by the host system using different I2C slave addresses.


Required properties:
Required properties:
- compatible: Should be "samsung,s2mps11-pmic".
- compatible: Should be "samsung,s2mps11-pmic" or "samsung,s2mps14-pmic".
- reg: Specifies the I2C slave address of the pmic block. It should be 0x66.
- reg: Specifies the I2C slave address of the pmic block. It should be 0x66.


Optional properties:
Optional properties:
@@ -59,10 +59,14 @@ supports. Note: The 'n' in LDOn and BUCKn represents the LDO or BUCK number
as per the datasheet of s2mps11.
as per the datasheet of s2mps11.


	- LDOn
	- LDOn
		  - valid values for n are 1 to 38
		  - valid values for n are:
			- S2MPS11: 1 to 38
			- S2MPS14: 1 to 25
		  - Example: LDO1, LD02, LDO28
		  - Example: LDO1, LD02, LDO28
	- BUCKn
	- BUCKn
		  - valid values for n are 1 to 10.
		  - valid values for n are:
			- S2MPS11: 1 to 10
			- S2MPS14: 1 to 5
		  - Example: BUCK1, BUCK2, BUCK9
		  - Example: BUCK1, BUCK2, BUCK9


Example:
Example:
+1 −1
Original line number Original line Diff line number Diff line
@@ -11,7 +11,7 @@ Required properties:
- #interrupt-cells: the number of cells to describe an IRQ, this should be 2.
- #interrupt-cells: the number of cells to describe an IRQ, this should be 2.
  The first cell is the IRQ number.
  The first cell is the IRQ number.
  The second cell is the flags, encoded as the trigger masks from
  The second cell is the flags, encoded as the trigger masks from
  Documentation/devicetree/bindings/interrupts.txt
  Documentation/devicetree/bindings/interrupt-controller/interrupts.txt
- regulators: This is the list of child nodes that specify the regulator
- regulators: This is the list of child nodes that specify the regulator
  initialization data for defined regulators. Not all regulators for the given
  initialization data for defined regulators. Not all regulators for the given
  device need to be present. The definition for each of these nodes is defined
  device need to be present. The definition for each of these nodes is defined
+4 −0
Original line number Original line Diff line number Diff line
@@ -8,8 +8,12 @@ Required properties:
Optional properties:
Optional properties:
- enable-gpio		: GPIO to use to enable/disable the regulator.
- enable-gpio		: GPIO to use to enable/disable the regulator.
- gpios			: GPIO group used to control voltage.
- gpios			: GPIO group used to control voltage.
- gpios-states		: gpios pin's initial states array. 0: LOW, 1: HIGH.
			  defualt is LOW if nothing is specified.
- startup-delay-us	: Startup time in microseconds.
- startup-delay-us	: Startup time in microseconds.
- enable-active-high	: Polarity of GPIO is active high (default is low).
- enable-active-high	: Polarity of GPIO is active high (default is low).
- regulator-type	: Specifies what is being regulated, must be either
			  "voltage" or "current", defaults to current.


Any property defined as part of the core regulator binding defined in
Any property defined as part of the core regulator binding defined in
regulator.txt can also be used.
regulator.txt can also be used.
+94 −2
Original line number Original line Diff line number Diff line
PFUZE100 family of regulators
PFUZE100 family of regulators


Required properties:
Required properties:
- compatible: "fsl,pfuze100"
- compatible: "fsl,pfuze100" or "fsl,pfuze200"
- reg: I2C slave address
- reg: I2C slave address


Required child node:
Required child node:
@@ -10,11 +10,14 @@ Required child node:
  Documentation/devicetree/bindings/regulator/regulator.txt.
  Documentation/devicetree/bindings/regulator/regulator.txt.


  The valid names for regulators are:
  The valid names for regulators are:
  --PFUZE100
  sw1ab,sw1c,sw2,sw3a,sw3b,sw4,swbst,vsnvs,vrefddr,vgen1~vgen6
  sw1ab,sw1c,sw2,sw3a,sw3b,sw4,swbst,vsnvs,vrefddr,vgen1~vgen6
  --PFUZE200
  sw1ab,sw2,sw3a,sw3b,swbst,vsnvs,vrefddr,vgen1~vgen6


Each regulator is defined using the standard binding for regulators.
Each regulator is defined using the standard binding for regulators.


Example:
Example 1: PFUZE100


	pmic: pfuze100@08 {
	pmic: pfuze100@08 {
		compatible = "fsl,pfuze100";
		compatible = "fsl,pfuze100";
@@ -113,3 +116,92 @@ Example:
			};
			};
		};
		};
	};
	};


Example 2: PFUZE200

	pmic: pfuze200@08 {
		compatible = "fsl,pfuze200";
		reg = <0x08>;

		regulators {
			sw1a_reg: sw1ab {
				regulator-min-microvolt = <300000>;
				regulator-max-microvolt = <1875000>;
				regulator-boot-on;
				regulator-always-on;
				regulator-ramp-delay = <6250>;
			};

			sw2_reg: sw2 {
				regulator-min-microvolt = <800000>;
				regulator-max-microvolt = <3300000>;
				regulator-boot-on;
				regulator-always-on;
			};

			sw3a_reg: sw3a {
				regulator-min-microvolt = <400000>;
				regulator-max-microvolt = <1975000>;
				regulator-boot-on;
				regulator-always-on;
			};

			sw3b_reg: sw3b {
				regulator-min-microvolt = <400000>;
				regulator-max-microvolt = <1975000>;
				regulator-boot-on;
				regulator-always-on;
			};

			swbst_reg: swbst {
				regulator-min-microvolt = <5000000>;
				regulator-max-microvolt = <5150000>;
			};

			snvs_reg: vsnvs {
				regulator-min-microvolt = <1000000>;
				regulator-max-microvolt = <3000000>;
				regulator-boot-on;
				regulator-always-on;
			};

			vref_reg: vrefddr {
				regulator-boot-on;
				regulator-always-on;
			};

			vgen1_reg: vgen1 {
				regulator-min-microvolt = <800000>;
				regulator-max-microvolt = <1550000>;
			};

			vgen2_reg: vgen2 {
				regulator-min-microvolt = <800000>;
				regulator-max-microvolt = <1550000>;
			};

			vgen3_reg: vgen3 {
				regulator-min-microvolt = <1800000>;
				regulator-max-microvolt = <3300000>;
			};

			vgen4_reg: vgen4 {
				regulator-min-microvolt = <1800000>;
				regulator-max-microvolt = <3300000>;
				regulator-always-on;
			};

			vgen5_reg: vgen5 {
				regulator-min-microvolt = <1800000>;
				regulator-max-microvolt = <3300000>;
				regulator-always-on;
			};

			vgen6_reg: vgen6 {
				regulator-min-microvolt = <1800000>;
				regulator-max-microvolt = <3300000>;
				regulator-always-on;
			};
		};
	};
Loading