diff mbox series

[RFCv3,3/6] media: dt-bindings: add DS90UB953-Q1 video serializer

Message ID 20220206115939.3091265-4-luca@lucaceresoli.net (mailing list archive)
State New, archived
Headers show
Series Hi, | expand

Commit Message

Luca Ceresoli Feb. 6, 2022, 11:59 a.m. UTC
Describe the Texas Instruments DS90UB953-Q1, a MIPI CSI-2 video serializer
with I2C Address Translator and remote GPIOs.

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>

---

Changes RFCv2 -> RFCv3:

 - rewrite in yaml

Changes RFCv1 -> RFCv2: none, this patch is new in RFCv2
---
 .../bindings/media/i2c/ti,ds90ub953-q1.yaml   | 96 +++++++++++++++++++
 MAINTAINERS                                   |  7 ++
 include/dt-bindings/media/ds90ub953.h         | 16 ++++
 3 files changed, 119 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/media/i2c/ti,ds90ub953-q1.yaml
 create mode 100644 include/dt-bindings/media/ds90ub953.h

Comments

Rob Herring (Arm) Feb. 7, 2022, 9:48 p.m. UTC | #1
On Sun, Feb 06, 2022 at 12:59:36PM +0100, Luca Ceresoli wrote:
> Describe the Texas Instruments DS90UB953-Q1, a MIPI CSI-2 video serializer
> with I2C Address Translator and remote GPIOs.
> 
> Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
> 
> ---
> 
> Changes RFCv2 -> RFCv3:
> 
>  - rewrite in yaml
> 
> Changes RFCv1 -> RFCv2: none, this patch is new in RFCv2
> ---
>  .../bindings/media/i2c/ti,ds90ub953-q1.yaml   | 96 +++++++++++++++++++
>  MAINTAINERS                                   |  7 ++
>  include/dt-bindings/media/ds90ub953.h         | 16 ++++
>  3 files changed, 119 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/media/i2c/ti,ds90ub953-q1.yaml
>  create mode 100644 include/dt-bindings/media/ds90ub953.h
> 
> diff --git a/Documentation/devicetree/bindings/media/i2c/ti,ds90ub953-q1.yaml b/Documentation/devicetree/bindings/media/i2c/ti,ds90ub953-q1.yaml
> new file mode 100644
> index 000000000000..2a836a3e65e9
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/media/i2c/ti,ds90ub953-q1.yaml
> @@ -0,0 +1,96 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +# Copyright (C) 2019 Renesas Electronics Corp.
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/media/i2c/ti,ds90ub953-q1.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Texas Instruments DS90UB953-Q1 video serializer
> +
> +maintainers:
> +  - Luca Ceresoli <luca@lucaceresoli.net>
> +
> +description: |
> +  The TI DS90UB953-Q1 is a MIPI CSI-2 video serializer that forwards a MIPI
> +  CSI-2 input video stream over an FPD Link 3 connection to a remote
> +  deserializer. It also allows access to I2C and GPIO from the deserializer.
> +
> +  The DT definitions can be found in include/dt-bindings/media/ds90ub953.h
> +
> +  When used as a the remote counterpart of a deserializer (e.g. the
> +  DS90UB954-Q1), the serializer is described in the
> +  "deserializer/remote-chips/remote-chip@[01]" node.
> +
> +properties:
> +  compatible:
> +    const: ti,ds90ub953-q1
> +
> +  reg:
> +    description: |
> +      Index of the remote (serializer) RX port that this serializer is
> +      connected to.
> +    maxItems: 1
> +
> +  clocks:
> +    description: FPD-Link line rate (provided by the deserializer)
> +    maxItems: 1
> +
> +  gpio-controller: true
> +
> +  '#gpio-cells':
> +    const: 2
> +
> +  '#clock-cells':
> +    const: 0
> +
> +  ti,gpio-functions:
> +    description: |
> +      A list of 4 values defining how the 4 GPIO pins are connected in
> +      hardware; possible values are:
> +      - DS90_GPIO_FUNC_UNUSED (0): the GPIO is not unused
> +      - DS90_GPIO_FUNC_INPUT (1): the GPIO is an input to the ds90ub953,
> +        the remote chip (deserializer) can read its value
> +      - DS90_GPIO_FUNC_OUTPUT_REMOTE (2): the GPIO is an output from the
> +        ds90ub953, the remote chip (deserializer) can set its value
> +      For unspecified values the GPIO is assumed to be unused.
> +    $ref: /schemas/types.yaml#/definitions/uint32-array
> +    maxItems: 4
> +
> +patternProperties:
> +  '^ti,ds90ub953-q1-(clk|d[0-3])-inv-pol-quirk$':
> +    description: |
> +      The MIPI CSI-2 input clock lane or any of the data lanes has inverted
> +      polarity in hardware

