GPIO resource busy

I am concerned about is that after configuring the pinmux as GPIO, i try to read it in system ,so i exporting it under the eMMC system . but it displays Device or resource busy.

root@tegra-ubuntu:/sys/class/gpio# ls
export  gpiochip316  gpiochip348  unexport
root@tegra-ubuntu:/sys/class/gpio# echo 493 > export
root@tegra-ubuntu:/sys/class/gpio# ls
export  gpiochip316  gpiochip348  PAC.07  unexport
root@tegra-ubuntu:/sys/class/gpio# echo 487 > export
bash: echo: write error: Device or resource busy
root@tegra-ubuntu:/sys/class/gpio# echo 488 > export
root@tegra-ubuntu:/sys/class/gpio# echo 489 > export
root@tegra-ubuntu:/sys/class/gpio# echo 490 > export
root@tegra-ubuntu:/sys/class/gpio# echo 491 > export
root@tegra-ubuntu:/sys/class/gpio# echo 492 > export
root@tegra-ubuntu:/sys/class/gpio#
root@tegra-ubuntu:/sys/class/gpio#
root@tegra-ubuntu:/sys/class/gpio#
root@tegra-ubuntu:/sys/class/gpio# ls
export  gpiochip316  gpiochip348  PAC.02  PAC.03  PAC.04  PAC.05  PAC.06  PAC.07  unexport
root@tegra-ubuntu:/sys/class/gpio# echo 486 > export
bash: echo: write error: Device or resource busy
root@tegra-ubuntu:/sys/class/gpio#
root@tegra-ubuntu:/sys/class/gpio#
root@tegra-ubuntu:/sys/class/gpio# sudo cat /sys/kernel/debug/gpio|grep "gpio-486"
 gpio-486 (PAC.00              |camera-control-outpu) out lo
root@tegra-ubuntu:/sys/class/gpio# sudo cat /sys/kernel/debug/gpio|grep "gpio-487"
 gpio-487 (PAC.01              |camera-control-outpu) out lo
root@tegra-ubuntu:/sys/class/gpio#

why this two pins are still used in camera functions.and how can i find these camera-control-outpu node.i grep it in my dts source but i can not find it


i check i do not use the overlay in my exlinux.conf file and i disabled the node then reflash again. it has no effect.

tegra234-p3737-camera-dual-hawk-ar0234-e3653-overlay.dts.txt (10.7 KB)
tegra234-p3737-camera-modules.dtsi.txt (8.2 KB)
这里的.dtbo文件需要替换吗

this is due to the pin has occupied, such the pin is defined for camera usage.

i know that from other topics , we don’t have camera on our custom board and i want to know how to free it and use it as gpio. i see one is for CAM1_PWDN and the other for CAM1_RST_L , Could you give me some suggestions About it ?

[    4.107785] gpio-394 (camera-control-output-low): hogged as output/low
[    4.107816] gpio-397 (camera-control-output-low): hogged as output/low
[    4.107840] gpio-487 (camera-control-output-low): hogged as output/low
[    4.107856] gpio-486 (camera-control-output-low): hogged as output/low

hello wpceswpces,

may I also confirm which Jetpack release version you’re working with,
as you can see, it’s AGX Orin’s main camera device tree to include all camera module sources, and define the CAM1_PWDN pin.
for instance,
$public_sources/kernel_src/hardware/nvidia/platform/t23x/concord/kernel-dts/cvb/tegra234-p3737-camera-modules.dtsi

please try remove that main camera device tree if you’re not have cameras on the customize board.
for example,

diff --git a/tegra234-p3701-0000-p3737-0000.dts b/tegra234-p3701-0000-p3737-0000.dts
@@ -20,7 +20,6 @@
 #include "tegra234-power-tree-p3701-0000-p3737-0000.dtsi"
 #include "tegra234-dcb-p3701-0000-a02-p3737-0000-a01.dtsi"
 #include <tegra234-soc/mods-simple-bus.dtsi>
-#include "cvb/tegra234-p3737-camera-modules.dtsi"

i am using jetpack6.0 (r36.3) ,this directory is not exit. my directory is Linux_for_Tegra/source/hardware/nvidia/t23x/nv-public/overlay/tegra234-p3737-camera-modules.dtsi,actually ,i have remove the gpio@220000 in the tegra234-p3737-camera-modules.dtsi file .i will try to flash again.


it works fine ,Thank you very much JerryChang.

1 Like

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