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.

Linux/AM5728: POWER ON : palmas_pwrbutton

Part Number: AM5728

Tool/software: Linux

Hi,

I have configured the S6 switch as shutdown button, which is connected to the PMIC( TPS6590376ZWSR ), PWR_ON.

Shutdown is configured with 6s long press duration.

ti,palmas-long-press-seconds = <6>;
ti,palmas-pwron-debounce-milli-seconds = <15>;

I need to configure the same push button to power-on the device after shutdown.

Please provide me the guidance.

  • Hi Karthikeyan,

    Do you use AM572x TI board (EVM, IDK, X15) or custom board?

    Do you use AM57x PSDK LInux v05.02 (kernel v4.14.79)?

    Regards,
    Pavel
  • Hi pavel,

    Thanks for the reply.

    Using AM57xx evm, PSDK 04.02.00.09.  Linux version 4.9.59-ga75d8e9305.

  • Karthikeyan,

    From what I understand, you connected S6 push button output to PMIC PWRON input (instead of AM572x PORZ input).

    If that is the case, you can re-use the S1 push button approach, as S1 button output is connected to PMIC PWRON input and S1 button is used to Power ON/OFF AM572x device.

    www.ti.com/.../spruig1.pdf

    4.1 Power Source

    The push button S1 near to the power cable is used for power ON/OFF. The main power is off until the push button is pressed. After pressing the S1 push button, the main power stays on for 7 seconds then powers off. To keep the power on, see the Important Notice of this document. Holding the push button for 15 seconds will forcibly turn the main power off.

    2 Important Usage Notes
    2.2 Powering On EVM

    Regards,
    Pavel
  • Hi Pavel,
    Thanks for the reply.

    Yes you are right, Instead of S6 push button, We used S6 in our design.
    I have verified the connections comparing to EVM design and Our Design. The PWRON pin from PMIC is directly connected to Push button.


    1 . Our board is directly powering ON without pressing S6 button. But in EVM S1 push button need to be pressed to power ON the board.

    2. The following commands from userspace results in reboot instead of power OFF or shutdown
    poweroff
    shutdown -h now

    Please provide the guidance to overcome this issues.
  • Karthikeyan,

    What is the silicon revision of AM572x device populated on your board?

    Note that we have some errata related to AM572x POR:

    i862: Reset Should Use PORz
    i875: Power-on-Reset (PORz) Warm Boot Hang
    i856: 32k Oscillator Fails to Start-Up at POR

    i842: Multiple Resets Required Before Chip Is Functional

    i863: MMC2 Has PU/PD Contention Immediately after Release from Reset

    i727: Refresh Rate Issue after Warm Reset
    i729: DDR Access Hang after Warm Reset

    Regards,
    Pavel
  • Hi Pavel,

    The silicon version is 2.0.

    Is there any issue related to silicon version of the processor ?

  • Can you please provide the PSDK used for the EVM board prebuild.
  • Karthikeyan,

    I am using pre-built images from AM57x PSDK Linux v5.01.

    software-dl.ti.com/.../index_FDS.html

    ti-processor-sdk-linux-am57xx-evm-05.01.00.11/board-support/prebuilt-images/

    I am using AM572x TI EVM rev A2 that comes with AM572x ES1.1 device. I tested S1/S7 push buttons and they work as expected. When I plug 12V power supply, the EVM still do not start the power up sequence. The power up sequence start when I press S1 or S7 push buttons. Then if I press and hold S1/S7 button for several seconds, EVM goes to power off.

    "i862: Reset Should Use PORz" is applicable for ES2.0 device also, make sure you are align with it.

    I would also suggest you to measure with scope PMIC PWRON in and RESET_OUT out pins on your board and compare the signals with EVM, as you might have HW issue of your custom EVM board.

    Regards,
    Pavel
  • Hi pavel,

    Thanks for the reply.

    "i862: Reset Should Use PORz" is applicable for ES2.0 device also, make sure you are align with it.


    Yes Our silicon version is ES2.0. Can you please explain the above point in brief.
    i862: Reset Should Use PORz : Literally confused with the reset_in and reset_out pins from PMIC.
  • Karthikeyan,

    PORz described in AM572x silison errata, refer to AM572x pin F22 (porz)

    i862 explains that when you are making other reset (not porz) to AM572x device (reset like software resets, WDT, resetn input pin, etc), the PMIC should also make porz reset to AM572x device (Implementation 1).

    Regards,
    Pavel
  • Hi Pavel,


    Our Hardware team is trying for the implementation1.
    Can you please mention the file in which the initial power-on is handled by pressing S1 button. ?

  • Hi Pavel,

    We have tried the i862, Its now working as per expectation same behaviour.

    I have shared the schematics, Please share the clue.

  • Karthikeyan,

    Can you please check your board with oscilloscope if you have valid signal on PMIC PWRON input pin, when you press the S6 button. You can also check how this signal should look like if you probe PMIC PWRON input pin of the AM572x EVM, when S1 button is pressed.

    Then you can check your board PMIC reset_out (AM572x PORZ in) pin signal and also compare it with AM572x EVM.

    Please let me know if you have valid and expected signals there. If not, then the issue is related to the PMIC component, not to AM572x device, and you need to ask/post your issue into the Power management forum, which is supporting the TI PMIC parts.

    Regards,
    Pavel
  • Check also if below e2e thread will be in help:

    e2e.ti.com/.../781707

    Regards,
    Pavel
  • Hi Pavel,

    Ok , Let me check this and update you.

    At starting I have told you that, My board is rebooting while using poweroff and shutdown commands.

    I have used processor-sdk-04.02.00.09-config.txt code base, Now I have switched to ../configs/processor-sdk/processor-sdk-05.01.00.11-config.txt code base. Even-though facing the same issue.

    Only shutdown -H now is putting the board in HALT stage.

    LOGS :

    [  OK  ] Reached target Shutdown.
    [   59.185457] systemd-shutdow: 22 output lines suppressed due to ratelimiting
    [   61.736176] systemd-shutdown[1]: Sending SIGTERM to remaining processes...
    [   61.753260] systemd-journald[96]: Received SIGTERM from PID 1 (systemd-shutdow).
    [   61.801717] systemd-shutdown[1]: Sending SIGKILL to remaining processes...
    [   61.817951] systemd-shutdown[1]: Unmounting file systems.
    [   61.824406] systemd-shutdown[1]: Remounting '/' read-only with options 'data=ordered'.
    [   62.833396] EXT4-fs (mmcblk0p2): re-mounted. Opts: data=ordered
    [   62.845405] systemd-shutdown[1]: Remounting '/' read-only with options 'data=ordered'.
    [   62.853430] EXT4-fs (mmcblk0p2): re-mounted. Opts: data=ordered
    [   62.859388] systemd-shutdown[1]: All filesystems unmounted.
    [   62.865033] systemd-shutdown[1]: Deactivating swaps.
    [   62.870218] systemd-shutdown[1]: All swaps deactivated.
    [   62.875573] systemd-shutdown[1]: Detaching loop devices.
    [   62.883840] systemd-shutdown[1]: All loop devices detached.
    [   62.961716] reboot: Power down

    But when i try with the EVM (rootfs cpoied form EVM release)prebuild rootfs, poweroff and shutdown commands are working properly.

    Our project is in end stage, Because of this power issues got struck.

    Please provide the guidance, What might be the reason for this reboot. ?

  • Waiting for the reply
  • Karthikeyan,

    You might debug below file and function to see how your flow goes:

    linux-kernel/kernel/reboot.c -> kernel_restart()

    I would suggest you again to measure with scope the PMIC and AM572x pins of your board, related to power on and reset, and compare the signals you have on the same pins measured on AM572x EVM.

    See also if below pointers will be in help:

    e2e.ti.com/.../1817985
    e2e.ti.com/.../591399

    Regards,
    Pavel