diff mbox

[U-Boot] arm: imx6: novena, gw_ventana: Fix use of pfuze100 bit definitions

Message ID 1448543330-5975-1-git-send-email-marex@denx.de
State Awaiting Upstream
Headers show

Commit Message

Marek Vasut Nov. 26, 2015, 1:08 p.m. UTC
The following patch changed the PFUZE100 swbst register bit definitions
and broke PMIC configuration on multiple boards, at least on the novena
and gw_ventana. This patch fixes it.

commit 8fa46350a4c7dca7710362f6c871098557b934ad
Author: Peng Fan <Peng.Fan@freescale.com>
Date:   Fri Aug 7 16:43:45 2015 +0800

    power: regulator: add pfuze100 support

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Peng Fan <Peng.Fan@freescale.com>
Cc: Przemyslaw Marczak <p.marczak@samsung.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Tim Harvey <tharvey@gateworks.com>
Cc: Vagrant Cascadian <vagrant@aikidev.net>
---
 board/gateworks/gw_ventana/common.c | 2 +-
 board/kosagi/novena/novena.c        | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comments

Przemyslaw Marczak Nov. 26, 2015, 4:18 p.m. UTC | #1
Hello Marek,

On 11/26/2015 02:08 PM, Marek Vasut wrote:
> The following patch changed the PFUZE100 swbst register bit definitions
> and broke PMIC configuration on multiple boards, at least on the novena
> and gw_ventana. This patch fixes it.
>
> commit 8fa46350a4c7dca7710362f6c871098557b934ad
> Author: Peng Fan <Peng.Fan@freescale.com>
> Date:   Fri Aug 7 16:43:45 2015 +0800
>
>      power: regulator: add pfuze100 support
>
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Fabio Estevam <fabio.estevam@freescale.com>
> Cc: Peng Fan <Peng.Fan@freescale.com>
> Cc: Przemyslaw Marczak <p.marczak@samsung.com>
> Cc: Stefano Babic <sbabic@denx.de>
> Cc: Tim Harvey <tharvey@gateworks.com>
> Cc: Vagrant Cascadian <vagrant@aikidev.net>
> ---
>   board/gateworks/gw_ventana/common.c | 2 +-
>   board/kosagi/novena/novena.c        | 2 +-
>   2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/board/gateworks/gw_ventana/common.c b/board/gateworks/gw_ventana/common.c
> index d406c83..a20190e 100644
> --- a/board/gateworks/gw_ventana/common.c
> +++ b/board/gateworks/gw_ventana/common.c
> @@ -806,7 +806,7 @@ void setup_pmic(void)
>   			/* Set SWBST to 5.0V and enable */
>   			pmic_reg_read(p, PFUZE100_SWBSTCON1, &reg);
>   			reg &= ~(SWBST_MODE_MASK | SWBST_VOL_MASK);
> -			reg |= (SWBST_5_00V | SWBST_MODE_AUTO);
> +			reg |= (SWBST_5_00V | (SWBST_MODE_AUTO << SWBST_MODE_SHIFT));
>   			pmic_reg_write(p, PFUZE100_SWBSTCON1, reg);
>   		}
>   	}
> diff --git a/board/kosagi/novena/novena.c b/board/kosagi/novena/novena.c
> index babba85..b3159d3 100644
> --- a/board/kosagi/novena/novena.c
> +++ b/board/kosagi/novena/novena.c
> @@ -216,7 +216,7 @@ int power_init_board(void)
>   	/* Set SWBST to 5.0V and enable (for USB) */
>   	pmic_reg_read(p, PFUZE100_SWBSTCON1, &reg);
>   	reg &= ~(SWBST_MODE_MASK | SWBST_VOL_MASK);
> -	reg |= (SWBST_5_00V | SWBST_MODE_AUTO);
> +	reg |= (SWBST_5_00V | (SWBST_MODE_AUTO << SWBST_MODE_SHIFT));
>   	pmic_reg_write(p, PFUZE100_SWBSTCON1, reg);
>
>   	return 0;
>

Thanks for fixing :)

Reviewed-by: Przemyslaw Marczak <p.marczak@samsung.com>

