I was wondering about the following. In some of your device-trees for Linux kernel, such as imx8mp-verdin.dtsi, pinctrl settings are used that have bit 30 set. For example. the hdmihoggrp:
Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!
Did you like my answer?
Hello!
For i.MX-based modules, bit 31 in the pin configuration cell is crucial as it prevents the IOMUXC from altering the pad control register. This bit acts as a special control separate from the pad settings. You can find more details about this in the Toradex documentation for i.MX7 and i.MX6ULL modules.
Additionally, bit 30 is used to set the SION (Software Input On) bit, which is also documented in the same resources.
Here’s an example of how this pattern is used in a device tree configuration:
The hexadecimal value in the last cell includes these control bits along with other pin settings. For more detailed information on pin configuration specific to your SoC, it’s advisable to consult the datasheet and reference manual for your specific module, as the exact meaning of reserved bits may vary between different i.MX variants.
I hope this helps clarify the pin configuration process for your i.MX module.
Thank you for your reply. With the reply from the Toradex AI, I looked a bit further in how the kernel reads this value from the pinctl. Although its reply wasn’t fully correct, it did lead me to this part in pinctrl-imx.c:
if (info->generic_pinconf) {
/* generic pin config decoded */
pin_mmio->config = imx_pinconf_parse_generic_config(np, ipctl);
} else {
/* legacy pin config read from devicetree */
config = be32_to_cpu(*list++);
/* SION bit is in mux register */
if (config & IMX_PAD_SION)
pin_mmio->mux_mode |= IOMUXC_CONFIG_SION;
pin_mmio->config = config & ~IMX_PAD_SION;
}
With IMX_PAD_SION being set to 31. So it seems, that this bit is indeed (mis)used to set the SION in the muxmode. And that it is cleared when writing to the pin config, and thus not applied to that register.