xref: /openbmc/linux/Documentation/hwmon/smsc47m192.rst (revision c39f2d9db0fd81ea20bb5cce9b3f082ca63753e2)
1*7ebd8b66SMauro Carvalho ChehabKernel driver smsc47m192
2*7ebd8b66SMauro Carvalho Chehab========================
3*7ebd8b66SMauro Carvalho Chehab
4*7ebd8b66SMauro Carvalho ChehabSupported chips:
5*7ebd8b66SMauro Carvalho Chehab
6*7ebd8b66SMauro Carvalho Chehab  * SMSC LPC47M192, LPC47M15x, LPC47M292 and LPC47M997
7*7ebd8b66SMauro Carvalho Chehab
8*7ebd8b66SMauro Carvalho Chehab    Prefix: 'smsc47m192'
9*7ebd8b66SMauro Carvalho Chehab
10*7ebd8b66SMauro Carvalho Chehab    Addresses scanned: I2C 0x2c - 0x2d
11*7ebd8b66SMauro Carvalho Chehab
12*7ebd8b66SMauro Carvalho Chehab    Datasheet: The datasheet for LPC47M192 is publicly available from
13*7ebd8b66SMauro Carvalho Chehab
14*7ebd8b66SMauro Carvalho Chehab	       http://www.smsc.com/
15*7ebd8b66SMauro Carvalho Chehab
16*7ebd8b66SMauro Carvalho Chehab	       The LPC47M15x, LPC47M292 and LPC47M997 are compatible for
17*7ebd8b66SMauro Carvalho Chehab
18*7ebd8b66SMauro Carvalho Chehab	       hardware monitoring.
19*7ebd8b66SMauro Carvalho Chehab
20*7ebd8b66SMauro Carvalho Chehab
21*7ebd8b66SMauro Carvalho Chehab
22*7ebd8b66SMauro Carvalho ChehabAuthor:
23*7ebd8b66SMauro Carvalho Chehab      - Hartmut Rick <linux@rick.claranet.de>
24*7ebd8b66SMauro Carvalho Chehab
25*7ebd8b66SMauro Carvalho Chehab      - Special thanks to Jean Delvare for careful checking
26*7ebd8b66SMauro Carvalho Chehab	of the code and many helpful comments and suggestions.
27*7ebd8b66SMauro Carvalho Chehab
28*7ebd8b66SMauro Carvalho Chehab
29*7ebd8b66SMauro Carvalho ChehabDescription
30*7ebd8b66SMauro Carvalho Chehab-----------
31*7ebd8b66SMauro Carvalho Chehab
32*7ebd8b66SMauro Carvalho ChehabThis driver implements support for the hardware sensor capabilities
33*7ebd8b66SMauro Carvalho Chehabof the SMSC LPC47M192 and compatible Super-I/O chips.
34*7ebd8b66SMauro Carvalho Chehab
35*7ebd8b66SMauro Carvalho ChehabThese chips support 3 temperature channels and 8 voltage inputs
36*7ebd8b66SMauro Carvalho Chehabas well as CPU voltage VID input.
37*7ebd8b66SMauro Carvalho Chehab
38*7ebd8b66SMauro Carvalho ChehabThey do also have fan monitoring and control capabilities, but the
39*7ebd8b66SMauro Carvalho Chehabthese features are accessed via ISA bus and are not supported by this
40*7ebd8b66SMauro Carvalho Chehabdriver. Use the 'smsc47m1' driver for fan monitoring and control.
41*7ebd8b66SMauro Carvalho Chehab
42*7ebd8b66SMauro Carvalho ChehabVoltages and temperatures are measured by an 8-bit ADC, the resolution
43*7ebd8b66SMauro Carvalho Chehabof the temperatures is 1 bit per degree C.
44*7ebd8b66SMauro Carvalho ChehabVoltages are scaled such that the nominal voltage corresponds to
45*7ebd8b66SMauro Carvalho Chehab192 counts, i.e. 3/4 of the full range. Thus the available range for
46*7ebd8b66SMauro Carvalho Chehabeach voltage channel is 0V ... 255/192*(nominal voltage), the resolution
47*7ebd8b66SMauro Carvalho Chehabis 1 bit per (nominal voltage)/192.
48*7ebd8b66SMauro Carvalho ChehabBoth voltage and temperature values are scaled by 1000, the sys files
49*7ebd8b66SMauro Carvalho Chehabshow voltages in mV and temperatures in units of 0.001 degC.
50*7ebd8b66SMauro Carvalho Chehab
51*7ebd8b66SMauro Carvalho ChehabThe +12V analog voltage input channel (in4_input) is multiplexed with
52*7ebd8b66SMauro Carvalho Chehabbit 4 of the encoded CPU voltage. This means that you either get
53*7ebd8b66SMauro Carvalho Chehaba +12V voltage measurement or a 5 bit CPU VID, but not both.
54*7ebd8b66SMauro Carvalho ChehabThe default setting is to use the pin as 12V input, and use only 4 bit VID.
55*7ebd8b66SMauro Carvalho ChehabThis driver assumes that the information in the configuration register
56*7ebd8b66SMauro Carvalho Chehabis correct, i.e. that the BIOS has updated the configuration if
57*7ebd8b66SMauro Carvalho Chehabthe motherboard has this input wired to VID4.
58*7ebd8b66SMauro Carvalho Chehab
59*7ebd8b66SMauro Carvalho ChehabThe temperature and voltage readings are updated once every 1.5 seconds.
60*7ebd8b66SMauro Carvalho ChehabReading them more often repeats the same values.
61*7ebd8b66SMauro Carvalho Chehab
62*7ebd8b66SMauro Carvalho Chehab
63*7ebd8b66SMauro Carvalho Chehabsysfs interface
64*7ebd8b66SMauro Carvalho Chehab---------------
65*7ebd8b66SMauro Carvalho Chehab
66*7ebd8b66SMauro Carvalho Chehab===================== ==========================================================
67*7ebd8b66SMauro Carvalho Chehabin0_input	      +2.5V voltage input
68*7ebd8b66SMauro Carvalho Chehabin1_input	      CPU voltage input (nominal 2.25V)
69*7ebd8b66SMauro Carvalho Chehabin2_input	      +3.3V voltage input
70*7ebd8b66SMauro Carvalho Chehabin3_input	      +5V voltage input
71*7ebd8b66SMauro Carvalho Chehabin4_input	      +12V voltage input (may be missing if used as VID4)
72*7ebd8b66SMauro Carvalho Chehabin5_input	      Vcc voltage input (nominal 3.3V)
73*7ebd8b66SMauro Carvalho Chehab		      This is the supply voltage of the sensor chip itself.
74*7ebd8b66SMauro Carvalho Chehabin6_input	      +1.5V voltage input
75*7ebd8b66SMauro Carvalho Chehabin7_input	      +1.8V voltage input
76*7ebd8b66SMauro Carvalho Chehab
77*7ebd8b66SMauro Carvalho Chehabin[0-7]_min,
78*7ebd8b66SMauro Carvalho Chehabin[0-7]_max	      lower and upper alarm thresholds for in[0-7]_input reading
79*7ebd8b66SMauro Carvalho Chehab
80*7ebd8b66SMauro Carvalho Chehab		      All voltages are read and written in mV.
81*7ebd8b66SMauro Carvalho Chehab
82*7ebd8b66SMauro Carvalho Chehabin[0-7]_alarm	      alarm flags for voltage inputs
83*7ebd8b66SMauro Carvalho Chehab		      These files read '1' in case of alarm, '0' otherwise.
84*7ebd8b66SMauro Carvalho Chehab
85*7ebd8b66SMauro Carvalho Chehabtemp1_input	      chip temperature measured by on-chip diode
86*7ebd8b66SMauro Carvalho Chehabtemp[2-3]_input	      temperature measured by external diodes (one of these
87*7ebd8b66SMauro Carvalho Chehab		      would typically be wired to the diode inside the CPU)
88*7ebd8b66SMauro Carvalho Chehab
89*7ebd8b66SMauro Carvalho Chehabtemp[1-3]_min,
90*7ebd8b66SMauro Carvalho Chehabtemp[1-3]_max	      lower and upper alarm thresholds for temperatures
91*7ebd8b66SMauro Carvalho Chehab
92*7ebd8b66SMauro Carvalho Chehabtemp[1-3]_offset      temperature offset registers
93*7ebd8b66SMauro Carvalho Chehab		      The chip adds the offsets stored in these registers to
94*7ebd8b66SMauro Carvalho Chehab		      the corresponding temperature readings.
95*7ebd8b66SMauro Carvalho Chehab		      Note that temp1 and temp2 offsets share the same register,
96*7ebd8b66SMauro Carvalho Chehab		      they cannot both be different from zero at the same time.
97*7ebd8b66SMauro Carvalho Chehab		      Writing a non-zero number to one of them will reset the other
98*7ebd8b66SMauro Carvalho Chehab		      offset to zero.
99*7ebd8b66SMauro Carvalho Chehab
100*7ebd8b66SMauro Carvalho Chehab		      All temperatures and offsets are read and written in
101*7ebd8b66SMauro Carvalho Chehab		      units of 0.001 degC.
102*7ebd8b66SMauro Carvalho Chehab
103*7ebd8b66SMauro Carvalho Chehabtemp[1-3]_alarm       alarm flags for temperature inputs, '1' in case of alarm,
104*7ebd8b66SMauro Carvalho Chehab		      '0' otherwise.
105*7ebd8b66SMauro Carvalho Chehabtemp[2-3]_input_fault diode fault flags for temperature inputs 2 and 3.
106*7ebd8b66SMauro Carvalho Chehab		      A fault is detected if the two pins for the corresponding
107*7ebd8b66SMauro Carvalho Chehab		      sensor are open or shorted, or any of the two is shorted
108*7ebd8b66SMauro Carvalho Chehab		      to ground or Vcc. '1' indicates a diode fault.
109*7ebd8b66SMauro Carvalho Chehab
110*7ebd8b66SMauro Carvalho Chehabcpu0_vid	      CPU voltage as received from the CPU
111*7ebd8b66SMauro Carvalho Chehab
112*7ebd8b66SMauro Carvalho Chehabvrm		      CPU VID standard used for decoding CPU voltage
113*7ebd8b66SMauro Carvalho Chehab===================== ==========================================================
114*7ebd8b66SMauro Carvalho Chehab
115*7ebd8b66SMauro Carvalho ChehabThe `*_min`, `*_max`, `*_offset` and `vrm` files can be read and written,
116*7ebd8b66SMauro Carvalho Chehaball others are read-only.
117