[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <72d57494594fe9c1d1c226f54be6ddf59764cd56.1619704986.git.nandor.han@vaisala.com>
Date: Thu, 29 Apr 2021 17:07:22 +0300
From: Nandor Han <nandor.han@...sala.com>
To: srinivas.kandagatla@...aro.org, robh+dt@...nel.org,
linux-kernel@...r.kernel.org, devicetree@...r.kernel.org
Cc: Nandor Han <nandor.han@...sala.com>
Subject: [PATCH v3 1/4] dt-bindings: nvmem: Add bootcount-nvmem
Documents the device tree bindings for `bootcount-nvmem` driver.
Signed-off-by: Nandor Han <nandor.han@...sala.com>
---
.../bindings/nvmem/bootcount-nvmem.yaml | 74 +++++++++++++++++++
1 file changed, 74 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..d17406449c6d
--- /dev/null
+++ b/Documentation/devicetree/bindings/nvmem/bootcount-nvmem.yaml
@@ -0,0 +1,74 @@
+# 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@...sala.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.
+
+allOf:
+ - $ref: "nvmem-consumer.yaml#"
+
+properties:
+ compatible:
+ enum:
+ - linux,bootcount-nvmem
+
+ nvmem-cells:
+ description: Phandle to reboot mode nvmem data cell.
+ $ref: /schemas/types.yaml#/definitions/phandle-array
+
+ nvmem-cell-names:
+ description: Name of the NVMEM cell.
+ $ref: /schemas/types.yaml#/definitions/string-array
+ enum:
+ - bootcount-regs
+
+ linux,bootcount-magic:
+ description: Override default mask value.
+ $ref: /schemas/types.yaml#/definitions/uint32
+
+dependencies:
+ nvmem-cell-names: [ nvmem-cells ]
+
+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: rtc@68 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ reg = <0x68 0x10>;
+
+ bootcount_regs: bootcount_nvmem_regs@e {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ reg = <0x0e 0x2>;
+ };
+ };
+
+...
--
2.26.3
Powered by blists - more mailing lists