AM62: gpiod pin identification

Hello,

In the past, I worked with the libgpiod library on the Verdin iMX8M-Plus platform, where there were 5 gpiochips, each exposing 32 lines (pins), as shown below. Toradex provides a helpful page explaining how to map chips and lines to GPIO numbers based on the datasheet: GPIO Alphanumeric to GPIO Numeric Assignment | Toradex Developer Center

root@verdin-imx8mp-06848982:~# gpioinfo
gpiochip0 - 32 lines:
        line   0:       "SODIMM_206"            input
        line   1:       "SODIMM_208"            input
        line   2:       unnamed                 input
        line   3:       unnamed                 input
        line   4:       unnamed                 input
        line   5:       "SODIMM_210"            input
        line   6:       "SODIMM_212"            input
        line   7:       "SODIMM_216"            input
        line   8:       "SODIMM_218"            input
        line   9:       unnamed                 output
        line  10:       unnamed                 input
        line  11:       "SODIMM_16"             input
        line  12:       "SODIMM_155"            output consumer="regulator-usb1-vbus"
        line  13:       "SODIMM_157"            input
        line  14:       "SODIMM_185"            output consumer="regulator-usb2-vbus"
        line  15:       "SODIMM_91"             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
        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
gpiochip1 - 32 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:       "SODIMM_143"            input
        line   7:       "SODIMM_141"            input
        line   8:       unnamed                 input
        line   9:       unnamed                 input
        line  10:       "SODIMM_161"            input consumer="id"
        line  11:       unnamed                 output consumer=regulator-wifi-en
        line  12:       "SODIMM_84"             input active-low consumer="cd"
        line  13:       "SODIMM_78"             input
        line  14:       "SODIMM_74"             input
        line  15:       "SODIMM_80"             input
        line  16:       "SODIMM_82"             input
        line  17:       "SODIMM_70"             input
        line  18:       "SODIMM_72"             input
        line  19:       unnamed                 input
        line  20:       unnamed                 output consumer=regulator-module-eth1phy
        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
gpiochip2 - 32 lines:
        line   0:       "SODIMM_52"             input
        line   1:       "SODIMM_54"             input
        line   2:       unnamed                 input
        line   3:       unnamed                 input
        line   4:       unnamed                 input
        line   5:       unnamed                 input
        line   6:       "SODIMM_56"             input
        line   7:       "SODIMM_58"             input
        line   8:       "SODIMM_60"             input
        line   9:       "SODIMM_62"             input
        line  10:       unnamed                 input
        line  11:       unnamed                 input
        line  12:       unnamed                 input
        line  13:       unnamed                 input
        line  14:       "SODIMM_66"             input
        line  15:       unnamed                 input
        line  16:       "SODIMM_64"             input
        line  17:       unnamed                 input
        line  18:       unnamed                 input
        line  19:       "SODIMM_34"             input
        line  20:       "SODIMM_19"             input
        line  21:       unnamed                 input
        line  22:       "SODIMM_32"             input
        line  23:       unnamed                 input
        line  24:       unnamed                 input
        line  25:       "SODIMM_30"             input
        line  26:       "SODIMM_59"             output drive=open-drain consumer="scl"
        line  27:       "SODIMM_57"             input drive=open-drain consumer="sda"
        line  28:       "SODIMM_63"             input
        line  29:       "SODIMM_61"             input
        line  30:       unnamed                 input
        line  31:       unnamed                 input
