Skip to contentSkip to conversation

dt-bindings: mtd: convert IBM NDFC binding to YAML

PATCH Superseded Rosen Penev 2 participants 2 messages Sep 21

Subsystems (2)

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dt-bindings: mtd: convert IBM NDFC binding to YAML

The NDFC NAND flash controller was only described in a legacy text file, so dtbs_check reported "failed to match any schema with compatible:
['ibm,ndfc']" for the ndfc nodes of the bluestone, canyonlands, eiger, glacier, sequoia and warp device trees.

Convert the binding to the YAML format so those nodes match the generic nand-controller-legacy schema. Describe the node's reg, ccr and bank-settings properties, along with its "nand" chip node which carries the legacy partition layout.

eiger's ndfc node omits reg (supplied by U-Boot), so add a placeholder there to satisfy the newly required property, matching the flash@0,0 node in the same file.

Assisted-by LLM
---
 .../devicetree/bindings/mtd/ibm,ndfc.txt      | 39 --------
 .../devicetree/bindings/mtd/ibm,ndfc.yaml     | 89 +++++++++++++++++++
 2 files changed, 89 insertions(+), 39 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/mtd/ibm,ndfc.txt
 create mode 100644 Documentation/devicetree/bindings/mtd/ibm,ndfc.yaml
Documentation/devicetree/bindings/mtd/ibm,ndfc.txt deleted +0 -39
deleted file mode 100644
index 869f0b5f16e8..000000000000
@@ -1,39 +0,0 @@
-AMCC NDFC (NanD Flash Controller)
-
-Required properties:
-- compatible : "ibm,ndfc".
-- reg : should specify chip select and size used for the chip (0x2000).
-
-Optional properties:
-- ccr : NDFC config and control register value (default 0).
-- bank-settings : NDFC bank configuration register value (default 0).
-
-Notes:
-- partition(s) - follows the OF MTD standard for partitions
-
-Example:
-
-ndfc@1,0 {
-	compatible = "ibm,ndfc";
-	reg = <0x00000001 0x00000000 0x00002000>;
-	ccr = <0x00001000>;
-	bank-settings = <0x80002222>;
-	#address-cells = <1>;
-	#size-cells = <1>;
-
-	nand {
-		#address-cells = <1>;
-		#size-cells = <1>;
-
-		partition@0 {
-			label = "kernel";
-			reg = <0x00000000 0x00200000>;
-		};
-		partition@200000 {
-			label = "root";
-			reg = <0x00200000 0x03E00000>;
-		};
-	};
-};
-
-
Documentation/devicetree/bindings/mtd/ibm,ndfc.yaml new file +89 -0

89 lines not on this page · raw message

Signature · 1 line
2.55.0
#1 lore raw
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider: - [Medium] mtd: missing eiger.dts update breaks dtbs_check - [Low] dt-bindings: unit address mismatch in…

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Medium] mtd: missing eiger.dts update breaks dtbs_check
- [Low] dt-bindings: unit address mismatch in YAML example
--

commit ef4d9a61ebafb45b3d3ff44afa9f87f46f05cad7
Author: Rosen Penev <[email protected]>

dt-bindings: mtd: convert IBM NDFC binding to YAML

The NDFC NAND flash controller was only described in a legacy text file, so dtbs_check reported a failure to match any schema for the ndfc nodes of several device trees. This patch converts the binding to YAML format and describes the node's properties.

Quoted 3 lines

eiger's ndfc node omits reg (supplied by U-Boot), so add a placeholder there to satisfy the newly required property, matching the flash@0,0 node in the same file.

[Severity: Medium]
Since the new ibm,ndfc.yaml makes the reg property required, running make dtbs_check on PowerPC architectures will fail for eiger.dts because the node omits it.

The commit message mentions adding a placeholder to eiger.dts, but the patch entirely omits any modification to arch/powerpc/boot/dts/eiger.dts. Could the eiger.dts update have been accidentally dropped from this patch?

Quoted 5 lines
Documentation/devicetree/bindings/mtd/ibm,ndfc.yaml new file +0 -0
new file mode 100644
index 0000000000000..96e25771a8fe9

[ ... ]

Documentation/devicetree/bindings/mtd/ibm,ndfc.yaml line 84

Quoted 7 lines
Documentation/devicetree/bindings/mtd/ibm,ndfc.yaml new file +7 -0
+                partition@0 {
+                    label = "kernel";
+                    reg = <0x00000000 0x00200000>;
+                };
+                partition@200000 {
+                    label = "root";
+                    reg = <0x00000000 0x03e00000>;

[Severity: Low]
Will this mismatched unit address cause a simple_bus_reg warning?

In the example, partition@200000 defines reg = <0x00000000 0x03e00000>. The address 0x00000000 does not match the unit address 200000 (which was correctly 0x00200000 in the old text bindings). Running validation on the newly added YAML schema might fail here.

Quoted 5 lines
Documentation/devicetree/bindings/mtd/ibm,ndfc.yaml new file +5 -0
+                };
+            };
+        };
+    };
+...
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1