Add a 100ms delay before PWRKEY sequence

This brings the power on sequence in line with the EG25-G Hardware Design
datasheet, which states we need to wait at least 30 ms after VBAT becomes stable
before pulling PWRKEY low (first action of the power on sequene).

After this change the sequence becomes as follows:
- Set RESET_N high
- Wait 60 ms (double 30 ms)
- Execute PWRKEY sequence

60 ms was choosen because we don't know when VBAT becomes stable, but it should
be much less than an additional 30 ms. Empirical evidence suggests PinePhone
units with a healthy battery do not see serious side effects from not doing
this, while the modem will fail to boot and/or throw random errors on boot with
a worn out battery.
This commit is contained in:
Djhg2000
2021-03-04 20:08:12 +01:00
parent 3d076e8bc8
commit 528fe7e07c
5 changed files with 25 additions and 0 deletions

View File

@@ -33,6 +33,7 @@ struct EG25Manager {
gboolean use_libusb;
guint usb_vid;
guint usb_pid;
gulong poweron_delay;
int at_fd;
guint at_source;