From 3efedf2972561af8fe4655ac2232c7aa96706378 Mon Sep 17 00:00:00 2001 From: "lw@rock-chips.com" Date: Fri, 20 Apr 2012 18:14:50 +0800 Subject: [PATCH] rk30_phone:modify discrete dcdc parameter according to hardware --- arch/arm/mach-rk30/board-rk30-phone-wm831x.c | 2 +- arch/arm/mach-rk30/board-rk30-phone.c | 4 ++-- drivers/regulator/rk30-pwm-regulator.c | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/arch/arm/mach-rk30/board-rk30-phone-wm831x.c b/arch/arm/mach-rk30/board-rk30-phone-wm831x.c index 199ea78c644c..7426796dc56c 100755 --- a/arch/arm/mach-rk30/board-rk30-phone-wm831x.c +++ b/arch/arm/mach-rk30/board-rk30-phone-wm831x.c @@ -216,7 +216,7 @@ int wm831x_post_init(struct wm831x *Wm831x) //discrete dcdc device #ifdef CONFIG_RK30_PWM_REGULATOR dcdc = regulator_get(NULL, "vdd_core"); // vdd_log - regulator_set_voltage(dcdc, 1100000, 1100000); + regulator_set_voltage(dcdc, 1050000, 1050000); regulator_enable(dcdc); printk("%s set vdd_core=%dmV end\n", __func__, regulator_get_voltage(dcdc)); regulator_put(dcdc); diff --git a/arch/arm/mach-rk30/board-rk30-phone.c b/arch/arm/mach-rk30/board-rk30-phone.c index 3ee16e1ebff8..25257fdff646 100755 --- a/arch/arm/mach-rk30/board-rk30-phone.c +++ b/arch/arm/mach-rk30/board-rk30-phone.c @@ -1872,8 +1872,8 @@ static struct cpufreq_frequency_table cpu_dvfs_table[] = { //{.frequency = 252*1000, .index = 980*1000}, //{.frequency = 504*1000, .index = 980*1000}, {.frequency = 816*1000, .index = 1050*1000}, - //{.frequency = 1008*1000,.index = 1150*1000}, - //{.frequency = 1200*1000,.index = 1250*1000}, + {.frequency = 1008*1000,.index = 1150*1000}, + {.frequency = 1200*1000,.index = 1250*1000}, //{.frequency = 1416*1000,.index = 1280*1000}, //{.frequency = 1512*1000,.index = 1320*1000}, //{.frequency = 1560*1000,.index = 1350*1000}, diff --git a/drivers/regulator/rk30-pwm-regulator.c b/drivers/regulator/rk30-pwm-regulator.c index 07129971460e..62356b88e52e 100755 --- a/drivers/regulator/rk30-pwm-regulator.c +++ b/drivers/regulator/rk30-pwm-regulator.c @@ -70,7 +70,7 @@ struct rk_pwm_dcdc { #endif const static int pwm_voltage_map[] = { - 950000, 975000, 1000000, 1025000, 1050000, 1075000, 1100000, 1125000, 1150000, 1175000, 1200000, 1225000, 1250000, 1275000, 1300000, 1325000, 1350000, 1375000, 1420000 + 850000,875000,900000,925000,950000, 975000, 1000000, 1025000, 1050000, 1075000, 1100000, 1125000, 1150000, 1175000, 1200000, 1225000, 1250000, 1275000, 1300000, 1325000 }; static struct clk *pwm_clk[2]; @@ -93,7 +93,7 @@ static int pwm_set_rate(struct pwm_platform_data *pdata,int nHz,u32 rate) clkrate = clk_get_rate(pwm_clk[1]); DBG("%s:id=%d,rate=%d,clkrate=%d\n",__func__,id,rate,clkrate); - + if(rate == 0) { // iomux pwm to gpio @@ -202,7 +202,7 @@ static int pwm_regulator_set_voltage(struct regulator_dev *dev, dcdc->pdata->pwm_voltage = vol; // VDD12 = 1.42 - 0.56*D , ÆäÖÐDΪPWMÕ¼¿Õ±È, - pwm_value = (1420000-vol)/5600; // pwm_value % + pwm_value = (1325000-vol)/5800; // pwm_value % if (pwm_set_rate(dcdc->pdata,1000*1000,pwm_value)!=0) @@ -216,7 +216,7 @@ static int pwm_regulator_set_voltage(struct regulator_dev *dev, *selector = i; #endif - DBG("%s: set successful,pwm_value=%d\n",__FUNCTION__,pwm_value); + DBG("%s:ok,vol=%d,pwm_value=%d\n",__FUNCTION__,vol,pwm_value); return 0; -- 2.34.1