Skip to contentSkip to conversation

dt-bindings: mtd: drop mtd/cortina,gemini-flash.txt

PATCH Superseded Corentin Labbe 2 participants 3 messages Jan 31, 2022 – Feb 10, 2022

Subsystems (3)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 dt-bindings: mtd: drop mtd/cortina,gemini-flash.txt

Drop mtd/cortina,gemini-flash.txt since it is nearly already handled by Documentation/devicetree/bindings/mtd/mtd-physmap.yaml.

---
Change since v1:
- fixed typo on syscon

 .../bindings/mtd/cortina,gemini-flash.txt     | 24 -------------------
 .../devicetree/bindings/mtd/mtd-physmap.yaml  | 18 +++++++++++++-
 2 files changed, 17 insertions(+), 25 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/mtd/cortina,gemini-flash.txt
Documentation/devicetree/bindings/mtd/cortina,gemini-flash.txt deleted +0 -24
deleted file mode 100644
index efa5b2aba829..000000000000
@@ -1,24 +0,0 @@
-Flash device on Cortina Systems Gemini SoC
-
-This flash is regular CFI compatible (Intel or AMD extended) flash chips with
-some special bits that can be controlled by the machine's system controller.
-
-Required properties:
-- compatible : must be "cortina,gemini-flash", "cfi-flash";
-- reg : memory address for the flash chip
-- syscon : must be a phandle to the system controller
-- bank-width : width in bytes of flash interface, should be <2>
-
-For the rest of the properties, see mtd-physmap.yaml.
-
-The device tree may optionally contain sub-nodes describing partitions of the
-address space. See partition.txt for more detail.
-
-Example:
-
-flash@30000000 {
-	compatible = "cortina,gemini-flash", "cfi-flash";
-	reg = <0x30000000 0x01000000>;
-	syscon = <&syscon>;
-	bank-width = <2>;
-};
Documentation/devicetree/bindings/mtd/mtd-physmap.yaml +17 -1
index f827984936f6..82eb4e0f453b 100644
@@ -44,7 +44,9 @@ properties:
               - numonyx,js28f128
               - sst,sst39vf320
               - xlnx,xps-mch-emc-2.00.a
-          - const: cfi-flash
+          - enum:
+              - cfi-flash
+              - jedec-flash
       - items:
           - enum:
               - cypress,cy7c1019dv33-10zsxi
@@ -127,6 +129,20 @@ required:
   - compatible
   - reg
 
+if:
+  properties:
+    compatible:
+      contains:
+        const: cortina,gemini-flash
+then:
+  properties:
+    syscon:
+      $ref: /schemas/types.yaml#/definitions/phandle
+      description:
+        Phandle to the syscon controller
+  required:
+    - syscon
+
 # FIXME: A parent bus may define timing properties
 additionalProperties: true
 
Signature · 1 line
2.34.1
maintainer
#1 lore raw
Quoted 49 lines · Corentin Labbe

Drop mtd/cortina,gemini-flash.txt since it is nearly already handled by Documentation/devicetree/bindings/mtd/mtd-physmap.yaml.

---
Change since v1:
- fixed typo on syscon

 .../bindings/mtd/cortina,gemini-flash.txt     | 24 -------------------
 .../devicetree/bindings/mtd/mtd-physmap.yaml  | 18 +++++++++++++-
 2 files changed, 17 insertions(+), 25 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/mtd/cortina,gemini-flash.txt
Documentation/devicetree/bindings/mtd/cortina,gemini-flash.txt deleted +0 -24
deleted file mode 100644
index efa5b2aba829..000000000000
@@ -1,24 +0,0 @@
-Flash device on Cortina Systems Gemini SoC
-
-This flash is regular CFI compatible (Intel or AMD extended) flash chips with
-some special bits that can be controlled by the machine's system controller.
-
-Required properties:
-- compatible : must be "cortina,gemini-flash", "cfi-flash";
-- reg : memory address for the flash chip
-- syscon : must be a phandle to the system controller
-- bank-width : width in bytes of flash interface, should be <2>
-
-For the rest of the properties, see mtd-physmap.yaml.
-
-The device tree may optionally contain sub-nodes describing partitions of the
-address space. See partition.txt for more detail.
-
-Example:
-
-flash@30000000 {
-	compatible = "cortina,gemini-flash", "cfi-flash";
-	reg = <0x30000000 0x01000000>;
-	syscon = <&syscon>;
-	bank-width = <2>;
-};
Documentation/devicetree/bindings/mtd/mtd-physmap.yaml +0 -0
index f827984936f6..82eb4e0f453b 100644

