linux-renesas-soc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/8] d-bindings: media: Conversion of Renesas bindings to YAML
@ 2020-05-15  1:24 Laurent Pinchart
  2020-05-15  1:24 ` [PATCH 1/8] dt-bindings: media: renesas,fcp: Convert binding " Laurent Pinchart
                   ` (7 more replies)
  0 siblings, 8 replies; 17+ messages in thread
From: Laurent Pinchart @ 2020-05-15  1:24 UTC (permalink / raw)
  To: dri-devel; +Cc: linux-media, linux-renesas-soc, Rob Herring

Hello,

This patch series converts the DT bindings for the Renesas R-Car FCP,
FDP1 and VSP1 to YAML. It also updates the bindings based on the
properties that have been added to the DT sources over time but never
documented.

Laurent Pinchart (8):
  dt-bindings: media: renesas,fcp: Convert binding to YAML
  dt-bindings: media: renesas,fcp: Make power-domains mandatory
  dt-bindings: media: renesas,fcp: Add resets and iommus properties
  dt-bindings: media: renesas,fdp1: Convert binding to YAML
  dt-bindings: media: renesas,fdp1: Make power-domains mandatory
  dt-bindings: media: renesas,fdp1: Add resets property
  dt-bindings: media: renesas,vsp1: Convert binding to YAML
  dt-bindings: media: renesas,vsp1: Add power-domains and resets

 .../devicetree/bindings/media/renesas,fcp.txt | 34 -------
 .../bindings/media/renesas,fcp.yaml           | 66 +++++++++++++
 .../bindings/media/renesas,fdp1.txt           | 37 -------
 .../bindings/media/renesas,fdp1.yaml          | 69 +++++++++++++
 .../bindings/media/renesas,vsp1.txt           | 30 ------
 .../bindings/media/renesas,vsp1.yaml          | 97 +++++++++++++++++++
 6 files changed, 232 insertions(+), 101 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/media/renesas,fcp.txt
 create mode 100644 Documentation/devicetree/bindings/media/renesas,fcp.yaml
 delete mode 100644 Documentation/devicetree/bindings/media/renesas,fdp1.txt
 create mode 100644 Documentation/devicetree/bindings/media/renesas,fdp1.yaml
 delete mode 100644 Documentation/devicetree/bindings/media/renesas,vsp1.txt
 create mode 100644 Documentation/devicetree/bindings/media/renesas,vsp1.yaml

-- 
Regards,

Laurent Pinchart


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

* [PATCH 1/8] dt-bindings: media: renesas,fcp: Convert binding to YAML
  2020-05-15  1:24 [PATCH 0/8] d-bindings: media: Conversion of Renesas bindings to YAML Laurent Pinchart
@ 2020-05-15  1:24 ` Laurent Pinchart
  2020-05-15  8:05   ` Geert Uytterhoeven
  2020-05-15  1:24 ` [PATCH 2/8] dt-bindings: media: renesas,fcp: Make power-domains mandatory Laurent Pinchart
                   ` (6 subsequent siblings)
  7 siblings, 1 reply; 17+ messages in thread
From: Laurent Pinchart @ 2020-05-15  1:24 UTC (permalink / raw)
  To: dri-devel; +Cc: linux-media, linux-renesas-soc, Rob Herring

Convert the Renesas R-Car FCP text binding to YAML.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
 .../devicetree/bindings/media/renesas,fcp.txt | 34 -----------
 .../bindings/media/renesas,fcp.yaml           | 56 +++++++++++++++++++
 2 files changed, 56 insertions(+), 34 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/media/renesas,fcp.txt
 create mode 100644 Documentation/devicetree/bindings/media/renesas,fcp.yaml

