public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] dt-bindings: nvmem: add STM32 TAMP NVRAM
@ 2026-01-07 19:45 Dario Binacchi
  2026-01-07 19:45 ` [PATCH 2/2] arm64: dts: st: add TAMP-NVRAM support for STM32MP25 Dario Binacchi
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Dario Binacchi @ 2026-01-07 19:45 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-amarula, Dario Binacchi, Alexandre Torgue, Conor Dooley,
	Krzysztof Kozlowski, Maxime Coquelin, Rob Herring,
	Srinivas Kandagatla, devicetree, linux-arm-kernel, linux-stm32

Add devicetree bindings for TAMP backup registers. These 32-bit
registers are retained in all low-power modes and in VBAT mode. As a
result, they can also be used to store sensitive data because their
content is protected by a tamper detection circuit.

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
---

 .../bindings/nvmem/st,stm32-tamp-nvram.yaml   | 55 +++++++++++++++++++
 1 file changed, 55 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/nvmem/st,stm32-tamp-nvram.yaml

diff --git a/Documentation/devicetree/bindings/nvmem/st,stm32-tamp-nvram.yaml b/Documentation/devicetree/bindings/nvmem/st,stm32-tamp-nvram.yaml
new file mode 100644
index 000000000000..e03469fbe436
--- /dev/null
+++ b/Documentation/devicetree/bindings/nvmem/st,stm32-tamp-nvram.yaml
@@ -0,0 +1,55 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/nvmem/st,stm32-tamp-nvram.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: STMicroelectronics STM32 TAMP's NVRAM
+
+description: |
+  The TAMP peripheral integrates, amongst others, Non Volatile RAM
+  (NVRAM) with 32/128 32-bit backup registers which can be used by
+  software to store information or communicate with a boot loader.
+
+maintainers:
+  - Dario Binacchi <dario.binacchi@amarulasolutions.com>
+
+allOf:
+  - $ref: nvmem.yaml#
+
+properties:
+  compatible:
+    enum:
+      - st,stm32mp15-tamp-nvram
+      - st,stm32mp25-tamp-nvram
+
+  reg:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    nvram: nvram@46010100 {
+        compatible = "st,stm32mp25-tamp-nvram";
+        reg = <0x46010100 0x200>;
+
+        nvmem-layout {
+            compatible = "fixed-layout";
+            #address-cells = <1>;
+            #size-cells = <1>;
+
+            fwu_info: tamp-bkp@c0 {
+                reg = <0xc0 0x4>;
+            };
+
+            boot_mode: tamp-bkp@180 {
+                reg = <0x180 0x4>;
+            };
+        };
+    };
+...
-- 
2.43.0

base-commit: f0b9d8eb98dfee8d00419aa07543bdc2c1a44fb1
branch: stm32-tamp-nvram

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/2] arm64: dts: st: add TAMP-NVRAM support for STM32MP25
  2026-01-07 19:45 [PATCH 1/2] dt-bindings: nvmem: add STM32 TAMP NVRAM Dario Binacchi
@ 2026-01-07 19:45 ` Dario Binacchi
  2026-01-09 10:40   ` [Linux-stm32] " Patrice CHOTARD
  2026-01-08 16:13 ` [PATCH 1/2] dt-bindings: nvmem: add STM32 TAMP NVRAM Rob Herring
  2026-01-15 14:54 ` Rob Herring
  2 siblings, 1 reply; 6+ messages in thread
From: Dario Binacchi @ 2026-01-07 19:45 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-amarula, Dario Binacchi, Alexandre Torgue, Conor Dooley,
	Krzysztof Kozlowski, Maxime Coquelin, Rob Herring, devicetree,
	linux-arm-kernel, linux-stm32

Add the TAMP node along with its NVRAM child node and define the
fixed-layout for fwu_info and boot_mode registers.

The TAMP (Tamper and backup registers) block is a system controller that
provides access to backup registers as NVMEM storage that persists across
reboots.

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>

---

 arch/arm64/boot/dts/st/stm32mp251.dtsi | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/arch/arm64/boot/dts/st/stm32mp251.dtsi b/arch/arm64/boot/dts/st/stm32mp251.dtsi
index a8e6e0f77b83..c7839e732f31 100644
--- a/arch/arm64/boot/dts/st/stm32mp251.dtsi
+++ b/arch/arm64/boot/dts/st/stm32mp251.dtsi
@@ -2084,6 +2084,32 @@ rtc: rtc@46000000 {
 			status = "disabled";
 		};
 
+		tamp: tamp@46010000 {
+			compatible = "st,stm32-tamp", "syscon", "simple-mfd";
+			#address-cells = <1>;
+			#size-cells = <1>;
+			reg = <0x46010000 0x400>;
+			ranges;
+
+			nvram: nvram@46010100 {
+				compatible = "st,stm32mp25-tamp-nvram";
+				reg = <0x46010100 0x200>;
+				nvmem-layout {
+					compatible = "fixed-layout";
+					#address-cells = <1>;
+					#size-cells = <1>;
+
+					fwu_info: tamp-bkp@c0 {
+						reg = <0xc0 0x4>;
+					};
+
+					boot_mode: tamp-bkp@180 {
+						reg = <0x180 0x4>;
+					};
+				};
+			};
+		};
+
 		pinctrl_z: pinctrl@46200000 {
 			#address-cells = <1>;
 			#size-cells = <1>;
-- 
2.43.0

base-commit: f0b9d8eb98dfee8d00419aa07543bdc2c1a44fb1
branch: stm32-tamp-nvram

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] dt-bindings: nvmem: add STM32 TAMP NVRAM
  2026-01-07 19:45 [PATCH 1/2] dt-bindings: nvmem: add STM32 TAMP NVRAM Dario Binacchi
  2026-01-07 19:45 ` [PATCH 2/2] arm64: dts: st: add TAMP-NVRAM support for STM32MP25 Dario Binacchi
