[36.2] problem of using gpio to control LED

We use OrinNX 16GB SOM with our Xavier NX carrier board.
All LEDs can be controlled at Jetson Linux 35.3.1 and 35.4.1; however, in 36.2 we cannot light those LEDs up.

In 36.2, we can use echo 1 > /sys/class/leds/wifi-led/brightness, and we can get a correct result from cat /sys/class/leds/wifi-led/brightness.
When we use cat /sys/kernel/debug/gpio to check the change of led gpio, it is correct to see the change of the gpio.
However, the LED did not light up.

您好,我們使用OrinNX 16GB SOM於我們的開發版,在Jetson Linux 35.3.1 以及 35.4.1版本OS時,LEDs都可以正常被控制。

然而,我們發現在Jetson Linux 36.2的時候,所有的LEDs燈無法被點亮。
如附件commands.txt,我們使用echo 1 或者 echo 0 > /sys/class/leds/wifi-led/brightness,LED都沒有反應,但是cat /sys/class/leds/wifi-led/brightness都有看到1與0的變化。
且在cat /sys/kernel/debug/gpio也有看到hi以及lo的變化,但是LED都沒有反應。

我們HW engineer有使用電表量測,也沒有看到電流變化。

此狀況在35.3.1 and 35.4.1都沒有遇到,只發生在36.2,是不是我們的36.2 的device tree需要額外設定呢,感謝。

eth0-led: TEGRA234_MAIN_GPIO(H, 0)
eth0-speed-led1: TEGRA234_AON_GPIO(EE, 2)
eth0-speed-led2: TEGRA234_MAIN_GPIO(N, 1)
eth1-led: TEGRA234_MAIN_GPIO(Q, 2)
uart0-led: TEGRA234_MAIN_GPIO(Y, 2)
uart1-led: TEGRA234_MAIN_GPIO(Y, 1)
can-led: TEGRA234_MAIN_GPIO(Y, 0)
wifi-led: TEGRA234_MAIN_GPIO(Y, 3)
lte-led: TEGRA234_MAIN_GPIO(Y, 4)

commands.txt (8.3 KB)
tegra234-p3768-0000+p3767-xxxx-nv-common.dtsi.txt (8.3 KB)

The way of programming device tree is different in Jetpack 6(based on K5.15). Please refer to developer guide of Jetpack 6.0DP for more information.

1 Like

Hi DaneLLL

I have same question about 36.2 GPIO , We use libgpiod tool to set gpio status, gpio pin still not any change.

Could you tell me , which chapter on Jetpack 6.0DP develop Guide about gpio control information?

Until now, in the Develop Guide of Jetpack 6.0DP version, the control method of gpio is still written as the method of Jetpack 5.0.2, although Jetpack 6.0DP has turned off CONFIG_GPIO_SYSFS, as shown in the following URL:
Jetson AGX Orin Platform Adaptation and Bring-Up — NVIDIA Jetson Linux Developer Guide 1 documentation

Best Regards


GPIO sysfs has been deprecated on rel-36. Please use libgpiod to control. https://lloydrochester.com/post/hardware/libgpiod-intro-rpi/

@jack_lan ,
I think you should read the website: Pinmux and GPIO Configuration — NVIDIA Jetson Linux Developer Guide 1 documentation

Additionally, you can read your pinmux file for the reference. For example, the pinmux file is at mfi_XXXXX-YYY/bootloader/tegra234-mb1-bct-pinmux-p3767-hdmi-a03.dtsi

Hi fengying_chu

Pinmux is used to define pin functions. Our platform is all upgraded hardware that has been verified in JP5. I think there will be no problem with the GPIO settings in Pinmux.

The question now is, how to control the function of GPIO when JP6.

Best Regards

@jack_lan ,
As DaneLLL said, there is quite different between JP5 and JP6 on the way of programming device tree.
That is to said, in JP6, you should add or modify something on your DTS file by following the developer guide of Jetpack 6.0DP, in order to control the function of GPIO.

Actually the method to control GPIO is already mentioned in previous post…

You don’t need to configure device tree.

Hi WayneWWW

We follow your information try to use libgpiod control GPIO.

I have install libgpio-dev and gpiod tool , and try to control gpio status with gpioset.

However we set gpio status with gpioset , gpio status not change.

Set GPIO pin is high use command: sudo gpioset gpiochip1 137=1

But sudo gpioget gpiochip1 137 show status is 0.

Best Regards

May I check your result from command gpioinfo?

Hi fengying_chu

I can’t find any information in the Develop Guide about additionally modifying the Device Tree to enable gpio.

The URL you provided before is only the dtsi generated through pinmux table. This format is exactly the same as JP5, and the xlsm of pinmux table has not been updated since February. (Maybe JP6 will be updated again… I don’t know)

Can your GPIO be controlled by JP6?


Hi @jack_lan ,
The attachment is my tegra234-p3768-0000+p3767-xxxx-nv-common.dtsi. You can use it to compare with the original one.
With my tegra234-p3768-0000+p3767-xxxx-nv-common.dtsi, I can control all leds by echo 1 > /sys/class/leds/XXXX-led/brightness.

Therefore, I can control the GPIOs now.

tegra234-p3768-0000+p3767-xxxx-nv-common.dtsi.txt (10.1 KB)

Hi fengying_chu

Very Thanks , I can control gpio status by add I want control gpio pin to device tree.


1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.