Skip to contentSkip to conversation

dt-bindings: mmc: Convert sdhci-sirf to json-schema

PATCH In review Kangmin Park 2 participants 2 messages Jul 6, 2020 – Jul 15, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dt-bindings: mmc: Convert sdhci-sirf to json-schema

Convert the sdhci-sirf binding to DT schema format using json-schema.

At the same time, fix unit address to match the first address specified in the reg property of the node.

---
 .../devicetree/bindings/mmc/sdhci-sirf.txt    | 18 ---------
 .../devicetree/bindings/mmc/sdhci-sirf.yaml   | 40 +++++++++++++++++++
 2 files changed, 40 insertions(+), 18 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/mmc/sdhci-sirf.txt
 create mode 100644 Documentation/devicetree/bindings/mmc/sdhci-sirf.yaml
Documentation/devicetree/bindings/mmc/sdhci-sirf.txt deleted +0 -18
deleted file mode 100644
index dd6ed464bcb8..000000000000
@@ -1,18 +0,0 @@
-* SiRFprimII/marco/atlas6 SDHCI Controller
-
-This file documents differences between the core properties in mmc.txt
-and the properties used by the sdhci-sirf driver.
-
-Required properties:
-- compatible: sirf,prima2-sdhc
-
-Optional properties:
-- cd-gpios: card detect gpio, with zero flags.
-
-Example:
-
-	sd0: sdhci@56000000 {
-		compatible = "sirf,prima2-sdhc";
-		reg = <0xcd000000 0x100000>;
-		cd-gpios = <&gpio 6 0>;
-	};
Documentation/devicetree/bindings/mmc/sdhci-sirf.yaml new file +40 -0
new file mode 100644
index 000000000000..46269378d9b6
@@ -0,0 +1,40 @@
+# SPDX-License-Identifier: GPL-2.0-only
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mmc/sdhci-sirf.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Sdhci Sirf Device Tree Bindings
+
+description: |
+  This file documents differences between the core properties in
+  mmc.txt and the properties used by the sdhci-sirf driver.
+
+maintainers:
+  - Ulf Hansson <[email protected]>
+
+properties:
+  compatible:
+    enum:
+      - sirf,prima2-sdhc
+
+  reg:
+    maxItems: 1
+
+  cd-gpios:
+    description:
+      card detect gpio, with zero flags.
+
+required:
+  - compatible
+  - reg
+
+additionalProperties: false
+
+examples:
+  - |
+    sd0: sdhci@cd000000 {
+          compatible = "sirf,prima2-sdhc";
+          reg = <0xcd000000 0x100000>;
+          cd-gpios = <&gpio 6 0>;
+    };
Signature · 1 line
2.26.2
maintainer
#1 lore raw
Quoted 47 lines · Kangmin Park

Convert the sdhci-sirf binding to DT schema format using json-schema.

At the same time, fix unit address to match the first address specified in the reg property of the node.

---
 .../devicetree/bindings/mmc/sdhci-sirf.txt    | 18 ---------
 .../devicetree/bindings/mmc/sdhci-sirf.yaml   | 40 +++++++++++++++++++
 2 files changed, 40 insertions(+), 18 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/mmc/sdhci-sirf.txt
 create mode 100644 Documentation/devicetree/bindings/mmc/sdhci-sirf.yaml
Documentation/devicetree/bindings/mmc/sdhci-sirf.txt deleted +0 -18
deleted file mode 100644
index dd6ed464bcb8..000000000000
@@ -1,18 +0,0 @@
-* SiRFprimII/marco/atlas6 SDHCI Controller
-
-This file documents differences between the core properties in mmc.txt
-and the properties used by the sdhci-sirf driver.
-
-Required properties:
-- compatible: sirf,prima2-sdhc
-
-Optional properties:
-- cd-gpios: card detect gpio, with zero flags.
-
-Example:
-
-	sd0: sdhci@56000000 {
-		compatible = "sirf,prima2-sdhc";
-		reg = <0xcd000000 0x100000>;
-		cd-gpios = <&gpio 6 0>;
-	};
Documentation/devicetree/bindings/mmc/sdhci-sirf.yaml new file +4 -0
new file mode 100644
index 000000000000..46269378d9b6
@@ -0,0 +1,40 @@
+# SPDX-License-Identifier: GPL-2.0-only
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mmc/sdhci-sirf.yaml#

Documentation/devicetree/bindings/mmc/sdhci-sirf.yaml line 14

Quoted 10 lines
Documentation/devicetree/bindings/mmc/sdhci-sirf.yaml new file +10 -0
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Sdhci Sirf Device Tree Bindings
+
+description: |
+  This file documents differences between the core properties in
+  mmc.txt and the properties used by the sdhci-sirf driver.
+
+maintainers:
+  - Ulf Hansson <[email protected]>

Normally, this should be someone familar with the h/w, not the MMC maintainer.

Needs a reference to mmc-controller.yaml.

Quoted 29 lines
Documentation/devicetree/bindings/mmc/sdhci-sirf.yaml new file +26 -0
+
+properties:
+  compatible:
+    enum:
+      - sirf,prima2-sdhc
+
+  reg:
+    maxItems: 1
+
+  cd-gpios:
+    description:
+      card detect gpio, with zero flags.
+
+required:
+  - compatible
+  - reg
+
+additionalProperties: false
+
+examples:
+  - |
+    sd0: sdhci@cd000000 {
+          compatible = "sirf,prima2-sdhc";
+          reg = <0xcd000000 0x100000>;
+          cd-gpios = <&gpio 6 0>;
+    };
Signature · 1 line
2.26.2