rk30_phone:modify discrete dcdc parameter according to hardware
authorlw@rock-chips.com <lw@rock-chips.com>
Fri, 20 Apr 2012 10:14:50 +0000 (18:14 +0800)
committerlw <lw@rock-chips.com>
Fri, 20 Apr 2012 10:15:13 +0000 (18:15 +0800)
arch/arm/mach-rk30/board-rk30-phone-wm831x.c
arch/arm/mach-rk30/board-rk30-phone.c
drivers/regulator/rk30-pwm-regulator.c

index 199ea78c644c75e6a8f026216f0ec64346892d94..7426796dc56c246600549ac39c1c178078632ba4 100755 (executable)
@@ -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);
index 3ee16e1ebff85dffe05a3e56dd7efbf8de085e4f..25257fdff646d3952c8a5cbfadd24a6e393efac0 100755 (executable)
@@ -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},
index 07129971460ee9546b2f07414fa601e932fa0a3f..62356b88e52e083267268e683cfdec2ab44ee443 100755 (executable)
@@ -70,7 +70,7 @@ struct rk_pwm_dcdc {
 #endif\r
 \r
 const static int pwm_voltage_map[] = {\r
-       950000, 975000, 1000000, 1025000, 1050000, 1075000, 1100000, 1125000, 1150000, 1175000, 1200000, 1225000, 1250000, 1275000, 1300000, 1325000, 1350000, 1375000, 1420000\r
+       850000,875000,900000,925000,950000, 975000, 1000000, 1025000, 1050000, 1075000, 1100000, 1125000, 1150000, 1175000, 1200000, 1225000, 1250000, 1275000, 1300000, 1325000\r
 };\r
 \r
 static struct clk *pwm_clk[2];\r
@@ -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]);\r
        \r
        DBG("%s:id=%d,rate=%d,clkrate=%d\n",__func__,id,rate,clkrate);\r
-       \r
+\r
        if(rate == 0)\r
        {\r
                // iomux pwm to gpio\r
@@ -202,7 +202,7 @@ static int pwm_regulator_set_voltage(struct regulator_dev *dev,
        dcdc->pdata->pwm_voltage = vol;\r
 \r
        // VDD12 = 1.42 - 0.56*D , ÆäÖÐDΪPWMÕ¼¿Õ±È, \r
-       pwm_value = (1420000-vol)/5600;  // pwm_value %\r
+       pwm_value = (1325000-vol)/5800;  // pwm_value %\r
 \r
 \r
        if (pwm_set_rate(dcdc->pdata,1000*1000,pwm_value)!=0)\r
@@ -216,7 +216,7 @@ static int pwm_regulator_set_voltage(struct regulator_dev *dev,
        *selector = i;\r
 #endif\r
 \r
-       DBG("%s:  set successful,pwm_value=%d\n",__FUNCTION__,pwm_value);\r
+       DBG("%s:ok,vol=%d,pwm_value=%d\n",__FUNCTION__,vol,pwm_value);\r
 \r
        return 0;\r
 \r