linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dt-bindings: ata: rcar-sata: Convert to json-schema
@ 2020-02-19 15:41 Geert Uytterhoeven
  2020-02-25 16:22 ` Niklas Söderlund
  2020-02-26 15:37 ` Rob Herring
  0 siblings, 2 replies; 3+ messages in thread
From: Geert Uytterhoeven @ 2020-02-19 15:41 UTC (permalink / raw)
  To: Jens Axboe, Rob Herring, Mark Rutland
  Cc: devicetree, linux-ide, linux-renesas-soc, Geert Uytterhoeven

Convert the Renesas R-Car Serial-ATA Device Tree binding documentation
to json-schema.

While at it:
  - Remove the deprecated "renesas,rcar-sata" compatible value,
  - Add "iommus", "power-domains", and "resets" properties,
  - Update the example.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Not having to care about the deprecated value simplifies the
jscon-schema.
---
 .../bindings/ata/renesas,rcar-sata.yaml       | 71 +++++++++++++++++++
 .../devicetree/bindings/ata/sata_rcar.txt     | 36 ----------
 2 files changed, 71 insertions(+), 36 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/ata/renesas,rcar-sata.yaml
 delete mode 100644 Documentation/devicetree/bindings/ata/sata_rcar.txt

diff --git a/Documentation/devicetree/bindings/ata/renesas,rcar-sata.yaml b/Documentation/devicetree/bindings/ata/renesas,rcar-sata.yaml
new file mode 100644
index 0000000000000000..7b69831060d8b9c5
--- /dev/null
+++ b/Documentation/devicetree/bindings/ata/renesas,rcar-sata.yaml
@@ -0,0 +1,71 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/ata/renesas,rcar-sata.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+title: Renesas R-Car Serial-ATA Interface
+
+maintainers:
+  - Geert Uytterhoeven <geert+renesas@glider.be>
+
+properties:
+  compatible:
+    oneOf:
+      - items:
+          - enum:
+              - renesas,sata-r8a7779      # R-Car H1
+      - items:
+          - enum:
+              - renesas,sata-r8a7790-es1  # R-Car H2 ES1
+              - renesas,sata-r8a7790      # R-Car H2 other than ES1
+              - renesas,sata-r8a7791      # R-Car M2-W
+              - renesas,sata-r8a7793      # R-Car M2-N
+          - const: renesas,rcar-gen2-sata # generic R-Car Gen2
+      - items:
+          - enum:
+              - renesas,sata-r8a774b1     # RZ/G2N
+              - renesas,sata-r8a7795      # R-Car H3
+              - renesas,sata-r8a77965     # R-Car M3-N
+          - const: renesas,rcar-gen3-sata # generic R-Car Gen3 or RZ/G2
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  clocks:
+    maxItems: 1
+
+  iommus:
+    maxItems: 1
+
+  power-domains:
+    maxItems: 1
+
+  resets:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - clocks
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/clock/r8a7791-cpg-mssr.h>
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+    #include <dt-bindings/power/r8a7791-sysc.h>
+
+    sata@ee300000 {
+            compatible = "renesas,sata-r8a7791", "renesas,rcar-gen2-sata";
+            reg = <0xee300000 0x200000>;
+            interrupts = <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>;
+            clocks = <&cpg CPG_MOD 815>;
+            power-domains = <&sysc R8A7791_PD_ALWAYS_ON>;
+            resets = <&cpg 815>;
+    };
diff --git a/Documentation/devicetree/bindings/ata/sata_rcar.txt b/Documentation/devicetree/bindings/ata/sata_rcar.txt
deleted file mode 100644
index a2fbdc91570d0f7c..0000000000000000
--- a/Documentation/devicetree/bindings/ata/sata_rcar.txt
+++ /dev/null
@@ -1,36 +0,0 @@
-* Renesas R-Car SATA
-
-Required properties:
-- compatible		: should contain one or more of the following:
-			  - "renesas,sata-r8a774b1" for RZ/G2N
-			  - "renesas,sata-r8a7779" for R-Car H1
-			  - "renesas,sata-r8a7790-es1" for R-Car H2 ES1
-			  - "renesas,sata-r8a7790" for R-Car H2 other than ES1
-			  - "renesas,sata-r8a7791" for R-Car M2-W
-			  - "renesas,sata-r8a7793" for R-Car M2-N
-			  - "renesas,sata-r8a7795" for R-Car H3
-			  - "renesas,sata-r8a77965" for R-Car M3-N
-			  - "renesas,rcar-gen2-sata" for a generic R-Car Gen2
-			     compatible device
-			  - "renesas,rcar-gen3-sata" for a generic R-Car Gen3 or
-			     RZ/G2 compatible device
-			  - "renesas,rcar-sata" is deprecated
-
-			  When compatible with the generic version nodes
-			  must list the SoC-specific version corresponding
-			  to the platform first followed by the generic
-			  version.
-
-- reg			: address and length of the SATA registers;
-- interrupts		: must consist of one interrupt specifier.
-- clocks		: must contain a reference to the functional clock.
-
-Example:
-
-sata0: sata@ee300000 {
-	compatible = "renesas,sata-r8a7791", "renesas,rcar-gen2-sata";
-	reg = <0 0xee300000 0 0x2000>;
-	interrupt-parent = <&gic>;
-	interrupts = <0 105 IRQ_TYPE_LEVEL_HIGH>;
-	clocks = <&mstp8_clks R8A7791_CLK_SATA0>;
-};
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] dt-bindings: ata: rcar-sata: Convert to json-schema
  2020-02-19 15:41 [PATCH] dt-bindings: ata: rcar-sata: Convert to json-schema Geert Uytterhoeven
