Skip to contentSkip to conversation

ARM: dts: imx6sx-sdb: Drop OPP hackery

RFC PATCH New Marek Vasut 4 participants 6 messages Apr 25, 2017 – May 3, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 ARM: dts: imx6sx-sdb: Drop OPP hackery

The imx6sx-sdb has one power supply that drives both VDDARM_IN and VDDSOC_IN, which is the sw1a regulator on the PFUZE PMIC. Connect both inputs to the sw1a regulator on the PMIC and drop the OPP hackery which is no longer needed as the power framework will take care of the regulator configuration as needed.

Cc Fabio Estevam <[email protected]>
Cc Shawn Guo <[email protected]>

---
Note: Fabio, if you have a chance, please give this a spin and see
if this works.

---
 arch/arm/boot/dts/imx6sx-sdb.dts | 25 ++++++++-----------------
 1 file changed, 8 insertions(+), 17 deletions(-)
arch/arm/boot/dts/imx6sx-sdb.dts +8 -17
index 5bb8fd57e7f5..c0139d7e497a 100644
@@ -12,23 +12,6 @@
 	model = "Freescale i.MX6 SoloX SDB RevB Board";
 };
 
-&cpu0 {
-	operating-points = <
-		/* kHz    uV */
-		996000  1250000
-		792000  1175000
-		396000  1175000
-		198000  1175000
-		>;
-	fsl,soc-operating-points = <
-		/* ARM kHz      SOC uV */
-		996000	1250000
-		792000	1175000
-		396000	1175000
-		198000  1175000
-	>;
-};
-
 &i2c1 {
 	clock-frequency = <100000>;
 	pinctrl-names = "default";
@@ -145,3 +128,11 @@
 		reg = <1>;
 	};
 };
+
+&reg_arm {
+	vin-supply = <&sw1a_reg>;
+};
+
+&reg_soc {
+	vin-supply = <&sw1a_reg>;
+};
Signature · 1 line
2.11.0
#1 lore raw

RFC PATCH 1/1 ARM: dts: imx6sx-sdb: Drop OPP hackery

Quoted 9 lines · Marek Vasut

The imx6sx-sdb has one power supply that drives both VDDARM_IN and VDDSOC_IN, which is the sw1a regulator on the PFUZE PMIC. Connect both inputs to the sw1a regulator on the PMIC and drop the OPP hackery which is no longer needed as the power framework will take care of the regulator configuration as needed.

Cc Fabio Estevam <[email protected]>
Cc Shawn Guo <[email protected]>

+CC Leonard

Quoted 48 lines

---
Note: Fabio, if you have a chance, please give this a spin and see
if this works.

---
 arch/arm/boot/dts/imx6sx-sdb.dts | 25 ++++++++-----------------
 1 file changed, 8 insertions(+), 17 deletions(-)
arch/arm/boot/dts/imx6sx-sdb.dts +8 -17
index 5bb8fd57e7f5..c0139d7e497a 100644
@@ -12,23 +12,6 @@
 	model = "Freescale i.MX6 SoloX SDB RevB Board";
 };
 
-&cpu0 {
-	operating-points = <
-		/* kHz    uV */
-		996000  1250000
-		792000  1175000
-		396000  1175000
-		198000  1175000
-		>;
-	fsl,soc-operating-points = <
-		/* ARM kHz      SOC uV */
-		996000	1250000
-		792000	1175000
-		396000	1175000
-		198000  1175000
-	>;
-};
-
 &i2c1 {
 	clock-frequency = <100000>;
 	pinctrl-names = "default";
@@ -145,3 +128,11 @@
 		reg = <1>;
 	};
 };
+
+&reg_arm {
+	vin-supply = <&sw1a_reg>;
+};
+
+&reg_soc {
+	vin-supply = <&sw1a_reg>;
+};
Signature · 2 lines
Best regards,
Marek Vasut
#2 lore raw

RFC PATCH 1/1 ARM: dts: imx6sx-sdb: Drop OPP hackery

Quoted 7 lines · Marek Vasut
Quoted 6 lines · Marek Vasut

The imx6sx-sdb has one power supply that drives both VDDARM_IN and VDDSOC_IN, which is the sw1a regulator on the PFUZE PMIC. Connect both inputs to the sw1a regulator on the PMIC and drop the OPP hackery which is no longer needed as the power framework will take care of the regulator configuration as needed.

Quoted 5 lines
Quoted 3 lines
Cc Fabio Estevam <[email protected]>
Cc Shawn Guo <[email protected]>

+CC Leonard

The OPP hack only applies to LDO bypass mode and that is not in upstream. When LDOs are enabled the effect is to use higher voltages than necessary for no good reason.

Setting these higher voltages can make some boards (for example Rev B) fail to boot with ugly semi-random crashes reminiscent of memory corruption. These failures happen the first time the lowest idle state is used. This patch fixes those crashes.

It's not clear exactly why the crashes happen. Perhaps waking up from idle draws more power than is available? I don't think it matters.

I sent a very similar patch a few minutes after this one:

http://lists.infradead.org/pipermail/linux-arm-kernel/2017-April/503241
.html

Quoted 4 lines
Quoted 4 lines
arch/arm/boot/dts/imx6sx-sdb.dts +0 -0
@@ -145,3 +128,11 @@
 		reg = <1>;
 	};
 };
Quoted 8 lines

arch/arm/boot/dts/imx6sx-sdb.dts line 138

Quoted 8 lines
arch/arm/boot/dts/imx6sx-sdb.dts +8 -0
+
+&reg_arm {
+	vin-supply = <&sw1a_reg>;
+};
+
+&reg_soc {
+	vin-supply = <&sw1a_reg>;
+};

This is also good, it will result in lower voltages will result in lower voltages on VDD_ARM_SOC_IN rather than a fixed 1375 mV.

Signature · 2 lines
Regards,
Leonard
#3 lore raw

RFC PATCH 1/1 ARM: dts: imx6sx-sdb: Drop OPP hackery

Quoted 25 lines · Leonard Crestez
Quoted 9 lines · Marek Vasut
Quoted 7 lines · Marek Vasut

The imx6sx-sdb has one power supply that drives both VDDARM_IN and VDDSOC_IN, which is the sw1a regulator on the PFUZE PMIC. Connect both inputs to the sw1a regulator on the PMIC and drop the OPP hackery which is no longer needed as the power framework will take care of the regulator configuration as needed.

Quoted 4 lines
Quoted 3 lines
Cc Fabio Estevam <[email protected]>
Cc Shawn Guo <[email protected]>

+CC Leonard

The OPP hack only applies to LDO bypass mode and that is not in upstream. When LDOs are enabled the effect is to use higher voltages than necessary for no good reason.

Setting these higher voltages can make some boards (for example Rev B) fail to boot with ugly semi-random crashes reminiscent of memory corruption. These failures happen the first time the lowest idle state is used. This patch fixes those crashes.

Quoted 7 lines

It's not clear exactly why the crashes happen. Perhaps waking up from idle draws more power than is available? I don't think it matters.

I sent a very similar patch a few minutes after this one:

http://lists.infradead.org/pipermail/linux-arm-kernel/2017-April/503241
.html

Adding Henri Roosen because he reported something very similar.

Henri: Can you please check if this patch fixes your issue?

--?
Regards,
Leonard

#4 lore raw

RFC PATCH 1/1 ARM: dts: imx6sx-sdb: Drop OPP hackery

Quoted 29 lines · Leonard Crestez
Quoted 28 lines · Leonard Crestez
Quoted 9 lines · Marek Vasut
Quoted 7 lines · Marek Vasut

The imx6sx-sdb has one power supply that drives both VDDARM_IN and VDDSOC_IN, which is the sw1a regulator on the PFUZE PMIC. Connect both inputs to the sw1a regulator on the PMIC and drop the OPP hackery which is no longer needed as the power framework will take care of the regulator configuration as needed.

Quoted 4 lines
Quoted 3 lines
Cc Fabio Estevam <[email protected]>
Cc Shawn Guo <[email protected]>

+CC Leonard

The OPP hack only applies to LDO bypass mode and that is not in upstream. When LDOs are enabled the effect is to use higher voltages than necessary for no good reason.

Setting these higher voltages can make some boards (for example Rev B) fail to boot with ugly semi-random crashes reminiscent of memory corruption. These failures happen the first time the lowest idle state is used. This patch fixes those crashes.

It's not clear exactly why the crashes happen. Perhaps waking up from idle draws more power than is available? I don't think it matters.

Quoted 8 lines
Quoted 4 lines

I sent a very similar patch a few minutes after this one:

http://lists.infradead.org/pipermail/linux-arm-kernel/2017-April/503241
.html

Adding Henri Roosen because he reported something very similar.

Henri: Can you please check if this patch fixes your issue?

I've been successfully running a similar patch (reverting operating points, without reg_arm/reg_soc) as provided by Anson for about a month on an iMX6SX-SDB RevC board. I'm sorry for not copying the mailing list on this before.

This patch, with the regulators setup as provided by Marek, has been tested successfully on the iMX6SX-SDB RevC board as well.

Feel free to add my

Signature · 2 lines
Best regards,
Henri Roosen
Quoted 5 lines

--
Regards,
Leonard

reviewer
#5 lore raw

RFC PATCH 1/1 ARM: dts: imx6sx-sdb: Drop OPP hackery

In reply to Marek Vasut
Quoted 9 lines · Marek Vasut

The imx6sx-sdb has one power supply that drives both VDDARM_IN and VDDSOC_IN, which is the sw1a regulator on the PFUZE PMIC. Connect both inputs to the sw1a regulator on the PMIC and drop the OPP hackery which is no longer needed as the power framework will take care of the regulator configuration as needed.

Cc Fabio Estevam <[email protected]>
Cc Shawn Guo <[email protected]>