Im6ull power-off sequence

hello,

I am using an imx6ull board with a viola carrier board and I have configured SODIMM_135 as described below in my device tree,

gpio-poweroff {
compatible = “gpio-poweroff”;
gpio = <&gpio1 24 GPIO_ACTIVE_LOW>;
timeout-ms = <3000>;
};

so, the GPIO SODIMM_135 is configured as Active low configuration and after hitting the command,

  • shutdown -h now

we are facing a square wave of 215ms which is described below,

what can we do to eliminate this square wave after shutdown?

Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


It seems like you are trying to configure a GPIO pin (SODIMM_135) on your iMX6ULL module with a Viola carrier board to handle the power-off sequence. You have set up the device tree entry for the gpio-poweroff driver, but you are observing a square wave of 215ms instead of the expected behavior.

Here are a few things to check and consider:

  1. Device Tree Configuration:
    Ensure that the device tree configuration is correct. Your configuration looks correct, but double-check the pin number and GPIO bank. For SODIMM_135 on the iMX6ULL, it should be:

    gpio-poweroff {  
        compatible = "gpio-poweroff";  
        gpio = <&gpio1 24 GPIO_ACTIVE_LOW>;  
        timeout-ms = <3000>;  
    };
    
  2. Pin Muxing:
    Verify that the pin is correctly muxed as a GPIO in the device tree. If the pin is not muxed correctly, it might not function as expected. You can add the pin muxing configuration in the device tree:

    pinctrl_gpio_poweroff: gpio-poweroff {
        fsl,pins = <
            MX6ULL_PAD_GPIO1_IO24__GPIO1_IO24 0x1b0b0
        >;
    };
    
    gpio-poweroff {
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_gpio_poweroff>;
        compatible = "gpio-poweroff";
        gpio = <&gpio1 24 GPIO_ACTIVE_LOW>;
        timeout-ms = <3000>;
    };
    
  3. Kernel Configuration:
    Ensure that the CONFIG_POWER_RESET_GPIO option is enabled in your kernel configuration. This option is necessary for the gpio-poweroff driver to work:

    CONFIG_POWER_RESET_GPIO=y
    
  4. Behavior of the GPIO:
    The square wave of 215ms you are observing might be due to the GPIO toggling state during the shutdown process. This could be caused by the GPIO being reconfigured or driven by another part of the system. Ensure that no other part of the system is driving this GPIO during shutdown.

  5. Debugging:
    You can add some debug prints in the kernel driver to see if the gpio-poweroff driver is being called correctly and if the GPIO is being set as expected. This can help you understand if the issue is with the driver or the hardware configuration.

If you have checked all the above points and the issue persists, it might be helpful to provide more details about the exact behavior you are observing and any additional logs or messages from the kernel during the shutdown process.

Please, also check if these links can help you solve your problem:

Power off and power on via button the iMX6ULL module.

Hi @amiraj_patel ,
Is your issue solved or still facing the issue?

hello, @sahil.tx issue is solved.