RE: [PATCH 1/2] ARM: dts: pfuze3000: update sw1a/vldo4 voltage range

2018-03-18 Thread Anson Huang
Hi, Fabio

Anson Huang
Best Regards!


> -Original Message-
> From: Fabio Estevam [mailto:feste...@gmail.com]
> Sent: Sunday, March 18, 2018 8:55 PM
> To: Anson Huang <anson.hu...@nxp.com>
> Cc: Robin Gong <yibin.g...@nxp.com>; Shawn Guo <shawn...@kernel.org>;
> Sascha Hauer <ker...@pengutronix.de>; Fabio Estevam
> <fabio.este...@nxp.com>; Rob Herring <robh...@kernel.org>; Mark Rutland
> <mark.rutl...@arm.com>; Russell King - ARM Linux <li...@armlinux.org.uk>;
> Liam Girdwood <lgirdw...@gmail.com>; Mark Brown <broo...@kernel.org>;
> dl-linux-imx <linux-...@nxp.com>; moderated list:ARM/FREESCALE IMX / MXC
> ARM ARCHITECTURE <linux-arm-ker...@lists.infradead.org>; open list:OPEN
> FIRMWARE AND FLATTENED DEVICE TREE BINDINGS
> <devicet...@vger.kernel.org>; linux-kernel <linux-kernel@vger.kernel.org>
> Subject: Re: [PATCH 1/2] ARM: dts: pfuze3000: update sw1a/vldo4 voltage range
> 
> On Sat, Mar 17, 2018 at 11:23 PM, Anson Huang <anson.hu...@nxp.com>
> wrote:
> 
> > I thought the max value here means the capability of regulator itself, like 
> > the
> internal
> 
> No it is not.
> 
> Please check Documentation/devicetree/bindings/regulator/regulator.txt:
> 
> "- regulator-max-microvolt: largest voltage consumers may set"
 
OK, so I should change the max value of SW1A according to board design, such
as for MX7D, it is 1.075V for max cpu-freq's voltage, set it to 1.075 in dts?

Also, according to the binding doc, do you think the anatop's vdd_arm and 
vdd_soc/pu's max
value also need to be adjusted to match the value define in each soc's 
datasheet? 

Anson.



RE: [PATCH 1/2] ARM: dts: pfuze3000: update sw1a/vldo4 voltage range

2018-03-18 Thread Anson Huang
Hi, Fabio

Anson Huang
Best Regards!


> -Original Message-
> From: Fabio Estevam [mailto:feste...@gmail.com]
> Sent: Sunday, March 18, 2018 8:55 PM
> To: Anson Huang 
> Cc: Robin Gong ; Shawn Guo ;
> Sascha Hauer ; Fabio Estevam
> ; Rob Herring ; Mark Rutland
> ; Russell King - ARM Linux ;
> Liam Girdwood ; Mark Brown ;
> dl-linux-imx ; moderated list:ARM/FREESCALE IMX / MXC
> ARM ARCHITECTURE ; open list:OPEN
> FIRMWARE AND FLATTENED DEVICE TREE BINDINGS
> ; linux-kernel 
> Subject: Re: [PATCH 1/2] ARM: dts: pfuze3000: update sw1a/vldo4 voltage range
> 
> On Sat, Mar 17, 2018 at 11:23 PM, Anson Huang 
> wrote:
> 
> > I thought the max value here means the capability of regulator itself, like 
> > the
> internal
> 
> No it is not.
> 
> Please check Documentation/devicetree/bindings/regulator/regulator.txt:
> 
> "- regulator-max-microvolt: largest voltage consumers may set"
 
OK, so I should change the max value of SW1A according to board design, such
as for MX7D, it is 1.075V for max cpu-freq's voltage, set it to 1.075 in dts?

Also, according to the binding doc, do you think the anatop's vdd_arm and 
vdd_soc/pu's max
value also need to be adjusted to match the value define in each soc's 
datasheet? 

Anson.



Re: [PATCH 1/2] ARM: dts: pfuze3000: update sw1a/vldo4 voltage range

2018-03-18 Thread Fabio Estevam
On Sat, Mar 17, 2018 at 11:23 PM, Anson Huang  wrote:

> I thought the max value here means the capability of regulator itself, like 
> the internal

