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