devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Rafał Miłecki" <zajec5@gmail.com>
To: Miquel Raynal <miquel.raynal@bootlin.com>,
	Richard Weinberger <richard@nod.at>,
	Vignesh Raghavendra <vigneshr@ti.com>,
	Rob Herring <robh+dt@kernel.org>,
	Ansuel Smith <ansuelsmth@gmail.com>
Cc: linux-mtd@lists.infradead.org, devicetree@vger.kernel.org,
	"Rafał Miłecki" <rafal@milecki.pl>
Subject: [PATCH RFC] dt-bindings: mtd: allow NVMEM cells in BCM4908 partitions
Date: Mon, 29 Mar 2021 17:07:23 +0200	[thread overview]
Message-ID: <20210329150723.26584-1-zajec5@gmail.com> (raw)

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

Every MTD partition can be NVMEM provider now. It's not handled by the
shared partition.yaml so add proper "compatible" to the BCM4908.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
---
Ideally I'd like to have:
1. partition.yaml allowing "nvmem-cells" by using nvmem-cells.yaml
2. brcm,bcm4908-partitions.yaml using partition.yaml and extending the
   compatible list by "brcm,bcm4908-firmware"

I don't know if such a solution is possible to implement using YAML?

Proposed solution (RFC) isn't a really clean one:
1. It duplicates "nvmem-cells" which is already in the nvmem-cells.yaml
2. Generic "nvmem-cells" should be part of the partition.yaml

Rob? Help? :)
---
 .../bindings/mtd/partitions/brcm,bcm4908-partitions.yaml      | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/mtd/partitions/brcm,bcm4908-partitions.yaml b/Documentation/devicetree/bindings/mtd/partitions/brcm,bcm4908-partitions.yaml
index 7b113e5e3421..28aa3bdd1103 100644
--- a/Documentation/devicetree/bindings/mtd/partitions/brcm,bcm4908-partitions.yaml
+++ b/Documentation/devicetree/bindings/mtd/partitions/brcm,bcm4908-partitions.yaml
@@ -32,7 +32,9 @@ patternProperties:
     $ref: "partition.yaml#"
     properties:
       compatible:
-        const: brcm,bcm4908-firmware
+        enum:
+          - brcm,bcm4908-firmware
+          - nvmem-cells
     unevaluatedProperties: false
 
 required:
-- 
2.26.2


             reply	other threads:[~2021-03-29 15:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-29 15:07 Rafał Miłecki [this message]
2021-03-30 22:19 ` [PATCH RFC] dt-bindings: mtd: allow NVMEM cells in BCM4908 partitions Rob Herring

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=20210329150723.26584-1-zajec5@gmail.com \
    --to=zajec5@gmail.com \
    --cc=ansuelsmth@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=miquel.raynal@bootlin.com \
    --cc=rafal@milecki.pl \
    --cc=richard@nod.at \
    --cc=robh+dt@kernel.org \
    --cc=vigneshr@ti.com \
    /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).