1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <southbridge/intel/common/gpio.h>
4 #include <console/console.h>
5 #include <device/device.h>
6 #include <ec/acpi/ec.h>
13 /* Controls radio-off pin in WWAN MiniPCIe slot. */
14 void h8_wwan_enable(int on
)
23 * Detect WWAN on supported MBs.
25 bool h8_has_wwan(const struct device
*dev
)
27 struct ec_lenovo_h8_config
*conf
= dev
->chip_info
;
29 if (!conf
->has_wwan_detection
) {
30 printk(BIOS_INFO
, "H8: WWAN detection not implemented. "
31 "Assuming WWAN installed\n");
35 if (get_gpio(conf
->wwan_gpio_num
) == conf
->wwan_gpio_lvl
) {
36 printk(BIOS_INFO
, "H8: WWAN installed\n");
40 printk(BIOS_INFO
, "H8: WWAN not installed\n");
45 * Return WWAN NVRAM setting.
47 bool h8_wwan_nv_enable(void)
49 return get_uint_option("wwan", true);