Skip to contentSkip to conversation

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

PATCH In review Jon Hunter 2 participants 3 messages May 20, 2020 – May 22, 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 Tegra210

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 8169737c3252..42cf37a0556b 100644
@@ -3063,6 +3063,7 @@ static const struct pinctrl_pin_desc tegra210_pin_descs[] = {
 
 static const struct tegra_wake_event tegra210_wake_events[] = {
 	TEGRA_WAKE_IRQ("rtc", 16, 2),
+	TEGRA_WAKE_IRQ("pmu", 51, 86),
 };
 
 static const struct tegra_pmc_soc tegra210_pmc_soc = {
Signature · 1 line
2.17.1
author maintainer
#1 lore raw

PATCH 2/2 arm64: tegra: Make the RTC a wakeup source on Jetson Nano and TX1

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

---
 arch/arm64/boot/dts/nvidia/tegra210-p2180.dtsi     | 3 ++-
 arch/arm64/boot/dts/nvidia/tegra210-p3450-0000.dts | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/nvidia/tegra210-p2180.dtsi +2 -1
index f87d2437d11c..cc6ed45a2b48 100644
@@ -38,7 +38,8 @@
 		pmic: pmic@3c {
 			compatible = "maxim,max77620";
 			reg = <0x3c>;
-			interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-parent = <&tegra_pmc>;
+			interrupts = <51 IRQ_TYPE_LEVEL_LOW>;
 
 			#interrupt-cells = <2>;
 			interrupt-controller;
arch/arm64/boot/dts/nvidia/tegra210-p3450-0000.dts +2 -1
index 374ce58b2b38..9bc52fdb393c 100644
@@ -149,7 +149,8 @@
 		pmic: pmic@3c {
 			compatible = "maxim,max77620";
 			reg = <0x3c>;
-			interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-parent = <&tegra_pmc>;
+			interrupts = <51 IRQ_TYPE_LEVEL_LOW>;
 
 			#interrupt-cells = <2>;
 			interrupt-controller;
Signature · 1 line
2.17.1
#2 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(+)

Both patches applied, thanks.

Thierry