Jetson orin nano toggling BT enable pin (pin 54 m.2 card)

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

  1. m.2 UART is showing as /dev/ttyTHS4
  2. 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.

Best regards,

Hi pradeep2481,

Are you using the devkit or custom board for Orin Nano?

Yes, GPIO03 is mapping to PCC.00

Have you tried to use sysfs to control this pin?
The default state of this pin in pinmux spreadsheet is Drive 0.

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

Hi KevinFFF,

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.

Best regards,

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 serial@3110000 .

Do you mean that you could control PCC.00 with sysfs but it would not be pulled from oscilloscope?

Hi KevinFFF,

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[1]: Created slice system-serial\x2dgetty.slice.

Best regards,

Could you help to share the result of the following commands?

cat /sys/kernel/debug/pinctrl/2430000.pinmux/pinconf-groups |grep uart
cat /etc/nv_tegra_release
cat /etc/nv_boot_control.conf

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
1 (uart3_rx_pcc6):
2 (uart3_tx_pcc5):
120 (uart2_tx_px4):
121 (uart2_rx_px5):
122 (uart2_rts_px6):
123 (uart2_cts_px7):
124 (uart5_tx_py5):
125 (uart5_rx_py6):
126 (uart5_rts_py7):
127 (uart5_cts_pz0):
152 (uart1_cts_pr5):
153 (uart1_rts_pr4):
154 (uart1_rx_pr3):
155 (uart1_tx_pr2):
157 (uart4_cts_ph6):
158 (uart4_rts_ph5):
159 (uart4_rx_ph4):
160 (uart4_tx_ph3):
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
TNSPEC 3767-300-0005-K.2-1-0-jetson-orin-nano-devkit-
COMPATIBLE_SPEC 3767–0005–1–jetson-orin-nano-devkit-
TEGRA_OTA_BOOT_DEVICE /dev/mtdblock0
TEGRA_OTA_GPT_DEVICE /dev/mtdblock0

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 okay.

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.