What's the type?

> +
> +required:
> +  - compatible
> +  - reg
> +  - clocks
> +  - gpio-controller
> +  - '#gpio-cells'
> +  - '#clock-cells'
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/media/ds90ub953.h>
> +    remote-chips {
> +      #address-cells = <1>;
> +      #size-cells = <0>;
> +
> +      remote-chip@0 {
> +        reg = <0>;
> +        compatible = "ti,ds90ub953-q1";
> +        clocks = <&deser>;
> +        ti,gpio-functions =
> +          <DS90_GPIO_FUNC_UNUSED
> +          DS90_GPIO_FUNC_OUTPUT_REMOTE
> +          DS90_GPIO_FUNC_UNUSED
> +          DS90_GPIO_FUNC_UNUSED>;
> +
> +        gpio-controller;
> +        #gpio-cells = <2>;
> +        #clock-cells = <0>;
> +      };
> +    };
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 7383aec87e4a..4429ce035496 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -19090,6 +19090,13 @@ F:	include/linux/dma/k3-udma-glue.h
>  F:	include/linux/dma/ti-cppi5.h
>  F:	include/linux/dma/k3-psil.h
>  
> +TEXAS INSTRUMENTS DS90UB953 VIDEO SERIALIZER DRIVER
> +M:	Luca Ceresoli <luca@lucaceresoli.net>
> +L:	linux-media@vger.kernel.org
> +S:	Maintained
> +F:	Documentation/devicetree/bindings/media/i2c/ti,ds90ub953-q1.yaml
> +F:	include/dt-bindings/media/ds90ub953.h
> +
>  TEXAS INSTRUMENTS' SYSTEM CONTROL INTERFACE (TISCI) PROTOCOL DRIVER
>  M:	Nishanth Menon <nm@ti.com>
>  M:	Tero Kristo <kristo@kernel.org>
> diff --git a/include/dt-bindings/media/ds90ub953.h b/include/dt-bindings/media/ds90ub953.h
> new file mode 100644
> index 000000000000..5359432968e9
> --- /dev/null
> +++ b/include/dt-bindings/media/ds90ub953.h
> @@ -0,0 +1,16 @@
> +/* SPDX-License-Identifier: GPL-2.0 */

Dual license please.

