All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
To: srinivas.kandagatla@linaro.org, linux-kernel@vger.kernel.org,
	Saenz Julienne <nsaenzjulienne@suse.de>
Cc: linux-arm-kernel@lists.infradead.org, linux@armlinux.org.uk,
	catalin.marinas@arm.com, will@kernel.org,
	devicetree@vger.kernel.org, linux-rpi-kernel@lists.infradead.org,
	robh+dt@kernel.org, bcm-kernel-feedback-list@broadcom.com,
	tim.gover@raspberrypi.com, phil@raspberrypi.com
Subject: [PATCH v2 1/5] dt-bindings: nvmem: Add bindings for rmem driver
Date: Fri, 18 Dec 2020 16:43:16 +0100	[thread overview]
Message-ID: <20201218154320.28368-2-nsaenzjulienne@suse.de> (raw)
In-Reply-To: <20201218154320.28368-1-nsaenzjulienne@suse.de>

Firmware/co-processors might use reserved memory areas in order to pass
data stemming from an nvmem device otherwise non accessible to Linux.
For example an EEPROM memory only physically accessible to firmware, or
data only accessible early at boot time.

Introduce the dt-bindings to nvmem's rmem.

Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>

---

Changes since v1:
 - Update schema to new driver design

 .../devicetree/bindings/nvmem/rmem.yaml       | 49 +++++++++++++++++++
 1 file changed, 49 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/nvmem/rmem.yaml

diff --git a/Documentation/devicetree/bindings/nvmem/rmem.yaml b/Documentation/devicetree/bindings/nvmem/rmem.yaml
new file mode 100644
index 000000000000..29b53871aa02
--- /dev/null
+++ b/Documentation/devicetree/bindings/nvmem/rmem.yaml
@@ -0,0 +1,49 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/nvmem/rmem.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Reserved Memory Based nvmem Device
+
+maintainers:
+  - Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
+
+allOf:
+  - $ref: "nvmem.yaml#"
+
+properties:
+  compatible:
+    items:
+      - enum:
+        - raspberrypi,bootloader-config
+      - const: nvmem-rmem
+
+  no-map:
+    $ref: /schemas/types.yaml#/definitions/flag
+    description:
+      Avoid creating a virtual mapping of the region as part of the OS'
+      standard mapping of system memory.
+
+required:
+  - compatible
+  - no-map
+
+unevaluatedProperties: false
+
+examples:
+  - |
+        reserved-memory {
+                #address-cells = <1>;
+                #size-cells = <1>;
+
+                blconfig: nvram@10000000 {
+                        compatible = "raspberrypi,bootloader-config", "nvmem-rmem";
+                        #address-cells = <1>;
+                        #size-cells = <1>;
+                        reg = <0x10000000 0x1000>;
+                        no-map;
+                };
+        };
+
+...
-- 
2.29.2


WARNING: multiple messages have this Message-ID (diff)
From: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
To: srinivas.kandagatla@linaro.org, linux-kernel@vger.kernel.org,
	Saenz Julienne <nsaenzjulienne@suse.de>
Cc: devicetree@vger.kernel.org, tim.gover@raspberrypi.com,
	catalin.marinas@arm.com, linux@armlinux.org.uk,
	robh+dt@kernel.org, bcm-kernel-feedback-list@broadcom.com,
	linux-rpi-kernel@lists.infradead.org, will@kernel.org,
	phil@raspberrypi.com, linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 1/5] dt-bindings: nvmem: Add bindings for rmem driver
Date: Fri, 18 Dec 2020 16:43:16 +0100	[thread overview]
Message-ID: <20201218154320.28368-2-nsaenzjulienne@suse.de> (raw)
In-Reply-To: <20201218154320.28368-1-nsaenzjulienne@suse.de>

Firmware/co-processors might use reserved memory areas in order to pass
data stemming from an nvmem device otherwise non accessible to Linux.
For example an EEPROM memory only physically accessible to firmware, or
data only accessible early at boot time.

Introduce the dt-bindings to nvmem's rmem.

Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>

---

Changes since v1:
 - Update schema to new driver design

 .../devicetree/bindings/nvmem/rmem.yaml       | 49 +++++++++++++++++++
 1 file changed, 49 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/nvmem/rmem.yaml

diff --git a/Documentation/devicetree/bindings/nvmem/rmem.yaml b/Documentation/devicetree/bindings/nvmem/rmem.yaml
new file mode 100644
index 000000000000..29b53871aa02
--- /dev/null
+++ b/Documentation/devicetree/bindings/nvmem/rmem.yaml
@@ -0,0 +1,49 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/nvmem/rmem.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Reserved Memory Based nvmem Device
+
+maintainers:
+  - Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
+
+allOf:
+  - $ref: "nvmem.yaml#"
+
+properties:
+  compatible:
+    items:
+      - enum:
+        - raspberrypi,bootloader-config
+      - const: nvmem-rmem
+
+  no-map:
+    $ref: /schemas/types.yaml#/definitions/flag
+    description:
+      Avoid creating a virtual mapping of the region as part of the OS'
+      standard mapping of system memory.
+
+required:
+  - compatible
+  - no-map
+
+unevaluatedProperties: false
+
+examples:
+  - |
+        reserved-memory {
+                #address-cells = <1>;
+                #size-cells = <1>;
+
+                blconfig: nvram@10000000 {
+                        compatible = "raspberrypi,bootloader-config", "nvmem-rmem";
+                        #address-cells = <1>;
+                        #size-cells = <1>;
+                        reg = <0x10000000 0x1000>;
+                        no-map;
+                };
+        };
+
+...
-- 
2.29.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2020-12-18 15:44 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-18 15:43 [PATCH v2 0/5] Expose RPi4's bootloader configuration Nicolas Saenz Julienne
2020-12-18 15:43 ` Nicolas Saenz Julienne
2020-12-18 15:43 ` Nicolas Saenz Julienne [this message]
2020-12-18 15:43   ` [PATCH v2 1/5] dt-bindings: nvmem: Add bindings for rmem driver Nicolas Saenz Julienne
2020-12-21 16:10   ` Rob Herring
2020-12-21 16:10     ` Rob Herring
2020-12-18 15:43 ` [PATCH v2 2/5] nvmem: Add driver to expose reserved memory as nvmem Nicolas Saenz Julienne
2020-12-18 15:43   ` Nicolas Saenz Julienne
2021-01-03 16:16   ` Rob Herring
2021-01-03 16:16     ` Rob Herring
2020-12-18 15:43 ` [PATCH v2 3/5] ARM: dts: bcm2711: Add reserved memory template to hold firmware configuration Nicolas Saenz Julienne
2020-12-18 15:43   ` Nicolas Saenz Julienne
2020-12-18 15:43 ` [PATCH v2 4/5] arm64: defconfig: Enable nvmem's rmem driver Nicolas Saenz Julienne
2020-12-18 15:43   ` Nicolas Saenz Julienne
2020-12-18 15:43 ` [PATCH v2 5/5] ARM: multi_v7_defconfig: " Nicolas Saenz Julienne
2020-12-18 15:43   ` Nicolas Saenz Julienne

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201218154320.28368-2-nsaenzjulienne@suse.de \
    --to=nsaenzjulienne@suse.de \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=catalin.marinas@arm.com \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rpi-kernel@lists.infradead.org \
    --cc=linux@armlinux.org.uk \
    --cc=phil@raspberrypi.com \
    --cc=robh+dt@kernel.org \
    --cc=srinivas.kandagatla@linaro.org \
    --cc=tim.gover@raspberrypi.com \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.