Discussion:
[fedora-arm] Jetson Nano: Access to GPIO header serial?
Richard Shaw
2021-04-21 22:39:09 UTC
Permalink
I have an Nvidia Jetson Nano that I was gifted by the Fedora project to
troubleshoot some arm specific packaging issues. That's done now so I
decided to see what else I could do with it.

I found NodeRED which had a module for the Raspberry Pi to control the
GPIO. I have since forked that project and have made some progress porting
it to the Nano.

Now I want to see if I can get the serial header working. From what I can
tell if running the linux OS provided by Nvidia there should be a serial
device named /dev/ttyTHS1 but it's not getting detected AFAICT grepping
through dmesg.

I found the page for the serial-tegra that should be in the linux kernel
but if I try:

# modprobe serial-tegra

Nothing happens, no output if I try adding "-v" as an option either. So
does the module exist or not? If I try some random name in modprobe it
gives an error which makes me think it's present, but it doesn't load and
doesn't give me any helpful reason why.

Ideas?

Thanks,
Richard
Peter Robinson
2021-04-21 23:24:10 UTC
Permalink
I have an Nvidia Jetson Nano that I was gifted by the Fedora project to troubleshoot some arm specific packaging issues. That's done now so I decided to see what else I could do with it.
I found NodeRED which had a module for the Raspberry Pi to control the GPIO. I have since forked that project and have made some progress porting it to the Nano.
From a GPIO PoV you should look at libgpiod and related pieces for
access to the GPIO, there's some threads about this on the mailing
list so look at the archives as a starter.
Now I want to see if I can get the serial header working. From what I can tell if running the linux OS provided by Nvidia there should be a serial device named /dev/ttyTHS1 but it's not getting detected AFAICT grepping through dmesg.
The nano has two types of serial port, a traditional 8250 style UART,
of which the driver is built into the kernel as it's needed for the
serial console. The debug UART is the only one of those that is
enabled by default but there is 4 of them, there's also the HS UART
which is a high speed UART.
# modprobe serial-tegra
Nothing happens, no output if I try adding "-v" as an option either. So does the module exist or not? If I try some random name in modprobe it gives an error which makes me think it's present, but it doesn't load and doesn't give me any helpful reason why.
I don't see the hsuart in the device tree, but there's some notes
there, I believe you need to configure one or the other but it will
likely need changes to the device tree which is why you won't see it.

I'm also not sure what the hsuart has to do with GPIO.

Peter
_______________________________________________
arm mailing list -- ***@lists.fedoraproject.org
To unsubscribe send an email to arm-***@lists.fedoraproject.org
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/***@lists.fedoraproject.org
Do not reply to spam on the list, report it: https://pagure.io/fedora-
Richard Shaw
2021-04-22 12:30:00 UTC
Permalink
Post by Richard Shaw
Post by Richard Shaw
I have an Nvidia Jetson Nano that I was gifted by the Fedora project to
troubleshoot some arm specific packaging issues. That's done now so I
decided to see what else I could do with it.
Post by Richard Shaw
I found NodeRED which had a module for the Raspberry Pi to control the
GPIO. I have since forked that project and have made some progress porting
it to the Nano.
From a GPIO PoV you should look at libgpiod and related pieces for
access to the GPIO, there's some threads about this on the mailing
list so look at the archives as a starter.
That's essentially what I did, but I'm currently using the utilities
(gpioset, gpiomon) so I don't need python which reduces the number of
dependencies.
Post by Richard Shaw
Post by Richard Shaw
Now I want to see if I can get the serial header working. From what I
can tell if running the linux OS provided by Nvidia there should be a
serial device named /dev/ttyTHS1 but it's not getting detected AFAICT
grepping through dmesg.
The nano has two types of serial port, a traditional 8250 style UART,
of which the driver is built into the kernel as it's needed for the
serial console. The debug UART is the only one of those that is
enabled by default but there is 4 of them, there's also the HS UART
which is a high speed UART.
I'm guessing it's the latter, but yes, I want to use the serial on the J41
header in NodeRED.
Post by Richard Shaw
Post by Richard Shaw
I found the page for the serial-tegra that should be in the linux kernel
# modprobe serial-tegra
Nothing happens, no output if I try adding "-v" as an option either. So
does the module exist or not? If I try some random name in modprobe it
gives an error which makes me think it's present, but it doesn't load and
doesn't give me any helpful reason why.
I don't see the hsuart in the device tree, but there's some notes
there, I believe you need to configure one or the other but it will
likely need changes to the device tree which is why you won't see it.
So serial-tegra is not the correct way to go?


I'm also not sure what the hsuart has to do with GPIO.
It doesn't directly, but pins 6, 8, & 10 of the J41 header (generically
referred to as the GPIO header) is for serial use.

Thanks,
Richard

Loading...