Hi,
I want to use some MXM3 pins as GPIOs which are controlled via the sysfs. Now i am struggling to understand the GPIO mapping of the iMX8. Lets take the MXM3 pin number 185. According to the Apalis iMX8 datasheet the X1 pin 185 is “LSIO.GPIO2.IO30” which translates to sysfs GPIO pin number 446 (see here). Now exporting this pin in sysfs is not possible as it is in use.
The output of “cat /sys/kernel/debug/gpio” is (partially) shown in the block quote below. According to that output the gpio-446 is used as PCIe reset which explains why i cannot use it. However gpio-382 is named “MXM3_185” and can be exported. Is there some kind of remapping done somewhere? This approach was consistent for the iMX6 and TK1 but now it seems like i am lost on the way… Any help would be appreciated.
BR
Setup:
Apalis iMX8QP 2GB WP
Ixora Carrier V1.2A
Torizon 6.6.7
gpiochip4: GPIOs 352-383, parent: platform/5d0a0000.gpio, 5d0a0000.gpio:
gpio-352 ( )
gpio-353 ( )
gpio-354 ( )
gpio-355 ( )
gpio-356 ( )
gpio-357 ( )
gpio-358 ( )
gpio-359 (MXM3_198 )
gpio-360 (MXM3_35 )
gpio-361 (MXM3_164 )
gpio-362 ( )
gpio-363 ( |enable ) out hi
gpio-364 ( )
gpio-365 ( )
gpio-366 (MXM3_217 )
gpio-367 (MXM3_215 )
gpio-368 ( )
gpio-369 ( )
gpio-370 (MXM3_193 )
gpio-371 (MXM3_194 )
gpio-372 (MXM3_37 )
gpio-373 ( )
gpio-374 (MXM3_271 )
gpio-375 (MXM3_273 )
gpio-376 (MXM3_195 )
gpio-377 (MXM3_197 )
gpio-378 (MXM3_177 )
gpio-379 (MXM3_179 )
gpio-380 (MXM3_181 )
gpio-381 (MXM3_183 )
gpio-382 (MXM3_185 |sysfs ) in hi
gpio-383 (MXM3_187 )gpiochip3: GPIOs 384-415, parent: platform/5d090000.gpio, 5d090000.gpio:
gpio-384 ( |sysfs ) in lo
gpio-385 ( |usb3503 intn ) out lo
gpio-386 ( |usb3503 reset ) out hi ACTIVE LOW
gpio-387 ( )
gpio-388 (MXM3_286 )
gpio-389 ( )
gpio-390 (MXM3_87 )
gpio-391 (MXM3_99 )
gpio-392 (MXM3_138 )
gpio-393 (MXM3_140 )
gpio-394 (MXM3_239 )
gpio-395 ( |PHY reset ) out hi ACTIVE LOW
gpio-396 (MXM3_281 )
gpio-397 (MXM3_283 )
gpio-398 (MXM3_126 )
gpio-399 (MXM3_132 )
gpio-400 ( )
gpio-401 ( )
gpio-402 ( )
gpio-403 ( )
gpio-404 (MXM3_173 )
gpio-405 (MXM3_175 )
gpio-406 (MXM3_123 )
gpio-412 ( |regulator-module-wif) out hi
gpio-414 ( |CONNECTOR_IS_HDMI ) out hi
gpiochip2: GPIOs 416-447, parent: platform/5d080000.gpio, 5d080000.gpio:
gpio-416 (MXM3_279 )
gpio-417 (MXM3_277 )
gpio-418 (MXM3_135 )
gpio-419 (MXM3_203 )
gpio-420 (MXM3_201 )
gpio-421 (MXM3_275 )
gpio-422 (MXM3_110 )
gpio-423 (MXM3_120 )
gpio-424 (MXM3_1/GPIO1 )
gpio-425 (MXM3_3/GPIO2 )
gpio-426 (MXM3_124 )
gpio-427 (MXM3_122 )
gpio-428 (MXM3_5/GPIO3 )
gpio-429 (MXM3_7/GPIO4 )
gpio-430 ( )
gpio-431 ( )
gpio-432 (MXM3_4 )
gpio-433 (MXM3_211 )
gpio-434 (MXM3_209 |sysfs ) in lo
gpio-435 (MXM3_2 )
gpio-436 (MXM3_136 )
gpio-437 (MXM3_134 )
gpio-438 (MXM3_6 )
gpio-439 (MXM3_8 )
gpio-440 (MXM3_112 |sysfs ) in lo
gpio-441 (MXM3_118 |sysfs ) in lo
gpio-442 (MXM3_114 |sysfs ) in lo
gpio-443 (MXM3_116 |sysfs ) in lo
gpio-445 ( |sysfs ) in lo
gpio-446 ( |PCIe reset ) out hi
gpio-447 ( |usb3503 connect ) out lo ACTIVE LOW