]> git.karo-electronics.de Git - linux-beck.git/commit
OMAP4: PM: TWL6030: fix voltage conversion formula
authorPatrick Titiano <p-titiano@ti.com>
Wed, 18 May 2011 05:17:30 +0000 (00:17 -0500)
committerKevin Hilman <khilman@ti.com>
Thu, 15 Sep 2011 19:09:36 +0000 (12:09 -0700)
commit58e241f7be8dfbb19fa8f5bf8b2e56bb6d655752
tree51beb0327c341f11503a0d76d1689a7b62f4f67f
parent42b43945e0f115412dd0b7f0c3609a8b6f24f5e5
OMAP4: PM: TWL6030: fix voltage conversion formula

omap_twl_vsel_to_uv() and omap_twl_uv_to_vsel() functions used to convert
voltages to TWL6030 SMPS commands (a.k.a "vsel") implement incorrect conversion
formula.
It uses legacy OMAP3 formula, but OMAP4 Power IC has different offset and
voltage step:
 - Voltage Step is now 12.66mV (instead of 12.5mV)
 - Offset is either 607.7mV or 709mV depending on TWL6030 chip revision
   (instead of 600mV)
This leads to setting voltages potentially higher than expected, and so
potentially some (limited) power overconsumption.

For reference, see formula and tables in section 8.5.2.3
"Output Voltage Selection (Standard Mode / Extended Mode with or without offset)"
 in TWL6030 functional specifications document.

[nm@ti.com: ported to voltdm_c]
Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Patrick Titiano <p-titiano@ti.com>
arch/arm/mach-omap2/omap_twl.c