lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 26 Jun 2019 12:07:19 -0500
From:   Dan Murphy <dmurphy@...com>
To:     Axel Lin <axel.lin@...ics.com>
CC:     Mark Brown <broonie@...nel.org>,
        Liam Girdwood <lgirdwood@...il.com>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [RFT][PATCH 2/2] regulator: lm363x: Fix n_voltages setting for
 lm36274

Axel

On 6/26/19 10:20 AM, Axel Lin wrote:
> Dan Murphy <dmurphy@...com> 於 2019年6月26日 週三 下午11:07寫道:
>> Hello
>>
>> On 6/26/19 8:26 AM, Axel Lin wrote:
>>> According to the datasheet http://www.ti.com/lit/ds/symlink/lm36274.pdf:
>>> Table 23. VPOS Bias Register Field Descriptions VPOS[5:0]:
>>> VPOS voltage (50-mV steps): VPOS = 4 V + (Code × 50 mV), 6.5 V max
>>> 000000 = 4 V
>>> 000001 = 4.05 V
>>> :
>>> 011110 = 5.5 V (Default)
>>> :
>>> 110010 = 6.5 V
>>> 110011 to 111111 map to 6.5 V
>>>
>>> So the LM36274_LDO_VSEL_MAX should be 0b110010 (0x32).
>>> The valid selectors are 0 ... LM36274_LDO_VSEL_MAX, n_voltages should be
>>> LM36274_LDO_VSEL_MAX + 1. Similarly, the n_voltages should be
>>> LM36274_BOOST_VSEL_MAX + 1 for LM36274_BOOST.
>>>
>>> Fixes: bff5e8071533 ("regulator: lm363x: Add support for LM36274")
>>> Signed-off-by: Axel Li
>>>
>>> 6.5 V
>>> DISPLAY BIAS POSITIVE OUTPUT (VPOS)
>>> Programmable output voltage
>>> range
>>>
>>>
>>> n <axel.lin@...ics.com>
>>> ---
>>>    drivers/regulator/lm363x-regulator.c | 8 ++++----
>>>    1 file changed, 4 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/drivers/regulator/lm363x-regulator.c b/drivers/regulator/lm363x-regulator.c
>>> index e4a27d63bf90..4b9f618b07e9 100644
>>> --- a/drivers/regulator/lm363x-regulator.c
>>> +++ b/drivers/regulator/lm363x-regulator.c
>>> @@ -36,7 +36,7 @@
>>>
>>>    /* LM36274 */
>>>    #define LM36274_BOOST_VSEL_MAX              0x3f
>>> -#define LM36274_LDO_VSEL_MAX         0x34
>>> +#define LM36274_LDO_VSEL_MAX         0x32
>>>
>>> 6.5 V
>>> DISPLAY BIAS POSITIVE OUTPUT (VPOS)
>>> Programmable output voltage
>>> range
>>>
>>>
>> This does not seem correct the max number of voltages are 0x34.
>>
>> The register is zero based so you can have 33 voltage select levels and
>> + 1 is 34 total selectors
>>
>> Liam/Mark correct me if I am incorrect.
>  From the datasheet, the maximum voltage 110010 = 6.5 V, the 0b110010 is 0x32.
> I know it is 0 based, so .n_voltages     = LM36274_LDO_VSEL_MAX + 1,
> (And that coding style is to match the original code.)
>
> With your current code where LM36274_LDO_VSEL_MAX and n_voltages is 0x34,
> the maximum voltage will become 400000 + 50000 * 0x34 = 6.6V which
> does not match the datasheet.

Not sure how you get 6.6v the LDO max is 6.5v.

After 0x32->0x7f maps to 6.5v

000000 = 4 V
000001 = 4.05 V
:
011110 = 5.5 V (Default)
:
110010 = 6.5 V

110011 to 111111 map to 6.5 V <- Should never see 6.6v from LDO

Page 7 of the Datasheet says range is 4v->6.5v

Dan

> Would you mind double check again?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