diff --git a/Documentation/devicetree/bindings/media/renesas,fcp.txt b/Documentation/devicetree/bindings/media/renesas,fcp.txt
deleted file mode 100644
index 79c37395b396..000000000000
--- a/Documentation/devicetree/bindings/media/renesas,fcp.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-Renesas R-Car Frame Compression Processor (FCP)
------------------------------------------------
-
-The FCP is a companion module of video processing modules in the Renesas R-Car
-Gen3 and RZ/G2 SoCs. It provides data compression and decompression, data
-caching, and conversion of AXI transactions in order to reduce the memory
-bandwidth.
-
-There are three types of FCP: FCP for Codec (FCPC), FCP for VSP (FCPV) and FCP
-for FDP (FCPF). Their configuration and behaviour depend on the module they
-are paired with. These DT bindings currently support the FCPV and FCPF.
-
- - compatible: Must be one or more of the following
-
-   - "renesas,fcpv" for generic compatible 'FCP for VSP'
-   - "renesas,fcpf" for generic compatible 'FCP for FDP'
-
- - reg: the register base and size for the device registers
- - clocks: Reference to the functional clock
-
-Optional properties:
- - power-domains : power-domain property defined with a power domain specifier
-		   to respective power domain.
-
-
-Device node example
--------------------
-
-	fcpvd1: fcp@fea2f000 {
-		compatible = "renesas,fcpv";
-		reg = <0 0xfea2f000 0 0x200>;
-		clocks = <&cpg CPG_MOD 602>;
-		power-domains = <&sysc R8A7795_PD_A3VP>;
-	};
diff --git a/Documentation/devicetree/bindings/media/renesas,fcp.yaml b/Documentation/devicetree/bindings/media/renesas,fcp.yaml
new file mode 100644
index 000000000000..be085fb398fd
--- /dev/null
+++ b/Documentation/devicetree/bindings/media/renesas,fcp.yaml
@@ -0,0 +1,56 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/media/renesas,fcp.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Renesas R-Car Frame Compression Processor (FCP)
+
+maintainers:
+  - Laurent Pinchart <laurent.pinchart@ideasonboard.com>
+
+description: |
+  The FCP is a companion module of video processing modules in the Renesas
+  R-Car Gen3 and RZ/G2 SoCs. It provides data compression and decompression,
+  data caching, and conversion of AXI transactions in order to reduce the
+  memory bandwidth.
+
+  There are three types of FCP: FCP for Codec (FCPC), FCP for VSP (FCPV) and
+  FCP for FDP (FCPF). Their configuration and behaviour depend on the module
+  they are paired with. These DT bindings currently support the FCPV and FCPF.
+
+properties:
+  compatible:
+    enum:
+      - renesas,fcpv # for 'FCP for VSP'
+      - renesas,fcpf # for 'FCP for FDP'
+
+  reg:
+    maxItems: 1
+
+  clocks:
+    maxItems: 1
+
+  power-domains:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+  - clocks
+
+additionalProperties: false
+
+examples:
+  # R8A7790 (R-Car H2) VSP1-S
+  - |
+    #include <dt-bindings/clock/renesas-cpg-mssr.h>
+    #include <dt-bindings/power/r8a7795-sysc.h>
+
+    fcp@fea2f000 {
+        compatible = "renesas,fcpv";
+        reg = <0xfea2f000 0x200>;
+        clocks = <&cpg CPG_MOD 602>;
+        power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;
+    };
+...
-- 
Regards,

Laurent Pinchart


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

