Skip to contentSkip to conversation

ARM: dts: exynos: Add missing used PMIC regulators on Exynos5422 Odroid boards

PATCH In review Krzysztof Kozlowski 3 participants 10 messages Aug 6, 2018 – Aug 13, 2018

Subsystems (2)
lore
Share & tools
lore

Krzysztof Kozlowski

author maintainer
#0 lore raw

PATCH 1/4 ARM: dts: exynos: Add missing used PMIC regulators on Exynos5422 Odroid boards

Define LDO2, LDO23 and LDO27 critical board regulators to describe the hardware.

---
 arch/arm/boot/dts/exynos5422-odroid-core.dtsi | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
arch/arm/boot/dts/exynos5422-odroid-core.dtsi +21 -0
index 2f4f40882dab..d0218a82c93a 100644
@@ -154,6 +154,13 @@
 				regulator-always-on;
 			};
 
+			ldo2_reg: LDO2 {
+				regulator-name = "vdd_ldo2";
+				regulator-min-microvolt = <1800000>;
+				regulator-max-microvolt = <1800000>;
+				regulator-always-on;
+			};
+
 			ldo3_reg: LDO3 {
 				regulator-name = "vddq_mmc0";
 				regulator-min-microvolt = <1800000>;
@@ -261,6 +268,13 @@
 				regulator-max-microvolt = <2800000>;
 			};
 
+			ldo23_reg: LDO23 {
+				regulator-name = "vdd_mifs";
+				regulator-min-microvolt = <1100000>;
+				regulator-max-microvolt = <1100000>;
+				regulator-always-on;
+			};
+
 			ldo24_reg: LDO24 {
 				regulator-name = "tsp_io";
 				regulator-min-microvolt = <2800000>;
@@ -275,6 +289,13 @@
 				regulator-always-on;
 			};
 
+			ldo27_reg: LDO27 {
+				regulator-name = "vdd_g3ds";
+				regulator-min-microvolt = <1000000>;
+				regulator-max-microvolt = <1000000>;
+				regulator-always-on;
+			};
+
 			buck1_reg: BUCK1 {
 				regulator-name = "vdd_mif";
 				regulator-min-microvolt = <800000>;
Signature · 1 line
2.14.1
author maintainer
#1 lore raw

PATCH 2/4 ARM: dts: exynos: Add unused PMIC regulators on Exynos5422 Odroid boards

Define LDO14, LDO20-22, LDO25 and LOD29-38 unused regulators to describe the hardware.

---
 arch/arm/boot/dts/exynos5422-odroid-core.dtsi | 105 ++++++++++++++++++++++++++
 1 file changed, 105 insertions(+)
arch/arm/boot/dts/exynos5422-odroid-core.dtsi +105 -0
index d0218a82c93a..744fd86a38ad 100644
@@ -235,6 +235,13 @@
 				regulator-max-microvolt = <2800000>;
 			};
 
+			ldo14_reg: LDO14 {
+				/* Unused */
+				regulator-name = "vdd_ldo14";
+				regulator-min-microvolt = <800000>;
+				regulator-max-microvolt = <3950000>;
+			};
+
 			ldo15_reg: LDO15 {
 				regulator-name = "vdd_ldo15";
 				regulator-min-microvolt = <3300000>;
@@ -268,6 +275,27 @@
 				regulator-max-microvolt = <2800000>;
 			};
 
+			ldo20_reg: LDO20 {
+				/* Unused */
+				regulator-name = "vdd_ldo20";
+				regulator-min-microvolt = <800000>;
+				regulator-max-microvolt = <3950000>;
+			};
+
+			ldo21_reg: LDO21 {
+				/* Unused */
+				regulator-name = "vdd_ldo21";
+				regulator-min-microvolt = <800000>;
+				regulator-max-microvolt = <3950000>;
+			};
+
+			ldo22_reg: LDO22 {
+				/* Unused */
+				regulator-name = "vdd_ldo22";
+				regulator-min-microvolt = <800000>;
+				regulator-max-microvolt = <2375000>;
+			};
+
 			ldo23_reg: LDO23 {
 				regulator-name = "vdd_mifs";
 				regulator-min-microvolt = <1100000>;
@@ -282,6 +310,13 @@
 				regulator-always-on;
 			};
 
