How to use Orin nano GPIO?

IDE:jeston 36.0
JetPack6.0
core board:orin Nano4GB
board:Jetson Orin Nano Developer Kit
kernel source: Jetson Linux 36.3 | NVIDIA Developer
rootfs source: Basic Flavor Root File System Root File System — NVIDIA Jetson Linux Developer Guide 1 documentation

pinmux download source: Jetson Download Center | NVIDIA Developer
Jetson Orin NX Series and Jetson Orin Nano Series Pinmux
See pinmux CAM0 PWDN corresponding to GPIO3 PH.06.

Use gpioinfo to see that CAM0 PWDN corresponds to PH_0.3

ys@tegra-ubuntu:~$ sudo gpioinfo
[sudo] password for ys:
gpiochip0 - 164 lines:
       line  23:      "PE.02"       unused   input  active-high
        line  24:      "PE.03"       unused   input  active-high
        line  25:      "PE.04"       unused   input  active-high
        line  26:      "PE.05"       unused   input  active-high
        line  27:      "PE.06"       unused   input  active-high
        line  28:      "PE.07"       unused   input  active-high
        line  29:      "PF.00"       unused   input  active-high
        line  30:      "PF.01"       unused   input  active-high
        line  31:      "PF.02"       unused   input  active-high
        line  32:      "PF.03"       unused   input  active-high
        line  33:      "PF.04"       unused   input  active-high
        line  34:      "PF.05"       unused   input  active-high
        line  35:      "PG.00" "Force Recovery" input active-low [used]
        line  36:      "PG.01"       unused   input  active-high
        line  37:      "PG.02"    "Suspend"   input   active-low [used]
        line  38:      "PG.03"       unused   input  active-high
        line  39:      "PG.04"       unused   input  active-high
        line  40:      "PG.05"       unused   input  active-high
        line  41:      "PG.06"       unused   input  active-high
        line  42:      "PG.07"       unused   input  active-high
        line  43:      "PH.00"       unused   input  active-high
        line  44:      "PH.01"       unused   input  active-high
        line  45:      "PH.02"       unused   input  active-high
        line  46:      "PH.03" "camera-control-output-low" output active-high [used]
        line  47:      "PH.04"       unused   input  active-high
        line  48:      "PH.05"       unused   input  active-high
        line  49:      "PH.06"       unused  output  active-high
        line  50:      "PH.07"       unused   input  active-high
        line  51:      "PI.00"       unused   input  active-high
        line  52:      "PI.01"       unused   input  active-high
        line  53:      "PI.02"       unused   input  active-high
        line  54:      "PI.03"       unused   input  active-high

Why is that? What’s wrong?
I want to control the output high and low level of this pin. How should I operate?

Hello,

The output line 46: "PH.03" "camera-control-output-low" output active-high [used] means this GPIO is being used by a driver, If you try to use this GPIO the kernel will say is busy.

This GPIO is used to set an initial value to power on a camera For example, In some part of your device tree you have a node like this:

#define CAM0_PWDN	TEGRA234_MAIN_GPIO(H, 6)

			gpio@2200000 {
				camera-control-output-low {
					gpio-hog;
					output-low;
					gpios = <CAM0_PWDN 0>;
					label ="cam0-pwdn";
				};

If this is not required for you, you can remove the node and control the GPIO from a user space app.

Manuel Leiva
Embedded SW Engineer at RidgeRun
Contact us: support@ridgerun.com
Developers wiki: https://developer.ridgerun.com
Website: www.ridgerun.com

1 Like

thank you

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