Best regards,
Vagrant Cascadian Nov. 27, 2015, 8:18 p.m. UTC | #2
On 2015-11-26, Marek Vasut wrote:
> The following patch changed the PFUZE100 swbst register bit definitions
> and broke PMIC configuration on multiple boards, at least on the novena
> and gw_ventana. This patch fixes it.

Works on novena.

Tested-by: Vagrant Cascadian <vagrant@aikidev.net>

live well,
  vagrant

> commit 8fa46350a4c7dca7710362f6c871098557b934ad
> Author: Peng Fan <Peng.Fan@freescale.com>
> Date:   Fri Aug 7 16:43:45 2015 +0800
>
>     power: regulator: add pfuze100 support
>
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Fabio Estevam <fabio.estevam@freescale.com>
> Cc: Peng Fan <Peng.Fan@freescale.com>
> Cc: Przemyslaw Marczak <p.marczak@samsung.com>
> Cc: Stefano Babic <sbabic@denx.de>
> Cc: Tim Harvey <tharvey@gateworks.com>
> Cc: Vagrant Cascadian <vagrant@aikidev.net>
> ---
>  board/gateworks/gw_ventana/common.c | 2 +-
>  board/kosagi/novena/novena.c        | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/board/gateworks/gw_ventana/common.c b/board/gateworks/gw_ventana/common.c
> index d406c83..a20190e 100644
> --- a/board/gateworks/gw_ventana/common.c
> +++ b/board/gateworks/gw_ventana/common.c
> @@ -806,7 +806,7 @@ void setup_pmic(void)
>  			/* Set SWBST to 5.0V and enable */
>  			pmic_reg_read(p, PFUZE100_SWBSTCON1, &reg);
>  			reg &= ~(SWBST_MODE_MASK | SWBST_VOL_MASK);
> -			reg |= (SWBST_5_00V | SWBST_MODE_AUTO);
> +			reg |= (SWBST_5_00V | (SWBST_MODE_AUTO << SWBST_MODE_SHIFT));
>  			pmic_reg_write(p, PFUZE100_SWBSTCON1, reg);
>  		}
>  	}
> diff --git a/board/kosagi/novena/novena.c b/board/kosagi/novena/novena.c
> index babba85..b3159d3 100644
> --- a/board/kosagi/novena/novena.c
> +++ b/board/kosagi/novena/novena.c
> @@ -216,7 +216,7 @@ int power_init_board(void)
>  	/* Set SWBST to 5.0V and enable (for USB) */
>  	pmic_reg_read(p, PFUZE100_SWBSTCON1, &reg);
>  	reg &= ~(SWBST_MODE_MASK | SWBST_VOL_MASK);
> -	reg |= (SWBST_5_00V | SWBST_MODE_AUTO);
> +	reg |= (SWBST_5_00V | (SWBST_MODE_AUTO << SWBST_MODE_SHIFT));
>  	pmic_reg_write(p, PFUZE100_SWBSTCON1, reg);
>  
>  	return 0;
> -- 
> 2.1.4
Peng Fan Nov. 28, 2015, 2:47 a.m. UTC | #3
On Thu, Nov 26, 2015 at 02:08:50PM +0100, Marek Vasut wrote:
>The following patch changed the PFUZE100 swbst register bit definitions
>and broke PMIC configuration on multiple boards, at least on the novena
>and gw_ventana. This patch fixes it.
>
>commit 8fa46350a4c7dca7710362f6c871098557b934ad
>Author: Peng Fan <Peng.Fan@freescale.com>
>Date:   Fri Aug 7 16:43:45 2015 +0800
>
>    power: regulator: add pfuze100 support
>
>Signed-off-by: Marek Vasut <marex@denx.de>
>Cc: Fabio Estevam <fabio.estevam@freescale.com>
>Cc: Peng Fan <Peng.Fan@freescale.com>
>Cc: Przemyslaw Marczak <p.marczak@samsung.com>
>Cc: Stefano Babic <sbabic@denx.de>
>Cc: Tim Harvey <tharvey@gateworks.com>
>Cc: Vagrant Cascadian <vagrant@aikidev.net>
>---
> board/gateworks/gw_ventana/common.c | 2 +-
> board/kosagi/novena/novena.c        | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
>diff --git a/board/gateworks/gw_ventana/common.c b/board/gateworks/gw_ventana/common.c
>index d406c83..a20190e 100644
>--- a/board/gateworks/gw_ventana/common.c
>+++ b/board/gateworks/gw_ventana/common.c
>@@ -806,7 +806,7 @@ void setup_pmic(void)
> 			/* Set SWBST to 5.0V and enable */
> 			pmic_reg_read(p, PFUZE100_SWBSTCON1, &reg);
> 			reg &= ~(SWBST_MODE_MASK | SWBST_VOL_MASK);
>-			reg |= (SWBST_5_00V | SWBST_MODE_AUTO);
>+			reg |= (SWBST_5_00V | (SWBST_MODE_AUTO << SWBST_MODE_SHIFT));
> 			pmic_reg_write(p, PFUZE100_SWBSTCON1, reg);
> 		}
> 	}
>diff --git a/board/kosagi/novena/novena.c b/board/kosagi/novena/novena.c
>index babba85..b3159d3 100644
>--- a/board/kosagi/novena/novena.c
>+++ b/board/kosagi/novena/novena.c
>@@ -216,7 +216,7 @@ int power_init_board(void)
> 	/* Set SWBST to 5.0V and enable (for USB) */
> 	pmic_reg_read(p, PFUZE100_SWBSTCON1, &reg);
> 	reg &= ~(SWBST_MODE_MASK | SWBST_VOL_MASK);
>-	reg |= (SWBST_5_00V | SWBST_MODE_AUTO);
>+	reg |= (SWBST_5_00V | (SWBST_MODE_AUTO << SWBST_MODE_SHIFT));
> 	pmic_reg_write(p, PFUZE100_SWBSTCON1, reg);
> 
> 	return 0;