+			ldo25_reg: LDO25 {
+				/* Unused */
+				regulator-name = "vdd_ldo25";
+				regulator-min-microvolt = <800000>;
+				regulator-max-microvolt = <3950000>;
+			};
+
 			ldo26_reg: LDO26 {
 				regulator-name = "vdd_ldo26";
 				regulator-min-microvolt = <3000000>;
@@ -296,6 +331,76 @@
 				regulator-always-on;
 			};
 
+			ldo29_reg: LDO29 {
+				/* Unused */
+				regulator-name = "vdd_ldo29";
+				regulator-min-microvolt = <800000>;
+				regulator-max-microvolt = <3950000>;
+			};
+
+			ldo30_reg: LDO30 {
+				/* Unused */
+				regulator-name = "vdd_ldo30";
+				regulator-min-microvolt = <800000>;
+				regulator-max-microvolt = <3950000>;
+			};
+
+			ldo31_reg: LDO31 {
+				/* Unused */
+				regulator-name = "vdd_ldo31";
+				regulator-min-microvolt = <800000>;
+				regulator-max-microvolt = <3950000>;
+			};
+
+			ldo32_reg: LDO32 {
+				/* Unused */
+				regulator-name = "vdd_ldo32";
+				regulator-min-microvolt = <800000>;
+				regulator-max-microvolt = <3950000>;
+			};
+
+			ldo33_reg: LDO33 {
+				/* Unused */
+				regulator-name = "vdd_ldo33";
+				regulator-min-microvolt = <800000>;
+				regulator-max-microvolt = <3950000>;
+			};
+
+			ldo34_reg: LDO34 {
+				/* Unused */
+				regulator-name = "vdd_ldo34";
+				regulator-min-microvolt = <800000>;
+				regulator-max-microvolt = <3950000>;
+			};
+
+			ldo35_reg: LDO35 {
+				/* Unused */
+				regulator-name = "vdd_ldo35";
+				regulator-min-microvolt = <800000>;
+				regulator-max-microvolt = <2375000>;
+			};
+
+			ldo36_reg: LDO36 {
+				/* Unused */
+				regulator-name = "vdd_ldo36";
+				regulator-min-microvolt = <800000>;
+				regulator-max-microvolt = <3950000>;
+			};
+
+			ldo37_reg: LDO37 {
+				/* Unused */
+				regulator-name = "vdd_ldo37";
+				regulator-min-microvolt = <800000>;
+				regulator-max-microvolt = <3950000>;
+			};
+
+			ldo38_reg: LDO38 {
+				/* Unused */
+				regulator-name = "vdd_ldo38";
+				regulator-min-microvolt = <800000>;
+				regulator-max-microvolt = <3950000>;
+			};
+
 			buck1_reg: BUCK1 {
 				regulator-name = "vdd_mif";
 				regulator-min-microvolt = <800000>;
Signature · 1 line
2.14.1
author maintainer
#2 lore raw

PATCH 3/4 ARM: dts: exynos: Disable unused PMIC regulators on Exynos5422 Odroid boards

In reply to Krzysztof Kozlowski

Disable unused PMIC regulators on Exynos5422 Odroid boards to reduce energy used. According to schematics:
1. LDO12, LDO16 and LDO24 are not connected,
2. LDO26 is not used on Odroid HC1.

---
 arch/arm/boot/dts/exynos5422-odroid-core.dtsi      | 26 +++++++++++-----------
 arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi |  6 +++++
 2 files changed, 19 insertions(+), 13 deletions(-)
arch/arm/boot/dts/exynos5422-odroid-core.dtsi +13 -13
index 744fd86a38ad..b0dc9cc81b94 100644
@@ -223,10 +223,10 @@
 			};
 
 			ldo12_reg: LDO12 {
+				/* Unused */
 				regulator-name = "vdd_ldo12";
-				regulator-min-microvolt = <1800000>;
-				regulator-max-microvolt = <1800000>;
-				regulator-always-on;
+				regulator-min-microvolt = <800000>;
+				regulator-max-microvolt = <2375000>;
 			};
 
 			ldo13_reg: LDO13 {
@@ -250,10 +250,10 @@
 			};
 
 			ldo16_reg: LDO16 {
+				/* Unused */
 				regulator-name = "vdd_ldo16";
-				regulator-min-microvolt = <2200000>;
-				regulator-max-microvolt = <2200000>;
-				regulator-always-on;
+				regulator-min-microvolt = <800000>;
+				regulator-max-microvolt = <3950000>;
 			};
 
 			ldo17_reg: LDO17 {
@@ -304,10 +304,10 @@
 			};
 
 			ldo24_reg: LDO24 {
-				regulator-name = "tsp_io";
-				regulator-min-microvolt = <2800000>;
-				regulator-max-microvolt = <2800000>;
-				regulator-always-on;
+				/* Unused */
+				regulator-name = "vdd_ldo24";
+				regulator-min-microvolt = <800000>;
+				regulator-max-microvolt = <3950000>;
 			};
 
 			ldo25_reg: LDO25 {
@@ -318,10 +318,10 @@
 			};
 
 			ldo26_reg: LDO26 {
+				/* Used on XU3, XU3-Lite and XU4 */
 				regulator-name = "vdd_ldo26";
-				regulator-min-microvolt = <3000000>;
-				regulator-max-microvolt = <3000000>;
-				regulator-always-on;
+				regulator-min-microvolt = <800000>;
+				regulator-max-microvolt = <3950000>;
 			};
 
 			ldo27_reg: LDO27 {
arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi +6 -0
index 96e281c0a118..e522edb2bb82 100644
@@ -367,6 +367,12 @@
 	status = "okay";
 };
 
