diff mbox series

[v2,1/2] media: dt-bindings: Add Intersil ISL79987 DT bindings

Message ID 20210602132950.4167596-2-m.tretter@pengutronix.de (mailing list archive)
State New, archived
Headers show
Series media: i2c: isl7998x: Add driver for Intersil ISL7998x | expand

Commit Message

Michael Tretter June 2, 2021, 1:29 p.m. UTC
From: Marek Vasut <marex@denx.de>

Add bindings for the Intersil ISL79987 analog to MIPI CSI-2 decoder.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: devicetree@vger.kernel.org
To: linux-media@vger.kernel.org
Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
---
Changelog:

v2:

- convert binding to yaml
- change description to match only isl79987
- replace num-inputs property with multiple ports
- add reset gpio
---
 .../bindings/media/i2c/isil,isl79987.yaml     | 108 ++++++++++++++++++
 1 file changed, 108 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/media/i2c/isil,isl79987.yaml

Comments

Rob Herring (Arm) June 10, 2021, 5:57 p.m. UTC | #1
On Wed, Jun 02, 2021 at 03:29:49PM +0200, Michael Tretter wrote:
> From: Marek Vasut <marex@denx.de>
> 
> Add bindings for the Intersil ISL79987 analog to MIPI CSI-2 decoder.
> 
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Sakari Ailus <sakari.ailus@linux.intel.com>
> Cc: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: devicetree@vger.kernel.org
> To: linux-media@vger.kernel.org
> Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
> ---
> Changelog:
> 
> v2:
> 
> - convert binding to yaml
> - change description to match only isl79987
> - replace num-inputs property with multiple ports
> - add reset gpio
> ---
>  .../bindings/media/i2c/isil,isl79987.yaml     | 108 ++++++++++++++++++
>  1 file changed, 108 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/media/i2c/isil,isl79987.yaml
> 
> diff --git a/Documentation/devicetree/bindings/media/i2c/isil,isl79987.yaml b/Documentation/devicetree/bindings/media/i2c/isil,isl79987.yaml
> new file mode 100644
> index 000000000000..4aa27511b1ab
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/media/i2c/isil,isl79987.yaml
> @@ -0,0 +1,108 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/media/i2c/isil,isl79987.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Intersil ISL79987 Analog to MIPI CSI-2 decoder
> +
> +maintainers:
> +  - Michael Tretter <m.tretter@pengutronix.de>
> +  - Marek Vasut <marex@denx.de>
> +
> +description:
> +  The Intersil ISL79987 is an analog to MIPI CSI-2 decoder which is capable of
> +  receiving up to four analog stream and multiplexing them into up to four MIPI
> +  CSI-2 virtual channels, using one MIPI clock lane and 1/2 data lanes.
> +
> +properties:
> +  compatible:
> +    enum:
> +      - isil,isl79987
> +
> +  reg:
> +    maxItems: 1
> +
> +  reset-gpios:
> +    maxItems: 1
> +    description:
> +      A GPIO spec for the RSTB pin (active high)
> +
> +  pd-gpios:

powerdown-gpios is the somewhat standard name.

> +    maxItems: 1
> +    description:
> +      A GPIO spec for the Power Down pin (active high)
> +
> +  ports:
> +    type: object

Please reference the graph.yaml schema. There's several examples in the 
tree now what this should look like.

> +    description:
> +      A node containing input and output port nodes with endpoint definitions
> +      as documented in
> +      Documentation/devicetree/bindings/media/video-interfaces.txt

This is now video-interfaces.yaml, but it's not actually used here.

> +    properties:

> +      '#address-cells':
> +        const: 1
> +      '#size-cells':
> +        const: 0

These can be dropped (covered by graph.yaml).