gpiochip3 - 32 lines:
        line   0:       "SODIMM_252"            input active-low consumer="Wake-Up"
        line   1:       "SODIMM_222"            input
        line   2:       "SODIMM_36"             input
        line   3:       "SODIMM_220"            input
        line   4:       "SODIMM_193"            input
        line   5:       "SODIMM_191"            input
        line   6:       "SODIMM_201"            input
        line   7:       "SODIMM_203"            input
        line   8:       "SODIMM_205"            input
        line   9:       "SODIMM_207"            input
        line  10:       "SODIMM_199"            input
        line  11:       "SODIMM_197"            input
        line  12:       "SODIMM_221"            input
        line  13:       "SODIMM_219"            input
        line  14:       "SODIMM_217"            input
        line  15:       "SODIMM_215"            input
        line  16:       "SODIMM_211"            input
        line  17:       "SODIMM_213"            input
        line  18:       "SODIMM_189"            input
        line  19:       "SODIMM_244"            output active-low consumer="PCIe reset"
        line  20:       "SODIMM_38"             input
        line  21:       unnamed                 input
        line  22:       "SODIMM_76"             output consumer="regulator-usdhc2"
        line  23:       "SODIMM_135"            input
        line  24:       "SODIMM_133"            input
        line  25:       "SODIMM_17"             input
        line  26:       "SODIMM_24"             input
        line  27:       "SODIMM_26"             input
        line  28:       "SODIMM_21"             output consumer="enable"
        line  29:       "SODIMM_256"            output consumer="regulator-force-sleep-moci"
        line  30:       "SODIMM_48"             input
        line  31:       "SODIMM_44"             input
gpiochip4 - 32 lines:
        line   0:       "SODIMM_42"             output active-low consumer="reset"
        line   1:       "SODIMM_46"             output consumer="enable"
        line   2:       "SODIMM_187"            input
        line   3:       "SODIMM_20"             input
        line   4:       "SODIMM_22"             input
        line   5:       "SODIMM_15"             input
        line   6:       "SODIMM_196"            input
        line   7:       "SODIMM_200"            input
        line   8:       "SODIMM_198"            input
        line   9:       "SODIMM_202"            output active-low consumer="spi1 CS0"
        line  10:       unnamed                 input
        line  11:       unnamed                 input
        line  12:       unnamed                 input
        line  13:       unnamed                 input
        line  14:       unnamed                 output drive=open-drain consumer=scl
        line  15:       unnamed                 input drive=open-drain consumer=sda
        line  16:       "SODIMM_55"             output drive=open-drain consumer="scl"
        line  17:       "SODIMM_53"             input drive=open-drain consumer="sda"
        line  18:       "SODIMM_95"             output drive=open-drain consumer="scl"
        line  19:       "SODIMM_93"             input drive=open-drain consumer="sda"
        line  20:       "SODIMM_14"             output drive=open-drain consumer="scl"
        line  21:       "SODIMM_12"             input drive=open-drain consumer="sda"
        line  22:       "SODIMM_129"            input
        line  23:       "SODIMM_131"            input
        line  24:       "SODIMM_137"            input
        line  25:       "SODIMM_139"            input
        line  26:       "SODIMM_147"            input
        line  27:       "SODIMM_149"            input
        line  28:       "SODIMM_151"            input
        line  29:       "SODIMM_153"            input
        line  30:       unnamed                 input
        line  31:       unnamed                 input
root@verdin-imx8mp-06848982:~# gpioinfo --version
gpioinfo (libgpiod) v2.1.2

However, when I now check the GPIO layout on the Verdin AM62 platform using gpioinfo, the output appears quite different. For example:

  • gpiochip0 only exposes 3 lines.
  • Other chips, like gpiochip2, have as many as 92 lines, which is quite unusual.
root@verdin-am62-15564022:~# 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"             input
        line   1:       unnamed                 input
        line   2:       unnamed                 input
        line   3:       "SODIMM_56"             input
        line   4:       "SODIMM_58"             input
        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"             input
        line  12:       "SODIMM_64"             input
        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                 output active-low consumer=reset
        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

According to the Verdin AM62 datasheet, the SODIMM_217 pin is labeled as GPIO0_91 in the ALT7 column. Based on that, I was expecting to find GPIO0 with at least 92 lines—but gpiochip0 has only 3 lines.

This discrepancy makes it difficult to determine which gpiochip and line correspond to SODIMM_217.

Could you please clarify how GPIO mappings work on the Verdin AM62, and possibly update the documentation page linked above to include guidance for AM62 platforms?

Thank you!

Best regards,
MF

Hi, I’m the Toradex AI Assistant.

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? :+1: :-1:


Hello MF,

Thank you for your detailed description and for raising this excellent question!

You’re correct in observing that the GPIO mapping and presentation in the kernel (and thus via libgpiod tools) are quite different between the Verdin iMX8M-Plus (NXP) and Verdin AM62 (TI) platforms. This is due to differences in the SoC designs and how their GPIO controllers are exposed to Linux.

