ARM: dts: OMAP36xx: Fix CPU OPP voltages

commit 3027e26737adc591fea2d88c2804ffeeb1acdd8c
(ARM: dts: OMAP36xx: Add CPU OPP table)
introduced wrong OPP voltages per OPP. sync them with existing
OPP data.

Signed-off-by: Nishanth Menon <nm@ti.com>
ARM: dts: OMAP4460: Fix CPU OPP table voltages

commit d16fb25de11a4b55a7cb0fdb4a407b1f1672d123
(ARM: dts: OMAP4460: Add CPU OPP table)
introduced wrong OPP voltages per OPP. sync them with existing OPP data.

Signed-off-by: Nishanth Menon <nm@ti.com>
regulator: Introduce TI Adaptive Body Bias(ABB) on-chip LDO driver

Adaptive Body Biasing(ABB) modulates transistor bias voltages dynamically
in order to optimize switching speed versus leakage.

Texas Instruments' SmartReflex 2 technology provides support for this
power management technique with Forward Body Biasing (FBB) and
Reverse Body Biasing (RBB). These modulate the body voltage of
transistor cells or blocks dynamically to gain performance
and reduce leakage. TI's SmartReflex white paper[1] has further
information for usage in conjunction with other power management
techniques.

The application of FBB/RBB technique is determined for each unique
device in some process nodes, whereas, they are mandated on other
process nodes.

In a nutshell, ABB technique is implemented on TI SoC as an on-chip
LDO which has ABB module controlling the bias voltage. However, the
voltage is unique per device. These vary per SoC family and the manner
in which these techniques are used may vary depending on the Operating
Performance Point(OPP) voltage targeted.
For example:
OMAP3630/OMAP4430: certain OPPs mandates usage of FBB independent of
	devices.
OMAP4460/OMAP4470: certain OPPs mandates usage of FBB, while others may
	optionally use FBB or optimization with RBB.
OMAP5: ALL OPPs may optionally use ABB, and ABB biasing voltage is
	influenced by vset fused in s/w and requiring s/w override of
	default values.

Further, two generations of ABB module are used in various TI SoCs. They
have remained mostly register field compatible, however the register
offset had switched between versions.

We introduce ABB LDO support in the form of a regulator which is
controlled by voltages denoting the desired Operating Performance Point
which is targeted. However, since ABB transition is part of OPP
change sequence, the sequencing required to ensure sane
operation w.r.t OPP change is left to the controlling driver
(example: cpufreq SoC driver).
The driver supports all the supported ABB modes and ability to override
ABB LDO vset control efuse based ABB mode detection etc.

Current implementation is heavily influenced by the original patch
series[2][3] from Mike Turquette. However, the current implementation
supports only device tree based information.

[1] http://www.ti.com/pdfs/wtbu/smartreflex_whitepaper.pdf
[2] http://marc.info/?l=linux-omap&m=134931341818379&w=2
[3] http://marc.info/?l=linux-arm-kernel&m=134931402406853&w=2

[nm@ti.com: co-developer]
Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Andrii.Tseglytskyi <andrii.tseglytskyi@ti.com>
ARM: dts: OMAP36xx: Add device tree for ABB

Add DT ABB data for OMAP36xx family of devices.
Data is based on OMAP36XX Techincal Reference Manual revison AB (Dec 2012).

[nm@ti.com: co-developer]
Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Andrii.Tseglytskyi <andrii.tseglytskyi@ti.com>
ARM: dts: OMAP443x: Add device tree for ABB

Add DT ABB data for OMAP44xx family of devices.
Data is based on OMAP443x Techincal Reference Manual revison AN (April 2013).

[nm@ti.com: co-developer]
Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Andrii.Tseglytskyi <andrii.tseglytskyi@ti.com>
ARM: dts: OMAP4460: Add device tree for ABB

Add DT ABB data for OMAP44xx family of devices.
Data is based on OMAP4460 Techincal Reference Manual revison Z (April 2013).

[nm@ti.com: co-developer]
Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Andrii.Tseglytskyi <andrii.tseglytskyi@ti.com>
ARM: dts: OMAP5: Add device tree for ABB

Add DT ABB data for OMAP54xx family of devices.
Data is based on OMAP543x Techincal Reference Manual revison U (April 2013).

[nm@ti.com: co-developer]
Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Andrii.Tseglytskyi <andrii.tseglytskyi@ti.com>
TESTING HACKHACK: add dummy virt-consumer for OMAP3/4/5

Set CONFIG_REGULATOR_VIRTUAL_CONSUMER=y to use

OMAP3630(beagle-XM):
MPU :
REG=/sys/class/regulator/regulator.9
CONS=/sys/devices/platform/reg-virt-consumer.0

for V in 1012500 1200000 1325000 1375000
do
	echo -n "$V">$CONS/min_microvolts
	echo -n "$V">$CONS/max_microvolts
	echo "Tried $V, Voltage =" `cat $REG/microvolts`
done

OMAP4460(Panda-ES): MPU: http://pastebin.com/TKPPZDQ1
REG=/sys/class/regulator/regulator.1
CONS=/sys/devices/platform/reg-virt-consumer.0

for V in 1025000 1200000 1313000 1375000 1389000
do
	echo -n "$V">$CONS/min_microvolts
	echo -n "$V">$CONS/max_microvolts
	echo "Tried $V, Voltage =" `cat $REG/microvolts`
done

IVA:
REG=/sys/class/regulator/regulator.2
CONS=/sys/devices/platform/reg-virt-consumer.1

for V in 950000 1140000 1291000 1375000 1376000

do
	echo -n "$V">$CONS/min_microvolts
	echo -n "$V">$CONS/max_microvolts
	echo "Tried $V, Voltage =" `cat $REG/microvolts`
done

OMAP5: dont have clock data to be able to test at the moment.
code introduced.

Signed-off-by: Nishanth Menon <nm@ti.com>