From 8fa84d9111ce6e1152cd0710a7c62bb93dbfe1cb Mon Sep 17 00:00:00 2001 From: Matt DeVillier Date: Wed, 16 Apr 2025 09:17:24 -0500 Subject: [PATCH] mb/starlabs/*: Add CFR entry for Bluetooth RTD3 Allows the Bluetooth RTD3 feature to be toggled on/off. On some devices, enabling Bluetooth RTD3 causes the BT device to continually disconnect/reconnect under Windows, so having the ability to disable it in those cases is useful. Change-Id: I1730dc35d56919fcf03acdf577288caf1e1a4ee3 Signed-off-by: Matt DeVillier Reviewed-on: https://review.coreboot.org/c/coreboot/+/87492 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel Reviewed-by: Sean Rhodes --- src/mainboard/starlabs/byte_adl/cfr.c | 9 +++++++++ src/mainboard/starlabs/starbook/cfr.c | 1 + src/mainboard/starlabs/starbook/cfr.h | 8 ++++++++ src/mainboard/starlabs/starfighter/cfr.c | 9 +++++++++ src/mainboard/starlabs/starlite_adl/cfr.c | 9 +++++++++ 5 files changed, 36 insertions(+) diff --git a/src/mainboard/starlabs/byte_adl/cfr.c b/src/mainboard/starlabs/byte_adl/cfr.c index 442326f41c..e360e3b419 100644 --- a/src/mainboard/starlabs/byte_adl/cfr.c +++ b/src/mainboard/starlabs/byte_adl/cfr.c @@ -136,9 +136,18 @@ static const struct sm_object vtd = SM_DECLARE_BOOL({ .default_value = true, }); +static const struct sm_object bluetooth_rtd3 = SM_DECLARE_BOOL({ + .opt_name = "bluetooth_rtd3", + .ui_name = "Bluetooth Runtime-D3", + .ui_helptext = "Enable or disable Bluetooth power optimization.\n" + "Recommended to disable when booting Windows.", + .default_value = true, +}); + static struct sm_obj_form performance = { .ui_name = "Performance", .obj_list = (const struct sm_object *[]) { + &bluetooth_rtd3, &power_profile, NULL }, diff --git a/src/mainboard/starlabs/starbook/cfr.c b/src/mainboard/starlabs/starbook/cfr.c index 92416b91de..5fed679631 100644 --- a/src/mainboard/starlabs/starbook/cfr.c +++ b/src/mainboard/starlabs/starbook/cfr.c @@ -12,6 +12,7 @@ static struct sm_obj_form performance = { .ui_name = "Performance", .obj_list = (const struct sm_object *[]) { + &bluetooth_rtd3, &fan_mode, &power_profile, NULL diff --git a/src/mainboard/starlabs/starbook/cfr.h b/src/mainboard/starlabs/starbook/cfr.h index 4ddf363573..554062aeeb 100644 --- a/src/mainboard/starlabs/starbook/cfr.h +++ b/src/mainboard/starlabs/starbook/cfr.h @@ -201,4 +201,12 @@ static const struct sm_object vtd = SM_DECLARE_BOOL({ .default_value = true, }); +static const struct sm_object bluetooth_rtd3 = SM_DECLARE_BOOL({ + .opt_name = "bluetooth_rtd3", + .ui_name = "Bluetooth Runtime-D3", + .ui_helptext = "Enable or disable Bluetooth power optimization.\n" + "Recommended to disable when booting Windows.", + .default_value = true, +}); + #endif /* _STARBOOK_CFR_H_ */ diff --git a/src/mainboard/starlabs/starfighter/cfr.c b/src/mainboard/starlabs/starfighter/cfr.c index 7e040cce31..e8522f10eb 100644 --- a/src/mainboard/starlabs/starfighter/cfr.c +++ b/src/mainboard/starlabs/starfighter/cfr.c @@ -157,9 +157,18 @@ static const struct sm_object vtd = SM_DECLARE_BOOL({ .default_value = true, }); +static const struct sm_object bluetooth_rtd3 = SM_DECLARE_BOOL({ + .opt_name = "bluetooth_rtd3", + .ui_name = "Bluetooth Runtime-D3", + .ui_helptext = "Enable or disable Bluetooth power optimization.\n" + "Recommended to disable when booting Windows.", + .default_value = true, +}); + static struct sm_obj_form performance = { .ui_name = "Performance", .obj_list = (const struct sm_object *[]) { + &bluetooth_rtd3, &fan_mode, &power_profile, NULL diff --git a/src/mainboard/starlabs/starlite_adl/cfr.c b/src/mainboard/starlabs/starlite_adl/cfr.c index a00a7a7f4a..3292835c08 100644 --- a/src/mainboard/starlabs/starlite_adl/cfr.c +++ b/src/mainboard/starlabs/starlite_adl/cfr.c @@ -189,9 +189,18 @@ static const struct sm_object vtd = SM_DECLARE_BOOL({ .default_value = true, }); +static const struct sm_object bluetooth_rtd3 = SM_DECLARE_BOOL({ + .opt_name = "bluetooth_rtd3", + .ui_name = "Bluetooth Runtime-D3", + .ui_helptext = "Enable or disable Bluetooth power optimization.\n" + "Recommended to disable when booting Windows.", + .default_value = true, +}); + static struct sm_obj_form performance = { .ui_name = "Performance", .obj_list = (const struct sm_object *[]) { + &bluetooth_rtd3, &memory_speed, &power_profile, NULL