linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] dt-bindings: media: csi: Add interconnects properties
@ 2020-02-10 10:04 Maxime Ripard
  2020-02-10 10:04 ` [PATCH 2/2] dt-bindings: media: csi: Fix clocks description Maxime Ripard
  2020-02-19 22:15 ` [PATCH 1/2] dt-bindings: media: csi: Add interconnects properties Rob Herring
  0 siblings, 2 replies; 4+ messages in thread
From: Maxime Ripard @ 2020-02-10 10:04 UTC (permalink / raw)
  To: Chen-Yu Tsai, Maxime Ripard, Mark Rutland, Rob Herring,
	Frank Rowand, sakari.ailus
  Cc: linux-arm-kernel, devicetree, mchehab+huawei, linux-media, Maxime Ripard

The Allwinner CSI controller is sitting beside the MBUS that is represented
as an interconnect.

Make sure that the interconnect properties are valid in the binding.

Fixes: 7866d6903ce8 ("media: dt-bindings: media: sun4i-csi: Add compatible for CSI0 on R40")
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
---
 .../bindings/media/allwinner,sun4i-a10-csi.yaml        | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/Documentation/devicetree/bindings/media/allwinner,sun4i-a10-csi.yaml b/Documentation/devicetree/bindings/media/allwinner,sun4i-a10-csi.yaml
index 9af873b43acd..afde17d9dab1 100644
--- a/Documentation/devicetree/bindings/media/allwinner,sun4i-a10-csi.yaml
+++ b/Documentation/devicetree/bindings/media/allwinner,sun4i-a10-csi.yaml
@@ -51,6 +51,16 @@ properties:
   resets:
     maxItems: 1
 
+  # FIXME: This should be made required eventually once every SoC will
+  # have the MBUS declared.
+  interconnects:
+    maxItems: 1
+
+  # FIXME: This should be made required eventually once every SoC will
+  # have the MBUS declared.
+  interconnect-names:
+    const: dma-mem
+
   # See ./video-interfaces.txt for details
   port:
     type: object
-- 
2.24.1


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

* [PATCH 2/2] dt-bindings: media: csi: Fix clocks description
  2020-02-10 10:04 [PATCH 1/2] dt-bindings: media: csi: Add interconnects properties Maxime Ripard
@ 2020-02-10 10:04 ` Maxime Ripard
  2020-02-19 22:15   ` Rob Herring
  2020-02-19 22:15 ` [PATCH 1/2] dt-bindings: media: csi: Add interconnects properties Rob Herring
  1 sibling, 1 reply; 4+ messages in thread
From: Maxime Ripard @ 2020-02-10 10:04 UTC (permalink / raw)
  To: Chen-Yu Tsai, Maxime Ripard, Mark Rutland, Rob Herring,
	Frank Rowand, sakari.ailus
  Cc: linux-arm-kernel, devicetree, mchehab+huawei, linux-media, Maxime Ripard

Commit 1de243b07666 ("media: dt-bindings: media: sun4i-csi: Add compatible
for CSI1 on A10/A20") introduced support for the CSI1 controller on A10 and
A20 that unlike CSI0 doesn't have an ISP and therefore only have two
clocks, the bus and module clocks.

The clocks and clock-names properties have thus been modified to allow
either two or tree clocks. However, the current list has the ISP clock at
the second position, which means the bindings expects a list of either
bus and isp, or bus, isp and mod. The initial intent of the patch was
obviously to have bus and mod in the former case.

Let's fix the binding so that it validates properly.

Fixes: 1de243b07666 ("media: dt-bindings: media: sun4i-csi: Add compatible for CSI1 on A10/A20")
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
---
 .../media/allwinner,sun4i-a10-csi.yaml        | 30 +++++++++++--------
 1 file changed, 18 insertions(+), 12 deletions(-)

diff --git a/Documentation/devicetree/bindings/media/allwinner,sun4i-a10-csi.yaml b/Documentation/devicetree/bindings/media/allwinner,sun4i-a10-csi.yaml
index afde17d9dab1..8453ee340b9f 100644
--- a/Documentation/devicetree/bindings/media/allwinner,sun4i-a10-csi.yaml
+++ b/Documentation/devicetree/bindings/media/allwinner,sun4i-a10-csi.yaml
@@ -33,20 +33,26 @@ properties:
     maxItems: 1
 
   clocks:
-    minItems: 2
-    maxItems: 3
-    items:
-      - description: The CSI interface clock
-      - description: The CSI ISP clock
-      - description: The CSI DRAM clock
+    oneOf:
+      - items:
+        - description: The CSI interface clock
+        - description: The CSI DRAM clock
+
+      - items:
+        - description: The CSI interface clock
+        - description: The CSI ISP clock
+        - description: The CSI DRAM clock
 
   clock-names:
-    minItems: 2
-    maxItems: 3
-    items:
-      - const: bus
-      - const: isp
-      - const: ram
+    oneOf:
+      - items:
+        - const: bus
+        - const: ram
+
+      - items:
+        - const: bus
+        - const: isp
+        - const: ram
 
   resets:
     maxItems: 1
-- 
2.24.1


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

* Re: [PATCH 1/2] dt-bindings: media: csi: Add interconnects properties
  2020-02-10 10:04 [PATCH 1/2] dt-bindings: media: csi: Add interconnects properties Maxime Ripard
  2020-02-10 10:04 ` [PATCH 2/2] dt-bindings: media: csi: Fix clocks description Maxime Ripard