* [PATCH 2/8] dt-bindings: media: renesas,fcp: Make power-domains mandatory
  2020-05-15  1:24 [PATCH 0/8] d-bindings: media: Conversion of Renesas bindings to YAML Laurent Pinchart
  2020-05-15  1:24 ` [PATCH 1/8] dt-bindings: media: renesas,fcp: Convert binding " Laurent Pinchart
@ 2020-05-15  1:24 ` Laurent Pinchart
  2020-05-15  7:52   ` Geert Uytterhoeven
  2020-05-15  1:24 ` [PATCH 3/8] dt-bindings: media: renesas,fcp: Add resets and iommus properties Laurent Pinchart
                   ` (5 subsequent siblings)
  7 siblings, 1 reply; 17+ messages in thread
From: Laurent Pinchart @ 2020-05-15  1:24 UTC (permalink / raw)
  To: dri-devel; +Cc: linux-media, linux-renesas-soc, Rob Herring

All DT source files in the kernel tree specifyc the power-domains
property. Make it mandatory.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
 Documentation/devicetree/bindings/media/renesas,fcp.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/media/renesas,fcp.yaml b/Documentation/devicetree/bindings/media/renesas,fcp.yaml
index be085fb398fd..041c05467b46 100644
--- a/Documentation/devicetree/bindings/media/renesas,fcp.yaml
+++ b/Documentation/devicetree/bindings/media/renesas,fcp.yaml
@@ -38,6 +38,7 @@ required:
   - compatible
   - reg
   - clocks
+  - power-domains
 
 additionalProperties: false
 
-- 
Regards,

Laurent Pinchart


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

* [PATCH 3/8] dt-bindings: media: renesas,fcp: Add resets and iommus properties
  2020-05-15  1:24 [PATCH 0/8] d-bindings: media: Conversion of Renesas bindings to YAML Laurent Pinchart
  2020-05-15  1:24 ` [PATCH 1/8] dt-bindings: media: renesas,fcp: Convert binding " Laurent Pinchart
  2020-05-15  1:24 ` [PATCH 2/8] dt-bindings: media: renesas,fcp: Make power-domains mandatory Laurent Pinchart
@ 2020-05-15  1:24 ` Laurent Pinchart
  2020-05-15  8:01   ` Geert Uytterhoeven
  2020-05-15  1:24 ` [PATCH 4/8] dt-bindings: media: renesas,fdp1: Convert binding to YAML Laurent Pinchart
                   ` (4 subsequent siblings)
  7 siblings, 1 reply; 17+ messages in thread
From: Laurent Pinchart @ 2020-05-15  1:24 UTC (permalink / raw)
  To: dri-devel; +Cc: linux-media, linux-renesas-soc, Rob Herring

The resets and iommus properties are used in DT sources in the kernel
tree. Document them, and make resets mandatory. The iommus property is
optional as not all platforms wire the FCP to a functional IOMMU.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
 Documentation/devicetree/bindings/media/renesas,fcp.yaml | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/Documentation/devicetree/bindings/media/renesas,fcp.yaml b/Documentation/devicetree/bindings/media/renesas,fcp.yaml
index 041c05467b46..9f830bd95071 100644
--- a/Documentation/devicetree/bindings/media/renesas,fcp.yaml
+++ b/Documentation/devicetree/bindings/media/renesas,fcp.yaml
@@ -31,14 +31,21 @@ properties:
   clocks:
     maxItems: 1
 
+  iommus:
+    maxItems: 1
+
   power-domains:
     maxItems: 1
 
+  resets:
+    maxItems: 1
+
 required:
   - compatible
   - reg
   - clocks
   - power-domains
+  - resets
 
 additionalProperties: false
 
@@ -53,5 +60,7 @@ examples:
         reg = <0xfea2f000 0x200>;
         clocks = <&cpg CPG_MOD 602>;
         power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;
+        resets = <&cpg 602>;
+        iommus = <&ipmmu_vi0 9>;
     };
 ...
-- 
Regards,

Laurent Pinchart


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

* [PATCH 4/8] dt-bindings: media: renesas,fdp1: Convert binding to YAML
  2020-05-15  1:24 [PATCH 0/8] d-bindings: media: Conversion of Renesas bindings to YAML Laurent Pinchart
                   ` (2 preceding siblings ...)
  2020-05-15  1:24 ` [PATCH 3/8] dt-bindings: media: renesas,fcp: Add resets and iommus properties Laurent Pinchart
@ 2020-05-15  1:24 ` Laurent Pinchart
  2020-05-15  8:07   ` Geert Uytterhoeven
  2020-05-15  1:24 ` [PATCH 5/8] dt-bindings: media: renesas,fdp1: Make power-domains mandatory Laurent Pinchart
                   ` (3 subsequent siblings)
  7 siblings, 1 reply; 17+ messages in thread
From: Laurent Pinchart @ 2020-05-15  1:24 UTC (permalink / raw)
  To: dri-devel; +Cc: linux-media, linux-renesas-soc, Rob Herring

Convert the Renesas R-Car FDP1 text binding to YAML.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
 .../bindings/media/renesas,fdp1.txt           | 37 -----------
 .../bindings/media/renesas,fdp1.yaml          | 63 +++++++++++++++++++
 2 files changed, 63 insertions(+), 37 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/media/renesas,fdp1.txt
 create mode 100644 Documentation/devicetree/bindings/media/renesas,fdp1.yaml

diff --git a/Documentation/devicetree/bindings/media/renesas,fdp1.txt b/Documentation/devicetree/bindings/media/renesas,fdp1.txt
deleted file mode 100644
index 8dd1007bb573..000000000000
--- a/Documentation/devicetree/bindings/media/renesas,fdp1.txt
+++ /dev/null
@@ -1,37 +0,0 @@
-Renesas R-Car Fine Display Processor (FDP1)
--------------------------------------------
-
-The FDP1 is a de-interlacing module which converts interlaced video to
-progressive video. It is capable of performing pixel format conversion between
-YCbCr/YUV formats and RGB formats. Only YCbCr/YUV formats are supported as
-an input to the module.
-
-Required properties:
-
- - compatible: must be "renesas,fdp1"
- - reg: the register base and size for the device registers
- - interrupts : interrupt specifier for the FDP1 instance
- - clocks: reference to the functional clock
-
-Optional properties:
-
- - power-domains: reference to the power domain that the FDP1 belongs to, if
-                  any.
- - renesas,fcp: a phandle referencing the FCP that handles memory accesses
-                for the FDP1. Not needed on Gen2, mandatory on Gen3.
-
-Please refer to the binding documentation for the clock and/or power domain
-providers for more details.
-
-
-Device node example
--------------------
-
-	fdp1@fe940000 {
-		compatible = "renesas,fdp1";
-		reg = <0 0xfe940000 0 0x2400>;
-		interrupts = <GIC_SPI 262 IRQ_TYPE_LEVEL_HIGH>;
-		clocks = <&cpg CPG_MOD 119>;
-		power-domains = <&sysc R8A7795_PD_A3VP>;
-		renesas,fcp = <&fcpf0>;
-	};
diff --git a/Documentation/devicetree/bindings/media/renesas,fdp1.yaml b/Documentation/devicetree/bindings/media/renesas,fdp1.yaml
new file mode 100644
index 000000000000..f4db96a1f53c
--- /dev/null
+++ b/Documentation/devicetree/bindings/media/renesas,fdp1.yaml
@@ -0,0 +1,63 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/media/renesas,fdp1.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Renesas R-Car Fine Display Processor (FDP1)
+
+maintainers:
+  - Laurent Pinchart <laurent.pinchart@ideasonboard.com>
+
+description:
+  The FDP1 is a de-interlacing module which converts interlaced video to
+  progressive video. It is capable of performing pixel format conversion
+  between YCbCr/YUV formats and RGB formats. Only YCbCr/YUV formats are
+  supported as an input to the module.
+
+properties:
+  compatible:
+    enum:
+      - renesas,fdp1
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  clocks:
+    maxItems: 1
+
+  power-domains:
+    maxItems: 1
+
+  renesas,fcp:
+    $ref: /schemas/types.yaml#/definitions/phandle
+    description:
+      A phandle referencing the FCP that handles memory accesses for the FDP1.
+      Not allowed on R-Car Gen2, mandatory on R-Car Gen3.
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - clocks
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/clock/renesas-cpg-mssr.h>
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+    #include <dt-bindings/power/r8a7795-sysc.h>
+
+    fdp1@fe940000 {
+        compatible = "renesas,fdp1";
+        reg = <0xfe940000 0x2400>;
+        interrupts = <GIC_SPI 262 IRQ_TYPE_LEVEL_HIGH>;
+        clocks = <&cpg CPG_MOD 119>;
+        power-domains = <&sysc R8A7795_PD_A3VP>;
+        renesas,fcp = <&fcpf0>;
+    };
+...
-- 
Regards,

Laurent Pinchart


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

* [PATCH 5/8] dt-bindings: media: renesas,fdp1: Make power-domains mandatory
  2020-05-15  1:24 [PATCH 0/8] d-bindings: media: Conversion of Renesas bindings to YAML Laurent Pinchart
                   ` (3 preceding siblings ...)
  2020-05-15  1:24 ` [PATCH 4/8] dt-bindings: media: renesas,fdp1: Convert binding to YAML Laurent Pinchart
@ 2020-05-15  1:24 ` Laurent Pinchart
  2020-05-15  8:00   ` Geert Uytterhoeven
  2020-05-15  1:24 ` [PATCH 6/8] dt-bindings: media: renesas,fdp1: Add resets property Laurent Pinchart
                   ` (2 subsequent siblings)
  7 siblings, 1 reply; 17+ messages in thread
From: Laurent Pinchart @ 2020-05-15  1:24 UTC (permalink / raw)
  To: dri-devel; +Cc: linux-media, linux-renesas-soc, Rob Herring

All DT source files in the kernel tree specifyc the power-domains
property. Make it mandatory.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
 Documentation/devicetree/bindings/media/renesas,fdp1.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/media/renesas,fdp1.yaml b/Documentation/devicetree/bindings/media/renesas,fdp1.yaml
index f4db96a1f53c..39184bd21a27 100644
--- a/Documentation/devicetree/bindings/media/renesas,fdp1.yaml
+++ b/Documentation/devicetree/bindings/media/renesas,fdp1.yaml
@@ -43,6 +43,7 @@ required:
   - reg
   - interrupts
   - clocks
+  - power-domains
 
 additionalProperties: false
 
-- 
Regards,

Laurent Pinchart


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

* [PATCH 6/8] dt-bindings: media: renesas,fdp1: Add resets property
  2020-05-15  1:24 [PATCH 0/8] d-bindings: media: Conversion of Renesas bindings to YAML Laurent Pinchart
                   ` (4 preceding siblings ...)
  2020-05-15  1:24 ` [PATCH 5/8] dt-bindings: media: renesas,fdp1: Make power-domains mandatory Laurent Pinchart
@ 2020-05-15  1:24 ` Laurent Pinchart
  2020-05-15  8:02   ` Geert Uytterhoeven
  2020-05-15  1:24 ` [PATCH 7/8] dt-bindings: media: renesas,vsp1: Convert binding to YAML Laurent Pinchart
  2020-05-15  1:24 ` [PATCH 8/8] dt-bindings: media: renesas,vsp1: Add power-domains and resets Laurent Pinchart
  7 siblings, 1 reply; 17+ messages in thread
From: Laurent Pinchart @ 2020-05-15  1:24 UTC (permalink / raw)
  To: dri-devel; +Cc: linux-media, linux-renesas-soc, Rob Herring

The resets property ise used in DT sources in the kernel tree. Document
it and make it mandatory.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
 Documentation/devicetree/bindings/media/renesas,fdp1.yaml | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/Documentation/devicetree/bindings/media/renesas,fdp1.yaml b/Documentation/devicetree/bindings/media/renesas,fdp1.yaml
index 39184bd21a27..2a27a7296fea 100644
--- a/Documentation/devicetree/bindings/media/renesas,fdp1.yaml
+++ b/Documentation/devicetree/bindings/media/renesas,fdp1.yaml
@@ -32,6 +32,9 @@ properties:
   power-domains:
     maxItems: 1
 
+  resets:
+    maxItems: 1
+
   renesas,fcp:
     $ref: /schemas/types.yaml#/definitions/phandle
     description:
@@ -44,6 +47,7 @@ required:
   - interrupts
   - clocks
   - power-domains
+  - resets
 
 additionalProperties: false
 
@@ -59,6 +63,7 @@ examples:
         interrupts = <GIC_SPI 262 IRQ_TYPE_LEVEL_HIGH>;
         clocks = <&cpg CPG_MOD 119>;
         power-domains = <&sysc R8A7795_PD_A3VP>;
+        resets = <&cpg 119>;
         renesas,fcp = <&fcpf0>;
     };
 ...
-- 
Regards,

Laurent Pinchart


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

* [PATCH 7/8] dt-bindings: media: renesas,vsp1: Convert binding to YAML
  2020-05-15  1:24 [PATCH 0/8] d-bindings: media: Conversion of Renesas bindings to YAML Laurent Pinchart
                   ` (5 preceding siblings ...)
  2020-05-15  1:24 ` [PATCH 6/8] dt-bindings: media: renesas,fdp1: Add resets property Laurent Pinchart
@ 2020-05-15  1:24 ` Laurent Pinchart
  2020-05-15  8:10   ` Geert Uytterhoeven
  2020-05-15  1:24 ` [PATCH 8/8] dt-bindings: media: renesas,vsp1: Add power-domains and resets Laurent Pinchart
  7 siblings, 1 reply; 17+ messages in thread
