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 <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/90627
Reviewed-by: Sean Rhodes <sean@starlabs.systems>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nicholas <nic.c3.14@gmail.com>
This commit is contained in:
Matt DeVillier 2025-12-27 10:49:11 -06:00
commit e3fc4a1f69

View file

@ -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