Hello, I’ve read as many forum threads I can find on enabling PPS input using a device tree overlay but I think there must have been some changes since the Jetpack versions that were being used at the time the posts were made. I’ve run into an error that I can’t seem to work around and wanted to gather input. Here is the workflow so far, and the error I’m facing.
- I have the following
jetson_nano_pps.dts
file following examples on many other threads. One thing to note, I am having a hell of a time trying to trace the pin/GPIO numbers and 148 is copied from others. I am trying to target Pin 7 on the J41 header (the same as posted on this blog that many others reference, however instead of recompiling the kernel I need to apply an overlay due to my application: Enabling PPS on Jetson Nano)
/dts-v1/;
/plugin/;
/ {
overlay-name = "PPS Input";
jetson-header-name = "Jetson 40pin Header";
compatible = "nvidia,p3449-0000-b00+p3448-0000-b00", "nvidia,p3449-0000-a02+p3448-0000-a02";
fragment {
target-path = "/";
__overlay__ {
pps: pps_gpio {
compatible = "pps-gpio";
gpios = <&tegra_main_gpio 148 1>;
assert-falling-edge;
status = "okay";
};
};
};
};
-
I have generated a jetson_nano_pps.dtbo file using the following command.
sudo sudo dtc -O dtb -o /boot/jetson_nano_pps.dtbo -@ /home/nvidia/Downloads/jetson_nano_pps.dts
-
I can see the “PPS Input” as an option when running the following Jetson IO command.
sudo /opt/nvidia/jetson-io/config-by-hardware.py -l
This produces an warning that was noted by others but apparently doesn’t matter (according to the replies to the previous threads). Warning (gpios_property): Could not get phandle node for /fragment/__overlay__/pps_gpio:gpios
- When attempting to apply the overlay using Jetson IO, I receive a very non-descript error as follows, which is where I am stuck.
sudo /opt/nvidia/jetson-io/config-by-hardware.py -n "PPS Input"
Traceback (most recent call last):
File "/opt/nvidia/jetson-io/config-by-hardware.py", line 125, in <module>
main()
File "/opt/nvidia/jetson-io/config-by-hardware.py", line 121, in main
generate_dtb(jetson, dtbos)
File "/opt/nvidia/jetson-io/config-by-hardware.py", line 44, in generate_dtb
fn = jetson.create_dtb_for_headers(dtbos)
File "/opt/nvidia/jetson-io/Jetson/board.py", line 376, in create_dtb_for_headers
dtc.overlay(self.dtb, dtb, dtbos)
File "/opt/nvidia/jetson-io/Utils/dtc.py", line 53, in overlay
raise RuntimeError("Failed to overlay %s with %s!" % (dtb, files))
RuntimeError: Failed to overlay /boot/dtb/kernel_tegra210-p3448-0000-p3449-0000-b00.dtb with /boot/jetson_nano_pps.dtbo!
Unfortunately there are no comments in the /opt/nvidia/jetson-io/Utils/dtc.py
file, but the function that is erroring is as follows.
def overlay(dtb, out, overlays):
for overlay in overlays:
__files_exist(dtb, overlay)
files = ' '.join(overlays)
if syscall.call('fdtoverlay -i "%s" -o "%s" %s' % (dtb, out, files)):
raise RuntimeError("Failed to overlay %s with %s!" % (dtb, files))
Adding some debug print statements into this file I arrived at the following command that is being compiled by the function: fdtoverlay -i "/boot/dtb/kernel_tegra210-p3448-0000-p3449-0000-b00.dtb" -o "/boot/kernel_tegra210-p3448-0000-p3449-0000-b00-user-custom.dtb" /boot/jetson_nano_pps.dtbo
Unfortunately the only output from running this command manually is Failed to apply /boot/jetson_nano_pps.dtbo (-1)
.
Any help would be greatly appreciated. Is there an error in how I am structuring the dts file? From everything I’ve read from the nvidia docs and from inspecting other dts files that shouldn’t be the case.
Thanks.