+&ldo26_reg {
+	regulator-min-microvolt = <3000000>;
+	regulator-max-microvolt = <3000000>;
+	regulator-always-on;
+};
+
 &mixer {
 	status = "okay";
 };
Signature · 1 line
2.14.1
author maintainer
#3 lore raw

PATCH 4/4 ARM: dts: exynos: Add LDO28 regulator on Exynos5422 Odroid boards

In reply to Krzysztof Kozlowski

The LDO28 is used only on Odroid XU3 for Display Port. Define it so DTS will describe entire hardware.

Depending on bootloader behavior this might affect the Display Port because none of drivers are enabling it. By default it is off in S2MPS11 PMIC reset values. However it could be enabled by bootloader so in such case kernel will later disable it as unused regulator.

---

Not tested on Odroid XU3 with Display Port.

---
 arch/arm/boot/dts/exynos5422-odroid-core.dtsi | 7 +++++++
 arch/arm/boot/dts/exynos5422-odroidxu3.dts    | 6 ++++++
 2 files changed, 13 insertions(+)
arch/arm/boot/dts/exynos5422-odroid-core.dtsi +7 -0
index b0dc9cc81b94..178e1064cfc7 100644
@@ -331,6 +331,13 @@
 				regulator-always-on;
 			};
 
+			ldo28_reg: LDO28 {
+				/* Used on XU3 */
+				regulator-name = "vdd_ldo26";
+				regulator-min-microvolt = <800000>;
+				regulator-max-microvolt = <3950000>;
+			};
+
 			ldo29_reg: LDO29 {
 				/* Unused */
 				regulator-name = "vdd_ldo29";
arch/arm/boot/dts/exynos5422-odroidxu3.dts +6 -0
index 0322f281912c..db0bc17a667b 100644
@@ -49,6 +49,12 @@
 	};
 };
 
+&ldo28_reg {
+	regulator-name = "dp_p3v3";
+	regulator-min-microvolt = <3300000>;
+	regulator-max-microvolt = <3300000>;
+};
+
 &pwm {
 	/*
 	 * PWM 0 -- fan
Signature · 1 line
2.14.1
Tested-by on v1 4/4
#4 lore raw

Re: [RFT 4/4] ARM: dts: exynos: Add LDO28 regulator on Exynos5422 Odroid boards

Hi Krzysztof,

Quoted 9 lines · Krzysztof Kozlowski

The LDO28 is used only on Odroid XU3 for Display Port. Define it so DTS will describe entire hardware.

Depending on bootloader behavior this might affect the Display Port because none of drivers are enabling it. By default it is off in S2MPS11 PMIC reset values. However it could be enabled by bootloader so in such case kernel will later disable it as unused regulator.

Odroid XU3 boots fine with this patch. Display Port is not yet enabled in mainline for OdroidXU3, so there is not much else to test for now.

Quoted 33 lines

---

Not tested on Odroid XU3 with Display Port.

---
  arch/arm/boot/dts/exynos5422-odroid-core.dtsi | 7 +++++++
  arch/arm/boot/dts/exynos5422-odroidxu3.dts    | 6 ++++++
  2 files changed, 13 insertions(+)
arch/arm/boot/dts/exynos5422-odroid-core.dtsi +7 -0
index b0dc9cc81b94..178e1064cfc7 100644
@@ -331,6 +331,13 @@
  				regulator-always-on;
  			};
 
+			ldo28_reg: LDO28 {
+				/* Used on XU3 */
+				regulator-name = "vdd_ldo26";
+				regulator-min-microvolt = <800000>;
+				regulator-max-microvolt = <3950000>;
+			};
+
  			ldo29_reg: LDO29 {
  				/* Unused */
  				regulator-name = "vdd_ldo29";
arch/arm/boot/dts/exynos5422-odroidxu3.dts +0 -0
index 0322f281912c..db0bc17a667b 100644
@@ -49,6 +49,12 @@
  	};
  };

arch/arm/boot/dts/exynos5422-odroidxu3.dts line 60

Quoted 10 lines
arch/arm/boot/dts/exynos5422-odroidxu3.dts +6 -0
 
