dahlia/Verdin GPIO map

I used the GPIO tools to see what GPIO I have available on the Verdin Plus SOM however the nomenclature of the Dahlia eval board, the Verdin SOM and the what is coming up on the gpioinfo are not lining up. ADC is the same way.

For example - In the Dahlia x20 connector has a GPIO_3 which goes to pin 210 on the SOM. Pin 210 is GPIO_3. Here’s were it gets weird. For the Verdin I only have gpiochip0 and it has 32 lines. 0 to 31. I figure GPIO_3 would be either line 3 or maybe 4. Nope it Line 5.

Another example - In the Dahlia x20 connector it has ADC_1 to ADC_4. When I go to read the ADC by channel 0 to 3. I would expect ADC_1 to be channel 0 and ADC_2 to be channel 1. Nope, ADC_1 is channel 3 and ADC_4 is channel 0.

Question- How do I find out how the GPIO is mapped to the line numbers with out experimentation. DTS overlays maybe?

Dahlia Carrier Board can be used with various Verdin modules based on different SOCs. So please do not confuse Dahlia GPIO numbering with particular Verdin module GPIO numbering.
Yes Dahlia GPIO_3 is connected to X1 pin 210. But if you take look to Table 3-1 X1 Connector from Verdin iMX8Mplus datasheet you will see that X1 pin 210 is connected to iMX8Xplus ball GPIO1_IO05. If you use Linux /sys/class/gpio) it will translate this to GPIO (1-1)*32+5 = 5. In case of

Now /sys/class/gpio is deprecated and we recommend to use a libgpiod which has a different naming convention.