* [PATCH] platform/x86: bitland-mifs-wmi: Add Xiaomi Redmi Book Pro 14 2024
@ 2026-11-28 7:49 Miloš Vlku
2026-11-28 13:31 ` Mingyou Chen
0 siblings, 1 reply; 2+ messages in thread
From: Miloš Vlku @ 2026-11-28 7:49 UTC (permalink / raw)
To: ilpo.jarvinen, hansg
Cc: platform-driver-x86, linux-kernel, qby140326, ilya.gladyshev,
uselessfire, Miloš Vlku
The Redmi Book Pro 14 2024 (board TM2307) uses the same WMAA method
(SSDT with OEM Table ID XMCC1806) as the Redmi Book Pro 16 2024 (TM2309)
and stores the WMI_FN_SYSTEM_PER_MODE value directly in the EC register
QFAN. NTDP in the DSDT maps it onto the DPTF variable ODV1:
QFAN mode ODV1
1 balanced 0
2 quiet 2
3 Turbo 1
4 full speed 4
Map these as low-power 2, balanced 1, performance 3 and max-power 4.
Fn+K only cycles 1 -> 3 -> 2 and never offers full speed, and
power-profiles-daemon maps its "performance" profile to platform_profile
"performance", so full speed is exposed as max-power and is only used
when chosen explicitly.
GET returns QFAN for 1..4 and 0 for anything else, for example a 0 left
by the default mapping, so read 0 back as balanced. Writing 0 is not
useful: from the same 80 C start at the same power, the package cooled
by 15.2 C in 150 s at QFAN 0 against 29.5 C at QFAN 1 (n=4 each, no
overlap).
The firmware also accepts Turbo on battery (QFAN 3 sticks with no
charger connected), so add a battery entry for it. WMI_FN_SYSTEM_AC_TYPE
is not implemented on this firmware, so skip the AC type check as for
the other Xiaomi models.
Values measured on BIOS RMAMT4B0P0B0B (bios_release and
ec_firmware_release 1.11).
This change was prepared with an AI coding assistant (Claude, by
Anthropic), which read the ACPI tables and driver code and drafted the
patch. The values and behaviour were measured on the hardware by the
submitter.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Miloš Vlku <vlku.milos.fun@gmail.com>
---
Notes:
Tested on the TM2307 on top of pdx86 for-next (61c0dac952b9), built for
7.3.6 for the hardware test: all four profiles apply and read back as
expected on AC and on battery, a stale QFAN of 0 reads back as balanced,
and power-profiles-daemon's power-saver/balanced/performance map to
QFAN 2/1/3. Builds cleanly in-tree with W=1.
Anton: when we compared tables in October, the TM2309 matched these on
every point, so the same entry should fit with a second DMI match on
board_name TM2309. Happy to add it here if you can test it, or for you
to send it on top.
drivers/platform/x86/bitland-mifs-wmi.c | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/drivers/platform/x86/bitland-mifs-wmi.c b/drivers/platform/x86/bitland-mifs-wmi.c
index f71c93aff..9bf705d4e 100644
--- a/drivers/platform/x86/bitland-mifs-wmi.c
+++ b/drivers/platform/x86/bitland-mifs-wmi.c
@@ -139,6 +139,22 @@ static const struct bitland_mifs_quirks tm2135_quirks = {
.skip_ac_type_check = true,
};
+/* GET reports 0 for an out-of-range QFAN value; treat it as balanced. */
+static const struct bitland_profile_entry tm2307_profile_entries[] = {
+ { PLATFORM_PROFILE_LOW_POWER, 0x02 },
+ { PLATFORM_PROFILE_BALANCED, 0x01 },
+ { PLATFORM_PROFILE_BALANCED, 0x00, .no_set = true },
+ { PLATFORM_PROFILE_PERFORMANCE, 0x03 },
+ { PLATFORM_PROFILE_PERFORMANCE, 0x03, .battery = true },
+ { PLATFORM_PROFILE_MAX_POWER, 0x04 },
+};
+
+static const struct bitland_mifs_quirks tm2307_quirks = {
+ .profile_entries = tm2307_profile_entries,
+ .num_profile_entries = ARRAY_SIZE(tm2307_profile_entries),
+ .skip_ac_type_check = true,
+};
+
static const struct bitland_profile_entry tm2424_profile_entries[] = {
{ PLATFORM_PROFILE_LOW_POWER, 0x02 },
{ PLATFORM_PROFILE_LOW_POWER, 0x0a, true },
@@ -169,6 +185,13 @@ static const struct dmi_system_id bitland_mifs_dmi_table[] = {
},
.driver_data = (void *)&tm2135_quirks,
},
+ {
+ .matches = {
+ DMI_EXACT_MATCH(DMI_SYS_VENDOR, "XIAOMI"),
+ DMI_EXACT_MATCH(DMI_BOARD_NAME, "TM2307"),
+ },
+ .driver_data = (void *)&tm2307_quirks,
+ },
{
.matches = {
DMI_EXACT_MATCH(DMI_SYS_VENDOR, "XIAOMI"),
--
2.56.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] platform/x86: bitland-mifs-wmi: Add Xiaomi Redmi Book Pro 14 2024
2026-11-28 7:49 [PATCH] platform/x86: bitland-mifs-wmi: Add Xiaomi Redmi Book Pro 14 2024 Miloš Vlku
@ 2026-11-28 13:31 ` Mingyou Chen
0 siblings, 0 replies; 2+ messages in thread
From: Mingyou Chen @ 2026-11-28 13:31 UTC (permalink / raw)
To: Miloš Vlku, ilpo.jarvinen, hansg
Cc: platform-driver-x86, linux-kernel, ilya.gladyshev, uselessfire
On 11/28/26 15:49, Miloš Vlku wrote:
> The Redmi Book Pro 14 2024 (board TM2307) uses the same WMAA method
> (SSDT with OEM Table ID XMCC1806) as the Redmi Book Pro 16 2024 (TM2309)
> and stores the WMI_FN_SYSTEM_PER_MODE value directly in the EC register
> QFAN. NTDP in the DSDT maps it onto the DPTF variable ODV1:
>
> QFAN mode ODV1
> 1 balanced 0
> 2 quiet 2
> 3 Turbo 1
> 4 full speed 4
>
> Map these as low-power 2, balanced 1, performance 3 and max-power 4.
> Fn+K only cycles 1 -> 3 -> 2 and never offers full speed, and
> power-profiles-daemon maps its "performance" profile to platform_profile
> "performance", so full speed is exposed as max-power and is only used
> when chosen explicitly.
>
> GET returns QFAN for 1..4 and 0 for anything else, for example a 0 left
> by the default mapping, so read 0 back as balanced. Writing 0 is not
> useful: from the same 80 C start at the same power, the package cooled
> by 15.2 C in 150 s at QFAN 0 against 29.5 C at QFAN 1 (n=4 each, no
> overlap).
>
> The firmware also accepts Turbo on battery (QFAN 3 sticks with no
> charger connected), so add a battery entry for it. WMI_FN_SYSTEM_AC_TYPE
> is not implemented on this firmware, so skip the AC type check as for
> the other Xiaomi models.
>
> Values measured on BIOS RMAMT4B0P0B0B (bios_release and
> ec_firmware_release 1.11).
>
> This change was prepared with an AI coding assistant (Claude, by
> Anthropic), which read the ACPI tables and driver code and drafted the
> patch. The values and behaviour were measured on the hardware by the
> submitter.
>
> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Hi, please make sure the commits are signed by humans.
https://docs.kernel.org/process/coding-assistants.html
Replace with Assisted-by tag instead.
> Signed-off-by: Miloš Vlku <vlku.milos.fun@gmail.com>
> ---
>
> Notes:
> Tested on the TM2307 on top of pdx86 for-next (61c0dac952b9), built for
> 7.3.6 for the hardware test: all four profiles apply and read back as
> expected on AC and on battery, a stale QFAN of 0 reads back as balanced,
> and power-profiles-daemon's power-saver/balanced/performance map to
> QFAN 2/1/3. Builds cleanly in-tree with W=1.
>
> Anton: when we compared tables in October, the TM2309 matched these on
> every point, so the same entry should fit with a second DMI match on
> board_name TM2309. Happy to add it here if you can test it, or for you
> to send it on top.
>
> drivers/platform/x86/bitland-mifs-wmi.c | 23 +++++++++++++++++++++++
> 1 file changed, 23 insertions(+)
>
> diff --git a/drivers/platform/x86/bitland-mifs-wmi.c b/drivers/platform/x86/bitland-mifs-wmi.c
> index f71c93aff..9bf705d4e 100644
> --- a/drivers/platform/x86/bitland-mifs-wmi.c
> +++ b/drivers/platform/x86/bitland-mifs-wmi.c
> @@ -139,6 +139,22 @@ static const struct bitland_mifs_quirks tm2135_quirks = {
> .skip_ac_type_check = true,
> };
>
> +/* GET reports 0 for an out-of-range QFAN value; treat it as balanced. */
Please remove the AI slop comment.
> +static const struct bitland_profile_entry tm2307_profile_entries[] = {
> + { PLATFORM_PROFILE_LOW_POWER, 0x02 },
> + { PLATFORM_PROFILE_BALANCED, 0x01 },
> + { PLATFORM_PROFILE_BALANCED, 0x00, .no_set = true },
> + { PLATFORM_PROFILE_PERFORMANCE, 0x03 },
> + { PLATFORM_PROFILE_PERFORMANCE, 0x03, .battery = true },
> + { PLATFORM_PROFILE_MAX_POWER, 0x04 },
> +};
> +
> +static const struct bitland_mifs_quirks tm2307_quirks = {
> + .profile_entries = tm2307_profile_entries,
> + .num_profile_entries = ARRAY_SIZE(tm2307_profile_entries),
> + .skip_ac_type_check = true,
> +};
> +
> static const struct bitland_profile_entry tm2424_profile_entries[] = {
> { PLATFORM_PROFILE_LOW_POWER, 0x02 },
> { PLATFORM_PROFILE_LOW_POWER, 0x0a, true },
> @@ -169,6 +185,13 @@ static const struct dmi_system_id bitland_mifs_dmi_table[] = {
> },
> .driver_data = (void *)&tm2135_quirks,
> },
> + {
> + .matches = {
> + DMI_EXACT_MATCH(DMI_SYS_VENDOR, "XIAOMI"),
> + DMI_EXACT_MATCH(DMI_BOARD_NAME, "TM2307"),
> + },
> + .driver_data = (void *)&tm2307_quirks,
> + },
> {
> .matches = {
> DMI_EXACT_MATCH(DMI_SYS_VENDOR, "XIAOMI"),
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-11-28 13:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-28 7:49 [PATCH] platform/x86: bitland-mifs-wmi: Add Xiaomi Redmi Book Pro 14 2024 Miloš Vlku
2026-11-28 13:31 ` Mingyou Chen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®