diff options
author | Leah Rowe <leah@libreboot.org> | 2025-07-14 01:48:35 +0100 |
---|---|---|
committer | Leah Rowe <leah@libreboot.org> | 2025-07-14 03:19:31 +0100 |
commit | 32dfdfbb01b84bb9c058e9b84305f15a14d4e231 (patch) | |
tree | 77ab0a8f21a86ecf6728edd29e571310ce1a30a7 /config/coreboot/default/patches/0037-ec-lenovo-h8-Replace-chip-regs-for-BT-WWAN-detect-wi.patch | |
parent | 122d009af149b3af83176fcf77a962bdc8b52d64 (diff) |
coreboot: rev 8b52167a9f 13 July 2025, rebase t480
coreboot/default: update t480 patches to set 38
see: https://review.coreboot.org/c/coreboot/+/83274/38
I was previously using:
https://review.coreboot.org/c/coreboot/+/83274/25
Matt DeViller aka MrChromeBox, recently took over the
patch set, tidying up and re-factoring the code so that
it's more suitable for upstream. Several hacky behaviours
were removed, for example the MEC1663 code is now its own
code in coreboot, rather than being bolted onto the H8s code.
Certain T480-specific changes made to global parts of the
coreboot code are now done only on the tree itself.
Mate Kukri has also tested Matt's recent updates. More
testing still needed on Nvidia dGPU models, which never
worked before anyway; Intel GPU models should still work.
Thermas zone handling is also improved. See patch:
https://review.coreboot.org/c/coreboot/+/88415/1
https://review.coreboot.org/c/coreboot/+/88416/2
Functionally, this is mostly the same as before. As I said,
Matt has focused on code cleanup, so that the board can be
properly upstreamed. Hopefully this will be merged soon,
in coreboot-main.
Besides this, the following upstream changes were imported:
* 8b52167a9f arch/x86: Add support for cooperative multitasking on x86_64
* 569b7a8861 Docs/releases: Finalize 25.06 release notes
* 5db8bf0cfa mb/trulo/var/pujjolo: Enable USB3 WWAN device
* e013c9586c mb/trulo/var/pujjolo: Modify mipi camera parameters
* 7b8520ab69 mb/trulo/var/pujjolo: Update fingerprint enable pin status
* f74027d5ae mb/google/nissa/var/craask: Add elan touchscreen support
* 396a883a0c mb/hp/snb_ivb_desktops: Include PS/2 controller ASL code for MS Windows
* 18c067d392 mb/google/fatcat/var/kinmen: Add Synaptics touchpad
* 2f5b384ba5 soc/mediatek/mt8189: Enable EARLY_MMU_INIT to improve boot time
* d5bce8c420 mb/hp: Add HP 260 G1 DM Business PC (Haswell)
* 48c6f66fa4 mb/google/ocelot: Update TPM_TIS_ACPI_INTERRUPT value in Kconfig
* 0660fe50de mb/google/ocelot: Update GPE configuration
* 5b3063802e mb/google/fatcat/var/kinmen: Fix touchscreen IRQ setting
* 6c4e502fdd mb/google/nissa/var/pujjocento: Reduce PL4 to 38W with no battery
* 6e92554ab6 mb/trulo/var/pujjolo: Modify FW_CONFIG for mipi camera
* 4f5f75da34 mb/trulo/var/pujjolo: Correct USB3 Type-A OC pins
* a1dfd39e04 mb/google/fatcat/var/kinmen: Add AUDIO_UNKNOWN and probe for ALC721
* 306544b427 mb/google/fatcat/var/francka: Add AUDIO_UNKNOWN and audio probes
* edf47d44cd mb/google/fatcat/var/fatcat: Disable Audio for invalid Audio FW_CONFIG
* 454079c3bc lib/cbfs: Ensure cache buffer alignment in ramstage
* 0ef670a66a mb/google/ocelot/var/ocelot: Configure FPS related changes
* 6ab37f0e0e mb/google/ocelot/var/ocelot: Add FW_CONFIG for Finger Print
* 3f61df24d5 mb/google/ocelot/var/ocelot: Add FW_CONFIG for Storage
* bb95a26cda mb/google/ocelot/var/ocelot: Add FW_CONFIG for WiFi
* 410b3c697f mb/google/ocelot/var/ocelot: Add FW_CONIG for ISH
* afaf4c3d7b mb/google/brya/variants/pujjolo: Update ISH GPIOs and add ISH firmware name
* f6de6f8933 mb/google/fatcat: Drop redundant SNDW GPIO mapping
* 584fdd6572 soc/mediatek/mt8196: Remove redundant bootblock.c from Makefile.mk
* 24ea6937f2 soc/intel/apollolake: Add the Kconfig options for IFWI Boot Profile
* c68645cd88 util/supermicro: Fix mem leak in get_line_as_int error conditions
* 05396238da libpayload/drivers: Fix mem-leak in cbmem_console error condition
* 1219981177 drivers/emu/qemu: Add a comment about fw_cfg assumptions
* d866e72b3a mb/google/fatcat/var/kinmen: Set CRFP to use GPIO for status
* 4367daae20 drivers/spi: Add option to generate proper PowerResource _STA
* 03c331399c mb/google/nissa/var/craask: Add focaltech touchscreen support
* b3d7c40fb5 mb/siemens/mc_rpl: Remove code for board_id
* 5de16ed1b8 mb/siemens/mc_rpl: Remove unused embedded controller code
* a1067ec6de mb/siemens/mc_rpl: Remove unneeded code to select a VBT name in CBFS
* 463cda84d2 mb/siemens/mc_rpl: Remove unused Type-C data definition
* dcbe591201 mb/siemens/mc_rpl: Use SPD data from HWInfo instead of from CBFS
* 6c059f8af3 IVB mainboards: Drop 1024M option for gfx_uma_size
* 3b61dbaa06 mb/asus/p8z77-m_pro: Remove incorrect gfx_uma_size options
* 2b7115b139 mb/hp/snb_ivb_desktops: Add gfx_uma_size options up to 512MB
* d99769bbde mb/hp/snb_ivb_desktops/variants: enable 4th sata port on tested models
* 95784dbafb mb/google/ocelot/var/ocelot: Add FW_CONFIG for Audio
* f323adb19f soc/mediatek/mt8189: Increase SPI NOR clock rate from 26MHz to 52MHz
* 689af47b52 commonlib: Add pvmfw related timestamps
* f1d06a5ad4 soc/intel/common/block/memory: Provide a way to use SPD data from memory
* 11b1dc0a97 Reapply "util/cbmem: Consolidate CBMEM and coreboot table access"
* 13f1c6118e Documentation: Update cbmem.md with more information
* 07267d19ce arch/x86/postcar_loader: Add comment line for reloc_params assignment
* e94ac6e655 mb/google/nissa/var/pujjocento: Reduce PL4 to 38 W with no battery
* 2eaec1b53a sbom: Fix build with merged bootblock and romstage
* 267f08dafd MAINTAINERS: Add KunYi Chen as maintainer for LattePanda Mu
Signed-off-by: Leah Rowe <leah@libreboot.org>
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 + |