Why Are the GPIO Chips Mapped Differently?

  • SoC Architecture: Each vendor structures their GPIO banks uniquely. For example, NXP’s i.MX8M-Plus SoC provides several banks of 32 pins each, resulting in your observed 5 x 32-line gpiochips.
  • TI AM62: The AM62’s GPIO controller banks and Linux binding expose different numbers of lines per chip. Some chips (like gpiochip2) might aggregate multiple banks or support more pins, while others (like gpiochip0) could correspond to internal signals or special functions.

How to Reliably Access GPIOs on Toradex Verdin (Both iMX8M-Plus & AM62)

The GPIO chip and line numbers should not be considered stable between platforms, BSP versions, or device trees. This is why Toradex recommends using SODIMM pin names for GPIO access wherever possible, which abstracts away these low-level mappings.

To Find the Mapping for a SODIMM Pin (e.g., SODIMM_217 / GPIO0_91):

  1. Use gpiofind (see docs):
    This tool finds the actual gpiochip and line number for a given SODIMM pin label.

    gpiofind SODIMM_217
    

    The output will reveal the chip and offset for direct use.

  2. List All SODIMM-Exposed GPIOs:

    gpioinfo | grep SODIMM
    

    This shows every GPIO line on every chip that’s exported with a SODIMM label.
    Reference: Toradex GPIO Peripheral Access - libgpiod

  3. Why SODIMM Pin Names Are Preferred:

    • Linux kernel device trees map physical pins to these logical names.
    • This protects your application from SoC- and BSP-specific internal organization differences.
    • Your code (and scripts) will remain portable from Verdin iMX8M-Plus to Verdin AM62 (and future modules) as long as you refer to SODIMM labels.
  4. Coding Practice Example:
    When working with libgpiod in your software, always open the GPIO line by name, not by chip/line numbers:

    // C code using libgpiod
    struct gpiod_chip *chip = gpiod_chip_open_by_name("SODIMM_217");
    

    Or on the command line:

    gpioset $(gpiofind SODIMM_217)=1
    

(More on accessing GPIO by name)

Summary & Documentation Notes

  • It’s expected to see different gpiochips and line counts on different Verdin modules; always use SODIMM names for portability.
  • The current GPIO mapping documentation promotes this approach, but if you feel a clarifying note for the AM62 would help, that’s excellent feedback!
  • You do not need to know the chip/line mapping for most tasks; rely on the abstraction provided in the Toradex BSPs.

Usage Quick Reference

  • To find SODIMM_217 (for example):

    gpiofind SODIMM_217
    
  • To get all exposed SODIMM lines:

    gpioinfo | grep SODIMM
    
  • For best code portability, always use SODIMM names with libgpiod.

If you have any follow-up questions about a specific SODIMM or pad, or scripting with libgpiod, please let me know!

Best regards,
Toradex AI Assistant


References:

@ToradexAI: I intentionally chose SODIMM_217 as an example because it is not a standard GPIO pin exported by Toradex in the default device tree. If I configure the pin for its alternate function as GPIO0_91, how can I determine which gpiochip and line it corresponds to?

Thanks for your response.

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? :+1: :-1:


Hello!

That’s a great, in-depth follow-up—and your scenario is common when customizing GPIO usage on the Verdin AM62 platform.

You’re correct:

  • SODIMM_217 is not exported as a GPIO by default.
  • When you configure it in the device tree as GPIO0_91, the mapping to gpiochip/line is not immediately obvious, especially since the AM62’s gpiochips do not line up 1:1 with GPIO bank numbers like on i.MX8M-Plus.

Here’s how you can proceed:


1. Update the Device Tree to Enable SODIMM_217 as GPIO

First, you must create a custom device tree (or overlay) that muxes SODIMM_217 as GPIO0_91.
For guidance:

The general approach:

/* Example: enable SODIMM_217 as GPIO0_91 */

&main_pmx0 {
    custom_gpio0_91_pins: custom-gpio0-91-pins {
        pinctrl-single,pins = <
            /* OFFSET/MUX: adjust to your SoC's pinmux options */
            AM62X_IOPAD(SODIMM_217_PAD, PIN_INPUT_PULLUP, MUX_MODE_GPIO)
        >;
    };
};

