[IMX8] iomuxc CONFIG parameter dts

Hello,

I’m trying to create my own device tree source file based on the fsl-imx8qm-apalis-v1.1.dtsi file.

I’ve started to simply add some regular output pins using the iomuxc peripheral, like so:

&iomuxc {
	pinctrl-names = "default";
	pinctrl-0 = <
		&pinctrl_debug_leds
	>;

	apalis-imx8qm {
		pinctrl_debug_leds: debugledsgrp {
			fsl,pins = <
				/* Pins for the debug LEDs */
				SC_P_FLEXCAN2_TX_LSIO_GPIO4_IO02   0x00000021      /* SODIMM 13 */
				SC_P_MLB_SIG_LSIO_GPIO3_IO26       0x00000021      /* SODIMM 15 */
			>;
		};
	};
};

What I fail to understand though, is what the “0x00000021” comes from.
I understand that this describes the options for the IO pin but I’m unable to find any information about what this value represents and how to determine my own value.

I’ve read that this should be described in the iMX8 reference manual but I’m unable to find any references to this “CONFIG” parameter of the configuration.

Can someone point me in the right direction so I can determine my own CONFIG values?

By the way, can someone explain to me why “SC_P_xxxx” definitions are used instead of “MX8MQ_IOMUXC_xxxx” definitions, like I’ve seen in other examples?

Thanks in advance.

I’m not an expert, but I was wondering the same thing a few weeks ago. I couldn’t find a manual from NXP (might it still be under NDA?)

However, if you download the Pins Tool from NXP you can create a project for the SOC, select the pins in question (and their function), and then you have a panel at the bottom where you can select different options for the pins (and functions). Then, on the right side you have a panel with “Code Preview”, where you can find a DTS file. I just tried a few options until the numbers matched.

For SC_P_MLB_SIG_LSIO_GPIO3_IO26 I get the following:

  • 0x00000020 is pull-up
  • 0x00000001 is low drive strength

And I believe it’s the same for SC_P_FLEXCAN2_TX_LSIO_GPIO4_IO02

You need an account to download the software, but that’s free.

https://www.nxp.com/design/designs/pins-tool-for-i-mx-application-processors:PINS-TOOL-IMX

Hope that helps you along the way a little!

/Sven

http://git.toradex.com/cgit/linux-toradex.git/tree/Documentation/devicetree/bindings/pinctrl/fsl,imx8qm-pinctrl.txt?h=toradex_4.9-2.3.x-imx