Skip to contentSkip to conversation

media: dt-bindings: ovti,ov2680: Document more properties

PATCH Superseded Fabio Estevam 2 participants 2 messages Apr 1, 2024

Subsystems (3)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 media: dt-bindings: ovti,ov2680: Document more properties

From: Fabio Estevam <[email protected]>

OV2680 has a single data lane MIPI interface.

Document the clock-lanes and data-lanes properties to avoid the following dt-schema warning:

imx7s-warp.dtb: camera@36: port:endpoint: Unevaluated properties are not allowed ('clock-lanes', 'data-lanes' were unexpected)
from schema $id: http://devicetree.org/schemas/media/i2c/ovti,ov2680.yaml#

While at it, also document the link-frequencies property as recommended by the following document:

https://www.kernel.org/doc/html/v6.9-rc1/driver-api/media/camera-sensor.html#handling-clocks

---
Changes since v1:
- Keep the existing 'additionalProperties: false'. (Krzysztof)
- Also document link-frequencies.

 .../bindings/media/i2c/ovti,ov2680.yaml       | 20 ++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/media/i2c/ovti,ov2680.yaml +19 -1
index cf456f8d9ddc..a1cb08283818 100644
@@ -50,9 +50,24 @@ properties:
       Definition of the regulator used as digital power supply.
 
   port:
-    $ref: /schemas/graph.yaml#/properties/port
     description:
       A node containing an output port node.
+    $ref: /schemas/graph.yaml#/$defs/port-base
+    additionalProperties: false
+
+    properties:
+      endpoint:
+        $ref: /schemas/media/video-interfaces.yaml#
+        unevaluatedProperties: false
+
+        properties:
+          clock-lanes:
+            const: 0
+
+          data-lanes:
+            const: 1
+
+          link-frequencies: true
 
 required:
   - compatible
@@ -89,6 +104,9 @@ examples:
                 port {
                         ov2680_to_mipi: endpoint {
                                 remote-endpoint = <&mipi_from_sensor>;
+                                clock-lanes = <0>;
+                                data-lanes = <1>;
+                                link-frequencies = /bits/ 64 <330000000>;
                         };
                 };
         };
Signature · 1 line
2.34.1
#1 lore raw

Hi Fabio,

Thank you for the patch.

Quoted 32 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

OV2680 has a single data lane MIPI interface.

Document the clock-lanes and data-lanes properties to avoid the following dt-schema warning:

imx7s-warp.dtb: camera@36: port:endpoint: Unevaluated properties are not allowed ('clock-lanes', 'data-lanes' were unexpected)
from schema $id: http://devicetree.org/schemas/media/i2c/ovti,ov2680.yaml#

While at it, also document the link-frequencies property as recommended by the following document:

https://www.kernel.org/doc/html/v6.9-rc1/driver-api/media/camera-sensor.html#handling-clocks

---
Changes since v1:
- Keep the existing 'additionalProperties: false'. (Krzysztof)
- Also document link-frequencies.

 .../bindings/media/i2c/ovti,ov2680.yaml       | 20 ++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/media/i2c/ovti,ov2680.yaml +0 -0
index cf456f8d9ddc..a1cb08283818 100644
@@ -50,9 +50,24 @@ properties:
       Definition of the regulator used as digital power supply.
 
   port:

Documentation/devicetree/bindings/media/i2c/ovti,ov2680.yaml properties: · line 61

Quoted 10 lines
Documentation/devicetree/bindings/media/i2c/ovti,ov2680.yaml +7 -1
-    $ref: /schemas/graph.yaml#/properties/port
     description:
       A node containing an output port node.
+    $ref: /schemas/graph.yaml#/$defs/port-base
+    additionalProperties: false
+
+    properties:
+      endpoint:
+        $ref: /schemas/media/video-interfaces.yaml#
+        unevaluatedProperties: false

I recommend using

additionalProperties: false

as the bindings shouldn't allow all the other properties defined in video-interfaces.yaml that are not applicable for this device. It will require adding

remote-endpoint: true

to the properties below.

Documentation/devicetree/bindings/media/i2c/ovti,ov2680.yaml properties: · line 68

Quoted 7 lines
Documentation/devicetree/bindings/media/i2c/ovti,ov2680.yaml +7 -0
+
+        properties:
+          clock-lanes:
+            const: 0
+
+          data-lanes:
+            const: 1

I see there's an ongoing discussion in v1 about these two properties, I'll let Sakari and you figure it out :-)

Documentation/devicetree/bindings/media/i2c/ovti,ov2680.yaml properties: · line 70

Quoted 2 lines
Documentation/devicetree/bindings/media/i2c/ovti,ov2680.yaml +2 -0
+
+          link-frequencies: true

I think this one should one marked as mandatory.

Quoted 13 lines
Documentation/devicetree/bindings/media/i2c/ovti,ov2680.yaml +3 -0
 required:
   - compatible
@@ -89,6 +104,9 @@ examples:
                 port {
                         ov2680_to_mipi: endpoint {
                                 remote-endpoint = <&mipi_from_sensor>;
+                                clock-lanes = <0>;
+                                data-lanes = <1>;
+                                link-frequencies = /bits/ 64 <330000000>;
                         };
                 };
         };
Signature · 3 lines
Regards,

Laurent Pinchart