diff options
author | Duncan Laurie <dlaurie@chromium.org> | 2013-05-31 09:41:21 -0700 |
---|---|---|
committer | ChromeBot <chrome-bot@google.com> | 2013-06-03 14:32:07 -0700 |
commit | d6d3b7cbc5621519d54d231aba13aa4ab50651aa (patch) | |
tree | 53cfcb6b51131184a2a7a5eea2b645a52af34f31 /include | |
parent | f8e12df9dfb8d028cee1e9a039c4cbcebc608385 (diff) | |
download | chrome-ec-d6d3b7cbc5621519d54d231aba13aa4ab50651aa.tar.gz |
Add wireless switch control for WWAN
Haswell devices have EC control of the WWAN power rail.
Expose a new wireless switch enable flag for this under
the existing wirless enable command.
This change also abstracts the wireless enable function
to call a per-board handler so the different boards can
do the right thing based on their GPIO setup.
The haswell boards will switch WLAN radio and WWAN power
rails based on the switch inputs. These boards do not have
EC control of bluetooth radio/rail power.
WLAN (power and radio) still defaults to enabled. Disabling
with ectool will turn off the radio but keep the power enabled
in order to prevent the PCIe device from disappearing.
WWAN (power) still defaults to disabled. Disabling with
ectool will turn off the power rail.
BUG=chrome-os-partner:19871
BRANCH=none
TEST=manual: boot on slippy
DEFAULT:
> ectool gpioget pp3300_wlan_en
GPIO pp3300_wlan_en = 1
> ectool gpioget wlan_off_l
GPIO wlan_off_l = 1
> ectool gpioget pp3300_lte_en
GPIO pp3300_lte_en = 0
ENABLE WWAN:
> ectool wireless 0x7
Success.
> ectool gpioget pp3300_lte_en
GPIO pp3300_lte_en = 1
DISABLE WLAN (radio):
> ectool wireless 0x7
Success.
> ectool gpioget pp3300_wlan_en
GPIO pp3300_wlan_en = 1
> ectool gpioget wlan_off_l
GPIO wlan_off_l = 0
Change-Id: I6f760b8cf5ab47d8f7f0dd8cd4d3e6563464043e
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/57215
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/ec_commands.h | 1 | ||||
-rw-r--r-- | include/switch.h | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/include/ec_commands.h b/include/ec_commands.h index d4a88f510b..93258df241 100644 --- a/include/ec_commands.h +++ b/include/ec_commands.h @@ -132,6 +132,7 @@ /* Wireless switch flags */ #define EC_WIRELESS_SWITCH_WLAN 0x01 #define EC_WIRELESS_SWITCH_BLUETOOTH 0x02 +#define EC_WIRELESS_SWITCH_WWAN 0x04 /* * This header file is used in coreboot both in C and ACPI code. The ACPI code diff --git a/include/switch.h b/include/switch.h index 2cd732774e..70cbfdc3e3 100644 --- a/include/switch.h +++ b/include/switch.h @@ -27,4 +27,9 @@ void switch_interrupt(enum gpio_signal signal); */ int switch_get_write_protect(void); +/** + * Set wireless switch state. + */ +void board_enable_wireless(uint8_t enabled); + #endif /* __CROS_EC_SWITCH_H */ |