summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/odm_kit
diff options
context:
space:
mode:
authorGary King <gking@nvidia.com>2010-05-28 13:12:28 -0700
committerGary King <gking@nvidia.com>2010-05-28 14:59:14 -0700
commit6b5d4b7e7d73798056f7f3b618b86174916d2658 (patch)
tree2e79b7a230f8ee945281a833921c4b55a1032197 /arch/arm/mach-tegra/odm_kit
parent71a7dadda9fdd9e6292c7ab4f4037776d9e107e1 (diff)
[ARM/tegra] whistler: fix build break
ported commit 77636a9b missed a few necessary changes to the Maxim PMU ODM kit adaptation, causing a build break on Whistler. Change-Id: I0c42753e5cbba12d5aed1ac260af8711a39cffab Reviewed-on: http://git-master/r/1819 Reviewed-by: Gary King <gking@nvidia.com> Tested-by: Gary King <gking@nvidia.com>
Diffstat (limited to 'arch/arm/mach-tegra/odm_kit')
-rw-r--r--arch/arm/mach-tegra/odm_kit/adaptations/pmu/max8907b/max8907b.c63
-rwxr-xr-x[-rw-r--r--]arch/arm/mach-tegra/odm_kit/adaptations/pmu/max8907b/max8907b_interrupt.c0
-rw-r--r--arch/arm/mach-tegra/odm_kit/adaptations/pmu/max8907b/max8907b_supply_info_table.h10
3 files changed, 68 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 285044034f97..fdd3b3eeffa1 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
@@ -141,7 +141,7 @@ static const NvU32 VoltageTable_VOUT_02[] = {
// Specifies the time between each sequencer event.
// Disable temporarily to keep the compiler happy.
-//static const NvU32 SequencerPeriod[] = { 20, 40, 80, 160, 320, 640, 1280, 2560 };
+//static const NvU32 SequencerPeriod[] = {20, 40, 80, 160, 320, 640, 1280, 2560};
/*-- Voltage translation functions --*/
@@ -1055,6 +1055,25 @@ const Max8907bPmuSupplyInfo Max8907bSupplyInfoTable[] =
AD5258_VMAX,
MAX8907B_REQUESTVOLTAGE_LX_V1
},
+ },
+
+ // FUSE Vcc is wired from VBAT.
+ {
+ Max8907bPmuSupply_VBAT_FUSE,
+ TCA6416_CONFIG_PORT_0,
+ TCA6416_INVALID_PORT,
+ TCA6416_INVALID_PORT,
+ TCA6416_PORT_0,
+ TCA6416_PIN_2,
+ NULL,
+ NULL,
+ {
+ NV_FALSE,
+ FAN5355_MIN_OUTPUT_VOLTAGE_x10/10,
+ FAN5355_OUTPUT_VOLTAGE_INCREMENT_x10/10,
+ FAN5355_MAX_OUTPUT_VOLTAGE_x10/10,
+ MAX8907B_REQUESTVOLTAGE_EXT_DCDC_3
+ },
}
};
@@ -1786,6 +1805,39 @@ Tca6416UsbVbusControl(
return NV_TRUE;
}
+static NvBool
+Tca6416FuseControl(
+ NvOdmPmuDeviceHandle hDevice,
+ NvU32 vddRail,
+ NvU32 MilliVolts)
+{
+ const Max8907bPmuSupplyInfo *pSupplyInfo = &Max8907bSupplyInfoTable[vddRail];
+ NvU32 PortNo;
+ NvU32 PinNo;
+
+ // Get port number and pin number
+ PortNo = pSupplyInfo->OutputPort;
+ PinNo = pSupplyInfo->PmuGpio;
+
+ // Configure port pin as output
+ if (!Tca6416ConfigPortPin(hDevice, PortNo, PinNo, GpioPinMode_Output))
+ return NV_FALSE;
+
+ if (MilliVolts == ODM_VOLTAGE_OFF) // to disable FUSE voltage
+ {
+ // Set Low on pin
+ if (!Tca6416WritePortPin(hDevice, PortNo, PinNo, GpioPinState_Low))
+ return NV_FALSE;
+ }
+ else // to Enable FUSE voltage
+ {
+ // Set high on pin
+ if (!Tca6416WritePortPin(hDevice, PortNo, PinNo, GpioPinState_High))
+ return NV_FALSE;
+ }
+ return NV_TRUE;
+}
+
NvBool
Max8907bSetVoltage(
NvOdmPmuDeviceHandle hDevice,
@@ -1802,6 +1854,15 @@ Max8907bSetVoltage(
return NV_TRUE;
}
+ if (vddRail == Max8907bPmuSupply_VBAT_FUSE)
+ {
+ // Enable fuse voltage
+ if (!Tca6416FuseControl(hDevice, vddRail, MilliVolts))
+ return NV_FALSE;
+
+ return NV_TRUE;
+ }
+
if ((MilliVolts == ODM_VOLTAGE_ENABLE_EXT_ONOFF) ||
(MilliVolts == ODM_VOLTAGE_DISABLE_EXT_ONOFF))
{
diff --git a/arch/arm/mach-tegra/odm_kit/adaptations/pmu/max8907b/max8907b_interrupt.c b/arch/arm/mach-tegra/odm_kit/adaptations/pmu/max8907b/max8907b_interrupt.c
index 38110f83c5a0..38110f83c5a0 100644..100755
--- a/arch/arm/mach-tegra/odm_kit/adaptations/pmu/max8907b/max8907b_interrupt.c
+++ b/arch/arm/mach-tegra/odm_kit/adaptations/pmu/max8907b/max8907b_interrupt.c
diff --git a/arch/arm/mach-tegra/odm_kit/adaptations/pmu/max8907b/max8907b_supply_info_table.h b/arch/arm/mach-tegra/odm_kit/adaptations/pmu/max8907b/max8907b_supply_info_table.h
index 1b362aac43f4..77cf70bc32b5 100644
--- a/arch/arm/mach-tegra/odm_kit/adaptations/pmu/max8907b/max8907b_supply_info_table.h
+++ b/arch/arm/mach-tegra/odm_kit/adaptations/pmu/max8907b/max8907b_supply_info_table.h
@@ -29,7 +29,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
*/
-
+
#ifndef INCLUDED_MAX8907B_SUPPLY_INFO_HEADER
#define INCLUDED_MAX8907B_SUPPLY_INFO_HEADER
@@ -86,7 +86,7 @@ extern "C"
// Defines common for all supplies I2C (s/w) sequencer selection
#define MAX8907B_SEQSEL_I2CEN_LXX 7 /* I2CEN (s/w) */
-// Defines sequencer count default values
+// Defines sequencer count default values
#define MAX8907B_SEQCNT_DEFAULT_LX_V1 0x1C
#define MAX8907B_SEQCNT_DEFAULT_LX_V2 0x1C
@@ -156,7 +156,7 @@ typedef enum
Max8907bPmuSupply_EXT_DCDC_3_USB1, //USB1 VBUS
Max8907bPmuSupply_EXT_DCDC_3_USB3, // USB3 VBUS
- /** Secondary PMU MIC2826 Rails **/
+ /** Secondary PMU MIC2826 Rails **/
MIC2826PmuSupply_BUCK,
MIC2826PmuSupply_LDO1,
MIC2826PmuSupply_LDO2,
@@ -166,6 +166,9 @@ typedef enum
// potentiometer (DPM) AD5258
Max8907bLxV1_Ad5258_DPM_EXT_DCDC_7,
+ //Temp for enabling fuse using p2 of i0 expander
+ Max8907bPmuSupply_VBAT_FUSE,
+
Max8907bPmuSupply_Num,
Max8907bPmuSupply_Force32 = 0x7FFFFFFF
} Max8907bPmuSupply;
@@ -192,6 +195,5 @@ typedef struct Max8907bPmuSupplyInfoRec
#if defined(__cplusplus)
}
#endif
-
#endif //INCLUDED_MAX8907B_SUPPLY_INFO_HEADER