Jetson/FAQ/BSP/Nano Wakeup Pin
Contents
Environment
Hardware
- Jetson Nano
Software
- JetPack 4.4 (32.4.3)
Use case
Set GPIO(UART1_CTS/PG03) as wake up source to trigger OS resume.
Steps
Note: All changes are in kernel device tree.
Set PG03 GPIO as input
- Make sure TEGRA_GPIO(G, 3) inside of gpio@6000d000.default.gpio-input property from tegra210-porg-gpio-p3448-0002-b00.dtsi
- Make sure TEGRA_GPIO(G, 3) outside of gpio@6000d000.default.gpio-output property from tegra210-porg-gpio-p3448-0002-b00.dtsi
Set pinmux
- Set pinmux as below in pinmux@700008d4.common.uart2_cts_pg3 node
uart2_cts_pg3 { nvidia,pins = "uart2_cts_pg3"; nvidia,function = "rsvd2"; nvidia,pull = <TEGRA_PIN_PULL_UP>; nvidia,tristate = <TEGRA_PIN_DISABLE>; nvidia,enable-input = <TEGRA_PIN_ENABLE>; };
- Make sure uart2_cts_pg3 node NOT inside of pinmux@700008d4.unused_lowpower node
Create GPIO key to trigger wake up signal
Add following node into gpio-keys node.
wakeup_key { label = "WakeupKey"; gpios = <&gpio TEGRA_GPIO(G, 3) GPIO_ACTIVE_LOW>; linux,code = <KEY_POWER>; gpio-key,wakeup; debounce-interval = <30>; nvidia,pmc-wakeup = <&tegra_pmc PMC_WAKE_TYPE_GPIO 6 PMC_TRIGGER_TYPE_NONE>; };
Pay attention of nvidia,pmc-wakeup property, the number 6 means wake up ID of Nano. You can find this ID from Column Y of Nano_Module_Pinmux_Config file which comes from Jetson Download Center.
Verification
GPIO PG03 is the Num 36 pin of [J41] 40-pin Exp Header on carrier board. Debug UART RX/TX can provide high voltage even OS suspend. Re-build device tree and re-flash to Nano. After boot completed, exec "sudo systemctl suspend" to suspend OS. Connect that 36 Pin and debug uart RX/TX via Dupont wire to wake up OS.