From: Laurent Pinchart @ 2020-05-15  1:24 UTC (permalink / raw)
  To: dri-devel; +Cc: linux-media, linux-renesas-soc, Rob Herring

Convert the Renesas R-Car VSP1 text binding to YAML.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
 .../bindings/media/renesas,vsp1.txt           | 30 -------
 .../bindings/media/renesas,vsp1.yaml          | 83 +++++++++++++++++++
 2 files changed, 83 insertions(+), 30 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/media/renesas,vsp1.txt
 create mode 100644 Documentation/devicetree/bindings/media/renesas,vsp1.yaml

diff --git a/Documentation/devicetree/bindings/media/renesas,vsp1.txt b/Documentation/devicetree/bindings/media/renesas,vsp1.txt
deleted file mode 100644
index cd5a955b2ea0..000000000000
--- a/Documentation/devicetree/bindings/media/renesas,vsp1.txt
+++ /dev/null
@@ -1,30 +0,0 @@
-* Renesas VSP Video Processing Engine
-
-The VSP is a video processing engine that supports up-/down-scaling, alpha
-blending, color space conversion and various other image processing features.
-It can be found in the Renesas R-Car Gen2, R-Car Gen3, RZ/G1, and RZ/G2 SoCs.
-
-Required properties:
-
-  - compatible: Must contain one of the following values
-    - "renesas,vsp1" for the R-Car Gen2 and RZ/G1 VSP1
-    - "renesas,vsp2" for the R-Car Gen3 and RZ/G2 VSP2
-
-  - reg: Base address and length of the registers block for the VSP.
-  - interrupts: VSP interrupt specifier.
-  - clocks: A phandle + clock-specifier pair for the VSP functional clock.
-
-Optional properties:
-
-  - renesas,fcp: A phandle referencing the FCP that handles memory accesses
-                 for the VSP. Not needed on Gen2, mandatory on Gen3.
-
-
-Example: R8A7790 (R-Car H2) VSP1-S node
-
-	vsp@fe928000 {
-		compatible = "renesas,vsp1";
-		reg = <0 0xfe928000 0 0x8000>;
-		interrupts = <0 267 IRQ_TYPE_LEVEL_HIGH>;
-		clocks = <&mstp1_clks R8A7790_CLK_VSP1_S>;
-	};
diff --git a/Documentation/devicetree/bindings/media/renesas,vsp1.yaml b/Documentation/devicetree/bindings/media/renesas,vsp1.yaml
new file mode 100644
index 000000000000..54b130de3ae2
--- /dev/null
+++ b/Documentation/devicetree/bindings/media/renesas,vsp1.yaml
@@ -0,0 +1,83 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/media/renesas,vsp1.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Renesas VSP Video Processing Engine
+
+maintainers:
+  - Laurent Pinchart <laurent.pinchart@ideasonboard.com>
+
+description:
+  The VSP is a video processing engine that supports up-/down-scaling, alpha
+  blending, color space conversion and various other image processing features.
+  It can be found in the Renesas R-Car Gen2, R-Car Gen3, RZ/G1, and RZ/G2 SoCs.
+
+properties:
+  compatible:
+    enum:
+      - renesas,vsp1 # for the R-Car Gen2 and RZ/G1 VSP1
+      - renesas,vsp2 # for the R-Car Gen3 and RZ/G2 VSP2
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  clocks:
+    maxItems: 1
+
+  renesas,fcp:
+    $ref: /schemas/types.yaml#/definitions/phandle
+    description:
+      A phandle referencing the FCP that handles memory accesses for the VSP.
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - clocks
+
+additionalProperties: false
+
+if:
+  properties:
+    compatible:
+      items:
+        - const: renesas,vsp1
+then:
+  properties:
+    renesas,fcp: false
+else:
+  required:
+    - renesas,fcp
+
+examples:
+  # R8A7790 (R-Car H2) VSP1-S
+  - |
+    #include <dt-bindings/clock/renesas-cpg-mssr.h>
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+
+    vsp@fe928000 {
+        compatible = "renesas,vsp1";
+        reg = <0xfe928000 0x8000>;
+        interrupts = <GIC_SPI 267 IRQ_TYPE_LEVEL_HIGH>;
+        clocks = <&cpg CPG_MOD 131>;
+    };
+
+  # R8A77951 (R-Car H3) VSP2-BC
+  - |
+    #include <dt-bindings/clock/renesas-cpg-mssr.h>
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+
+    vsp@fe920000 {
+        compatible = "renesas,vsp2";
+        reg = <0xfe920000 0x8000>;
+        interrupts = <GIC_SPI 465 IRQ_TYPE_LEVEL_HIGH>;
+        clocks = <&cpg CPG_MOD 624>;
+
+        renesas,fcp = <&fcpvb1>;
+    };
+...
-- 
Regards,

