From: <victor.duicu@microchip.com>
To: <jic23@kernel.org>
Cc: <andy@kernel.org>, <dlechner@baylibre.com>, <nuno.sa@analog.com>,
<victor.duicu@microchip.com>, <marius.cristea@microchip.com>,
<linux-iio@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: [PATCH v1 1/2] dt-bindings: iio: temperature: add support for MCP998X
Date: Tue, 15 Apr 2025 16:26:22 +0300 [thread overview]
Message-ID: <20250415132623.14913-2-victor.duicu@microchip.com> (raw)
In-Reply-To: <20250415132623.14913-1-victor.duicu@microchip.com>
From: Victor Duicu <victor.duicu@microchip.com>
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>
---
.../iio/temperature/microchip,mcp9982.yaml | 182 ++++++++++++++++++
1 file changed, 182 insertions(+)
create mode 100644 Documentation/devicetree/bindings/iio/temperature/microchip,mcp9982.yaml
diff --git a/Documentation/devicetree/bindings/iio/temperature/microchip,mcp9982.yaml b/Documentation/devicetree/bindings/iio/temperature/microchip,mcp9982.yaml
new file mode 100644
index 000000000000..8cbf897d1278
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/temperature/microchip,mcp9982.yaml
@@ -0,0 +1,182 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/temperature/microchip,mcp9982.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Microchip MCP998X/33 and MCP998XD/33D Multichannel Automotive Temperature Monitor Family
+
+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: |
+ ALERT1 indicates a HIGH or LOW limit was exceeded.
+ ALERT2 indicates a THERM limit was exceeded.
+ items:
+ - const: ALERT1
+ - const: ALERT2
+
+ "#address-cells":
+ const: 1
+
+ "#size-cells":
+ const: 0
+
+ microchip,temp-hysteresis:
+ description: |
+ Value of temperature limit hysteresis.
+ Omit this tag to set the default value.
+ $ref: /schemas/types.yaml#/definitions/uint32
+
+ microchip,extended-temp-range:
+ description: |
+ Set the chip to work in the extended temperature range -64 degrees C to 191.875 degrees C.
+ Omit this tag to set the default range 0 degrees C to 127.875 degrees C
+ type: boolean
+
+ microchip,beta-channel1:
+ description: |
+ The beta compensation factor for external channel 1 can be set
+ by the user, or can be set automatically by the chip.
+ If one wants to enable beta autodetection, omit this tag.
+ Please consult the documentation if one wants to set a specific beta.
+ If anti-parallel diode operation is enabled, the default value is set
+ and can't be changed.
+ type: boolean
+
+ microchip,beta-channel2:
+ description: |
+ The beta compensation factor for external channel 2 can be set
+ by the user, or can be set automatically by the chip.
+ If one wants to enable beta autodetection, omit this tag.
+ Please consult the documentation if one wants to set a specific beta.
+ If anti-parallel diode operation is enabled, the default value is set
+ and can't be changed.
+ type: boolean
+
+ microchip,apdd-state:
+ description: |
+ Enable anti-parallel diode mode operation.
+ Omit this tag to disable anti-parallel diode mode by default.
+ type: boolean
+
+ microchip,recd12:
+ description: |
+ Enable resistance error correction for external channels 1 and 2.
+ Not all chips support resistance error correction on external
+ channels 1 and 2, please consult the documentation.
+ Omit this tag to disable REC for channels 1 and 2 by default.
+ type: boolean
+
+ microchip,recd34:
+ description: |
+ Enable resistance error correction for external channels 3 and 4.
+ Not all chips support resistance error correction on external
+ channels 3 and 4, please consult the documentation.
+ Omit this tag to disable REC for channels 3 and 4 by default.
+ type: boolean
+
+ label:
+ description: Unique name to identify which device this is.
+
+ 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:
+ minimum: 1
+ maximum: 4
+
+ microchip,ideality-factor:
+ description: |
+ Each channel has an ideality factor.
+ Beta compensation and resistance error correction automatically correct
+ for most ideality error. So ideality factor does not need to be adjusted in general.
+ Omit this tag in order to set the default value.
+ Please consult the documentation if one wants to set a specific ideality value.
+ $ref: /schemas/types.yaml#/definitions/uint32
+
+ label:
+ description: Unique name to identify which channel this is.
+
+ required:
+ - reg
+
+ unevaluatedProperties: false
+
+required:
+ - compatible
+ - reg
+ - vdd-supply
+
+additionalProperties: false
+
+examples:
+ - |
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ temperature-sensor@4c {
+ compatible = "microchip,mcp9985";
+ reg = <0x4c>;
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ label = "temperature-sensor";
+
+ microchip,temp-hysteresis = <10>;
+ microchip,extended-temp-range;
+ microchip,apdd-state;
+ microchip,recd12;
+ microchip,recd34;
+ vdd-supply = <&vdd>;
+
+ channel@1{
+ reg = <0x1>;
+ label = "CPU Temperature";
+ };
+
+ channel@2{
+ reg = <0x2>;
+ label = "GPU Temperature";
+ };
+ };
+ };
+
+...
--
2.45.2
next prev parent reply other threads:[~2025-04-15 13:27 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-15 13:26 [PATCH v1 0/2] " victor.duicu
2025-04-15 13:26 ` victor.duicu [this message]
2025-04-15 17:52 ` [PATCH v1 1/2] dt-bindings: iio: temperature: " Jonathan Cameron
2025-04-17 11:40 ` Victor.Duicu
2025-04-18 16:01 ` Jonathan Cameron
2025-04-16 6:45 ` Krzysztof Kozlowski
2025-04-15 13:26 ` [PATCH v1 2/2] " victor.duicu
2025-04-15 19:05 ` Andy Shevchenko
2025-05-22 9:18 ` Victor.Duicu
2025-05-23 16:21 ` Andy Shevchenko
2025-04-18 18:07 ` Jonathan Cameron
2025-04-28 12:57 ` Victor.Duicu
2025-04-30 16:17 ` Jonathan Cameron
2025-04-15 17:43 ` [PATCH v1 0/2] " Jonathan Cameron
2025-04-17 7:30 ` Victor.Duicu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250415132623.14913-2-victor.duicu@microchip.com \
--to=victor.duicu@microchip.com \
--cc=andy@kernel.org \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marius.cristea@microchip.com \
--cc=nuno.sa@analog.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®