[V2,03/15] arm64: dts: imx8mp-evk: fix BUCK/LDO voltage

Message ID 20221024031351.4135651-4-peng.fan@oss.nxp.com
State New
Headers
Series arm64: dts: imx8m-evk: misc dts update |

Commit Message

Peng Fan (OSS) Oct. 24, 2022, 3:13 a.m. UTC
  From: Peng Fan <peng.fan@nxp.com>

Per PCA9450C datasheet, the voltage range as below:
BUCK1 0.6 - 2.1875
BUCK2 0.6 - 2.1875
BUCK4 0.6 - 3.4
BUCK5 0.6 - 3.4
BUCK6 0.6 - 3.4

LDO1 1.6-1.9, 3.0-3.3
LDO2 0.8 – 1.15
LDO3 0.8 - 3.3
LDO4 0.8 - 3.3
LDO5 1.8 - 3.3

Currently we set the board voltage range same as PMIC regulator
range.

Also add LDO[2,4] in this patch

Fixes: 5497bc2a2bff ("arm64: dts: imx8mp-evk: Add PMIC device")
Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
 arch/arm64/boot/dts/freescale/imx8mp-evk.dts | 44 +++++++++++++-------
 1 file changed, 30 insertions(+), 14 deletions(-)
  

Comments

Marco Felsch Oct. 28, 2022, 2:53 p.m. UTC | #1
On 22-10-24, Peng Fan (OSS) wrote:
> From: Peng Fan <peng.fan@nxp.com>
> 
> Per PCA9450C datasheet, the voltage range as below:
> BUCK1 0.6 - 2.1875
> BUCK2 0.6 - 2.1875
> BUCK4 0.6 - 3.4
> BUCK5 0.6 - 3.4
> BUCK6 0.6 - 3.4
> 
> LDO1 1.6-1.9, 3.0-3.3
> LDO2 0.8 – 1.15
> LDO3 0.8 - 3.3
> LDO4 0.8 - 3.3
> LDO5 1.8 - 3.3
> 
> Currently we set the board voltage range same as PMIC regulator
> range.

We did not therefore you aligned it. Also are you sure that this will
not damage the boards since you're lowering the min-voltage and raising
the max. voltage? According the schematic, BUCK1 is for VDD_SOC which is
min. 0.805V and max. 1.0V. After you're change someone could set it to
2.1875V. Same applies to BUCK2 which is for VDD_ARM and should be within
min. 0.805V and max. 1.05V.

Regards,
  Marco

