Firefly Open Source Community

   Login   |   Register   |
New_Topic
Print Previous Topic Next Topic

Sleep not work

72

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
72

Sleep not work

Posted at 6/6/2019 03:53:51      View:4563 | Replies:6        Print      Only Author   [Copy Link] 1#
Trying to send android to sleep via 'echo mem > /sys/power/state' but after few seconds system become available again

  1. # echo mem > /sys/power/state
  2. [ 2680.730028] PM: suspend entry 2019-06-05 19:52:06.877892777 UTC
  3. [ 2680.730070] PM: Syncing filesystemdone.
  4. [ 2680.733973] Freezing user spa(elapsed 0.003 seconds) done.
  5. [ 2680.738087] Freezing remaining freezable tasks ... (elapsed 0.002 seconds) done.
  6. [ 2680.741349] Suspending consoleno_console_suspend to debug)
  7. INFO:    sleep mode config[0xde]:
  8. INFO:           AP_PWROFF
  9. INFO:           SLP_ARMPD
  10. INFO:           SLP_PLLPD
  11. INFO:           DDR_RET
  12. INFO:           Scan wakeup system
  13. INFO:           PWMINFO:    RK3399 the wake up information:
  14. INFO:    wake up status: 0x4
  15. INFO:           GPIO interrupt wakeup
  16. INFO:           GPIO0: 0x8
Copy the code


Is is possible to disable this GPIO0: 0x8 iterrupt wake up ?
Reply

Use props Report

72

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
72
Posted at 6/9/2019 03:24:18        Only Author  2#
echo freeze > /sys/power/state also not working as i expect
Reply

Use props Report

72

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
72
Posted at 6/9/2019 12:35:04        Only Author  3#
Okay, i've managed to disable GPIO_WAKE_UP via changing rockchip_suspend in dts:
  1. diff --git a/kernel/arch/arm64/boot/dts/rockchip/rk3399-firefly-port.dtsi b/kernel/arch/arm64/boot/dts/rockchip/rk3399-firefly-port.dtsi
  2. index d657082..ac10872 100644
  3. --- a/kernel/arch/arm64/boot/dts/rockchip/rk3399-firefly-port.dtsi
  4. +++ b/kernel/arch/arm64/boot/dts/rockchip/rk3399-firefly-port.dtsi
  5. @@ -238,7 +238,7 @@
  6.                 >;
  7.         rockchip,wakeup-config = <
  8.                 (0
  9. -               | RKPM_GPIO_WKUP_EN
  10. +/*             | RKPM_GPIO_WKUP_EN */
  11.                 | RKPM_PWM_WKUP_EN
  12.                 )
  13.                 >;
Copy the code


Now i have new issue - can't wake up the board even with power button press
Reply

Use props Report

1396

Credits

0

Prestige

0

Contribution

vip

Rank: 6Rank: 6

Credits
1396
Posted at 6/18/2019 11:37:15        Only Author  4#
Last edited by penguin In 6/18/2019 12:01 Editor

According to your suspend log, the wake up source is the GPIO.
0x8 is the value of GPIO_INT_STATUS of GPIO0 which indicates that the GPIO0_B1 is the wake up source.
Check the schematic to see how it is connected.

Power button is a GPIO key, which will not wake up the system after disabling GPIO as wake up source.
Reply

Use props Report

72

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
72
Posted at 7/18/2019 03:37:49        Only Author  5#
I'm try to achieve next behaviour on power button press:
- board is going in "low power mode" (disabling any kind of wireless devices (WiFi, BT, WWAN, GPS), usb ports, fan)
- wakelocks are disabled at all
- wake-up available only by power button press again.


But i don't know if it possible
would be happy for any help or advice
Reply

Use props Report

1396

Credits

0

Prestige

0

Contribution

vip

Rank: 6Rank: 6

Credits
1396
Posted at 7/25/2019 09:08:40        Only Author  6#
Bypassing all wakelocks is not a good idea.

Why would you want to do that? What's your purpose?
Reply

Use props Report

72

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
72
Posted at 7/25/2019 22:28:36        Only Author  7#
Use board as CarPC
here is simple diagram https://docs.google.com/drawings ... DgrHePg3e9EEo0/edit
Some logic info:
AIO connected via ITPS (Intelligence PowerSuply),
when car is in OFF state, nothing is powered ON
when car Ignition is ON, ITPS opens 5V channel to AIO and powers it up.
after if Ignition become OFF then ITPS send to sleep AIO (via "pressing" power button) and checks that AIO is asleep (via LED pin)
after configured timeout (say 20min) if car still in OFF state, ITPS try to power off AIO (long press power button) and finally powers down itself
if IGNITION is ON before timeout, ITPS waking up AIO (by press power button) and check that AIO is awake (via LED pin)

So i want to minimize current on AIO by disabling any wireless and be sure that AIO will not wake up by itself.

Reply

Use props Report

You need to log in before you can reply Login | Register

This forum Credits Rules

Quick Reply Back to top Back to list