Laurent Pinchart


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

* [PATCH 8/8] dt-bindings: media: renesas,vsp1: Add power-domains and resets
  2020-05-15  1:24 [PATCH 0/8] d-bindings: media: Conversion of Renesas bindings to YAML Laurent Pinchart
                   ` (6 preceding siblings ...)
  2020-05-15  1:24 ` [PATCH 7/8] dt-bindings: media: renesas,vsp1: Convert binding to YAML Laurent Pinchart
@ 2020-05-15  1:24 ` Laurent Pinchart
  2020-05-15  8:03   ` Geert Uytterhoeven
  7 siblings, 1 reply; 17+ messages in thread
From: Laurent Pinchart @ 2020-05-15  1:24 UTC (permalink / raw)
  To: dri-devel; +Cc: linux-media, linux-renesas-soc, Rob Herring

The power-domains and resets properties are used in all DT sources in
the kernel but are absent from the bindings. Document them and make them
mandatory.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
 .../devicetree/bindings/media/renesas,vsp1.yaml    | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/Documentation/devicetree/bindings/media/renesas,vsp1.yaml b/Documentation/devicetree/bindings/media/renesas,vsp1.yaml
index 54b130de3ae2..ed52888baa4d 100644
--- a/Documentation/devicetree/bindings/media/renesas,vsp1.yaml
+++ b/Documentation/devicetree/bindings/media/renesas,vsp1.yaml
@@ -29,6 +29,12 @@ properties:
   clocks:
     maxItems: 1
 
