mlxreg-fan 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. Kernel driver mlxreg-fan
  2. ========================
  3. Provides FAN control for the next Mellanox systems:
  4. QMB700, equipped with 40x200GbE InfiniBand ports;
  5. MSN3700, equipped with 32x200GbE or 16x400GbE Ethernet ports;
  6. MSN3410, equipped with 6x400GbE plus 48x50GbE Ethernet ports;
  7. MSN3800, equipped with 64x1000GbE Ethernet ports;
  8. These are the Top of the Rack systems, equipped with Mellanox switch
  9. board with Mellanox Quantum or Spectrume-2 devices.
  10. FAN controller is implemented by the programmable device logic.
  11. The default registers offsets set within the programmable device is as
  12. following:
  13. - pwm1 0xe3
  14. - fan1 (tacho1) 0xe4
  15. - fan2 (tacho2) 0xe5
  16. - fan3 (tacho3) 0xe6
  17. - fan4 (tacho4) 0xe7
  18. - fan5 (tacho5) 0xe8
  19. - fan6 (tacho6) 0xe9
  20. - fan7 (tacho7) 0xea
  21. - fan8 (tacho8) 0xeb
  22. - fan9 (tacho9) 0xec
  23. - fan10 (tacho10) 0xed
  24. - fan11 (tacho11) 0xee
  25. - fan12 (tacho12) 0xef
  26. This setup can be re-programmed with other registers.
  27. Author: Vadim Pasternak <vadimp@mellanox.com>
  28. Description
  29. -----------
  30. The driver implements a simple interface for driving a fan connected to
  31. a PWM output and tachometer inputs.
  32. This driver obtains PWM and tachometers registers location according to
  33. the system configuration and creates FAN/PWM hwmon objects and a cooling
  34. device. PWM and tachometers are sensed through the on-board programmable
  35. device, which exports its register map. This device could be attached to
  36. any bus type, for which register mapping is supported.
  37. Single instance is created with one PWM control, up to 12 tachometers and
  38. one cooling device. It could be as many instances as programmable device
  39. supports.
  40. The driver exposes the fan to the user space through the hwmon's and
  41. thermal's sysfs interfaces.
  42. /sys files in hwmon subsystem
  43. -----------------------------
  44. fan[1-12]_fault - RO files for tachometers TACH1-TACH12 fault indication
  45. fan[1-12]_input - RO files for tachometers TACH1-TACH12 input (in RPM)
  46. pwm1 - RW file for fan[1-12] target duty cycle (0..255)
  47. /sys files in thermal subsystem
  48. -------------------------------
  49. cur_state - RW file for current cooling state of the cooling device
  50. (0..max_state)
  51. max_state - RO file for maximum cooling state of the cooling device