aboutsummaryrefslogtreecommitdiff
path: root/src/ec/lenovo/h8/h8.c
diff options
context:
space:
mode:
authorPatrick Rudolph <siro@das-labor.org>2017-08-13 12:09:54 +0200
committerAlexander Couzens <lynxis@fe80.eu>2017-09-11 23:15:47 +0000
commitb8e325a7140020caf7f0f3bc82a1606c9fa4d15e (patch)
treefdc0cdd6ba2ff31447bb1bdd7f8758c2f533d462 /src/ec/lenovo/h8/h8.c
parentb77eec82f36206c69b7c6be7c9a2fcadebca756a (diff)
ec/lenovo/h8: Add WWAN detection support
* Add support for detecting WWAN. * Allows to turn off power to WWAN if no card is installed. Add the following devicetree values: * has_wwan_detection Set to one to indicate that the following register are sane. * wwan_gpio_num SB GPIO num to read. * wwan_gpio_lvl SB GPIO level for card to be present (usually zero). Don't enable WWAN power if no card is detected. As there are no devicetree values yet, the new code doesn't have any effect. Change-Id: Ie53275b384c85df8adf71fe79b3d54211c868756 Signed-off-by: Patrick Rudolph <siro@das-labor.org> Reviewed-on: https://review.coreboot.org/20983 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Alexander Couzens <lynxis@fe80.eu>
Diffstat (limited to 'src/ec/lenovo/h8/h8.c')
-rw-r--r--src/ec/lenovo/h8/h8.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/src/ec/lenovo/h8/h8.c b/src/ec/lenovo/h8/h8.c
index 6f14953ced..882ac0271c 100644
--- a/src/ec/lenovo/h8/h8.c
+++ b/src/ec/lenovo/h8/h8.c
@@ -44,15 +44,6 @@ void h8_wlan_enable(int on)
ec_clr_bit(0x3a, 5);
}
-/* Controls radio-off pin in WWAN MiniPCIe slot. */
-static void h8_wwan_enable(int on)
-{
- if (on)
- ec_set_bit(0x3a, 6);
- else
- ec_clr_bit(0x3a, 6);
-}
-
/* Controls radio-off pin in UWB MiniPCIe slot. */
static void h8_uwb_enable(int on)
{
@@ -283,9 +274,7 @@ static void h8_enable(struct device *dev)
val = h8_has_bdc(dev) && h8_bluetooth_nv_enable();
h8_bluetooth_enable(val);
- if (get_option(&val, "wwan") != CB_SUCCESS)
- val = 1;
-
+ val = h8_has_wwan(dev) && h8_wwan_nv_enable();
h8_wwan_enable(val);
if (conf->has_uwb) {