Skip to content

Add baseline support for Legion 9i Gen 10 (83EY, BIOS RZCN)#417

Open
long-island wants to merge 1 commit intojohnfanv2:mainfrom
long-island:add-legion-9-18IAX10-rzcn
Open

Add baseline support for Legion 9i Gen 10 (83EY, BIOS RZCN)#417
long-island wants to merge 1 commit intojohnfanv2:mainfrom
long-island:add-legion-9-18IAX10-rzcn

Conversation

@long-island
Copy link
Copy Markdown

Summary

  • Add model configuration and DMI match for Lenovo Legion 9i Gen 10 (product 83EY, BIOS RZCN*)
  • EC ID 0x5263; ACPI-based fan speed (already RPM), WMI3 temperatures, WMI power mode
  • Four fans (fans 3/4 activate above ~77 °C); no fan curves, no fan full-speed toggle, no IC/OC overclocking

Key changes

  • ec_register_offsets_rzcn — new register map with corrected fan-target addresses:
    EXT_FAN1_TARGET_RPM = 0xC5A0, EXT_FAN2_TARGET_RPM = 0xC5A1 (duty-cycle bytes, confirmed via EMOR dump and live hardware). The v0 offsets 0xC600/0xC601 map to CPU PL1/PL2 power limits on this model, not fan targets.
  • fan_target_is_duty flag — scales duty-cycle bytes (0–100) by 100 to approximate RPM, independent of acpi_fanspeed_is_rpm
  • skip_ic_temp, skip_oc_controls flags — hide non-functional hwmon and sysfs attributes
  • has_four_fans flag — exposes fan3_input/fan4_input via ACPI methods FA3S/FA4S
  • skip_ylogo_light, skip_ioport_light flags — skip LED init paths that fail on RZCN
  • Fix ACPI fan speed error return (-EINVAL instead of -EEXIST)
  • Add sysfs visibility gating for fan_fullspeed and OC control attributes
  • Add hwmon visibility gating for IC temperature and fan 3/4 sensors

Test results

Hardware: Legion 9 18IAX10 (DMI 83EY), BIOS RZCN32WW, EC 0x5263, kernel 6.19.9-arch1-1

Idle:

temp1 (CPU) = 51 °C,  temp2 (GPU) = 43 °C
fan1_input = 1707 RPM,  fan1_target = 1700 RPM (~17% duty ×100)
fan2_input = 1736 RPM,  fan2_target = 1700 RPM (~17% duty ×100)
fan3_input = 0 RPM,  fan4_input = 0 RPM  (activate above ~77 °C)

Stress (steady-state peaks):

fan1_input = 4162 RPM,  fan1_target ≈ 4100 RPM (~41% duty ×100)
fan2_input = 3843 RPM,  fan2_target ≈ 3800 RPM (~38% duty ×100)
fan3_input = 5827 RPM,  fan4_input = 5940 RPM

Hidden (non-functional on this model):

  • sysfs: fan_fullspeed, cpu_oc, gpu_oc, all *_powerlimit, gpu_boost_clock, gpu_temperature_limit
  • hwmon: temp3 (IC Temperature)

Impact on other models

All new model_config flags default to false/0. No existing model configs are modified. The split of legion_hwmon_is_visible into sensor/fancurve callbacks preserves identical behavior for all non-RZCN models.

🤖 Generated with Claude Code

Add model configuration and DMI match for the Lenovo Legion 9i Gen 10
(product name 83EY, BIOS version RZCN*). This model uses ACPI-based fan
speed reporting (already in RPM), WMI3 for temperatures, and WMI for
power mode control. It has four fans and does not support fan curves,
fan full speed toggle, or IC/OC overclocking controls.

Changes:
- Add model_config fields for per-model feature gating: skip_ic_temp,
  skip_oc_controls, acpi_fanspeed_is_rpm, fan_target_is_duty,
  has_four_fans, skip_ylogo_light, skip_ioport_light
- Add ec_register_offsets_rzcn with corrected fan target registers:
  EXT_FAN1_TARGET_RPM = 0xC5A0 and EXT_FAN2_TARGET_RPM = 0xC5A1
  (duty-cycle bytes confirmed via EMOR dump and live hardware read).
  The v0 offsets 0xC600/0xC601 map to CPU PL1/PL2 power limits on
  this model, not fan targets.
- Add model_rzcn configuration block (EC ID 0x5263, EMOR at 0xFE0B0400)
- Add DMI match entry for RZCN BIOS version
- Add ACPI fan 3/4 support (FA3S, FA4S) with sensor IDs and hwmon attrs
- Fix fan RPM reporting: skip x100 multiplier when acpi_fanspeed_is_rpm
- Fix fan_target reporting: scale duty-cycle bytes by 100 when
  fan_target_is_duty is set, independent of acpi_fanspeed_is_rpm
- Fix ACPI fan speed error return (-EINVAL instead of -EEXIST)
- Add sysfs visibility gating for fan_fullspeed and OC control attrs
- Add hwmon visibility gating for IC temperature and fan 3/4 sensors
- Gate Y-Logo and IO-Port LED init on per-model config flags

Tested on:
  DMI product: 83EY (Legion 9 18IAX10)
  BIOS: RZCN32WW
  EC ID: 0x5263

Hwmon sensors (idle):
  temp1 (CPU Temperature) = 51000
  temp2 (GPU Temperature) = 43000
  fan1_input = 1707 RPM,  fan1_target = 1700 RPM (~17% duty x100)
  fan2_input = 1736 RPM,  fan2_target = 1700 RPM (~17% duty x100)
  fan3_input = 0 RPM  (activates above ~77 deg C)
  fan4_input = 0 RPM  (activates above ~77 deg C)

Hwmon sensors (stress, steady-state peaks):
  fan1_input = 4162 RPM,  fan1_target ~= 4100 RPM (~41% duty x100)
  fan2_input = 3843 RPM,  fan2_target ~= 3800 RPM (~38% duty x100)
  fan3_input = 5827 RPM
  fan4_input = 5940 RPM

Hidden sysfs attrs (non-functional on this model):
  fan_fullspeed, cpu_oc, gpu_oc, cpu_shortterm_powerlimit,
  cpu_longterm_powerlimit, cpu_peak_powerlimit, cpu_default_powerlimit,
  cpu_apu_sppt_powerlimit, cpu_cross_loading_powerlimit,
  gpu_ppab_powerlimit, gpu_ctgp_powerlimit, gpu_ctgp2_powerlimit,
  gpu_default_ppab_ctrgp_powerlimit, gpu_temperature_limit,
  gpu_boost_clock

Hidden hwmon sensors (non-functional on this model):
  temp3 (IC Temperature)
Signed-off-by: JawaharBalaji Thirumalaisamy <jab@hikersnotes.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant