Devicetree
 help / color / mirror / Atom feed
From: Jacopo Mondi <jacopo@jmondi.org>
To: Rui Miguel Silva <rmfrfs@gmail.com>
Cc: Rob Herring <robh+dt@kernel.org>,
	sakari.ailus@linux.intel.com, Hans Verkuil <hverkuil@xs4all.nl>,
	linux-media@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v2 2/3] dt-bindings: imx7-csi: convert bindings to yaml
Date: Thu, 15 Oct 2020 17:25:46 +0200	[thread overview]
Message-ID: <20201015152546.s5fvuxklgludyv2u@uno.localdomain> (raw)
In-Reply-To: <20201014142759.726823-3-rmfrfs@gmail.com>

Hi Rui,

On Wed, Oct 14, 2020 at 03:27:58PM +0100, Rui Miguel Silva wrote:
> Convert imx7-csi bindings documentation to yaml schema, remove the
> textual bindings document and update MAINTAINERS entry.
>
> Signed-off-by: Rui Miguel Silva <rmfrfs@gmail.com>
> ---
>  .../devicetree/bindings/media/imx7-csi.txt    | 42 ----------
>  .../bindings/media/nxp,imx7-csi.yaml          | 84 +++++++++++++++++++
>  MAINTAINERS                                   |  2 +-
>  3 files changed, 85 insertions(+), 43 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/media/imx7-csi.txt
>  create mode 100644 Documentation/devicetree/bindings/media/nxp,imx7-csi.yaml
>
> diff --git a/Documentation/devicetree/bindings/media/imx7-csi.txt b/Documentation/devicetree/bindings/media/imx7-csi.txt
> deleted file mode 100644
> index d80ceefa0c00..000000000000
> --- a/Documentation/devicetree/bindings/media/imx7-csi.txt
> +++ /dev/null
> @@ -1,42 +0,0 @@
> -Freescale i.MX7 CMOS Sensor Interface
> -=====================================
> -
> -csi node
> ---------
> -
> -This is device node for the CMOS Sensor Interface (CSI) which enables the chip
> -to connect directly to external CMOS image sensors.
> -
> -Required properties:
> -
> -- compatible    : "fsl,imx7-csi" or "fsl,imx6ul-csi";
> -- reg           : base address and length of the register set for the device;
> -- interrupts    : should contain CSI interrupt;
> -- clocks        : list of clock specifiers, see
> -        Documentation/devicetree/bindings/clock/clock-bindings.txt for details;
> -- clock-names   : must contain "mclk";
> -
> -The device node shall contain one 'port' child node with one child 'endpoint'
> -node, according to the bindings defined in:
> -Documentation/devicetree/bindings/media/video-interfaces.txt.
> -
> -In the following example a remote endpoint is a video multiplexer.
> -
> -example:
> -
> -                csi: csi@30710000 {
> -                        #address-cells = <1>;
> -                        #size-cells = <0>;
> -
> -                        compatible = "fsl,imx7-csi";
> -                        reg = <0x30710000 0x10000>;
> -                        interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
> -                        clocks = <&clks IMX7D_CSI_MCLK_ROOT_CLK>;
> -                        clock-names = "mclk";
> -
> -                        port {
> -                                csi_from_csi_mux: endpoint {
> -                                        remote-endpoint = <&csi_mux_to_csi>;
> -                                };
> -                        };
> -                };
> diff --git a/Documentation/devicetree/bindings/media/nxp,imx7-csi.yaml b/Documentation/devicetree/bindings/media/nxp,imx7-csi.yaml
> new file mode 100644
> index 000000000000..9fe064dd5ba3
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/media/nxp,imx7-csi.yaml
> @@ -0,0 +1,84 @@
> +# SPDX-License-Identifier: GPL-2.0

Shouldn't bindings be dual licensed ?

> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/media/nxp,imx7-csi.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: i.MX7 CMOS Sensor Interface
> +
> +maintainers:
> +  - Rui Miguel Silva <rmfrfs@gmail.com>
> +
> +description: |
> +  This is device node for the CMOS Sensor Interface (CSI) which enables the
> +  chip to connect directly to external CMOS image sensors.

Pretty cryptic, not your fault as it was there already. Is NXP using
CSI as a name but it's not really MIPI CSI-2 ? This seems to be a
bridge, right ?

