It’s finally here, following 6 months of experiments and failures.
A06 now suspends to ram, which means <100mA power draw.
I’m estimating >2day standby time, need testing.
As much as I want to provide ready-to-use packages… Currently it’s a bit rough and only for ArchLinux.
@guu I’m looking forward to clockworkpi team to integrate this to Armbian.
@m4xm4n it’s (partially) a PKGBUILD so I guess it’s easy for Manjaro
The gradients of successful A06 suspend:
[success] Short the non-installed R124 on mainboard
- note, this is not necessary because @lonewsk and me verified that the core will wake up when a power cable is plugged in.
- [rk3399 is not directly aware of power key] Stock mainboard
- [success] Short the non-installed R124 on mainboard
- [success] mainline kernel
- [too old for current Arch userspace] rockchip BSP 4.19
- Kernel’s interface to PSCI
- [success] Rockchip’s kernel patch to interface with ATF (SIP)
- [no gpio configuration] standard PSCI interface only
- bootloader (BL33)
- [success] mainline u-boot
- [doesn’t compile] Rockchip’s u-boot
- Trusted firmware (ATF, BL31)
- [success] Rockchip’s closed-source trusted firmware, modify RKTRUST/RK3399TRUST.ini and remove BL32 (optee)
- [kernel panic] Rockchip’s closed-source trusted firmware
- [does not detect wakeup interrupt] upstream ATF
- [does detect wakeup interrupt, stuck at M0 firmware] modded upstream ATF
- Second stage loader
- [success] Rockchip’s closed-source miniloader
- [passes resume M0 firmware and power-up FSM, but power draw stuck at 300mA, kernel not resumed] u-boot SPL/TPL
I’ve tried almost every possible combination… and all of a sudden the screen lights up indicating a successful resume from deep sleep. I had to check twice to make sure it’s not s2idle fooling me
Kernel side patches: arch-linux-arm-clockworkpi-a06/linux-clockworkpi-a06 at main · yatli/arch-linux-arm-clockworkpi-a06 · GitHub
U-boot: arch-linux-arm-clockworkpi-a06/uboot-clockworkpi-a06 at main · yatli/arch-linux-arm-clockworkpi-a06 · GitHub
Guide: uboot+miniloader: doc/README.rockchip · master · U-Boot / U-Boot · GitLab
- Modify rkbin/RKTRUST/RK3399TRUST.ini:
--- a/RKTRUST/RK3399TRUST.ini +++ b/RKTRUST/RK3399TRUST.ini @@ -8,9 +8,7 @@ SEC=1 PATH=bin/rk33/rk3399_bl31_v1.35.elf ADDR=0x00040000 [BL32_OPTION] -SEC=1 -PATH=bin/rk33/rk3399_bl32_v2.10.bin -ADDR=0x08400000 +SEC=0 [BL33_OPTION] SEC=0 [OUTPUT]
Guess I need to buy a second A06 for uConsole!
- Hibernate doesn’t work
- Figure out how rk808 interrupt is connected, so we can have RTC timer wakeup
- Always feel something wrong about rk808 – it should be always powered on by VCC-RTC as long as there’s a battery, right?
- [Done] VCC_5v remains active. This means the keyboard + any attached usb devices are powered (in my case, an internal usb hub)
- [Done ]
(oops) clean up the devicetree – currently the power key is mapped as “UP” key… Trigger only for negative edge Disable axp22x-pek – they fire multiple suspend/resume signals so sometimes it goes to sleep again right after resume.
- Wifi/BT/Serial wakeup possible?
- Yes, there are host wakeup signals connected correctly