[Gta04-owner] gta04-kernel: modem control (works on GTA04A4 boards only)
Dr. H. Nikolaus Schaller
hns at goldelico.com
Wed Nov 5 11:56:11 CET 2014
I have fixed the modem power control driver, so that it becomes (almost) useable:
You can now simply use
rfkill block wwan
rfkill unblock wwan
rfkill list wwan
to control modem power. There is no more gpio186 to be controlled.
With some remaining issues:
* on GTA04A3 we can’t control the modem due to a hardware issue
* on GTA04A4 the driver does not have a feedback and does not know the real state (see below)
* on GTA04A5 there will be a feedback gpio
* I have added some power management code that should be triggered by “poweroff” but it does not
Now to the state issue. It is the same as with the GPS module. The Linux Kernel does not know
if the modem is currently on or off and can only track it by a variable or inspecting the interface
But if we reboot with unblocked modem, the kernel must assume that the modem is still off (because
that is the default state on the GTA04A4 after inserting the battery).
So this variable might get out of sync.
A workaround is that you should make sure you do a rfkill block wwan before reboot or poweroff.
The best solution is the feedback gpio that will be available in GTA04A5.
But we also need a solution for GTA04A4 (and A3). The idea that is currently sketched in the driver
is to monitor the USB-PHY driver and deduce if the modem is up or down (i.e. USB interface available
or not). This does not yet work and needs more polishing (and understanding how to read the PHY
state from the driver).
More information about the Gta04-owner