Qualcomm RPM Regulators

rpm-regulator-smd is a regulator driver which supports regulators inside of
PMICs which are controlled by the RPM processor.  Communication with the RPM
processor takes place over SMD.

Required structure:
- RPM regulators must be described in two levels of devices nodes.  The first
	level describes the interface with the RPM.  The second level describes
	properties of one regulator framework interface (of potentially many) to
	the regulator.

[First Level Nodes]

Required properties:
- compatible:          Must be "qcom,rpm-regulator-smd-resource"
- qcom,resource-name:  Resource name string for this regulator to be used in RPM
			transactions.  Length is 4 characters max.
- qcom,resource-id:    Resource instance ID for this regulator to be used in RPM
			transactions.
- qcom,regulator-type: Type of this regulator.  Supported values are:
				0 = LDO
				1 = SMPS
				2 = VS
				3 = NCP

Optional properties:
- qcom,allow-atomic:   Flag specifying if atomic access is allowed for this
			regulator.  Supported values are:
				0 or not present = mutex locks used
				1 = spinlocks used
- qcom,enable-time:    Time in us to delay after enabling the regulator
- qcom,hpm-min-load:   Load current in uA which corresponds to the minimum load
			which requires the regulator to be in high power mode.

[Second Level Nodes]

Required properties:
- compatible:          Must be "qcom,rpm-regulator-smd"
- regulator-name:      A string used as a descriptive name for regulator outputs
- qcom,set:            Specifies which sets that requests made with this
			regulator interface should be sent to.  Regulator
			requests sent in the active set take effect immediately.
			Requests sent in the sleep set take effect when the Apps
			processor transitions into RPM assisted power collapse.
			Supported values are:
				1 = Active set only
				2 = Sleep set only
				3 = Both active and sleep sets



Optional properties:
- parent-supply:               phandle to the parent supply/regulator node
- qcom,system-load:            Load in uA present on regulator that is not
				captured by any consumer request
The following properties specify initial values for parameters to be sent to the
RPM in regulator requests.
- qcom,init-enable:            0 = regulator disabled
			       1 = regulator enabled
- qcom,init-voltage:           Voltage in uV
- qcom,init-current:           Current in mA
- qcom,init-ldo-mode:          Operating mode to be used with LDO regulators
				Supported values are:
					0 = mode determined by current requests
					1 = force HPM (NPM)
- qcom,init-smps-mode:         Operating mode to be used with SMPS regulators
				Supported values are:
					0 = auto; hardware determines mode
					1 = mode determined by current requests
					2 = force HPM (PWM)
- qcom,init-pin-ctrl-enable:   Bit mask specifying which hardware pins should be
				used to enable the regulator, if any; supported
				bits are:
					0 = ignore all hardware enable signals
					BIT(0) = follow HW0_EN signal
					BIT(1) = follow HW1_EN signal
					BIT(2) = follow HW2_EN signal
					BIT(3) = follow HW3_EN signal
- qcom,init-pin-ctrl-mode:     Bit mask specifying which hardware pins should be
				used to force the regulator into high power
				mode, if any.  Supported bits are:
					0 = ignore all hardware enable signals
					BIT(0) = follow HW0_EN signal
					BIT(1) = follow HW1_EN signal
					BIT(2) = follow HW2_EN signal
					BIT(3) = follow HW3_EN signal
					BIT(4) = follow PMIC awake state
- qcom,init-frequency:         Switching frequency in MHz for SMPS regulators.
				Supported values are:
					 0 = Don't care about frequency used
					 1 = 19.20
					 2 = 9.60
					 3 = 6.40
					 4 = 4.80
					 5 = 3.84
					 6 = 3.20
					 7 = 2.74
					 8 = 2.40
					 9 = 2.13
					10 = 1.92
					11 = 1.75
					12 = 1.60
					13 = 1.48
					14 = 1.37
					15 = 1.28
					16 = 1.20
- qcom,init-head-room:         Voltage head room in uV required for the
				regulator
- qcom,init-quiet-mode:        Specify that quiet mode is needed for an SMPS
				regulator in order to have lower output noise.
				Supported values are:
					0 = No quiet mode
					1 = Quiet mode
					2 = Super quiet mode
- qcom,init-freq-reason:       Consumer requiring specified frequency for an
				SMPS regulator.  Supported values are:
					0 = None
					1 = Bluetooth
					2 = GPS
					4 = WLAN
					8 = WAN

All properties specified within the core regulator framework can also be used in
second level nodes.  These bindings can be found in:
Documentation/devicetree/bindings/regulator/regulator.txt.

Example:

rpm-regulator-smpb1 {
	qcom,resource-name = "smpb";
	qcom,resource-id = <1>;
	qcom,regulator-type = <1>;
	qcom,hpm-min-load = <100000>;
	compatible = "qcom,rpm-regulator-smd-resource";
	status = "disabled";

	pm8841_s1: regulator-s1 {
		regulator-name = "8841_s1";
		qcom,set = <3>;
		regulator-min-microvolt = <900000>;
		regulator-max-microvolt = <1150000>;
		qcom,init-voltage = <1150000>;
		compatible = "qcom,rpm-regulator-smd";
	};
	pm8841_s1_ao: regulator-s1-ao {
		regulator-name = "8841_s1_ao";
		qcom,set = <1>;
		regulator-min-microvolt = <900000>;
		regulator-max-microvolt = <1150000>;
		compatible = "qcom,rpm-regulator-smd";
	};
};
