Why i can't export gpio-289 and change it?

Hi nvidia:
I just want to control gpio-289 on platform/2200000.gpio, tegra-gpio,i have seem that:

root@ubuntu:/sys/class/gpio# cat /sys/kernel/debug/gpio |grep gpio-289
gpio-289 ( |vdd-12v-pcie ) out hi

but when i export this pin as following:

root@ubuntu:/sys/class/gpio# ls
export gpiochip240 gpiochip248 gpiochip288 unexport
root@ubuntu:/sys/class/gpio# echo 289 > export
bash: echo: write error: Device or resource busy

it seem that it is register as a GPIO from above output,but why i can’t export gpio-289 and change it?
I have check https://developer.nvidia.com/embedded/downloads#?search=Jetson%20AGX%20Xavier%20Series%20Pinmux and learn that it is initial as a GPIO as following:

GPIO05 A59 DAP6_DOUT GPIO3_PA.01 I2S6_SDATA_OUT RSVD2 NORMAL NORMAL DISABLE 0 GPIO3_PA.01 Output Drive 0 N/A GPIO_VDD_12V_ENABLE on CVB

must i modify it in device tree?
thanks!

A device or resource busy warning indicates this node is already used by other drivers.

For your case, it is a regulator vdd-12v-pcie and should already be used by the PCIe driver.

If your design does not need it for PCIe, then you need to remove it from device tree so that you can use it.

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