Reviewed-by: Peng Fan <Peng.Fan@freescale.com>

>-- 
>2.1.4
>
Przemyslaw Marczak Nov. 30, 2015, 9:53 a.m. UTC | #4
Hello Stefano,

On 11/26/2015 02:08 PM, Marek Vasut wrote:
> The following patch changed the PFUZE100 swbst register bit definitions
> and broke PMIC configuration on multiple boards, at least on the novena
> and gw_ventana. This patch fixes it.
>
> commit 8fa46350a4c7dca7710362f6c871098557b934ad
> Author: Peng Fan <Peng.Fan@freescale.com>
> Date:   Fri Aug 7 16:43:45 2015 +0800
>
>      power: regulator: add pfuze100 support
>
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Fabio Estevam <fabio.estevam@freescale.com>
> Cc: Peng Fan <Peng.Fan@freescale.com>
> Cc: Przemyslaw Marczak <p.marczak@samsung.com>
> Cc: Stefano Babic <sbabic@denx.de>
> Cc: Tim Harvey <tharvey@gateworks.com>
> Cc: Vagrant Cascadian <vagrant@aikidev.net>
> ---
>   board/gateworks/gw_ventana/common.c | 2 +-
>   board/kosagi/novena/novena.c        | 2 +-
>   2 files changed, 2 insertions(+), 2 deletions(-)

Will you pick-up this patch, or should it go through PMIC tree?

Best regards,
Stefano Babic Nov. 30, 2015, 10 a.m. UTC | #5
On 30/11/2015 10:53, Przemyslaw Marczak wrote:
> Hello Stefano,
> 
> On 11/26/2015 02:08 PM, Marek Vasut wrote:
>> The following patch changed the PFUZE100 swbst register bit definitions
>> and broke PMIC configuration on multiple boards, at least on the novena
>> and gw_ventana. This patch fixes it.
>>
>> commit 8fa46350a4c7dca7710362f6c871098557b934ad
>> Author: Peng Fan <Peng.Fan@freescale.com>
>> Date:   Fri Aug 7 16:43:45 2015 +0800
>>
>>      power: regulator: add pfuze100 support
>>
>> Signed-off-by: Marek Vasut <marex@denx.de>
>> Cc: Fabio Estevam <fabio.estevam@freescale.com>
>> Cc: Peng Fan <Peng.Fan@freescale.com>
>> Cc: Przemyslaw Marczak <p.marczak@samsung.com>
>> Cc: Stefano Babic <sbabic@denx.de>
>> Cc: Tim Harvey <tharvey@gateworks.com>
>> Cc: Vagrant Cascadian <vagrant@aikidev.net>
>> ---
>>   board/gateworks/gw_ventana/common.c | 2 +-
>>   board/kosagi/novena/novena.c        | 2 +-
>>   2 files changed, 2 insertions(+), 2 deletions(-)
> 
> Will you pick-up this patch, or should it go through PMIC tree?