&gpio0 {
    pinctrl-names = "default";
    pinctrl-0 = <&custom_gpio0_91_pins>;
    /* Optionally add gpio-line-names here, see below */
};

The specifics will depend on the AM62 device tree binding and pad naming. Use this as a template.


2. Add a gpio-line-names Entry (Highly Recommended!)

To make the pin easily discoverable with gpiod tools, add a gpio-line-names property and include SODIMM_217 at the correct position—index 91 for GPIO0_91.

Example:

&gpio0 {
    gpio-line-names = /* ... upto 91 entries ... */, "SODIMM_217", /* ... */;
};

See: Colibri iMX8QXP is missing GPIO line names in the device tree


3. Deploy, Reboot, and Locate Your Pin

Once your device tree is built and deployed:

  • Reboot your board.
  • Now use libgpiod tools:
gpiofind SODIMM_217
# or, view all named lines and find "SODIMM_217":
gpioinfo | grep SODIMM_217

This will tell you the chip (e.g., /dev/gpiochip2) and the line number (which should match 91 if in gpiochip2, for example).


4. Why Can’t You Predict the chip/line Mapping?

The mapping from (e.g.) GPIO0_91 to a specific /dev/gpiochipN and line may not match AM62 datasheet GPIO0/91 directly:

  • The kernel assigns gpiochip numbers in driver probe order.
  • Some chips may be reserved for special or internal functions.
  • Banks may be grouped or split at the driver’s discretion.

Thus, you can’t always statically predict that GPIO0_91 is necessarily at gpiochip0, line 91! That’s why using gpio-line-names (and thus SODIMM/x names) is robust.


5. Without gpio-line-names?

If you do not add a gpio-line-names property, you’ll have to manually check:

  • Which gpiochipN has the expected number of lines (often, the largest chip is the main bank).
  • Which physical pins respond when you toggle a candidate line.
  • Or, cross-reference the device tree pinmux with the output of gpioinfo and trial/error.

But adding gpio-line-names for each user-accessible GPIO you configure is strongly recommended.


Key References


Summary:
Configure the pin as a GPIO in your device tree, include a recognisable gpio-line-names entry, and then use gpiofind or gpioinfo to programmatically (and portably) identify the actual gpiochip/line for the pin.

If you need an explicit example based on your actual device tree, let me know what Toradex BSP version you’re using and your device’s full DTB setup.

Best regards,
Toradex AI Assistant

@ToradexAI The entries for GPIO namings are taken from k3-am62-verdin.dtsi. There are a few issues.
First, main_gpio0 exposes 92 lines, so it should specify 92 strings in gpio-line-names.
Similarly, main_gpio1 exposes 52 lines, and it should specify 52 strings in gpio-line-names.
Could you update these with the corresponding SODIMM pin numbers?

&main_gpio0 {
	gpio-line-names =
		"SODIMM_52", /* 0 */
		"",
		"",
		"SODIMM_56",
		"SODIMM_58",
		"SODIMM_60",
		"SODIMM_62",
		"",
		"",
		"",
		"", /* 10 */
		"SODIMM_54",
		"SODIMM_64",
		"",
		"",
		"SODIMM_174",
		"SODIMM_172",
		"",
		"",
		"",
		"", /* 20 */
		"",
		"",
		"",
		"",
		"",
		"",
		"",
		"",
		"SODIMM_76",
		"SODIMM_21", /* 30 */
		"SODIMM_256",
		"SODIMM_252",
		"",
		"SODIMM_46",
		"SODIMM_42",
		"SODIMM_218",
		"",
		"SODIMM_189",
		"",
		"SODIMM_216", /* 40 */
		"SODIMM_220",
		"SODIMM_222",
		"",
		"",
		"",
		"",
		"",
		"",
		"",
		"", /* 50 */
		"",
		"",
		"",
		"",
		"",
		"",
		"",
		"",
		"",
		"", /* 60 */
		"",
		"",
		"",
		"",
		"",
		"",
		"",
		"",
		"",
		"", /* 70 */
		"SODIMM_157",
		"SODIMM_187",
		"",
		"",
		"",
		"",
		"",
		"",
		"",
		"", /* 80 */
		"",
		"",
		"",
		"",
		"",
		"";
};

