BOOT_MODE1 pin(SODIMM)_127 always at LOW even after configured otherwise

Hi,

I want to use SODIMM_127 as an input pin with a toggle switch connected. The requirement is that the switch at ON position would be at 0 state and 1 while it is OFF. But it is always at 0 despite modifications to the dtb to use the internal pull up as mentioned in IOMUXC_SNVS_SW_PAD_CTL_PAD_BOOT_MODE1.

I modified imx6ull-colibri.dtsi file to add this section to &iomuxc:
pinctrl_additionalgpio: additionalgpios {
fsl,pins = <
MX6ULL_PAD_BOOT_MODE1__GPIO5_IO11 0x1b0a0 /* SODIMM 127 */
>;
};
as well as removing &pinctrl_snvs_gpio3 from &iomuxc_snvs in imx6ull-colibri-nonwifi.dtsi

After booting up, cat /sys/kernel/debug/pinctrl/pinctrl-handles outputs:
type: MUX_GROUP controller 20e0000.iomuxc group: additionalgpios (40) function: imx6ull-colibri (0)
type: CONFIGS_PIN controller 20e0000.iomuxc pin MX6UL_PAD_RESERVE1 (1)config 0001b0a0

My understanding is that, by default MX6ULL_PAD_BOOT_MODE1__GPIO5_IO11 0x130a0 enables the internal pull-down, so the modified value of 1b0a0 was given.

Curiously, gpioinfo outputs show that SODIMM_127 is at ACTIVE_HIGH with and without the modifications. But cat /sys/kernel/debug/gpio show ‘in’ and ‘lo’ once the pin is acquired by sysfs.

Is there something else needed to use that pin in this manner because of its BOOT_MODE functionality?
If not, what could possibly be the mistake?

Thanks & Regards

Hi @void_rig,

Kindly refer to Section 4.1 and section 7 of colibri iMX6ULL datasheet.

Please note there is 10K pull down on module to SODIMM 127.

Best Regards
Ritesh Kumar

Hi Ritesh,

Thank you for your response.

I’d gone through the mentioned document but was unable to figure out if that restricts using the pin as a normal GPIO. As for the pull-down, we have tried a 4.7k external pull-up but the behavior remains the same.
Can you confirm if my dtb modifications are correct and if any additional changes are needed?

Hi Ritesh,

I think I might have replied to my own post rather than yours. Can you please provide further advice based on that?

“I’d gone through the mentioned document but was unable to figure out if that restricts using the pin as a normal GPIO. As for the pull-down, we have tried a 4.7k external pull-up but the behavior remains the same.
Can you confirm if my dtb modifications are correct and if any additional changes are needed?”

Hi @void_rig ,
Let me know the development environment you have
eg Colibri iMX6ULL 512MB WB IT
BSP 5.7

Hi @sahil.tx

Given below is the development environment being used:

  • Colibri iMX6ULL 256MB (v1.1A)
  • BSP 5.7.2+build.21
  • Toradex Embedded Linux Reference Minimal Image (UPSTREAM)
    (JFrog)
  • Kernel - Linux/arm 5.4.193
    (git clone -b toradex_5.4-2.3.x-imx git://git.toradex.com/linux-toradex.git)
  • Installed using Colibri-iMX6ULL_ToradexEasyInstaller_1.8-20181019

Thanks & Regards

Hi @void_rig ,
Are you saying that after making the pin as input, you want it to output 3.3V because it is pulled up internally?

No, sorry if my wording was unclear.
We have an external circuit with a toggle switch driving this input pin. As per the circuit, the switch in the OFF state provides 3.3V to the pin and 0V when the switch goes to ON state. And this circuit works perfectly with Colibri VF61 256MB IT. Our requirement is to port this to Colibri IMX6ULL.

But when using IMX6ULL, regardless of the toggle switch state, the specific pin state does not change.
[cat /sys/kernel/debug/gpio - > gpio-139 (SODIMM_127 | sysfs) in lo]

This is what led to the dtb modifications because it seemed the internal pull down was causing it.
Hope this gives you more clarity.

Hi @void_rig,
So, the input pin (SODIMM_127) is not able to detect input high even after providing it with 3.3V, right?
I am getting the following result without any modification

root@colibri-imx6ull-03007623:~# uname -a
Linux colibri-imx6ull-03007623 5.4.193-5.7.2+git.f5d73fd6e9f8 #1 SMP Fri Jun 24 10:15:32 UTC 2022 armv7l GNU/Linx
root@colibri-imx6ull-03007623:~# gpiofind SODIMM_127
gpiochip4 11
root@colibri-imx6ull-03007623:~# gpioget 4 11       
0
root@colibri-imx6ull-03007623:~# gpioget 4 11      // connected it to 3.3V
1

Is this the expected result?