They are i.MXes, I pick them up.

Best regards,
Stefano
Przemyslaw Marczak Nov. 30, 2015, 10:13 a.m. UTC | #6
On 11/30/2015 11:00 AM, Stefano Babic wrote:
> On 30/11/2015 10:53, Przemyslaw Marczak wrote:
>> Hello Stefano,
>>
>> On 11/26/2015 02:08 PM, Marek Vasut wrote:
>>> The following patch changed the PFUZE100 swbst register bit definitions
>>> and broke PMIC configuration on multiple boards, at least on the novena
>>> and gw_ventana. This patch fixes it.
>>>
>>> commit 8fa46350a4c7dca7710362f6c871098557b934ad
>>> Author: Peng Fan <Peng.Fan@freescale.com>
>>> Date:   Fri Aug 7 16:43:45 2015 +0800
>>>
>>>       power: regulator: add pfuze100 support
>>>
>>> Signed-off-by: Marek Vasut <marex@denx.de>
>>> Cc: Fabio Estevam <fabio.estevam@freescale.com>
>>> Cc: Peng Fan <Peng.Fan@freescale.com>
>>> Cc: Przemyslaw Marczak <p.marczak@samsung.com>
>>> Cc: Stefano Babic <sbabic@denx.de>
>>> Cc: Tim Harvey <tharvey@gateworks.com>
>>> Cc: Vagrant Cascadian <vagrant@aikidev.net>
>>> ---
>>>    board/gateworks/gw_ventana/common.c | 2 +-
>>>    board/kosagi/novena/novena.c        | 2 +-
>>>    2 files changed, 2 insertions(+), 2 deletions(-)
>>
>> Will you pick-up this patch, or should it go through PMIC tree?
>
> They are i.MXes, I pick them up.
>
> Best regards,
> Stefano
>
>

Ok, thank you.

Best regards,
Tim Harvey Nov. 30, 2015, 4:32 p.m. UTC | #7
On Thu, Nov 26, 2015 at 5:08 AM, Marek Vasut <marex@denx.de> wrote:
> The following patch changed the PFUZE100 swbst register bit definitions
> and broke PMIC configuration on multiple boards, at least on the novena
> and gw_ventana. This patch fixes it.
>
> commit 8fa46350a4c7dca7710362f6c871098557b934ad
> Author: Peng Fan <Peng.Fan@freescale.com>
> Date:   Fri Aug 7 16:43:45 2015 +0800
>
>     power: regulator: add pfuze100 support
>
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Fabio Estevam <fabio.estevam@freescale.com>
> Cc: Peng Fan <Peng.Fan@freescale.com>
> Cc: Przemyslaw Marczak <p.marczak@samsung.com>
> Cc: Stefano Babic <sbabic@denx.de>
> Cc: Tim Harvey <tharvey@gateworks.com>
> Cc: Vagrant Cascadian <vagrant@aikidev.net>
> ---
>  board/gateworks/gw_ventana/common.c | 2 +-
>  board/kosagi/novena/novena.c        | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/board/gateworks/gw_ventana/common.c b/board/gateworks/gw_ventana/common.c
> index d406c83..a20190e 100644
> --- a/board/gateworks/gw_ventana/common.c
> +++ b/board/gateworks/gw_ventana/common.c
> @@ -806,7 +806,7 @@ void setup_pmic(void)
>                         /* Set SWBST to 5.0V and enable */
>                         pmic_reg_read(p, PFUZE100_SWBSTCON1, &reg);
>                         reg &= ~(SWBST_MODE_MASK | SWBST_VOL_MASK);
> -                       reg |= (SWBST_5_00V | SWBST_MODE_AUTO);
> +                       reg |= (SWBST_5_00V | (SWBST_MODE_AUTO << SWBST_MODE_SHIFT));
>                         pmic_reg_write(p, PFUZE100_SWBSTCON1, reg);
>                 }
>         }
> diff --git a/board/kosagi/novena/novena.c b/board/kosagi/novena/novena.c
> index babba85..b3159d3 100644
> --- a/board/kosagi/novena/novena.c
> +++ b/board/kosagi/novena/novena.c
> @@ -216,7 +216,7 @@ int power_init_board(void)
>         /* Set SWBST to 5.0V and enable (for USB) */
>         pmic_reg_read(p, PFUZE100_SWBSTCON1, &reg);
>         reg &= ~(SWBST_MODE_MASK | SWBST_VOL_MASK);
> -       reg |= (SWBST_5_00V | SWBST_MODE_AUTO);
> +       reg |= (SWBST_5_00V | (SWBST_MODE_AUTO << SWBST_MODE_SHIFT));
>         pmic_reg_write(p, PFUZE100_SWBSTCON1, reg);
>
>         return 0;
> --
> 2.1.4
>

