mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] platform/x86: thinkpad_acpi: Add X9-14 Gen 1 to non-standard thermal/fan quirk tables
@ 2026-08-26  7:30 Huang Wei
  2026-09-18 15:15 ` Ilpo Järvinen
  0 siblings, 1 reply; 4+ messages in thread
From: Huang Wei @ 2026-08-26  7:30 UTC (permalink / raw)
  To: hansg
  Cc: hmh, mpearson-lenovo, derekjohn.clark, ilpo.jarvinen,
	ibm-acpi-devel, platform-driver-x86, linux-kernel, Huang Wei,
	thisisamirv

The Lenovo ThinkPad X9-14 Gen 1 uses a non-standard Embedded Controller
firmware (ECFW) whose thermal and fan registers are not located at the
classic addresses. On this model the thermal registers sit at 0xA8-0xAF /
0xB8-0xBF and the fan registers use the non-standard offsets, instead of
the legacy 0x78-0x7F / 0xC0-0xC7 (thermal) and 0x2f / 0x84 (fan).

Because the model is not covered by the existing quirk tables, the driver
probes the legacy thermal addresses during init, reads back 0x00 from
every register, concludes the EC is "misbehaving" and disables all
thermal sensor access:

  thinkpad_acpi: ThinkPad ACPI EC access misbehaving, disabling thermal
  sensors access

Fan access is affected the same way, leaving fan1/fan2 reporting 0 RPM.

The infrastructure for these non-standard ECFW models is already in place
(commit 301c1904d638 ("platform/x86: thinkpad_acpi: Fix to correct wrong
temp reporting on some ThinkPads")); the X9-14 Gen 1 simply was not added
to the model lists yet. Add its BIOS model code N4D to both the thermal
and fan quirk tables so that:
  - thermal_read_mode_check() selects TPACPI_THERMAL_TPEC_12 and reads
    the 0xA8/0xB8 registers, and
  - fan_init() selects the non-standard fan register addresses.

Reported-by: thisisamirv <thisisamirv@gmail.com>
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=221228
Signed-off-by: Huang Wei <huangwei@kylinos.cn>
---
 drivers/platform/x86/lenovo/thinkpad_acpi.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/platform/x86/lenovo/thinkpad_acpi.c b/drivers/platform/x86/lenovo/thinkpad_acpi.c
index 6dd7c28fc0db..498139ac8f4b 100644
--- a/drivers/platform/x86/lenovo/thinkpad_acpi.c
+++ b/drivers/platform/x86/lenovo/thinkpad_acpi.c
@@ -6021,6 +6021,7 @@ static const struct tpacpi_quirk thermal_quirk_table[] __initconst = {
 	TPACPI_Q_LNV3('R', '0', 'T', true),	/* 11e Gen5 GL*/
 	TPACPI_Q_LNV3('R', '1', 'D', true),	/* 11e Gen5 GL-R*/
 	TPACPI_Q_LNV3('R', '0', 'V', true),	/* 11e Gen5 KL-Y*/
+	TPACPI_Q_LNV3('N', '4', 'D', true),	/* X9-14 Gen 1 */
 };
 
 static enum thermal_access_mode thermal_read_mode;
@@ -8845,6 +8846,7 @@ static const struct tpacpi_quirk fan_quirk_table[] __initconst = {
 	TPACPI_Q_LNV3('R', '0', 'T', TPACPI_FAN_NS),	/* 11e Gen5 GL */
 	TPACPI_Q_LNV3('R', '1', 'D', TPACPI_FAN_NS),	/* 11e Gen5 GL-R */
 	TPACPI_Q_LNV3('R', '0', 'V', TPACPI_FAN_NS),	/* 11e Gen5 KL-Y */
+	TPACPI_Q_LNV3('N', '4', 'D', TPACPI_FAN_NS),	/* X9-14 Gen 1 */
 	TPACPI_Q_LNV3('N', '1', 'O', TPACPI_FAN_NOFAN),	/* X1 Tablet (2nd gen) */
 	TPACPI_Q_LNV3('R', '0', 'Q', TPACPI_FAN_DECRPM),/* L480 */
 	TPACPI_Q_LNV('8', 'F', TPACPI_FAN_TPR),		/* ThinkPad x120e */
-- 
2.25.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] platform/x86: thinkpad_acpi: Add X9-14 Gen 1 to non-standard thermal/fan quirk tables
  2026-08-26  7:30 [PATCH] platform/x86: thinkpad_acpi: Add X9-14 Gen 1 to non-standard thermal/fan quirk tables Huang Wei
@ 2026-09-18 15:15 ` Ilpo Järvinen
  2026-09-18 16:15   ` [PATCH v2] " Huang Wei
  0 siblings, 1 reply; 4+ messages in thread
From: Ilpo Järvinen @ 2026-09-18 15:15 UTC (permalink / raw)
  To: Huang Wei
  Cc: Hans de Goede, hmh, Mark Pearson, derekjohn.clark,
	ibm-acpi-devel, platform-driver-x86, LKML, thisisamirv

On Wed, 26 Aug 2026, Huang Wei wrote:

> The Lenovo ThinkPad X9-14 Gen 1 uses a non-standard Embedded Controller
> firmware (ECFW) whose thermal and fan registers are not located at the
> classic addresses. On this model the thermal registers sit at 0xA8-0xAF /
> 0xB8-0xBF and the fan registers use the non-standard offsets, instead of
> the legacy 0x78-0x7F / 0xC0-0xC7 (thermal) and 0x2f / 0x84 (fan).
> 
> Because the model is not covered by the existing quirk tables, the driver
> probes the legacy thermal addresses during init, reads back 0x00 from
> every register, concludes the EC is "misbehaving" and disables all
> thermal sensor access:
> 
>   thinkpad_acpi: ThinkPad ACPI EC access misbehaving, disabling thermal
>   sensors access
> 
> Fan access is affected the same way, leaving fan1/fan2 reporting 0 RPM.
> 
> The infrastructure for these non-standard ECFW models is already in place
> (commit 301c1904d638 ("platform/x86: thinkpad_acpi: Fix to correct wrong
> temp reporting on some ThinkPads")); the X9-14 Gen 1 simply was not added
> to the model lists yet. Add its BIOS model code N4D to both the thermal
> and fan quirk tables so that:
>   - thermal_read_mode_check() selects TPACPI_THERMAL_TPEC_12 and reads
>     the 0xA8/0xB8 registers, and
>   - fan_init() selects the non-standard fan register addresses.
> 
> Reported-by: thisisamirv <thisisamirv@gmail.com>
> Closes: https://bugzilla.kernel.org/show_bug.cgi?id=221228
> Signed-off-by: Huang Wei <huangwei@kylinos.cn>
> ---
>  drivers/platform/x86/lenovo/thinkpad_acpi.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/platform/x86/lenovo/thinkpad_acpi.c b/drivers/platform/x86/lenovo/thinkpad_acpi.c
> index 6dd7c28fc0db..498139ac8f4b 100644
> --- a/drivers/platform/x86/lenovo/thinkpad_acpi.c
> +++ b/drivers/platform/x86/lenovo/thinkpad_acpi.c
> @@ -6021,6 +6021,7 @@ static const struct tpacpi_quirk thermal_quirk_table[] __initconst = {
>  	TPACPI_Q_LNV3('R', '0', 'T', true),	/* 11e Gen5 GL*/
>  	TPACPI_Q_LNV3('R', '1', 'D', true),	/* 11e Gen5 GL-R*/
>  	TPACPI_Q_LNV3('R', '0', 'V', true),	/* 11e Gen5 KL-Y*/
> +	TPACPI_Q_LNV3('N', '4', 'D', true),	/* X9-14 Gen 1 */
>  };
>  
>  static enum thermal_access_mode thermal_read_mode;
> @@ -8845,6 +8846,7 @@ static const struct tpacpi_quirk fan_quirk_table[] __initconst = {
>  	TPACPI_Q_LNV3('R', '0', 'T', TPACPI_FAN_NS),	/* 11e Gen5 GL */
>  	TPACPI_Q_LNV3('R', '1', 'D', TPACPI_FAN_NS),	/* 11e Gen5 GL-R */
>  	TPACPI_Q_LNV3('R', '0', 'V', TPACPI_FAN_NS),	/* 11e Gen5 KL-Y */
> +	TPACPI_Q_LNV3('N', '4', 'D', TPACPI_FAN_NS),	/* X9-14 Gen 1 */
>  	TPACPI_Q_LNV3('N', '1', 'O', TPACPI_FAN_NOFAN),	/* X1 Tablet (2nd gen) */
>  	TPACPI_Q_LNV3('R', '0', 'Q', TPACPI_FAN_DECRPM),/* L480 */
>  	TPACPI_Q_LNV('8', 'F', TPACPI_FAN_TPR),		/* ThinkPad x120e */

Hi,

This no longer applies cleanly so please respin.


-- 
 i.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH v2] platform/x86: thinkpad_acpi: Add X9-14 Gen 1 to non-standard thermal/fan quirk tables
  2026-09-18 15:15 ` Ilpo Järvinen
