mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-28 02:35:28 +00:00
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>
36 lines
768 B
C
36 lines
768 B
C
/* Copyright (c) 2013 The Chromium OS Authors. All rights reserved.
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
* found in the LICENSE file.
|
|
*/
|
|
|
|
/* Switch module for Chrome EC */
|
|
|
|
#ifndef __CROS_EC_SWITCH_H
|
|
#define __CROS_EC_SWITCH_H
|
|
|
|
#include "common.h"
|
|
#include "gpio.h"
|
|
|
|
#ifdef HAS_TASK_SWITCH
|
|
/**
|
|
* Interrupt handler for switch inputs.
|
|
*
|
|
* @param signal Signal which triggered the interrupt.
|
|
*/
|
|
void switch_interrupt(enum gpio_signal signal);
|
|
#else
|
|
#define switch_interrupt NULL
|
|
#endif /* HAS_TASK_SWITCH */
|
|
|
|
/**
|
|
* Return non-zero if write protect signal is asserted.
|
|
*/
|
|
int switch_get_write_protect(void);
|
|
|
|
/**
|
|
* Set wireless switch state.
|
|
*/
|
|
void board_enable_wireless(uint8_t enabled);
|
|
|
|
#endif /* __CROS_EC_SWITCH_H */
|