@ 2026-01-08 16:13 ` Rob Herring
  2026-01-15 14:54 ` Rob Herring
  2 siblings, 0 replies; 6+ messages in thread
From: Rob Herring @ 2026-01-08 16:13 UTC (permalink / raw)
  To: Dario Binacchi
  Cc: linux-amarula, Maxime Coquelin, linux-arm-kernel,
	Srinivas Kandagatla, Conor Dooley, Krzysztof Kozlowski,
	linux-kernel, Alexandre Torgue, devicetree, linux-stm32


On Wed, 07 Jan 2026 20:45:32 +0100, Dario Binacchi wrote:
> Add devicetree bindings for TAMP backup registers. These 32-bit
> registers are retained in all low-power modes and in VBAT mode. As a
> result, they can also be used to store sensitive data because their
> content is protected by a tamper detection circuit.
> 
> Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
> ---
> 
>  .../bindings/nvmem/st,stm32-tamp-nvram.yaml   | 55 +++++++++++++++++++
>  1 file changed, 55 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/nvmem/st,stm32-tamp-nvram.yaml
> 


My bot found new DTB warnings on the .dts files added or changed in this
series.

Some warnings may be from an existing SoC .dtsi. Or perhaps the warnings
are fixed by another series. Ultimately, it is up to the platform
maintainer whether these warnings are acceptable or not. No need to reply
unless the platform maintainer has comments.

If you already ran DT checks and didn't see these error(s), then
make sure dt-schema is up to date:

  pip3 install dtschema --upgrade


This patch series was applied (using b4) to base:
 Base: f0b9d8eb98dfee8d00419aa07543bdc2c1a44fb1 (use --merge-base to override)

If this is not the correct base, please add 'base-commit' tag
(or use b4 which does this automatically)

New warnings running 'make CHECK_DTBS=y for arch/arm64/boot/dts/st/' for 20260107194541.1843999-1-dario.binacchi@amarulasolutions.com:

