I am trying to add a PPS pin on Jetson AGX Orin. Here is my procedure:
- Pin31, GPIO3_PAA.00 is a default GPIO input pin, I planned to use this as the pin for PPS.
- Under
/Linux_for_Tegra/kernel/dtb
, decompile thetegra234-p3701-0000-p3737-0000.dtb
to a dts file using dtc:sudo dtc -O dts tegra234-p3701-0000-p3737-0000.dtb -o c.dts
- Add PPS to the dts file:
pps {
gpios = <0x13C 0x0 0x1>;
compatible = "pps-gpio";
assert-falling-edge;
status = "okay";
};
For the hex number in gpios, I assume 0x13C refers to the base address for the tegra_aon_gpio, and 0x0 refers to the Pin AA.00, 0x1 is the GPIO_ACTIVE_LOW (I wonder if this setting is correct, if not what should be the right way to set it)
- recompile the dts to dtb with
sudo dtc -O dtb c.dts -o tegra234-p3701-0000-p3737-0000.dtb
- flash the Orin using
./flash.sh
withinLinux_for_Tegra
Got and error:
[ 4.609612] OF: /pps: could not get #gpio-cells for /aconnect@2a41000/ahub/ports/port@71/endpoint
[ 4.618730] pps-gpio pps: failed to request PPS GPIO
[ 4.623827] pps-gpio: probe of pps failed with error -22
[ 4.629986] device-mapper: uevent: version 1.0.3
Could someone show me the correct way to set it up, thanks!!