+  power-domains:
+    maxItems: 1
+
+  resets:
+    maxItems: 1
+
   renesas,fcp:
     $ref: /schemas/types.yaml#/definitions/phandle
     description:
@@ -39,6 +45,8 @@ required:
   - reg
   - interrupts
   - clocks
+  - power-domains
+  - resets
 
 additionalProperties: false
 
@@ -59,24 +67,30 @@ examples:
   - |
     #include <dt-bindings/clock/renesas-cpg-mssr.h>
     #include <dt-bindings/interrupt-controller/arm-gic.h>
+    #include <dt-bindings/power/r8a7790-sysc.h>
 
     vsp@fe928000 {
         compatible = "renesas,vsp1";
         reg = <0xfe928000 0x8000>;
         interrupts = <GIC_SPI 267 IRQ_TYPE_LEVEL_HIGH>;
         clocks = <&cpg CPG_MOD 131>;
+        power-domains = <&sysc R8A7790_PD_ALWAYS_ON>;
+        resets = <&cpg 131>;
     };
 
   # R8A77951 (R-Car H3) VSP2-BC
   - |
     #include <dt-bindings/clock/renesas-cpg-mssr.h>
     #include <dt-bindings/interrupt-controller/arm-gic.h>
+    #include <dt-bindings/power/r8a7795-sysc.h>
 
     vsp@fe920000 {
         compatible = "renesas,vsp2";
         reg = <0xfe920000 0x8000>;
         interrupts = <GIC_SPI 465 IRQ_TYPE_LEVEL_HIGH>;
         clocks = <&cpg CPG_MOD 624>;
+        power-domains = <&sysc R8A7795_PD_A3VP>;
+        resets = <&cpg 624>;
 
         renesas,fcp = <&fcpvb1>;
     };
-- 
Regards,

Laurent Pinchart


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

* Re: [PATCH 2/8] dt-bindings: media: renesas,fcp: Make power-domains mandatory
  2020-05-15  1:24 ` [PATCH 2/8] dt-bindings: media: renesas,fcp: Make power-domains mandatory Laurent Pinchart
@ 2020-05-15  7:52   ` Geert Uytterhoeven
  0 siblings, 0 replies; 17+ messages in thread