No it is not.

Please check Documentation/devicetree/bindings/regulator/regulator.txt:

"- regulator-max-microvolt: largest voltage consumers may set"


Re: [PATCH 1/2] ARM: dts: pfuze3000: update sw1a/vldo4 voltage range

2018-03-18 Thread Fabio Estevam
On Sat, Mar 17, 2018 at 11:23 PM, Anson Huang  wrote:

> I thought the max value here means the capability of regulator itself, like 
> the internal

No it is not.

Please check Documentation/devicetree/bindings/regulator/regulator.txt:

"- regulator-max-microvolt: largest voltage consumers may set"


RE: [PATCH 1/2] ARM: dts: pfuze3000: update sw1a/vldo4 voltage range

2018-03-17 Thread Anson Huang


Anson Huang
Best Regards!


> -Original Message-
> From: Fabio Estevam [mailto:feste...@gmail.com]
> Sent: Saturday, March 17, 2018 10:53 PM
> To: Anson Huang <anson.hu...@nxp.com>
> Cc: Robin Gong <yibin.g...@nxp.com>; Shawn Guo <shawn...@kernel.org>;
> Sascha Hauer <ker...@pengutronix.de>; Fabio Estevam
> <fabio.este...@nxp.com>; Rob Herring <robh...@kernel.org>; Mark Rutland
> <mark.rutl...@arm.com>; Russell King - ARM Linux <li...@armlinux.org.uk>;
> Liam Girdwood <lgirdw...@gmail.com>; Mark Brown <broo...@kernel.org>;
> dl-linux-imx <linux-...@nxp.com>; moderated list:ARM/FREESCALE IMX / MXC
> ARM ARCHITECTURE <linux-arm-ker...@lists.infradead.org>; open list:OPEN
> FIRMWARE AND FLATTENED DEVICE TREE BINDINGS
> <devicet...@vger.kernel.org>; linux-kernel <linux-kernel@vger.kernel.org>
> Subject: Re: [PATCH 1/2] ARM: dts: pfuze3000: update sw1a/vldo4 voltage range
> 
> Hi Anson,
> 
> On Sat, Mar 17, 2018 at 3:57 AM, Anson Huang <anson.hu...@nxp.com>
> wrote:
> > Update sw1a/vldo4's voltage range according to latest pfuze3000
> > datasheet from:
> >
> > https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fcach
> >
> e.freescale.com%2Ffiles%2Fanalog%2Fdoc%2Fdata_sheet%2FPF3000.pdf%3Ffsr
> >
> ch%3D1%26sr%3D1%26pageNum%3D1=02%7C01%7CAnson.Huang%40n
> xp.com%7Cc
> >
> 9614ae26f9443c2d0ae08d58c16cd8a%7C686ea1d3bc2b4c6fa92cd99c5c30163
> 5%7C0
> > %7C1%7C636568951923456037=OeM%2B3xPNlm9OETpZcrvG65LjH%
> 2Fp4CRZvyD
> > HT819kuPk%3D=0
> >
> > Signed-off-by: Anson Huang <anson.hu...@nxp.com>
> > Signed-off-by: Robin Gong <yibin.g...@nxp.com>
> > ---
> >  arch/arm/boot/dts/imx6sx-udoo-neo.dtsi  | 2 +-
> > arch/arm/boot/dts/imx7d-cl-som-imx7.dts | 4 ++--
> >  arch/arm/boot/dts/imx7d-nitrogen7.dts   | 2 +-
> >  arch/arm/boot/dts/imx7d-sdb.dts | 6 +++---
> >  arch/arm/boot/dts/imx7s-warp.dts| 2 +-
> >  5 files changed, 8 insertions(+), 8 deletions(-)
> >
> > diff --git a/arch/arm/boot/dts/imx6sx-udoo-neo.dtsi
> > b/arch/arm/boot/dts/imx6sx-udoo-neo.dtsi
> > index 53b3eac..1de0a0f 100644
> > --- a/arch/arm/boot/dts/imx6sx-udoo-neo.dtsi
> > +++ b/arch/arm/boot/dts/imx6sx-udoo-neo.dtsi
> > @@ -142,7 +142,7 @@
> > regulators {
> > sw1a_reg: sw1a {
> > regulator-min-microvolt = <70>;
> > -   regulator-max-microvolt = <1475000>;
> > +   regulator-max-microvolt =
> <330>;
> 
> This change does not look like a safe thing to do without carefully checking 
> each
> one of the board schematics.
> 
> Even if the regulator itself is capable of driving a higher voltage, it does 
> not
> mean that the circuitry that consumes such regulator is allowed to receive the
> higher voltages.
 
I thought the max value here means the capability of regulator itself, like the 
internal
anatop LDO regulator VDD_CORE, the max value defined in dtsi is 1.45V, but out 
i.MX6
SoCs can NOT receive to voltage higher than 1.3V.

The default setting of PMIC output is controlled by its OTP and the OTP value 
should
consider the board design, the rest of voltage setting should be taken care by 
device driver.
Here I think the max means PMIC's capability.

Anson.





RE: [PATCH 1/2] ARM: dts: pfuze3000: update sw1a/vldo4 voltage range

2018-03-17 Thread Anson Huang


Anson Huang
Best Regards!


> -Original Message-
> From: Fabio Estevam [mailto:feste...@gmail.com]
> Sent: Saturday, March 17, 2018 10:53 PM
> To: Anson Huang 
> Cc: Robin Gong ; Shawn Guo ;
> Sascha Hauer ; Fabio Estevam
> ; Rob Herring ; Mark Rutland
> ; Russell King - ARM Linux ;
> Liam Girdwood ; Mark Brown ;
> dl-linux-imx ; moderated list:ARM/FREESCALE IMX / MXC
> ARM ARCHITECTURE ; open list:OPEN
> FIRMWARE AND FLATTENED DEVICE TREE BINDINGS
> ; linux-kernel 
> Subject: Re: [PATCH 1/2] ARM: dts: pfuze3000: update sw1a/vldo4 voltage range
> 
> Hi Anson,
> 
> On Sat, Mar 17, 2018 at 3:57 AM, Anson Huang 
> wrote:
> > Update sw1a/vldo4's voltage range according to latest pfuze3000
> > datasheet from:
> >
> > https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fcach
> >
> e.freescale.com%2Ffiles%2Fanalog%2Fdoc%2Fdata_sheet%2FPF3000.pdf%3Ffsr
> >
> ch%3D1%26sr%3D1%26pageNum%3D1=02%7C01%7CAnson.Huang%40n
> xp.com%7Cc
> >
> 9614ae26f9443c2d0ae08d58c16cd8a%7C686ea1d3bc2b4c6fa92cd99c5c30163
> 5%7C0
> > %7C1%7C636568951923456037=OeM%2B3xPNlm9OETpZcrvG65LjH%
> 2Fp4CRZvyD
> > HT819kuPk%3D=0
> >
> > Signed-off-by: Anson Huang 
> > Signed-off-by: Robin Gong 
> > ---
> >  arch/arm/boot/dts/imx6sx-udoo-neo.dtsi  | 2 +-
> > arch/arm/boot/dts/imx7d-cl-som-imx7.dts | 4 ++--
> >  arch/arm/boot/dts/imx7d-nitrogen7.dts   | 2 +-
> >  arch/arm/boot/dts/imx7d-sdb.dts | 6 +++---
> >  arch/arm/boot/dts/imx7s-warp.dts| 2 +-
> >  5 files changed, 8 insertions(+), 8 deletions(-)
> >
> > diff --git a/arch/arm/boot/dts/imx6sx-udoo-neo.dtsi
> > b/arch/arm/boot/dts/imx6sx-udoo-neo.dtsi
> > index 53b3eac..1de0a0f 100644
> > --- a/arch/arm/boot/dts/imx6sx-udoo-neo.dtsi
> > +++ b/arch/arm/boot/dts/imx6sx-udoo-neo.dtsi
> > @@ -142,7 +142,7 @@
> > regulators {
> > sw1a_reg: sw1a {
> > regulator-min-microvolt = <70>;
> > -   regulator-max-microvolt = <1475000>;
> > +   regulator-max-microvolt =
> <330>;
> 
> This change does not look like a safe thing to do without carefully checking 
> each
> one of the board schematics.
> 
> Even if the regulator itself is capable of driving a higher voltage, it does 
> not
> mean that the circuitry that consumes such regulator is allowed to receive the
> higher voltages.
 
I thought the max value here means the capability of regulator itself, like the 
internal
anatop LDO regulator VDD_CORE, the max value defined in dtsi is 1.45V, but out 
i.MX6
SoCs can NOT receive to voltage higher than 1.3V.

The default setting of PMIC output is controlled by its OTP and the OTP value 
should
consider the board design, the rest of voltage setting should be taken care by 
device driver.
Here I think the max means PMIC's capability.

Anson.





Re: [PATCH 1/2] ARM: dts: pfuze3000: update sw1a/vldo4 voltage range

2018-03-17 Thread Fabio Estevam
Hi Anson,

On Sat, Mar 17, 2018 at 3:57 AM, Anson Huang  wrote:
> Update sw1a/vldo4's voltage range according to latest pfuze3000
> datasheet from:
>
> http://cache.freescale.com/files/analog/doc/data_sheet/PF3000.pdf?fsrch=1=1=1
>
> Signed-off-by: Anson Huang 
> Signed-off-by: Robin Gong 
> ---
>  arch/arm/boot/dts/imx6sx-udoo-neo.dtsi  | 2 +-
>  arch/arm/boot/dts/imx7d-cl-som-imx7.dts | 4 ++--
>  arch/arm/boot/dts/imx7d-nitrogen7.dts   | 2 +-
>  arch/arm/boot/dts/imx7d-sdb.dts | 6 +++---
>  arch/arm/boot/dts/imx7s-warp.dts| 2 +-
>  5 files changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/arch/arm/boot/dts/imx6sx-udoo-neo.dtsi 
> b/arch/arm/boot/dts/imx6sx-udoo-neo.dtsi
> index 53b3eac..1de0a0f 100644
> --- a/arch/arm/boot/dts/imx6sx-udoo-neo.dtsi
> +++ b/arch/arm/boot/dts/imx6sx-udoo-neo.dtsi
> @@ -142,7 +142,7 @@
> regulators {
> sw1a_reg: sw1a {
> regulator-min-microvolt = <70>;
> -   regulator-max-microvolt = <1475000>;
> +   regulator-max-microvolt = <330>;

This change does not look like a safe thing to do without carefully
checking each one of the board schematics.

Even if the regulator itself is capable of driving a higher voltage,
it does not mean that the circuitry that consumes such regulator is
allowed to receive the higher voltages.


Re: [PATCH 1/2] ARM: dts: pfuze3000: update sw1a/vldo4 voltage range

2018-03-17 Thread Fabio Estevam
Hi Anson,

On Sat, Mar 17, 2018 at 3:57 AM, Anson Huang  wrote:
> Update sw1a/vldo4's voltage range according to latest pfuze3000
> datasheet from:
>
> http://cache.freescale.com/files/analog/doc/data_sheet/PF3000.pdf?fsrch=1=1=1
>
> Signed-off-by: Anson Huang 
> Signed-off-by: Robin Gong 
> ---
>  arch/arm/boot/dts/imx6sx-udoo-neo.dtsi  | 2 +-
>  arch/arm/boot/dts/imx7d-cl-som-imx7.dts | 4 ++--
>  arch/arm/boot/dts/imx7d-nitrogen7.dts   | 2 +-
>  arch/arm/boot/dts/imx7d-sdb.dts | 6 +++---
>  arch/arm/boot/dts/imx7s-warp.dts| 2 +-
>  5 files changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/arch/arm/boot/dts/imx6sx-udoo-neo.dtsi 
> b/arch/arm/boot/dts/imx6sx-udoo-neo.dtsi
> index 53b3eac..1de0a0f 100644
> --- a/arch/arm/boot/dts/imx6sx-udoo-neo.dtsi
> +++ b/arch/arm/boot/dts/imx6sx-udoo-neo.dtsi
> @@ -142,7 +142,7 @@
> regulators {
> sw1a_reg: sw1a {
> regulator-min-microvolt = <70>;
> -   regulator-max-microvolt = <1475000>;
> +   regulator-max-microvolt = <330>;

This change does not look like a safe thing to do without carefully
checking each one of the board schematics.

Even if the regulator itself is capable of driving a higher voltage,
it does not mean that the circuitry that consumes such regulator is
allowed to receive the higher voltages.