> +
> +properties:
> +  compatible:
> +    enum:
> +      - fsl,imx7-csi
> +      - fsl,imx6ul-csi
> +
> +  reg:
> +    maxItems: 1
> +
> +  interrupts:
> +    maxItems: 1
> +
> +  clocks:
> +    maxItems: 1
> +
> +  clock-names:
> +    items:
> +      - const: mclk
> +
> +  port:
> +    type: object
> +    additionalProperties: false
> +    description:
> +      A node containing input port nodes with endpoint definitions as documented
> +      in Documentation/devicetree/bindings/media/video-interfaces.txt
> +
> +    properties:
> +      endpoint:
> +        type: object
> +        additionalProperties: false
> +
> +        properties:
> +          remote-endpoint: true
> +
> +        required:
> +          - remote-endpoint
> +
> +    required:
> +      - endpoint

As per the comment on ov2680, this last part can be removed

> +
> +required:
> +  - compatible
> +  - reg
> +  - interrupts
> +  - clocks
> +  - clock-names
> +  - port
> +
> +unevaluatedProperties: false

additionalProperties: false ?

This apart
Reviewed-by: Jacopo Mondi <jacopo+renesas@jmondi.org>

Thanks
  j

> +
> +examples:
> +  - |
> +    #include <dt-bindings/clock/imx7d-clock.h>
> +    #include <dt-bindings/interrupt-controller/arm-gic.h>
> +    #include <dt-bindings/interrupt-controller/irq.h>
> +
> +    csi: csi@30710000 {
> +            compatible = "fsl,imx7-csi";
> +            reg = <0x30710000 0x10000>;
> +            interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
> +            clocks = <&clks IMX7D_CSI_MCLK_ROOT_CLK>;
> +            clock-names = "mclk";
> +
> +            port {
> +                    csi_from_csi_mux: endpoint {
> +                            remote-endpoint = <&csi_mux_to_csi>;
> +                    };
> +            };
> +    };
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 926dcdc4794c..b7f7f14cd85b 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -10773,8 +10773,8 @@ L:	linux-media@vger.kernel.org
>  S:	Maintained
>  T:	git git://linuxtv.org/media_tree.git
>  F:	Documentation/admin-guide/media/imx7.rst
> -F:	Documentation/devicetree/bindings/media/imx7-csi.txt
>  F:	Documentation/devicetree/bindings/media/imx7-mipi-csi2.txt
> +F:	Documentation/devicetree/bindings/media/nxp,imx7-csi.yaml
>  F:	drivers/staging/media/imx/imx7-media-csi.c
>  F:	drivers/staging/media/imx/imx7-mipi-csis.c
>
> --
> 2.28.0
>

  reply	other threads:[~2020-10-15 13:26 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-14 14:27 [PATCH v2 0/3] dt-bindings: media: imx7 and ov2680 updates to yaml Rui Miguel Silva
2020-10-14 14:27 ` [PATCH v2 1/3] dt-bindings: ov2680: convert bindings " Rui Miguel Silva
2020-10-15 14:49   ` Jacopo Mondi
2020-10-16 14:42     ` Rui Miguel Silva
2020-10-19 20:33       ` Rob Herring
2020-10-21 15:52         ` Jacopo Mondi
2020-12-01 22:44           ` Rob Herring
2020-10-19 20:39   ` Rob Herring
2020-10-20  9:09     ` Rui Miguel Silva
2020-10-14 14:27 ` [PATCH v2 2/3] dt-bindings: imx7-csi: " Rui Miguel Silva
2020-10-15 15:25   ` Jacopo Mondi [this message]
2020-10-16 14:44     ` Rui Miguel Silva
2020-10-14 14:27 ` [PATCH v2 3/3] dt-bindings: imx7-mipi-csi2: " Rui Miguel Silva
2020-10-15 15:52   ` Jacopo Mondi
2020-10-16 14:51     ` Rui Miguel Silva
2020-10-16 18:02       ` Jacopo Mondi
2020-10-19 14:29         ` Rui Miguel Silva
2020-10-16 15:45   ` Rob Herring

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=20201015152546.s5fvuxklgludyv2u@uno.localdomain \
    --to=jacopo@jmondi.org \
    --cc=devicetree@vger.kernel.org \
    --cc=hverkuil@xs4all.nl \
    --cc=linux-media@vger.kernel.org \
    --cc=rmfrfs@gmail.com \
    --cc=robh+dt@kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    /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