arch/arm64/boot/dts/st/stm32mp257f-dk.dtb: tamp@46010000 (st,stm32-tamp): '#address-cells', '#size-cells', 'nvram@46010100', 'ranges' do not match any of the regexes: '^pinctrl-[0-9]+$'
	from schema $id: http://devicetree.org/schemas/arm/stm32/st,stm32-syscon.yaml
arch/arm64/boot/dts/st/stm32mp257f-ev1.dtb: tamp@46010000 (st,stm32-tamp): '#address-cells', '#size-cells', 'nvram@46010100', 'ranges' do not match any of the regexes: '^pinctrl-[0-9]+$'
	from schema $id: http://devicetree.org/schemas/arm/stm32/st,stm32-syscon.yaml






^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Linux-stm32] [PATCH 2/2] arm64: dts: st: add TAMP-NVRAM support for STM32MP25
  2026-01-07 19:45 ` [PATCH 2/2] arm64: dts: st: add TAMP-NVRAM support for STM32MP25 Dario Binacchi
@ 2026-01-09 10:40   ` Patrice CHOTARD
  2026-01-11 15:20     ` Dario Binacchi
  0 siblings, 1 reply; 6+ messages in thread
From: Patrice CHOTARD @ 2026-01-09 10:40 UTC (permalink / raw)
  To: Dario Binacchi, linux-kernel
  Cc: Rob Herring, Conor Dooley, devicetree, Maxime Coquelin,
	Krzysztof Kozlowski, linux-amarula, linux-stm32, linux-arm-kernel



On 1/7/26 20:45, Dario Binacchi wrote:
> Add the TAMP node along with its NVRAM child node and define the
> fixed-layout for fwu_info and boot_mode registers.
> 
> The TAMP (Tamper and backup registers) block is a system controller that
> provides access to backup registers as NVMEM storage that persists across
> reboots.
> 
> Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
> 
> ---
> 
>  arch/arm64/boot/dts/st/stm32mp251.dtsi | 26 ++++++++++++++++++++++++++
>  1 file changed, 26 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/st/stm32mp251.dtsi b/arch/arm64/boot/dts/st/stm32mp251.dtsi
> index a8e6e0f77b83..c7839e732f31 100644
> --- a/arch/arm64/boot/dts/st/stm32mp251.dtsi
> +++ b/arch/arm64/boot/dts/st/stm32mp251.dtsi
> @@ -2084,6 +2084,32 @@ rtc: rtc@46000000 {
>  			status = "disabled";
>  		};
>  
> +		tamp: tamp@46010000 {
> +			compatible = "st,stm32-tamp", "syscon", "simple-mfd";
> +			#address-cells = <1>;
> +			#size-cells = <1>;
> +			reg = <0x46010000 0x400>;
> +			ranges;
> +
> +			nvram: nvram@46010100 {
> +				compatible = "st,stm32mp25-tamp-nvram";
> +				reg = <0x46010100 0x200>;
> +				nvmem-layout {
> +					compatible = "fixed-layout";
> +					#address-cells = <1>;
> +					#size-cells = <1>;
> +
> +					fwu_info: tamp-bkp@c0 {
> +						reg = <0xc0 0x4>;
> +					};
> +
> +					boot_mode: tamp-bkp@180 {
> +						reg = <0x180 0x4>;
> +					};
> +				};
> +			};
> +		};
> +
>  		pinctrl_z: pinctrl@46200000 {
>  			#address-cells = <1>;
>  			#size-cells = <1>;
Hi Dario

At STMicroelectronics we intend to upstream tamp-vram driver for STM32MP series.
If you don't see any objection, we prefer to manage it in our side.

Thanks
Patrice

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Linux-stm32] [PATCH 2/2] arm64: dts: st: add TAMP-NVRAM support for STM32MP25
  2026-01-09 10:40   ` [Linux-stm32] " Patrice CHOTARD
