summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Frid <afrid@nvidia.com>2010-03-19 15:38:24 -0700
committerGary King <gking@nvidia.com>2010-03-22 21:52:13 -0800
commitbc1bb1e9d70a46b9c81835653e1495dce62ea099 (patch)
tree68c6dd39bf0ae7ea805331f6d2e0fa4135cd58c0
parent44476f826f166461d10142935ef20b23c8c010c4 (diff)
tegra ODM: Maxim PMU PWREN control on Whistler.
Added mechanism to reconfigure Maxim PMU power enable (PWREN) input on Whistler necessary for LP0 core voltage control. Change-Id: If7ee20956b39a96093da4094eda9ab64bce54503 Reviewed-on: http://git-master/r/923 Reviewed-by: Trivikram Kasivajhula <tkasivajhula@nvidia.com> Tested-by: Aleksandr Frid <afrid@nvidia.com> Reviewed-by: Gary King <gking@nvidia.com>
-rw-r--r--arch/arm/mach-tegra/include/nvodm_pmu.h15
-rw-r--r--arch/arm/mach-tegra/odm_kit/adaptations/pmu/max8907b/max8907b.c7
2 files changed, 20 insertions, 2 deletions
diff --git a/arch/arm/mach-tegra/include/nvodm_pmu.h b/arch/arm/mach-tegra/include/nvodm_pmu.h
index bdd7e209c78a..2b768edbe5b4 100644
--- a/arch/arm/mach-tegra/include/nvodm_pmu.h
+++ b/arch/arm/mach-tegra/include/nvodm_pmu.h
@@ -101,9 +101,16 @@ typedef struct NvOdmPmuVddRailCapabilitiesRec
NvU32 requestMilliVolts;
} NvOdmPmuVddRailCapabilities;
-/// Special level to indicate voltage plane is disabled.
+/// Special level to indicate voltage plane is turned off.
#define ODM_VOLTAGE_OFF (0UL)
+/// Special level to enable voltage plane on/off control
+/// by the external signal (e.g., low power request from SoC).
+#define ODM_VOLTAGE_ENABLE_EXT_ONOFF (0xFFFFFFFFUL)
+
+/// Special level to disable voltage plane on/off control
+/// by the external signal (e.g., low power request from SoC).
+#define ODM_VOLTAGE_DISABLE_EXT_ONOFF (0xFFFFFFFEUL)
/**
* Gets capabilities for the specified PMU voltage.
@@ -142,7 +149,11 @@ NvOdmPmuGetVoltage(
* @param hDevice A handle to the PMU.
* @param vddId The ODM-defined PMU rail ID.
* @param MilliVolts The new voltage level to be set in millivolts (mV).
- * Set to ::ODM_VOLTAGE_OFF to turn off the target voltage.
+ * - Set to ::ODM_VOLTAGE_OFF to turn off the target voltage.
+ * - Set to ::ODM_VOLTAGE_ENABLE_EXT_ONOFF to enable external control of
+ * target voltage.
+ * - Set to ::ODM_VOLTAGE_DISABLE_EXT_ONOFF to disable external control of
+ * target voltage.
* @param pSettleMicroSeconds A pointer to the settling time in microseconds (uS),
* which is the time for supply voltage to settle after this function
* returns; this may or may not include PMU control interface transaction time,
diff --git a/arch/arm/mach-tegra/odm_kit/adaptations/pmu/max8907b/max8907b.c b/arch/arm/mach-tegra/odm_kit/adaptations/pmu/max8907b/max8907b.c
index f218b835ed1c..7da23407345c 100644
--- a/arch/arm/mach-tegra/odm_kit/adaptations/pmu/max8907b/max8907b.c
+++ b/arch/arm/mach-tegra/odm_kit/adaptations/pmu/max8907b/max8907b.c
@@ -1793,6 +1793,13 @@ Max8907bSetVoltage(
return NV_TRUE;
}
+ if ((MilliVolts == ODM_VOLTAGE_ENABLE_EXT_ONOFF) ||
+ (MilliVolts == ODM_VOLTAGE_DISABLE_EXT_ONOFF))
+ {
+ return Max8907bPwrEnAttach(hDevice, (Max8907bPmuSupply)vddRail,
+ (MilliVolts == ODM_VOLTAGE_ENABLE_EXT_ONOFF));
+ }
+
if ((MilliVolts == ODM_VOLTAGE_OFF) ||
((MilliVolts <= Max8907bSupplyInfoTable[vddRail].cap.MaxMilliVolts) &&
(MilliVolts >= Max8907bSupplyInfoTable[vddRail].cap.MinMilliVolts)))