From: Geert Uytterhoeven @ 2020-05-15  7:52 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: DRI Development, Linux Media Mailing List, Linux-Renesas, Rob Herring

On Fri, May 15, 2020 at 3:42 AM Laurent Pinchart
<laurent.pinchart+renesas@ideasonboard.com> wrote:
> All DT source files in the kernel tree specifyc the power-domains
> property. Make it mandatory.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

* Re: [PATCH 5/8] dt-bindings: media: renesas,fdp1: Make power-domains mandatory
  2020-05-15  1:24 ` [PATCH 5/8] dt-bindings: media: renesas,fdp1: Make power-domains mandatory Laurent Pinchart
@ 2020-05-15  8:00   ` Geert Uytterhoeven
  0 siblings, 0 replies; 17+ messages in thread
From: Geert Uytterhoeven @ 2020-05-15  8:00 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: DRI Development, Linux Media Mailing List, Linux-Renesas, Rob Herring

On Fri, May 15, 2020 at 3:42 AM Laurent Pinchart
<laurent.pinchart+renesas@ideasonboard.com> wrote:
> All DT source files in the kernel tree specifyc the power-domains

specify (whoops, missed the same typo in PATCH 2/8).

> property. Make it mandatory.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

* Re: [PATCH 3/8] dt-bindings: media: renesas,fcp: Add resets and iommus properties
  2020-05-15  1:24 ` [PATCH 3/8] dt-bindings: media: renesas,fcp: Add resets and iommus properties Laurent Pinchart
@ 2020-05-15  8:01   ` Geert Uytterhoeven
  0 siblings, 0 replies; 17+ messages in thread
From: Geert Uytterhoeven @ 2020-05-15  8:01 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: DRI Development, Linux Media Mailing List, Linux-Renesas, Rob Herring

On Fri, May 15, 2020 at 3:45 AM Laurent Pinchart
<laurent.pinchart+renesas@ideasonboard.com> wrote:
> The resets and iommus properties are used in DT sources in the kernel
> tree. Document them, and make resets mandatory. The iommus property is
> optional as not all platforms wire the FCP to a functional IOMMU.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

* Re: [PATCH 6/8] dt-bindings: media: renesas,fdp1: Add resets property
  2020-05-15  1:24 ` [PATCH 6/8] dt-bindings: media: renesas,fdp1: Add resets property Laurent Pinchart
@ 2020-05-15  8:02   ` Geert Uytterhoeven
  0 siblings, 0 replies; 17+ messages in thread
From: Geert Uytterhoeven @ 2020-05-15  8:02 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: DRI Development, Linux Media Mailing List, Linux-Renesas, Rob Herring

On Fri, May 15, 2020 at 3:42 AM Laurent Pinchart
<laurent.pinchart+renesas@ideasonboard.com> wrote:
> The resets property ise used in DT sources in the kernel tree. Document

is

> it and make it mandatory.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

* Re: [PATCH 8/8] dt-bindings: media: renesas,vsp1: Add power-domains and resets
  2020-05-15  1:24 ` [PATCH 8/8] dt-bindings: media: renesas,vsp1: Add power-domains and resets Laurent Pinchart
@ 2020-05-15  8:03   ` Geert Uytterhoeven
  0 siblings, 0 replies; 17+ messages in thread
From: Geert Uytterhoeven @ 2020-05-15  8:03 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: DRI Development, Linux Media Mailing List, Linux-Renesas, Rob Herring

On Fri, May 15, 2020 at 3:43 AM Laurent Pinchart
<laurent.pinchart+renesas@ideasonboard.com> wrote:
> The power-domains and resets properties are used in all DT sources in
> the kernel but are absent from the bindings. Document them and make them
> mandatory.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

* Re: [PATCH 1/8] dt-bindings: media: renesas,fcp: Convert binding to YAML
  2020-05-15  1:24 ` [PATCH 1/8] dt-bindings: media: renesas,fcp: Convert binding " Laurent Pinchart
@ 2020-05-15  8:05   ` Geert Uytterhoeven
  0 siblings, 0 replies; 17+ messages in thread
From: Geert Uytterhoeven @ 2020-05-15  8:05 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: DRI Development, Linux Media Mailing List, Linux-Renesas, Rob Herring

Hi Laurent,

On Fri, May 15, 2020 at 3:42 AM Laurent Pinchart
<laurent.pinchart+renesas@ideasonboard.com> wrote:
> Convert the Renesas R-Car FCP text binding to YAML.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

> --- /dev/null
> +++ b/Documentation/devicetree/bindings/media/renesas,fcp.yaml
> @@ -0,0 +1,56 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/media/renesas,fcp.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Renesas R-Car Frame Compression Processor (FCP)
> +
> +maintainers:
> +  - Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> +
> +description: |
> +  The FCP is a companion module of video processing modules in the Renesas
> +  R-Car Gen3 and RZ/G2 SoCs. It provides data compression and decompression,
> +  data caching, and conversion of AXI transactions in order to reduce the
> +  memory bandwidth.
> +
> +  There are three types of FCP: FCP for Codec (FCPC), FCP for VSP (FCPV) and
> +  FCP for FDP (FCPF). Their configuration and behaviour depend on the module
> +  they are paired with. These DT bindings currently support the FCPV and FCPF.
> +
> +properties:
> +  compatible:
> +    enum:
> +      - renesas,fcpv # for 'FCP for VSP'
> +      - renesas,fcpf # for 'FCP for FDP'

