diff mbox

[2/2] regulator: pfuze100: update voltage setting for pfuze3000 sw1a

Message ID 1521269828-8874-2-git-send-email-Anson.Huang@nxp.com (mailing list archive)
State New, archived
Headers show

Commit Message

Anson Huang March 17, 2018, 6:57 a.m. UTC
Latest pfuze3000 datasheet from:

http://cache.freescale.com/files/analog/doc/data_sheet/PF3000.pdf?fsrch=1&sr=1&pageNum=1

updates sw1a's voltage range, the settings for 1.450V and 1.475V
are replaced with 1.8V and 3.3V:

5b'11110 1.450 (SW1B), 1.8 (SW1A/SW1AB)
5b'11111 1.475 (SW1B), 3.3 (SW1A/SW1AB)

the voltage calculation using steps is NOT available for sw1a now,
use voltage table instead.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Signed-off-by: Robin Gong <yibin.gong@nxp.com>
---
 drivers/regulator/pfuze100-regulator.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

Comments

Stefan Wahren March 17, 2018, 12:35 p.m. UTC | #1
Hi Anson,

> Anson Huang <Anson.Huang@nxp.com> hat am 17. März 2018 um 07:57 geschrieben:
> 
> 
> Latest pfuze3000 datasheet from:
> 
> http://cache.freescale.com/files/analog/doc/data_sheet/PF3000.pdf?fsrch=1&sr=1&pageNum=1

this link goes to Rev. 7.0, 9/2016, which isn't the latest one.

I guess Rev. 9.0, 8/2017 is the latest.

Regards
Stefan

