xref: /linux/Documentation/hwmon/mcp9982.rst (revision 0fc8f6200d2313278fbf4539bbab74677c685531)
1.. SPDX-License-Identifier: GPL-2.0+
2
3Kernel driver MCP998X
4=====================
5
6Supported chips:
7
8  * Microchip Technology MCP998X/MCP9933 and MCP998XD/MCP9933D
9
10    Prefix: 'mcp9982'
11
12    Datasheet:
13    https://ww1.microchip.com/downloads/aemDocuments/documents/MSLD/ProductDocuments/DataSheets/MCP998X-Family-Data-Sheet-DS20006827.pdf
14
15Authors:
16
17   - Victor Duicu <victor.duicu@microchip.com>
18
19Description
20-----------
21
22This driver implements support for the MCP998X family containing: MCP9982,
23MCP9982D, MCP9983, MCP9983D, MCP9984, MCP9984D, MCP9985, MCP9985D,
24MCP9933 and MCP9933D.
25
26The MCP998X Family is a high accuracy 2-wire multichannel automotive
27temperature monitor.
28
29The chips in the family have different numbers of external channels,
30ranging from 1 (MCP9982) to 4 channels (MCP9985). Reading diodes in
31anti-parallel connection is supported by MCP9984/85/33 and
32MCP9984D/85D/33D. Dedicated hardware shutdown circuitry is present
33only in MCP998XD and MCP9933D.
34
35Temperatures are read in millidegrees Celsius, ranging from -64 to
36191.875 with 0.125 precision.
37
38Each channel has a minimum, maximum, and critical limit alongside associated alarms.
39The chips also implement a hysteresis mechanism which applies only to the maximum
40and critical limits. The relative difference between a limit and its hysteresis
41is the same for both and the value is kept in a single register.
42
43The chips measure temperatures with a variable conversion rate.
44Update_interval = Conversion/Second, so the available options are:
45- 16000 (ms) = 1 conv/16 sec
46- 8000 (ms) = 1 conv/8 sec
47- 4000 (ms) = 1 conv/4 sec
48- 2000 (ms) = 1 conv/2 sec
49- 1000 (ms) = 1 conv/sec
50- 500 (ms) = 2 conv/sec
51- 250 (ms) = 4 conv/sec
52- 125 (ms) = 8 conv/sec
53- 64 (ms) = 16 conv/sec
54- 32 (ms) = 32 conv/sec
55- 16 (ms) = 64 conv/sec
56
57Usage Notes
58-----------
59
60Parameters that can be configured in devicetree:
61- anti-parallel diode mode operation
62- resistance error correction on channels 1 and 2
63- resistance error correction on channels 3 and 4
64- power state
65
66Chips 82/83 and 82D/83D do not support anti-parallel diode mode.
67For chips with "D" in the name resistance error correction must be on.
68Please see Documentation/devicetree/bindings/hwmon/microchip,mcp9982.yaml
69for details.
70
71There are two power states:
72- Active state: in which the chip is converting on all channels at the
73programmed rate.
74
75- Standby state: in which the host must initiate a conversion cycle.
76
77Chips with "D" in the name work in Active state only and those without
78can work in either state.
79
80Chips with "D" in the name can't set update interval slower than 1 second.
81
82Among the hysteresis attributes, only the tempX_crit_hyst ones are writeable
83while the others are read only. Setting tempX_crit_hyst writes the difference
84between tempX_crit and tempX_crit_hyst in the hysteresis register. The new value
85applies automatically  to the other limits. At power up the device starts with
86a 10 degree hysteresis.
87
88Sysfs entries
89-------------
90
91The following attributes are supported. The temperature limits and
92update_interval are read-write. The attribute tempX_crit_hyst is read-write,
93while tempX_max_hyst is read only. All other attributes are read only.
94
95======================= ==================================================
96temp[1-5]_label		User name for channel.
97temp[1-5]_input		Measured temperature for channel.
98
99temp[1-5]_crit		Critical temperature limit.
100temp[1-5]_crit_alarm	Critical temperature limit alarm.
101temp[1-5]_crit_hyst	Critical temperature limit hysteresis.
102
103temp[1-5]_max		High temperature limit.
104temp[1-5]_max_alarm	High temperature limit alarm.
105temp[1-5]_max_hyst	High temperature limit hysteresis.
106
107temp[1-5]_min		Low temperature limit.
108temp[1-5]_min_alarm	Low temperature limit alarm.
109
110update_interval		The interval at which the chip will update readings.
111======================= ==================================================
112