mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
rk31xx:support new pwm circuit for new tps65910
This commit is contained in:
@@ -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],
|
||||
},
|
||||
|
||||
@@ -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],
|
||||
},
|
||||
|
||||
@@ -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],
|
||||
},
|
||||
|
||||
@@ -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],
|
||||
},
|
||||
|
||||
@@ -47,9 +47,15 @@ struct rk_pwm_dcdc {
|
||||
struct pwm_platform_data *pdata;
|
||||
};
|
||||
|
||||
#if defined(CONFIG_SOC_RK3168) || defined(CONFIG_ARCH_RK3188)
|
||||
const 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
|
||||
};
|
||||
#else
|
||||
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
|
||||
};
|
||||
#endif
|
||||
|
||||
static struct rk_pwm_dcdc *g_dcdc;
|
||||
|
||||
@@ -291,7 +297,7 @@ static int __devinit pwm_regulator_probe(struct platform_device *pdev)
|
||||
platform_set_drvdata(pdev, dcdc);
|
||||
printk(KERN_INFO "pwm_regulator.%d: driver initialized\n",id);
|
||||
pwm_regulator_set_voltage(dcdc->regulator,pdata->pwm_voltage,pdata->pwm_voltage,&selector);
|
||||
|
||||
|
||||
return 0;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user