> 
> updates sw1a's voltage range, the settings for 1.450V and 1.475V
> are replaced with 1.8V and 3.3V:
> 
> 5b'11110 1.450 (SW1B), 1.8 (SW1A/SW1AB)
> 5b'11111 1.475 (SW1B), 3.3 (SW1A/SW1AB)
> 
> the voltage calculation using steps is NOT available for sw1a now,
> use voltage table instead.
> 
> Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
> Signed-off-by: Robin Gong <yibin.gong@nxp.com>
> ---
>  drivers/regulator/pfuze100-regulator.c | 9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/regulator/pfuze100-regulator.c b/drivers/regulator/pfuze100-regulator.c
> index 63922a2..680f076 100644
> --- a/drivers/regulator/pfuze100-regulator.c
> +++ b/drivers/regulator/pfuze100-regulator.c
> @@ -86,6 +86,13 @@ static const int pfuze100_coin[] = {
>  	2500000, 2700000, 2800000, 2900000, 3000000, 3100000, 3200000, 3300000,
>  };
>  
> +static const int pfuze3000_sw1a[] = {
> +	700000, 725000, 750000, 775000, 800000, 825000, 850000, 875000,
> +	900000, 925000, 950000, 975000, 1000000, 1025000, 1050000, 1075000,
> +	1100000, 1125000, 1150000, 1175000, 1200000, 1225000, 1250000, 1275000,
> +	1300000, 1325000, 1350000, 1375000, 1400000, 1425000, 1800000, 3300000,
> +};
> +
>  static const int pfuze3000_sw2lo[] = {
>  	1500000, 1550000, 1600000, 1650000, 1700000, 1750000, 1800000, 1850000,
>  };
> @@ -343,7 +350,7 @@ static struct pfuze_regulator pfuze200_regulators[] = {
>  };
>  
>  static struct pfuze_regulator pfuze3000_regulators[] = {
> -	PFUZE100_SW_REG(PFUZE3000, SW1A, PFUZE100_SW1ABVOL, 700000, 1475000, 25000),
> +	PFUZE100_SWB_REG(PFUZE3000, SW1A, PFUZE100_SW1ABVOL, 0x1f, pfuze3000_sw1a),
>  	PFUZE100_SW_REG(PFUZE3000, SW1B, PFUZE100_SW1CVOL, 700000, 1475000, 25000),
>  	PFUZE100_SWB_REG(PFUZE3000, SW2, PFUZE100_SW2VOL, 0x7, pfuze3000_sw2lo),
>  	PFUZE3000_SW3_REG(PFUZE3000, SW3, PFUZE100_SW3AVOL, 900000, 1650000, 50000),
> -- 
> 2.7.4
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Fabio Estevam March 17, 2018, 6:27 p.m. UTC | #2
Hi Stefan,

On Sat, Mar 17, 2018 at 9:35 AM, Stefan Wahren <stefan.wahren@i2se.com> wrote:
> Hi Anson,
>
>> Anson Huang <Anson.Huang@nxp.com> hat am 17. März 2018 um 07:57 geschrieben:
>>
>>
>> Latest pfuze3000 datasheet from:
>>
>> http://cache.freescale.com/files/analog/doc/data_sheet/PF3000.pdf?fsrch=1&sr=1&pageNum=1
>
> this link goes to Rev. 7.0, 9/2016, which isn't the latest one.
>
> I guess Rev. 9.0, 8/2017 is the latest.

You are right. This is the link to the latest datasheet:
https://www.nxp.com/docs/en/data-sheet/PF3000.pdf
Anson Huang March 18, 2018, 2:25 a.m. UTC | #3
Anson Huang
Best Regards!


> -----Original Message-----

> From: Fabio Estevam [mailto:festevam@gmail.com]

> Sent: Sunday, March 18, 2018 2:27 AM

> To: Stefan Wahren <stefan.wahren@i2se.com>

> Cc: Rob Herring <robh+dt@kernel.org>; Fabio Estevam

> <fabio.estevam@nxp.com>; Mark Rutland <mark.rutland@arm.com>; Robin

> Gong <yibin.gong@nxp.com>; Russell King - ARM Linux

> <linux@armlinux.org.uk>; Anson Huang <anson.huang@nxp.com>; Liam

> Girdwood <lgirdwood@gmail.com>; Shawn Guo <shawnguo@kernel.org>;

> Sascha Hauer <kernel@pengutronix.de>; Mark Brown <broonie@kernel.org>;

> open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS

> <devicetree@vger.kernel.org>; dl-linux-imx <linux-imx@nxp.com>; moderated

> list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE

> <linux-arm-kernel@lists.infradead.org>; linux-kernel

> <linux-kernel@vger.kernel.org>

> Subject: Re: [PATCH 2/2] regulator: pfuze100: update voltage setting for

> pfuze3000 sw1a

> 

> Hi Stefan,

> 

> On Sat, Mar 17, 2018 at 9:35 AM, Stefan Wahren <stefan.wahren@i2se.com>

> wrote:

> > Hi Anson,

> >

> >> Anson Huang <Anson.Huang@nxp.com> hat am 17. März 2018 um 07:57

> geschrieben:

> >>

> >>

> >> Latest pfuze3000 datasheet from:

> >>

> >>

> https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fcache.fr

> eescale.com%2Ffiles%2Fanalog%2Fdoc%2Fdata_sheet%2FPF3000.pdf%3Ffsrch

> %3D1%26sr%3D1%26pageNum%3D1&data=02%7C01%7CAnson.Huang%40nxp

> .com%7Cf6e1374a196741efe49b08d58c34bbab%7C686ea1d3bc2b4c6fa92cd99

> c5c301635%7C0%7C1%7C636569080479216580&sdata=DZQFb2hHbYqXjduHC0

> 1z%2FiAT4xvztN4Gy85S89mULwo%3D&reserved=0

> >

> > this link goes to Rev. 7.0, 9/2016, which isn't the latest one.

> >

> > I guess Rev. 9.0, 8/2017 is the latest.

> 

> You are right. This is the link to the latest datasheet:

> https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.n

> xp.com%2Fdocs%2Fen%2Fdata-sheet%2FPF3000.pdf&data=02%7C01%7CAnson

> .Huang%40nxp.com%7Cf6e1374a196741efe49b08d58c34bbab%7C686ea1d3bc

> 2b4c6fa92cd99c5c301635%7C0%7C1%7C636569080479216580&sdata=WIQYD

> 7WDn0%2FTl4BzM7oJdSuwK31Z64TfekeBAkou9XQ%3D&reserved=0


Yes, thank you for the reminder, I will update the commit message and the link in V2.
 
Anson.
diff mbox

Patch

diff --git a/drivers/regulator/pfuze100-regulator.c b/drivers/regulator/pfuze100-regulator.c
index 63922a2..680f076 100644
--- a/drivers/regulator/pfuze100-regulator.c
+++ b/drivers/regulator/pfuze100-regulator.c
@@ -86,6 +86,13 @@  static const int pfuze100_coin[] = {
 	2500000, 2700000, 2800000, 2900000, 3000000, 3100000, 3200000, 3300000,
 };
 
+static const int pfuze3000_sw1a[] = {
+	700000, 725000, 750000, 775000, 800000, 825000, 850000, 875000,
+	900000, 925000, 950000, 975000, 1000000, 1025000, 1050000, 1075000,
+	1100000, 1125000, 1150000, 1175000, 1200000, 1225000, 1250000, 1275000,
+	1300000, 1325000, 1350000, 1375000, 1400000, 1425000, 1800000, 3300000,
+};
+
 static const int pfuze3000_sw2lo[] = {
 	1500000, 1550000, 1600000, 1650000, 1700000, 1750000, 1800000, 1850000,
 };
@@ -343,7 +350,7 @@  static struct pfuze_regulator pfuze200_regulators[] = {
 };
 
 static struct pfuze_regulator pfuze3000_regulators[] = {
-	PFUZE100_SW_REG(PFUZE3000, SW1A, PFUZE100_SW1ABVOL, 700000, 1475000, 25000),
+	PFUZE100_SWB_REG(PFUZE3000, SW1A, PFUZE100_SW1ABVOL, 0x1f, pfuze3000_sw1a),
 	PFUZE100_SW_REG(PFUZE3000, SW1B, PFUZE100_SW1CVOL, 700000, 1475000, 25000),
 	PFUZE100_SWB_REG(PFUZE3000, SW2, PFUZE100_SW2VOL, 0x7, pfuze3000_sw2lo),
 	PFUZE3000_SW3_REG(PFUZE3000, SW3, PFUZE100_SW3AVOL, 900000, 1650000, 50000),