From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.221.52 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796316739; b=Oq0huGMj7z9T8S/W//MOsNUebVAbhngbGOeq+1+LhiFb6LBkzvCczq9AohWG025RcnzP fuI1Z4t1SmJUP1VGb8b6BjqmiGrmLdtkNlpU8TK9rqz+sa16v2wZb9N2nTqFvMWdBU2sx /NwlfXE3YPXFcpFGGYcbESBlDgHNdyW3+b6H4VGXtK6f7yspa3aLlt699b+tWJF9m2N3c CR2sjufAr+10Azdabp8Ik6zvysfe+hAs3FLmJh7fxb0VMl3VwvRwfyiQdLXH3/LAiq9qZ t88qJ7QNQPqjBT3Xnh+gqZ8JaAeL3nRlF1q8j9W1FvHRvdRRXERIR62y651kW6WKYnw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796316739; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: From:To:Cc:Subject:Date:Message-ID:X-Mailer:MIME-Version: Content-Transfer-Encoding; bh=ORCAPboL+W6Tq6kZxpmygJ8zcotRXPG7HNdKml2rqPU=; b=iCchwwg1olUSX0VHdO7hHOvFg8WRR6QpIbyuJ36Psn3+02wCt6PhdcZceaSsMVcRq3ar l/t2wBDu7hqpdvc+VrBftDn49snKdvPvCkVy6PzVz8x7D/+jLedXZ1KUx7AskxN8eFuta x4kngqQGZ9sFYo1B8ntUsl+zb9tfZG5xMYwnu401GwkDAYuhtdPDzP89VDQJvFxCwA74C JrZVaDYwOAnpedf4MBvjZviy59U2RyNLyRKqrlPWGcpZmGsjiJmHsXnSm2QxXrsYhNsi9 4kQTaikn2qeqVAd1cNhJz8vDdmdOYyHRYTwm0vSXMOEzdKgIYeS8CW0E+wxQPX4cr0w== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none header.from=teslabs.com; spf=fail smtp.mailfrom=teslabs.com; dkim=pass header.d=teslabs-com.20260707.gappssmtp.com header.i=@teslabs-com.20260707.gappssmtp.com header.a=rsa-sha256 header.s=20260707 header.b=KGPff+hC; arc=none smtp.remote-ip=209.85.221.52 Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.52]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 354D4606A322 for ; Thu, 3 Dec 2026 16:52:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 354D4606A322 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=teslabs.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=teslabs.com Authentication-Results: smtp.subspace.kernel.org; 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=KGPff+hC Received: by mail-wr1-f52.google.com with SMTP id ffacd0b85a97d-4ac08f4a0b2so50886f8f.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=vger.kernel.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=KGPff+hCSsQbUHHcHVsm7qLUQ6MkSEevPFrXsJ1tKAkt5erEb5le+/Btxp7bLCeGOU av9iWmjrtekSHevQ5mbuvc1xl9Hw4VriGrj8X3P943dqMyWtz9ajOrTjGwSDyQib6hW1 13/1EWcWpTDmD1J9MB+mLE7K5yrrnPn+Ue1tRRss9+N7pLXXpoTEkStFRLozy90RYZDE 3I8Tfvu7D+YElZblJLoFm32nPpnMolYcUcOrfqlFFoPm7Rx5anF6uy0QaVuu1fhZg7IX D4N3kc0mq+C6Oa9wQemz/F1TXYT7c67vgVmILsKm3v2oE/GSI9bzmubfzTAS6O6KwNQh 1Utg== 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=ORCAPboL+W6Tq6kZxpmygJ8zcotRXPG7HNdKml2rqPU=; b=LN+vL4g1ncgShXNjajYqPruuwgI99N59ThAi5gLrcqkGr4z7qBO/Chs9TPVQhFVzhn jKibb6KjLf8FC0Za30ZOpvZ3foSOszk1QuYe7meGv0sdawGHhhKqJPCGftUAjQPZLjmC WLhiHwtxn8tK7Oth2Axgiz/VA42yYglW4Wd70PPjPo7eWGa3RKl0czbvdsTz3GNf+x1J ZAQ+MpnzIrv1wCyxXBt4+tdNAsdOTFj9N00gTvKE38C2wHHK9zsiXarPgRz0pToZrR4d z8PJSlSnVloQyjli4yaHF8ncDXYClmO59bS6ezhOFxV7n5HnxAkmM6Q2lpUWxX9/+4Xb WkdQ== X-Forwarded-Encrypted: i=1; AL+hErEkt1hiQIZ+n6jnizvuKJp1mxl2Cx7Hm8EsXqdh1kPJelkauHkks2bFirH2pFWJPLbLKkJKKRskFqur@vger.kernel.org X-Gm-Message-State: APuU4Z90e55BjdgjIIYloE9tkINVi3ZCAiAr4/468ZbF71uxKJM3qTxm HLii2TiEZkXLzGsXz1yBz37q+YRSQlhsdK9QFtM6wkoXPISMUC5QQT/Sv7mLt9xuRO8= X-Gm-Gg: AZFdTZfPhrXjbeIkS0y12yuqGUnMI3HkvxHgLxx/zmzGKxm1iFM/x345ANdmbYnEzpv sCf/NfX3Cy3VrnQTBj2XNB6tNcdHxGc3wFCtFwjrGlzxUw6kHlNSTsTQN0kvizSNAZBFVhvvhC7 kNzriDGbl+EHg0J6dqrSHZU6ozjykG4EWqGkZGZOkN/P5ORVTqmzjhcZdxIRR3XKx/nVmkS+/f8 hajc8jhEEIEuQIPkhVYwq7dTalZBUPjlNaAQu740Q7mb130wdoHhrUQbiastD2C/IFwrHCHJag6 c8Ke36z7EPZ5aT4+oWtUBRZHZ5RENmUUBi0AGZm6PSKV1lGzjUAvc8uF7k9EL1bN40VLKUNe1CM TsdtTjSKbQkXTe21/EI2kGgJ3Rcj3RCwxEq0qfQ+aNCQXVOcCwo59PAg0nFqO1Da04kZvFr7YTL tJHvuKFSXqFUDin4P6aFM7p5XLn2uKfYonAPNT+vTCslwVBFq8RcgcPrPMeNN9XYukXGgWBzjd/ Yql4gFdvU/7rD1fHe/T0sPnK6nOucQH8GTroGYusCCl51qo8FVVkSdNb4rWyTa1hs/Xw1OxK3rK KgEcClAzf+y37bOrQLmT1IhmpdHadWnN7zeqZXDvzGUSTWqS5b+0IRBdLqU5wOjyANBFwx7cN5a M3XgXdL6OwvQ= 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-Mailing-List: devicetree@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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