&main_gpio1 {
	gpio-line-names =
		"", /* 0 */
		"",
		"",
		"",
		"",
		"",
		"",
		"",
		"",
		"",
		"", /* 10 */
		"",
		"",
		"",
		"",
		"SODIMM_15",
		"SODIMM_16",
		"SODIMM_19",
		"SODIMM_66",
		"SODIMM_161",
		"", /* 20 */
		"",
		"",
		"",
		"",
		"",
		"",
		"",
		"",
		"",
		"", /* 30 */
		"",
		"",
		"",
		"",
		"",
		"",
		"",
		"",
		"",
		"", /* 40 */
		"",
		"",
		"",
		"",
		"",
		"",
		"",
		"",
		"SODIMM_17",
		"SODIMM_155", /* 50 */
		"",
		"",
		"",
		"",
		"",
		"",
		"",
		"",
		"",
		"", /* 60 */
		"",
		"",
		"",
		"",
		"",
		"",
		"",
		"",
		"",
		"", /* 70 */
		"",
		"",
		"",
		"",
		"",
		"",
		"",
		"",
		"",
		"", /* 80 */
		"",
		"",
		"",
		"",
		"",
		"",
		"";
};

Thanks for your response.

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? :+1: :-1:


Hello!

You are absolutely right about the gpio-line-names arrays needing to match the actual number of lines exposed by each gpiochip. This is a common issue when device trees don’t fully populate all the line names for the available GPIO lines.

However, I cannot provide the complete mapping of all 92 lines for main_gpio0 and 52 lines for main_gpio1 with their corresponding SODIMM pin numbers based on the available documentation. The specific pin-to-line mapping for all positions would require detailed cross-referencing with the AM62 datasheet and the actual device tree implementation.

From the available sources, I can see that the Verdin AM62 uses different GPIO controllers (1):

  • MCU_GPIO0 (using AM62X_MCU_IOPAD for configuration)
  • GPIO0 and GPIO1 (using AM62X_IOPAD for configuration)

The documentation shows examples of how to configure specific pins like SODIMM_19, SODIMM_21, and SODIMM_61 (1), but doesn’t provide a complete mapping table for all GPIO lines.

What I can suggest:

  1. Consult the Verdin AM62 datasheet for the complete pin mapping table that shows which SODIMM pins correspond to which GPIO controller and line numbers.

  2. Use the existing pattern from your gpio-line-names arrays and extend them to cover all 92 and 52 lines respectively, filling in the SODIMM names where they correspond to actual connector pins.

  3. Community contribution: As shown in the community forum (2), users have successfully identified missing GPIO line names and provided corrections. Your observation about the incomplete arrays could be valuable feedback for Toradex to improve the device tree.

  4. Test incrementally: You can add the missing line names gradually, testing each addition to ensure the mapping is correct.

For the most accurate and complete mapping, I recommend:

  • Checking the official Verdin AM62 datasheet
  • Cross-referencing with the TI AM62 technical reference manual
  • Testing the actual hardware connections

The approach you’re taking to extend the gpio-line-names arrays is correct - each array should indeed have as many entries as there are lines in the corresponding gpiochip.

Best regards,
Toradex AI Assistant


References:

Hello @Fide,

The pin that you want to use as GPIO (SODIMM 217) is currently used by RGMII2 and that is the default function for that pin - as you can see it from the datasheet for Verdin AM62. If you want to use it as GPIO, you will have to add create a pinctrl for that and add it into main_gpio0 node (since it is GPIO0_91). You will also have to remove pinctrl for RGMII2 from cpsw3g to avoid a pin conflict. This way you will lose the second ETH but it should be fine if you don’t need it anyway.
To have the pin name listed in the gpioinfo, you will have to give it a name in the device tree side. Here, I created a device tree overlay (for kernel 6.6.y - BSP 7.3.0) that should do everything that I mentioned above. Please give it a try and let me know if this works for you:

verdin-am62_gpio217_overlay.dts (3.3 KB)