diff options
Diffstat (limited to 'config/coreboot/default/patches/0037-ec-lenovo-h8-Replace-chip-regs-for-BT-WWAN-detect-wi.patch')
-rw-r--r-- | config/coreboot/default/patches/0037-ec-lenovo-h8-Replace-chip-regs-for-BT-WWAN-detect-wi.patch | 512 |
1 files changed, 512 insertions, 0 deletions
diff --git a/config/coreboot/default/patches/0037-ec-lenovo-h8-Replace-chip-regs-for-BT-WWAN-detect-wi.patch b/config/coreboot/default/patches/0037-ec-lenovo-h8-Replace-chip-regs-for-BT-WWAN-detect-wi.patch new file mode 100644 index 00000000..401f4d9a --- /dev/null +++ b/config/coreboot/default/patches/0037-ec-lenovo-h8-Replace-chip-regs-for-BT-WWAN-detect-wi.patch @@ -0,0 +1,512 @@ +From 321fa80375cb1050a09ef8ae8e1d9fb7a1590c8b Mon Sep 17 00:00:00 2001 +From: Matt DeVillier <matt.devillier@gmail.com> +Date: Sat, 12 Jul 2025 14:48:33 -0500 +Subject: [PATCH 37/43] ec/lenovo/h8: Replace chip regs for BT/WWAN detect with + Kconfig options + +Using Kconfig options instead of chip registers allows for newer boards +which do not implement BT/WWAN detection to not compile in the GPIO- +related parts, which are only valid for older (pre-FSP) platforms. + +Change-Id: Ibfe738adfc75abfaf078c6b7ff5472a1424909f5 +Signed-off-by: Matt DeVillier <matt.devillier@gmail.com> +--- + src/ec/lenovo/h8/Kconfig | 8 ++++++++ + src/ec/lenovo/h8/bluetooth.c | 2 +- + src/ec/lenovo/h8/chip.h | 2 -- + src/ec/lenovo/h8/wwan.c | 2 +- + src/mainboard/lenovo/t400/Kconfig | 1 + + src/mainboard/lenovo/t400/devicetree.cb | 1 - + src/mainboard/lenovo/t420/Kconfig | 1 + + src/mainboard/lenovo/t420/devicetree.cb | 1 - + src/mainboard/lenovo/t420s/Kconfig | 1 + + src/mainboard/lenovo/t420s/devicetree.cb | 1 - + src/mainboard/lenovo/t430/Kconfig | 2 ++ + src/mainboard/lenovo/t430/devicetree.cb | 2 -- + src/mainboard/lenovo/t430s/Kconfig | 1 + + src/mainboard/lenovo/t430s/variants/t430s/overridetree.cb | 1 - + src/mainboard/lenovo/t430s/variants/t431s/overridetree.cb | 2 -- + src/mainboard/lenovo/t520/Kconfig | 2 ++ + src/mainboard/lenovo/t520/devicetree.cb | 1 - + src/mainboard/lenovo/t520/variants/t520/overridetree.cb | 1 - + src/mainboard/lenovo/t530/Kconfig | 2 ++ + src/mainboard/lenovo/t530/devicetree.cb | 1 - + src/mainboard/lenovo/t530/variants/t530/overridetree.cb | 1 - + src/mainboard/lenovo/t60/Kconfig | 1 + + src/mainboard/lenovo/t60/variants/t60/overridetree.cb | 1 - + src/mainboard/lenovo/x1_carbon_gen1/Kconfig | 2 ++ + src/mainboard/lenovo/x1_carbon_gen1/devicetree.cb | 2 -- + src/mainboard/lenovo/x200/Kconfig | 1 + + src/mainboard/lenovo/x200/devicetree.cb | 1 - + src/mainboard/lenovo/x201/Kconfig | 1 + + src/mainboard/lenovo/x201/devicetree.cb | 1 - + src/mainboard/lenovo/x220/Kconfig | 1 + + src/mainboard/lenovo/x220/devicetree.cb | 2 -- + src/mainboard/lenovo/x230/Kconfig | 1 + + src/mainboard/lenovo/x230/devicetree.cb | 2 -- + src/mainboard/lenovo/x230/variants/x230s/overridetree.cb | 2 -- + src/mainboard/lenovo/x60/Kconfig | 1 + + src/mainboard/lenovo/x60/devicetree.cb | 1 - + 36 files changed, 28 insertions(+), 28 deletions(-) + +diff --git a/src/ec/lenovo/h8/Kconfig b/src/ec/lenovo/h8/Kconfig +index b15657d21a..fbdca5f94a 100644 +--- a/src/ec/lenovo/h8/Kconfig ++++ b/src/ec/lenovo/h8/Kconfig +@@ -65,4 +65,12 @@ config THINKPADEC_HKEY_EISAID + Motherboards of newer thinkpad models can override the default to match + vendor drivers and quirks. + ++config H8_HAS_BDC_GPIO_DETECTION ++ bool ++ default n ++ ++config H8_HAS_WWAN_GPIO_DETECTION ++ bool ++ default n ++ + endif # EC_LENOVO_H8 +diff --git a/src/ec/lenovo/h8/bluetooth.c b/src/ec/lenovo/h8/bluetooth.c +index 16fc8dce39..aa5fc5814f 100644 +--- a/src/ec/lenovo/h8/bluetooth.c ++++ b/src/ec/lenovo/h8/bluetooth.c +@@ -28,7 +28,7 @@ bool h8_has_bdc(const struct device *dev) + { + struct ec_lenovo_h8_config *conf = dev->chip_info; + +- if (!conf->has_bdc_detection) { ++ if (!CONFIG(H8_HAS_BDC_GPIO_DETECTION)) { + printk(BIOS_INFO, "H8: BDC detection not implemented. " + "Assuming BDC installed\n"); + return true; +diff --git a/src/ec/lenovo/h8/chip.h b/src/ec/lenovo/h8/chip.h +index 440c2fc4dd..0e4b11e753 100644 +--- a/src/ec/lenovo/h8/chip.h ++++ b/src/ec/lenovo/h8/chip.h +@@ -32,8 +32,6 @@ struct ec_lenovo_h8_config { + u8 has_keyboard_backlight; + u8 has_power_management_beeps; + u8 has_uwb; +- u8 has_bdc_detection; +- u8 has_wwan_detection; + + u8 bdc_gpio_num; + u8 bdc_gpio_lvl; +diff --git a/src/ec/lenovo/h8/wwan.c b/src/ec/lenovo/h8/wwan.c +index 685886fcce..3eea9541ec 100644 +--- a/src/ec/lenovo/h8/wwan.c ++++ b/src/ec/lenovo/h8/wwan.c +@@ -26,7 +26,7 @@ bool h8_has_wwan(const struct device *dev) + { + struct ec_lenovo_h8_config *conf = dev->chip_info; + +- if (!conf->has_wwan_detection) { ++ if (!CONFIG(H8_HAS_WWAN_GPIO_DETECTION)) { + printk(BIOS_INFO, "H8: WWAN detection not implemented. " + "Assuming WWAN installed\n"); + return true; +diff --git a/src/mainboard/lenovo/t400/Kconfig b/src/mainboard/lenovo/t400/Kconfig +index 5afcde8b81..85e580e30e 100644 +--- a/src/mainboard/lenovo/t400/Kconfig ++++ b/src/mainboard/lenovo/t400/Kconfig +@@ -12,6 +12,7 @@ config BOARD_SPECIFIC_OPTIONS + select EC_LENOVO_PMH7 + select EC_LENOVO_H8 + select H8_HAS_BAT_THRESHOLDS_IMPL ++ select H8_HAS_BDC_GPIO_DETECTION if !BOARD_LENOVO_R500 + select BOARD_ROMSIZE_KB_8192 if !BOARD_LENOVO_R500 + select BOARD_ROMSIZE_KB_4096 if BOARD_LENOVO_R500 + select HAVE_ACPI_TABLES +diff --git a/src/mainboard/lenovo/t400/devicetree.cb b/src/mainboard/lenovo/t400/devicetree.cb +index 3d007533a4..9361f330d2 100644 +--- a/src/mainboard/lenovo/t400/devicetree.cb ++++ b/src/mainboard/lenovo/t400/devicetree.cb +@@ -155,7 +155,6 @@ chip northbridge/intel/gm45 + register "eventc_enable" = "0xff" + register "eventd_enable" = "0xff" + +- register "has_bdc_detection" = "1" + register "bdc_gpio_num" = "48" + register "bdc_gpio_lvl" = "0" + end +diff --git a/src/mainboard/lenovo/t420/Kconfig b/src/mainboard/lenovo/t420/Kconfig +index e2137a3379..cbf07efab7 100644 +--- a/src/mainboard/lenovo/t420/Kconfig ++++ b/src/mainboard/lenovo/t420/Kconfig +@@ -11,6 +11,7 @@ config BOARD_SPECIFIC_OPTIONS + select EC_LENOVO_PMH7 + select EC_LENOVO_H8 + select H8_HAS_BAT_THRESHOLDS_IMPL ++ select H8_HAS_BDC_GPIO_DETECTION + select NO_UART_ON_SUPERIO + select BOARD_ROMSIZE_KB_8192 + select HAVE_ACPI_TABLES +diff --git a/src/mainboard/lenovo/t420/devicetree.cb b/src/mainboard/lenovo/t420/devicetree.cb +index f5272fc701..37ac884eb3 100644 +--- a/src/mainboard/lenovo/t420/devicetree.cb ++++ b/src/mainboard/lenovo/t420/devicetree.cb +@@ -149,7 +149,6 @@ chip northbridge/intel/sandybridge + register "eventd_enable" = "0xff" + register "evente_enable" = "0x0d" + +- register "has_bdc_detection" = "1" + register "bdc_gpio_num" = "54" + register "bdc_gpio_lvl" = "0" + end +diff --git a/src/mainboard/lenovo/t420s/Kconfig b/src/mainboard/lenovo/t420s/Kconfig +index 5ed1fdefe9..37b3993a1a 100644 +--- a/src/mainboard/lenovo/t420s/Kconfig ++++ b/src/mainboard/lenovo/t420s/Kconfig +@@ -11,6 +11,7 @@ config BOARD_SPECIFIC_OPTIONS + select EC_LENOVO_PMH7 + select GFX_GMA_PANEL_1_ON_LVDS + select H8_HAS_BAT_THRESHOLDS_IMPL ++ select H8_HAS_BDC_GPIO_DETECTION + select HAVE_ACPI_RESUME + select HAVE_ACPI_TABLES + select HAVE_CMOS_DEFAULT +diff --git a/src/mainboard/lenovo/t420s/devicetree.cb b/src/mainboard/lenovo/t420s/devicetree.cb +index 840e520fbb..335e025c72 100644 +--- a/src/mainboard/lenovo/t420s/devicetree.cb ++++ b/src/mainboard/lenovo/t420s/devicetree.cb +@@ -141,7 +141,6 @@ chip northbridge/intel/sandybridge + register "eventd_enable" = "0xff" + register "evente_enable" = "0x0d" + +- register "has_bdc_detection" = "1" + register "bdc_gpio_num" = "54" + register "bdc_gpio_lvl" = "0" + end +diff --git a/src/mainboard/lenovo/t430/Kconfig b/src/mainboard/lenovo/t430/Kconfig +index e136871503..1baa94a4c8 100644 +--- a/src/mainboard/lenovo/t430/Kconfig ++++ b/src/mainboard/lenovo/t430/Kconfig +@@ -12,6 +12,8 @@ config BOARD_SPECIFIC_OPTIONS + select EC_LENOVO_PMH7 + select GFX_GMA_PANEL_1_ON_LVDS + select H8_HAS_BAT_THRESHOLDS_IMPL ++ select H8_HAS_BDC_GPIO_DETECTION ++ select H8_HAS_WWAN_GPIO_DETECTION + select HAVE_ACPI_RESUME + select HAVE_ACPI_TABLES + select HAVE_CMOS_DEFAULT +diff --git a/src/mainboard/lenovo/t430/devicetree.cb b/src/mainboard/lenovo/t430/devicetree.cb +index 9a0db4dd85..02a4c85344 100644 +--- a/src/mainboard/lenovo/t430/devicetree.cb ++++ b/src/mainboard/lenovo/t430/devicetree.cb +@@ -118,11 +118,9 @@ chip northbridge/intel/sandybridge + register "eventd_enable" = "0xff" + register "evente_enable" = "0x0d" + +- register "has_bdc_detection" = "1" + register "bdc_gpio_num" = "54" + register "bdc_gpio_lvl" = "0" + +- register "has_wwan_detection" = "1" + register "wwan_gpio_num" = "70" + register "wwan_gpio_lvl" = "0" + end +diff --git a/src/mainboard/lenovo/t430s/Kconfig b/src/mainboard/lenovo/t430s/Kconfig +index 9a7a91b512..3ab5d340bb 100644 +--- a/src/mainboard/lenovo/t430s/Kconfig ++++ b/src/mainboard/lenovo/t430s/Kconfig +@@ -11,6 +11,7 @@ config BOARD_SPECIFIC_OPTIONS + select EC_LENOVO_PMH7 + select EC_LENOVO_H8 + select H8_HAS_BAT_THRESHOLDS_IMPL ++ select H8_HAS_BDC_GPIO_DETECTION if BOARD_LENOVO_T430S + select H8_HAS_PRIMARY_FN_KEYS if BOARD_LENOVO_T431S + select NO_UART_ON_SUPERIO + select BOARD_ROMSIZE_KB_16384 +diff --git a/src/mainboard/lenovo/t430s/variants/t430s/overridetree.cb b/src/mainboard/lenovo/t430s/variants/t430s/overridetree.cb +index a9da730815..bc947af287 100644 +--- a/src/mainboard/lenovo/t430s/variants/t430s/overridetree.cb ++++ b/src/mainboard/lenovo/t430s/variants/t430s/overridetree.cb +@@ -24,7 +24,6 @@ chip northbridge/intel/sandybridge + device ref lpc on + chip ec/lenovo/h8 + device pnp ff.2 on end # dummy +- register "has_bdc_detection" = "1" + register "bdc_gpio_num" = "54" + register "bdc_gpio_lvl" = "0" + end +diff --git a/src/mainboard/lenovo/t430s/variants/t431s/overridetree.cb b/src/mainboard/lenovo/t430s/variants/t431s/overridetree.cb +index 15712f941d..dae8bc7a2d 100644 +--- a/src/mainboard/lenovo/t430s/variants/t431s/overridetree.cb ++++ b/src/mainboard/lenovo/t430s/variants/t431s/overridetree.cb +@@ -55,8 +55,6 @@ chip northbridge/intel/sandybridge + register "config1" = "0x09" + register "config3" = "0xc0" + register "evente_enable" = "0x1d" +- # T431s only has BT on wlan card +- register "has_bdc_detection" = "0" + end + end + device ref thermal off end +diff --git a/src/mainboard/lenovo/t520/Kconfig b/src/mainboard/lenovo/t520/Kconfig +index 663113b98f..384927989f 100644 +--- a/src/mainboard/lenovo/t520/Kconfig ++++ b/src/mainboard/lenovo/t520/Kconfig +@@ -9,6 +9,8 @@ config BOARD_LENOVO_BASEBOARD_T520 + select EC_LENOVO_PMH7 + select EC_LENOVO_H8 + select H8_HAS_BAT_THRESHOLDS_IMPL ++ select H8_HAS_BDC_GPIO_DETECTION ++ select H8_HAS_WWAN_GPIO_DETECTION + select NO_UART_ON_SUPERIO + select BOARD_ROMSIZE_KB_8192 + select HAVE_ACPI_TABLES +diff --git a/src/mainboard/lenovo/t520/devicetree.cb b/src/mainboard/lenovo/t520/devicetree.cb +index 7102df0b9d..74605ca081 100644 +--- a/src/mainboard/lenovo/t520/devicetree.cb ++++ b/src/mainboard/lenovo/t520/devicetree.cb +@@ -137,7 +137,6 @@ chip northbridge/intel/sandybridge + register "eventd_enable" = "0xff" + register "evente_enable" = "0x0d" + +- register "has_bdc_detection" = "1" + register "bdc_gpio_num" = "54" + register "bdc_gpio_lvl" = "0" + end +diff --git a/src/mainboard/lenovo/t520/variants/t520/overridetree.cb b/src/mainboard/lenovo/t520/variants/t520/overridetree.cb +index 52946d1b6e..48d8f34e8d 100644 +--- a/src/mainboard/lenovo/t520/variants/t520/overridetree.cb ++++ b/src/mainboard/lenovo/t520/variants/t520/overridetree.cb +@@ -5,7 +5,6 @@ chip northbridge/intel/sandybridge + device ref lpc on + chip ec/lenovo/h8 + device pnp ff.2 on end # dummy +- register "has_wwan_detection" = "1" + register "wwan_gpio_num" = "70" + register "wwan_gpio_lvl" = "0" + end +diff --git a/src/mainboard/lenovo/t530/Kconfig b/src/mainboard/lenovo/t530/Kconfig +index a797656d71..9450fdddd7 100644 +--- a/src/mainboard/lenovo/t530/Kconfig ++++ b/src/mainboard/lenovo/t530/Kconfig +@@ -9,6 +9,8 @@ config BOARD_LENOVO_BASEBOARD_T530 + select EC_LENOVO_PMH7 + select GFX_GMA_PANEL_1_ON_LVDS + select H8_HAS_BAT_THRESHOLDS_IMPL ++ select H8_HAS_BDC_GPIO_DETECTION ++ select H8_HAS_WWAN_GPIO_DETECTION + select HAVE_ACPI_RESUME + select HAVE_ACPI_TABLES + select HAVE_CMOS_DEFAULT +diff --git a/src/mainboard/lenovo/t530/devicetree.cb b/src/mainboard/lenovo/t530/devicetree.cb +index 362e0a69e9..13c40d91d4 100644 +--- a/src/mainboard/lenovo/t530/devicetree.cb ++++ b/src/mainboard/lenovo/t530/devicetree.cb +@@ -117,7 +117,6 @@ chip northbridge/intel/sandybridge + register "eventd_enable" = "0xff" + register "evente_enable" = "0x0d" + +- register "has_bdc_detection" = "1" + register "bdc_gpio_num" = "54" + register "bdc_gpio_lvl" = "0" + end +diff --git a/src/mainboard/lenovo/t530/variants/t530/overridetree.cb b/src/mainboard/lenovo/t530/variants/t530/overridetree.cb +index 3f058e3854..9bd36488f6 100644 +--- a/src/mainboard/lenovo/t530/variants/t530/overridetree.cb ++++ b/src/mainboard/lenovo/t530/variants/t530/overridetree.cb +@@ -21,7 +21,6 @@ chip northbridge/intel/sandybridge + device ref lpc on + chip ec/lenovo/h8 + device pnp ff.2 on end # dummy +- register "has_wwan_detection" = "1" + register "wwan_gpio_num" = "70" + register "wwan_gpio_lvl" = "0" + end +diff --git a/src/mainboard/lenovo/t60/Kconfig b/src/mainboard/lenovo/t60/Kconfig +index ec3a6e01bb..6d095943bd 100644 +--- a/src/mainboard/lenovo/t60/Kconfig ++++ b/src/mainboard/lenovo/t60/Kconfig +@@ -25,6 +25,7 @@ config BOARD_SPECIFIC_OPTIONS + select HAVE_CMOS_DEFAULT + select I945_LVDS + select INTEL_GMA_HAVE_VBT ++ select H8_HAS_BDC_GPIO_DETECTION if BOARD_LENOVO_T60 || BOARD_LENOVO_R60 + + config MAINBOARD_DIR + default "lenovo/t60" +diff --git a/src/mainboard/lenovo/t60/variants/t60/overridetree.cb b/src/mainboard/lenovo/t60/variants/t60/overridetree.cb +index c58884a4b5..42e07a648c 100644 +--- a/src/mainboard/lenovo/t60/variants/t60/overridetree.cb ++++ b/src/mainboard/lenovo/t60/variants/t60/overridetree.cb +@@ -26,7 +26,6 @@ chip northbridge/intel/i945 + end + device pci 1f.0 on # PCI-LPC bridge + chip ec/lenovo/h8 +- register "has_bdc_detection" = "1" + register "bdc_gpio_num" = "7" + register "bdc_gpio_lvl" = "0" + device pnp ff.2 on end +diff --git a/src/mainboard/lenovo/x1_carbon_gen1/Kconfig b/src/mainboard/lenovo/x1_carbon_gen1/Kconfig +index 4e4c58b246..f0dcb38ab4 100644 +--- a/src/mainboard/lenovo/x1_carbon_gen1/Kconfig ++++ b/src/mainboard/lenovo/x1_carbon_gen1/Kconfig +@@ -11,6 +11,8 @@ config BOARD_SPECIFIC_OPTIONS + select EC_LENOVO_PMH7 + select GFX_GMA_PANEL_1_ON_LVDS + select H8_HAS_BAT_THRESHOLDS_IMPL ++ select H8_HAS_BDC_GPIO_DETECTION ++ select H8_HAS_WWAN_GPIO_DETECTION + select HAVE_ACPI_RESUME + select HAVE_ACPI_TABLES + select HAVE_CMOS_DEFAULT +diff --git a/src/mainboard/lenovo/x1_carbon_gen1/devicetree.cb b/src/mainboard/lenovo/x1_carbon_gen1/devicetree.cb +index 84611d0656..6f601e9521 100644 +--- a/src/mainboard/lenovo/x1_carbon_gen1/devicetree.cb ++++ b/src/mainboard/lenovo/x1_carbon_gen1/devicetree.cb +@@ -127,11 +127,9 @@ chip northbridge/intel/sandybridge + register "eventd_enable" = "0xff" + register "evente_enable" = "0x0d" + +- register "has_bdc_detection" = "1" + register "bdc_gpio_num" = "54" + register "bdc_gpio_lvl" = "0" + +- register "has_wwan_detection" = "1" + register "wwan_gpio_num" = "70" + register "wwan_gpio_lvl" = "0" + end +diff --git a/src/mainboard/lenovo/x200/Kconfig b/src/mainboard/lenovo/x200/Kconfig +index 29e2f6ca91..4aa1e2ce1e 100644 +--- a/src/mainboard/lenovo/x200/Kconfig ++++ b/src/mainboard/lenovo/x200/Kconfig +@@ -11,6 +11,7 @@ config BOARD_SPECIFIC_OPTIONS + select EC_LENOVO_PMH7 + select EC_LENOVO_H8 + select H8_HAS_BAT_THRESHOLDS_IMPL ++ select H8_HAS_BDC_GPIO_DETECTION if BOARD_LENOVO_X200 + select NO_UART_ON_SUPERIO + select BOARD_ROMSIZE_KB_8192 + select HAVE_ACPI_TABLES +diff --git a/src/mainboard/lenovo/x200/devicetree.cb b/src/mainboard/lenovo/x200/devicetree.cb +index 7871cfd00d..2d6ea77214 100644 +--- a/src/mainboard/lenovo/x200/devicetree.cb ++++ b/src/mainboard/lenovo/x200/devicetree.cb +@@ -144,7 +144,6 @@ chip northbridge/intel/gm45 + register "eventc_enable" = "0xff" + register "eventd_enable" = "0xff" + +- register "has_bdc_detection" = "1" + register "bdc_gpio_num" = "7" + register "bdc_gpio_lvl" = "0" + end +diff --git a/src/mainboard/lenovo/x201/Kconfig b/src/mainboard/lenovo/x201/Kconfig +index 8517232d20..319f127ab6 100644 +--- a/src/mainboard/lenovo/x201/Kconfig ++++ b/src/mainboard/lenovo/x201/Kconfig +@@ -25,6 +25,7 @@ config BOARD_SPECIFIC_OPTIONS + select INTEL_GMA_HAVE_VBT + select MAINBOARD_USES_IFD_GBE_REGION + select H8_HAS_BAT_THRESHOLDS_IMPL ++ select H8_HAS_BDC_GPIO_DETECTION + + config VBOOT + select VBOOT_VBNV_FLASH +diff --git a/src/mainboard/lenovo/x201/devicetree.cb b/src/mainboard/lenovo/x201/devicetree.cb +index 0be8a3ba07..5b6746b718 100644 +--- a/src/mainboard/lenovo/x201/devicetree.cb ++++ b/src/mainboard/lenovo/x201/devicetree.cb +@@ -140,7 +140,6 @@ chip northbridge/intel/ironlake + register "eventc_enable" = "0xff" + register "eventd_enable" = "0xff" + +- register "has_bdc_detection" = "1" + register "bdc_gpio_num" = "48" + register "bdc_gpio_lvl" = "0" + end +diff --git a/src/mainboard/lenovo/x220/Kconfig b/src/mainboard/lenovo/x220/Kconfig +index e6a2e66209..a877546bb7 100644 +--- a/src/mainboard/lenovo/x220/Kconfig ++++ b/src/mainboard/lenovo/x220/Kconfig +@@ -11,6 +11,7 @@ config BOARD_SPECIFIC_OPTIONS + select EC_LENOVO_PMH7 + select GFX_GMA_PANEL_1_ON_LVDS + select H8_HAS_BAT_THRESHOLDS_IMPL ++ select H8_HAS_WWAN_GPIO_DETECTION + select HAVE_ACPI_RESUME + select HAVE_ACPI_TABLES + select HAVE_CMOS_DEFAULT +diff --git a/src/mainboard/lenovo/x220/devicetree.cb b/src/mainboard/lenovo/x220/devicetree.cb +index aaeecc8246..0ca9bcc6a3 100644 +--- a/src/mainboard/lenovo/x220/devicetree.cb ++++ b/src/mainboard/lenovo/x220/devicetree.cb +@@ -141,9 +141,7 @@ chip northbridge/intel/sandybridge + # BDC shorts pin14 and pin1 + # BDC's connector pin14 is left floating + # BDC's connector pin1 is routed to SB GPIO 54 +- register "has_bdc_detection" = "0" + +- register "has_wwan_detection" = "1" + register "wwan_gpio_num" = "70" + register "wwan_gpio_lvl" = "0" + end +diff --git a/src/mainboard/lenovo/x230/Kconfig b/src/mainboard/lenovo/x230/Kconfig +index 1d04af9bff..cb6395beb9 100644 +--- a/src/mainboard/lenovo/x230/Kconfig ++++ b/src/mainboard/lenovo/x230/Kconfig +@@ -12,6 +12,7 @@ config BOARD_SPECIFIC_OPTIONS + select EC_LENOVO_H8 + select H8_HAS_BAT_THRESHOLDS_IMPL + select H8_HAS_PRIMARY_FN_KEYS if BOARD_LENOVO_X230S ++ select H8_HAS_WWAN_GPIO_DETECTION if !BOARD_LENOVO_X230S + select NO_UART_ON_SUPERIO + select BOARD_ROMSIZE_KB_12288 if BOARD_LENOVO_X230 || BOARD_LENOVO_X230T || BOARD_LENOVO_X230_EDP + select BOARD_ROMSIZE_KB_16384 if BOARD_LENOVO_X230S +diff --git a/src/mainboard/lenovo/x230/devicetree.cb b/src/mainboard/lenovo/x230/devicetree.cb +index 3067096f0d..735ce4d9d9 100644 +--- a/src/mainboard/lenovo/x230/devicetree.cb ++++ b/src/mainboard/lenovo/x230/devicetree.cb +@@ -123,9 +123,7 @@ chip northbridge/intel/sandybridge + # BDC shorts pin14 and pin1 + # BDC's connector pin14 is left floating + # BDC's connector pin1 is routed to SB GPIO 54 +- register "has_bdc_detection" = "0" + +- register "has_wwan_detection" = "1" + register "wwan_gpio_num" = "70" + register "wwan_gpio_lvl" = "0" + end +diff --git a/src/mainboard/lenovo/x230/variants/x230s/overridetree.cb b/src/mainboard/lenovo/x230/variants/x230s/overridetree.cb +index a84b5f3bdd..86c2e16e7d 100644 +--- a/src/mainboard/lenovo/x230/variants/x230s/overridetree.cb ++++ b/src/mainboard/lenovo/x230/variants/x230s/overridetree.cb +@@ -40,8 +40,6 @@ chip northbridge/intel/sandybridge + register "config3" = "0xc4" + register "event5_enable" = "0x3c" + register "evente_enable" = "0x1d" +- # X230s only has BT on wlan card +- register "has_bdc_detection" = "0" + device pnp ff.2 on end + end + end +diff --git a/src/mainboard/lenovo/x60/Kconfig b/src/mainboard/lenovo/x60/Kconfig +index 0f12a9272e..33238ccbd8 100644 +--- a/src/mainboard/lenovo/x60/Kconfig ++++ b/src/mainboard/lenovo/x60/Kconfig +@@ -16,6 +16,7 @@ config BOARD_SPECIFIC_OPTIONS + select EC_LENOVO_H8 + select DRIVERS_I2C_CK505 + select DRIVER_LENOVO_SERIALS ++ select H8_HAS_BDC_GPIO_DETECTION + select HAVE_OPTION_TABLE + select INTEL_INT15 + select HAVE_CMOS_DEFAULT +diff --git a/src/mainboard/lenovo/x60/devicetree.cb b/src/mainboard/lenovo/x60/devicetree.cb +index 0e1e5fced5..7f28bbae49 100644 +--- a/src/mainboard/lenovo/x60/devicetree.cb ++++ b/src/mainboard/lenovo/x60/devicetree.cb +@@ -130,7 +130,6 @@ chip northbridge/intel/i945 + register "eventc_enable" = "0xff" + register "eventd_enable" = "0xff" + +- register "has_bdc_detection" = "1" + register "bdc_gpio_num" = "7" + register "bdc_gpio_lvl" = "0" + end +-- +2.39.5 + |