Skip to contentSkip to conversation

ARM: dts: am43xx-epos-evm: Keep DCDC5 and DCDC6 always on

PATCH In review Andrew F. Davis 2 participants 7 messages Mar 29, 2019 – Apr 9, 2019

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

PATCH 1/5 ARM: dts: am43xx-epos-evm: Keep DCDC5 and DCDC6 always on

From: Kabir Sahane <[email protected]>

These regulator outputs are needed even in deep sleep modes to prevent low-voltage detection events. Make these always ON to avoid this.

---
 arch/arm/boot/dts/am43x-epos-evm.dts | 4 ++++
 1 file changed, 4 insertions(+)
arch/arm/boot/dts/am43x-epos-evm.dts +4 -0
index 9dfd80e3b76e..7db5cf3facde 100644
@@ -634,12 +634,16 @@
 			regulator-name = "v1_0bat";
 			regulator-min-microvolt = <1000000>;
 			regulator-max-microvolt = <1000000>;
+			regulator-boot-on;
+			regulator-always-on;
 		};
 
 		dcdc6: regulator-dcdc6 {
 			regulator-name = "v1_8bat";
 			regulator-min-microvolt = <1800000>;
 			regulator-max-microvolt = <1800000>;
+			regulator-boot-on;
+			regulator-always-on;
 		};
 
 		ldo1: regulator-ldo1 {
Signature · 1 line
2.21.0
#1 lore raw

PATCH 2/5 ARM: dts: am43xx-epos-evm: Keep DCDC3 regulator on in suspend to memory

From: Mike Erdahl <[email protected]>

When going to suspend to ram mode (or rtc-only mode), the DDR regulator must be told to stay on, else this rail will go down when the PMIC_EN signal is deasserted.

---
 arch/arm/boot/dts/am43x-epos-evm.dts | 6 ++++++
 1 file changed, 6 insertions(+)
arch/arm/boot/dts/am43x-epos-evm.dts +6 -0
index 7db5cf3facde..606b848d809f 100644
@@ -620,6 +620,12 @@
 			regulator-name = "vdcdc3";
 			regulator-boot-on;
 			regulator-always-on;
+			regulator-state-mem {
+				regulator-on-in-suspend;
+			};
+			regulator-state-disk {
+				regulator-off-in-suspend;
+			};
 		};
 
 		dcdc4: regulator-dcdc4 {
Signature · 1 line
2.21.0
#2 lore raw

PATCH 3/5 ARM: dts: am43xx-epos-evm: Add matrix keypad as wakeup source

In reply to Andrew F. Davis

Mark matrix-keypad as a wakeup source.

---
 arch/arm/boot/dts/am43x-epos-evm.dts | 1 +
 1 file changed, 1 insertion(+)
arch/arm/boot/dts/am43x-epos-evm.dts +1 -0
index 606b848d809f..9b8b132b04e1 100644
@@ -80,6 +80,7 @@
 		pinctrl-names = "default", "sleep";
 		pinctrl-0 = <&matrix_keypad_default>;
 		pinctrl-1 = <&matrix_keypad_sleep>;
+		wakeup-source;
 
 		row-gpios = <&gpio0 12 GPIO_ACTIVE_HIGH		/* Bank0, pin12 */
 			     &gpio0 13 GPIO_ACTIVE_HIGH		/* Bank0, pin13 */
Signature · 1 line
2.21.0
#3 lore raw

PATCH 4/5 ARM: OMAP: Wakeupgen: AM43xx HS devices should save context like non-HS

In reply to Andrew F. Davis

Unlike some previous generation devices, AM43xx HS IRQ and Wakegen context is handled by the ROM for us, and no secure service call is needed or supported. Non-GP AM43xx devices should take the same path as GP.

---
 arch/arm/mach-omap2/omap-wakeupgen.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/mach-omap2/omap-wakeupgen.c +2 -2
index 17558be4bf0a..7dcbe1736f7e 100644
@@ -436,13 +436,13 @@ static int irq_notifier(struct notifier_block *self, unsigned long cmd,	void *v)
 {
 	switch (cmd) {
 	case CPU_CLUSTER_PM_ENTER:
-		if (omap_type() == OMAP2_DEVICE_TYPE_GP)
+		if (omap_type() == OMAP2_DEVICE_TYPE_GP || soc_is_am43xx())
 			irq_save_context();
 		else
 			irq_save_secure_context();
 		break;
 	case CPU_CLUSTER_PM_EXIT:
-		if (omap_type() == OMAP2_DEVICE_TYPE_GP)
+		if (omap_type() == OMAP2_DEVICE_TYPE_GP || soc_is_am43xx())
 			irq_restore_context();
 		break;
 	}
Signature · 1 line
2.21.0
maintainer
#4 lore raw

Re: [PATCH 4/5] ARM: OMAP: Wakeupgen: AM43xx HS devices should save context like non-HS

Quoted 4 lines · Andrew F. Davis

Unlike some previous generation devices, AM43xx HS IRQ and Wakegen context is handled by the ROM for us, and no secure service call is needed or supported. Non-GP AM43xx devices should take the same path as GP.

Applying the two SoC related changes into omap-for-v5.2/soc.

Tony

#5 lore raw

PATCH 5/5 ARM: OMAP2+: pm33xx-core: Do not Turn OFF CEFUSE as PPA may be using it

In reply to Andrew F. Davis

From: Kabir Sahane <[email protected]>

This area is used to store keys by HSPPA in case of AM438x SOC. Leave it active.

---
 arch/arm/mach-omap2/pm33xx-core.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
arch/arm/mach-omap2/pm33xx-core.c +5 -3
index 724cf5774a6c..c93b6efd565f 100644
@@ -51,10 +51,12 @@ static int amx3_common_init(void)
 
 	/* CEFUSE domain can be turned off post bootup */
 	cefuse_pwrdm = pwrdm_lookup("cefuse_pwrdm");
-	if (cefuse_pwrdm)
-		omap_set_pwrdm_state(cefuse_pwrdm, PWRDM_POWER_OFF);
-	else
+	if (!cefuse_pwrdm)
 		pr_err("PM: Failed to get cefuse_pwrdm\n");
+	else if (omap_type() != OMAP2_DEVICE_TYPE_GP)
+		pr_info("PM: Leaving EFUSE power domain active\n");
+	else
+		omap_set_pwrdm_state(cefuse_pwrdm, PWRDM_POWER_OFF);
 
 	return 0;
 }
Signature · 1 line
2.21.0
maintainer
#6 lore raw
In reply to Andrew F. Davis
Quoted 4 lines · Andrew F. Davis

From: Kabir Sahane <[email protected]>

These regulator outputs are needed even in deep sleep modes to prevent low-voltage detection events. Make these always ON to avoid this.

Thanks applying the three dts changes into omap-for-v5.2/dt.

Regards,

Tony