@ 2026-09-18 16:15   ` Huang Wei
  2026-09-18 18:25     ` Ilpo Järvinen
  0 siblings, 1 reply; 4+ messages in thread
From: Huang Wei @ 2026-09-18 16:15 UTC (permalink / raw)
  To: hansg
  Cc: ilpo.jarvinen, mpearson-lenovo, platform-driver-x86,
	linux-kernel, thisisamirv

The Lenovo ThinkPad X9-14 Gen 1 uses a non-standard Embedded Controller
firmware (ECFW) whose thermal and fan registers are not located at the
classic addresses. On this model the thermal registers sit at 0xA8-0xAF /
0xB8-0xBF and the fan registers use the non-standard offsets, instead of
the legacy 0x78-0x7F / 0xC0-0xC7 (thermal) and 0x2f / 0x84 (fan).

Because the model is not covered by the existing quirk tables, the driver
probes the legacy thermal addresses during init, reads back 0x00 from
every register, concludes the EC is "misbehaving" and disables all
thermal sensor access:

  thinkpad_acpi: ThinkPad ACPI EC access misbehaving, disabling thermal
  sensors access

Fan access is affected the same way, leaving fan1/fan2 reporting 0 RPM.

The infrastructure for these non-standard ECFW models is already in place
(commit 301c1904d638 ("platform/x86: thinkpad_acpi: Fix to correct wrong
temp reporting on some ThinkPads")); the X9-14 Gen 1 simply was not added
to the model lists yet. Add its BIOS model code N4D to both the thermal
and fan quirk tables so that:
  - thermal_read_mode_check() selects TPACPI_THERMAL_TPEC_12 and reads
    the 0xA8/0xB8 registers, and
  - fan_init() selects the non-standard fan register addresses.

Reported-by: thisisamirv <thisisamirv@gmail.com>
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=221228
Signed-off-by: Huang Wei <huangwei@kylinos.cn>

---
Changes in v2:
- Rebase onto current mainline: the fan quirk table gained an Edge E330
  entry since v1, shifting the context. No functional change.

--- a/drivers/platform/x86/lenovo/thinkpad_acpi.c
+++ b/drivers/platform/x86/lenovo/thinkpad_acpi.c
@@ -6021,6 +6021,7 @@
 	TPACPI_Q_LNV3('R', '0', 'T', true),	/* 11e Gen5 GL*/
 	TPACPI_Q_LNV3('R', '1', 'D', true),	/* 11e Gen5 GL-R*/
 	TPACPI_Q_LNV3('R', '0', 'V', true),	/* 11e Gen5 KL-Y*/
+	TPACPI_Q_LNV3('N', '4', 'D', true),	/* X9-14 Gen 1 */
 };
 
 static enum thermal_access_mode thermal_read_mode;
@@ -8845,6 +8846,7 @@
 	TPACPI_Q_LNV3('R', '0', 'T', TPACPI_FAN_NS),	/* 11e Gen5 GL */
 	TPACPI_Q_LNV3('R', '1', 'D', TPACPI_FAN_NS),	/* 11e Gen5 GL-R */
 	TPACPI_Q_LNV3('R', '0', 'V', TPACPI_FAN_NS),	/* 11e Gen5 KL-Y */
+	TPACPI_Q_LNV3('N', '4', 'D', TPACPI_FAN_NS),	/* X9-14 Gen 1 */
 	TPACPI_Q_LNV('H', '3', TPACPI_FAN_NS),		/* Edge E330 */
 	TPACPI_Q_LNV3('N', '1', 'O', TPACPI_FAN_NOFAN),	/* X1 Tablet (2nd gen) */
 	TPACPI_Q_LNV3('R', '0', 'Q', TPACPI_FAN_DECRPM),/* L480 */

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] platform/x86: thinkpad_acpi: Add X9-14 Gen 1 to non-standard thermal/fan quirk tables
  2026-09-18 16:15   ` [PATCH v2] " Huang Wei
@ 2026-09-18 18:25     ` Ilpo Järvinen
  0 siblings, 0 replies; 4+ messages in thread