Documentation/devicetree/bindings/mtd/mtd-physmap.yaml properties: · line 49

Quoted 7 lines
Documentation/devicetree/bindings/mtd/mtd-physmap.yaml +3 -1
@@ -44,7 +44,9 @@ properties:
               - numonyx,js28f128
               - sst,sst39vf320
               - xlnx,xps-mch-emc-2.00.a
-          - const: cfi-flash
+          - enum:
+              - cfi-flash
+              - jedec-flash

Why is jedec-flash being added? The old doc made no mention of it.

Quoted 28 lines
Documentation/devicetree/bindings/mtd/mtd-physmap.yaml +14 -0
       - items:
           - enum:
               - cypress,cy7c1019dv33-10zsxi
@@ -127,6 +129,20 @@ required:
   - compatible
   - reg
 
+if:
+  properties:
+    compatible:
+      contains:
+        const: cortina,gemini-flash
+then:
+  properties:
+    syscon:
+      $ref: /schemas/types.yaml#/definitions/phandle
+      description:
+        Phandle to the syscon controller
+  required:
+    - syscon
+
 # FIXME: A parent bus may define timing properties
 additionalProperties: true
 
Signature · 1 line
2.34.1
#2 lore raw
Quoted 51 lines · Rob Herring
Quoted 50 lines · Corentin Labbe

Drop mtd/cortina,gemini-flash.txt since it is nearly already handled by Documentation/devicetree/bindings/mtd/mtd-physmap.yaml.

---
Change since v1:
- fixed typo on syscon

 .../bindings/mtd/cortina,gemini-flash.txt     | 24 -------------------
 .../devicetree/bindings/mtd/mtd-physmap.yaml  | 18 +++++++++++++-
 2 files changed, 17 insertions(+), 25 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/mtd/cortina,gemini-flash.txt
Documentation/devicetree/bindings/mtd/cortina,gemini-flash.txt deleted +0 -24
deleted file mode 100644
index efa5b2aba829..000000000000
@@ -1,24 +0,0 @@
-Flash device on Cortina Systems Gemini SoC
-
-This flash is regular CFI compatible (Intel or AMD extended) flash chips with
-some special bits that can be controlled by the machine's system controller.
-
-Required properties:
-- compatible : must be "cortina,gemini-flash", "cfi-flash";
-- reg : memory address for the flash chip
-- syscon : must be a phandle to the system controller
-- bank-width : width in bytes of flash interface, should be <2>
-
-For the rest of the properties, see mtd-physmap.yaml.
-
-The device tree may optionally contain sub-nodes describing partitions of the
-address space. See partition.txt for more detail.
-
-Example:
-
-flash@30000000 {
-	compatible = "cortina,gemini-flash", "cfi-flash";
-	reg = <0x30000000 0x01000000>;
-	syscon = <&syscon>;
-	bank-width = <2>;
-};
Documentation/devicetree/bindings/mtd/mtd-physmap.yaml +0 -0
index f827984936f6..82eb4e0f453b 100644
@@ -44,7 +44,9 @@ properties:
               - numonyx,js28f128
Quoted 9 lines

Documentation/devicetree/bindings/mtd/mtd-physmap.yaml properties: · line 49

Quoted 6 lines
Documentation/devicetree/bindings/mtd/mtd-physmap.yaml +3 -1
               - sst,sst39vf320
               - xlnx,xps-mch-emc-2.00.a
-          - const: cfi-flash
+          - enum:
+              - cfi-flash
+              - jedec-flash

Why is jedec-flash being added? The old doc made no mention of it.

Because one board (gemini-dlink-dns-313.dts) use it. See commit a10d862e585e06aacc3a03e230fdf8faf6b1caf0 """
The flash on the DNS-313 needs to be probed as JEDEC, it does
not conform to the common CFI standard.
"""

I will add this (the addition of jedec-flash) in commmit log.

Regards