From nobody Sat Oct 4 09:32:22 2025 Received: from out-179.mta1.migadu.com (out-179.mta1.migadu.com [95.215.58.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2BE2E2652B0; Mon, 18 Aug 2025 18:32:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.179 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755541953; cv=none; b=rv89Y3Fa29aW9A+0AuA8Yir2aGTRX+jvj9N9WgrPweUzZ7GoMkkxgusGi6Yms143maq2BSu8E2q4951FvReTHICvclwotybCdG8NsUsJ98rgj5oX0DqnLk9qYMRAxH0MBJ9XTldyfIiwwP4H9/mKK6TF2eJluvrS2gavvX03Px4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755541953; c=relaxed/simple; bh=04rUiRnzldCIjyPYAIClUR+pVbQQ203qGVqhTFqmibo=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Kk3oFfQpuPJAE1CB9/btPiueZHKqCayBrwuFkfCe4WzNvSiMf2TJ4gDl/+DoPRrlAhyKGMv+fqRstHG7C+crWzTYLBgoB6vUkysSIVP+2dShmx2bhzhYdGu9OFubg1/gAYvZ10qk8EBCqLIeay424r+hXnF/wCCEKKl8LboIEkU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=kernel.org; spf=pass smtp.mailfrom=linux.dev; arc=none smtp.client-ip=95.215.58.179 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Ben Collins To: Jonathan Cameron , David Lechner , =?UTF-8?q?Nuno=20S=C3=A1?= , Andy Shevchenko , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Andrew Hepp Cc: Ben Collins , linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/6] dt-bindings: iio: mcp9600: Add microchip,mcp9601 and add constraints Date: Mon, 18 Aug 2025 14:32:10 -0400 Message-Id: <20250818183214.380847-3-bcollins@kernel.org> In-Reply-To: <20250818183214.380847-1-bcollins@kernel.org> References: <20250818183214.380847-1-bcollins@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT Content-Type: text/plain; charset="utf-8" From: Ben Collins Add microchip,mcp9601 compatible in addition to the original microchip,mcp9600 to designate support between these two chips. The current dt-binding has open-circuit and short-circuit as interrupt names, but these are only supported in mcp9601. The OC and SC detection requires that mcp9601 VSENSE be wired up, which not only enables the OC SC interrupts, but also the OC and SC status register bits. Add a microchip,vsense boolean to show the chip is wired for this support. Add constraints so this feature only applies if the mcp9601 compatible is selected. Signed-off-by: Ben Collins --- .../iio/temperature/microchip,mcp9600.yaml | 60 ++++++++++++++++++- 1 file changed, 57 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/iio/temperature/microchip,mc= p9600.yaml b/Documentation/devicetree/bindings/iio/temperature/microchip,mc= p9600.yaml index 57b387a1accc..c22edb4ab852 100644 --- a/Documentation/devicetree/bindings/iio/temperature/microchip,mcp9600.y= aml +++ b/Documentation/devicetree/bindings/iio/temperature/microchip,mcp9600.y= aml @@ -4,7 +4,7 @@ $id: http://devicetree.org/schemas/iio/temperature/microchip,mcp9600.yaml# $schema: http://devicetree.org/meta-schemas/core.yaml# =20 -title: Microchip MCP9600 thermocouple EMF converter +title: Microchip MCP9600 and similar thermocouple EMF converters =20 maintainers: - Andrew Hepp @@ -14,7 +14,11 @@ description: =20 properties: compatible: - const: microchip,mcp9600 + oneOf: + - const: microchip,mcp9600 + - items: + - const: microchip,mcp9601 + - const: microchip,mcp9600 =20 reg: maxItems: 1 @@ -34,6 +38,8 @@ properties: - alert2 - alert3 - alert4 + - open-circuit + - short-circuit =20 thermocouple-type: $ref: /schemas/types.yaml#/definitions/uint32 @@ -43,8 +49,37 @@ properties: Use defines in dt-bindings/iio/temperature/thermocouple.h. Supported types are B, E, J, K, N, R, S, T. =20 + microchip,vsense: + type: boolean + description: + This flag indicates that the chip has been wired with VSENSE to + enable open and short circuit detect. + vdd-supply: true =20 +allOf: + - if: + properties: + compatible: + not: + contains: + const: microchip,mcp9601 + then: + properties: + interrupts: + minItems: 1 + maxItems: 4 + interrupt-names: + minItems: 1 + maxItems: 4 + items: + enum: + - alert1 + - alert2 + - alert3 + - alert4 + microchip,vsense: false + required: - compatible - reg @@ -64,8 +99,27 @@ examples: reg =3D <0x60>; interrupt-parent =3D <&gpio>; interrupts =3D <25 IRQ_TYPE_EDGE_RISING>; - interrupt-names =3D "open-circuit"; + interrupt-names =3D "alert1"; thermocouple-type =3D ; vdd-supply =3D <&vdd>; }; }; + - | + #include + #include + i2c { + #address-cells =3D <1>; + #size-cells =3D <0>; + + temperature-sensor@62 { + compatible =3D "microchip,mcp9601", + "microchip,mcp9600"; + microchip,vsense; + reg =3D <0x62>; + interrupt-parent =3D <&gpio>; + interrupts =3D <22 IRQ_TYPE_EDGE_RISING + 23 IRQ_TYPE_EDGE_RISING>; + interrupt-names =3D "open-circuit", "short-circuit"; + vdd-supply =3D <&vdd>; + }; + }; --=20 2.39.5