i.MX6SX SABRE SDB - OnOff button

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

i.MX6SX SABRE SDB - OnOff button

1,357 Views
daweichen
Contributor III

Hi NXP,

How do I configure the behavior of the On/Off button on the i.mx6sx sabre board?

I would like to use the button to wake up the host only, but not to initiate a board reset.

How do I disable the reset portion?

Section 10.5 ONOFF (Button) states the following:

Max Timeout: The max timeout configuration supports 5 secs, 10 secs, 15 secs and
disable. This configuration supports the time it takes to request power down after the
button has been pressed for the defined time.

Thank you,

Dawei

Labels (3)
7 Replies

1,070 Views
daweichen
Contributor III

Hi Yuri,

How do I modify the Max Timeout from 5 seconds to a longer time ?

Thanks

dawei

0 Kudos

1,070 Views
Yuri
NXP Employee
NXP Employee

Hello,

  it is not possible for i.MX6SX - to modify the Max Timeout :-( 

Regards,

Yuri.

0 Kudos

1,070 Views
daweichen
Contributor III

Hi Yuri,

Thank you for the clarification. Section 10.5 ONOFF (Button) in the RM doc was a bit misleading.  

I decided to not use the ON/OFF button.  Instead, I used the pre-configured SW4 and SW5 (VOL UP/Down) buttons on my SABRE board.  I modified a relevant i.MX6SX DTS file to make those two switches as wake-source(s).

In doing so, I was able to test Wake-on-Wireless and Bluetooth Host Wakeup signals sourced from my WiFi module.

Appreciated your feedback.

Dawei

1,070 Views
Yuri
NXP Employee
NXP Employee

Hello,


  For wakeup the button should be pressed longer than Off to On configuration

(500ms).

    For power off : press button longer than the Max Timeout (5 sec).

    
     In ON state, a button press > 5 sec will initiate an immediate HW shutdown

(PMIC_ON_REQ will go low). Note that this feature will only work after initialization

software clears the Power Glitch bit. So, it is possible to disable HW shutdown in software,

via the Power Glitch bit (in SNVS_LP Control (LPCR)).

 


Have a great day,
Yuri

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

1,070 Views
daweichen
Contributor III

Hi Yuri,

Would you be able to point me to the specific location in the linux-imx source code to make the necessary changes?

I am using NXP BSP 4.9.88.

I guess I am not sure where is the best place to set PWR_GLITCH_EN (bit7) in  the SNVS_LPCR register.

It looks like the default BSP uses logic in syscon-poweroff.c to set DP_EN/TOP bits (BITs 5 and 6) to turn off the system.

./drivers/power/reset/syscon-poweroff.c   However my tests shows commenting out the small block of code that sets these bits doesn't prevent the ON/OFF shutting off the system.

Your previous e-mails suggests somewhere in the initialization clears the bit.

So I am not sure adding a line of code in syscon-poweroff.c to set the PWR_GLITCH_EN bit would help.   

Thanks,

dawei

0 Kudos

1,070 Views
daweichen
Contributor III

Hi Yuri,

This just an FYI.   Turning off snvs_poweroff through ../arch/arm/boot/dts/imx6sx-sdb.dtsi, does seem to change the ONOFF button behavior.

&snvs_poweroff {
- status = "okay";
+ status = "disabled";
};

0 Kudos

1,070 Views
Yuri
NXP Employee
NXP Employee

Hello,

  yes, You may try to play with "snvs_poweroff"  and "snvs_pwrkey" options in the device tree file.

Regards,

Yuri.

0 Kudos