lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 10 Mar 2023 11:53:30 +0100
From:   Rafał Miłecki <zajec5@...il.com>
To:     Rob Herring <robh+dt@...nel.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>
Cc:     Srinivas Kandagatla <srinivas.kandagatla@...aro.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Miquel Raynal <miquel.raynal@...tlin.com>,
        Michael Walle <michael@...le.cc>, devicetree@...r.kernel.org,
        linux-mtd@...ts.infradead.org, linux-kernel@...r.kernel.org,
        Rafał Miłecki <rafal@...ecki.pl>
Subject: [PATCH] dt-bindings: nvmem: allow MTD to be explicitly an NVMEM provider

From: Rafał Miłecki <rafal@...ecki.pl>

There are a lot of devices with NVMEM content stored in MTD devices in
relevant partitions. Add a DT binding for marking such partitions.

Note: Linux already treats every MTD partition as NVMEM provider so in
general it doesn't need to care about this binding. It's meant just to
make DT clearer in describing hardware.

Signed-off-by: Rafał Miłecki <rafal@...ecki.pl>
---
As explained in commit body this isn't really needed for Linux. I
thought it'd be a small nice addition for writing clear DTS files.
---
 .../devicetree/bindings/nvmem/mtd.yaml        | 52 +++++++++++++++++++
 1 file changed, 52 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/nvmem/mtd.yaml

diff --git a/Documentation/devicetree/bindings/nvmem/mtd.yaml b/Documentation/devicetree/bindings/nvmem/mtd.yaml
new file mode 100644
index 000000000000..7435b2803cf9
--- /dev/null
+++ b/Documentation/devicetree/bindings/nvmem/mtd.yaml
@@ -0,0 +1,52 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/nvmem/mtd.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: MTD access based NVMEM
+
+description: |
+  MTD partitions can be NVMEM providers. This binding allows explicitly marking
+  such partitions.
+
+  The exact way of handling MTD partition content (NVMEM cells) should be
+  described using a proper NVMEM layout.
+
+maintainers:
+  - Rafał Miłecki <rafal@...ecki.pl>
+
+allOf:
+  - $ref: nvmem.yaml#
+  - $ref: /schemas/mtd/partitions/partition.yaml#
+
+properties:
+  compatible:
+    const: mtd-nvmem
+
+  reg:
+    maxItems: 1
+
+required:
+  - reg
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    partitions {
+        compatible = "fixed-partitions";
+        #address-cells = <1>;
+        #size-cells = <1>;
+
+        partition@0 {
+            compatible = "mtd-nvmem";
+            reg = <0x0 0x40000>;
+            label = "device-data";
+
+            nvmem-layout {
+                /* Just a dummy example: Kontron can be found on OTP actually */
+                compatible = "kontron,sl28-vpd";
+            };
+        };
+    };
-- 
2.34.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