public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] sunxi: axp209: fix incorrect limits on ldo3
@ 2015-03-25 16:03 Iain Paton
  2015-03-26 12:26 ` Hans de Goede
  0 siblings, 1 reply; 2+ messages in thread
From: Iain Paton @ 2015-03-25 16:03 UTC (permalink / raw)
  To: u-boot

board/sunxi/board.c tries to set ldo3 to 2.8v however drivers/power/axp209.c
contains an incorrect limit on ldo3 of 2.275v

The origin of the incorrect limit seems likely due to some inconsistencies
in the axp209 datasheet. ldo3 is described with different limits in 
different sections. register 0x29 uses 7 bits for voltage configuration
while the 2.275v limit would apply if only 6 bits were used.
Probably this is a cut&paste error from register 0x23

The linux kernel driver has the correct limit and operation up to the 2.8v
required by my board has been physically verified with a multimeter.

Signed-off-by: Iain Paton <ipaton0@gmail.com>
---
 drivers/power/axp209.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/power/axp209.c b/drivers/power/axp209.c
index 4565398..f8c9b77 100644
--- a/drivers/power/axp209.c
+++ b/drivers/power/axp209.c
@@ -119,7 +119,7 @@ int axp209_set_ldo3(int mvolt)
 	if (mvolt == -1)
 		cfg = 0x80;	/* determined by LDO3IN pin */
 	else
-		cfg = axp209_mvolt_to_cfg(mvolt, 700, 2275, 25);
+		cfg = axp209_mvolt_to_cfg(mvolt, 700, 3500, 25);
 
 	return axp209_write(AXP209_LDO3_VOLTAGE, cfg);
 }
-- 
2.1.3

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

* [U-Boot] [PATCH] sunxi: axp209: fix incorrect limits on ldo3
  2015-03-25 16:03 [U-Boot] [PATCH] sunxi: axp209: fix incorrect limits on ldo3 Iain Paton
@ 2015-03-26 12:26 ` Hans de Goede
  0 siblings, 0 replies; 2+ messages in thread
From: Hans de Goede @ 2015-03-26 12:26 UTC (permalink / raw)
  To: u-boot

Hi,

On 25-03-15 17:03, Iain Paton wrote:
> board/sunxi/board.c tries to set ldo3 to 2.8v however drivers/power/axp209.c
> contains an incorrect limit on ldo3 of 2.275v
>
> The origin of the incorrect limit seems likely due to some inconsistencies
> in the axp209 datasheet. ldo3 is described with different limits in
> different sections. register 0x29 uses 7 bits for voltage configuration
> while the 2.275v limit would apply if only 6 bits were used.
> Probably this is a cut&paste error from register 0x23
>
> The linux kernel driver has the correct limit and operation up to the 2.8v
> required by my board has been physically verified with a multimeter.
>
> Signed-off-by: Iain Paton <ipaton0@gmail.com>

Thanks, I've merged this into u-boot-sunxi/master and added this
in a small fixed pull-req which I've just send.

Regards,

Hans

> ---
>   drivers/power/axp209.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/power/axp209.c b/drivers/power/axp209.c
> index 4565398..f8c9b77 100644
> --- a/drivers/power/axp209.c
> +++ b/drivers/power/axp209.c
> @@ -119,7 +119,7 @@ int axp209_set_ldo3(int mvolt)
>   	if (mvolt == -1)
>   		cfg = 0x80;	/* determined by LDO3IN pin */
>   	else
> -		cfg = axp209_mvolt_to_cfg(mvolt, 700, 2275, 25);
> +		cfg = axp209_mvolt_to_cfg(mvolt, 700, 3500, 25);
>
>   	return axp209_write(AXP209_LDO3_VOLTAGE, cfg);
>   }
>

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

end of thread, other threads:[~2015-03-26 12:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-25 16:03 [U-Boot] [PATCH] sunxi: axp209: fix incorrect limits on ldo3 Iain Paton
2015-03-26 12:26 ` Hans de Goede

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox