[coreboot] x60 : adding WWAN support

2014-09-01 Thread Charles Devereaux
Hello

I'm interested in WWAN support, mostly for the GPS features and the cool
things you can do with them (like a stratum ntp server).

I was told a EM770W doesn't even need a network registration to output NMEA
coordinates (http://forum.thinkpads.com/viewtopic.php?f=30t=114426#p735612)
so I got one.

I looked at patch #4056 which enable WWAN for the EC, but it seems to only
part of the job: the ACPI table should also contain a GWAN key for
thinkpad-acpi

In drivers/platform/x86/thinkpad_acpi.c, you can see different references
to WAN:
/* ACPI GWAN/SWAN bits */
TP_ACPI_WANCARD_HWPRESENT   = 0x01, /* Wan hw available */
TP_ACPI_WANCARD_RADIOSSW= 0x02, /* Wan radio enabled */
TP_ACPI_WANCARD_RESUMECTRL  = 0x04, /* Wan state at resume:
   0 = disable, 1 = enable
*/

In wan_get_status :
if (!acpi_evalf(hkey_handle, status, GWAN, d))
return -EIO;

Apparently, this last part cause the WWAN card not to be handled by
thinkpad-acpi, which would otherwise provide rfkill support (usefull to
save power, something I'd like to improve)

In acpi-3.dsl Scope (\_SB.PCI0.LPC.EC.HKEY, I see entries for both GWAN and
SWAN, and other things (WGPS, but what does it means???)

I believe similar entries should be added to coreboot asl, but I'm not sure
of how integrated they should be. If I understand correctly, following the
logic of patch #5242, there should be a conditional statement then some
acpigen.

If anyone is willing to submit a patch, I would be happy to test it.

Charles
-- 
coreboot mailing list: coreboot@coreboot.org
http://www.coreboot.org/mailman/listinfo/coreboot

Re: [coreboot] x60 : adding WWAN support

2014-09-01 Thread Vladimir 'φ-coder/phcoder' Serbinenko
On 01.09.2014 22:19, Charles Devereaux wrote:
 Hello
 
 I'm interested in WWAN support, mostly for the GPS features and the cool
 things you can do with them (like a stratum ntp server).
 
Most GPS receivers don't have enough precision for any timing.
 I was told a EM770W doesn't even need a network registration to output
 NMEA coordinates
 (http://forum.thinkpads.com/viewtopic.php?f=30t=114426#p735612) so I
 got one.
 
 I looked at patch #4056 which enable WWAN for the EC, but it seems to
 only part of the job: the ACPI table should also contain a GWAN key for
 thinkpad-acpi
 
Not necessary.
 Apparently, this last part cause the WWAN card not to be handled by
 thinkpad-acpi, which would otherwise provide rfkill support (usefull to
 save power, something I'd like to improve)
Soft rfkill is always available through wwan driver.

 I believe similar entries should be added to coreboot asl, but I'm not
 sure of how integrated they should be. If I understand correctly,
 following the logic of patch #5242, there should be a conditional
 statement then some acpigen.
 
5242 is very special because of wacom tablet interaction (serial device
naming)
See src/ec/lenovo/h8/acpi/ec.asl and included files for the relevant scopes




signature.asc
Description: OpenPGP digital signature
-- 
coreboot mailing list: coreboot@coreboot.org
http://www.coreboot.org/mailman/listinfo/coreboot

Re: [coreboot] x60 : adding WWAN support

2014-09-01 Thread Charles Devereaux
Hello

On Mon, Sep 1, 2014 at 4:33 PM, Vladimir 'φ-coder/phcoder' Serbinenko 
phco...@gmail.com wrote:

Most GPS receivers don't have enough precision for any timing.


Would you recommend a specific one?

 Apparently, this last part cause the WWAN card not to be handled by
  thinkpad-acpi, which would otherwise provide rfkill support (usefull to
  save power, something I'd like to improve)
 Soft rfkill is always available through wwan driver.


What should I do to enable it? At the moment it is not showing in rfkill
list, even while I monitor the lack of satellites fix with:

echo 'AT^WPDGP'  /dev/ttyUSB0

cat /dev/ttyUSB3|grep GPGSV|grep -v 00

*$ rfkill list

0: phy0: Wireless LAN

Soft blocked: no

Hard blocked: no

1: hci0: Bluetooth

Soft blocked: no

Hard blocked: no

I read http://www.thinkwiki.org/wiki/Ericsson_F3507g_Mobile_Broadband_Module
which mentions /sys/devices/platform/thinkpad_acpi/rfkill/rfkill0/state,
but I believe it depends on the ACPI entries to show up.


Thanks

Charles
-- 
coreboot mailing list: coreboot@coreboot.org
http://www.coreboot.org/mailman/listinfo/coreboot