From e3fc4a1f693648c928bbcc63841caa8e98e970ed Mon Sep 17 00:00:00 2001 From: Matt DeVillier Date: Sat, 27 Dec 2025 10:49:11 -0600 Subject: [PATCH] ec/starlabs/merlin: Reorganize Kconfig and guard options properly Reorganize the Kconfig file to improve structure and ensure proper dependencies, to prevent options from showing in menuconfig. Drop text string from EC_STARLABS_MERLIN as it should only be selected at the mainboard level. Ensure all config options are only available when one of the 3 Starlabs EC types is selected by the mainboard. TEST=use menuconfig to build for Lenovo T440p, verify Merlin EC option not shown. Change-Id: I3f961342de25a22a8ebe1ae03dcf09c6ac2a0fb8 Signed-off-by: Matt DeVillier Reviewed-on: https://review.coreboot.org/c/coreboot/+/90627 Reviewed-by: Sean Rhodes Tested-by: build bot (Jenkins) Reviewed-by: Nicholas --- src/ec/starlabs/merlin/Kconfig | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/ec/starlabs/merlin/Kconfig b/src/ec/starlabs/merlin/Kconfig index e650c81772..0d2c6378b8 100644 --- a/src/ec/starlabs/merlin/Kconfig +++ b/src/ec/starlabs/merlin/Kconfig @@ -1,5 +1,12 @@ ## SPDX-License-Identifier: GPL-2.0-only +config EC_STARLABS_MERLIN + bool + default n + help + Use open source embedded controller firmware. Both firmwares have the + same features but differ in licensing and compilers. + config EC_STARLABS_NUVOTON bool select EC_ACPI @@ -18,6 +25,8 @@ config EC_STARLABS_ITE KBL - 3.12 or later And open-source Merlin firmware version 1.00 or later +if EC_STARLABS_MERLIN || EC_STARLABS_ITE || EC_STARLABS_NUVOTON + config EC_STARLABS_ADD_ITE_BIN bool "Add Star Labs EC binary file" default n @@ -63,13 +72,6 @@ config EC_STARLABS_BATTERY_OEM string default "Unknown" -config EC_STARLABS_MERLIN - bool "Use open-source Merlin EC Firmware" - default n - help - Use open source embedded controller firmware. Both firmwares have the - same features but differ in licensing and compilers. - if EC_STARLABS_MERLIN config EC_STARLABS_MAX_CHARGE @@ -102,4 +104,6 @@ config EC_STARLABS_CHARGE_LED help Select if the mainboard supports reducing the charge LED brightness -endif +endif # EC_STARLABS_MERLIN + +endif # EC_STARLABS_MERLIN || EC_STARLABS_ITE || EC_STARLABS_NUVOTON