I want to use m.2 card UART for BT. The BT chip needs BT enable pin (pin 54 m.2 card) toggling for firmware downloading.
Based on my current understanding
- m.2 UART is showing as /dev/ttyTHS4
- BT enable is connected to GPIO3 which is represented in Linux as GPIO3_pcc-00 (Line 12 of GPIOCHIP 1)
Does my understanding is correct?
I see the GPIO3_pcc-00 pin default value is 0 . when I set the value using gpioset to 1 it gets resets the value back to 0 immediately. What could be the issue?
Do I have to define the GPIO in the device tree with correct pinmux configuration? If then can you guide me which dts file to use. I am not able to find the correct dts files for the Jetson Orin Nano.
Are you using the devkit or custom board for Orin Nano?
Yes, GPIO03 is mapping to
Have you tried to use sysfs to control this pin?
The default state of this pin in pinmux spreadsheet is
Yes, you should configure the pinmux before using the pins.
You could refer to the following instruction.
Jetson Orin NX and Nano Series — Generating the Pinmux dtsi Files
Thank you so much for your quick reply.
I am using the devkit for Orin Nano. Does by default the pinmux configuration is already available in the case of devkit?
Which are the dts files for the Orin Nano devkit?
Also m.2 UART is mapped as /dev/ttyTHS4 does this is correct?
Tried with sysfs export the value of the GPIO I am able to change, but it looks like the actual pin logic levels are not getting changed.
It depends on which model of Orin Nano you are using.
You could check which dtb in use from flash log.
You could check serial console log about which node is mapping to
Do you mean that you could control
PCC.00 with sysfs but it would not be pulled from oscilloscope?
I am not seeing any “serial@3110000” from the logs (see below). My understanding is that it is “serial@0x3140000”
root@pradeep-nvidia-jorin:/home/pradeep# dmesg | grep tty
[ 0.000000] Kernel command line: root=/dev/mmcblk1p1 rw rootwait rootfstype=ext4 mminit_loglevel=4 console=ttyTCU0,115200 console=ttyAMA0,115200 firmware_class.path=/etc/firmware fbcon=map:0 net.ifnames=0
[ 0.239051] 31d0000.serial: ttyAMA0 at MMIO 0x31d0000 (irq = 65, base_baud = 0) is a SBSA
[ 1.391718] printk: console [ttyAMA0] enabled
[ 3.887249] printk: console [ttyTCU0] enabled
[ 6.944699] 3100000.serial: ttyTHS0 at MMIO 0x3100000 (irq = 17, base_baud = 0) is a TEGRA_UART
[ 6.960683] 3130000.serial: ttyTHS3 at MMIO 0x3130000 (irq = 63, base_baud = 0) is a TEGRA_UART
[ 6.976639] 3140000.serial: ttyTHS4 at MMIO 0x3140000 (irq = 64, base_baud = 0) is a TEGRA_UART
[ 14.658753] systemd: Created slice system-serial\x2dgetty.slice.
Could you help to share the result of the following commands?
cat /sys/kernel/debug/pinctrl/2430000.pinmux/pinconf-groups |grep uart
Have you modified the pinmux for UART or you are just using the default configuration?
root@pradeep-nvidia-jorin:/home/pradeep# cat /sys/kernel/debug/pinctrl/2430000.pinmux/pinconf-groups |grep uart
root@pradeep-nvidia-jorin:/home/pradeep# cat /etc/nv_tegra_release
R35 (release), REVISION: 3.1, GCID: 32827747, BOARD: t186ref, EABI: aarch64, DATE: Sun Mar 19 15:19:21 UTC 2023
root@pradeep-nvidia-jorin:/home/pradeep# cat /etc/nv_boot_control.conf
I am using the default pinmux
Could you also share the result of the following commands on your board?
$ sudo su
# cat /proc/device-tree/serial@3140000/status
# cat /proc/device-tree/serial@3110000/status
# cat /proc/device-tree/serial@3100000/status
pradeep@pradeep-nvidia-jorin:~$ sudo su
[sudo] password for pradeep:
root@pradeep-nvidia-jorin:/home/pradeep# cat /proc/device-tree/serial@3140000/status
okayroot@pradeep-nvidia-jorin:/home/pradeep# cat /proc/device-tree/serial@3110000/status
disabledroot@pradeep-nvidia-jorin:/home/pradeep# cat /proc/device-tree/serial@3100000/status
So serial@3110000 is disabled.
yes, please help to enable it from the device tree through configure status to
Thank you so much for the info. Is there any way to dynamically enable the status to okay in the device tree during run time?
You could add the custom overlay dtbo and modify the extlinux.conf to load it at boot up, but I will still suggest you modifying the device tree and flash it to your board to apply it correctly.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.