This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM5728: Power-down control by GPIO

Part Number: AM5728
Other Parts Discussed in Thread: TMDSEVM572X,

Hi,

When the power is turned off, the following circuit was considered in order to carry out PWRON long push with the CPU.
(Custom board based on the TMDSEVM572X evaluation board)
It is a circuit to output High at shutdown with GPIO2_19 of AM5728 processor to power off.

GPIO operation is not going well.

GPIO operation is performed by sysfs of linux.
When GPIO direction is set to "out" and value is set to "1",
it is "High" on the oscilloscope, but it becomes "Low" just before the power is turned off by executing the poweroff command.
(As shown in the waveform below.)
What is the reason for this?
Is there a way to keep "High" until the power is turned off ?

Linux and U-boot versions
    Linux version 4.9.69
    U-Boot 2017.01
    Build in Yocto environment

I changed to processor forums question from shown below power management forums questions.

e2e.ti.com/.../3472090

Best regards,

  • Is the intent to drive GPIO2_19 high for period of time such that the PMIC detects a 'long push' after which it performs a shutdown?  While the 'long push' is being generated, the Linux poweroff command is executed to prepare the system for power-down.  However - when poweroff is executed - it inadvertently causes the GPIO2_19 to go low, which cancels the 'long push' and thus cancels the PMIC shutdown? 

    Is that correct description of the issue?

  • Hi,

    Yes. As per your understanding.

    Best regards,

  • Hi,

    Linux calls the remove functions during the poweroff. Can you try change like below:

    diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
    index 2a4a11634d..344befc741 100644
    --- a/drivers/gpio/gpio-omap.c
    +++ b/drivers/gpio/gpio-omap.c
    @@ -1744,7 +1744,6 @@ MODULE_DEVICE_TABLE(of, omap_gpio_match);
     
     static struct platform_driver omap_gpio_driver = {
            .probe          = omap_gpio_probe,
    -       .remove         = omap_gpio_remove,
            .driver         = {
                    .name   = "omap_gpio",
                    .pm     = &gpio_pm_ops,

    The remove cuts the clock using:         pm_runtime_disable(&pdev->dev);

    Let me know if that helps your case to keep the GPIO High.

    Best Regards,
    Keerthy