Allow the modem to enter soft sleep when
we don't talk to the modem using AT commands.
This was already the case in suspend, but
not during runtime. By only waking the modem
from soft sleep when we need to send
an AT command, we can save some power.
In some internal discussions between me,
the ModemManager maintainer and a Quectel engineer,
the URC cache we use is unnecessary.
I did some testing and removed the URC cache
from the configs and it works reliable without affecting
the functionality.
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.
dquote> When using a custom kernel, if this setting is set to 'usbat' only, no RING urc is reported on any interface. Changing QURCCFG to 'all' makes the modem report RINGs on all supported interfaces, making receiving calls possible when using a custom firmware
The AT commands list for each stage is now configured per-device, as
well as the UART port to be used.
As this list can be changed by the user, there is no more need for a
special GNSS-related option
The need to use libusb to check for the modem state on startup now
depends on a config option, instead of the device type. The USB PID and
VID are moved to config as well.
This commit prepares the use of device-specific configuration files.
These files should be named after the device-tree `compatible` string
with the `toml` extension.
`eg25-manager` will search for config files in
`<prefix>/etc/eg25-manager` first (or `/etc/eg25-manager` if prefix is
`/usr`), then in `<prefix>/share/eg25-manager`.
The EG25 modem needs at least 2 minutes after indicating 'RDY'
to be fully operational. If the modem is suspended before that,
calls or texts may not be seen by the userspace.
This mostly occurs when a full reboot or poweroff/poweron
sequence of the phone is performed.
: