Skip to contentSkip to conversation

regulator: tps51632: Seems current code doesn't properly support dvfs_step_20mV case

DISCUSSION Axel Lin 2 participants 2 messages Nov 1, 2012

lore
Share & tools
lore

Axel Lin

author
#0 lore raw

Hi Laxman,

While reading the tps51632 driver, I found there is a dvfs_step_20mV setting in platform data. But seems current code doesn't properly handle the case when dvfs_step_20mV is true.

I guess if pdata->dvfs_step_20mV is true, we need:

tps->desc.uV_step = TPS51632_VOLATGE_STEP_20mV;
Fix TPS51632_VOLT_VSEL macro to support dvfs_step_20mV case. Also I'm wondering if either TPS51632_MAX_VSEL/TPS51632_MAX_VOLATGE or desc.n_voltages needs change for dvfs_step_20mV case.

Oh, I don't have the datasheet, so my understanding might be wrong.

Regards,
Axel

#1 lore raw
Quoted 6 lines · Axel Lin

Hi Laxman,

While reading the tps51632 driver, I found there is a dvfs_step_20mV setting in platform data. But seems current code doesn't properly handle the case when dvfs_step_20mV is true.

Quoted 8 lines

I guess if pdata->dvfs_step_20mV is true, we need:

tps->desc.uV_step = TPS51632_VOLATGE_STEP_20mV;
Fix TPS51632_VOLT_VSEL macro to support dvfs_step_20mV case. Also I'm wondering if either TPS51632_MAX_VSEL/TPS51632_MAX_VOLATGE or desc.n_voltages needs change for dvfs_step_20mV case.

Oh, I don't have the datasheet, so my understanding might be wrong.

The steps for voltage and voltage base registers are the 10mV always. The DVFS steps are used only when the steps (offsets) are provided through PWM.

So in DVFS case the vout = voltage_base + pwm_offset* dvfs_steps. And voltage_base = min_volt + sel * 10mV.