public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Luca Ceresoli <luca@lucaceresoli.net>
Cc: linux-media@vger.kernel.org, linux-i2c@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	Mark Rutland <mark.rutland@arm.com>,
	Wolfram Sang <wsa@the-dreams.de>,
	Sakari Ailus <sakari.ailus@linux.intel.com>,
	Hans Verkuil <hverkuil-cisco@xs4all.nl>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Kieran Bingham <kieran.bingham@ideasonboard.com>,
	Jacopo Mondi <jacopo@jmondi.org>,
	Vladimir Zapolskiy <vz@mleia.com>, Peter Rosin <peda@axentia.se>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>,
	matti.vaittinen@fi.rohmeurope.com
Subject: Re: [RFCv3 4/6] media: dt-bindings: add DS90UB954-Q1 video deserializer
Date: Mon, 7 Feb 2022 13:39:57 -0600	[thread overview]
Message-ID: <YgF1ja8/Uab/8ZWt@robh.at.kernel.org> (raw)
In-Reply-To: <20220206115939.3091265-5-luca@lucaceresoli.net>

On Sun, Feb 06, 2022 at 12:59:37PM +0100, Luca Ceresoli wrote:
> Describe the Texas Instruments DS90UB954-Q1, a 2-input MIPI CSI-2 video
> deserializer with I2C Address Translator and remote GPIOs.
> 
> Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
> 
> ---
> 
> Changes RFCv2 -> RFCv3:
> 
>  - rewrite in yaml
>  - use new layout based on remote-chips under the main deser node
>  - new clock configuration based on common clock framework
> 
> Changes RFCv1 -> RFCv2:
> 
>  - add explicit aliases for the FPD-link RX ports (optional)
>  - add proper remote GPIO description
> ---
>  .../bindings/media/i2c/ti,ds90ub954-q1.yaml   | 235 ++++++++++++++++++
>  MAINTAINERS                                   |   6 +
>  2 files changed, 241 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/media/i2c/ti,ds90ub954-q1.yaml
> 
> diff --git a/Documentation/devicetree/bindings/media/i2c/ti,ds90ub954-q1.yaml b/Documentation/devicetree/bindings/media/i2c/ti,ds90ub954-q1.yaml
> new file mode 100644
> index 000000000000..95dc3d22f5d8
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/media/i2c/ti,ds90ub954-q1.yaml
> @@ -0,0 +1,235 @@
> +# 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,ds90ub954-q1.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Texas Instruments DS90UB954-Q1 dual video deserializer
> +
> +maintainers:
> +  - Luca Ceresoli <luca@lucaceresoli.net>
> +
> +description: |
> +  The TI DS90UB954-Q1 is a MIPI CSI-2 video deserializer that forwards
> +  video streams from up to two FPD-Link 3 connections to a MIPI CSI-2
> +  output. It also allows access to remote I2C and GPIO.
> +
> +properties:
> +  compatible:
> +    const: ti,ds90ub954-q1
> +
> +  reg:
> +    description: |
> +      main I2C slave address; optionally aliases for RX port registers and
> +      remote serializers. The main address is mandatory and must be the
> +      first, others are optional and fall back to defaults if not
> +      specified. See "reg-names".

minItems: 1
maxItems: 5

> +
> +  reg-names:
> +    description: |
> +      Names of I2C address used to communicate with the chip, must match
> +      the "reg" values; mandatory if there are 2 or more addresses.
> +      "main" is the main I2C address, used to access shared registers.
> +      "rxport0" and "rxport1" are the I2C alias to access FPD-link RX
> +      port specific registers; must not be used by other slaves on the
> +      same bus. "ser0" and "ser1" are the I2C alias to access the remote
> +      serializer connected on each FPD-link RX port; must not be used by
> +      other slaves on the same bus.
> +    minItems: 1
> +    maxItems: 5
> +    items:
> +      - const: main
> +      - const: rxport0
> +      - const: rxport1
> +      - const: ser0
> +      - const: ser1
> +
> +  clocks:
> +    description: provider of the clock on the XIN/REFCLK pin
> +    maxItems: 1
> +
> +  interrupts:
> +    maxItems: 1
> +
> +  reset-gpios:
> +    description: chip reset GPIO connected to PDB pin (active low)

maxItems: 1

> +
> +  i2c-alias-pool:

Needs a type.