I would drop the "for" part, and just write e.g. "# FCP for VSP".

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

* Re: [PATCH 4/8] dt-bindings: media: renesas,fdp1: Convert binding to YAML
  2020-05-15  1:24 ` [PATCH 4/8] dt-bindings: media: renesas,fdp1: Convert binding to YAML Laurent Pinchart
@ 2020-05-15  8:07   ` Geert Uytterhoeven
  0 siblings, 0 replies; 17+ messages in thread
From: Geert Uytterhoeven @ 2020-05-15  8:07 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: DRI Development, Linux Media Mailing List, Linux-Renesas, Rob Herring

Hi Laurent,

On Fri, May 15, 2020 at 3:42 AM Laurent Pinchart
<laurent.pinchart+renesas@ideasonboard.com> wrote:
> Convert the Renesas R-Car FDP1 text binding to YAML.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

> --- /dev/null
> +++ b/Documentation/devicetree/bindings/media/renesas,fdp1.yaml

> +  renesas,fcp:
> +    $ref: /schemas/types.yaml#/definitions/phandle
> +    description:
> +      A phandle referencing the FCP that handles memory accesses for the FDP1.
> +      Not allowed on R-Car Gen2, mandatory on R-Car Gen3.

Bummer, we don't have family-specific compatible values to enforce this
in yaml ;-)

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

* Re: [PATCH 7/8] dt-bindings: media: renesas,vsp1: Convert binding to YAML
  2020-05-15  1:24 ` [PATCH 7/8] dt-bindings: media: renesas,vsp1: Convert binding to YAML Laurent Pinchart
@ 2020-05-15  8:10   ` Geert Uytterhoeven
  0 siblings, 0 replies; 17+ messages in thread
From: Geert Uytterhoeven @ 2020-05-15  8:10 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: DRI Development, Linux Media Mailing List, Linux-Renesas, Rob Herring

On Fri, May 15, 2020 at 3:42 AM Laurent Pinchart
<laurent.pinchart+renesas@ideasonboard.com> wrote:
> Convert the Renesas R-Car VSP1 text binding to YAML.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

> --- /dev/null
> +++ b/Documentation/devicetree/bindings/media/renesas,vsp1.yaml
> @@ -0,0 +1,83 @@

> +properties:
> +  compatible:
> +    enum:
> +      - renesas,vsp1 # for the R-Car Gen2 and RZ/G1 VSP1
> +      - renesas,vsp2 # for the R-Car Gen3 and RZ/G2 VSP2

I would do it the terse way, and just write e.g. "# R-Car Gen2 and RZ/G1".
Up to you...

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

end of thread, other threads:[~2020-05-15  8:10 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-15  1:24 [PATCH 0/8] d-bindings: media: Conversion of Renesas bindings to YAML Laurent Pinchart
2020-05-15  1:24 ` [PATCH 1/8] dt-bindings: media: renesas,fcp: Convert binding " Laurent Pinchart
2020-05-15  8:05   ` Geert Uytterhoeven
2020-05-15  1:24 ` [PATCH 2/8] dt-bindings: media: renesas,fcp: Make power-domains mandatory Laurent Pinchart
2020-05-15  7:52   ` Geert Uytterhoeven
2020-05-15  1:24 ` [PATCH 3/8] dt-bindings: media: renesas,fcp: Add resets and iommus properties Laurent Pinchart
2020-05-15  8:01   ` Geert Uytterhoeven
2020-05-15  1:24 ` [PATCH 4/8] dt-bindings: media: renesas,fdp1: Convert binding to YAML Laurent Pinchart
2020-05-15  8:07   ` Geert Uytterhoeven
2020-05-15  1:24 ` [PATCH 5/8] dt-bindings: media: renesas,fdp1: Make power-domains mandatory Laurent Pinchart
2020-05-15  8:00   ` Geert Uytterhoeven
2020-05-15  1:24 ` [PATCH 6/8] dt-bindings: media: renesas,fdp1: Add resets property Laurent Pinchart
2020-05-15  8:02   ` Geert Uytterhoeven
2020-05-15  1:24 ` [PATCH 7/8] dt-bindings: media: renesas,vsp1: Convert binding to YAML Laurent Pinchart
2020-05-15  8:10   ` Geert Uytterhoeven
2020-05-15  1:24 ` [PATCH 8/8] dt-bindings: media: renesas,vsp1: Add power-domains and resets Laurent Pinchart
2020-05-15  8:03   ` Geert Uytterhoeven

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