@ 2020-02-19 22:15 ` Rob Herring
  1 sibling, 0 replies; 4+ messages in thread
From: Rob Herring @ 2020-02-19 22:15 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Chen-Yu Tsai, Maxime Ripard, Mark Rutland, Frank Rowand,
	sakari.ailus, linux-arm-kernel, devicetree, mchehab+huawei,
	linux-media, Maxime Ripard

On Mon, 10 Feb 2020 11:04:16 +0100, Maxime Ripard wrote:
> The Allwinner CSI controller is sitting beside the MBUS that is represented
> as an interconnect.
> 
> Make sure that the interconnect properties are valid in the binding.
> 
> Fixes: 7866d6903ce8 ("media: dt-bindings: media: sun4i-csi: Add compatible for CSI0 on R40")
> Signed-off-by: Maxime Ripard <maxime@cerno.tech>
> ---
>  .../bindings/media/allwinner,sun4i-a10-csi.yaml        | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 

Applied, thanks.

Rob

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

* Re: [PATCH 2/2] dt-bindings: media: csi: Fix clocks description
  2020-02-10 10:04 ` [PATCH 2/2] dt-bindings: media: csi: Fix clocks description Maxime Ripard
@ 2020-02-19 22:15   ` Rob Herring
  0 siblings, 0 replies; 4+ messages in thread
From: Rob Herring @ 2020-02-19 22:15 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Chen-Yu Tsai, Maxime Ripard, Mark Rutland, Frank Rowand,
	sakari.ailus, linux-arm-kernel, devicetree, mchehab+huawei,
	linux-media, Maxime Ripard

On Mon, 10 Feb 2020 11:04:17 +0100, Maxime Ripard wrote:
> Commit 1de243b07666 ("media: dt-bindings: media: sun4i-csi: Add compatible
> for CSI1 on A10/A20") introduced support for the CSI1 controller on A10 and
> A20 that unlike CSI0 doesn't have an ISP and therefore only have two
> clocks, the bus and module clocks.
> 
> The clocks and clock-names properties have thus been modified to allow
> either two or tree clocks. However, the current list has the ISP clock at
> the second position, which means the bindings expects a list of either
> bus and isp, or bus, isp and mod. The initial intent of the patch was
> obviously to have bus and mod in the former case.
> 
> Let's fix the binding so that it validates properly.
> 
> Fixes: 1de243b07666 ("media: dt-bindings: media: sun4i-csi: Add compatible for CSI1 on A10/A20")
> Signed-off-by: Maxime Ripard <maxime@cerno.tech>
> ---
>  .../media/allwinner,sun4i-a10-csi.yaml        | 30 +++++++++++--------
>  1 file changed, 18 insertions(+), 12 deletions(-)
> 

Applied, thanks.

Rob

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

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

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-10 10:04 [PATCH 1/2] dt-bindings: media: csi: Add interconnects properties Maxime Ripard
2020-02-10 10:04 ` [PATCH 2/2] dt-bindings: media: csi: Fix clocks description Maxime Ripard
2020-02-19 22:15   ` Rob Herring
2020-02-19 22:15 ` [PATCH 1/2] dt-bindings: media: csi: Add interconnects properties 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).