thermal: intel: int340x: Add DLVR support for Lunar Lake
authorSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Wed, 19 Jun 2024 12:46:00 +0000 (05:46 -0700)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 21 Jun 2024 13:20:28 +0000 (15:20 +0200)
commit5ba206213a8a6e7f4389ba4f31600b4ee652f59e
tree8de133442dc14a2487392ba0e6ab512c92fb5cf3
parent332ed4e5c4a347f79acc2a45575700cbf22ff9fe
thermal: intel: int340x: Add DLVR support for Lunar Lake

Add support for DLVR (Digital Linear Voltage Regulator) for Lunar Lake.
There are no new sysfs attributes or difference in operation compared
to prior generations.

MMIO offset and bit positions are changed compared to Meteor Lake
processors. Also for two attributes dlvr_frequency_mhz and
dlvr_frequency_select, the value presented or accepted by the firmware
is not raw frequency value but an index.
For example:
RFI_FREQ_SELECT and RFI_FREQ
: 0 DLVR freq point 2227.2 MHz
: 1 DLVR freq point 2140 MHz

Hence create a mapping table for Lunar Lake to map user space values
to the firmware accepted values.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Link: https://patch.msgid.link/20240619124600.491168-4-srinivas.pandruvada@linux.intel.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/thermal/intel/int340x_thermal/processor_thermal_device_pci.c
drivers/thermal/intel/int340x_thermal/processor_thermal_rfim.c