summaryrefslogtreecommitdiff
path: root/src/ec/lenovo
diff options
context:
space:
mode:
Diffstat (limited to 'src/ec/lenovo')
-rw-r--r--src/ec/lenovo/h8/chip.h1
-rw-r--r--src/ec/lenovo/h8/h8.c16
2 files changed, 17 insertions, 0 deletions
diff --git a/src/ec/lenovo/h8/chip.h b/src/ec/lenovo/h8/chip.h
index bac54ecac6..98a7972d1d 100644
--- a/src/ec/lenovo/h8/chip.h
+++ b/src/ec/lenovo/h8/chip.h
@@ -49,6 +49,7 @@ struct ec_lenovo_h8_config {
u8 has_keyboard_backlight;
u8 has_power_management_beeps;
+ u8 has_uwb;
};
#endif /* EC_LENOVO_H8EC_CHIP_H */
diff --git a/src/ec/lenovo/h8/h8.c b/src/ec/lenovo/h8/h8.c
index f5b1b77ec8..e70c0e8ed0 100644
--- a/src/ec/lenovo/h8/h8.c
+++ b/src/ec/lenovo/h8/h8.c
@@ -63,6 +63,15 @@ static void h8_wwan_enable(int on)
ec_clr_bit(0x3a, 6);
}
+/* Controls radio-off pin in UWB MiniPCIe slot. */
+static void h8_uwb_enable(int on)
+{
+ if (on)
+ ec_set_bit(0x31, 2);
+ else
+ ec_clr_bit(0x31, 2);
+}
+
static void h8_fn_ctrl_swap(int on)
{
if (on)
@@ -239,6 +248,13 @@ static void h8_enable(device_t dev)
h8_wwan_enable(val);
+ if (conf->has_uwb) {
+ if (get_option(&val, "uwb") != CB_SUCCESS)
+ val = 1;
+
+ h8_uwb_enable(val);
+ }
+
if (get_option(&val, "fn_ctrl_swap") != CB_SUCCESS)
val = 0;
h8_fn_ctrl_swap(val);