@ 2026-01-11 15:20     ` Dario Binacchi
  0 siblings, 0 replies; 6+ messages in thread
From: Dario Binacchi @ 2026-01-11 15:20 UTC (permalink / raw)
  To: Patrice CHOTARD
  Cc: linux-kernel, Rob Herring, Conor Dooley, devicetree,
	Maxime Coquelin, Krzysztof Kozlowski, linux-amarula, linux-stm32,
	linux-arm-kernel

Hello Patrice,

On Fri, Jan 9, 2026 at 11:40 AM Patrice CHOTARD
<patrice.chotard@foss.st.com> wrote:
>
>
>
> On 1/7/26 20:45, Dario Binacchi wrote:
> > Add the TAMP node along with its NVRAM child node and define the
> > fixed-layout for fwu_info and boot_mode registers.
> >
> > The TAMP (Tamper and backup registers) block is a system controller that
> > provides access to backup registers as NVMEM storage that persists across
> > reboots.
> >
> > Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
> >
> > ---
> >
> >  arch/arm64/boot/dts/st/stm32mp251.dtsi | 26 ++++++++++++++++++++++++++
> >  1 file changed, 26 insertions(+)
> >
> > diff --git a/arch/arm64/boot/dts/st/stm32mp251.dtsi b/arch/arm64/boot/dts/st/stm32mp251.dtsi
> > index a8e6e0f77b83..c7839e732f31 100644
> > --- a/arch/arm64/boot/dts/st/stm32mp251.dtsi
> > +++ b/arch/arm64/boot/dts/st/stm32mp251.dtsi
> > @@ -2084,6 +2084,32 @@ rtc: rtc@46000000 {
> >                       status = "disabled";
> >               };
> >
> > +             tamp: tamp@46010000 {
> > +                     compatible = "st,stm32-tamp", "syscon", "simple-mfd";
> > +                     #address-cells = <1>;
> > +                     #size-cells = <1>;
> > +                     reg = <0x46010000 0x400>;
> > +                     ranges;
> > +
> > +                     nvram: nvram@46010100 {
> > +                             compatible = "st,stm32mp25-tamp-nvram";
> > +                             reg = <0x46010100 0x200>;
> > +                             nvmem-layout {
> > +                                     compatible = "fixed-layout";
> > +                                     #address-cells = <1>;
> > +                                     #size-cells = <1>;
> > +
> > +                                     fwu_info: tamp-bkp@c0 {
> > +                                             reg = <0xc0 0x4>;
> > +                                     };
> > +
> > +                                     boot_mode: tamp-bkp@180 {
> > +                                             reg = <0x180 0x4>;
> > +                                     };
> > +                             };
> > +                     };
> > +             };
> > +
> >               pinctrl_z: pinctrl@46200000 {
> >                       #address-cells = <1>;
> >                       #size-cells = <1>;
> Hi Dario
>
> At STMicroelectronics we intend to upstream tamp-vram driver for STM32MP series.
> If you don't see any objection, we prefer to manage it in our side.

Ok, no problems.

Thanks and regards,
Dario
>
> Thanks
> Patrice



-- 

Dario Binacchi

Senior Embedded Linux Developer

dario.binacchi@amarulasolutions.com

__________________________________


Amarula Solutions SRL

Via Le Canevare 30, 31100 Treviso, Veneto, IT

T. +39 042 243 5310
info@amarulasolutions.com

www.amarulasolutions.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/2] dt-bindings: nvmem: add STM32 TAMP NVRAM
  2026-01-07 19:45 [PATCH 1/2] dt-bindings: nvmem: add STM32 TAMP NVRAM Dario Binacchi
  2026-01-07 19:45 ` [PATCH 2/2] arm64: dts: st: add TAMP-NVRAM support for STM32MP25 Dario Binacchi
  2026-01-08 16:13 ` [PATCH 1/2] dt-bindings: nvmem: add STM32 TAMP NVRAM Rob Herring
@ 2026-01-15 14:54 ` Rob Herring
  2 siblings, 0 replies; 6+ messages in thread
