From 0be19e7926b6fa6b1f198001bd0b145fcb0942e9 Mon Sep 17 00:00:00 2001 From: Alex Frid Date: Fri, 29 Jan 2010 21:16:03 -0800 Subject: tegra ODM: Updated MAX8907B PWREN configuration. Updated MAX8907B power enable (PWREN) input configuration for the new silicon revision. Change-Id: Ia13f518d34084ba5c1554c02d8da3d3c8fe4fd70 --- .../odm_kit/adaptations/pmu/max8907b/max8907b.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) 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 90075f92112c..3c4c0b2c8144 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 @@ -71,6 +71,10 @@ Max8907bPrivData *hMax8907bPmu; #define MAX8907B_OUT_VOLTAGE_CONTROL_DISABLE \ (MAX8907B_SEQSEL_I2CEN_LXX << MAX8907B_CTL_SEQ_SHIFT) +// MAX8907B revision that requires s/w WAR to connect PWREN input to +// sequencer 2 because of the bug in the silicon. +#define MAX8907B_II2RR_PWREN_WAR (0x12) + /** * The FAN5355 is used to scale the voltage of an external * DC/DC voltage rail (for PCIE). However, voltage scaling is @@ -1195,14 +1199,20 @@ Max8907bPwrEnConfigure(NvOdmPmuDeviceHandle hDevice, NvBool Enable) if (!Max8907bI2cWrite8(hDevice, MAX8907B_RESET_CNFG, data)) return NV_FALSE; - // When enabled, connect PWREN to SEQ2 (when disbled leave it - // connected - no harm, anyway) + // When enabled, connect PWREN to SEQ2 by clearing SEQ2 configuration + // settings for silicon revision that requires s/w WAR. On other MAX8907B + // revisions PWREN is always connected to SEQ2. if (Enable) { - data = 0x00; // TODO: The 0x00 value does not match register - // definition due to the bug in PMU silicon. - if (!Max8907bI2cWrite8(hDevice, MAX8907B_SEQ2CNFG, data)) + if (!Max8907bI2cRead8(hDevice, MAX8907B_II2RR, &data)) return NV_FALSE; + + if (data == MAX8907B_II2RR_PWREN_WAR) + { + data = 0x00; + if (!Max8907bI2cWrite8(hDevice, MAX8907B_SEQ2CNFG, data)) + return NV_FALSE; + } } return NV_TRUE; } -- cgit v1.2.3