Acked-by: Tim Harvey <tharvey@gateworks.com>

Thanks Marek!

Tim
Stefano Babic Dec. 1, 2015, 3:10 p.m. UTC | #8
On 26/11/2015 14:08, Marek Vasut wrote:
> The following patch changed the PFUZE100 swbst register bit definitions
> and broke PMIC configuration on multiple boards, at least on the novena
> and gw_ventana. This patch fixes it.
> 
> commit 8fa46350a4c7dca7710362f6c871098557b934ad
> Author: Peng Fan <Peng.Fan@freescale.com>
> Date:   Fri Aug 7 16:43:45 2015 +0800
> 
>     power: regulator: add pfuze100 support
> 
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Fabio Estevam <fabio.estevam@freescale.com>
> Cc: Peng Fan <Peng.Fan@freescale.com>
> Cc: Przemyslaw Marczak <p.marczak@samsung.com>
> Cc: Stefano Babic <sbabic@denx.de>
> Cc: Tim Harvey <tharvey@gateworks.com>
> Cc: Vagrant Cascadian <vagrant@aikidev.net>
> ---


Applied to u-boot-imx, thanks!

Best regards,
Stefano Babic
diff mbox

Patch

diff --git a/board/gateworks/gw_ventana/common.c b/board/gateworks/gw_ventana/common.c
index d406c83..a20190e 100644
--- a/board/gateworks/gw_ventana/common.c
+++ b/board/gateworks/gw_ventana/common.c
@@ -806,7 +806,7 @@  void setup_pmic(void)
 			/* Set SWBST to 5.0V and enable */
 			pmic_reg_read(p, PFUZE100_SWBSTCON1, &reg);
 			reg &= ~(SWBST_MODE_MASK | SWBST_VOL_MASK);
-			reg |= (SWBST_5_00V | SWBST_MODE_AUTO);
+			reg |= (SWBST_5_00V | (SWBST_MODE_AUTO << SWBST_MODE_SHIFT));
 			pmic_reg_write(p, PFUZE100_SWBSTCON1, reg);
 		}
 	}
diff --git a/board/kosagi/novena/novena.c b/board/kosagi/novena/novena.c
index babba85..b3159d3 100644
--- a/board/kosagi/novena/novena.c
+++ b/board/kosagi/novena/novena.c
@@ -216,7 +216,7 @@  int power_init_board(void)
 	/* Set SWBST to 5.0V and enable (for USB) */
 	pmic_reg_read(p, PFUZE100_SWBSTCON1, &reg);
 	reg &= ~(SWBST_MODE_MASK | SWBST_VOL_MASK);
-	reg |= (SWBST_5_00V | SWBST_MODE_AUTO);
+	reg |= (SWBST_5_00V | (SWBST_MODE_AUTO << SWBST_MODE_SHIFT));
 	pmic_reg_write(p, PFUZE100_SWBSTCON1, reg);
 
 	return 0;