linux-kernel.vger.kernel.org archive mirror
 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 v3 1/5] dt-bindings: nvmem: Add bindings for rmem driver
Date: Tue, 12 Jan 2021 15:23:38 +0100	[thread overview]
Message-ID: <20210112142342.7290-2-nsaenzjulienne@suse.de> (raw)
In-Reply-To: <20210112142342.7290-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 v2:
- Run yamllint and fix indentation issues

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..1d85a0a30846
--- /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


  reply	other threads:[~2021-01-12 14:24 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-12 14:23 [PATCH v3 0/5] Expose RPi4's bootloader configuration Nicolas Saenz Julienne
2021-01-12 14:23 ` Nicolas Saenz Julienne [this message]
2021-01-14 20:17   ` [PATCH v3 1/5] dt-bindings: nvmem: Add bindings for rmem driver Rob Herring
2021-01-12 14:23 ` [PATCH v3 2/5] nvmem: Add driver to expose reserved memory as nvmem Nicolas Saenz Julienne
2021-01-12 14:23 ` [PATCH v3 3/5] ARM: dts: bcm2711: Add reserved memory template to hold firmware configuration Nicolas Saenz Julienne
2021-01-12 14:23 ` [PATCH v3 4/5] arm64: defconfig: Enable nvmem's rmem driver Nicolas Saenz Julienne
2021-01-12 14:23 ` [PATCH v3 5/5] ARM: multi_v7_defconfig: " Nicolas Saenz Julienne
2021-01-18 16:50 ` [PATCH v3 0/5] Expose RPi4's bootloader configuration Srinivas Kandagatla
2021-01-25 21:04 ` 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=20210112142342.7290-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).