Message ID | 20221027225020.215149-3-marex@denx.de |
---|---|
State | Superseded |
Headers | show |
Series | None | expand |
diff --git a/arch/arm/boot/dts/stm32mp15xx-dhcom-som.dtsi b/arch/arm/boot/dts/stm32mp15xx-dhcom-som.dtsi index 155843e1402fb..8277837be8a51 100644 --- a/arch/arm/boot/dts/stm32mp15xx-dhcom-som.dtsi +++ b/arch/arm/boot/dts/stm32mp15xx-dhcom-som.dtsi @@ -533,6 +533,17 @@ &sdmmc3 { status = "okay"; }; +&tamp { + #address-cells = <1>; + #size-cells = <1>; + + /* Boot counter */ + nvmem { + compatible = "nvmem-syscon"; + reg = <0x14c 0x4>; + }; +}; + &uart4 { pinctrl-names = "default"; pinctrl-0 = <&uart4_pins_a>; diff --git a/arch/arm/boot/dts/stm32mp15xx-dhcor-som.dtsi b/arch/arm/boot/dts/stm32mp15xx-dhcor-som.dtsi index 134a798ad3f23..42a8d5cdd7024 100644 --- a/arch/arm/boot/dts/stm32mp15xx-dhcor-som.dtsi +++ b/arch/arm/boot/dts/stm32mp15xx-dhcor-som.dtsi @@ -271,3 +271,14 @@ &rng1 { &rtc { status = "okay"; }; + +&tamp { + #address-cells = <1>; + #size-cells = <1>; + + /* Boot counter */ + nvmem { + compatible = "nvmem-syscon"; + reg = <0x14c 0x4>; + }; +};
Add nvmem-syscon subnode to expose TAMP_BKPxR register 19 to user space. This register contains U-Boot boot counter, by exposing it to user space the user space can reset the boot counter. Read access example: " $ hexdump -vC /sys/bus/nvmem/devices/5c00a000.tamp\:nvmem0/nvmem 00000000 0c 00 c4 b0 " Signed-off-by: Marek Vasut <marex@denx.de> --- Cc: Alexandre Torgue <alexandre.torgue@foss.st.com> Cc: Rafał Miłecki <rafal@milecki.pl> Cc: Rob Herring <robh+dt@kernel.org> Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Cc: devicetree@vger.kernel.org Cc: linux-stm32@st-md-mailman.stormreply.com To: linux-arm-kernel@lists.infradead.org --- arch/arm/boot/dts/stm32mp15xx-dhcom-som.dtsi | 11 +++++++++++ arch/arm/boot/dts/stm32mp15xx-dhcor-som.dtsi | 11 +++++++++++ 2 files changed, 22 insertions(+)