> +    description: |
> +      list of I2C addresses that are known to be available on the "local"
> +      (SoC-to-deser) I2C bus; they will be picked at runtime and used as
> +      aliases to reach remote I2C chips
> +
> +  '#clock-cells':
> +    description: |
> +      the DS90UB954 provides the FPD line rate clock to the serializer
> +    const: 0
> +
> +  ports:
> +    $ref: /schemas/graph.yaml#/properties/ports
> +
> +    patternProperties:
> +      '^port@[01]$':
> +        $ref: /schemas/graph.yaml#/$defs/port-base
> +        description: FPD-Link RX port 0 (RIN0+/RIN0- pins)
> +
> +        properties:
> +          endpoint:
> +            $ref: /schemas/media/video-interfaces.yaml#
> +            unevaluatedProperties: false
> +
> +      '^port@2$':
> +        $ref: /schemas/graph.yaml#/properties/port
> +        description: MIPI-CSI2 TX port
> +
> +  remote-chips:
> +    type: object
> +
> +    properties:
> +      '#address-cells':
> +        const: 1
> +      '#size-cells':
> +        const: 0
> +
> +    patternProperties:
> +      '^remote-chip@([01]+)$':
> +        type: object
> +        $ref: /schemas/media/i2c/ti,ds90ub953-q1.yaml#
> +
> +    required:
> +      - '#address-cells'
> +      - '#size-cells'
> +
> +    additionalProperties: false
> +
> +  i2c-atr:
> +    description: |
> +      Each child describes the I2C bus on the remote side of an RX port
> +    type: object
> +
> +    properties:
> +      '#address-cells':
> +        const: 1
> +      '#size-cells':
> +        const: 0
> +
> +    patternProperties:
> +      '^i2c@([01]+)$':

Only 0 or 1 is valid? Then drop the '+'.

This is an i2c bus, so you need:

           $ref: /schemas/i2c-controller.yaml#'
           unevaluatedProperties: false

> +        type: object
> +
> +        properties:
> +          reg:
> +            maxItems: 1

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

You can drop these as i2c-controller.yaml covers them.

> +          clock-frequency:
> +            minimum: 1

1 is already the minimum. (Well, maybe it is 0, but that's not really 
useful.)

