rk30:phone loquat:config ddr voltage
author张晴 <zhangqing@rock-chips.com>
Tue, 12 Jun 2012 10:46:56 +0000 (18:46 +0800)
committer张晴 <zhangqing@rock-chips.com>
Tue, 12 Jun 2012 10:46:56 +0000 (18:46 +0800)
arch/arm/mach-rk30/board-rk30-phone-loquat.c
arch/arm/mach-rk30/board-rk30-phone-twl60xx.c

index 0ea406d5edae43707a40193a07f269368a1e718b..482e156d934b59fcb1f5c267a66d09be751ee717 100755 (executable)
@@ -1788,6 +1788,8 @@ static struct i2c_board_info __initdata i2c0_info[] = {
 #endif
 
 #ifdef CONFIG_I2C1_RK30
+#define DC3_VCC_DDR_VOL 1800000   //for vcc_lpddr2_1v8
+#define DC5_VCC_DDR_VOL 1200000        //for vcc_lpddr2_1v2
 #include "board-rk30-phone-twl60xx.c"
 static struct i2c_board_info __initdata i2c1_info[] = {
 
index 57f650be87f7ae5fee171d8498e7d88e04bae464..ea28129bfe280959941abef46de46e3bccb67c6f 100755 (executable)
@@ -54,10 +54,11 @@ int tps80032_pre_init(void){
 
        gpio_request(PMU_POWER_SLEEP, "NULL");
        gpio_direction_output(PMU_POWER_SLEEP, GPIO_LOW);
-
+       
        gpio_request(PMU_CHRG_DET_N, "NULL");
        gpio_direction_output(PMU_CHRG_DET_N, GPIO_HIGH);
-       
+
+       twl_reg_write(0x0e,TWL_MODULE_PM_MASTER,0x5f);
        twl_reg_write(PREQ1_RES_ASS_A,TWL_MODULE_PM_SLAVE_RES,0x2b);
        twl_reg_write(PREQ1_RES_ASS_B,TWL_MODULE_PM_SLAVE_RES,0x50);
        twl_reg_write(PREQ1_RES_ASS_C,TWL_MODULE_PM_SLAVE_RES,0x27);
@@ -143,19 +144,18 @@ int tps80032_set_init(void)
        udelay(100);
 
        dcdc = regulator_get(NULL, "vcc_lpddr2_1v8");  //vcc_lpddr2_1v8
-       regulator_set_voltage(dcdc,1800000,1800000);
+       regulator_set_voltage(dcdc,DC3_VCC_DDR_VOL,DC3_VCC_DDR_VOL);
        regulator_enable(dcdc); 
 //     printk("%s set dcdc3 vcc_lpddr2_1v8=%dmV end\n", __func__, regulator_get_voltage(dcdc));
        regulator_put(dcdc);
        udelay(100);
 
-       dcdc = regulator_get(NULL, "vcc_lpddr2_1v2");
-       regulator_set_voltage(dcdc,1200000,1200000);
+       dcdc = regulator_get(NULL, "vcc_lpddr2_1v2");   //vcc_lpddr2_1v2
+       regulator_set_voltage(dcdc,DC5_VCC_DDR_VOL,DC5_VCC_DDR_VOL);
        regulator_enable(dcdc); 
 //     printk("%s set dcdc5 vcc_lpddr2_1v2=%dmV end\n", __func__, regulator_get_voltage(dcdc));
        regulator_put(dcdc);
        udelay(100);
-
        
        ldo = regulator_get(NULL, "ldo3");      //vcc_nandflash
        regulator_set_voltage(ldo, 3300000, 3300000);
@@ -224,6 +224,9 @@ static struct regulator_consumer_supply tps80032_smps3_supply[] = {
        {
                .supply = "vcc_lpddr2_1v8",
        },
+       {
+               .supply = "vcc_ddr3",
+       },
 };
 static struct regulator_consumer_supply tps80032_smps4_supply[] = {
        {