public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [PATCH] power: mp5416: Fix LDO SVAL for MP5416 PMIC
@ 2023-09-24 22:30 ` Sidharth Prabukumar
  2023-10-31  5:04   ` Jaehoon Chung
  2024-10-10 21:34   ` Tom Rini
  0 siblings, 2 replies; 3+ messages in thread
From: Sidharth Prabukumar @ 2023-09-24 22:30 UTC (permalink / raw)
  To: u-boot; +Cc: Sidharth Prabukumar, Jaehoon Chung

The MP5416 PMIC's LDO set-value formula is incorrect. This patch fixes
it by using the correct formula.

Signed-off-by: Sidharth Prabukumar <sidharth.prabukumar@gmail.com>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
---
 include/power/mp5416.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/power/mp5416.h b/include/power/mp5416.h
index dc096fed3f..4326baaa42 100644
--- a/include/power/mp5416.h
+++ b/include/power/mp5416.h
@@ -32,7 +32,7 @@ enum {
 #define MP5416_VSET_SW3_GVAL(x) ((((x) & 0x7f) * 12500) + 600000)
 #define MP5416_VSET_SW4_GVAL(x) ((((x) & 0x7f) * 25000) + 800000)
 #define MP5416_VSET_LDO_GVAL(x) ((((x) & 0x7f) * 25000) + 800000)
-#define MP5416_VSET_LDO_SVAL(x) ((((x) & 0x7f) * 25000) + 800000)
+#define MP5416_VSET_LDO_SVAL(x) (((x) - 800000) / 25000)
 #define MP5416_VSET_SW1_SVAL(x) (((x) - 600000) / 12500)
 #define MP5416_VSET_SW2_SVAL(x) (((x) - 800000) / 25000)
 #define MP5416_VSET_SW3_SVAL(x) (((x) - 600000) / 12500)
-- 
2.34.1


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

* Re: [PATCH] power: mp5416: Fix LDO SVAL for MP5416 PMIC
  2023-09-24 22:30 ` [PATCH] power: mp5416: Fix LDO SVAL for MP5416 PMIC Sidharth Prabukumar
@ 2023-10-31  5:04   ` Jaehoon Chung
  2024-10-10 21:34   ` Tom Rini
  1 sibling, 0 replies; 3+ messages in thread
From: Jaehoon Chung @ 2023-10-31  5:04 UTC (permalink / raw)
  To: Sidharth Prabukumar, u-boot

On 9/25/23 07:30, Sidharth Prabukumar wrote:
> The MP5416 PMIC's LDO set-value formula is incorrect. This patch fixes
> it by using the correct formula.
> 
> Signed-off-by: Sidharth Prabukumar <sidharth.prabukumar@gmail.com>
> Cc: Jaehoon Chung <jh80.chung@samsung.com>

Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>

Best Regards,
Jaehoon Chung

> ---
>  include/power/mp5416.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/power/mp5416.h b/include/power/mp5416.h
> index dc096fed3f..4326baaa42 100644
> --- a/include/power/mp5416.h
> +++ b/include/power/mp5416.h
> @@ -32,7 +32,7 @@ enum {
>  #define MP5416_VSET_SW3_GVAL(x) ((((x) & 0x7f) * 12500) + 600000)
>  #define MP5416_VSET_SW4_GVAL(x) ((((x) & 0x7f) * 25000) + 800000)
>  #define MP5416_VSET_LDO_GVAL(x) ((((x) & 0x7f) * 25000) + 800000)
> -#define MP5416_VSET_LDO_SVAL(x) ((((x) & 0x7f) * 25000) + 800000)
> +#define MP5416_VSET_LDO_SVAL(x) (((x) - 800000) / 25000)
>  #define MP5416_VSET_SW1_SVAL(x) (((x) - 600000) / 12500)
>  #define MP5416_VSET_SW2_SVAL(x) (((x) - 800000) / 25000)
>  #define MP5416_VSET_SW3_SVAL(x) (((x) - 600000) / 12500)


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

* Re: [PATCH] power: mp5416: Fix LDO SVAL for MP5416 PMIC
  2023-09-24 22:30 ` [PATCH] power: mp5416: Fix LDO SVAL for MP5416 PMIC Sidharth Prabukumar
  2023-10-31  5:04   ` Jaehoon Chung
@ 2024-10-10 21:34   ` Tom Rini
  1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2024-10-10 21:34 UTC (permalink / raw)
  To: u-boot, Sidharth Prabukumar; +Cc: Jaehoon Chung

On Sun, 24 Sep 2023 18:30:22 -0400, Sidharth Prabukumar wrote:

> The MP5416 PMIC's LDO set-value formula is incorrect. This patch fixes
> it by using the correct formula.
> 
> 

Applied to u-boot/master, thanks!

-- 
Tom



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

end of thread, other threads:[~2024-10-10 21:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <CGME20231031050407epcas1p250bf5bb525b416e61ca4b9a2425a30b8@epcas1p2.samsung.com>
2023-09-24 22:30 ` [PATCH] power: mp5416: Fix LDO SVAL for MP5416 PMIC Sidharth Prabukumar
2023-10-31  5:04   ` Jaehoon Chung
2024-10-10 21:34   ` Tom Rini

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