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

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

Merge remote-tracking branch 'regulator/fix/s5m8767' into regulator-linus

parents 8d0509e9 1baa3b4e
Loading
Loading
Loading
Loading
+55 −0
Original line number Diff line number Diff line
Maxim MAX77693 multi-function device

MAX77693 is a Multifunction device with the following submodules:
- PMIC,
- CHARGER,
- LED,
- MUIC,
- HAPTIC

It is interfaced to host controller using i2c.
This document describes the bindings for the mfd device.

Required properties:
- compatible : Must be "maxim,max77693".
- reg : Specifies the i2c slave address of PMIC block.
- interrupts : This i2c device has an IRQ line connected to the main SoC.
- interrupt-parent :  The parent interrupt controller.

Optional properties:
- regulators : The regulators of max77693 have to be instantiated under subnod
  named "regulators" using the following format.

	regulators {
		regualtor-compatible = ESAFEOUT1/ESAFEOUT2/CHARGER
		standard regulator constratints[*].
	};

	[*] refer Documentation/devicetree/bindings/regulator/regulator.txt

Example:
	max77693@66 {
		compatible = "maxim,max77693";
		reg = <0x66>;
		interrupt-parent = <&gpx1>;
		interrupts = <5 2>;

		regulators {
			esafeout@1 {
				regulator-compatible = "ESAFEOUT1";
				regulator-name = "ESAFEOUT1";
				regulator-boot-on;
			};
			esafeout@2 {
				regulator-compatible = "ESAFEOUT2";
				regulator-name = "ESAFEOUT2";
				};
			charger@0 {
				regulator-compatible = "CHARGER";
				regulator-name = "CHARGER";
				regulator-min-microamp = <60000>;
				regulator-max-microamp = <2580000>;
					regulator-boot-on;
			};
		};
	};
+160 −0
Original line number Diff line number Diff line
Binding for TI/National Semiconductor LP872x Driver

Required properties:
  - compatible: "ti,lp8720" or "ti,lp8725"
  - reg: I2C slave address. 0x7d = LP8720, 0x7a = LP8725

Optional properties:
  - ti,general-config: the value of LP872X_GENERAL_CFG register (u8)
    (LP8720)
    bit[2]: BUCK output voltage control by external DVS pin or register
            1 = external pin, 0 = bit7 of register 08h
    bit[1]: sleep control by external DVS pin or register
            1 = external pin, 0 = bit6 of register 08h
    bit[0]: time step unit(usec). 1 = 25, 0 = 50

    (LP8725)
    bit[7:6]: time step unit(usec). 00 = 32, 01 = 64, 10 = 128, 11 = 256
    bit[4]:   BUCK2 enable control. 1 = enable, 0 = disable
    bit[3]:   BUCK2 output voltage register address. 1 = 0Ah, 0 = 0Bh
    bit[2]:   BUCK1 output voltage control by external DVS pin or register
              1 = register 08h, 0 = DVS
    bit[1]:   LDO sleep control. 1 = sleep mode, 0 = normal
    bit[0]:   BUCK1 enable control, 1 = enable, 0 = disable

    For more details, please see the datasheet.

  - ti,update-config: define it when LP872X_GENERAL_CFG register should be set
  - ti,dvs-gpio: GPIO specifier for external DVS pin control of LP872x devices.
  - ti,dvs-vsel: DVS selector. 0 = SEL_V1, 1 = SEL_V2.
  - ti,dvs-state: initial DVS pin state. 0 = DVS_LOW, 1 = DVS_HIGH.

  Sub nodes for regulator_init_data
    LP8720 has maximum 6 nodes. (child name: ldo1 ~ 5 and buck)
    LP8725 has maximum 9 nodes. (child name: ldo1 ~ 5, lilo1,2 and buck1,2)
    For more details, please see the following binding document.
    (Documentation/devicetree/bindings/regulator/regulator.txt)

Datasheet
  - LP8720: http://www.ti.com/lit/ds/symlink/lp8720.pdf
  - LP8725: http://www.ti.com/lit/ds/symlink/lp8725.pdf

Example 1) LP8720

