rk30:sdk:add power hold support
author张晴 <zhangqing@rock-chips.com>
Sat, 24 Mar 2012 13:07:16 +0000 (21:07 +0800)
committer张晴 <zhangqing@rock-chips.com>
Sat, 24 Mar 2012 13:07:16 +0000 (21:07 +0800)
arch/arm/mach-rk30/board-rk30-sdk-wm8326.c [changed mode: 0644->0755]
arch/arm/mach-rk30/board-rk30-sdk.c

old mode 100644 (file)
new mode 100755 (executable)
index 143a1d5..4d9284b
@@ -94,33 +94,35 @@ int wm831x_post_init(struct wm831x *Wm831x)
        struct regulator *dcdc;
        struct regulator *ldo;
 
+
        ldo = regulator_get(NULL, "ldo6");      //vcc_33
-       regulator_set_voltage(ldo, 2800000, 2800000);
-       regulator_set_suspend_voltage(ldo, 2800000);
+       regulator_set_voltage(ldo, 3300000, 3300000);
+       regulator_set_suspend_voltage(ldo, 3300000);
        regulator_enable(ldo);
-       printk("%s set ldo6=%dmV end\n", __func__, regulator_get_voltage(ldo));
+       printk("%s set ldo6 vcc_33=%dmV end\n", __func__, regulator_get_voltage(ldo));
        regulator_put(ldo);
-
+       udelay(100);
+       
        ldo = regulator_get(NULL, "ldo4");      // vdd_11
-       regulator_set_voltage(ldo, 2500000, 2500000);
-       regulator_set_suspend_voltage(ldo, 0000000);
+       regulator_set_voltage(ldo, 1100000, 1100000);
+       regulator_set_suspend_voltage(ldo, 1100000);
        regulator_enable(ldo);
-       printk("%s set ldo4=%dmV end\n", __func__, regulator_get_voltage(ldo));
+       printk("%s set ldo4 vdd_11=%dmV end\n", __func__, regulator_get_voltage(ldo));
        regulator_put(ldo);
        udelay(100);
 
        ldo = regulator_get(NULL, "ldo5");      //vcc_25
-       regulator_set_voltage(ldo, 3000000, 3000000);
-       regulator_set_suspend_voltage(ldo, 3000000);
+       regulator_set_voltage(ldo, 1800000, 1800000);
+       regulator_set_suspend_voltage(ldo, 1800000);
        regulator_enable(ldo);
-       printk("%s set ldo5=%dmV end\n", __func__, regulator_get_voltage(ldo));
+       printk("%s set ldo5 vcc_25=%dmV end\n", __func__, regulator_get_voltage(ldo));
        regulator_put(ldo);
 
        dcdc = regulator_get(NULL, "dcdc4");    // vcc_io
        regulator_set_voltage(dcdc, 3000000, 3000000);
        regulator_set_suspend_voltage(dcdc, 3000000);
        regulator_enable(dcdc);
-       printk("%s set dcdc4=%dmV end\n", __func__, regulator_get_voltage(dcdc));
+       printk("%s set dcdc4 vcc_io=%dmV end\n", __func__, regulator_get_voltage(dcdc));
        regulator_put(dcdc);
        udelay(100);
 
@@ -128,7 +130,7 @@ int wm831x_post_init(struct wm831x *Wm831x)
        regulator_set_voltage(dcdc, 1100000, 1100000);
        regulator_set_suspend_voltage(dcdc, 1000000);
        regulator_enable(dcdc);
-       printk("%s set dcdc2=%dmV end\n", __func__, regulator_get_voltage(dcdc));
+       printk("%s set dcdc2 vdd_arm=%dmV end\n", __func__, regulator_get_voltage(dcdc));
        regulator_put(dcdc);
        udelay(100);
 
@@ -136,23 +138,23 @@ int wm831x_post_init(struct wm831x *Wm831x)
        regulator_set_voltage(dcdc, 1100000, 1100000);
        regulator_set_suspend_voltage(dcdc, 1100000);
        regulator_enable(dcdc);
-       printk("%s set dcdc1=%dmV end\n", __func__, regulator_get_voltage(dcdc));
+       printk("%s set dcdc1 vdd_log=%dmV end\n", __func__, regulator_get_voltage(dcdc));
        regulator_put(dcdc);
        udelay(100);
 
        dcdc = regulator_get(NULL, "dcdc3");    // vcc_ddr
-       regulator_set_voltage(dcdc, 1200000, 1200000);
-       regulator_set_suspend_voltage(dcdc, 1200000);
+       regulator_set_voltage(dcdc, 1150000, 1150000);
+       regulator_set_suspend_voltage(dcdc, 1150000);
        regulator_enable(dcdc);
-       printk("%s set dcdc3=%dmV end\n", __func__, regulator_get_voltage(dcdc));
+       printk("%s set dcdc3 vcc_ddr=%dmV end\n", __func__, regulator_get_voltage(dcdc));
        regulator_put(dcdc);
        udelay(100);
 
        ldo = regulator_get(NULL, "ldo7");      // vcc28_cif