> +            maximum: 1000000
> +
> +    additionalProperties: false
> +
> +required:
> +  - compatible
> +  - reg
> +  - clocks
> +  - ports
> +  - remote-chips
> +  - i2c-atr
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/interrupt-controller/irq.h>
> +    #include <dt-bindings/gpio/gpio.h>
> +    #include <dt-bindings/media/ds90ub953.h>
> +
> +    i2c@0 {
> +      reg = <0x0 0x100>;
> +      #address-cells = <1>;
> +      #size-cells = <0>;
> +
> +      deser: deser@3d {
> +        compatible = "ti,ds90ub954-q1";
> +        reg-names = "main", "rxport0", "rxport1", "ser0", "ser1";
> +        reg       = <0x3d>,  <0x40>,    <0x41>,   <0x44>, <0x45>;
> +        clocks = <&clk_25M>;
> +        interrupt-parent = <&gic>;
> +        interrupts = <3 1 IRQ_TYPE_LEVEL_LOW>;
> +        reset-gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
> +
> +        #clock-cells = <0>;
> +
> +        i2c-alias-pool = /bits/ 16 <0x4a 0x4b 0x4c 0x4d 0x4e 0x4f>;
> +
> +        ports {
> +          #address-cells = <1>;
> +          #size-cells = <0>;
> +
> +          port@0 {
> +            reg = <0>;
> +            ds90ub954_fpd3_in0: endpoint {
> +              remote-endpoint = <&sensor_0_out>;
> +            };
> +          };
> +
> +          port@2 {
> +            reg = <2>;
> +            ds90ub954_mipi_out0: endpoint {
> +                    data-lanes = <1 2 3 4>;
> +                    link-frequencies = /bits/ 64 <400000000>;
> +                    remote-endpoint = <&csirx_0_in>;
> +            };
> +          };
> +        };
> +
> +        remote-chips {
> +          #address-cells = <1>;
> +          #size-cells = <0>;
> +
> +          des0_ser0: 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>;
> +          };
> +        };
> +
> +        i2c-atr {
> +          #address-cells = <1>;
> +          #size-cells = <0>;
> +
> +          remote_i2c0: i2c@0 {
> +            reg = <0>;
> +            #address-cells = <1>;
> +            #size-cells = <0>;
> +
> +            sensor_0@1a {
> +              compatible = "sony,imx274";
> +              reg = <0x1a>;
> +
> +              reset-gpios = <&des0_ser0 1 GPIO_ACTIVE_LOW>;
> +
> +              port {
> +                sensor_0_out: endpoint {
> +                  remote-endpoint = <&ds90ub954_fpd3_in0>;
> +                };
> +              };
> +            };
> +          };
> +        };
> +      };
> +    };
> +
> +...
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 4429ce035496..f0156062f788 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -19097,6 +19097,12 @@ S:	Maintained
>  F:	Documentation/devicetree/bindings/media/i2c/ti,ds90ub953-q1.yaml
>  F:	include/dt-bindings/media/ds90ub953.h
>  
> +TEXAS INSTRUMENTS DS90UB954 VIDEO DESERIALIZER DRIVER
> +M:	Luca Ceresoli <luca@lucaceresoli.net>
> +L:	linux-media@vger.kernel.org
> +S:	Maintained
> +F:	Documentation/devicetree/bindings/media/i2c/ti,ds90ub954-q1.yaml
> +
>  TEXAS INSTRUMENTS' SYSTEM CONTROL INTERFACE (TISCI) PROTOCOL DRIVER
>  M:	Nishanth Menon <nm@ti.com>
>  M:	Tero Kristo <kristo@kernel.org>
> -- 
> 2.25.1
> 
> 

  parent reply	other threads:[~2022-02-07 19:42 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-06 11:59 [RFCv3 0/6] Hi, Luca Ceresoli
2022-02-06 11:59 ` [RFCv3 1/6] i2c: core: let adapters be notified of client attach/detach Luca Ceresoli
2022-02-06 11:59 ` [RFCv3 2/6] i2c: add I2C Address Translator (ATR) support Luca Ceresoli
2022-02-08 11:16   ` Andy Shevchenko
2022-02-16  8:40     ` Luca Ceresoli
2022-02-17  5:12       ` Vaittinen, Matti
2022-03-16 14:11   ` Vaittinen, Matti
2022-03-16 14:25     ` Luca Ceresoli
2022-02-06 11:59 ` [RFCv3 3/6] media: dt-bindings: add DS90UB953-Q1 video serializer Luca Ceresoli
2022-02-07 21:48   ` Rob Herring
2022-02-06 11:59 ` [RFCv3 4/6] media: dt-bindings: add DS90UB954-Q1 video deserializer Luca Ceresoli
2022-02-06 18:46   ` Rob Herring
2022-02-07 19:39   ` Rob Herring [this message]
2022-02-06 11:59 ` [RFCv3 5/6] media: ds90ub954: new driver for TI " Luca Ceresoli
2022-02-06 11:59 ` [RFCv3 6/6] media: ds90ub953: new driver for TI DS90UB953-Q1 video serializer Luca Ceresoli
2022-02-06 12:05 ` [RFCv3 0/6] TI camera serdes and I2C address translation Luca Ceresoli
2022-02-07 12:06 ` [RFCv3 0/6] TI camera serdes and I2C address translation (Was: [RFCv3 0/6] Hi,) Tomi Valkeinen
2022-02-07 13:21   ` Vaittinen, Matti
2022-02-07 14:07     ` Luca Ceresoli
2022-02-07 14:38       ` Vaittinen, Matti
2022-02-07 16:23         ` Tomi Valkeinen
2022-02-08  6:40           ` Vaittinen, Matti
2022-02-08  8:28             ` Tomi Valkeinen
2022-02-08  9:36               ` Vaittinen, Matti

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YgF1ja8/Uab/8ZWt@robh.at.kernel.org \
    --to=robh@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=jacopo@jmondi.org \
    --cc=kieran.bingham@ideasonboard.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=luca@lucaceresoli.net \
    --cc=mark.rutland@arm.com \
    --cc=matti.vaittinen@fi.rohmeurope.com \
    --cc=mchehab@kernel.org \
    --cc=peda@axentia.se \
    --cc=sakari.ailus@linux.intel.com \
    --cc=tomi.valkeinen@ideasonboard.com \
    --cc=vz@mleia.com \
    --cc=wsa@the-dreams.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox