rk31xx:support new pwm circuit for new tps65910
author张晴 <zhangqing@rock-chips.com>
Tue, 29 Jan 2013 03:51:05 +0000 (11:51 +0800)
committer张晴 <zhangqing@rock-chips.com>
Tue, 29 Jan 2013 03:51:05 +0000 (11:51 +0800)
arch/arm/mach-rk30/board-rk3168-86v.c
arch/arm/mach-rk30/board-rk3168-ds1006h.c
arch/arm/mach-rk30/board-rk3168-tb.c
arch/arm/mach-rk3188/board-rk3188-ds1006h.c
drivers/regulator/rk30-pwm-regulator.c

index 87b18d44e506f693d6714f3e1d4470ba80e5cfe2..16d5a1ceeafe56483a0b869a30252bf26cf5874f 100755 (executable)
@@ -920,7 +920,7 @@ static struct platform_device rk30_device_adc_battery = {
 #endif
 #ifdef CONFIG_RK30_PWM_REGULATOR
 static int pwm_voltage_map[] = {
-       950000, 975000,1000000, 1025000, 1050000, 1075000, 1100000, 1125000, 1150000, 1175000, 1200000, 1225000, 1250000, 1275000, 1300000, 1325000, 1350000, 1375000, 1400000
+       800000,825000,850000, 875000,900000, 925000 ,950000, 975000,1000000, 1025000, 1050000, 1075000, 1100000, 1125000, 1150000, 1175000, 1200000, 1225000, 1250000, 1275000, 1300000, 1325000, 1350000,1375000
 };
 
 static struct regulator_consumer_supply pwm_dcdc1_consumers[] = {
@@ -951,10 +951,10 @@ static struct pwm_platform_data pwm_regulator_info[1] = {
                .pwm_iomux_pwm = PWM1,
                .pwm_iomux_gpio = GPIO3_D4,
                .pwm_voltage = 1100000,
-               .suspend_voltage = 1050000,
-               .min_uV = 950000,
-               .max_uV = 1400000,
-               .coefficient = 455,     //45.5%
+               .suspend_voltage = 1000000,
+               .min_uV = 800000,
+               .max_uV = 1375000,
+               .coefficient = 575,     //55.0%
                .pwm_voltage_map = pwm_voltage_map,
                .init_data      = &pwm_regulator_init_dcdc[0],
        },
index fc3072143b58e627f6f53398129073965336be22..39c88828e56ace2c67ddf097d02fb6ad4add55bc 100755 (executable)
@@ -810,7 +810,7 @@ static struct platform_device rk30_device_adc_battery = {
 #endif
 #ifdef CONFIG_RK30_PWM_REGULATOR
 static int pwm_voltage_map[] = {
-       950000, 975000,1000000, 1025000, 1050000, 1075000, 1100000, 1125000, 1150000, 1175000, 1200000, 1225000, 1250000, 1275000, 1300000, 1325000, 1350000, 1375000, 1400000
+       800000,825000,850000, 875000,900000, 925000 ,950000, 975000,1000000, 1025000, 1050000, 1075000, 1100000, 1125000, 1150000, 1175000, 1200000, 1225000, 1250000, 1275000, 1300000, 1325000, 1350000,1375000
 };
 
 static struct regulator_consumer_supply pwm_dcdc1_consumers[] = {
@@ -841,10 +841,10 @@ static struct pwm_platform_data pwm_regulator_info[1] = {
                .pwm_iomux_pwm = PWM1,
                .pwm_iomux_gpio = GPIO3_D4,
                .pwm_voltage = 1100000,
-               .suspend_voltage = 1050000,
-               .min_uV = 950000,
-               .max_uV = 1400000,
-               .coefficient = 455,     //45.5%
+               .suspend_voltage = 1000000,
+               .min_uV = 800000,
+               .max_uV = 1375000,
+               .coefficient = 575,     //57.5%
                .pwm_voltage_map = pwm_voltage_map,
                .init_data      = &pwm_regulator_init_dcdc[0],
        },
index 9625a97a924cbd2242e3eab717e9d95061215864..396b1e4037ebe0a3f9ab875e6c18d98dc5fbbf70 100755 (executable)
@@ -1021,10 +1021,9 @@ static struct platform_device rk30_device_adc_battery = {
 };
 #endif
 #ifdef CONFIG_RK30_PWM_REGULATOR
-const static int pwm_voltage_map[] = {
-       950000, 975000,1000000, 1025000, 1050000, 1075000, 1100000, 1125000, 1150000, 1175000, 1200000, 1225000, 1250000, 1275000, 1300000, 1325000, 1350000, 1375000, 1400000
+static int pwm_voltage_map[] = {
+       800000,825000,850000, 875000,900000, 925000 ,950000, 975000,1000000, 1025000, 1050000, 1075000, 1100000, 1125000, 1150000, 1175000, 1200000, 1225000, 1250000, 1275000, 1300000, 1325000, 1350000,1375000
 };
-
 static struct regulator_consumer_supply pwm_dcdc1_consumers[] = {
        {
                .supply = "vdd_cpu",
@@ -1053,10 +1052,10 @@ static struct pwm_platform_data pwm_regulator_info[1] = {
                .pwm_iomux_pwm = PWM1,
                .pwm_iomux_gpio = GPIO3_D4,
                .pwm_voltage = 1100000,
-               .suspend_voltage = 1050000,
-               .min_uV = 950000,
-               .max_uV = 1400000,
-               .coefficient = 455,     //45.5%
+               .suspend_voltage = 1000000,
+               .min_uV = 800000,
+               .max_uV = 1375000,
+               .coefficient = 575,     //57.5%
                .pwm_voltage_map = pwm_voltage_map,
                .init_data      = &pwm_regulator_init_dcdc[0],
        },
index 8a66f4a82ce061568b4cbfe691ce922c83a270c3..21a819696096140747609ac566851ef9e5e7a46b 100755 (executable)
@@ -833,7 +833,7 @@ static struct platform_device rk30_device_adc_battery = {
 #endif
 #ifdef CONFIG_RK30_PWM_REGULATOR
 static int pwm_voltage_map[] = {
-       950000, 975000,1000000, 1025000, 1050000, 1075000, 1100000, 1125000, 1150000, 1175000, 1200000, 1225000, 1250000, 1275000, 1300000, 1325000, 1350000, 1375000, 1400000
+       800000,825000,850000, 875000,900000, 925000 ,950000, 975000,1000000, 1025000, 1050000, 1075000, 1100000, 1125000, 1150000, 1175000, 1200000, 1225000, 1250000, 1275000, 1300000, 1325000, 1350000,1375000
 };
 
 static struct regulator_consumer_supply pwm_dcdc1_consumers[] = {
@@ -864,10 +864,10 @@ static struct pwm_platform_data pwm_regulator_info[1] = {
                .pwm_iomux_pwm = PWM1,
                .pwm_iomux_gpio = GPIO3_D4,
                .pwm_voltage = 1100000,
-               .suspend_voltage = 1050000,
-               .min_uV = 950000,
-               .max_uV = 1400000,
-               .coefficient = 455,     //45.5%
+               .suspend_voltage = 1000000,
+               .min_uV = 800000,
+               .max_uV = 1375000,
+               .coefficient = 575,     //57.5%
                .pwm_voltage_map = pwm_voltage_map,
                .init_data      = &pwm_regulator_init_dcdc[0],
        },
index bead02ecb183562f0216f608515812b68a6605c2..b593d7fd63408444e008abbe395a70e3158873bc 100755 (executable)
@@ -47,9 +47,15 @@ struct rk_pwm_dcdc {
        struct pwm_platform_data *pdata;\r
 };\r
 \r
+#if defined(CONFIG_SOC_RK3168) || defined(CONFIG_ARCH_RK3188)\r
+const static int pwm_voltage_map[] = {\r
+       800000,825000,850000, 875000,900000, 925000 ,950000, 975000,1000000, 1025000, 1050000, 1075000, 1100000, 1125000, 1150000, 1175000, 1200000, 1225000, 1250000, 1275000, 1300000, 1325000, 1350000,1375000\r
+};\r
+#else\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, 1400000\r
 };\r
+#endif\r
 \r
 static struct rk_pwm_dcdc *g_dcdc;\r
 \r
@@ -291,7 +297,7 @@ static int __devinit pwm_regulator_probe(struct platform_device *pdev)
        platform_set_drvdata(pdev, dcdc);       \r
        printk(KERN_INFO "pwm_regulator.%d: driver initialized\n",id);\r
        pwm_regulator_set_voltage(dcdc->regulator,pdata->pwm_voltage,pdata->pwm_voltage,&selector);\r
-\r
+       \r
        return 0;\r
 \r
 \r