+&ldo28_reg {
+	regulator-name = "dp_p3v3";
+	regulator-min-microvolt = <3300000>;
+	regulator-max-microvolt = <3300000>;
+};
+
  &pwm {
  	/*
  	 * PWM 0 -- fan

Best regards

Signature · 2 lines
Marek Szyprowski, PhD
Samsung R&D Institute Poland
#5 lore raw
In reply to Krzysztof Kozlowski

Hi Krzysztof,

These patches should also be ported to u-boot to enable PMIC.

I was just looking into S2MPS11B data sheet
According to the 1.2 Key Features of S2MPS11

BUCK1, BUCK2, BUCK3, BUCK4, BUCK6 have (0.65 V to 1.6 V) min /max range. BUCK5 have (0.65 V to 2.0 V) min /max range.
BUCK7 have (1.2 V to 1.5 V) min / max range.
BUCK8 have (1.8 V to 2.1 V) min / max range.
BUCK10 have (0.75 V to 1.4 V) min / max range.

BUCKBOST9 (3.0 V to 3.75 V) min / max range.

LDO1, LDO6, LDO11, LDO22, LDO23, LDO27, LDO35 (0.8 V to 2.375 V) min / max range

LDO2, LDO3, LDO5, LDO7, LDO9, LDO10, LD012, LDO13, LDO14, LDO15, LDO16, LDO17, LDO18, LDO19, LDO20, LD021, LDO24, LDO25, LDO26, LDO28, LDO29, LDO30, LDO31, LDO32, LDO33, LDO34, LDO36, LDO37, LDO38 (0.8 V to 3.95 V) min / max range

I am aware off we have configures the min/max range as per board schematics. but each regulator support dynamic voltage scale and have different turn on/off voltage and current rating.

So why are we not setting the regulator-min-microvolt / regulator-max-microvolt as per datasheets. Please correct me if I am wrong.

Best Regards
-Anand

author maintainer
#6 lore raw
Quoted 22 lines · Anand Moon

Hi Krzysztof,

These patches should also be ported to u-boot to enable PMIC.

I was just looking into S2MPS11B data sheet
According to the 1.2 Key Features of S2MPS11

BUCK1, BUCK2, BUCK3, BUCK4, BUCK6 have (0.65 V to 1.6 V) min /max range. BUCK5 have (0.65 V to 2.0 V) min /max range.
BUCK7 have (1.2 V to 1.5 V) min / max range.
BUCK8 have (1.8 V to 2.1 V) min / max range.
BUCK10 have (0.75 V to 1.4 V) min / max range.

BUCKBOST9 (3.0 V to 3.75 V) min / max range.

LDO1, LDO6, LDO11, LDO22, LDO23, LDO27, LDO35 (0.8 V to 2.375 V) min / max range

LDO2, LDO3, LDO5, LDO7, LDO9, LDO10, LD012, LDO13, LDO14, LDO15, LDO16, LDO17, LDO18, LDO19, LDO20, LD021, LDO24, LDO25, LDO26, LDO28, LDO29, LDO30, LDO31, LDO32, LDO33, LDO34, LDO36, LDO37, LDO38 (0.8 V to 3.95 V) min / max range

Quoted 7 lines

I am aware off we have configures the min/max range as per board schematics. but each regulator support dynamic voltage scale and have different turn on/off voltage and current rating.

So why are we not setting the regulator-min-microvolt / regulator-max-microvolt as per datasheets. Please correct me if I am wrong.

Which regulators are not configured as in datasheet?

Best regards,
Krzysztof

#7 lore raw

Hi Krzysztof,

Quoted 28 lines · Krzysztof Kozlowski
Quoted 26 lines · Anand Moon

Hi Krzysztof,

These patches should also be ported to u-boot to enable PMIC.

I was just looking into S2MPS11B data sheet
According to the 1.2 Key Features of S2MPS11

BUCK1, BUCK2, BUCK3, BUCK4, BUCK6 have (0.65 V to 1.6 V) min /max range. BUCK5 have (0.65 V to 2.0 V) min /max range.
BUCK7 have (1.2 V to 1.5 V) min / max range.
BUCK8 have (1.8 V to 2.1 V) min / max range.
BUCK10 have (0.75 V to 1.4 V) min / max range.

BUCKBOST9 (3.0 V to 3.75 V) min / max range.

LDO1, LDO6, LDO11, LDO22, LDO23, LDO27, LDO35 (0.8 V to 2.375 V) min / max range

LDO2, LDO3, LDO5, LDO7, LDO9, LDO10, LD012, LDO13, LDO14, LDO15, LDO16, LDO17, LDO18, LDO19, LDO20, LD021, LDO24, LDO25, LDO26, LDO28, LDO29, LDO30, LDO31, LDO32, LDO33, LDO34, LDO36, LDO37, LDO38 (0.8 V to 3.95 V) min / max range

I am aware off we have configures the min/max range as per board schematics. but each regulator support dynamic voltage scale and have different turn on/off voltage and current rating.

Quoted 8 lines
Quoted 3 lines

So why are we not setting the regulator-min-microvolt / regulator-max-microvolt as per datasheets. Please correct me if I am wrong.

Which regulators are not configured as in datasheet?

Best regards,
Krzysztof

Almost all the regulator have some miss default match of min/max setting. I have tried to adjust the setting on top your above patches.

I am attaching my patch diff for testing.
I have have perform some stress testing and found no issue at my end.

Best Regards
-Anand
-------------- next part --------------
A non-text attachment was scrubbed...
Name: regulator.patch
Type: application/octet-stream
Size: 9039 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20180813/6de1046e/attachment-0001.obj>

author maintainer
#8 lore raw
Quoted 37 lines · Anand Moon

Hi Krzysztof,

Quoted 34 lines · Krzysztof Kozlowski
Quoted 22 lines · Anand Moon

Hi Krzysztof,

These patches should also be ported to u-boot to enable PMIC.

I was just looking into S2MPS11B data sheet
According to the 1.2 Key Features of S2MPS11

BUCK1, BUCK2, BUCK3, BUCK4, BUCK6 have (0.65 V to 1.6 V) min /max range. BUCK5 have (0.65 V to 2.0 V) min /max range.
BUCK7 have (1.2 V to 1.5 V) min / max range.
BUCK8 have (1.8 V to 2.1 V) min / max range.
BUCK10 have (0.75 V to 1.4 V) min / max range.

BUCKBOST9 (3.0 V to 3.75 V) min / max range.

LDO1, LDO6, LDO11, LDO22, LDO23, LDO27, LDO35 (0.8 V to 2.375 V) min / max range

LDO2, LDO3, LDO5, LDO7, LDO9, LDO10, LD012, LDO13, LDO14, LDO15, LDO16, LDO17, LDO18, LDO19, LDO20, LD021, LDO24, LDO25, LDO26, LDO28, LDO29, LDO30, LDO31, LDO32, LDO33, LDO34, LDO36, LDO37, LDO38 (0.8 V to 3.95 V) min / max range

Quoted 7 lines

I am aware off we have configures the min/max range as per board schematics. but each regulator support dynamic voltage scale and have different turn on/off voltage and current rating.

So why are we not setting the regulator-min-microvolt / regulator-max-microvolt as per datasheets. Please correct me if I am wrong.

Which regulators are not configured as in datasheet?

Quoted 8 lines
Quoted 2 lines

Best regards,
Krzysztof

Almost all the regulator have some miss default match of min/max setting. I have tried to adjust the setting on top your above patches.

I am attaching my patch diff for testing.
I have have perform some stress testing and found no issue at my end.

All the regulators you touched in this patch have proper setting of min and max values. They are configured to the values required by hardware, as in schematics.

Best regards,
Krzysztof

#9 lore raw

hi Krzysztof,

Quoted 48 lines · Krzysztof Kozlowski
Quoted 37 lines · Anand Moon

Hi Krzysztof,

Quoted 34 lines · Krzysztof Kozlowski
Quoted 22 lines · Anand Moon

Hi Krzysztof,

These patches should also be ported to u-boot to enable PMIC.

I was just looking into S2MPS11B data sheet
According to the 1.2 Key Features of S2MPS11

BUCK1, BUCK2, BUCK3, BUCK4, BUCK6 have (0.65 V to 1.6 V) min /max range. BUCK5 have (0.65 V to 2.0 V) min /max range.
BUCK7 have (1.2 V to 1.5 V) min / max range.
BUCK8 have (1.8 V to 2.1 V) min / max range.
BUCK10 have (0.75 V to 1.4 V) min / max range.

BUCKBOST9 (3.0 V to 3.75 V) min / max range.

LDO1, LDO6, LDO11, LDO22, LDO23, LDO27, LDO35 (0.8 V to 2.375 V) min / max range

LDO2, LDO3, LDO5, LDO7, LDO9, LDO10, LD012, LDO13, LDO14, LDO15, LDO16, LDO17, LDO18, LDO19, LDO20, LD021, LDO24, LDO25, LDO26, LDO28, LDO29, LDO30, LDO31, LDO32, LDO33, LDO34, LDO36, LDO37, LDO38 (0.8 V to 3.95 V) min / max range

Quoted 7 lines

I am aware off we have configures the min/max range as per board schematics. but each regulator support dynamic voltage scale and have different turn on/off voltage and current rating.

So why are we not setting the regulator-min-microvolt / regulator-max-microvolt as per datasheets. Please correct me if I am wrong.

Which regulators are not configured as in datasheet?

Quoted 8 lines
Quoted 2 lines

Best regards,
Krzysztof

Almost all the regulator have some miss default match of min/max setting. I have tried to adjust the setting on top your above patches.

I am attaching my patch diff for testing.
I have have perform some stress testing and found no issue at my end.

Quoted 6 lines

All the regulators you touched in this patch have proper setting of min and max values. They are configured to the values required by hardware, as in schematics.

Best regards,
Krzysztof

Yes I am aware of that. Those voltage range setting from schematics are for *default on* and *default off* of regulator state.

As per the datasheet description.

*Buck Convertors*
Each buck provides a wide range of output and Buck1, 2,3,4,6 voltage controlled by Dynamic Voltage scale
(DVS) function through I2C control, Buck1, Buck2, Buck3, Buck4 and Buck6 have controllable output voltage
range from 0.65 V to 1.6 V, Buck5 has controllable output voltage range from 0.65V to 2.0V, Buck7, Buck8 and
Buck10 have controllable output voltage range from 0.75 V to 3.55 V and BuckBoost9 has controllable output
voltage range from 3.0 V to 3.75 V. Ramp slope can be controlled from 6.25 mV/us to 50 mV/us using 2 bits.

*LDOs*
Thirty eight consisted of 31 PLDOs (PMOS-type LDo) and 7 NLDOs (NMOS-type LDO) and integrated into
S2MPS11. PLDOs are mainly used for higher output volage rangeing from 0.8 V to 3.95 V with 5OmV step.
Their maximum output current driving capacities are 150 mA, 300 mA and 450 mA.

Best Regards
-Anand