Skip to contentSkip to conversation

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

PATCH In review Thierry Reding 2 participants 4 messages Apr 17, 2020 – Apr 20, 2020

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

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

From: Thierry Reding <[email protected]>

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 1c533a969f54..72cfda7305d5 100644
@@ -3193,6 +3193,7 @@ static void tegra186_pmc_setup_irq_polarity(struct tegra_pmc *pmc,
 }
 
 static const struct tegra_wake_event tegra186_wake_events[] = {
+	TEGRA_WAKE_IRQ("pmu", 24, 209),
 	TEGRA_WAKE_GPIO("power", 29, 1, TEGRA186_AON_GPIO(FF, 0)),
 	TEGRA_WAKE_IRQ("rtc", 73, 10),
 };
Signature · 1 line
2.24.1
#1 lore raw

PATCH 2/2 arm64: tegra: Make the RTC a wakeup source on Jetson TX2

From: Thierry Reding <[email protected]>

The RTC found on the MAX77620 PMIC can be used as a wakeup source on Jetson TX2, which is useful to wake the system from suspend at a given time.

---
 arch/arm64/boot/dts/nvidia/tegra186-p3310.dtsi | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/nvidia/tegra186-p3310.dtsi +6 -1
index da96de04d003..7a0fa157f48c 100644
@@ -221,7 +221,8 @@ pmic: pmic@3c {
 				compatible = "maxim,max77620";
 				reg = <0x3c>;
 
-				interrupts = <GIC_SPI 209 IRQ_TYPE_LEVEL_HIGH>;
+				interrupt-parent = <&pmc>;
+				interrupts = <24 IRQ_TYPE_LEVEL_LOW>;
 				#interrupt-cells = <2>;
 				interrupt-controller;
 
@@ -379,6 +380,10 @@ vdd_pex: ldo8 {
 						regulator-max-microvolt = <1050000>;
 					};
 				};
+
+				rtc {
+					wakeup-source;
+				};
 			};
 		};
 	};
Signature · 1 line
2.24.1
maintainer Acked-by Tested-by on v1 2/2
#2 lore raw

Re: [PATCH 2/2] arm64: tegra: Make the RTC a wakeup source on Jetson TX2

Quoted 27 lines · Thierry Reding

From: Thierry Reding <[email protected]>

The RTC found on the MAX77620 PMIC can be used as a wakeup source on Jetson TX2, which is useful to wake the system from suspend at a given time.

---
 arch/arm64/boot/dts/nvidia/tegra186-p3310.dtsi | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/nvidia/tegra186-p3310.dtsi +2 -1
index da96de04d003..7a0fa157f48c 100644
@@ -221,7 +221,8 @@ pmic: pmic@3c {
 				compatible = "maxim,max77620";
 				reg = <0x3c>;
 
-				interrupts = <GIC_SPI 209 IRQ_TYPE_LEVEL_HIGH>;
+				interrupt-parent = <&pmc>;
+				interrupts = <24 IRQ_TYPE_LEVEL_LOW>;
 				#interrupt-cells = <2>;
 				interrupt-controller;
 

arch/arm64/boot/dts/nvidia/tegra186-p3310.dtsi vdd_pex: ldo8 { · line 389

Quoted 10 lines
arch/arm64/boot/dts/nvidia/tegra186-p3310.dtsi +4 -0
@@ -379,6 +380,10 @@ vdd_pex: ldo8 {
 						regulator-max-microvolt = <1050000>;
 					};
 				};
+
+				rtc {
+					wakeup-source;
+				};
 			};
 		};
 	};

Cheers
Jon

Signature · 1 line
nvpublic
maintainer Acked-by Tested-by on v1 1/2
#3 lore raw
In reply to Thierry Reding
Quoted 16 lines · Thierry Reding

From: Thierry Reding <[email protected]>

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 +0 -0
index 1c533a969f54..72cfda7305d5 100644

drivers/soc/tegra/pmc.c static void tegra186_pmc_setup_irq_polarity(struct tegra_pmc *pmc, · line 3199

Quoted 7 lines
drivers/soc/tegra/pmc.c +1 -0
@@ -3193,6 +3193,7 @@ static void tegra186_pmc_setup_irq_polarity(struct tegra_pmc *pmc,
 }
 
 static const struct tegra_wake_event tegra186_wake_events[] = {
+	TEGRA_WAKE_IRQ("pmu", 24, 209),
 	TEGRA_WAKE_GPIO("power", 29, 1, TEGRA186_AON_GPIO(FF, 0)),
 	TEGRA_WAKE_IRQ("rtc", 73, 10),
 };

Cheers
Jon

Signature · 1 line
nvpublic