SW3: Ixora Board

Hello,

I’m trying to program the switch SW3 on the carrier ixora board / imx8qm v1.1B (BSP 3.03b) . The switch is connected by default to pin 186 (which is in turn connected to GPIO5.IO26 ) since the resistors R91 is assembled and the R90 not.
I muxed the pin to the gpio function and disabled the device which uses the pin

	pinctrl_factory_reset: factoryreset {
		fsl,pins = <
			SC_P_USDHC2_DATA0_LSIO_GPIO5_IO26	0x06000020
		>;
	};
&usdhc3
{
	status = "disabled";
};

By setting the GPIO5.IO26 as input or event-based input in the code, and clicking on the switch, the value of the GPIO doesnt change. I also tried to read the value of GPIO5.IO26 with the gpiod tool but same result:
gpioget 5 26

Am I missing something to be configured?
Thanks in advance.

Best regards,
Majd

Hi @majd.m !

Could you please check if you are really using Apalis IMX8 and BSP3?

There is no support for Apalis IMX8 on BSP3. Although there is the MACHINE for this module on BSP3, it is not supported.

You must use BSP5 for Apalis IMX8.

Also, which Ixora version are you using?

Best regards,

Hi @henrique.tx,
thanks for your reply from Sep. 13, I just came back to this topic with the latest BSP5
and having unfortunately the same issue with the SW3 in ixora board.

to the device tree I added:

&usdhc3
{
	status = "disabled";
};
&iomuxc {
        pinctrl-0=<&pinctrl_Factory_Reset>;
	pinctrl_Factory_Reset: Factory_Resetgrp {
		fsl,pins = <
			/* Factory Reset  */
			IMX8QM_USDHC2_DATA0_LSIO_GPIO5_IO26	0x06000020
		>;
	};
}

in linux i use “gpioget 5 26” to check the status of the switch
the result is always 0.
I also tried with a small app to wait for an event from GPIO 5 26, but nothing happens when i press the button.

iMX8QM V1.1B
Ixora 1.2A

Best regards,
Majd

Hello,
is this issue currently being checked/tested, or would it be better to open a new topic in the forum for it?

Best regards,
Majd

Hi @majd.m!

Sorry for the delay.

I could reproduce your issue using your device tree modifications:

With R91 assembled, you will have the 3.3V@100K pull from the Ixora V1.2 and the pullup from your device tree modification for the IMX8QM_USDHC2_DATA0 (in LSIO_GPIO5_IO26 function). So, it should be at a logic level high, but as you said, the pin is always at low logic level.

Maybe this could be related to the SCFW. It is under investigation.

I’ll keep you posted as soon as I have any news.

Best regards,

Hi @henrique.tx,
no problem, thank you for your reply. Any news for now about it? Thanks!

Best regards,
Majd

Hi @majd.m !

We still not have answer for this.

It is still under investigation.

Best regards,

Hi @majd.m !

We finally have an answer for you.

What is missing is the apalis-imx8qm node inside your &iomuxc.

So, your modification will be like this:

&usdhc3
{
    status = "disabled";
};
&iomuxc {
    pinctrl-0 = <&pinctrl_Factory_Reset>;
    apalis-imx8qm {
        pinctrl_Factory_Reset: Factory_Resetgrp {
            fsl,pins = <
                /* Factory Reset  */
                IMX8QM_USDHC2_DATA0_LSIO_GPIO5_IO26	0x06000020
            >;
        };
    };
}; 

After modifying like this, compiling and deploying it to the module, I could get the Ixora’s SW3 button events through GPIO5_IO26:

root@apalis-imx8-06980209:~# gpiomon 5 26
event: FALLING EDGE offset: 26 timestamp: [1641927568.875020266]
event:  RISING EDGE offset: 26 timestamp: [1641927569.099081794]
event: FALLING EDGE offset: 26 timestamp: [1641927569.379019939]
event:  RISING EDGE offset: 26 timestamp: [1641927569.599443216]

Be sure to make the boot process actually pick your dtb file. This Linux - Distro Boot article (the Booting section specifically) will help you with it.

Best regards,