> Also add LDO[2,4] in this patch
> 
> Fixes: 5497bc2a2bff ("arm64: dts: imx8mp-evk: Add PMIC device")
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
>  arch/arm64/boot/dts/freescale/imx8mp-evk.dts | 44 +++++++++++++-------
>  1 file changed, 30 insertions(+), 14 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/freescale/imx8mp-evk.dts b/arch/arm64/boot/dts/freescale/imx8mp-evk.dts
> index b4c1ef2559f2..a4cddc5a8620 100644
> --- a/arch/arm64/boot/dts/freescale/imx8mp-evk.dts
> +++ b/arch/arm64/boot/dts/freescale/imx8mp-evk.dts
> @@ -248,8 +248,8 @@ pmic@25 {
>  		regulators {
>  			BUCK1 {
>  				regulator-name = "BUCK1";
> -				regulator-min-microvolt = <720000>;
> -				regulator-max-microvolt = <1000000>;
> +				regulator-min-microvolt = <600000>;
> +				regulator-max-microvolt = <2187500>;
>  				regulator-boot-on;
>  				regulator-always-on;
>  				regulator-ramp-delay = <3125>;
> @@ -257,8 +257,8 @@ BUCK1 {
>  
>  			reg_arm: BUCK2 {
>  				regulator-name = "BUCK2";
> -				regulator-min-microvolt = <720000>;
> -				regulator-max-microvolt = <1025000>;
> +				regulator-min-microvolt = <600000>;
> +				regulator-max-microvolt = <2187500>;
>  				regulator-boot-on;
>  				regulator-always-on;
>  				regulator-ramp-delay = <3125>;
> @@ -268,40 +268,56 @@ reg_arm: BUCK2 {
>  
>  			BUCK4 {
>  				regulator-name = "BUCK4";
> -				regulator-min-microvolt = <3000000>;
> -				regulator-max-microvolt = <3600000>;
> +				regulator-min-microvolt = <600000>;
> +				regulator-max-microvolt = <3400000>;
>  				regulator-boot-on;
>  				regulator-always-on;
>  			};
>  
>  			BUCK5 {
>  				regulator-name = "BUCK5";
> -				regulator-min-microvolt = <1650000>;
> -				regulator-max-microvolt = <1950000>;
> +				regulator-min-microvolt = <600000>;
> +				regulator-max-microvolt = <3400000>;
>  				regulator-boot-on;
>  				regulator-always-on;
>  			};
>  
>  			BUCK6 {
>  				regulator-name = "BUCK6";
> -				regulator-min-microvolt = <1045000>;
> -				regulator-max-microvolt = <1155000>;
> +				regulator-min-microvolt = <600000>;
> +				regulator-max-microvolt = <3400000>;
>  				regulator-boot-on;
>  				regulator-always-on;
>  			};
>  
>  			LDO1 {
>  				regulator-name = "LDO1";
> -				regulator-min-microvolt = <1650000>;
> -				regulator-max-microvolt = <1950000>;
> +				regulator-min-microvolt = <1600000>;
> +				regulator-max-microvolt = <3300000>;
> +				regulator-boot-on;
> +				regulator-always-on;
> +			};
> +
> +			LDO2 {
> +				regulator-name = "LDO2";
> +				regulator-min-microvolt = <800000>;
> +				regulator-max-microvolt = <1150000>;
>  				regulator-boot-on;
>  				regulator-always-on;
>  			};
>  
>  			LDO3 {
>  				regulator-name = "LDO3";
> -				regulator-min-microvolt = <1710000>;
> -				regulator-max-microvolt = <1890000>;
> +				regulator-min-microvolt = <800000>;
> +				regulator-max-microvolt = <3300000>;
> +				regulator-boot-on;
> +				regulator-always-on;
> +			};
> +
> +			ldo4: LDO4 {
> +				regulator-name = "LDO4";
> +				regulator-min-microvolt = <800000>;
> +				regulator-max-microvolt = <3300000>;
>  				regulator-boot-on;
>  				regulator-always-on;
>  			};
> -- 
> 2.37.1
> 
> 
>
  
Peng Fan (OSS) Nov. 3, 2022, 10:22 a.m. UTC | #2
On 10/28/2022 10:53 PM, Marco Felsch wrote:
> On 22-10-24, Peng Fan (OSS) wrote:
>> From: Peng Fan <peng.fan@nxp.com>
>>
>> Per PCA9450C datasheet, the voltage range as below:
>> BUCK1 0.6 - 2.1875
>> BUCK2 0.6 - 2.1875
>> BUCK4 0.6 - 3.4
>> BUCK5 0.6 - 3.4
>> BUCK6 0.6 - 3.4
>>
>> LDO1 1.6-1.9, 3.0-3.3
>> LDO2 0.8 – 1.15
>> LDO3 0.8 - 3.3
>> LDO4 0.8 - 3.3
>> LDO5 1.8 - 3.3
>>
>> Currently we set the board voltage range same as PMIC regulator
>> range.
> 
> We did not therefore you aligned it. Also are you sure that this will
> not damage the boards since you're lowering the min-voltage and raising
> the max. voltage? According the schematic, BUCK1 is for VDD_SOC which is
> min. 0.805V and max. 1.0V. After you're change someone could set it to
> 2.1875V. Same applies to BUCK2 which is for VDD_ARM and should be within
> min. 0.805V and max. 1.05V.

You are right. But I think DVFS already limit it.

I am not sure very sure, let me drop this patch for now. I need confirm
with HW team.

Thanks,
Peng.

> 
> Regards,
>    Marco
> 
>> Also add LDO[2,4] in this patch
>>
>> Fixes: 5497bc2a2bff ("arm64: dts: imx8mp-evk: Add PMIC device")
>> Signed-off-by: Peng Fan <peng.fan@nxp.com>
>> ---
>>   arch/arm64/boot/dts/freescale/imx8mp-evk.dts | 44 +++++++++++++-------
>>   1 file changed, 30 insertions(+), 14 deletions(-)
>>
>> diff --git a/arch/arm64/boot/dts/freescale/imx8mp-evk.dts b/arch/arm64/boot/dts/freescale/imx8mp-evk.dts
>> index b4c1ef2559f2..a4cddc5a8620 100644
>> --- a/arch/arm64/boot/dts/freescale/imx8mp-evk.dts
>> +++ b/arch/arm64/boot/dts/freescale/imx8mp-evk.dts
>> @@ -248,8 +248,8 @@ pmic@25 {
>>   		regulators {
>>   			BUCK1 {
>>   				regulator-name = "BUCK1";
>> -				regulator-min-microvolt = <720000>;
>> -				regulator-max-microvolt = <1000000>;
>> +				regulator-min-microvolt = <600000>;
>> +				regulator-max-microvolt = <2187500>;
>>   				regulator-boot-on;
>>   				regulator-always-on;
>>   				regulator-ramp-delay = <3125>;
>> @@ -257,8 +257,8 @@ BUCK1 {
>>   
>>   			reg_arm: BUCK2 {
>>   				regulator-name = "BUCK2";
>> -				regulator-min-microvolt = <720000>;
>> -				regulator-max-microvolt = <1025000>;
>> +				regulator-min-microvolt = <600000>;
>> +				regulator-max-microvolt = <2187500>;
>>   				regulator-boot-on;
>>   				regulator-always-on;
>>   				regulator-ramp-delay = <3125>;
>> @@ -268,40 +268,56 @@ reg_arm: BUCK2 {
>>   
>>   			BUCK4 {
>>   				regulator-name = "BUCK4";
>> -				regulator-min-microvolt = <3000000>;
>> -				regulator-max-microvolt = <3600000>;
>> +				regulator-min-microvolt = <600000>;
>> +				regulator-max-microvolt = <3400000>;
>>   				regulator-boot-on;
>>   				regulator-always-on;
>>   			};
>>   
>>   			BUCK5 {
>>   				regulator-name = "BUCK5";
>> -				regulator-min-microvolt = <1650000>;
>> -				regulator-max-microvolt = <1950000>;
>> +				regulator-min-microvolt = <600000>;
>> +				regulator-max-microvolt = <3400000>;
>>   				regulator-boot-on;
>>   				regulator-always-on;
>>   			};
>>   
>>   			BUCK6 {
>>   				regulator-name = "BUCK6";
>> -				regulator-min-microvolt = <1045000>;
>> -				regulator-max-microvolt = <1155000>;
>> +				regulator-min-microvolt = <600000>;
>> +				regulator-max-microvolt = <3400000>;
>>   				regulator-boot-on;
>>   				regulator-always-on;
>>   			};
>>   
>>   			LDO1 {
>>   				regulator-name = "LDO1";
>> -				regulator-min-microvolt = <1650000>;
>> -				regulator-max-microvolt = <1950000>;
>> +				regulator-min-microvolt = <1600000>;
>> +				regulator-max-microvolt = <3300000>;
>> +				regulator-boot-on;
>> +				regulator-always-on;
>> +			};
>> +
>> +			LDO2 {
>> +				regulator-name = "LDO2";
>> +				regulator-min-microvolt = <800000>;
>> +				regulator-max-microvolt = <1150000>;
>>   				regulator-boot-on;
>>   				regulator-always-on;
>>   			};
>>   
>>   			LDO3 {
>>   				regulator-name = "LDO3";
>> -				regulator-min-microvolt = <1710000>;
>> -				regulator-max-microvolt = <1890000>;
>> +				regulator-min-microvolt = <800000>;
>> +				regulator-max-microvolt = <3300000>;
>> +				regulator-boot-on;
>> +				regulator-always-on;
>> +			};
>> +
>> +			ldo4: LDO4 {
>> +				regulator-name = "LDO4";
>> +				regulator-min-microvolt = <800000>;
>> +				regulator-max-microvolt = <3300000>;
>>   				regulator-boot-on;
>>   				regulator-always-on;
>>   			};
>> -- 
>> 2.37.1
>>
>>
>>
  

Patch

diff --git a/arch/arm64/boot/dts/freescale/imx8mp-evk.dts b/arch/arm64/boot/dts/freescale/imx8mp-evk.dts
index b4c1ef2559f2..a4cddc5a8620 100644
--- a/arch/arm64/boot/dts/freescale/imx8mp-evk.dts
+++ b/arch/arm64/boot/dts/freescale/imx8mp-evk.dts
@@ -248,8 +248,8 @@  pmic@25 {
 		regulators {
 			BUCK1 {
 				regulator-name = "BUCK1";
-				regulator-min-microvolt = <720000>;
-				regulator-max-microvolt = <1000000>;
+				regulator-min-microvolt = <600000>;
+				regulator-max-microvolt = <2187500>;
 				regulator-boot-on;
 				regulator-always-on;
 				regulator-ramp-delay = <3125>;
@@ -257,8 +257,8 @@  BUCK1 {
 
 			reg_arm: BUCK2 {
 				regulator-name = "BUCK2";
-				regulator-min-microvolt = <720000>;
-				regulator-max-microvolt = <1025000>;
+				regulator-min-microvolt = <600000>;
+				regulator-max-microvolt = <2187500>;
 				regulator-boot-on;
 				regulator-always-on;
 				regulator-ramp-delay = <3125>;
@@ -268,40 +268,56 @@  reg_arm: BUCK2 {
 
 			BUCK4 {
 				regulator-name = "BUCK4";
-				regulator-min-microvolt = <3000000>;
-				regulator-max-microvolt = <3600000>;
+				regulator-min-microvolt = <600000>;
+				regulator-max-microvolt = <3400000>;
 				regulator-boot-on;
 				regulator-always-on;
 			};
 
 			BUCK5 {
 				regulator-name = "BUCK5";
-				regulator-min-microvolt = <1650000>;
-				regulator-max-microvolt = <1950000>;
+				regulator-min-microvolt = <600000>;
+				regulator-max-microvolt = <3400000>;
 				regulator-boot-on;
 				regulator-always-on;
 			};
 
 			BUCK6 {
 				regulator-name = "BUCK6";
-				regulator-min-microvolt = <1045000>;
-				regulator-max-microvolt = <1155000>;
+				regulator-min-microvolt = <600000>;
+				regulator-max-microvolt = <3400000>;
 				regulator-boot-on;
 				regulator-always-on;
 			};
 
 			LDO1 {
 				regulator-name = "LDO1";
-				regulator-min-microvolt = <1650000>;
-				regulator-max-microvolt = <1950000>;
+				regulator-min-microvolt = <1600000>;
+				regulator-max-microvolt = <3300000>;
+				regulator-boot-on;
+				regulator-always-on;
+			};
+
+			LDO2 {
+				regulator-name = "LDO2";
+				regulator-min-microvolt = <800000>;
+				regulator-max-microvolt = <1150000>;
 				regulator-boot-on;
 				regulator-always-on;
 			};
 
 			LDO3 {
 				regulator-name = "LDO3";
-				regulator-min-microvolt = <1710000>;
-				regulator-max-microvolt = <1890000>;
+				regulator-min-microvolt = <800000>;
+				regulator-max-microvolt = <3300000>;
+				regulator-boot-on;
+				regulator-always-on;
+			};
+
+			ldo4: LDO4 {
+				regulator-name = "LDO4";
+				regulator-min-microvolt = <800000>;
+				regulator-max-microvolt = <3300000>;
 				regulator-boot-on;
 				regulator-always-on;
 			};