-       regulator_set_voltage(ldo, 3300000, 3300000);
-       regulator_set_suspend_voltage(ldo, 3300000);
+       regulator_set_voltage(ldo, 2800000, 2800000);
+       regulator_set_suspend_voltage(ldo, 2800000);
        regulator_enable(ldo);
-       printk("%s set ldo7=%dmV end\n", __func__, regulator_get_voltage(ldo));
+       printk("%s set ldo7 vcc28_cif=%dmV end\n", __func__, regulator_get_voltage(ldo));
        regulator_put(ldo);
        udelay(100);
 
@@ -160,15 +162,15 @@ int wm831x_post_init(struct wm831x *Wm831x)
        regulator_set_voltage(ldo, 1800000, 1800000);
        regulator_set_suspend_voltage(ldo, 1800000);
        regulator_enable(ldo);
-       printk("%s set ldo1=%dmV end\n", __func__, regulator_get_voltage(ldo));
+       printk("%s set ldo1 vcc18_cif=%dmV end\n", __func__, regulator_get_voltage(ldo));
        regulator_put(ldo);
        udelay(100);
 
-       ldo = regulator_get(NULL, "ldo8");      // vcc18_cif
+       ldo = regulator_get(NULL, "ldo8");      // vcca_33
        regulator_set_voltage(ldo, 3300000, 3300000);
        regulator_set_suspend_voltage(ldo, 3300000);
        regulator_enable(ldo);
-       printk("%s set ldo8=%dmV end\n", __func__, regulator_get_voltage(ldo));
+       printk("%s set ldo8 vcca_33=%dmV end\n", __func__, regulator_get_voltage(ldo));
        regulator_put(ldo);
        udelay(100);
 
@@ -176,15 +178,15 @@ int wm831x_post_init(struct wm831x *Wm831x)
        regulator_set_voltage(ldo, 2800000, 2800000);
        regulator_set_suspend_voltage(ldo, 2800000);
        regulator_enable(ldo);
-       printk("%s set ldo2=%dmV end\n", __func__, regulator_get_voltage(ldo));
+       printk("%s set ldo2 vccio_wl=%dmV end\n", __func__, regulator_get_voltage(ldo));
        regulator_put(ldo);
        udelay(100);
 
-       ldo = regulator_get(NULL, "ldo10");     //vdd_12
+       ldo = regulator_get(NULL, "ldo10");     //vcca_wl
        regulator_set_voltage(ldo, 3300000, 3300000);
        regulator_set_suspend_voltage(ldo, 3300000);
        regulator_enable(ldo);
-       printk("%s set ldo10=%dmV end\n", __func__, regulator_get_voltage(ldo));
+       printk("%s set ldo10 vcca_wl=%dmV end\n", __func__, regulator_get_voltage(ldo));
        regulator_put(ldo);
        udelay(100);
 
@@ -192,18 +194,19 @@ int wm831x_post_init(struct wm831x *Wm831x)
        regulator_set_voltage(ldo, 1200000, 1200000);
        regulator_set_suspend_voltage(ldo, 1200000);
        regulator_enable(ldo);
-       printk("%s set ldo3=%dmV end\n", __func__, regulator_get_voltage(ldo));
+       printk("%s set ldo3 vdd_12=%dmV end\n", __func__, regulator_get_voltage(ldo));
        regulator_put(ldo);
        udelay(100);
 
-       ldo = regulator_get(NULL, "ldo9");      //vccio_wl
+       ldo = regulator_get(NULL, "ldo9");      //vcc_tp
        regulator_set_voltage(ldo, 3300000, 3300000);
        regulator_set_suspend_voltage(ldo, 3300000);
        regulator_enable(ldo);
-       printk("%s set ldo9=%dmV end\n", __func__, regulator_get_voltage(ldo));
+       printk("%s set ldo9 vcc_tp=%dmV end\n", __func__, regulator_get_voltage(ldo));
        regulator_put(ldo);
        udelay(100);
 
+
        return 0;
 }
 
index eca2d79c027829258c86371e281ef35996c26135..0da1d09e4776fb02717c5ee04cfd2ab9ea9cc3b9 100755 (executable)
@@ -854,7 +854,7 @@ static struct i2c_board_info __initdata i2c1_info[] = {
 #if defined (CONFIG_MFD_WM831X_I2C)
        {
                .type          = "wm8326",
-               .addr          = 0x34,
+               .addr          = 0x34,              
                .flags         = 0,
                .irq           = RK30_PIN6_PA4,
                .platform_data = &wm831x_platdata,
@@ -1079,9 +1079,10 @@ struct rk29_sdmmc_platform_data default_sdmmc1_data = {
 
 static void __init machine_rk30_board_init(void)
 {
-       gpio_request(POWER_ON_PIN, "poweronpin");
-       gpio_direction_output(POWER_ON_PIN, GPIO_HIGH); 
 
+       gpio_request(POWER_ON_PIN, "poweronpin");
+       gpio_direction_output(POWER_ON_PIN, GPIO_HIGH);
+       
        rk30_i2c_register_board_info();
        spi_register_board_info(board_spi_devices, ARRAY_SIZE(board_spi_devices));
        platform_add_devices(devices, ARRAY_SIZE(devices));