GPIO06/267 Device or resource busy

I would like to use the GPIO06 (sysfs GPIO267) on my Jetson NX Xavier module without the Carrier Board.
When I type:
$ echo 267> /sys/class/gpio/export
I have this error :
-bash: echo: write error: Device or resource busy

Can you help me
thank you

hello valery1,

this messages indicate that pin is already created or occupied by other process,
may I know what’s your actual use-case,

I understood that the GPIO06 / SYSFS GPIO267 is busy,
but I don’t understand why.
It does not exist in the /sys/class/gpio/ folder
What process can use this pin against my will?
I just want to use the GPIO06 as an input.


hello valery1,

according to pinmux spreadsheets, this has already configured as GPIO pins.
could you please also refer to Topic 144550, for several ways to access GPIOs. such as, kernel APIs, python scripts, C++ samples.

I want to test this GPIO06/267 in command line or script bash.
Like this :
cat /sys/class/gpio/gpio267/value

Where and how can i do this ?


hello valery1,

you may also check debug fs for the GPIO,
i.e. # cat /sys/kernel/debug/gpio

When i do cat /sys/kernel/debug/gpio i have this result :

root@jetsonnx-desktop:/sys/kernel/debug# cat gpio
gpiochip2: GPIOs 240-247, parent: platform/max77620-gpio, max77620-gpio, can sleep:
gpio-246 ( |gpio_default ) out hi
gpio-247 ( |gpio_default ) out hi

gpiochip1: GPIOs 248-287, parent: platform/c2f0000.gpio, tegra-gpio-aon:
gpio-253 ( |pex-refclk-sel-low ) out lo
gpio-266 ( |vdd-usb2-5v ) out hi
gpio-267 ( |i2c-mux-gpio ) out hi
gpio-284 ( |power-key ) in hi

gpiochip0: GPIOs 288-511, parent: platform/2200000.gpio, tegra-gpio:
gpio-336 ( |force-recovery ) in hi
gpio-338 ( |vdd-sdmmc1-sw ) out hi
gpio-339 ( |wifi-enable ) out hi
gpio-343 ( |cd ) in lo
gpio-378 ( |pcie_wake ) in hi
gpio-385 ( |hdmi2.0_hpd ) in lo
gpio-392 ( |avdd-cam-2v8 ) out lo
gpio-412 ( |cam_reset_gpio ) out lo
gpio-413 ( |cam_reset_gpio ) out lo
gpio-419 ( |sysfs ) out hi
gpio-421 ( |sysfs ) out hi
gpio-425 ( |eqos_phy_reset ) out hi
gpio-489 ( |external-connection:) in hi

Can i delete this line gpio-267 ( |i2c-mux-gpio ) out hi to resolve my problem ?
I use I2C Bus 1 and I2C Bus 8 in my application.

hello valery1,

it’s default configuration; you’ll need to have pinmux customization to update the board configuration file.
please access download center for the pinmux spreadsheets, please also refer to MB1 Platform Configuration for documentation.

The pinmux customization can only be done before flashing the Jetson NX Xavier module?

hello valery1,

yes, you can only perform image flashing to update the board configuration file.
please also refer to Configuring the 40-Pin Expansion Header, here’s Jetson-IO python tool to simplify the configuration.