@ 2020-02-25 16:22 ` Niklas Söderlund
  2020-02-26 15:37 ` Rob Herring
  1 sibling, 0 replies; 3+ messages in thread
From: Niklas Söderlund @ 2020-02-25 16:22 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Jens Axboe, Rob Herring, Mark Rutland, devicetree, linux-ide,
	linux-renesas-soc

Hi Geert,

Thanks for your work.

On 2020-02-19 16:41:46 +0100, Geert Uytterhoeven wrote:
> Convert the Renesas R-Car Serial-ATA Device Tree binding documentation
> to json-schema.
> 
> While at it:
>   - Remove the deprecated "renesas,rcar-sata" compatible value,
>   - Add "iommus", "power-domains", and "resets" properties,
>   - Update the example.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>

> ---
> Not having to care about the deprecated value simplifies the
> jscon-schema.
> ---
>  .../bindings/ata/renesas,rcar-sata.yaml       | 71 +++++++++++++++++++
>  .../devicetree/bindings/ata/sata_rcar.txt     | 36 ----------
>  2 files changed, 71 insertions(+), 36 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/ata/renesas,rcar-sata.yaml
>  delete mode 100644 Documentation/devicetree/bindings/ata/sata_rcar.txt
> 
> diff --git a/Documentation/devicetree/bindings/ata/renesas,rcar-sata.yaml b/Documentation/devicetree/bindings/ata/renesas,rcar-sata.yaml
> new file mode 100644
> index 0000000000000000..7b69831060d8b9c5
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/ata/renesas,rcar-sata.yaml
> @@ -0,0 +1,71 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: "http://devicetree.org/schemas/ata/renesas,rcar-sata.yaml#"
> +$schema: "http://devicetree.org/meta-schemas/core.yaml#"
> +
> +title: Renesas R-Car Serial-ATA Interface
> +
> +maintainers:
> +  - Geert Uytterhoeven <geert+renesas@glider.be>
> +
> +properties:
> +  compatible:
> +    oneOf:
> +      - items:
> +          - enum:
> +              - renesas,sata-r8a7779      # R-Car H1
> +      - items:
> +          - enum:
> +              - renesas,sata-r8a7790-es1  # R-Car H2 ES1
> +              - renesas,sata-r8a7790      # R-Car H2 other than ES1
> +              - renesas,sata-r8a7791      # R-Car M2-W
> +              - renesas,sata-r8a7793      # R-Car M2-N
> +          - const: renesas,rcar-gen2-sata # generic R-Car Gen2
> +      - items:
> +          - enum:
> +              - renesas,sata-r8a774b1     # RZ/G2N
> +              - renesas,sata-r8a7795      # R-Car H3
> +              - renesas,sata-r8a77965     # R-Car M3-N
> +          - const: renesas,rcar-gen3-sata # generic R-Car Gen3 or RZ/G2
> +
> +  reg:
> +    maxItems: 1
> +
> +  interrupts:
> +    maxItems: 1
> +
> +  clocks:
> +    maxItems: 1
> +
> +  iommus:
> +    maxItems: 1
> +
> +  power-domains:
> +    maxItems: 1
> +
> +  resets:
> +    maxItems: 1
> +
> +required:
> +  - compatible
> +  - reg
> +  - interrupts
> +  - clocks
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/clock/r8a7791-cpg-mssr.h>
> +    #include <dt-bindings/interrupt-controller/arm-gic.h>
> +    #include <dt-bindings/power/r8a7791-sysc.h>
> +
> +    sata@ee300000 {
> +            compatible = "renesas,sata-r8a7791", "renesas,rcar-gen2-sata";
> +            reg = <0xee300000 0x200000>;
> +            interrupts = <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>;
> +            clocks = <&cpg CPG_MOD 815>;
> +            power-domains = <&sysc R8A7791_PD_ALWAYS_ON>;
> +            resets = <&cpg 815>;
> +    };
> diff --git a/Documentation/devicetree/bindings/ata/sata_rcar.txt b/Documentation/devicetree/bindings/ata/sata_rcar.txt
> deleted file mode 100644
> index a2fbdc91570d0f7c..0000000000000000
> --- a/Documentation/devicetree/bindings/ata/sata_rcar.txt
> +++ /dev/null
> @@ -1,36 +0,0 @@
> -* Renesas R-Car SATA
> -
> -Required properties:
> -- compatible		: should contain one or more of the following:
> -			  - "renesas,sata-r8a774b1" for RZ/G2N
> -			  - "renesas,sata-r8a7779" for R-Car H1
> -			  - "renesas,sata-r8a7790-es1" for R-Car H2 ES1
> -			  - "renesas,sata-r8a7790" for R-Car H2 other than ES1
> -			  - "renesas,sata-r8a7791" for R-Car M2-W
> -			  - "renesas,sata-r8a7793" for R-Car M2-N
> -			  - "renesas,sata-r8a7795" for R-Car H3
> -			  - "renesas,sata-r8a77965" for R-Car M3-N
> -			  - "renesas,rcar-gen2-sata" for a generic R-Car Gen2
> -			     compatible device
> -			  - "renesas,rcar-gen3-sata" for a generic R-Car Gen3 or
> -			     RZ/G2 compatible device
> -			  - "renesas,rcar-sata" is deprecated
> -
> -			  When compatible with the generic version nodes
> -			  must list the SoC-specific version corresponding
> -			  to the platform first followed by the generic
> -			  version.
> -
> -- reg			: address and length of the SATA registers;
> -- interrupts		: must consist of one interrupt specifier.
> -- clocks		: must contain a reference to the functional clock.
> -
> -Example:
> -
> -sata0: sata@ee300000 {
> -	compatible = "renesas,sata-r8a7791", "renesas,rcar-gen2-sata";
> -	reg = <0 0xee300000 0 0x2000>;
> -	interrupt-parent = <&gic>;
> -	interrupts = <0 105 IRQ_TYPE_LEVEL_HIGH>;
> -	clocks = <&mstp8_clks R8A7791_CLK_SATA0>;
> -};
> -- 
> 2.17.1
> 