From: Ilpo Järvinen @ 2026-09-18 18:25 UTC (permalink / raw)
  To: hansg, Huang Wei
  Cc: mpearson-lenovo, platform-driver-x86, linux-kernel, thisisamirv

On Sat, 19 Sep 2026 00:15:39 +0800, Huang Wei wrote:

> The Lenovo ThinkPad X9-14 Gen 1 uses a non-standard Embedded Controller
> firmware (ECFW) whose thermal and fan registers are not located at the
> classic addresses. On this model the thermal registers sit at 0xA8-0xAF /
> 0xB8-0xBF and the fan registers use the non-standard offsets, instead of
> the legacy 0x78-0x7F / 0xC0-0xC7 (thermal) and 0x2f / 0x84 (fan).
> 
> Because the model is not covered by the existing quirk tables, the driver
> probes the legacy thermal addresses during init, reads back 0x00 from
> every register, concludes the EC is "misbehaving" and disables all
> thermal sensor access:
> 
> [...]

Thank you for your contribution, it has been applied to my local
review-ilpo-next branch. Note it will show up in the public
platform-drivers-x86/review-ilpo-next branch only once I've pushed my
local branch there, which might take a while.

FYI [if applicable to your patch], as per Linus' policy change, also
fixes are mostly routed through for-next unless the fix is for a
commit introduced in the most recent cycle or is clearly a regression
fix.

The list of commits applied:
[1/1] platform/x86: thinkpad_acpi: Add X9-14 Gen 1 to non-standard thermal/fan quirk tables
      commit: bb0f3a5d6b9844b70ad696b9470762028f6d86ec

--
 i.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-09-18 18:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-26  7:30 [PATCH] platform/x86: thinkpad_acpi: Add X9-14 Gen 1 to non-standard thermal/fan quirk tables Huang Wei
2026-09-18 15:15 ` Ilpo Järvinen
2026-09-18 16:15   ` [PATCH v2] " Huang Wei
2026-09-18 18:25     ` Ilpo Järvinen

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®