> +      port@0:
> +        type: object
> +        description: Output port
> +
> +    patternProperties:
> +      "^port@[1-4]$":
> +        type: object
> +        description: Input ports
> +
> +    required:
> +      - port@0
> +
> +additionalProperties: false
> +
> +required:
> +  - compatible
> +  - reg
> +  - ports
> +
> +examples:
> +  - |
> +    #include <dt-bindings/gpio/gpio.h>
> +
> +    i2c {
> +      #address-cells = <1>;
> +      #size-cells = <0>;
> +
> +      isl7998x_mipi@44 {
> +        compatible = "isil,isl79987";
> +        reg = <0x44>;
> +        pd-gpios = <&gpio3 27 GPIO_ACTIVE_HIGH>;
> +        reset-gpios = <&gpio3 28 GPIO_ACTIVE_HIGH>;
> +
> +        ports {
> +          #address-cells = <1>;
> +          #size-cells = <0>;
> +
> +          port@0 {
> +            reg = <0>;
> +            isl79987_out: endpoint {
> +              remote-endpoint = <&mipi_csi2_in>;
> +              clock-lanes = <0>;
> +              data-lanes = <1 2>;
> +            };
> +          };
> +
> +          port@1 {
> +            reg = <1>;
> +            endpoint {
> +              remote-endpoint = <&camera_0>;
> +            };
> +          };
> +
> +          port@2 {
> +            reg = <2>;
> +            endpoint {
> +              remote-endpoint = <&camera_1>;
> +            };
> +          };
> +        };
> +      };
> +    };
> -- 
> 2.29.2
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/media/i2c/isil,isl79987.yaml b/Documentation/devicetree/bindings/media/i2c/isil,isl79987.yaml
new file mode 100644
index 000000000000..4aa27511b1ab
--- /dev/null
+++ b/Documentation/devicetree/bindings/media/i2c/isil,isl79987.yaml
@@ -0,0 +1,108 @@ 
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/media/i2c/isil,isl79987.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Intersil ISL79987 Analog to MIPI CSI-2 decoder
+
+maintainers:
+  - Michael Tretter <m.tretter@pengutronix.de>
+  - Marek Vasut <marex@denx.de>
+
+description:
+  The Intersil ISL79987 is an analog to MIPI CSI-2 decoder which is capable of
+  receiving up to four analog stream and multiplexing them into up to four MIPI
+  CSI-2 virtual channels, using one MIPI clock lane and 1/2 data lanes.
+
+properties:
+  compatible:
+    enum:
+      - isil,isl79987
+
+  reg:
+    maxItems: 1
+
+  reset-gpios:
+    maxItems: 1
+    description:
+      A GPIO spec for the RSTB pin (active high)
+
+  pd-gpios:
+    maxItems: 1
+    description:
+      A GPIO spec for the Power Down pin (active high)
+
+  ports:
+    type: object
+    description:
+      A node containing input and output port nodes with endpoint definitions
+      as documented in
+      Documentation/devicetree/bindings/media/video-interfaces.txt
+    properties:
+      '#address-cells':
+        const: 1
+      '#size-cells':
+        const: 0
+      port@0:
+        type: object
+        description: Output port
+
+    patternProperties:
+      "^port@[1-4]$":
+        type: object
+        description: Input ports
+
+    required:
+      - port@0
+
+additionalProperties: false
+
+required:
+  - compatible
+  - reg
+  - ports
+
+examples:
+  - |
+    #include <dt-bindings/gpio/gpio.h>
+
+    i2c {
+      #address-cells = <1>;
+      #size-cells = <0>;
+
+      isl7998x_mipi@44 {
+        compatible = "isil,isl79987";
+        reg = <0x44>;
+        pd-gpios = <&gpio3 27 GPIO_ACTIVE_HIGH>;
+        reset-gpios = <&gpio3 28 GPIO_ACTIVE_HIGH>;
+
+        ports {
+          #address-cells = <1>;
+          #size-cells = <0>;
+
+          port@0 {
+            reg = <0>;
+            isl79987_out: endpoint {
+              remote-endpoint = <&mipi_csi2_in>;
+              clock-lanes = <0>;
+              data-lanes = <1 2>;
+            };
+          };
+
+          port@1 {
+            reg = <1>;
+            endpoint {
+              remote-endpoint = <&camera_0>;
+            };
+          };
+
+          port@2 {
+            reg = <2>;
+            endpoint {
+              remote-endpoint = <&camera_1>;
+            };
+          };
+        };
+      };
+    };