Pin multiplexing for drivers
On i.MX6 BSP the multiplexing of IO pins is configured to match the standard pinout for Colibri and Apalis. For additional devices like extra UARTs not part of the standard pinout, to match the pinout described in the datasheet.
A different multiplexing can be configured in the registry. Registry entries override multiplexing for a specific driver instance or set some multiplexing options as soon as the registry is loaded.
Multiplexing registry entries
It's possible to specify a generic pinout, that applies to all the modules, or a pinout specific for a module form factor (Apalis/Colibri), a specific module (ex: iMX6S256IT) or even a specific version of a specific module.
Pinouts are defined using registry keys. All the keys defining a pinout are named "Pinout_" suffix.
The "Pinout_Default" entry is used to specify a pinout that applies to each module.
Each module type and revision is identified by a 8 digits code that is build in the following way:
- 4 decimal digits for the product type (product number). Currently the following codes are defined:
|Colibir iMX6S 256MB
|Colibri iMX6DL 512MB
|Colibri iMX6S 256MB IT
|Colibri iMX6DL 512MB IT
|Apalis iMX6Q 1GB
|Apalis iMX6Q 2GB IT
|Apalis iMX6D 512MB
- 1 decimal digit for major version
- 1 decimal digit for minor version
- 2 decimal digit for variant with 'A' being 0, 'B' being 1 etc.
For example code for an Apalis iMX6Q 1GB V1.1A is 00271100.
It's possible to specify a multiplexing for a specific module (including version) using the Pinout_XXXXXXXX format, using the full 8 digits code. To specify more generic pinout for just a specific module type or for a major-minor combination you can use just the first 4 or 6 digits of the code. You can also create a key for different modules by separating the codes with a comma.
|Applies only to IMX6AQ1024 1.1A modules
|Applies only to IMX6AQ1024 1.1 modules, any variant
|Applies to all Apalis modules (Q1025,D512 and Q2048IT) in all versions and variants
The system takes the registry key which matches the the module more precisely. For example if you have a generic entry for Apalis iMX6Q 1GB and a specific one for version 1.1C and your module is Apalis iMX6Q 1GB V1.1C then the specific key is used and the more generic one (any Apalis iMX6Q 1GB module) is ignored. Values are taken from a single key, so if you need to override only a specific pin for a new version you have to copy all the settings from the more generic key to your new entry.
Inside the key it's possible to specify settings for different pins. It's possible to identify a pin using different notations:
|Reference a GPIO number, SOC specific
|Reference a Colibri SO-DIMM connector pin number
|References and Apalis MXM connector pin number
The registry entries must be configured as strings and they can contain the following values:
|This is the compatible value to define a GPIO. In the SoC datasheet, there is no AltFn with value -1.
|0 to 7
|Alternate Function 0 to 7. The precise meaning depends on the actual IO.
|IO direction is input
|IO direction is output. The real level of the pin cannot be read back.
|Configure SION bit in the input multiplexer automatically (suggested option for most of the pins)
|Don't force the input path enabling
|Force input path enabling
|Set IO level to Logic low (if AltFn=GPIO, and Dir=out or outonly)
|Set IO level to Logic high (if AltFn=GPIO, and Dir=out or outonly)
|This is the compatible value to remove all software pullup/down resistors or bus keepers.
|This is the compatible value to configure a software pullup.
|This is the compatible value to configure a software pulldown.
|22k pull up
|47k pull up
|100k pull up. "pull=up" and "pull=up100k" are identical.
|100k pull down. "pull=down" and "pull=down100k" are identical.
|Instead of a pullup/down resistor, a bus keeper gets enabled
|Output driver and pull up/down disabled
|260 Ohm output impedance. This is the reset default value.
|130 Ohm output impedance
|90 Ohm output impedance
|60 Ohm output impedance
|50 Ohm output impedance
|40 Ohm output impedance
|33 Ohm output impedance
|Standard output. This is the reset default value
|Normal input. This is the reset default value.
|Schmitt trigger input
|Slow rising and falling edge. This is the reset default value.
|Fast rising and falling edge.
|IO bandwidth = 50 MHz (low). This is the reset default value
|IO bandwidth = 100-150 MHz (medium)
|IO bandwidth = 100-150-200 MHz (high)
For example to configure SODIMM pin 17 of the Colibri module as a GPIO output set to high state you can specify:
"colibripin_17"="altfn=-1 dir=out lvl=1"
Multiplexing for a specific driver
To configure multiplexing for a specific driver you have to put the "Pinout_*" entries under its configuration key.
For example to change multiplexing of UART for all modules you can add:
entry in the registry and configure the corresponding pins.
Adding a Pinout entry will prevent the driver from applying the default pin multiplexing configuration so even if you just need to change the multiplexing of a single pin you'll have to specify the multiplexing for all the other pins managed by the driver.
Setting the wrong multiplexing may prevent the driver from working and may lead to issues.
The new multiplexing will be applied only after you reboot your device.
Multiplexing at boot
Sometimes you may need to configure pins that are not related to a specific driver or you prefer to keep all your multiplexing settings in a single entry.
You can add the Pinout_* keys described above under the:
This key is processed very early during the OS boot (as soon as registry has been loaded from filesystem). This means a few seconds after power-up but earlier than any driver or application added to the system.
If you override pinout for a device that is controlled by a driver and don't want that the driver applies its default multiplexing you can add a DWORD entry named "DoMultiplexing" under the driver's main configuration key. Setting the "DoMultiplexing" value to 0 will prevent any pin-multipleying configuration from the driver (both default pinout and customized multiplexing using the keys described above). An issue in version 1.0 of the release image affects the GPIOmux driver and prevents it from being loaded, this is going to be fixed in release 1.1 of the image. Multiplexing at boot does not work in version 1.0.