From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qt1-f172.google.com (mail-qt1-f172.google.com [209.85.160.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E7A2732D0C4 for ; Thu, 5 Feb 2026 21:10:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770325843; cv=none; b=RAusuCraFB5CywAfZ5frv1LWlyRSmgBTGtffgQaehGrq+1zP25MsTX6dgdVg+DX+lygslda1s9mhvKVACS77u0+/dmDnuTgCYViuTKkOu2n/5sLYjl6bEEZluFWeEFarzypxpDKY8zJoy2Jwiy/R2403sz1CUevnM3Vffc+ObRs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770325843; c=relaxed/simple; bh=eXwQ9SgcUhDKN59vyhZtqEkgpqtPjys6BZik72szYvI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=j+ENTs7X+w91uEJgqugvvd/0xAMs0n47RxX4+rtbQl9/jaJtOxIjlv3i/fX/n1AW5Uq5cf+B8PBZLf0FoqnnuJQe9Z4LPCuhYR/EXxPih1UgrgZYOQisVc+awu5Q/GEtYDhZ5JB8xkL8yp5R59RtJ3XTnbcLjYnkDPL7fjt2+bk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=roeck-us.net; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=khcAVX3p; arc=none smtp.client-ip=209.85.160.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=roeck-us.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="khcAVX3p" Received: by mail-qt1-f172.google.com with SMTP id d75a77b69052e-5029aa94f28so12909621cf.1 for ; Thu, 05 Feb 2026 13:10:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1770325842; x=1770930642; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=iiWXSjYD8iWQZkhbOZvxGQgWjvd+mTWIbvYj/f3atxo=; b=khcAVX3puMnRqDpLsFg/FTKsS+Pt/6guUVISmGfy4LRKN+t4jVw6XAQNNBRpk8VrcX eJij060GpvTvGehLlnNBnsz6DTKz2jewOeyDIHLpscJUcpyxKvKjwuiYDgQfcaY5Rtyu N0LN+B3TUQwodWDl6x9YyREVHDV54E02nwJxPHrWhLy6rVD0yuz7yZ+D559CD+gUOrLT yL9NnOE5+i/zTHQbu2F6FhYeI3S/n5YMcK9sDtL1/XqDcJt4/4xcdf1F/pVHD7YDl/aS ZzFaLkQhVopgvrAQ8qc1uiiw+McAPX6hzTmW4AyPH5PES1NRvwwbNwUejbGzCXCw3AA1 mS3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770325842; x=1770930642; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=iiWXSjYD8iWQZkhbOZvxGQgWjvd+mTWIbvYj/f3atxo=; b=ec7zTj4+WYk50Mfq8JqXT5XOVjn+3z38qfiNdY4fcXoWWWoF66INuO2vTtc3+weL58 /8pWclX85AsYCqM2azBJxLRc3o9qjJsHlrsXTzUcf7RjHlv20CXQBk3XgbuG23HKF53b PX4/PMaYvj+kP7szh8x4LSPWXzJs1AbXQpv0bRz08fBXpxvyZ1YNLeWwkqP8S4Sb6bBt FuWaoCzO+Pq+ua0JODsZbxmsMvjM1xmVjFLb6DXOo4ZqYRfPfGyAIwFhMiCdL8WatoX9 tiNGPphVeYHGIPLI9bUrsTi3+Gfn1PnaHe6Tr+ta9oYx+ZLM4lmWnj1pjM7H6jVkDkZp wn0w== X-Forwarded-Encrypted: i=1; AJvYcCWhoSLxfAqDZQSD7mgRV22859LiHxsvKwCIQd3uKp2GKYJZwRw0t+uw0R7Wqyd96FT5TxSTX/cG0nLSLg0=@vger.kernel.org X-Gm-Message-State: AOJu0YxeMaVOgx3BiC0wj+tMqV6hz19Fx65LrAG5vtky0pTO1YEIrHFT EfEi7gXODMHhrBZQGkH3MAD5tYKBaADsfkKN1C6bV9KAOrs0hq/Im0to X-Gm-Gg: AZuq6aIVUfd6+BOYCzbR/Cn8PdaOQWki3CgWTwnIUqXan9UnMlwF1201GePKwCkkjaW hgTwCQp1DZXs1Qa54GAOYOLuTCi3Jin6uaqlBRF1t73c/HskfRdzQKwIVLchsy5+bpSgNdESscF Rvz/xw3Ze7pOXALLkrwnOnNuLgkHDNGPm/pnKg0DuQjJyNBZuphknFVMeir22aEGsUPahxPIqph tGSZld//Hrzcjhglzeu0SWE6LHtFOzzVJqSyPxAUjZGUxgswtCWsYHEz9NBsrfYaDL8InEphLLr SZ0DNIFqNzzyuS7+PsOJZnMp3G4d/Vd+RDHWU5Z0tMnFrZL8wghRwuZJd18zTFTsesdOJeG5hB6 xZfrlzM91pJApziolr/7fmEY1mBgm1ZxYN7Zde/BeurwiLHXWtjev3sjt9bzFqfG1mK08Zf2cry RaHsgqOux2btmQDqiSt6aAg4Km X-Received: by 2002:a05:693c:3111:b0:2b7:a6fa:3f87 with SMTP id 5a478bee46e88-2b855d341cfmr131450eec.19.1770319108298; Thu, 05 Feb 2026 11:18:28 -0800 (PST) Received: from server.roeck-us.net ([2600:1700:e321:62f0:da43:aeff:fecc:bfd5]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-2b855c88cb4sm165396eec.30.2026.02.05.11.18.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Feb 2026 11:18:27 -0800 (PST) Sender: Guenter Roeck Date: Thu, 5 Feb 2026 11:18:25 -0800 From: Guenter Roeck To: Marius Cristea Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jonathan Corbet , linux-hwmon@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, Conor Dooley Subject: Re: [PATCH v5 1/2] dt-bindings: hwmon: temperature: add support for EMC1812 Message-ID: References: <20260205-hw_mon-emc1812-v5-0-232835aefe8f@microchip.com> <20260205-hw_mon-emc1812-v5-1-232835aefe8f@microchip.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260205-hw_mon-emc1812-v5-1-232835aefe8f@microchip.com> On Thu, Feb 05, 2026 at 09:09:03AM +0200, Marius Cristea wrote: > This is the devicetree schema for Microchip EMC1812/13/14/15/33 > Multichannel Low-Voltage Remote Diode Sensor Family. > > EMC1812 has one external remote temperature monitoring channel. > EMC1813 has two external remote temperature monitoring channels. > EMC1814 has three external remote temperature monitoring channels and > channels 2 and 3 supports anti parallel diode. > EMC1815 has four external remote temperature monitoring channels and > channels 1/2 and 3/4 supports anti parallel diode. > EMC1833 has two external remote temperature monitoring channels and > channels 1 and 2 supports anti parallel diode. > > Signed-off-by: Marius Cristea > Reviewed-by: Conor Dooley > --- > .../bindings/hwmon/microchip,emc1812.yaml | 182 +++++++++++++++++++++ > MAINTAINERS | 6 + > 2 files changed, 188 insertions(+) > > diff --git a/Documentation/devicetree/bindings/hwmon/microchip,emc1812.yaml b/Documentation/devicetree/bindings/hwmon/microchip,emc1812.yaml > new file mode 100644 > index 0000000000000000000000000000000000000000..759e004eafdfc0772e110fe484767eb66a623294 > --- /dev/null > +++ b/Documentation/devicetree/bindings/hwmon/microchip,emc1812.yaml > @@ -0,0 +1,182 @@ > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/hwmon/microchip,emc1812.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Microchip EMC1812/13/14/15/33 multichannel temperature sensor > + > +maintainers: > + - Marius Cristea > + > +description: | > + The Microchip EMC1812/13/14/15/33 is a high-accuracy 2-wire multichannel > + low-voltage remote diode temperature monitor. > + > + The datasheet can be found here: > + https://ww1.microchip.com/downloads/aemDocuments/documents/MSLD/ProductDocuments/DataSheets/EMC1812-3-4-5-33-Data-Sheet-DS20005751.pdf > + > + EMC1812 has one external remote temperature monitoring channel > + EMC1813 has two external remote temperature monitoring channels > + EMC1814 has three external remote temperature monitoring channels and > + channels 2 and 3 supports anti parallel diode > + EMC1815 has four external remote temperature monitoring channels and > + channels 1/2 and 3/4 supports anti parallel diode > + EMC1833 has two external remote temperature monitoring channels and > + channels 1 and 2 supports anti parallel diode > + > +properties: > + compatible: > + enum: > + - microchip,emc1812 > + - microchip,emc1813 > + - microchip,emc1814 > + - microchip,emc1815 > + - microchip,emc1833 > + > + reg: > + maxItems: 1 > + > + interrupts: > + items: > + - description: alert-therm2 asserts when the ALERT limit is exceeded. > + - description: therm-addr asserts when the THERM limit is exceeded. > + minItems: 1 > + > + interrupt-names: > + items: > + - enum: [alert-therm2, therm-addr] AI feedback: If interrupt names are being used to identify the interrupts, should the interrupts property be less restrictive? Currently, the items list in interrupts enforces a strict order: the first interrupt must match the first description (alert-therm2), and the second must match the second description (therm-addr). However, the interrupt-names definition for the first item allows it to be "therm-addr". If the intention is to support providing only the second interrupt (therm-addr) as the first item in the list, then the interrupts property definition prevents that by enforcing the first item to be alert-therm2. 2nd feedback: The interrupts property description lists two possible interrupts ("alert-therm2" and "therm-addr"), but this definition restricts interrupt-names to a single item. Should this be updated to allow providing names for both interrupts if the device is configured with both? [ I don't know how this is supposed to work, so the feedback needs to be taken with two grains of salt. ] > + > + "#address-cells": > + const: 1 > + > + "#size-cells": > + const: 0 > + > + 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 > + > + 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 I (or, rather, AI review) asked this before: Does this reg property need maxItems: 1? Without it, the schema might allow reg properties with multiple items, provided the first item is within the minimum/maximum range. [ Presumably the _values_ should be 1..4, not the number of items ] > + > + 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,emc1812 > + - microchip,emc1813 > + - microchip,emc1833 > + then: > + properties: > + microchip,parasitic-res-on-channel3-4: false > + - if: > + properties: > + compatible: > + contains: > + enum: > + - microchip,emc1812 > + then: > + properties: > + channel@1: > + properties: > + reg: > + items: > + const: 1 > + patternProperties: > + "^channel@[2-4]$": false > + - if: > + properties: > + compatible: > + pattern: "^microchip,emc18[13]3" > + then: > + patternProperties: > + "^channel@[12]$": > + properties: > + reg: > + items: > + maximum: 2 > + "^channel@[34]$": false > + - if: > + properties: > + compatible: > + pattern: "^microchip,emc1814" > + then: > + patternProperties: > + "^channel@[1-3]$": > + properties: > + reg: > + items: > + maximum: 3 > + properties: > + channel@4: false > + > +additionalProperties: false > + > +examples: > + - | > + i2c { > + #address-cells = <1>; > + #size-cells = <0>; > + > + temperature-sensor@4c { > + compatible = "microchip,emc1813"; > + reg = <0x4c>; > + > + #address-cells = <1>; > + #size-cells = <0>; > + > + microchip,parasitic-res-on-channel1-2; > + > + vdd-supply = <&vdd>; > + > + channel@1 { > + reg = <1>; > + label = "External CH1 Temperature"; > + }; > + > + channel@2 { > + reg = <2>; > + label = "External CH2 Temperature"; > + }; > + }; > + }; > diff --git a/MAINTAINERS b/MAINTAINERS > index 6d7b697bfdba16e4f0ee5f4f0195b9d7da06dae5..85c236df781e47c78deeb7ef4d80bc94bba604c4 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -16646,6 +16646,12 @@ S: Supported > F: Documentation/devicetree/bindings/interrupt-controller/microchip,sama7g5-eic.yaml > F: drivers/irqchip/irq-mchp-eic.c > > +MICROCHIP EMC1812 DRIVER > +M: Marius Cristea > +L: linux-hwmon@vger.kernel.org > +S: Supported > +F: Documentation/devicetree/bindings/hwmon/microchip,emc1812.yaml > + > MICROCHIP I2C DRIVER > M: Codrin Ciubotariu > L: linux-i2c@vger.kernel.org > > -- > 2.51.0 >