Qualcomm CPR (Core Power Reduction) Regulator

CPR regulator device is for Qualcomm RBCPR (RapidBridge CPR) on
	application processor core. It takes voltage corner level
	as input and converts it to actual voltage based on the
	suggestions from factory production process. When CPR is
	enabled for application processer core, it will suggest
	scaling the voltage up or down for best performance and
	power of the core. The scaling based on factory production
	process is called PVS (Process Voltage Scaling) with efuse
	bits to indicate what bin (and voltage range) a chip is in.

Required properties:
- compatible:			Must be "qcom,cpr-regulator"
- reg:				Register addresses for RBCPR, RBCPR clock
				select, PVS eFuse and CPR eFuse
- reg-names:			Register names. Must be "rbcpr", "rbcpr_clk",
				"pvs_efuse" and "cpr_efuse"
- regulator-name:		A string used to describe the regulator
- interrupts:			Interrupt line from RBCPR to interrupt controller.
- regulator-min-microvolt:	Minimum corner value as min constraint, which
				should be 1 for SVS corner
- regulator-max-microvolt:	Maximum corner value as max constraint, which
				should be 4 for SUPER_TURBO or 3 for TURBO
- qcom,num-efuse-bits:		The number of bits used in efuse memory to
				represent total number of PVS bins. It should
				not exceed a maximum of 5 for total number of
				32 bins.
- qcom,pvs-bin-process:		A list of integers whose length is equal to 2 to
				the power of qcom,num-efuse-bits. The location or
				0-based index of an element in the list corresponds
				to the bin number. The value of each integer
				corresponds to the PVS process speed of the APC
				silicon for a chip with one of these cases:
					1 = APC_PVS_SLOW
					2 = APC_PVS_NOM
					3 = APC_PVS_FAST
					0 or other values = No PVS
- qcom,pvs-corner-ceiling-slow:	Ceiling voltages of all corners for APC_PVS_SLOW
- qcom,pvs-corner-ceiling-nom:	Ceiling voltages of all corners for APC_PVS_NOM
- qcom,pvs-corner-ceiling-fast:	Ceiling voltages of all corners for APC_PVS_FAST
				The ceiling voltages for each of above three
				properties may look like this:
				  0 (SVS voltage):		1050000 uV
				  1 (NORMAL voltage):		1150000 uV
				  2 (TURBO voltage):		1275000 uV
- vdd-apc-supply:		Regulator to supply VDD APC power
- qcom,vdd-apc-step-up-limit:	Limit of vdd-apc-supply steps for scaling up.
- qcom,vdd-apc-step-down-limit:	Limit of vdd-apc-supply steps for scaling down.
- qcom,cpr-ref-clk:		The reference clock in kHz.
- qcom,cpr-timer-delay:		The delay in microseconds for the timer interval.
- qcom,cpr-timer-cons-up:	Consecutive number of timer interval (qcom,cpr-timer-delay)
				occurred before issuing UP interrupt.
- qcom,cpr-timer-cons-down:	Consecutive number of timer interval (qcom,cpr-timer-delay)
				occurred before issuing DOWN interrupt.
- qcom,cpr-irq-line:		Internal interrupt route signal of RBCPR, one of 0, 1 or 2.
- qcom,cpr-step-quotient:	Number of CPR quotient (RO count) per vdd-apc-supply step
				to issue error_steps.
- qcom,cpr-up-threshold:	The threshold for CPR to issue interrupt when
				error_steps is greater than it when stepping up.
- qcom,cpr-down-threshold:	The threshold for CPR to issue interrupt when
				error_steps is greater than it when stepping down.
- qcom,cpr-idle-clocks:		Idle clock cycles RO can be in.
- qcom,cpr-gcnt-time:		The time for gate count in microseconds.
- qcom,cpr-apc-volt-step:	The voltage in microvolt per CPR step, such as 5000uV.


Optional properties:
- vdd-mx-supply:		Regulator to supply memory power as dependency
				of VDD APC.
- qcom,vdd-mx-vmax:		The maximum voltage in uV for vdd-mx-supply. This
				is required when vdd-mx-supply is present.
- qcom,vdd-mx-vmin-method:	The method to determine the minimum voltage for
				vdd-mx-supply, which can be one of following
				choices compared with VDD APC:
				  0 => equal to the voltage(vmin) of VDD APC
				  1 => equal to PVS corner ceiling voltage
				  2 => equal to slow speed corner ceiling
				  3 => equal to qcom,vdd-mx-vmax
				This is required when vdd-mx-supply is present.
- qcom,cpr-enable:		Present: CPR enabled by default.
				Not Present: CPR disable by default.


Example:
	apc_vreg_corner: regulator@f9018000 {
		status = "okay";
		compatible = "qcom,cpr-regulator";
		reg = <0xf9018000 0x1000>, <0xfc4b80b0 8>, <0xfc4bc450 16>;
		reg-names = "rbcpr", "pvs_efuse", "cpr_efuse";
		interrupts = <0 15 0>;
		regulator-name = "apc_corner";
		regulator-min-microvolt = <1>;
		regulator-max-microvolt = <3>;
		qcom,num-efuse-bits = <5>;
		qcom,pvs-bin-process = <0 0 0 0 0 1 1 1 1 1 2 2 2 2 2 2
					2 2 2 2 3 3 3 3 3 3 3 3 0 0 0 0>;
		qcom,pvs-corner-ceiling-slow = <1050000 1160000 1275000>;
		qcom,pvs-corner-ceiling-nom  =  <975000 1075000 1200000>;
		qcom,pvs-corner-ceiling-fast =  <900000 1000000 1140000>;
		vdd-apc-supply = <&pm8226_s2>;
		vdd-mx-supply = <&pm8226_l3_ao>;
		qcom,vdd-mx-vmax = <1350000>;
		qcom,vdd-mx-vmin-method = <1>;
		qcom,vdd-apc-step-up-limit = <1>;
		qcom,vdd-apc-step-down-limit = <1>;
		qcom,cpr-ref-clk = <19200>;
		qcom,cpr-timer-delay = <5000>;
		qcom,cpr-timer-cons-up = <1>;
		qcom,cpr-timer-cons-down = <2>;
		qcom,cpr-irq-line = <0>;
		qcom,cpr-step-quotient = <15>;
		qcom,cpr-up-threshold = <1>;
		qcom,cpr-down-threshold = <2>;
		qcom,cpr-idle-clocks = <5>;
		qcom,cpr-gcnt-time = <1>;
		qcom,cpr-apc-volt-step = <5000>;
	};