-- 
Regards,
Niklas Söderlund

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] dt-bindings: ata: rcar-sata: Convert to json-schema
  2020-02-19 15:41 [PATCH] dt-bindings: ata: rcar-sata: Convert to json-schema Geert Uytterhoeven
  2020-02-25 16:22 ` Niklas Söderlund
@ 2020-02-26 15:37 ` Rob Herring
  1 sibling, 0 replies; 3+ messages in thread
From: Rob Herring @ 2020-02-26 15:37 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Jens Axboe, Mark Rutland, devicetree, linux-ide,
	linux-renesas-soc, Geert Uytterhoeven

On Wed, 19 Feb 2020 16:41:46 +0100, Geert Uytterhoeven wrote:
> Convert the Renesas R-Car Serial-ATA Device Tree binding documentation
> to json-schema.
> 
> While at it:
>   - Remove the deprecated "renesas,rcar-sata" compatible value,
>   - Add "iommus", "power-domains", and "resets" properties,
>   - Update the example.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> Not having to care about the deprecated value simplifies the
> jscon-schema.
> ---
>  .../bindings/ata/renesas,rcar-sata.yaml       | 71 +++++++++++++++++++
>  .../devicetree/bindings/ata/sata_rcar.txt     | 36 ----------
>  2 files changed, 71 insertions(+), 36 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/ata/renesas,rcar-sata.yaml
>  delete mode 100644 Documentation/devicetree/bindings/ata/sata_rcar.txt
> 

Applied, thanks.

Rob

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-02-26 15:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-19 15:41 [PATCH] dt-bindings: ata: rcar-sata: Convert to json-schema Geert Uytterhoeven
2020-02-25 16:22 ` Niklas Söderlund
2020-02-26 15:37 ` Rob Herring

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).