[RFC PATCH 3/4] dt-bindings: mtd: add OTP bindings

Michael Walle michael at walle.cc
Tue Mar 30 11:07:56 BST 2021


Hi Rob,

Am 2021-03-27 18:09, schrieb Rob Herring:
>> +    spi {
>> +        #address-cells = <1>;
>> +        #size-cells = <0>;
>> +
>> +        flash at 0 {
>> +            reg = <0>;
>> +            compatible = "some,flash";
> 
> Soon (in linux-next, but off by default) this will be a warning for
> undocumented compatible string. Use a real device.

Two questions:
(1) I guess this is also true for "PATCH 2/4", where you already added
     your Reviewed-by?
(2) I'd add the "jedec,spi-nor" because, that is the one I target. But
     before doing so, I'd need to add the otp subnode to the spi-nor
     schema, correct? Otherwise, the schema validation will fail. Eg.

--- a/Documentation/devicetree/bindings/mtd/jedec,spi-nor.yaml
+++ b/Documentation/devicetree/bindings/mtd/jedec,spi-nor.yaml
@@ -9,6 +9,9 @@ title: SPI NOR flash ST M25Pxx (and similar) serial 
flash chips
  maintainers:
    - Rob Herring <robh at kernel.org>

+allOf:
+  - $ref: "mtd.yaml#"
+
  properties:
    compatible:
      oneOf:
@@ -82,6 +85,9 @@ patternProperties:
    '^partition@':
      type: object

+  "^otp(-[0-9]+)?$":
+    type: object
+
  additionalProperties: false

  examples:

-michael



More information about the linux-mtd mailing list