aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-omap2/omap_twl.c17
-rw-r--r--arch/arm/mach-omap2/voltage.h22
-rw-r--r--arch/arm/mach-omap2/vp.c4
3 files changed, 22 insertions, 21 deletions
diff --git a/arch/arm/mach-omap2/omap_twl.c b/arch/arm/mach-omap2/omap_twl.c
index f515a1a056d5..df4e7c38f7c6 100644
--- a/arch/arm/mach-omap2/omap_twl.c
+++ b/arch/arm/mach-omap2/omap_twl.c
@@ -30,16 +30,6 @@
30#define OMAP3_VP_VSTEPMAX_VSTEPMAX 0x04 30#define OMAP3_VP_VSTEPMAX_VSTEPMAX 0x04
31#define OMAP3_VP_VLIMITTO_TIMEOUT_US 200 31#define OMAP3_VP_VLIMITTO_TIMEOUT_US 200
32 32
33#define OMAP3430_VP1_VLIMITTO_VDDMIN 0x14
34#define OMAP3430_VP1_VLIMITTO_VDDMAX 0x42
35#define OMAP3430_VP2_VLIMITTO_VDDMIN 0x18
36#define OMAP3430_VP2_VLIMITTO_VDDMAX 0x2c
37
38#define OMAP3630_VP1_VLIMITTO_VDDMIN 0x18
39#define OMAP3630_VP1_VLIMITTO_VDDMAX 0x3c
40#define OMAP3630_VP2_VLIMITTO_VDDMIN 0x18
41#define OMAP3630_VP2_VLIMITTO_VDDMAX 0x30
42
43#define OMAP4_SRI2C_SLAVE_ADDR 0x12 33#define OMAP4_SRI2C_SLAVE_ADDR 0x12
44#define OMAP4_VDD_MPU_SR_VOLT_REG 0x55 34#define OMAP4_VDD_MPU_SR_VOLT_REG 0x55
45#define OMAP4_VDD_MPU_SR_CMD_REG 0x56 35#define OMAP4_VDD_MPU_SR_CMD_REG 0x56
@@ -53,13 +43,6 @@
53#define OMAP4_VP_VSTEPMAX_VSTEPMAX 0x04 43#define OMAP4_VP_VSTEPMAX_VSTEPMAX 0x04
54#define OMAP4_VP_VLIMITTO_TIMEOUT_US 200 44#define OMAP4_VP_VLIMITTO_TIMEOUT_US 200
55 45
56#define OMAP4_VP_MPU_VLIMITTO_VDDMIN 0xA
57#define OMAP4_VP_MPU_VLIMITTO_VDDMAX 0x39
58#define OMAP4_VP_IVA_VLIMITTO_VDDMIN 0xA
59#define OMAP4_VP_IVA_VLIMITTO_VDDMAX 0x2D
60#define OMAP4_VP_CORE_VLIMITTO_VDDMIN 0xA
61#define OMAP4_VP_CORE_VLIMITTO_VDDMAX 0x28
62
63static bool is_offset_valid; 46static bool is_offset_valid;
64static u8 smps_offset; 47static u8 smps_offset;
65/* 48/*
diff --git a/arch/arm/mach-omap2/voltage.h b/arch/arm/mach-omap2/voltage.h
index 7283b7ed7de8..700469561b4d 100644
--- a/arch/arm/mach-omap2/voltage.h
+++ b/arch/arm/mach-omap2/voltage.h
@@ -92,6 +92,24 @@ struct voltagedomain {
92 struct omap_volt_data *volt_data; 92 struct omap_volt_data *volt_data;
93}; 93};
94 94
95/* Min and max voltages from OMAP perspective */
96#define OMAP3430_VP1_VLIMITTO_VDDMIN 850000
97#define OMAP3430_VP1_VLIMITTO_VDDMAX 1425000
98#define OMAP3430_VP2_VLIMITTO_VDDMIN 900000
99#define OMAP3430_VP2_VLIMITTO_VDDMAX 1150000
100
101#define OMAP3630_VP1_VLIMITTO_VDDMIN 900000
102#define OMAP3630_VP1_VLIMITTO_VDDMAX 1350000
103#define OMAP3630_VP2_VLIMITTO_VDDMIN 900000
104#define OMAP3630_VP2_VLIMITTO_VDDMAX 1200000
105
106#define OMAP4_VP_MPU_VLIMITTO_VDDMIN 830000
107#define OMAP4_VP_MPU_VLIMITTO_VDDMAX 1410000
108#define OMAP4_VP_IVA_VLIMITTO_VDDMIN 830000
109#define OMAP4_VP_IVA_VLIMITTO_VDDMAX 1260000
110#define OMAP4_VP_CORE_VLIMITTO_VDDMIN 830000
111#define OMAP4_VP_CORE_VLIMITTO_VDDMAX 1200000
112
95/** 113/**
96 * struct omap_voltdm_pmic - PMIC specific data required by voltage driver. 114 * struct omap_voltdm_pmic - PMIC specific data required by voltage driver.
97 * @slew_rate: PMIC slew rate (in uv/us) 115 * @slew_rate: PMIC slew rate (in uv/us)
@@ -118,8 +136,8 @@ struct omap_voltdm_pmic {
118 u8 vp_erroroffset; 136 u8 vp_erroroffset;
119 u8 vp_vstepmin; 137 u8 vp_vstepmin;
120 u8 vp_vstepmax; 138 u8 vp_vstepmax;
121 u8 vp_vddmin; 139 u32 vp_vddmin;
122 u8 vp_vddmax; 140 u32 vp_vddmax;
123 u8 vp_timeout_us; 141 u8 vp_timeout_us;
124 bool i2c_high_speed; 142 bool i2c_high_speed;
125 u8 i2c_mcode; 143 u8 i2c_mcode;
diff --git a/arch/arm/mach-omap2/vp.c b/arch/arm/mach-omap2/vp.c
index 85241b828c02..47c89eba57ca 100644
--- a/arch/arm/mach-omap2/vp.c
+++ b/arch/arm/mach-omap2/vp.c
@@ -58,8 +58,8 @@ void __init omap_vp_init(struct voltagedomain *voltdm)
58 sys_clk_rate = voltdm->sys_clk.rate / 1000; 58 sys_clk_rate = voltdm->sys_clk.rate / 1000;
59 59
60 timeout = (sys_clk_rate * voltdm->pmic->vp_timeout_us) / 1000; 60 timeout = (sys_clk_rate * voltdm->pmic->vp_timeout_us) / 1000;
61 vddmin = voltdm->pmic->vp_vddmin; 61 vddmin = voltdm->pmic->uv_to_vsel(voltdm->pmic->vp_vddmin);
62 vddmax = voltdm->pmic->vp_vddmax; 62 vddmax = voltdm->pmic->uv_to_vsel(voltdm->pmic->vp_vddmax);
63 63
64 waittime = DIV_ROUND_UP(voltdm->pmic->step_size * sys_clk_rate, 64 waittime = DIV_ROUND_UP(voltdm->pmic->step_size * sys_clk_rate,
65 1000 * voltdm->pmic->slew_rate); 65 1000 * voltdm->pmic->slew_rate);