aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/omap_twl.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2012-12-17ARM: OMAP2+: omap_twl: Change TWL4030_MODULE_PM_RECEIVER to TWL_MODULE_PM_RECEIVERPeter Ujfalusi1-4/+4
To facilitate upcoming cleanup in twl stack. No functional change. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
2012-11-13Merge branch 'omap-for-v3.8/pm' into omap-for-v3.8/clockTony Lindgren1-59/+14
2012-11-05ARM: OMAP4: TWL: enable high speed mode for PMIC communicationTero Kristo1-0/+1
With the new parameters, I2C can now be put to high speed mode for better performance. Signed-off-by: Tero Kristo <t-kristo@ti.com> Signed-off-by: Kevin Hilman <khilman@ti.com>
2012-11-05ARM: OMAP4: VC: setup I2C parameters based on board dataTero Kristo1-0/+3
VC code now provides a table of pre-calculated I2C setup parameters, which will be used based on the capacitance value calculated for the I2C trace on the PCB. A default trace length of 6.3cm is used unless board defines its own value during init. The parameters set will be the I2C internal pull setup and the I2C timing parameters for high speed use mode. Full speed mode is not supported as of now. Signed-off-by: Tero Kristo <t-kristo@ti.com> Signed-off-by: Kevin Hilman <khilman@ti.com>
2012-11-05ARM: OMAP3+: voltage: remove unused volt_setup_time parameterTero Kristo1-5/+0
This is no longer needed as the ramp times are calculated from voltage deltas + slew rates. Signed-off-by: Tero Kristo <t-kristo@ti.com> Signed-off-by: Kevin Hilman <khilman@ti.com>
2012-11-05ARM: OMAP: TWL: change the vddmin / vddmax voltages to specTero Kristo1-17/+10
As vddmin / vddmax voltages for the pmic only describe the pmic capabilities now, change the voltages to be according to spec. TWL data manuals give following values: TWL4030 (SWCS019L) : VDD1: 600mV ... 1450mV, VDD2: 600mV ... 1500mV TWL5030 (SWCS030E) : VDD1: 600mV ... 1450mV, VDD2: 600mV ... 1500mV TWL6030 (SWCS045A) : 0V ... 2100mV Signed-off-by: Tero Kristo <t-kristo@ti.com> Signed-off-by: Kevin Hilman <khilman@ti.com>
2012-11-05ARM: OMAP3+: voltage: introduce omap vc / vp params for voltagedomainsTero Kristo1-20/+0
These new structs will hold the sleep voltage levels (omap_vc_params) and voltage processor min / max voltages (omap_vp_params.) Previously these were part of the PMIC struct, but they do not really belong there, as they are OMAP chip specific, not PMIC specific parameters. voltdm code is also changed to use the new structs. Signed-off-by: Tero Kristo <t-kristo@ti.com> Signed-off-by: Kevin Hilman <khilman@ti.com>
2012-11-05ARM: OMAP: voltage: renamed vp_vddmin and vp_vddmax fieldsTero Kristo1-14/+14
These are now called vddmin and vddmax, as these fields will be used globally for selecting voltage ranges for a pmic channel, and not only for voltage processor. Signed-off-by: Tero Kristo <t-kristo@ti.com> Signed-off-by: Kevin Hilman <khilman@ti.com>
2012-11-05ARM: OMAP3+: PM: VP: use uV for max and min voltage limitsNishanth Menon1-17/+0
Every PMIC has it's own eccentricities, For example, one of the PMIC has MSB set to 1 for a specific function - voltage enable! using an hardcoded value specific for TWL when copied over to such an implementation causes the system to crash as the MSB bit was 0 and the voltage got disabled!. Instead we use actual values and depend on the convertion routines to abstract out the eccentricities of each PMIC. With this, we can now move the voltages to a common location in voltage.h as they are no longer dependent on PMICs and expect the PMIC's conversion routines to set a cap if the voltage is out of reach for the PMIC. Reported-by: Jon Hunter <jon-hunter@ti.com> Signed-off-by: Nishanth Menon <nm@ti.com> Signed-off-by: Vishwanath BS <vishwanath.bs@ti.com> Signed-off-by: Tero Kristo <t-kristo@ti.com> Signed-off-by: Kevin Hilman <khilman@ti.com>
2012-10-18ARM: OMAP: Split plat/cpu.h into local soc.h for mach-omap1 and mach-omap2Tony Lindgren1-0/+1
We want to remove plat/cpu.h. To do this, let's first split it to private soc.h to mach-omap1 and mach-omap2. We have to keep plat/cpu.h around until the remaining drivers are fixed, so let's include the local soc.h in plat/cpu.h and for drivers still including plat/cpu.h. Once the drivers are fixed not to include plat/cpu.h, we can remove the file. This is needed for the ARM common zImage support. [tony@atomide.com: updated to not print a warning] Signed-off-by: Tony Lindgren <tony@atomide.com>
2011-09-15OMAP4: PM: TWL6030: add cmd registerNishanth Menon1-0/+6
Without the command register, ON/ONLP/RET/OFF voltages are useless. and TWL will be unable to use these Signed-off-by: Nishanth Menon <nm@ti.com>
2011-09-15OMAP4: PM: TWL6030: fix ON/RET/OFF voltagesPatrick Titiano1-12/+12
According to latest OMAP4430 Data Manual v0.4 dated March 2011: - Retention voltage shall be set to 0.83V. See tables 2.2, 2.4 and 2.6 in DM. This allows saving a little more power in retention states. - OPP100 IVA nominal voltage is 1.188V. See table 2.4 in DM. This allows saving a little power when CPU wakes up until Smart-Reflex is not yet resumed. [nm@ti.com: ported to voltdm_c] Signed-off-by: Nishanth Menon <nm@ti.com> Signed-off-by: Patrick Titiano <p-titiano@ti.com>
2011-09-15OMAP4: PM: TWL6030: address 0V conversionsNishanth Menon1-0/+4
0V conversions should be mapped to 0 as it is meant to denote off voltages. Signed-off-by: Nishanth Menon <nm@ti.com>
2011-09-15OMAP4: PM: TWL6030: fix uv to voltage for >0x39Nishanth Menon1-1/+6
using 1.35V as a check is not correct, we know that beyond 0x39, voltages are non linear - hence use the conversion iff uV greater than that for 0x39. For example, with 709mV as the smps offset, the max linear is actually 1.41V(0x39vsel)! Signed-off-by: Nishanth Menon <nm@ti.com>
2011-09-15OMAP4: PM: TWL6030: fix voltage conversion formulaPatrick Titiano1-7/+7
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>
2011-09-15OMAP3+: VC: make I2C config programmable with PMIC-specific settingsKevin Hilman1-0/+4
Remove hard-coded I2C configuration in favor of settings that can be configured from PMIC-specific values. Currently only high-speed mode and the master-code value are supported, since they were the only fields currently used, but extending this is now trivial. Thanks to Nishanth Menon <nm@ti.com> for reporting/fixing a sparse problem and making omap_vc_i2c_init() static, as well as finding and fixing a problem with the shift/mask of mcode. Signed-off-by: Kevin Hilman <khilman@ti.com>
2011-09-15OMAP3+: voltage domain: move PMIC struct from vdd_info into struct voltagedomainKevin Hilman1-14/+14
Move structure containing PMIC configurable settings into struct voltagedomain. In the process, rename from omap_volt_pmic_info to omap_voltdm_pmic (_info suffix is not helpful.) No functional changes. Signed-off-by: Kevin Hilman <khilman@ti.com>
2011-09-15OMAP2+: VC: support PMICs with separate voltage and command registersKevin Hilman1-5/+5
The VC layer can support PMICs with separate voltage and command registers by putting the different registers in the PRM_VC_SMPS_VOL_RA and PRCM_VC_SMPS_CMD_RA registers respectively. The PMIC data must supply at least a voltage register address (volt_reg_addr). The command register address (cmd_reg_addr) is optional. If the PMIC data does not supply a separate command register address, the VC will use the voltage register address for both. Signed-off-by: Kevin Hilman <khilman@ti.com>
2011-09-15OMAP3: voltage: rename "mpu" voltagedomain to "mpu_iva"Kevin Hilman1-1/+1
This voltage domain (a.k.a. VDD1) contains both the MPU and the IVA, so rename appropriately. Also fixup any users of the "mpu" name to use "mpu_iva" Signed-off-by: Kevin Hilman <khilman@ti.com>
2011-09-15OMAP2+: voltage: start towards a new voltagedomain layerKevin Hilman1-5/+5
Start cleaning up the voltage layer to have a voltage domain layer that resembles the structure of the existing clock and power domain layers. To that end: - move the 'struct voltagedomain' out of 'struct omap_vdd_info' to become the primary data structure. - convert any functions taking a pointer to struct omap_vdd_info into functions taking a struct voltagedomain pointer. - convert the register & initialize of voltage domains to look like that of powerdomains - convert omap_voltage_domain_lookup() to voltdm_lookup(), modeled after the current powerdomain and clockdomain lookup functions. - omap_voltage_late_init(): only configure VDD info when the vdd_info struct is non-NULL Signed-off-by: Kevin Hilman <khilman@ti.com>
2011-03-31Fix common misspellingsLucas De Marchi1-1/+1
Fixes generated by 'codespell' and manually reviewed. Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
2011-03-11Merge branch 'integration-2.6.39-for-tony' of git://git.pwsan.com/linux-integration into omap-for-linusTony Lindgren1-1/+1
Conflicts: arch/arm/mach-omap2/pm34xx.c
2011-03-09OMAP3: PM: Set/clear T2 bit for Smartreflex on TWLThara Gopinath1-0/+60
Voltage control on TWL can be done using VMODE/I2C1/I2C_SR. Since almost all platforms use I2C_SR on omap3, omap3_twl_init by default expects that OMAP's I2C_SR is plugged in to TWL's I2C and calls omap3_twl_set_sr_bit. On platforms where I2C_SR is not connected, the board files are expected to call omap3_twl_set_sr_bit(false) to ensure that I2C_SR path is not set for voltage control and prevent the default behavior of omap3_twl_init. Signed-off-by: Nishanth Menon <nm@ti.com> Signed-off-by: Thara Gopinath <thara@ti.com> Signed-off-by: Shweta Gulati <shweta.gulati@ti.com> Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Kevin Hilman <khilman@ti.com>
2011-03-07OMAP: voltage: move plat/voltage.h to mach-omap2/voltage.hPaul Walmsley1-1/+1
At this point in time, there's no reason for this header file to be in plat-omap/include/plat/voltage.h. It should not be included by device drivers, and the code that uses it is currently all under mach-omap2/. Signed-off-by: Paul Walmsley <paul@pwsan.com>
2011-01-07OMAP2+: TWL: include pm header for init protosNishanth Menon1-0/+2
twl_init functions are declared in pm.h and used in pm.c pm.h header defining the protos need to be included to ensure that omap_twl.c has consistent function definition. This fixes sparse warning: arch/arm/mach-omap2/omap_twl.c:237:12: warning: symbol 'omap4_twl_init' was not declared. Should it be static? arch/arm/mach-omap2/omap_twl.c:256:12: warning: symbol 'omap3_twl_init' was not declared. Should it be static? Signed-off-by: Nishanth Menon <nm@ti.com> Signed-off-by: Kevin Hilman <khilman@ti.com>
2011-01-07OMAP2+: TWL: make conversion routines staticNishanth Menon1-4/+4
The uv_to_vsel, vsel_to_uv functions don't need to be exposed to the world as they are used as function pointers. make them static. Fixes sparse warnings: arch/arm/mach-omap2/omap_twl.c:63:15: warning: symbol 'twl4030_vsel_to_uv' was not declared. Should it be static? arch/arm/mach-omap2/omap_twl.c:68:4: warning: symbol 'twl4030_uv_to_vsel' was not declared. Should it be static? arch/arm/mach-omap2/omap_twl.c:73:15: warning: symbol 'twl6030_vsel_to_uv' was not declared. Should it be static? arch/arm/mach-omap2/omap_twl.c:105:4: warning: symbol 'twl6030_uv_to_vsel' was not declared. Should it be static? Signed-off-by: Nishanth Menon <nm@ti.com> Signed-off-by: Kevin Hilman <khilman@ti.com>
2010-12-22OMAP4: Register voltage PMIC parameters with the voltage layerThara Gopinath1-0/+166
TWL6030 is the power IC used along with OMAP4 in OMAP4 SDPs, blaze boards and panda boards. This patch registers the OMAP4 PMIC specific information with the voltage layer. This also involves implementing a different formula for voltage to vsel and vsel to voltage calculations from TWL4030. Signed-off-by: Thara Gopinath <thara@ti.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
2010-12-22OMAP3: PM: Register TWL4030 pmic info with the voltage driver.Thara Gopinath1-0/+111
This patch registers the TWL4030 PMIC specific informtion with the voltage driver. Failing this patch the voltage driver is unware of the formula to use for vsel to voltage and vice versa conversion and lot of other PMIC dependent parameters. This file is based on the arch/arm/plat-omap opp_twl_tpl.c file by Paul Walmsley. The original file is replaced by this file. Signed-off-by: Thara Gopinath <thara@ti.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>