msm: cpr-regulator: change device tree vendor prefix to 'qti'

New policy requires changing device tree vendor prefix from 'qcom'
to 'qti'. Also change device tree files for msm8610, msm8226 and msm8926.

Change-Id: I57c8c9d14ffa3ddd3671f406cfa2011eb23e66e4
Signed-off-by: Ke Liu <keliu@codeaurora.org>
msm: cpr-regulator: change cpr_read_efuse_row api

Add a flag in cpr_read_efuse_row api to make it choose
to read register directly or read through SCM.

Change-Id: I3031dfd1c7cfffb880c49e5f1708b1436fdd2897
Signed-off-by: Ke Liu <keliu@codeaurora.org>
msm: cpr-regulator: add support for conditional minimum voltage

Certain targets have VDD_APC minimum voltage constraints which are
imposed if the mem-accel fuse has not been programmed. Add two new
device tree properties to capture the row offset and expected value
of the mem-accel fuse as well as to capture the minimum VDD_APC voltage
to enforce if the mem-accel fuse has not been programmed with the
expected value.

CRs-Fixed: 580585
Change-Id: Ifd770b33d74b2bc9cf37dd2b1817e1424a5ee8f3
Signed-off-by: Ke Liu <keliu@codeaurora.org>
ARM: dts: msm: specify conditional VDD_APC minimum voltage for msm8226

Restrict the minimum APC voltage to 1.14V when the mem-accel fuse has not
be programmed as expected.

CRs-Fixed: 580585
Change-Id: Ia506efb15c7599d79c5561163879d82910db84f8
Signed-off-by: Ke Liu <keliu@codeaurora.org>
ARM: dts: msm: reduce CPR turbo floor voltage for msm8226

The device tree property qti,cpr-cond-min-voltage = <1140000> along with
an appropriate qti,cpr-cond-min-volt-fuse property value ensure that the
CPR turbo floor voltage is restricted to 1.14 V on devices that cannot
operate at lower voltages.

Therefore, reduce the default CPR turbo floor voltage to 1.1 V in order
to save power on devices that can operate at the lower voltage.

Change-Id: Ic939d4a7b1c4da0a28dd779fe6a900310ae9fab7
Signed-off-by: Ke Liu <keliu@codeaurora.org>
msm: cpr-regulator: modify the dts definition for cond-min-volt

Previously, cpr-cond-min-volt-fuse defined the fuse row number and the
value used to compare with the whole row efuse value. The cpr-regulator
driver would then conditionally apply a higher CPR floor voltage for all
voltage corners if the efuse value differed from the expected value.

However, only a subset of the bits in the efuse are used for the
cond-min-volt feature. If any of the other bits in the fuse are set, then
the cpr-regulator driver incorrectly applies the higher floor voltage even
if the cond-min-volt bits are set correctly.

Modify the cpr-regulator driver and the cpr-regulator device tree
properties so that only specific bits in the fuse are compared to the
expected value. If the value of the cond-min-volt bits in the fuse is
not equal to the value defined in device tree, then set the MIN_VOLTAGE
flag.

Change-Id: I7de04e17dfa93fcb638e29a1dcc5e9072de26cb8
Signed-off-by: Wu Fenglin <fenglinw@codeaurora.org>
Signed-off-by: Ke Liu <keliu@codeaurora.org>
msm: cpr-regulator: add pvs voltage uplift workaround

There are some parts which require higher than expected voltage. Add a
workaround to check the condition in fuse and uplift the voltage and
quotient accordingly.

Change-Id: I59f821320e5e97fc2334ae7617a0045edb5cc970
Signed-off-by: Wu Fenglin <fenglinw@codeaurora.org>
Signed-off-by: Ke Liu <keliu@codeaurora.org>
ARM: dts: msm: enable pvs voltage uplift workaround for msm8226

Some 8x26 parts have lower pvs voltage than expected. Enable uplift
workaround of 50 mV on those parts under the specified conditions.

Change-Id: I3d8689ca0c5d576b1dd9057e36f67ea3622b80a1
Signed-off-by: Wu Fenglin <fenglinw@codeaurora.org>
msm: cpr-regulator: add support for frequency based CPR quotient scaling

The current cpr-regulator driver implementation uses the same CPR target
quotient, which is read from a fuse, for all CPU frequencies handled by a
given voltage corner. This results in unnecessary additional power
consumption when operating the CPU at one of the lower frequencies handled
by one voltage corner. Hence change the driver to adjust the CPR quot value
according to the CPU frequency.

CRs-Fixed: 583719
Change-Id: Idc9a93a76475ba3512a648efe721dcd165f8dbb6
Signed-off-by: Ke Liu <keliu@codeaurora.org>
ARM: dts: msm: add qti,cpr-quot-adjust-table for CPR on msm8226

Some devices needs to adjust their quot value according to the cpu
frequency. Those devices can be identified by the
qti,cpr-quot-adjust-table property.

CRs-Fixed: 583719
Change-Id: I2ec5e0b1398ea2c552a63c742f0be131e0db470b
Signed-off-by: Ke Liu <keliu@codeaurora.org>
Merge "msm: cpr-regulator: change device tree vendor prefix to 'qti'"
Merge "msm: cpr-regulator: change cpr_read_efuse_row api"
Merge "msm: cpr-regulator: add support for conditional minimum voltage"
Merge "ARM: dts: msm: specify conditional VDD_APC minimum voltage for msm8226"
Merge "ARM: dts: msm: reduce CPR turbo floor voltage for msm8226"
Merge "msm: cpr-regulator: modify the dts definition for cond-min-volt"
Merge "msm: cpr-regulator: add pvs voltage uplift workaround"
Merge "ARM: dts: msm: enable pvs voltage uplift workaround for msm8226"
Merge "msm: cpr-regulator: add support for frequency based CPR quotient scaling"
Merge "ARM: dts: msm: add qti,cpr-quot-adjust-table for CPR on msm8226"