> +/**
> + * Definitions for the Texas Instruments DS90UB953-Q1 video serializer
> + *
> + * Copyright (c) 2019 Luca Ceresoli <luca@lucaceresoli.net>
> + */
> +
> +#ifndef _DS90UB953_H
> +#define _DS90UB953_H
> +
> +#define DS90_GPIO_FUNC_UNUSED             0
> +#define DS90_GPIO_FUNC_INPUT              1
> +#define DS90_GPIO_FUNC_OUTPUT_REMOTE      2
> +#define DS90_GPIO_N_FUNCS                 3
> +
> +#endif /* _DS90UB953_H */
> -- 
> 2.25.1
> 
>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/media/i2c/ti,ds90ub953-q1.yaml b/Documentation/devicetree/bindings/media/i2c/ti,ds90ub953-q1.yaml
new file mode 100644
index 000000000000..2a836a3e65e9
--- /dev/null
+++ b/Documentation/devicetree/bindings/media/i2c/ti,ds90ub953-q1.yaml
@@ -0,0 +1,96 @@ 
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+# Copyright (C) 2019 Renesas Electronics Corp.
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/media/i2c/ti,ds90ub953-q1.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Texas Instruments DS90UB953-Q1 video serializer
+
+maintainers:
+  - Luca Ceresoli <luca@lucaceresoli.net>
+
+description: |
+  The TI DS90UB953-Q1 is a MIPI CSI-2 video serializer that forwards a MIPI
+  CSI-2 input video stream over an FPD Link 3 connection to a remote
+  deserializer. It also allows access to I2C and GPIO from the deserializer.
+
+  The DT definitions can be found in include/dt-bindings/media/ds90ub953.h
+
+  When used as a the remote counterpart of a deserializer (e.g. the
+  DS90UB954-Q1), the serializer is described in the
+  "deserializer/remote-chips/remote-chip@[01]" node.
+
+properties:
+  compatible:
+    const: ti,ds90ub953-q1
+
+  reg:
+    description: |
+      Index of the remote (serializer) RX port that this serializer is
+      connected to.
+    maxItems: 1
+
+  clocks:
+    description: FPD-Link line rate (provided by the deserializer)
+    maxItems: 1
+
+  gpio-controller: true
+
+  '#gpio-cells':
+    const: 2
+
+  '#clock-cells':
+    const: 0
+
+  ti,gpio-functions:
+    description: |
+      A list of 4 values defining how the 4 GPIO pins are connected in
+      hardware; possible values are:
+      - DS90_GPIO_FUNC_UNUSED (0): the GPIO is not unused
+      - DS90_GPIO_FUNC_INPUT (1): the GPIO is an input to the ds90ub953,
+        the remote chip (deserializer) can read its value
+      - DS90_GPIO_FUNC_OUTPUT_REMOTE (2): the GPIO is an output from the
+        ds90ub953, the remote chip (deserializer) can set its value
+      For unspecified values the GPIO is assumed to be unused.
+    $ref: /schemas/types.yaml#/definitions/uint32-array
+    maxItems: 4
+
+patternProperties:
+  '^ti,ds90ub953-q1-(clk|d[0-3])-inv-pol-quirk$':
+    description: |
+      The MIPI CSI-2 input clock lane or any of the data lanes has inverted
+      polarity in hardware
+
+required:
+  - compatible
+  - reg
+  - clocks
+  - gpio-controller
+  - '#gpio-cells'
+  - '#clock-cells'
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/media/ds90ub953.h>
+    remote-chips {
+      #address-cells = <1>;
+      #size-cells = <0>;
+
+      remote-chip@0 {
+        reg = <0>;
+        compatible = "ti,ds90ub953-q1";
+        clocks = <&deser>;
+        ti,gpio-functions =
+          <DS90_GPIO_FUNC_UNUSED
+          DS90_GPIO_FUNC_OUTPUT_REMOTE
+          DS90_GPIO_FUNC_UNUSED
+          DS90_GPIO_FUNC_UNUSED>;
+
+        gpio-controller;
+        #gpio-cells = <2>;
+        #clock-cells = <0>;
+      };
+    };
diff --git a/MAINTAINERS b/MAINTAINERS
index 7383aec87e4a..4429ce035496 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -19090,6 +19090,13 @@  F:	include/linux/dma/k3-udma-glue.h
 F:	include/linux/dma/ti-cppi5.h
 F:	include/linux/dma/k3-psil.h
 
+TEXAS INSTRUMENTS DS90UB953 VIDEO SERIALIZER DRIVER
+M:	Luca Ceresoli <luca@lucaceresoli.net>
+L:	linux-media@vger.kernel.org
+S:	Maintained
+F:	Documentation/devicetree/bindings/media/i2c/ti,ds90ub953-q1.yaml
+F:	include/dt-bindings/media/ds90ub953.h
+
 TEXAS INSTRUMENTS' SYSTEM CONTROL INTERFACE (TISCI) PROTOCOL DRIVER
 M:	Nishanth Menon <nm@ti.com>
 M:	Tero Kristo <kristo@kernel.org>
diff --git a/include/dt-bindings/media/ds90ub953.h b/include/dt-bindings/media/ds90ub953.h
new file mode 100644
index 000000000000..5359432968e9
--- /dev/null
+++ b/include/dt-bindings/media/ds90ub953.h
@@ -0,0 +1,16 @@ 
+/* SPDX-License-Identifier: GPL-2.0 */
+/**
+ * Definitions for the Texas Instruments DS90UB953-Q1 video serializer
+ *
+ * Copyright (c) 2019 Luca Ceresoli <luca@lucaceresoli.net>
+ */
+
+#ifndef _DS90UB953_H
+#define _DS90UB953_H
+
+#define DS90_GPIO_FUNC_UNUSED             0
+#define DS90_GPIO_FUNC_INPUT              1
+#define DS90_GPIO_FUNC_OUTPUT_REMOTE      2
+#define DS90_GPIO_N_FUNCS                 3
+
+#endif /* _DS90UB953_H */