This is the devicetree schema for Microchip MCP998X/33 and MCP998XD/33D
Multichannel Automotive Temperature Monitor Family.
Signed-off-by: Victor Duicu <victor.duicu@microchip.com>
---
.../bindings/hwmon/microchip,mcp9982.yaml | 223 +++++++++++++++++++++
MAINTAINERS | 6 +
2 files changed, 229 insertions(+)
diff --git a/Documentation/devicetree/bindings/hwmon/microchip,mcp9982.yaml b/Documentation/devicetree/bindings/hwmon/microchip,mcp9982.yaml
new file mode 100644
index 000000000000..b59c64e9886d
--- /dev/null
+++ b/Documentation/devicetree/bindings/hwmon/microchip,mcp9982.yaml
@@ -0,0 +1,223 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/hwmon/microchip,mcp9982.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Microchip MCP998X/33 and MCP998XD/33D Temperature Monitor
+
+maintainers:
+ - Victor Duicu <victor.duicu@microchip.com>
+
+description: |
+ The MCP998X/33 and MCP998XD/33D family is a high-accuracy 2-wire
+ multichannel automotive temperature monitor.
+ The datasheet can be found here:
+ https://ww1.microchip.com/downloads/aemDocuments/documents/MSLD/ProductDocuments/DataSheets/MCP998X-Family-Data-Sheet-DS20006827.pdf
+
+properties:
+ compatible:
+ enum:
+ - microchip,mcp9933
+ - microchip,mcp9933d
+ - microchip,mcp9982
+ - microchip,mcp9982d
+ - microchip,mcp9983
+ - microchip,mcp9983d
+ - microchip,mcp9984
+ - microchip,mcp9984d
+ - microchip,mcp9985
+ - microchip,mcp9985d
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 2
+
+ interrupt-names:
+ description:
+ The chip family has three different interrupt pins divided among them.
+ The chips without "D" have alert-therm and therm-addr.
+ The chips with "D" have alert-therm and sys-shtdwn.
+ minItems: 1
+ maxItems: 2
+ items:
+ enum: [alert-therm, therm-addr, sys-shtdwn]
+
+ "#address-cells":
+ const: 1
+
+ "#size-cells":
+ const: 0
+
+ microchip,enable-anti-parallel:
+ description:
+ Enable anti-parallel diode mode operation.
+ MCP9984/84D/85/85D and MCP9933/33D support reading two external diodes
+ in anti-parallel connection on the same set of pins.
+ type: boolean
+
+ microchip,parasitic-res-on-channel1-2:
+ description:
+ Indicates that the chip and the diodes/transistors are sufficiently far
+ apart that a parasitic resistance is added to the wires, which can affect
+ the measurements. Due to the anti-parallel diode connections, channels
+ 1 and 2 are affected together.
+ type: boolean
+
+ microchip,parasitic-res-on-channel3-4:
+ description:
+ Indicates that the chip and the diodes/transistors are sufficiently far
+ apart that a parasitic resistance is added to the wires, which can affect
+ the measurements. Due to the anti-parallel diode connections, channels
+ 3 and 4 are affected together.
+ type: boolean
+
+ microchip,power-state:
+ description:
+ The chip can be set in Run state or Standby state. In Run state the ADC
+ is converting on all channels at the programmed conversion rate.
+ In Standby state the host must initiate a conversion cycle by writing
+ to the One-Shot register.
+ True value sets Run state.
+ Chips with "D" in the name can only be set in Run mode.
+ type: boolean
+
+ vdd-supply: true
+
+patternProperties:
+ "^channel@[1-4]$":
+ description:
+ Represents the external temperature channels to which
+ a remote diode is connected.
+ type: object
+
+ properties:
+ reg:
+ items:
+ maxItems: 1
+
+ label:
+ description: Unique name to identify which channel this is.
+
+ required:
+ - reg
+
+ additionalProperties: false
+
+required:
+ - compatible
+ - reg
+ - vdd-supply
+
+allOf:
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - microchip,mcp9982d
+ - microchip,mcp9983d
+ - microchip,mcp9984d
+ - microchip,mcp9985d
+ - microchip,mcp9933d
+ then:
+ properties:
+ interrupt-names:
+ not:
+ contains:
+ const: therm-addr
+ required:
+ - microchip,power-state
+ - microchip,parasitic-res-on-channel1-2
+ - microchip,parasitic-res-on-channel3-4
+ else:
+ properties:
+ microchip,power-state: true
+ interrupt-names:
+ not:
+ contains:
+ const: sys-shtdwn
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - microchip,mcp9982
+ - microchip,mcp9982d
+ then:
+ properties:
+ microchip,enable-anti-parallel: false
+ patternProperties:
+ "^channel@[2-4]$": false
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - microchip,mcp9983
+ - microchip,mcp9983d
+ then:
+ properties:
+ microchip,enable-anti-parallel: false
+ patternProperties:
+ "^channel@[3-4]$": false
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - microchip,mcp9933
+ - microchip,mcp9933d
+ then:
+ patternProperties:
+ "^channel@[3-4]$": false
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - microchip,mcp9984
+ - microchip,mcp9984d
+ then:
+ properties:
+ channel@4: false
+
+additionalProperties: false
+
+examples:
+ - |
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ temperature-sensor@4c {
+ compatible = "microchip,mcp9985";
+ reg = <0x4c>;
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ microchip,enable-anti-parallel;
+ microchip,parasitic-res-on-channel1-2;
+ microchip,parasitic-res-on-channel3-4;
+ vdd-supply = <&vdd>;
+
+ channel@1 {
+ reg = <1>;
+ label = "Room Temperature";
+ };
+
+ channel@2 {
+ reg = <2>;
+ label = "GPU Temperature";
+ };
+ };
+ };
+
+...
diff --git a/MAINTAINERS b/MAINTAINERS
index e08767323763..026510a4129c 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -17160,6 +17160,12 @@ S: Maintained
F: Documentation/devicetree/bindings/iio/adc/microchip,mcp3911.yaml
F: drivers/iio/adc/mcp3911.c
+MICROCHIP MCP9982 TEMPERATURE DRIVER
+M: Victor Duicu <victor.duicu@microchip.com>
+L: linux-hwmon@vger.kernel.org
+S: Supported
+F: Documentation/devicetree/bindings/hwmon/microchip,mcp9982.yaml
+
MICROCHIP MMC/SD/SDIO MCI DRIVER
M: Aubin Constans <aubin.constans@microchip.com>
S: Maintained
--
2.51.0
On Tue, Feb 17, 2026 at 04:06:13PM +0200, Victor Duicu wrote: > This is the devicetree schema for Microchip MCP998X/33 and MCP998XD/33D "Add" See submitting patches. > Multichannel Automotive Temperature Monitor Family. ... > +properties: > + compatible: > + enum: > + - microchip,mcp9933 > + - microchip,mcp9933d > + - microchip,mcp9982 > + - microchip,mcp9982d > + - microchip,mcp9983 > + - microchip,mcp9983d > + - microchip,mcp9984 > + - microchip,mcp9984d > + - microchip,mcp9985 > + - microchip,mcp9985d > + > + reg: > + maxItems: 1 > + > + interrupts: Your interrupt-names say 1 item is correct, so these are de-synced. They should be always constrained the same way. > + maxItems: 2 > + > + interrupt-names: > + description: > + The chip family has three different interrupt pins divided among them. > + The chips without "D" have alert-therm and therm-addr. > + The chips with "D" have alert-therm and sys-shtdwn. > + minItems: 1 > + maxItems: 2 > + items: > + enum: [alert-therm, therm-addr, sys-shtdwn] > + > + "#address-cells": > + const: 1 > + > + "#size-cells": > + const: 0 > + > + microchip,enable-anti-parallel: > + description: > + Enable anti-parallel diode mode operation. > + MCP9984/84D/85/85D and MCP9933/33D support reading two external diodes > + in anti-parallel connection on the same set of pins. > + type: boolean > + > + microchip,parasitic-res-on-channel1-2: > + description: > + Indicates that the chip and the diodes/transistors are sufficiently far > + apart that a parasitic resistance is added to the wires, which can affect > + the measurements. Due to the anti-parallel diode connections, channels > + 1 and 2 are affected together. > + type: boolean > + > + microchip,parasitic-res-on-channel3-4: > + description: > + Indicates that the chip and the diodes/transistors are sufficiently far > + apart that a parasitic resistance is added to the wires, which can affect > + the measurements. Due to the anti-parallel diode connections, channels > + 3 and 4 are affected together. > + type: boolean > + > + microchip,power-state: > + description: > + The chip can be set in Run state or Standby state. In Run state the ADC > + is converting on all channels at the programmed conversion rate. > + In Standby state the host must initiate a conversion cycle by writing > + to the One-Shot register. > + True value sets Run state. > + Chips with "D" in the name can only be set in Run mode. > + type: boolean > + > + vdd-supply: true > + > +patternProperties: > + "^channel@[1-4]$": > + description: > + Represents the external temperature channels to which > + a remote diode is connected. > + type: object > + > + properties: > + reg: > + items: > + maxItems: 1 > + > + label: > + description: Unique name to identify which channel this is. > + > + required: > + - reg > + > + additionalProperties: false > + > +required: > + - compatible > + - reg > + - vdd-supply > + > +allOf: > + - if: > + properties: > + compatible: > + contains: > + enum: > + - microchip,mcp9982d > + - microchip,mcp9983d > + - microchip,mcp9984d > + - microchip,mcp9985d > + - microchip,mcp9933d > + then: > + properties: Missing constraints for interrupt: > + interrupt-names: > + not: > + contains: > + const: therm-addr No, you need to list the items. This *must* be strictly constrained. It's explicitly requested by writing bindings. Best regards, Krzysztof
Hi Krzysztof,
>
>
> ...
>
>
> > +properties:
> > + compatible:
> > + enum:
> > + - microchip,mcp9933
> > + - microchip,mcp9933d
> > + - microchip,mcp9982
> > + - microchip,mcp9982d
> > + - microchip,mcp9983
> > + - microchip,mcp9983d
> > + - microchip,mcp9984
> > + - microchip,mcp9984d
> > + - microchip,mcp9985
> > + - microchip,mcp9985d
> > +
> > + reg:
> > + maxItems: 1
> > +
> > + interrupts:
>
> Your interrupt-names say 1 item is correct, so these are de-synced.
> They
> should be always constrained the same way.
>
We want to allow the user to use none, one or both interrupts.
It was my mistake to set maxItems instead of minItems to interrupts.
Do you find the following approach agreeable?
interrupts:
minItems: 1
interrupt-names:
minItems: 1
items:
- enum: [alert-therm, therm-addr, sys-shtdwn]
- enum: [therm-addr, sys-shtdwn]
...
Thank you for your reply,
Victor
On 20/02/2026 15:58, Victor.Duicu@microchip.com wrote: > Hi Krzysztof, > >> >> >> ... >> >> >>> +properties: >>> + compatible: >>> + enum: >>> + - microchip,mcp9933 >>> + - microchip,mcp9933d >>> + - microchip,mcp9982 >>> + - microchip,mcp9982d >>> + - microchip,mcp9983 >>> + - microchip,mcp9983d >>> + - microchip,mcp9984 >>> + - microchip,mcp9984d >>> + - microchip,mcp9985 >>> + - microchip,mcp9985d >>> + >>> + reg: >>> + maxItems: 1 >>> + >>> + interrupts: >> >> Your interrupt-names say 1 item is correct, so these are de-synced. >> They >> should be always constrained the same way. >> > > We want to allow the user to use none, one or both interrupts. Who is the "user" here? IOW, can the *hardware* work correctly without the interrupt line connected anywhere? > It was my mistake to set maxItems instead of minItems to interrupts. > Do you find the following approach agreeable? > > interrupts: > minItems: 1 missing maxItems > > interrupt-names: > minItems: 1 > items: > - enum: [alert-therm, therm-addr, sys-shtdwn] > - enum: [therm-addr, sys-shtdwn] If any combination is allowed, then it is correct code. > > ... > > Thank you for your reply, > Victor Best regards, Krzysztof
> > ... > > > > +properties: > > > > + compatible: > > > > + enum: > > > > + - microchip,mcp9933 > > > > + - microchip,mcp9933d > > > > + - microchip,mcp9982 > > > > + - microchip,mcp9982d > > > > + - microchip,mcp9983 > > > > + - microchip,mcp9983d > > > > + - microchip,mcp9984 > > > > + - microchip,mcp9984d > > > > + - microchip,mcp9985 > > > > + - microchip,mcp9985d > > > > + > > > > + reg: > > > > + maxItems: 1 > > > > + > > > > + interrupts: > > > > > > Your interrupt-names say 1 item is correct, so these are de- > > > synced. > > > They > > > should be always constrained the same way. > > > > > > > We want to allow the user to use none, one or both interrupts. > > Who is the "user" here? IOW, can the *hardware* work correctly > without > the interrupt line connected anywhere? > Yes, the hardware can work while the interrupt lines are not connected. At the moment the driver does not support interrupts. ... Best regards, Victor
On 23/02/2026 12:09, Victor.Duicu@microchip.com wrote: > >>> > ... > >>>>> +properties: >>>>> + compatible: >>>>> + enum: >>>>> + - microchip,mcp9933 >>>>> + - microchip,mcp9933d >>>>> + - microchip,mcp9982 >>>>> + - microchip,mcp9982d >>>>> + - microchip,mcp9983 >>>>> + - microchip,mcp9983d >>>>> + - microchip,mcp9984 >>>>> + - microchip,mcp9984d >>>>> + - microchip,mcp9985 >>>>> + - microchip,mcp9985d >>>>> + >>>>> + reg: >>>>> + maxItems: 1 >>>>> + >>>>> + interrupts: >>>> >>>> Your interrupt-names say 1 item is correct, so these are de- >>>> synced. >>>> They >>>> should be always constrained the same way. >>>> >>> >>> We want to allow the user to use none, one or both interrupts. >> >> Who is the "user" here? IOW, can the *hardware* work correctly >> without >> the interrupt line connected anywhere? >> > > Yes, the hardware can work while the interrupt lines are not connected. Almost there... > At the moment the driver does not support interrupts. ...and ruined it. This does not matter and using it as argument means I do not believe you actually checked if hardware can work without interrupt lines connected. You only checked the driver. Please read your datasheet carefully. Best regards, Krzysztof
Hi Krzysztof, ... > > > > > > +properties: > > > > > > + compatible: > > > > > > + enum: > > > > > > + - microchip,mcp9933 > > > > > > + - microchip,mcp9933d > > > > > > + - microchip,mcp9982 > > > > > > + - microchip,mcp9982d > > > > > > + - microchip,mcp9983 > > > > > > + - microchip,mcp9983d > > > > > > + - microchip,mcp9984 > > > > > > + - microchip,mcp9984d > > > > > > + - microchip,mcp9985 > > > > > > + - microchip,mcp9985d > > > > > > + > > > > > > + reg: > > > > > > + maxItems: 1 > > > > > > + > > > > > > + interrupts: > > > > > > > > > > Your interrupt-names say 1 item is correct, so these are de- > > > > > synced. > > > > > They > > > > > should be always constrained the same way. > > > > > > > > > > > > > We want to allow the user to use none, one or both interrupts. > > > > > > Who is the "user" here? IOW, can the *hardware* work correctly > > > without > > > the interrupt line connected anywhere? > > > > > > > Yes, the hardware can work while the interrupt lines are not > > connected. > > Almost there... > > > At the moment the driver does not support interrupts. > > > ...and ruined it. This does not matter and using it as argument means > I > do not believe you actually checked if hardware can work without > interrupt lines connected. You only checked the driver. Please read > your > datasheet carefully. > > Best regards, > Krzysztof As described on page 11 of the documentation the alert-therm, therm-addr and sys-shtdwn pins are of type open-drain. Most of the devices need a pull-up resistor in order to setup the I2C address(for parts with name ending in "-A") or to control the hardware thermal shutdown limit(for chips with "D" in the name). In all other cases it is recommended to connect a pull-up resistor to the pin, but it is not mandatory. If the hardware does not use that signal, the pull-up can be missing. If the interrupt functionality is used then it's mandatory to use a pull-up resistor. In my view the "user" is the person doing the design for a system which includes the MCP998X chip. Please correct me if I'm wrong, I am under the impression that the device tree is a hardware descriptor for the driver to know how the hardware is setup/configured but should not supersede the datasheet for designing new systems. Kind regards, Victor
© 2016 - 2026 Red Hat, Inc.