imx6: add ldo-bypass enable

When an external PMIC is used for VDD_SOC and VDD_ARM you can save power by
bypassing the internal LDO's provided by the anantop regulator as long as
you are running less than 1.2GHz. Additionally, the CPU operating setpoints
that define the relationship between CPU frequency and VDD_ARM / VDD_SOC
voltages define the voltages assuming the LDO is bypassed. If the LDO is not
bypassed, the external PMIC regulator voltages need to be increased by
125mV for correct regulator supply voltage.

Freescale added the ldo-bypass property to the gpc bindings, but only used it
in their bootloader. This patch moves the use of it to the kernel where it
should be.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
ventana: use pu_dummy regulator for VPU/GPU on GW54xx

This reverts part of commit 3537f4f33458066023fb6b3a60a088ecd53da71d
where pu_dummy replaced the ARM/SOC/VPU/GPU regulators for all of ventana.

The GW54xx uses a PFUZE100 PMIC which has a proper regulator driver which
regulates the inputs to the ARM and SOC LDO's thus those LDO's should be
bypassed and as the xPU LDO gets its input from VDD_SOC it should also
use pu_dummy.

The other ventana boards use the LTC3676 PMIC which does not currently have
a regulator driver therefore the PMIC sets the ARM and SOC inputs at a
higher than necessary value and the IMX LDO's are used to regulate it down
per the CPU operating point.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
regulator: core: provide fixed voltage in desc for single voltage rail

If given rail has the single voltage (n_voltages = 1) then provide the
rail voltage through regulator descriptor so that core can use this
value for finding voltage.

This will avoid the implementation of the callback for get_voltage() or
list_voltage() callback on regulator driver.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
regulator: core: Fix the init of DT defined fixed regulators

When a regulator is defined using DT and it has a single voltage the
regulator init always tries to apply this voltage. However it fails if
the regulator isn't settable because it is using an internal low level
function. To overcome this we now first query the regulator and only
set it if needed.

Signed-off-by: Alban Bedel <alban.bedel@avionic-design.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
regulator: fixed: fix regulator_list_voltage() for regression

Commit c368e5fc2a190923b786f2de3e79430ea3566a25 "regulator: fixed:
get rid of {get|list}_voltage()" broke regulator_list_voltage() for
the fixed regulator, because an earlier commit
5a523605afa7d3b54b2e7041f8c9e6bc39872a7e "regulator: core: provide
fixed voltage in desc for single voltage rail" missed to add support
for the fixed-voltage special case to that function. This patch
fixes that regression.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
regulator: Add LTC3676 support

This patch adds support for the Linear Technology LTC3676
8-output I2C voltage regulator IC.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
cpufreq: imx6q: show soc voltage when debugging

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
cpufreq: imx6q: add a 25mV tollerance to the operating point voltages

The operating-points defined in imx6q.dtsi and imx6dl.dtsi are set to
25mV above the minimum values in the IMX6Q and IMX6DL datasheets therefore
we will allow that tollerance when setting regulator voltages.

This allows using PMIC regulators that don't have setpoints that exactly
match the operating points but are still within tollerance.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
ventana: add LTC3676 PMIC device-tree support

Now that we have an LTC3676 regulator driver and ldo-bypass support we can
configure the PMIC and enable bypass mode.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
ventana: enable LTC3676 regulator

Signed-off-by: Tim Harvey <tharvey@gateworks.com>