xref: /OK3568_Linux_fs/kernel/Documentation/hwmon/mlxreg-fan.rst (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunKernel driver mlxreg-fan
2*4882a593Smuzhiyun========================
3*4882a593Smuzhiyun
4*4882a593SmuzhiyunProvides FAN control for the next Mellanox systems:
5*4882a593Smuzhiyun
6*4882a593Smuzhiyun- QMB700, equipped with 40x200GbE InfiniBand ports;
7*4882a593Smuzhiyun- MSN3700, equipped with 32x200GbE or 16x400GbE Ethernet ports;
8*4882a593Smuzhiyun- MSN3410, equipped with 6x400GbE plus 48x50GbE Ethernet ports;
9*4882a593Smuzhiyun- MSN3800, equipped with 64x1000GbE Ethernet ports;
10*4882a593Smuzhiyun
11*4882a593SmuzhiyunAuthor: Vadim Pasternak <vadimp@mellanox.com>
12*4882a593Smuzhiyun
13*4882a593SmuzhiyunThese are the Top of the Rack systems, equipped with Mellanox switch
14*4882a593Smuzhiyunboard with Mellanox Quantum or Spectrume-2 devices.
15*4882a593SmuzhiyunFAN controller is implemented by the programmable device logic.
16*4882a593Smuzhiyun
17*4882a593SmuzhiyunThe default registers offsets set within the programmable device is as
18*4882a593Smuzhiyunfollowing:
19*4882a593Smuzhiyun
20*4882a593Smuzhiyun======================= ====
21*4882a593Smuzhiyunpwm1			0xe3
22*4882a593Smuzhiyunfan1 (tacho1)		0xe4
23*4882a593Smuzhiyunfan2 (tacho2)		0xe5
24*4882a593Smuzhiyunfan3 (tacho3)		0xe6
25*4882a593Smuzhiyunfan4 (tacho4)		0xe7
26*4882a593Smuzhiyunfan5 (tacho5)		0xe8
27*4882a593Smuzhiyunfan6 (tacho6)		0xe9
28*4882a593Smuzhiyunfan7 (tacho7)		0xea
29*4882a593Smuzhiyunfan8 (tacho8)		0xeb
30*4882a593Smuzhiyunfan9 (tacho9)		0xec
31*4882a593Smuzhiyunfan10 (tacho10)		0xed
32*4882a593Smuzhiyunfan11 (tacho11)		0xee
33*4882a593Smuzhiyunfan12 (tacho12)		0xef
34*4882a593Smuzhiyun======================= ====
35*4882a593Smuzhiyun
36*4882a593SmuzhiyunThis setup can be re-programmed with other registers.
37*4882a593Smuzhiyun
38*4882a593SmuzhiyunDescription
39*4882a593Smuzhiyun-----------
40*4882a593Smuzhiyun
41*4882a593SmuzhiyunThe driver implements a simple interface for driving a fan connected to
42*4882a593Smuzhiyuna PWM output and tachometer inputs.
43*4882a593SmuzhiyunThis driver obtains PWM and tachometers registers location according to
44*4882a593Smuzhiyunthe system configuration and creates FAN/PWM hwmon objects and a cooling
45*4882a593Smuzhiyundevice. PWM and tachometers are sensed through the on-board programmable
46*4882a593Smuzhiyundevice, which exports its register map. This device could be attached to
47*4882a593Smuzhiyunany bus type, for which register mapping is supported.
48*4882a593SmuzhiyunSingle instance is created with one PWM control, up to 12 tachometers and
49*4882a593Smuzhiyunone cooling device. It could be as many instances as programmable device
50*4882a593Smuzhiyunsupports.
51*4882a593SmuzhiyunThe driver exposes the fan to the user space through the hwmon's and
52*4882a593Smuzhiyunthermal's sysfs interfaces.
53*4882a593Smuzhiyun
54*4882a593Smuzhiyun/sys files in hwmon subsystem
55*4882a593Smuzhiyun-----------------------------
56*4882a593Smuzhiyun
57*4882a593Smuzhiyun================= == ===================================================
58*4882a593Smuzhiyunfan[1-12]_fault   RO files for tachometers TACH1-TACH12 fault indication
59*4882a593Smuzhiyunfan[1-12]_input   RO files for tachometers TACH1-TACH12 input (in RPM)
60*4882a593Smuzhiyunpwm1		  RW file for fan[1-12] target duty cycle (0..255)
61*4882a593Smuzhiyun================= == ===================================================
62*4882a593Smuzhiyun
63*4882a593Smuzhiyun/sys files in thermal subsystem
64*4882a593Smuzhiyun-------------------------------
65*4882a593Smuzhiyun
66*4882a593Smuzhiyun================= == ====================================================
67*4882a593Smuzhiyuncur_state	  RW file for current cooling state of the cooling device
68*4882a593Smuzhiyun		     (0..max_state)
69*4882a593Smuzhiyunmax_state	  RO file for maximum cooling state of the cooling device
70*4882a593Smuzhiyun================= == ====================================================
71