lkml.org 
[lkml]   [2021]   [Apr]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 1/4] dt-bindings: nvmem: Add bootcount-nvmem
Date
Documents the device tree bindings for `bootcount-nvmem` driver.

Signed-off-by: Nandor Han <nandor.han@vaisala.com>
---
.../bindings/nvmem/bootcount-nvmem.yaml | 72 +++++++++++++++++++
1 file changed, 72 insertions(+)
create mode 100644 Documentation/devicetree/bindings/nvmem/bootcount-nvmem.yaml

diff --git a/Documentation/devicetree/bindings/nvmem/bootcount-nvmem.yaml b/Documentation/devicetree/bindings/nvmem/bootcount-nvmem.yaml
new file mode 100644
index 000000000000..adbcb2db93a5
--- /dev/null
+++ b/Documentation/devicetree/bindings/nvmem/bootcount-nvmem.yaml
@@ -0,0 +1,72 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+# Copyright (c) Vaisala Oyj. All rights reserved.
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/nvmem/bootcount-nvmem.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Bootcount NVMEM bindings
+
+maintainers:
+ - Nandor Han <nandor.han@vaisala.com>
+
+description: |
+ This binding is intendent to describe the hardware location for
+ storing the bootcount value and magic combo.
+
+ The NVMEM cell size should be 2 or 4 bytes.
+
+properties:
+ compatible:
+ enum:
+ - linux,bootcount-nvmem
+
+ nvmem-cells:
+ description: Phandle to reboot mode nvmem data cell.
+ $ref: /schemas/types.yaml#/definitions/phandle
+
+ nvmem-cell-names:
+ description: Name of the NVMEM cell.
+ $ref: /schemas/types.yaml#/definitions/string
+ enum:
+ - bootcount-regs
+
+ linux,bootcount-magic:
+ description: Override default mask value.
+ $ref: /schemas/types.yaml#/definitions/uint32
+
+required:
+ - compatible
+ - nvmem-cells
+ - nvmem-cell-names
+
+additionalProperties: false
+
+examples:
+ # example with 16 bit nvram cell:
+ - |
+ bootcount {
+ compatible = "linux,bootcount-nvmem";
+ nvmem-cells = <&bootcount_regs>;
+ nvmem-cell-names = "bootcount-regs";
+ };
+
+ rtc@68 {
+ bootcount_regs: bootcount_nvmem_regs@e {
+ reg = <0x0e 0x2>;
+ };
+
+ # example with 32 bit nvram cell:
+ - |
+ bootcount {
+ compatible = "linux,bootcount-nvmem";
+ nvmem-cells = <&bootcount_regs>;
+ nvmem-cell-names = "bootcount-regs";
+ };
+
+ rtc@68 {
+ bootcount_regs: bootcount_nvmem_regs@e {
+ reg = <0x0e 0x4>;
+ };
+
+...
--
2.26.3
\
 
 \ /
  Last update: 2021-04-27 10:28    [W:0.170 / U:7.000 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site