Hello,
- Jetson Nano with Jetpack 4.6.1
I am having an issue with configuring GPIO pins within the device tree. The sources that I have been reading off of are:
So far I have run the following commands:
sudo apt update
sudo apt install device-tree-compiler
cd /boot
dtc -I dtb -O dts -o output.dts tegra210-p3448-0002-p3449-0000-b00.dtb
gedit output.dts
My gpio-keys node within output.dts looks like this. I added the wakeup_key part as per source #2 (eLinux Nano Wakeup Pin).
gpio-keys {
compatible = "gpio-keys";
gpio-keys,name = "gpio-keys";
status = "okay";
disable-on-recovery-kernel;
power {
label = "Power";
gpios = <0x5b 0xbd 0x1>;
linux,code = <0x74>;
gpio-key,wakeup;
debounce-interval = <0x1e>;
nvidia,pmc-wakeup = <0x3c 0x0 0x18 0x0>;
};
forcerecovery {
label = "Forcerecovery";
gpios = <0x5b 0xbe 0x1>;
linux,code = <0x74>;
gpio-key,wakeup;
debounce-interval = <0x1e>;
};
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>;
};
};
When I run the following command to compile output.dts, I get a syntax error.
dtc -I dts -O dtb -o tegra210-p3448-0002-p3449-0000-b00.dtb output.dts
Error: output.dts:7698.23-24 syntax error
FATAL ERROR: Unable to parse input tree
My guess is that the gpios, debounce interval, and nvidia,pmc-wakeup need to be in hex, but I don’t know where to find the codes for those.
Also within source #2 from above, I have not been able to figure out how to do the “Set Pinmux” step of configuring the GPIO pins.
Any help is greatly appreciated!