lp8720@7d {
	compatible = "ti,lp8720";
	reg = <0x7d>;

	/* external DVS pin used, timestep is 25usec */
	ti,general-config = /bits/ 8 <0x03>;
	ti,update-config;

	/*
	 * The dvs-gpio depends on the processor environment.
	 * For example, following GPIO specifier means GPIO134 in OMAP4.
	 */
	ti,dvs-gpio = <&gpio5 6 0>;
	ti,dvs-vsel = /bits/ 8 <1>;		/* SEL_V2 */
	ti,dvs-state = /bits/ 8 <1>;		/* DVS_HIGH */

	vaf: ldo1 {
		regulator-min-microvolt = <1200000>;
		regulator-max-microvolt = <3300000>;
	};

	vmmc: ldo2 {
		regulator-min-microvolt = <1200000>;
		regulator-max-microvolt = <3300000>;
	};

	vcam_io: ldo3 {
		regulator-min-microvolt = <1200000>;
		regulator-max-microvolt = <3300000>;
		regulator-boot-on;
	};

	vcam_core: ldo4 {
		regulator-min-microvolt = <800000>;
		regulator-max-microvolt = <2850000>;
		regulator-boot-on;
	};

	vcam: ldo5 {
		regulator-min-microvolt = <1200000>;
		regulator-max-microvolt = <3300000>;
	};

	vcc: buck {
		regulator-name = "VBUCK";
		regulator-min-microvolt = <800000>;
		regulator-max-microvolt = <2300000>;
	};
};

Example 2) LP8725

lp8725@7a {
	compatible = "ti,lp8725";
	reg = <0x7a>;

	/* Enable BUCK1,2, no DVS, normal LDO mode, timestep is 256usec */
	ti,general-config = /bits/ 8 <0xdd>;
	ti,update-config;

	vcam_io: ldo1 {
		regulator-min-microvolt = <1200000>;
		regulator-max-microvolt = <3300000>;
	};

	vcam_core: ldo2 {
		regulator-min-microvolt = <1200000>;
		regulator-max-microvolt = <3300000>;
	};

	vcam: ldo3 {
		regulator-min-microvolt = <1200000>;
		regulator-max-microvolt = <3300000>;
	};

	vcmmb_io: ldo4 {
		regulator-min-microvolt = <1200000>;
		regulator-max-microvolt = <3300000>;
		regulator-boot-on;
	};

	vcmmb_core: ldo5 {
		regulator-min-microvolt = <1200000>;
		regulator-max-microvolt = <3300000>;
		regulator-boot-on;
	};

	vaux1: lilo1 {
		regulator-name = "VAUX1";
		regulator-min-microvolt = <800000>;
		regulator-max-microvolt = <3300000>;
	};

	vaux2: lilo2 {
		regulator-name = "VAUX2";
		regulator-min-microvolt = <800000>;
		regulator-max-microvolt = <3300000>;
	};

	vcc1: buck1 {
		regulator-name = "VBUCK1";
		regulator-min-microvolt = <800000>;
		regulator-max-microvolt = <3000000>;
		regulator-min-microamp  = <460000>;
		regulator-max-microamp  = <1370000>;
		regulator-boot-on;
	};

	vcc2: buck2 {
		regulator-name = "VBUCK2";
		regulator-min-microvolt = <800000>;
		regulator-max-microvolt = <3000000>;
		regulator-min-microamp  = <460000>;
		regulator-max-microamp  = <1370000>;
		regulator-boot-on;
	};
};
+21 −0
Original line number Diff line number Diff line
* Maxim MAX8973 Voltage Regulator

Required properties:

- compatible:	must be "maxim,max8973"
- reg:		the i2c slave address of the regulator. It should be 0x1b.

Any standard regulator properties can be used to configure the single max8973
DCDC.

Example:

	max8973@1b {
		compatible = "maxim,max8973";
		reg = <0x1b>;

		regulator-min-microvolt = <935000>;
		regulator-max-microvolt = <1200000>;
		regulator-boot-on;
		regulator-always-on;
	};
+1 −0
Original line number Diff line number Diff line
@@ -9,6 +9,7 @@ Optional properties:
- regulator-max-microamp: largest current consumers may set
- regulator-always-on: boolean, regulator should never be disabled
- regulator-boot-on: bootloader/firmware enabled regulator
- regulator-allow-bypass: allow the regulator to go into bypass mode
- <name>-supply: phandle to the parent supply/regulator node
- regulator-ramp-delay: ramp delay for regulator(in uV/uS)

+7 −7
Original line number Diff line number Diff line
* Samsung S5M8767 Voltage and Current Regulator

The Samsung S5M8767 is a multi-function device which includes volatage and
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
@@ -103,13 +103,13 @@ Example:

		s5m8767,pmic-buck-default-dvs-idx = <0>;

		s5m8767,pmic-buck-dvs-gpios = <&gpx0 0 1 0 0>, /* DVS1 */
						 <&gpx0 1 1 0 0>, /* DVS2 */
						 <&gpx0 2 1 0 0>; /* DVS3 */
		s5m8767,pmic-buck-dvs-gpios = <&gpx0 0 0>, /* DVS1 */
						 <&gpx0 1 0>, /* DVS2 */
						 <&gpx0 2 0>; /* DVS3 */

		s5m8767,pmic-buck-ds-gpios = <&gpx2 3 1 0 0>, /* SET1 */
						<&gpx2 4 1 0 0>, /* SET2 */
						<&gpx2 5 1 0 0>; /* SET3 */
		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>,
Loading