rk2928:rk2926:support pmu init voltage reference
author张晴 <zhangqing@rock-chips.com>
Thu, 25 Oct 2012 06:19:44 +0000 (14:19 +0800)
committer张晴 <zhangqing@rock-chips.com>
Thu, 25 Oct 2012 06:19:44 +0000 (14:19 +0800)
arch/arm/mach-rk2928/board-rk2926-sdk.c
arch/arm/mach-rk2928/board-rk2928-a720.c
arch/arm/mach-rk2928/board-rk2928-phonepad.c
arch/arm/mach-rk2928/board-rk2928-sdk-act8931.c
arch/arm/mach-rk2928/board-rk2928-sdk-tps65910.c
arch/arm/mach-rk2928/board-rk2928-sdk.c
arch/arm/mach-rk2928/board-rk2928-tb.c

index d998bb2260b7b49c418d89404975c791d5693dd4..f47eb46f472b3e85589684f49f0048086a1de56e 100755 (executable)
@@ -653,10 +653,129 @@ static struct platform_device *devices[] __initdata = {
 #ifdef CONFIG_I2C0_RK30
 #ifdef CONFIG_MFD_TPS65910
 #define TPS65910_HOST_IRQ        RK2928_PIN1_PB2
+#define PMU_POWER_SLEEP RK2928_PIN1_PA1
+
+static struct pmu_info  tps65910_dcdc_info[] = {
+       {
+               .name          = "vdd_cpu",   //arm
+               .min_uv          = 1200000,
+               .max_uv         = 1200000,
+       },
+       {
+               .name          = "vdd2",    //ddr
+               .min_uv          = 1200000,
+               .max_uv         = 1200000,
+       },
+       {
+               .name          = "vio",   //vcc_io
+               .min_uv          = 3300000,
+               .max_uv         = 3300000,
+       },
+       
+};
+static  struct pmu_info  tps65910_ldo_info[] = {
+       #if defined(CONFIG_MACH_RK2928_TB) || defined(CONFIG_MACH_RK2926_TB)
+       {
+               .name          = "vpll",   //vcc25
+               .min_uv          = 2500000,
+               .max_uv         = 2500000,
+       },
+       {
+               .name          = "vdig1",    //vcc18_cif
+               .min_uv          = 1800000,
+               .max_uv         = 1800000,
+       },
+       {
+               .name          = "vdac",   //vccio_wl
+               .min_uv          = 1800000,
+               .max_uv         = 1800000,
+       },
+       #else
+       {
+               .name          = "vdig1",    //vcc18_cif
+               .min_uv          = 1500000,
+               .max_uv         = 1500000,
+       },
+
+       {
+               .name          = "vdig2",   //vdd11
+               .min_uv          = 1200000,
+               .max_uv         = 1200000,
+       },
+       {
+               .name          = "vaux1",   //vcc28_cif
+               .min_uv          = 2800000,
+               .max_uv         = 2800000,
+       },
+       {
+               .name          = "vaux2",   //vcca33
+               .min_uv          = 3300000,
+               .max_uv         = 3300000,
+       },
+       {
+               .name          = "vaux33",   //vcc_tp
+               .min_uv          = 3300000,
+               .max_uv         = 3300000,
+       },
+       {
+               .name          = "vmmc",   //
+               .min_uv          = 3300000,
+               .max_uv         = 3300000,
+       },
+       #endif
+ };
+
 #include "board-rk2928-sdk-tps65910.c"
 #endif
+
 #ifdef CONFIG_REGULATOR_ACT8931
 #define ACT8931_HOST_IRQ               RK2928_PIN1_PB1
+#if defined(CONFIG_MACH_RK2928_SDK)
+#define ACT8931_CHGSEL_PIN RK2928_PIN0_PD0
+#else
+#define ACT8931_CHGSEL_PIN RK2928_PIN1_PA1
+#endif
+
+static struct pmu_info  act8931_dcdc_info[] = {
+       {
+               .name          = "act_dcdc1",   //vcc_io
+               .min_uv          = 3300000,
+               .max_uv         = 3300000,
+       },
+       {
+               .name          = "act_dcdc2",    //ddr
+               .min_uv          = 1500000,
+               .max_uv         = 1500000,
+       },
+       {
+               .name          = "vdd_cpu",   //vdd_arm
+               .min_uv          = 1200000,
+               .max_uv         = 1200000,
+       },
+       
+};
+static  struct pmu_info  act8931_ldo_info[] = {
+       {
+               .name          = "act_ldo1",   //vcc28_cif
+               .min_uv          = 2800000,
+               .max_uv         = 2800000,
+       },
+       {
+               .name          = "act_ldo2",    //vcc18_cif
+               .min_uv          = 1800000,
+               .max_uv         = 1800000,
+       },
+       {
+               .name          = "act_ldo3",    //vcca30
+               .min_uv          = 3000000,
+               .max_uv         = 3000000,
+       },
+       {
+               .name          = "act_ldo4",    //vcc_wl
+               .min_uv          = 3300000,
+               .max_uv         = 3300000,
+       },
+};
 #include "board-rk2928-sdk-act8931.c"
 #endif
 
index 09a8672c3b15edc5ca9a8e943e08653332cd1bb0..68c1f52edf08e62bd94b667e8ce5c0efd54820a7 100755 (executable)
@@ -646,14 +646,133 @@ static struct platform_device *devices[] __initdata = {
 #ifdef CONFIG_I2C0_RK30
 #ifdef CONFIG_MFD_TPS65910
 #define TPS65910_HOST_IRQ        RK2928_PIN1_PB2
-#include "board-rk2928-a720-tps65910.c"
+#define PMU_POWER_SLEEP RK2928_PIN1_PA1
+
+static struct pmu_info  tps65910_dcdc_info[] = {
+       {
+               .name          = "vdd_cpu",   //arm
+               .min_uv          = 1200000,
+               .max_uv         = 1200000,
+       },
+       {
+               .name          = "vdd2",    //ddr
+               .min_uv          = 1200000,
+               .max_uv         = 1200000,
+       },
+       {
+               .name          = "vio",   //vcc_io
+               .min_uv          = 3300000,
+               .max_uv         = 3300000,
+       },
+       
+};
+static  struct pmu_info  tps65910_ldo_info[] = {
+       #if defined(CONFIG_MACH_RK2928_TB) || defined(CONFIG_MACH_RK2926_TB)
+       {
+               .name          = "vpll",   //vcc25
+               .min_uv          = 2500000,
+               .max_uv         = 2500000,
+       },
+       {
+               .name          = "vdig1",    //vcc18_cif
+               .min_uv          = 1800000,
+               .max_uv         = 1800000,
+       },
+       {
+               .name          = "vdac",   //vccio_wl
+               .min_uv          = 1800000,
+               .max_uv         = 1800000,
+       },
+       #else
+       {
+               .name          = "vdig1",    //vcc18_cif
+               .min_uv          = 1500000,
+               .max_uv         = 1500000,
+       },
+
+       {
+               .name          = "vdig2",   //vdd11
+               .min_uv          = 1200000,
+               .max_uv         = 1200000,
+       },
+       {
+               .name          = "vaux1",   //vcc28_cif
+               .min_uv          = 2800000,
+               .max_uv         = 2800000,
+       },
+       {
+               .name          = "vaux2",   //vcca33
+               .min_uv          = 3300000,
+               .max_uv         = 3300000,
+       },
+       {
+               .name          = "vaux33",   //vcc_tp
+               .min_uv          = 3300000,
+               .max_uv         = 3300000,
+       },
+       {
+               .name          = "vmmc",   //
+               .min_uv          = 3300000,
+               .max_uv         = 3300000,
+       },
+       #endif
+ };
+
+#include "board-rk2928-sdk-tps65910.c"
 #endif
+
 #ifdef CONFIG_REGULATOR_ACT8931
 #ifdef CONFIG_MACH_RK2926_M713
 #define ACT8931_HOST_IRQ               RK2928_PIN1_PB1
 #else
 #define ACT8931_HOST_IRQ               RK2928_PIN1_PB2
 #endif
+#if defined(CONFIG_MACH_RK2928_SDK)
+#define ACT8931_CHGSEL_PIN RK2928_PIN0_PD0
+#else
+#define ACT8931_CHGSEL_PIN RK2928_PIN1_PA1
+#endif
+
+static struct pmu_info  act8931_dcdc_info[] = {
+       {
+               .name          = "act_dcdc1",   //vcc_io
+               .min_uv          = 3300000,
+               .max_uv         = 3300000,
+       },
+       {
+               .name          = "act_dcdc2",    //ddr
+               .min_uv          = 1500000,
+               .max_uv         = 1500000,
+       },
+       {
+               .name          = "vdd_cpu",   //vdd_arm
+               .min_uv          = 1200000,
+               .max_uv         = 1200000,
+       },
+       
+};
+static  struct pmu_info  act8931_ldo_info[] = {
+       {
+               .name          = "act_ldo1",   //vcc28_cif
+               .min_uv          = 2800000,
+               .max_uv         = 2800000,
+       },
+       {
+               .name          = "act_ldo2",    //vcc18_cif
+               .min_uv          = 1800000,
+               .max_uv         = 1800000,
+       },
+       {
+               .name          = "act_ldo3",    //vcca30
+               .min_uv          = 3000000,
+               .max_uv         = 3000000,
+       },
+       {
+               .name          = "act_ldo4",    //vcc_wl
+               .min_uv          = 3300000,
+               .max_uv         = 3300000,
+       },
+};
 #include "board-rk2928-sdk-act8931.c"
 #endif
 
index 3bd82b8b803d66c259c4bc9cfd42ced54c19c150..adb57ea35c0e17f355b86ce7edb94c318234348f 100755 (executable)
@@ -847,12 +847,134 @@ static struct platform_device *devices[] __initdata = {
 #ifdef CONFIG_I2C0_RK30
 #ifdef CONFIG_MFD_TPS65910
 #define TPS65910_HOST_IRQ        RK2928_PIN3_PC6
-#include "board-rk2928-phonepad-tps65910.c"
+#define PMU_POWER_SLEEP RK2928_PIN1_PA1
+
+static struct pmu_info  tps65910_dcdc_info[] = {
+       {
+               .name          = "vdd_cpu",   //arm
+               .min_uv          = 1200000,
+               .max_uv         = 1200000,
+       },
+       {
+               .name          = "vdd2",    //ddr
+               .min_uv          = 1200000,
+               .max_uv         = 1200000,
+       },
+       {
+               .name          = "vio",   //vcc_io
+               .min_uv          = 3300000,
+               .max_uv         = 3300000,
+       },
+       
+};
+static  struct pmu_info  tps65910_ldo_info[] = {
+       #if defined(CONFIG_MACH_RK2928_TB) || defined(CONFIG_MACH_RK2926_TB)
+       {
+               .name          = "vpll",   //vcc25
+               .min_uv          = 2500000,
+               .max_uv         = 2500000,
+       },
+       {
+               .name          = "vdig1",    //vcc18_cif
+               .min_uv          = 1800000,
+               .max_uv         = 1800000,
+       },
+       {
+               .name          = "vdac",   //vccio_wl
+               .min_uv          = 1800000,
+               .max_uv         = 1800000,
+       },
+       #else
+       {
+               .name          = "vdig1",    //vcc18_cif
+               .min_uv          = 1500000,
+               .max_uv         = 1500000,
+       },
+
+       {
+               .name          = "vdig2",   //vdd11
+               .min_uv          = 1200000,
+               .max_uv         = 1200000,
+       },
+       {
+               .name          = "vaux1",   //vcc28_cif
+               .min_uv          = 2800000,
+               .max_uv         = 2800000,
+       },
+       {
+               .name          = "vaux2",   //vcca33
+               .min_uv          = 3300000,
+               .max_uv         = 3300000,
+       },
+       {
+               .name          = "vaux33",   //vcc_tp
+               .min_uv          = 3300000,
+               .max_uv         = 3300000,
+       },
+       {
+               .name          = "vmmc",   //
+               .min_uv          = 3300000,
+               .max_uv         = 3300000,
+       },
+       #endif
+ };
+
+#include "board-rk2928-sdk-tps65910.c"
 #endif
+
 #ifdef CONFIG_REGULATOR_ACT8931
+
+#if defined(CONFIG_MACH_RK2928_SDK)
+#define ACT8931_CHGSEL_PIN RK2928_PIN0_PD0
+#else
+#define ACT8931_CHGSEL_PIN RK2928_PIN1_PA1
+#endif
+
+static struct pmu_info  act8931_dcdc_info[] = {
+       {
+               .name          = "act_dcdc1",   //vcc_io
+               .min_uv          = 3300000,
+               .max_uv         = 3300000,
+       },
+       {
+               .name          = "act_dcdc2",    //ddr
+               .min_uv          = 1500000,
+               .max_uv         = 1500000,
+       },
+       {
+               .name          = "vdd_cpu",   //vdd_arm
+               .min_uv          = 1200000,
+               .max_uv         = 1200000,
+       },
+       
+};
+static  struct pmu_info  act8931_ldo_info[] = {
+       {
+               .name          = "act_ldo1",   //vcc28_cif
+               .min_uv          = 2800000,
+               .max_uv         = 2800000,
+       },
+       {
+               .name          = "act_ldo2",    //vcc18_cif
+               .min_uv          = 1800000,
+               .max_uv         = 1800000,
+       },
+       {
+               .name          = "act_ldo3",    //vcca30
+               .min_uv          = 3000000,
+               .max_uv         = 3000000,
+       },
+       {
+               .name          = "act_ldo4",    //vcc_wl
+               .min_uv          = 3300000,
+               .max_uv         = 3300000,
+       },
+};
 #include "board-rk2928-sdk-act8931.c"
 #endif
 
+#endif
+
 static struct i2c_board_info __initdata i2c0_info[] = {
 #if defined (CONFIG_MFD_TPS65910)
        {
index 019d677518ca97775ba1009fc095e0a14dfeed1f..c644cdda3a466f25910a51173365d834c308441c 100755 (executable)
@@ -9,16 +9,6 @@
 
 #ifdef CONFIG_REGULATOR_ACT8931
 
-#ifndef CONFIG_RK_CONFIG
-
-#if defined(CONFIG_MACH_RK2928_SDK)
-#define ACT8931_CHGSEL_PIN RK2928_PIN0_PD0
-#else
-#define ACT8931_CHGSEL_PIN RK2928_PIN1_PA1
-#endif
-
-#endif
-
 #define ACT8931_CHGSEL_VALUE GPIO_HIGH /* Declined to 20% current */
 
 extern int platform_device_register(struct platform_device *pdev);
@@ -27,7 +17,7 @@ static int act8931_set_init(struct act8931 *act8931)
 {
        struct regulator *dcdc;
        struct regulator *ldo;
-       int ret;
+       int i = 0;
        printk("%s,line=%d\n", __func__,__LINE__);
 
        g_pmic_type = PMIC_TYPE_ACT8931;
@@ -37,67 +27,24 @@ static int act8931_set_init(struct act8931 *act8931)
        platform_device_register(&pwm_regulator_device[0]);
        #endif
        
-       ldo = regulator_get(NULL, "act_ldo1");  //vcc28_cif
-       regulator_set_voltage(ldo, 2800000, 2800000);
-       regulator_enable(ldo);
-       printk("%s set ldo1 vcc28_cif=%dmV end\n", __func__, regulator_get_voltage(ldo));
-       regulator_put(ldo);
-       udelay(100);
-
-       ldo = regulator_get(NULL, "act_ldo2");  // vcc18_cif
-       regulator_set_voltage(ldo, 1800000, 1800000);
-       regulator_enable(ldo);
-       printk("%s set ldo2 vcc18_cif=%dmV end\n", __func__, regulator_get_voltage(ldo));
-       regulator_put(ldo);
-       udelay(100);
-
-       ldo = regulator_get(NULL, "act_ldo3");  // vcca_30
-       regulator_set_voltage(ldo, 3000000, 3000000);
-       regulator_enable(ldo);
-       printk("%s set ldo3 vcca_30=%dmV end\n", __func__, regulator_get_voltage(ldo));
-       regulator_put(ldo);
-       udelay(100);
-
-       ldo = regulator_get(NULL, "act_ldo4");   //vcc_wl
-       regulator_set_voltage(ldo, 3300000, 3300000);
-       regulator_enable(ldo);
-       printk("%s set ldo4 vcc_lcd=%dmV end\n", __func__, regulator_get_voltage(ldo));
-#if defined(CONFIG_MACH_RK2928_TB) || defined(CONFIG_MACH_RK2926_TB)
-        //do not disable vccio wl
-#else  
-        regulator_disable(ldo);
-#endif
-       regulator_put(ldo);
-       udelay(100);
-       
-       dcdc = regulator_get(NULL, "act_dcdc1");        //vcc_io
-       regulator_set_voltage(dcdc, 3200000, 3200000);
-       regulator_enable(dcdc);
-       printk("%s set dcdc1 vcc_io=%dmV end\n", __func__, regulator_get_voltage(dcdc));
-       regulator_put(dcdc);
-       udelay(100);
-       
-       dcdc = regulator_get(NULL, "act_dcdc2");        //vcc_ddr 
-       regulator_set_voltage(dcdc, 1500000, 1500000);  // 1.5*4/5 = 1.2 and Vout=1.5v
+       for(i = 0; i < ARRAY_SIZE(act8931_dcdc_info); i++)
+       {
+       dcdc =regulator_get(NULL, act8931_dcdc_info[i].name);
+       regulator_set_voltage(dcdc, act8931_dcdc_info[i].min_uv, act8931_dcdc_info[i].max_uv);
        regulator_enable(dcdc);
-       printk("%s set dcdc2 vcc_ddr=%dmV end\n", __func__, regulator_get_voltage(dcdc));
+       printk("%s  %s =%dmV end\n", __func__,act8931_dcdc_info[i].name, regulator_get_voltage(dcdc));
        regulator_put(dcdc);
        udelay(100);
+       }
        
-       dcdc = regulator_get(NULL, "vdd_cpu");  //vdd_arm
-       regulator_set_voltage(dcdc, 1200000, 1200000);
-       regulator_enable(dcdc);
-       printk("%s set dcdc3 vdd_arm=%dmV end\n", __func__, regulator_get_voltage(dcdc));
-       regulator_put(dcdc);
-       udelay(100);
-#ifdef CONFIG_RK_CONFIG
-        ret = port_output_init(chg_sel, 1, "chg_sel");
-#else
-       ret = gpio_request(ACT8931_CHGSEL_PIN, "ACT8931_CHGSEL");
-       if (ret != 0)
-               gpio_free(ACT8931_CHGSEL_PIN);
-       gpio_direction_output(ACT8931_CHGSEL_PIN, ACT8931_CHGSEL_VALUE);
-#endif
+       for(i = 0; i < ARRAY_SIZE(act8931_ldo_info); i++)
+       {
+       ldo =regulator_get(NULL, act8931_ldo_info[i].name);
+       regulator_set_voltage(ldo, act8931_ldo_info[i].min_uv, act8931_ldo_info[i].max_uv);
+       regulator_enable(ldo);
+       //printk("%s  %s =%dmV end\n", __func__,act8931_ldo_info[i].name, regulator_get_voltage(ldo));
+       regulator_put(ldo);
+       }
 
        printk("%s,line=%d END\n", __func__,__LINE__);
        
index 514a08475c8815ad347ae08ca8c72192e3f5a99a..b9b0caf420c558255d0e7e13536c492d0e6c6854 100755 (executable)
@@ -9,18 +9,6 @@
 
 #ifdef CONFIG_MFD_TPS65910
 
-#ifndef CONFIG_RK_CONFIG
-
-#if defined(CONFIG_MACH_RK2928_SDK)
-#define PMU_POWER_SLEEP RK2928_PIN0_PD0        
-#elif defined(CONFIG_MACH_RK2928_TB)
-#define PMU_POWER_SLEEP RK2928_PIN3_PD2
-#else
-#define PMU_POWER_SLEEP RK2928_PIN1_PA1
-#endif
-
-#endif
-
 #define GPIO_SWPORTA_DR  0x0000
 #define GPIO_SWPORTA_DDR 0x0004
 struct sram_gpio_data {
@@ -284,6 +272,7 @@ int tps65910_post_init(struct tps65910 *tps65910)
 {
        struct regulator *dcdc;
        struct regulator *ldo;
+       int i = 0;
        printk("%s,line=%d\n", __func__,__LINE__);
 
        g_pmic_type = PMIC_TYPE_TPS65910;
@@ -292,92 +281,25 @@ int tps65910_post_init(struct tps65910 *tps65910)
        #ifdef CONFIG_RK30_PWM_REGULATOR
        platform_device_register(&pwm_regulator_device[0]);
        #endif
-       
-       dcdc = regulator_get(NULL, "vio");      //vcc_io
-       regulator_set_voltage(dcdc, 3300000, 3300000);
-       regulator_enable(dcdc);
-       printk("%s set vio vcc_io=%dmV end\n", __func__, regulator_get_voltage(dcdc));
-       regulator_put(dcdc);
-       udelay(100);
-#if defined(CONFIG_MACH_RK2928_TB) || defined(CONFIG_MACH_RK2926_TB)
-       ldo = regulator_get(NULL, "vpll");      // vcc25
-       regulator_set_voltage(ldo, 2500000, 2500000);
-       regulator_enable(ldo);
-       printk("%s set vpll vcc25=%dmV end\n", __func__, regulator_get_voltage(ldo));
-       regulator_put(ldo);
-       udelay(100);
-#endif
-       ldo = regulator_get(NULL, "vdig2");     // vdd12
-       regulator_set_voltage(ldo, 1200000, 1200000);
-       regulator_enable(ldo);
-       printk("%s set vdig2 vdd12=%dmV end\n", __func__, regulator_get_voltage(ldo));
-       regulator_put(ldo);
-       udelay(100);
 
-       ldo = regulator_get(NULL, "vaux33");     //vcc_tp
-       regulator_set_voltage(ldo, 3300000, 3300000);
-       regulator_enable(ldo);
-       printk("%s set vaux33 vcc_tp=%dmV end\n", __func__, regulator_get_voltage(ldo));
-       regulator_put(ldo);
-       udelay(100);
-       
-       dcdc = regulator_get(NULL, "vdd_cpu");  //vdd_cpu
-       regulator_set_voltage(dcdc, 1200000, 1200000);
-       regulator_enable(dcdc);
-       printk("%s set vdd1 vdd_cpu=%dmV end\n", __func__, regulator_get_voltage(dcdc));
-       regulator_put(dcdc);
-       udelay(100);
-       
-       dcdc = regulator_get(NULL, "vdd2");     //vcc_ddr 
-       regulator_set_voltage(dcdc, 1200000, 1200000);  // 1.5*4/5 = 1.2 and Vout=1.5v
+       for(i = 0; i < ARRAY_SIZE(tps65910_dcdc_info); i++)
+       {
+       dcdc =regulator_get(NULL, tps65910_dcdc_info[i].name);
+       regulator_set_voltage(dcdc, tps65910_dcdc_info[i].min_uv, tps65910_dcdc_info[i].max_uv);
        regulator_enable(dcdc);
-       printk("%s set vdd2 vcc_ddr=%dmV end\n", __func__, regulator_get_voltage(dcdc));
+       printk("%s  %s =%dmV end\n", __func__,tps65910_dcdc_info[i].name, regulator_get_voltage(dcdc));
        regulator_put(dcdc);
        udelay(100);
+       }
        
-       ldo = regulator_get(NULL, "vdig1");     //vcc18_cif
-#if defined(CONFIG_MACH_RK2928_TB) || defined(CONFIG_MACH_RK2926_TB)
-       regulator_set_voltage(ldo, 1800000, 1800000);
-#else
-       regulator_set_voltage(ldo, 1500000, 1500000);
-#endif
-       regulator_enable(ldo);
-       printk("%s set vdig1 vcc18_cif=%dmV end\n", __func__, regulator_get_voltage(ldo));
-       regulator_put(ldo);
-       udelay(100);
-       
-       dcdc = regulator_get(NULL, "vaux1"); //vcc28_cif
-       regulator_set_voltage(dcdc,2800000,2800000);
-       regulator_enable(dcdc); 
-       printk("%s set vaux1 vcc28_cif=%dmV end\n", __func__, regulator_get_voltage(dcdc));
-       regulator_put(dcdc);
-       udelay(100);
-
-       ldo = regulator_get(NULL, "vaux2");     //vcca33
-       regulator_set_voltage(ldo, 3300000, 3300000);
+       for(i = 0; i < ARRAY_SIZE(tps65910_ldo_info); i++)
+       {
+       ldo =regulator_get(NULL, tps65910_ldo_info[i].name);
+       regulator_set_voltage(ldo, tps65910_ldo_info[i].min_uv, tps65910_ldo_info[i].max_uv);
        regulator_enable(ldo);
-       printk("%s set vaux2 vcca33=%dmV end\n", __func__, regulator_get_voltage(ldo));
-       regulator_put(ldo);
-       udelay(100);
-#if defined(CONFIG_MACH_RK2928_TB) || defined(CONFIG_MACH_RK2926_TB)
-       ldo = regulator_get(NULL, "vdac"); // vccio_wl
-       regulator_set_voltage(ldo,1800000,1800000);
-       regulator_enable(ldo); 
-       printk("%s set vdac vccio_wl=%dmV end\n", __func__, regulator_get_voltage(ldo));
+       //printk("%s  %s =%dmV end\n", __func__,tps65910_dcdc_info[i].name, regulator_get_voltage(ldo));
        regulator_put(ldo);
-       udelay(100);
-#endif
-       ldo = regulator_get(NULL, "vmmc");  //vccio_wl
-       regulator_set_voltage(ldo,3300000,3300000);
-       regulator_enable(ldo); 
-       printk("%s set vmmc vccio_wl=%dmV end\n", __func__, regulator_get_voltage(ldo));
-#if defined(CONFIG_MACH_RK2928_TB) || defined(CONFIG_MACH_RK2926_TB)
-        //do not disable vccio wl
-#else
-       regulator_disable(ldo); 
-#endif
-       regulator_put(ldo);
-       udelay(100);
+       }
 
        printk("%s,line=%d END\n", __func__,__LINE__);
        
index 2955cb69532c2f8ec3f76edaffbf5ff4057a7da9..d50dc483fe5f896244bc71ef58605ff319bb3eb7 100755 (executable)
@@ -660,13 +660,134 @@ static struct platform_device *devices[] __initdata = {
 #ifdef CONFIG_I2C0_RK30\r
 #ifdef CONFIG_MFD_TPS65910\r
 #define TPS65910_HOST_IRQ        RK2928_PIN1_PB2\r
+#define PMU_POWER_SLEEP RK2928_PIN0_PD0\r
+
+static struct pmu_info  tps65910_dcdc_info[] = {
+       {
+               .name          = "vdd_cpu",   //arm
+               .min_uv          = 1200000,\r
+               .max_uv         = 1200000,\r
+       },
+       {
+               .name          = "vdd2",    //ddr
+               .min_uv          = 1200000,
+               .max_uv         = 1200000,
+       },
+       {
+               .name          = "vio",   //vcc_io
+               .min_uv          = 3300000,\r
+               .max_uv         = 3300000,\r
+       },
+       
+};
+static  struct pmu_info  tps65910_ldo_info[] = {\r
+       #if defined(CONFIG_MACH_RK2928_TB) || defined(CONFIG_MACH_RK2926_TB)\r
+       {
+               .name          = "vpll",   //vcc25
+               .min_uv          = 2500000,
+               .max_uv         = 2500000,
+       },\r
+       {\r
+               .name          = "vdig1",    //vcc18_cif
+               .min_uv          = 1800000,\r
+               .max_uv         = 1800000,\r
+       },\r
+       {\r
+               .name          = "vdac",   //vccio_wl
+               .min_uv          = 1800000,
+               .max_uv         = 1800000,
+       },\r
+       #else\r
+       {\r
+               .name          = "vdig1",    //vcc18_cif
+               .min_uv          = 1500000,\r
+               .max_uv         = 1500000,\r
+       },\r
+\r
+       {
+               .name          = "vdig2",   //vdd11
+               .min_uv          = 1200000,\r
+               .max_uv         = 1200000,\r
+       },
+       {
+               .name          = "vaux1",   //vcc28_cif\r
+               .min_uv          = 2800000,\r
+               .max_uv         = 2800000,\r
+       },
+       {
+               .name          = "vaux2",   //vcca33
+               .min_uv          = 3300000,
+               .max_uv         = 3300000,
+       },
+       {
+               .name          = "vaux33",   //vcc_tp
+               .min_uv          = 3300000,
+               .max_uv         = 3300000,
+       },
+       {
+               .name          = "vmmc",   //\r
+               .min_uv          = 3300000,\r
+               .max_uv         = 3300000,\r
+       },
+       #endif\r
+ };\r
+
 #include "board-rk2928-sdk-tps65910.c"\r
 #endif\r
+\r
 #ifdef CONFIG_REGULATOR_ACT8931\r
 #define ACT8931_HOST_IRQ               RK2928_PIN3_PC6\r
-#include "board-rk2928-sdk-act8931.c"\r
+\r
+#if defined(CONFIG_MACH_RK2928_SDK)
+#define ACT8931_CHGSEL_PIN RK2928_PIN0_PD0
+#else
+#define ACT8931_CHGSEL_PIN RK2928_PIN1_PA1
 #endif\r
 \r
+static struct pmu_info  act8931_dcdc_info[] = {\r
+       {
+               .name          = "act_dcdc1",   //vcc_io\r
+               .min_uv          = 3300000,\r
+               .max_uv         = 3300000,\r
+       },
+       {
+               .name          = "act_dcdc2",    //ddr\r
+               .min_uv          = 1500000,\r
+               .max_uv         = 1500000,\r
+       },
+       {
+               .name          = "vdd_cpu",   //vdd_arm\r
+               .min_uv          = 1200000,\r
+               .max_uv         = 1200000,\r
+       },
+       
+};
+static  struct pmu_info  act8931_ldo_info[] = {\r
+       {
+               .name          = "act_ldo1",   //vcc28_cif\r
+               .min_uv          = 2800000,\r
+               .max_uv         = 2800000,\r
+       },\r
+       {\r
+               .name          = "act_ldo2",    //vcc18_cif\r
+               .min_uv          = 1800000,\r
+               .max_uv         = 1800000,\r
+       },\r
+       {\r
+               .name          = "act_ldo3",    //vcca30\r
+               .min_uv          = 3000000,\r
+               .max_uv         = 3000000,\r
+       },\r
+       {\r
+               .name          = "act_ldo4",    //vcc_wl\r
+               .min_uv          = 3300000,\r
+               .max_uv         = 3300000,\r
+       },\r
+};\r
+#include "board-rk2928-sdk-act8931.c"
+#endif
+\r
+\r
 static struct i2c_board_info __initdata i2c0_info[] = {\r
 #if defined (CONFIG_MFD_TPS65910)\r
        {\r
index 4ae4a99785fbc3db7b5d27b36ffb4fd090594047..6b006928cbb33d3bbabeb15f52138828f763904d 100755 (executable)
@@ -843,8 +843,81 @@ static struct i2c_board_info __initdata i2c0_info[] = {
 #elif defined(CONFIG_MACH_RK2926_TB)
 #define TPS65910_HOST_IRQ        RK2928_PIN1_PB1
 #endif
+#define PMU_POWER_SLEEP RK2928_PIN3_PD2
+
+static struct pmu_info  tps65910_dcdc_info[] = {
+       {
+               .name          = "vdd_cpu",   //arm
+               .min_uv          = 1200000,
+               .max_uv         = 1200000,
+       },
+       {
+               .name          = "vdd2",    //ddr
+               .min_uv          = 1200000,
+               .max_uv         = 1200000,
+       },
+       {
+               .name          = "vio",   //vcc_io
+               .min_uv          = 3300000,
+               .max_uv         = 3300000,
+       },
+       
+};
+static  struct pmu_info  tps65910_ldo_info[] = {
+       #if defined(CONFIG_MACH_RK2928_TB) || defined(CONFIG_MACH_RK2926_TB)
+       {
+               .name          = "vpll",   //vcc25
+               .min_uv          = 2500000,
+               .max_uv         = 2500000,
+       },
+       {
+               .name          = "vdig1",    //vcc18_cif
+               .min_uv          = 1800000,
+               .max_uv         = 1800000,
+       },
+       {
+               .name          = "vdac",   //vccio_wl
+               .min_uv          = 1800000,
+               .max_uv         = 1800000,
+       },
+       #else
+       {
+               .name          = "vdig1",    //vcc18_cif
+               .min_uv          = 1500000,
+               .max_uv         = 1500000,
+       },
+
+       {
+               .name          = "vdig2",   //vdd11
+               .min_uv          = 1200000,
+               .max_uv         = 1200000,
+       },
+       {
+               .name          = "vaux1",   //vcc28_cif
+               .min_uv          = 2800000,
+               .max_uv         = 2800000,
+       },
+       {
+               .name          = "vaux2",   //vcca33
+               .min_uv          = 3300000,
+               .max_uv         = 3300000,
+       },
+       {
+               .name          = "vaux33",   //vcc_tp
+               .min_uv          = 3300000,
+               .max_uv         = 3300000,
+       },
+       {
+               .name          = "vmmc",   //
+               .min_uv          = 3300000,
+               .max_uv         = 3300000,
+       },
+       #endif
+ };
+
 #include "board-rk2928-sdk-tps65910.c"
 #endif
+
 static struct i2c_board_info __initdata i2c1_info[] = {
 
 #if defined (CONFIG_MFD_TPS65910)