I might make mistakes. Our support team will step in if needed. If I answered your question, please tick the “Solution” checkbox. For follow-up questions to me, please use @ToradexAI in your post.
Did you like my answer?
Hello! Thank you for your question.
To access GPIOs on your Verdin AM62 using gpioget, the GPIOs must be properly enabled and configured in the device tree. Here’s how you can address this issue:
1. Confirm Device Tree Configuration
Ensure the relevant GPIO controller nodes are enabled (status = "okay";) in your device tree. If a controller (e.g., gpio1) is disabled, GPIO access won’t be available.
Example device tree overlay to enable a GPIO controller:
&gpio1 {
status = "okay";
};
Device tree basics:
Device tree overview:
2. Device Tree Overlays
Toradex provides pre-built device tree overlays for enabling common features and peripherals. You might need to apply a suitable overlay, or create your own, depending on the specific GPIOs you wish to use:
3. Identifying the Correct GPIO Chip and Line
The gpioget 1 0 command refers to the second GPIO chip (chip index 1) and line 0. The actual mapping depends on your kernel’s GPIO numbering and the enabled controllers. You can list available GPIO chips using:
gpiodetect
This lists all GPIO chips. Find the one corresponding to the GPIO you want.
To list lines for a chip:
gpioinfo <chipname>
Replace <chipname> with e.g., gpiochip0, gpiochip1, etc.
4. Review Custom Image Configuration
As you’re building a custom image, make sure you’re not accidentally disabling GPIO support in your Yocto configuration. The reference Yocto image provided by Toradex should have GPIO enabled by default for Verdin AM62:
Summary of Steps
Verify the device tree enables required GPIO controllers.
Use gpiodetect and gpioinfo to check available GPIO chips and lines.
If needed, add or enable a device tree overlay as described in the docs above.
Rebuild and deploy the image with the correct configuration.
If you follow these steps, you should be able to access GPIOs with gpioget on your Verdin AM62 module.
root@verdin-am62-15415775:~# ls
pictures sound video
root@verdin-am62-15415775:~# gpioinfo
gpiochip0 - 3 lines:
line 0: unnamed output
line 1: unnamed output
line 2: unnamed output
gpiochip1 - 24 lines:
line 0: “SODIMM_244” input active-low consumer=“PCIE_1_RESET#”
line 1: “SODIMM_206” input
line 2: “SODIMM_208” input
line 3: “SODIMM_210” input
line 4: “SODIMM_212” input
line 5: unnamed input
line 6: unnamed input
line 7: unnamed input
line 8: unnamed input
line 9: unnamed input
line 10: unnamed input
line 11: unnamed input
line 12: unnamed input
line 13: unnamed input
line 14: unnamed input
line 15: unnamed input
line 16: unnamed input
line 17: unnamed input
line 18: unnamed input
line 19: unnamed input
line 20: unnamed input
line 21: unnamed input
line 22: unnamed input
line 23: unnamed input
gpiochip2 - 92 lines:
line 0: “SODIMM_52” output consumer=“red:debug-1”
line 1: unnamed input
line 2: unnamed input
line 3: “SODIMM_56” output consumer=“red:debug-2”
line 4: “SODIMM_58” output consumer=“green:debug-2”
line 5: “SODIMM_60” input
line 6: “SODIMM_62” input
line 7: unnamed input
line 8: unnamed input
line 9: unnamed input
line 10: unnamed input
line 11: “SODIMM_54” output consumer=“green:debug-1”
line 12: “SODIMM_64” output active-low consumer=“spi0 CS1”
line 13: unnamed input
line 14: unnamed input
line 15: “SODIMM_174” input
line 16: “SODIMM_172” input
line 17: unnamed output active-low consumer=PHY reset
line 18: unnamed input
line 19: unnamed input
line 20: unnamed output active-low consumer=reset
line 21: unnamed output consumer=LDO1-VSEL-SD (PMIC)
line 22: unnamed input
line 23: unnamed input
line 24: unnamed input
line 25: unnamed input
line 26: unnamed input
line 27: unnamed input
line 28: unnamed input
line 29: “SODIMM_76” output consumer=“regulator-sdhci1”
line 30: “SODIMM_21” output active-low consumer=“reset”
line 31: “SODIMM_256” output consumer=“regulator-force-sleep-moci”
line 32: “SODIMM_252” input active-low consumer=“Wake-Up”
line 33: unnamed input
line 34: “SODIMM_46” input
line 35: “SODIMM_42” input
line 36: “SODIMM_218” input
line 37: unnamed input
line 38: “SODIMM_189” input
line 39: unnamed input
line 40: “SODIMM_216” input
line 41: “SODIMM_220” input
line 42: “SODIMM_222” input
line 43: unnamed input
line 44: unnamed input
line 45: unnamed input
line 46: unnamed input
line 47: unnamed input
line 48: unnamed input
line 49: unnamed input
line 50: unnamed input
line 51: unnamed input
line 52: unnamed input
line 53: unnamed input
line 54: unnamed input
line 55: unnamed input
line 56: unnamed input
line 57: unnamed input
line 58: unnamed input
line 59: unnamed input
line 60: unnamed input
line 61: unnamed input
line 62: unnamed input
line 63: unnamed input
line 64: unnamed input
line 65: unnamed input
line 66: unnamed input
line 67: unnamed input
line 68: unnamed input
line 69: unnamed input
line 70: unnamed input
line 71: “SODIMM_157” input
line 72: “SODIMM_187” input
line 73: unnamed input
line 74: unnamed input
line 75: unnamed input
line 76: unnamed input
line 77: unnamed input
line 78: unnamed input
line 79: unnamed input
line 80: unnamed input
line 81: unnamed input
line 82: unnamed input
line 83: unnamed input
line 84: unnamed input
line 85: unnamed input
line 86: unnamed input
line 87: unnamed input
line 88: unnamed input
line 89: unnamed input
line 90: unnamed input
line 91: unnamed input
gpiochip3 - 52 lines:
line 0: unnamed input
line 1: unnamed input
line 2: unnamed input
line 3: unnamed input
line 4: unnamed input
line 5: unnamed input
line 6: unnamed input
line 7: unnamed input
line 8: unnamed input
line 9: unnamed input
line 10: unnamed input
line 11: unnamed input
line 12: unnamed input
line 13: unnamed input
line 14: unnamed input
line 15: “SODIMM_15” input
line 16: “SODIMM_16” input
line 17: “SODIMM_19” input consumer=“hpd”
line 18: “SODIMM_66” input
line 19: “SODIMM_161” input consumer=“id”
line 20: unnamed input
line 21: unnamed input
line 22: unnamed input
line 23: unnamed input
line 24: unnamed input
line 25: unnamed input
line 26: unnamed input
line 27: unnamed input
line 28: unnamed input
line 29: unnamed input
line 30: unnamed input
line 31: unnamed input
line 32: unnamed input
line 33: unnamed input
line 34: unnamed input
line 35: unnamed input
line 36: unnamed input
line 37: unnamed input
line 38: unnamed input
line 39: unnamed input
line 40: unnamed input
line 41: unnamed input
line 42: unnamed input
line 43: unnamed input
line 44: unnamed input
line 45: unnamed input
line 46: unnamed input
line 47: unnamed input
line 48: unnamed input active-low consumer=cd
line 49: “SODIMM_17” input
line 50: “SODIMM_155” output consumer=“regulator-usb0-vbus”
line 51: unnamed input
root@verdin-am62-15415775:~# gpiodetect
gpiochip0 [tps65219-gpio] (3 lines)
gpiochip1 [4201000.gpio] (24 lines)
gpiochip2 [600000.gpio] (92 lines)
gpiochip3 [601000.gpio] (52 lines)
root@verdin-am62-15415775:~# gpioinfo gpiochip0
gpioinfo: cannot find line ‘gpiochip0’
root@verdin-am62-15415775:~# gpiochip2
-sh: gpiochip2: command not found
root@verdin-am62-15415775:~# gpiochip3
-sh: gpiochip3: command not found
root@verdin-am62-15415775:~#
Please remember to tick the “Solution” checkbox below if my response solves your question. If you have follow-up questions, just continue to tag me using @ToradexAI in your new posts.
Did you like my answer?
Hello! Thanks for sharing your output. Your GPIO setup is working correctly—the system detects all four GPIO chips, and you can see the available lines on each. Some clarification on command usage and pin access:
1. Correct Usage of gpioinfo and gpioget/gpioset
Use chip number with gpioinfo, gpioget, and gpioset, not the chip name.
Example:
To list info for gpiochip0 (first chip), run:
gpioinfo 0
To read a line, for example SODIMM_206 (gpiochip1, line 1):
Summary:
Your GPIO subsystem is working—just use chip numbers with gpiodetect, gpioinfo, gpioget, and gpioset as shown above. For pin mapping and advanced configuration, refer to the datasheet and the links above.
Please remember to tick the “Solution” checkbox below if my response solves your question. If you have follow-up questions, just continue to tag me using @ToradexAI in your new posts.
Did you like my answer?
Hello,
It looks like the commands you are using are not matching the correct syntax for your version of the libgpiod utilities. On your Verdin AM62 system, you have the libgpiod 1.x command-line tools, which require you to use the device path (like /dev/gpiochip0), not just the chip number or chip name.
Please try the following commands:
List lines of a GPIO chip
For gpiochip0:
gpioinfo /dev/gpiochip0
For gpiochip1:
gpioinfo /dev/gpiochip1
For gpiochip2:
gpioinfo /dev/gpiochip2
For gpiochip3:
gpioinfo /dev/gpiochip3
Read a specific GPIO line
For example, to read gpiochip1, line 1 (SODIMM_206):
gpioget /dev/gpiochip1 1
Set a GPIO output
For example, to set gpiochip2, line 0 (SODIMM_52) high:
gpioset /dev/gpiochip2 0=1
Common mistakes:
You must provide the full device path (e.g., /dev/gpiochip2), not just the number or the chip name.
There are no commands like gpiochip2 by themselves; they are device nodes, not executables.
Please remember to tick the “Solution” checkbox below if my response solves your question. If you have follow-up questions, just continue to tag me using @ToradexAI in your new posts.
Did you like my answer?
Thank you for testing and providing clear feedback.
Based on these errors, it appears you have a version of the libgpiod utilities that expects a different syntax than either the classic (v1.x) or newer (v2.x) tools. Let’s troubleshoot this step by step:
1. Check Your libgpiod Version
Run the following command to check which version of the utilities you have:
gpiodetect --version
Please let me know the output. It will help determine the correct syntax.
2. Try Listing Chips and Lines by Name
For some older utility versions, the tools expect just the chip name (not number, not path):
Summary:
Your error points to a mismatch between the commands and your libgpiod utility version. Please report the version and try the alternatives above. We’ll adapt based on your findings.