linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* regulator: tps80031: question about LDO2 TRACK_MODE_ENABLE of TPS80031 or TPS80032-ES1.0
@ 2013-04-17  3:24 Axel Lin
  2013-04-17  6:44 ` Laxman Dewangan
  0 siblings, 1 reply; 2+ messages in thread
From: Axel Lin @ 2013-04-17  3:24 UTC (permalink / raw)
  To: Mark Brown; +Cc: Laxman Dewangan, Liam Girdwood, linux-kernel

hi Laxman,

Currently we have below code in tps80031_ldo_set_voltage_sel():

        /* Check for valid setting for TPS80031 or TPS80032-ES1.0 */
        if ((ri->rinfo->desc.id == TPS80031_REGULATOR_LDO2) &&
                        (ri->device_flags & TRACK_MODE_ENABLE)) {
                unsigned nvsel = (sel) & 0x1F;
                if (((tps80031_get_chip_info(parent) == TPS80031) ||
                        ((tps80031_get_chip_info(parent) == TPS80032) &&
                        (tps80031_get_pmu_version(parent) == 0x0))) &&
                        ((nvsel == 0x0) || (nvsel >= 0x19 && nvsel <= 0x1F))) {
                                dev_err(ri->dev,
                                        "Invalid sel %d in track mode LDO2\n",
                                        nvsel);
                                return -EINVAL;
                }
        }

However, list_voltage() still show these invalid selectors have supported voltage.
Besides, having the code "nvsel = (sel) & 0x1F" looks a bit odd, because currently
n_voltages is set to 57 when TRACK_MODE_ENABLE is set.

I'm wondering if below comment is still true for LDO2 TRACK_MODE_ENABLE of
"TPS80031/TPS80032-ES1.0"?

/* TRACK mode the ldo2 varies from 600mV to 1300mV */

What is the register value && voltage mapping for LDO2 TRACK_MODE_ENABLE of
TPS80031 or TPS80032-ES1.0?

Regards,
Axel


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: regulator: tps80031: question about LDO2 TRACK_MODE_ENABLE of TPS80031 or TPS80032-ES1.0
  2013-04-17  3:24 regulator: tps80031: question about LDO2 TRACK_MODE_ENABLE of TPS80031 or TPS80032-ES1.0 Axel Lin
@ 2013-04-17  6:44 ` Laxman Dewangan
  0 siblings, 0 replies; 2+ messages in thread
From: Laxman Dewangan @ 2013-04-17  6:44 UTC (permalink / raw)
  To: Axel Lin; +Cc: Mark Brown, Liam Girdwood, linux-kernel

On Wednesday 17 April 2013 08:54 AM, Axel Lin wrote:
> hi Laxman,
>
> Currently we have below code in tps80031_ldo_set_voltage_sel():
>
>          /* Check for valid setting for TPS80031 or TPS80032-ES1.0 */
>          if ((ri->rinfo->desc.id == TPS80031_REGULATOR_LDO2) &&
>                          (ri->device_flags & TRACK_MODE_ENABLE)) {
>                  unsigned nvsel = (sel) & 0x1F;
>                  if (((tps80031_get_chip_info(parent) == TPS80031) ||
>                          ((tps80031_get_chip_info(parent) == TPS80032) &&
>                          (tps80031_get_pmu_version(parent) == 0x0))) &&
>                          ((nvsel == 0x0) || (nvsel >= 0x19 && nvsel <= 0x1F))) {
>                                  dev_err(ri->dev,
>                                          "Invalid sel %d in track mode LDO2\n",
>                                          nvsel);
>                                  return -EINVAL;
>                  }
>          }
>
> However, list_voltage() still show these invalid selectors have supported voltage.
> Besides, having the code "nvsel = (sel) & 0x1F" looks a bit odd, because currently
> n_voltages is set to 57 when TRACK_MODE_ENABLE is set.
>
> I'm wondering if below comment is still true for LDO2 TRACK_MODE_ENABLE of
> "TPS80031/TPS80032-ES1.0"?
>
> /* TRACK mode the ldo2 varies from 600mV to 1300mV */
>
> What is the register value && voltage mapping for LDO2 TRACK_MODE_ENABLE of
> TPS80031 or TPS80032-ES1.0?

Hi Axel,

Following the excerpt of the mail got from TI on this issue:

There is a bug on LDO2 tracking on TPS80031 and TPS80032 ES1.0 but you 
should be able to have the functionality working.

Issue description:
- LDO2 traking mode is enabled
- LDO2 tracks SMPS2 voltage.
- LDO2 automatically switch-off when LDO2_CFG_VOLTAGE is changed to some 
discrete values (non exhaustive list):
             00011001, 00011010, 00011011, 00011100, .
- LDO2 switch-on again when LDO2_CFG_VOLTAGE is changed to other values 
(non exhaustive list):
         00011000, 00010111, .

LDOs have reserved codes. For these codes, LDO is switch-off.

In tracking, LDO2 ref comes from SMPS2.
However LDO2 enable is still gated by LDO2 VSEL decoding.
As a result, in tracking mode LDO2 will be disabled for following code 
(SMPS VSEL format):
000000 & 100000 (MSB not decoded)
011001 & 111001 (MSB not decoded)
011010 & 111010 (MSB not decoded)
011100 & 111100 (MSB not decoded)
011101 & 111101 (MSB not decoded)
011110 & 111110 (MSB not decoded)





Therefore, we made this voltage to be invalid on above case.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-04-17  6:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-17  3:24 regulator: tps80031: question about LDO2 TRACK_MODE_ENABLE of TPS80031 or TPS80032-ES1.0 Axel Lin
2013-04-17  6:44 ` Laxman Dewangan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).