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