From: Rob Herring @ 2026-01-15 14:54 UTC (permalink / raw)
  To: Dario Binacchi
  Cc: linux-kernel, linux-amarula, Alexandre Torgue, Conor Dooley,
	Krzysztof Kozlowski, Maxime Coquelin, Srinivas Kandagatla,
	devicetree, linux-arm-kernel, linux-stm32

On Wed, Jan 07, 2026 at 08:45:32PM +0100, Dario Binacchi wrote:
> Add devicetree bindings for TAMP backup registers. These 32-bit
> registers are retained in all low-power modes and in VBAT mode. As a
> result, they can also be used to store sensitive data because their
> content is protected by a tamper detection circuit.
> 
> Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
> ---
> 
>  .../bindings/nvmem/st,stm32-tamp-nvram.yaml   | 55 +++++++++++++++++++
>  1 file changed, 55 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/nvmem/st,stm32-tamp-nvram.yaml
> 
> diff --git a/Documentation/devicetree/bindings/nvmem/st,stm32-tamp-nvram.yaml b/Documentation/devicetree/bindings/nvmem/st,stm32-tamp-nvram.yaml
> new file mode 100644
> index 000000000000..e03469fbe436
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/nvmem/st,stm32-tamp-nvram.yaml
> @@ -0,0 +1,55 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/nvmem/st,stm32-tamp-nvram.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: STMicroelectronics STM32 TAMP's NVRAM
> +
> +description: |

Don't need '|' if no formatting.

> +  The TAMP peripheral integrates, amongst others, Non Volatile RAM

What others? Are you saying this binding is incomplete?

> +  (NVRAM) with 32/128 32-bit backup registers which can be used by
> +  software to store information or communicate with a boot loader.

Wrap lines at 80 char.

> +
> +maintainers:
> +  - Dario Binacchi <dario.binacchi@amarulasolutions.com>
> +
> +allOf:
> +  - $ref: nvmem.yaml#
> +
> +properties:
> +  compatible:
> +    enum:
> +      - st,stm32mp15-tamp-nvram
> +      - st,stm32mp25-tamp-nvram
> +
> +  reg:
> +    maxItems: 1
> +
> +required:
> +  - compatible
> +  - reg
> +
> +unevaluatedProperties: false
> +
> +examples:
> +  - |
> +    nvram: nvram@46010100 {
> +        compatible = "st,stm32mp25-tamp-nvram";
> +        reg = <0x46010100 0x200>;
> +
> +        nvmem-layout {
> +            compatible = "fixed-layout";
> +            #address-cells = <1>;
> +            #size-cells = <1>;
> +
> +            fwu_info: tamp-bkp@c0 {
> +                reg = <0xc0 0x4>;
> +            };
> +
> +            boot_mode: tamp-bkp@180 {
> +                reg = <0x180 0x4>;
> +            };
> +        };
> +    };
> +...
> -- 
> 2.43.0
> 
> base-commit: f0b9d8eb98dfee8d00419aa07543bdc2c1a44fb1
> branch: stm32-tamp-nvram

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-01-15 14:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-07 19:45 [PATCH 1/2] dt-bindings: nvmem: add STM32 TAMP NVRAM Dario Binacchi
2026-01-07 19:45 ` [PATCH 2/2] arm64: dts: st: add TAMP-NVRAM support for STM32MP25 Dario Binacchi
2026-01-09 10:40   ` [Linux-stm32] " Patrice CHOTARD
2026-01-11 15:20     ` Dario Binacchi
2026-01-08 16:13 ` [PATCH 1/2] dt-bindings: nvmem: add STM32 TAMP NVRAM Rob Herring
2026-01-15 14:54 ` Rob Herring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox