Low power mode for KSTR-SAMA5D27
Related projects:
- https://gitlab.conclusive.pl/devices/linux/-/tree/kstr-low-power: Device tree entries switching off WiFi and Bluetooth.
- https://gitlab.conclusive.pl/devices/kstr-sama5d27/phytool/-/tree/integration: Forked tool for switching off PHY.
Optionally also https://gitlab.conclusive.pl/devices/linux/-/tree/kstr-wakeup for waking up the board by grounding pin 30 of header A.
Putting the board to sleep:
systemctl suspend
Waking up: any interrupt. SoC ready to work in 300 ms, ping to ETH recovered in 4 seconds after wake up, ping to WiFi in 5 seconds. After 5 seconds whole wake up procedure is complete.
Power consumption measured in tests: 4.8 mA @ 3.5 V = around 17 mW = around 19 days on 2250 mAh battery.
What is being done upon putting the board to sleep:
- SAMA5D27 put into ULP0 mode.
- WiFi reset on the WL_REG_ON pin.
- Bluetooth reset on the BT_REG_ON pin.
- PHY switched off with the use of "power-down" bit of the BMCR register.
- PMIC's outputs switched to low-power mode for the domains 3V3, 1V8, 1V2.
- Reduced voltages 3.3 → 3.1, 1.8 → 1.65, 1.2 → 1.1 V.
On wake up all changes are reversed.
Edited by Marcin Wcisło