Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Gerard Marull-Paretas <gerard@teslabs.com>
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 2/2] ARM: dts: stm32: add the factory calibration data to stm32h743
Date: Tue, 24 Nov 2026 21:22:20 +0100	[thread overview]
Message-ID: <20261124202220.23721-3-gerard@teslabs.com> (raw)
In-Reply-To: <20261124202220.23721-1-gerard@teslabs.com>

The temperature sensor and internal voltage reference calibration data
of the STM32H7 are stored in system memory, at 0x1ff1e820 (TS_CAL1),
0x1ff1e840 (TS_CAL2) and 0x1ff1e860 (VREFINT_CAL).

Describe this area as STM32 factory-programmed data, and pass the
calibration cells to ADC3, which the temperature sensor and VREFINT are
connected to.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
---
 arch/arm/boot/dts/st/stm32h743.dtsi | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/arch/arm/boot/dts/st/stm32h743.dtsi b/arch/arm/boot/dts/st/stm32h743.dtsi
index 2f19cfbc57ad..ecb6aba3b0db 100644
--- a/arch/arm/boot/dts/st/stm32h743.dtsi
+++ b/arch/arm/boot/dts/st/stm32h743.dtsi
@@ -70,6 +70,25 @@ clk_i2s: i2s_ckin {
 	};
 
 	soc {
+		romem: efuse@1ff1e800 {
+			compatible = "st,stm32f4-otp";
+			reg = <0x1ff1e800 0x100>;
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			ts_cal1: calib@20 {
+				reg = <0x20 0x2>;
+			};
+
+			ts_cal2: calib@40 {
+				reg = <0x40 0x2>;
+			};
+
+			vrefint: calib@60 {
+				reg = <0x60 0x2>;
+			};
+		};
+
 		timer5: timer@40000c00 {
 			compatible = "st,stm32-timer";
 			reg = <0x40000c00 0x400>;
@@ -572,6 +591,8 @@ adc3: adc@0 {
 				reg = <0x0>;
 				interrupt-parent = <&adc_3>;
 				interrupts = <0>;
+				nvmem-cells = <&vrefint>, <&ts_cal1>, <&ts_cal2>;
+				nvmem-cell-names = "vrefint", "ts-cal1", "ts-cal2";
 				status = "disabled";
 			};
 		};
-- 
2.45.2



      parent reply	other threads:[~2026-11-24 21:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-24 20:22 [PATCH 0/2] iio: adc: stm32: describe the STM32H7 temperature sensor calibration Gerard Marull-Paretas
2026-11-24 20:22 ` [PATCH 1/2] dt-bindings: iio: adc: st,stm32-adc: add temperature sensor calibration cells Gerard Marull-Paretas
2026-11-24 20:22 ` Gerard Marull-Paretas [this message]

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=20261124202220.23721-3-gerard@teslabs.com \
    --to=gerard@teslabs.com \
    --cc=alexandre.torgue@foss.st.com \
    --cc=andy@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=fabrice.gasnier@foss.st.com \
    --cc=jic23@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=nuno.sa@analog.com \
    --cc=robh@kernel.org \
    /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