Devicetree lpgpio3 register settings

I’m trying to use gpio3_io13 to control the poweroff function in Linux. So far I have not been able to get this to work. I have been looking at the NXP document (IMX8QMRM_referenceManual.pdf) for hours. I’m hoping you can point me in a better direction.

Here are my devicetree settings:

gpio-poweroff {
    compatible = "gpio-poweroff";
    pinctrl-names = "default";
    pinctrl-0 = <&pinctrl_poweroff>;
    gpios = <&gpio3 13 GPIO_ACTIVE_LOW>;
};

pinctrl_poweroff: pwroffgrp {
        fsl,pins = <
            SC_P_SAI1_RXD_LSIO_GPIO3_IO13                0x00000021
        >;
    };

When the reset signal comes, it drops from 3.3v to 2.5v. I’m guessing the pin is going to a high impedance state rather than a LOW.
The line does go low when I send a command line: gpioset 3 13=0
I have no idea what 0x00000021 is doing. Can you direct me to which section, of which NXP document that describes this settings?
Are you able to see what I am doing wrong?

Greetings @mi3,

First of all what version of our BSP are you working with here?

Based off the pin names being used in your device tree snippet it looks like something earlier than our current BSP 5.

It’s not obvious to me at the moment what could be wrong with your setup. However as a reference you could checkout this other thread where another customer accomplished a similar task: iMX8QXP Colibri and CONFIG_POWER_RESET_GPIO for powering off the board

I mean this is on the Colibri i.MX8X but it should be similar enough for the Apalis i.MX8. Also the work here is done on our BSP 5, I’m not sure how much of it transfers to this older version of the BSP you have.

Looking over the thread one easy thing to miss is maybe you don’t have CONFIG_POWER_RESET_GPIO enabled in the kernel?

Best Regards,
Jeremias