From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CB0E4606A32C for ; Thu, 3 Dec 2026 16:52:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=a1yLMl8z; dkim=pass (2048-bit key) header.d=teslabs-com.20260707.gappssmtp.com header.i=@teslabs-com.20260707.gappssmtp.com header.a=rsa-sha256 header.s=20260707 header.b=LzmSc6Dx DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Unsubscribe-Post:List-Owner; bh=ORCAPboL+W6Tq6kZxpmygJ8zcotRXPG7HNdKml2rqPU=; b=a1yLMl8zy+WRei6WK6rdvkxmBJ JT6+qzw4ztLT6LtsbE6MT4E1g/llUWaWBE8/gXsqdrHRN6PoQTk5RnU0a+wUDjS+eXrzwUgOhyXl2 AbFcWyeIt0m6Zw7sLw8LeWOB6zRNeQ+Xt9HbWmh1dNEIKl6+xTWbahAUDaNH8YcYM+0yUA4/HE0T1 o2zAYZVbaEQD+ttEqF9sf9St3Ypf6QRf92EsXjKBunFcs/8NNj7wsKQWpf4CSVU6lLzgs5FvZ8qOh Mk+5TZuS7qSX2/DWnnRFiWNOlQBsX5NFJTwAR7voKU3mUv4qczdnULL6BAE6Dq6UyeiwmqY0bxnRP Vb+ZOCxA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZA2i-0000000FKvh-166E; Thu, 03 Dec 2026 16:52:24 +0000 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZA2d-0000000FKsr-0JFV for linux-arm-kernel@lists.infradead.org; Thu, 03 Dec 2026 16:52:21 +0000 Received: by mail-wr1-x436.google.com with SMTP id ffacd0b85a97d-4ac08f4a0b2so50885f8f.3 for ; Thu, 03 Dec 2026 08:52:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=teslabs-com.20260707.gappssmtp.com; s=20260707; t=1796316736; x=1796921536; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=ORCAPboL+W6Tq6kZxpmygJ8zcotRXPG7HNdKml2rqPU=; b=LzmSc6DxCLWw7WBLLh1XxNSdnFVDGpygwPVOYx/R3ZKaJvbxbzyuBRPi7qKyt/QFSf OYrtFeKB7viWwCTvgP6iJaLhTPx9H76fRDeyMYspaH2tBLlNPGxVxJSu6mKPQUidbphs mY870iHWpoXiydxNugo1au5JvtX6c40ZU/iIXElnM5NU6/86AdqaBUNA+v/1apvXpoaR XlyRessn3Xix60KTYlIp7W6uEaHiltdSlF21pB/iw77EUg0xmbjW2vkjlYNJEZwi9Vfx qmRkhx2PqxJ+z5R6qAvk08ReUp9g7BEQcT5We+Jvu84X3R0bktignzmqkaCqJ3LYHFrT tkbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796316736; x=1796921536; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=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pNiVjmMMDH8ikMHPirxnWY5aoMvnY8fqSWjW cxnJ5hSYWN3oC5np77bgLVWSELm0stIJIy4Zw4GcU9v+/np9yXAcL/Kz4jRL6UUmltOZ1QpZ6aC zrjldtOJsPHqwKkFp1zXoydowfVvwBiBHghAtISDViYdiKEbn6hUPcBhbFFNoz6bvrYgaKTNCR+ EsaUL+6uayTwMJQa+4LOPwHLu/y85j6gXMVV0TmzkVz17ZX1O52l+yap3zXOTHsAF/iLgNCRIf+ lPkZ/3H9MxP8= X-Received: by 2002:adf:e006:0:10b0:4a6:8012:19a with SMTP id ffacd0b85a97d-4abb18cb896mr59923913f8f.22.1796316736592; Thu, 03 Dec 2026 08:52:16 -0800 (PST) Received: from localhost.localdomain ([139.47.121.129]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4d17426825csm156826f8f.46.2026.12.03.08.52.15 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 03 Dec 2026 08:52:16 -0800 (PST) From: Gerard Marull-Paretas To: jic23@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, mcoquelin.stm32@gmail.com, alexandre.torgue@foss.st.com Cc: fabrice.gasnier@foss.st.com, dlechner@baylibre.com, nuno.sa@analog.com, andy@kernel.org, linux-iio@vger.kernel.org, devicetree@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org Subject: [PATCH v2] dt-bindings: iio: adc: st,stm32-adc: add temperature sensor calibration cells Date: Thu, 3 Dec 2026 17:52:14 +0100 Message-ID: <20261203165214.54424-1-gerard@teslabs.com> X-Mailer: git-send-email 2.45.2 X-Archived-By: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261203_085219_199667_F7121449 X-CRM114-Status: GOOD ( 12.23 ) X-Spam-Score: 2.2 (++) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" X-Spam-Status: No, score=-16.9 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 The internal temperature sensor of the STM32H7, STM32MP13 and STM32MP15 ADCs is calibrated in the factory at two temperatures, and its calibration data (TS_CAL1 and TS_CAL2) is stored in a read-only area, along with the internal voltage reference calibration (VREFINT_CAL). Only the vrefint calibration can be passed to an ADC today. Allow the two temperature sensor calibration points to be passed as nvmem cells as well, so the ADC the temperature sensor is connected to can convert its readings. No Linux driver reads these cells yet: on the STM32MP1, the dedicated digital temperature sensor is used for thermal protection instead, and the STM32H7 device trees are deprecated. The binding is also used to describe these SoCs outside Linux, though: PebbleOS describes the STM32H747 with it and reads the temperature sensor through the ADC using these cells. Signed-off-by: Gerard Marull-Paretas --- Changes in v2: - Drop the stm32h743.dtsi patch, the STM32H7 device trees being deprecated - Name the SoCs with the calibration rather than the ADC3 connection - Add background on the users of the cells - Link to v1: https://lore.kernel.org/r/20261124202220.23721-1-gerard@teslabs.com .../devicetree/bindings/iio/adc/st,stm32-adc.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Documentation/devicetree/bindings/iio/adc/st,stm32-adc.yaml b/Documentation/devicetree/bindings/iio/adc/st,stm32-adc.yaml index c4c4575d3fa9..9fe41b89982e 100644 --- a/Documentation/devicetree/bindings/iio/adc/st,stm32-adc.yaml +++ b/Documentation/devicetree/bindings/iio/adc/st,stm32-adc.yaml @@ -337,12 +337,22 @@ patternProperties: deprecated: true nvmem-cells: + minItems: 1 items: - description: Phandle to the calibration vrefint data provided by otp + - description: + Temperature sensor calibration data at the first calibration + temperature (TS_CAL1) + - description: + Temperature sensor calibration data at the second calibration + temperature (TS_CAL2) nvmem-cell-names: + minItems: 1 items: - const: vrefint + - const: ts-cal1 + - const: ts-cal2 patternProperties: "^channel@([0-9]|1[0-9])$": base-commit: 8d7fe9885c62fc9a95bf55d9db244d9672a8aadc -- 2.45.2