intel_dptf.rst 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272
  1. .. SPDX-License-Identifier: GPL-2.0
  2. ===============================================================
  3. Intel(R) Dynamic Platform and Thermal Framework Sysfs Interface
  4. ===============================================================
  5. :Copyright: © 2022 Intel Corporation
  6. :Author: Srinivas Pandruvada <[email protected]>
  7. Introduction
  8. ------------
  9. Intel(R) Dynamic Platform and Thermal Framework (DPTF) is a platform
  10. level hardware/software solution for power and thermal management.
  11. As a container for multiple power/thermal technologies, DPTF provides
  12. a coordinated approach for different policies to effect the hardware
  13. state of a system.
  14. Since it is a platform level framework, this has several components.
  15. Some parts of the technology is implemented in the firmware and uses
  16. ACPI and PCI devices to expose various features for monitoring and
  17. control. Linux has a set of kernel drivers exposing hardware interface
  18. to user space. This allows user space thermal solutions like
  19. "Linux Thermal Daemon" to read platform specific thermal and power
  20. tables to deliver adequate performance while keeping the system under
  21. thermal limits.
  22. DPTF ACPI Drivers interface
  23. ----------------------------
  24. :file:`/sys/bus/platform/devices/<N>/uuids`, where <N>
  25. =INT3400|INTC1040|INTC1041|INTC10A0
  26. ``available_uuids`` (RO)
  27. A set of UUIDs strings presenting available policies
  28. which should be notified to the firmware when the
  29. user space can support those policies.
  30. UUID strings:
  31. "42A441D6-AE6A-462b-A84B-4A8CE79027D3" : Passive 1
  32. "3A95C389-E4B8-4629-A526-C52C88626BAE" : Active
  33. "97C68AE7-15FA-499c-B8C9-5DA81D606E0A" : Critical
  34. "63BE270F-1C11-48FD-A6F7-3AF253FF3E2D" : Adaptive performance
  35. "5349962F-71E6-431D-9AE8-0A635B710AEE" : Emergency call
  36. "9E04115A-AE87-4D1C-9500-0F3E340BFE75" : Passive 2
  37. "F5A35014-C209-46A4-993A-EB56DE7530A1" : Power Boss
  38. "6ED722A7-9240-48A5-B479-31EEF723D7CF" : Virtual Sensor
  39. "16CAF1B7-DD38-40ED-B1C1-1B8A1913D531" : Cooling mode
  40. "BE84BABF-C4D4-403D-B495-3128FD44dAC1" : HDC
  41. ``current_uuid`` (RW)
  42. User space can write strings from available UUIDs, one at a
  43. time.
  44. :file:`/sys/bus/platform/devices/<N>/`, where <N>
  45. =INT3400|INTC1040|INTC1041|INTC10A0
  46. ``imok`` (WO)
  47. User space daemon write 1 to respond to firmware event
  48. for sending keep alive notification. User space receives
  49. THERMAL_EVENT_KEEP_ALIVE kobject uevent notification when
  50. firmware calls for user space to respond with imok ACPI
  51. method.
  52. ``odvp*`` (RO)
  53. Firmware thermal status variable values. Thermal tables
  54. calls for different processing based on these variable
  55. values.
  56. ``data_vault`` (RO)
  57. Binary thermal table. Refer to
  58. https:/github.com/intel/thermal_daemon for decoding
  59. thermal table.
  60. ACPI Thermal Relationship table interface
  61. ------------------------------------------
  62. :file:`/dev/acpi_thermal_rel`
  63. This device provides IOCTL interface to read standard ACPI
  64. thermal relationship tables via ACPI methods _TRT and _ART.
  65. These IOCTLs are defined in
  66. drivers/thermal/intel/int340x_thermal/acpi_thermal_rel.h
  67. IOCTLs:
  68. ACPI_THERMAL_GET_TRT_LEN: Get length of TRT table
  69. ACPI_THERMAL_GET_ART_LEN: Get length of ART table
  70. ACPI_THERMAL_GET_TRT_COUNT: Number of records in TRT table
  71. ACPI_THERMAL_GET_ART_COUNT: Number of records in ART table
  72. ACPI_THERMAL_GET_TRT: Read binary TRT table, length to read is
  73. provided via argument to ioctl().
  74. ACPI_THERMAL_GET_ART: Read binary ART table, length to read is
  75. provided via argument to ioctl().
  76. DPTF ACPI Sensor drivers
  77. -------------------------
  78. DPTF Sensor drivers are presented as standard thermal sysfs thermal_zone.
  79. DPTF ACPI Cooling drivers
  80. --------------------------
  81. DPTF cooling drivers are presented as standard thermal sysfs cooling_device.
  82. DPTF Processor thermal PCI Driver interface
  83. --------------------------------------------
  84. :file:`/sys/bus/pci/devices/0000\:00\:04.0/power_limits/`
  85. Refer to Documentation/power/powercap/powercap.rst for powercap
  86. ABI.
  87. ``power_limit_0_max_uw`` (RO)
  88. Maximum powercap sysfs constraint_0_power_limit_uw for Intel RAPL
  89. ``power_limit_0_step_uw`` (RO)
  90. Power limit increment/decrements for Intel RAPL constraint 0 power limit
  91. ``power_limit_0_min_uw`` (RO)
  92. Minimum powercap sysfs constraint_0_power_limit_uw for Intel RAPL
  93. ``power_limit_0_tmin_us`` (RO)
  94. Minimum powercap sysfs constraint_0_time_window_us for Intel RAPL
  95. ``power_limit_0_tmax_us`` (RO)
  96. Maximum powercap sysfs constraint_0_time_window_us for Intel RAPL
  97. ``power_limit_1_max_uw`` (RO)
  98. Maximum powercap sysfs constraint_1_power_limit_uw for Intel RAPL
  99. ``power_limit_1_step_uw`` (RO)
  100. Power limit increment/decrements for Intel RAPL constraint 1 power limit
  101. ``power_limit_1_min_uw`` (RO)
  102. Minimum powercap sysfs constraint_1_power_limit_uw for Intel RAPL
  103. ``power_limit_1_tmin_us`` (RO)
  104. Minimum powercap sysfs constraint_1_time_window_us for Intel RAPL
  105. ``power_limit_1_tmax_us`` (RO)
  106. Maximum powercap sysfs constraint_1_time_window_us for Intel RAPL
  107. :file:`/sys/bus/pci/devices/0000\:00\:04.0/`
  108. ``tcc_offset_degree_celsius`` (RW)
  109. TCC offset from the critical temperature where hardware will throttle
  110. CPU.
  111. :file:`/sys/bus/pci/devices/0000\:00\:04.0/workload_request`
  112. ``workload_available_types`` (RO)
  113. Available workload types. User space can specify one of the workload type
  114. it is currently executing via workload_type. For example: idle, bursty,
  115. sustained etc.
  116. ``workload_type`` (RW)
  117. User space can specify any one of the available workload type using
  118. this interface.
  119. DPTF Processor thermal RFIM interface
  120. --------------------------------------------
  121. RFIM interface allows adjustment of FIVR (Fully Integrated Voltage Regulator)
  122. and DDR (Double Data Rate)frequencies to avoid RF interference with WiFi and 5G.
  123. Switching voltage regulators (VR) generate radiated EMI or RFI at the
  124. fundamental frequency and its harmonics. Some harmonics may interfere
  125. with very sensitive wireless receivers such as Wi-Fi and cellular that
  126. are integrated into host systems like notebook PCs. One of mitigation
  127. methods is requesting SOC integrated VR (IVR) switching frequency to a
  128. small % and shift away the switching noise harmonic interference from
  129. radio channels. OEM or ODMs can use the driver to control SOC IVR
  130. operation within the range where it does not impact IVR performance.
  131. DRAM devices of DDR IO interface and their power plane can generate EMI
  132. at the data rates. Similar to IVR control mechanism, Intel offers a
  133. mechanism by which DDR data rates can be changed if several conditions
  134. are met: there is strong RFI interference because of DDR; CPU power
  135. management has no other restriction in changing DDR data rates;
  136. PC ODMs enable this feature (real time DDR RFI Mitigation referred to as
  137. DDR-RFIM) for Wi-Fi from BIOS.
  138. FIVR attributes
  139. :file:`/sys/bus/pci/devices/0000\:00\:04.0/fivr/`
  140. ``vco_ref_code_lo`` (RW)
  141. The VCO reference code is an 11-bit field and controls the FIVR
  142. switching frequency. This is the 3-bit LSB field.
  143. ``vco_ref_code_hi`` (RW)
  144. The VCO reference code is an 11-bit field and controls the FIVR
  145. switching frequency. This is the 8-bit MSB field.
  146. ``spread_spectrum_pct`` (RW)
  147. Set the FIVR spread spectrum clocking percentage
  148. ``spread_spectrum_clk_enable`` (RW)
  149. Enable/disable of the FIVR spread spectrum clocking feature
  150. ``rfi_vco_ref_code`` (RW)
  151. This field is a read only status register which reflects the
  152. current FIVR switching frequency
  153. ``fivr_fffc_rev`` (RW)
  154. This field indicated the revision of the FIVR HW.
  155. DVFS attributes
  156. :file:`/sys/bus/pci/devices/0000\:00\:04.0/dvfs/`
  157. ``rfi_restriction_run_busy`` (RW)
  158. Request the restriction of specific DDR data rate and set this
  159. value 1. Self reset to 0 after operation.
  160. ``rfi_restriction_err_code`` (RW)
  161. 0 :Request is accepted, 1:Feature disabled,
  162. 2: the request restricts more points than it is allowed
  163. ``rfi_restriction_data_rate_Delta`` (RW)
  164. Restricted DDR data rate for RFI protection: Lower Limit
  165. ``rfi_restriction_data_rate_Base`` (RW)
  166. Restricted DDR data rate for RFI protection: Upper Limit
  167. ``ddr_data_rate_point_0`` (RO)
  168. DDR data rate selection 1st point
  169. ``ddr_data_rate_point_1`` (RO)
  170. DDR data rate selection 2nd point
  171. ``ddr_data_rate_point_2`` (RO)
  172. DDR data rate selection 3rd point
  173. ``ddr_data_rate_point_3`` (RO)
  174. DDR data rate selection 4th point
  175. ``rfi_disable (RW)``
  176. Disable DDR rate change feature
  177. DPTF Power supply and Battery Interface
  178. ----------------------------------------
  179. Refer to Documentation/ABI/testing/sysfs-platform-dptf
  180. DPTF Fan Control
  181. ----------------------------------------
  182. Refer to Documentation/admin-guide/acpi/fan_performance_states.rst