Skip to contentSkip to conversation

soc/tegra: pmc: Enable PMIC wake event on Tegra194

PATCH Applied Jon Hunter 2 participants 4 messages May 7, 2020

Subsystems (2)
lore
Share & tools
lore

Jon Hunter

author maintainer
#0 lore raw

PATCH 1/2 soc/tegra: pmc: Enable PMIC wake event on Tegra194

The PMIC wake event can be used to bring the system out of suspend based on certain events happening on the PMIC (such as an RTC alarm).

---
 drivers/soc/tegra/pmc.c | 1 +
 1 file changed, 1 insertion(+)
drivers/soc/tegra/pmc.c +1 -0
index 72cfda7305d5..8169737c3252 100644
@@ -3326,6 +3326,7 @@ static const char * const tegra194_reset_sources[] = {
 };
 
 static const struct tegra_wake_event tegra194_wake_events[] = {
+	TEGRA_WAKE_IRQ("pmu", 24, 209),
 	TEGRA_WAKE_GPIO("power", 29, 1, TEGRA194_AON_GPIO(EE, 4)),
 	TEGRA_WAKE_IRQ("rtc", 73, 10),
 };
Signature · 1 line
2.17.1
author maintainer
#1 lore raw

PATCH 2/2 arm64: tegra: Allow the PMIC RTC to wakeup Jetson Xavier

The PMIC RTC is currently unable to wakeup Tegra194 on the Jetson Xavier platform because the interrupt from the PMIC is not usin the PMC as the interrupt parent but the GIC directly. Update the PMIC interrupt to use the PMC as the interrupt parent so that the PMIC RTC alarms can wakeup the device.

---
 arch/arm64/boot/dts/nvidia/tegra194-p2888.dtsi | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/nvidia/tegra194-p2888.dtsi +2 -1
index 623f7d7d216b..eaba167d6cf0 100644
@@ -111,7 +111,8 @@
 				compatible = "maxim,max20024";
 				reg = <0x3c>;
 
-				interrupts = <GIC_SPI 209 IRQ_TYPE_LEVEL_HIGH>;
+				interrupt-parent = <&pmc>;
+				interrupts = <24 IRQ_TYPE_LEVEL_LOW>;
 				#interrupt-cells = <2>;
 				interrupt-controller;
 
Signature · 1 line
2.17.1
#2 lore raw

Re: [PATCH 2/2] arm64: tegra: Allow the PMIC RTC to wakeup Jetson Xavier

Quoted 10 lines · Jon Hunter

The PMIC RTC is currently unable to wakeup Tegra194 on the Jetson Xavier platform because the interrupt from the PMIC is not usin the PMC as the interrupt parent but the GIC directly. Update the PMIC interrupt to use the PMC as the interrupt parent so that the PMIC RTC alarms can wakeup the device.

---
 arch/arm64/boot/dts/nvidia/tegra194-p2888.dtsi | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Applied to for-5.8/arm64/dt, thanks.

Thierry

#3 lore raw
In reply to Jon Hunter
Quoted 7 lines · Jon Hunter

The PMIC wake event can be used to bring the system out of suspend based on certain events happening on the PMIC (such as an RTC alarm).

---
 drivers/soc/tegra/pmc.c | 1 +
 1 file changed, 1 insertion(+)

Applied to for-5.8/soc, thanks.

Thierry