diff mbox series

[1/1] dt-bindings: media: convert imx.txt to yaml format

Message ID 20250414210720.3359301-1-Frank.Li@nxp.com (mailing list archive)
State New
Headers show
Series [1/1] dt-bindings: media: convert imx.txt to yaml format | expand

Commit Message

Frank Li April 14, 2025, 9:07 p.m. UTC
Convert binding doc imx.txt to yaml format. Create two yaml files:
fsl,imx6-mipi-csi2.yaml and fsl,imx-capture-subsystem.yaml.

Additional changes:
- add example for fsl,imx6-mipi-csi2

Signed-off-by: Frank Li <Frank.Li@nxp.com>
---
 .../media/fsl,imx-capture-subsystem.yaml      |  38 ++++++
 .../bindings/media/fsl,imx6-mipi-csi2.yaml    | 126 ++++++++++++++++++
 .../devicetree/bindings/media/imx.txt         |  53 --------
 3 files changed, 164 insertions(+), 53 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/media/fsl,imx-capture-subsystem.yaml
 create mode 100644 Documentation/devicetree/bindings/media/fsl,imx6-mipi-csi2.yaml
 delete mode 100644 Documentation/devicetree/bindings/media/imx.txt

Comments

kernel test robot April 15, 2025, 9:27 p.m. UTC | #1
Hi Frank,

kernel test robot noticed the following build warnings:

[auto build test WARNING on robh/for-next]
[also build test WARNING on linuxtv-media-pending/master linus/master v6.15-rc2 next-20250415]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Frank-Li/dt-bindings-media-convert-imx-txt-to-yaml-format/20250415-050859
base:   https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
patch link:    https://lore.kernel.org/r/20250414210720.3359301-1-Frank.Li%40nxp.com
patch subject: [PATCH 1/1] dt-bindings: media: convert imx.txt to yaml format
reproduce:

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202504160540.HtRDAA78-lkp@intel.com/

All warnings (new ones prefixed by >>):

   Warning: Documentation/translations/zh_TW/admin-guide/README.rst references a file that doesn't exist: Documentation/dev-tools/kgdb.rst
   Warning: Documentation/translations/zh_TW/dev-tools/gdb-kernel-debugging.rst references a file that doesn't exist: Documentation/dev-tools/gdb-kernel-debugging.rst
   Warning: Documentation/userspace-api/netlink/index.rst references a file that doesn't exist: Documentation/networking/netlink_spec/index.rst
   Warning: Documentation/userspace-api/netlink/specs.rst references a file that doesn't exist: Documentation/networking/netlink_spec/index.rst
   Warning: MAINTAINERS references a file that doesn't exist: Documentation/devicetree/bindings/counter/ftm-quaddec.txt
>> Warning: MAINTAINERS references a file that doesn't exist: Documentation/devicetree/bindings/media/imx.txt
   Warning: MAINTAINERS references a file that doesn't exist: Documentation/devicetree/bindings/leds/backlight/ti,lp8864.yaml
   Can't build as 1 mandatory dependency is missing at ./scripts/sphinx-pre-install line 984.
   make[2]: *** [Documentation/Makefile:121: htmldocs] Error 255
   make[1]: *** [Makefile:1801: htmldocs] Error 2
   make: *** [Makefile:248: __sub-make] Error 2
Rob Herring (Arm) April 16, 2025, 12:42 p.m. UTC | #2
On Mon, Apr 14, 2025 at 05:07:18PM -0400, Frank Li wrote:
> Convert binding doc imx.txt to yaml format. Create two yaml files:
> fsl,imx6-mipi-csi2.yaml and fsl,imx-capture-subsystem.yaml.
> 
> Additional changes:
> - add example for fsl,imx6-mipi-csi2
> 
> Signed-off-by: Frank Li <Frank.Li@nxp.com>
> ---
>  .../media/fsl,imx-capture-subsystem.yaml      |  38 ++++++
>  .../bindings/media/fsl,imx6-mipi-csi2.yaml    | 126 ++++++++++++++++++
>  .../devicetree/bindings/media/imx.txt         |  53 --------
>  3 files changed, 164 insertions(+), 53 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/media/fsl,imx-capture-subsystem.yaml
>  create mode 100644 Documentation/devicetree/bindings/media/fsl,imx6-mipi-csi2.yaml
>  delete mode 100644 Documentation/devicetree/bindings/media/imx.txt
> 
> diff --git a/Documentation/devicetree/bindings/media/fsl,imx-capture-subsystem.yaml b/Documentation/devicetree/bindings/media/fsl,imx-capture-subsystem.yaml
> new file mode 100644
> index 0000000000000..77be3c1f37c5b
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/media/fsl,imx-capture-subsystem.yaml
> @@ -0,0 +1,38 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/media/fsl,imx-capture-subsystem.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Freescale i.MX Media Video Device
> +
> +description:
> +  This is the media controller node for video capture support. It is a
> +  virtual device that lists the camera serial interface nodes that the
> +  media device will control
> +
> +maintainers:
> +  - Frank Li <Frank.Li@nxp.com>
> +
> +properties:
> +  compatible:
> +    const: fsl,imx-capture-subsystem
> +
> +  ports:
> +    $ref: /schemas/types.yaml#/definitions/phandle-array
> +    description:
> +      Should contain a list of phandles pointing to camera
> +      sensor interface ports of IPU devices.
> +
> +required:
> +  - compatible
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    capture-subsystem {
> +        compatible = "fsl,imx-capture-subsystem";
> +        ports = <&ipu1_csi0>, <&ipu1_csi1>;
> +    };
> +
> diff --git a/Documentation/devicetree/bindings/media/fsl,imx6-mipi-csi2.yaml b/Documentation/devicetree/bindings/media/fsl,imx6-mipi-csi2.yaml
> new file mode 100644
> index 0000000000000..1e69a1ff868cd
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/media/fsl,imx6-mipi-csi2.yaml
> @@ -0,0 +1,126 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/media/fsl,imx6-mipi-csi2.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: MIPI CSI-2 Receiver core in the i.MX SoC
> +
> +description:
> +  This is the device node for the MIPI CSI-2 Receiver core in the i.MX
> +  SoC. This is a Synopsys Designware MIPI CSI-2 host controller core
> +  combined with a D-PHY core mixed into the same register block. In
> +  addition this device consists of an i.MX-specific "CSI2IPU gasket"
> +  glue logic, also controlled from the same register block. The CSI2IPU
> +  gasket demultiplexes the four virtual channel streams from the host
> +  controller's 32-bit output image bus onto four 16-bit parallel busses
> +  to the i.MX IPU CSIs.
> +
> +maintainers:
> +  - Frank Li <Frank.Li@nxp.com>
> +
> +properties:
> +  compatible:
> +    const: fsl,imx6-mipi-csi2
> +
> +  reg:
> +    maxItems: 1
> +
> +  clocks:
> +    items:
> +      - description: hsi_tx (the D-PHY clock)
> +      - description: video_27m (D-PHY PLL reference clock)
> +      - description: eim_podf;
> +
> +  clock-names:
> +    items:
> +      - const: dphy
> +      - const: ref
> +      - const: pix
> +
> +  interrupts:
> +    maxItems: 2

Need to define each entry though the original binding is not too helpful 
there.

> +
> +  '#address-cells':
> +    const: 1
> +
> +  '#size-cells':
> +    const: 0
> +
> +  port@0:
> +    $ref: /schemas/graph.yaml#/$defs/port-base
> +    unevaluatedProperties: false
> +    description:
> +      Input port node, single endpoint describing the CSI-2 transmitter.
> +
> +    properties:
> +      endpoint:
> +        $ref: video-interfaces.yaml#
> +        unevaluatedProperties: false
> +
> +        properties:
> +          clock-lanes:
> +            const: 0
> +
> +          data-lanes:
> +            minItems: 1
> +            items:
> +              - const: 1
> +              - const: 2
> +              - const: 3
> +              - const: 4
> +
> +        required:
> +          - data-lanes
> +
> +patternProperties:
> +  '^port@[1-4]':

'^port@[1-4]$'

> +    $ref: /schemas/graph.yaml#/$defs/port-base
> +    unevaluatedProperties: false
> +    description:
> +      ports 1 through 4 are output ports connecting with parallel bus sink
> +      endpoint nodes and correspond to the four MIPI CSI-2 virtual channel
> +      outputs.
> +
> +    properties:
> +      endpoint@0:
> +        $ref: video-interfaces.yaml#
> +        unevaluatedProperties: false
> +
> +      endpoint@1:
> +        $ref: video-interfaces.yaml#
> +        unevaluatedProperties: false
> +
> +required:
> +  - compatible
> +  - reg
> +  - clocks
> +  - clock-names
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/clock/imx6qdl-clock.h>
> +
> +    mipi@21dc000 {
> +        compatible = "fsl,imx6-mipi-csi2";
> +        reg = <0x021dc000 0x4000>;
> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +        clocks = <&clks IMX6QDL_CLK_HSI_TX>,
> +                 <&clks IMX6QDL_CLK_VIDEO_27M>,
> +                 <&clks IMX6QDL_CLK_EIM_PODF>;
> +        clock-names = "dphy", "ref", "pix";
> +
> +        port@0 {
> +            reg = <0>;
> +
> +            endpoint {
> +                remote-endpoint = <&ov5640_to_mipi_csi2>;
> +                clock-lanes = <0>;
> +                data-lanes = <1 2>;
> +            };
> +        };

I would think at least 1 output port is required?


> +    };
> +
Frank Li April 16, 2025, 3:17 p.m. UTC | #3
On Wed, Apr 16, 2025 at 07:42:26AM -0500, Rob Herring wrote:
> On Mon, Apr 14, 2025 at 05:07:18PM -0400, Frank Li wrote:
> > Convert binding doc imx.txt to yaml format. Create two yaml files:
> > fsl,imx6-mipi-csi2.yaml and fsl,imx-capture-subsystem.yaml.
> >
> > Additional changes:
> > - add example for fsl,imx6-mipi-csi2
> >
> > Signed-off-by: Frank Li <Frank.Li@nxp.com>
> > ---
> >  .../media/fsl,imx-capture-subsystem.yaml      |  38 ++++++
> >  .../bindings/media/fsl,imx6-mipi-csi2.yaml    | 126 ++++++++++++++++++
> >  .../devicetree/bindings/media/imx.txt         |  53 --------
> >  3 files changed, 164 insertions(+), 53 deletions(-)
> >  create mode 100644 Documentation/devicetree/bindings/media/fsl,imx-capture-subsystem.yaml
> >  create mode 100644 Documentation/devicetree/bindings/media/fsl,imx6-mipi-csi2.yaml
> >  delete mode 100644 Documentation/devicetree/bindings/media/imx.txt
> >
> > diff --git a/Documentation/devicetree/bindings/media/fsl,imx-capture-subsystem.yaml b/Documentation/devicetree/bindings/media/fsl,imx-capture-subsystem.yaml
> > new file mode 100644
> > index 0000000000000..77be3c1f37c5b
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/media/fsl,imx-capture-subsystem.yaml
> > @@ -0,0 +1,38 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/media/fsl,imx-capture-subsystem.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Freescale i.MX Media Video Device
> > +
...
> > +        reg = <0x021dc000 0x4000>;
> > +        #address-cells = <1>;
> > +        #size-cells = <0>;
> > +        clocks = <&clks IMX6QDL_CLK_HSI_TX>,
> > +                 <&clks IMX6QDL_CLK_VIDEO_27M>,
> > +                 <&clks IMX6QDL_CLK_EIM_PODF>;
> > +        clock-names = "dphy", "ref", "pix";
> > +
> > +        port@0 {
> > +            reg = <0>;
> > +
> > +            endpoint {
> > +                remote-endpoint = <&ov5640_to_mipi_csi2>;
> > +                clock-lanes = <0>;
> > +                data-lanes = <1 2>;
> > +            };
> > +        };
>
> I would think at least 1 output port is required?

I checked dts file, only input port. I think old csi2 only need get data
from camera. csi's dma should save to memory.

Frank

>
>
> > +    };
> > +
Philipp Zabel April 16, 2025, 3:26 p.m. UTC | #4
On Mi, 2025-04-16 at 11:17 -0400, Frank Li wrote:
> On Wed, Apr 16, 2025 at 07:42:26AM -0500, Rob Herring wrote:
> > On Mon, Apr 14, 2025 at 05:07:18PM -0400, Frank Li wrote:
> > > Convert binding doc imx.txt to yaml format. Create two yaml files:
> > > fsl,imx6-mipi-csi2.yaml and fsl,imx-capture-subsystem.yaml.
> > > 
> > > Additional changes:
> > > - add example for fsl,imx6-mipi-csi2
> > > 
> > > Signed-off-by: Frank Li <Frank.Li@nxp.com>
> > > ---
> > >  .../media/fsl,imx-capture-subsystem.yaml      |  38 ++++++
> > >  .../bindings/media/fsl,imx6-mipi-csi2.yaml    | 126 ++++++++++++++++++
> > >  .../devicetree/bindings/media/imx.txt         |  53 --------
> > >  3 files changed, 164 insertions(+), 53 deletions(-)
> > >  create mode 100644 Documentation/devicetree/bindings/media/fsl,imx-capture-subsystem.yaml
> > >  create mode 100644 Documentation/devicetree/bindings/media/fsl,imx6-mipi-csi2.yaml
> > >  delete mode 100644 Documentation/devicetree/bindings/media/imx.txt
> > > 
> > > diff --git a/Documentation/devicetree/bindings/media/fsl,imx-capture-subsystem.yaml b/Documentation/devicetree/bindings/media/fsl,imx-capture-subsystem.yaml
> > > new file mode 100644
> > > index 0000000000000..77be3c1f37c5b
> > > --- /dev/null
> > > +++ b/Documentation/devicetree/bindings/media/fsl,imx-capture-subsystem.yaml
> > > @@ -0,0 +1,38 @@
> > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > > +%YAML 1.2
> > > +---
> > > +$id: http://devicetree.org/schemas/media/fsl,imx-capture-subsystem.yaml#
> > > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > > +
> > > +title: Freescale i.MX Media Video Device
> > > +
> ...
> > > +        reg = <0x021dc000 0x4000>;
> > > +        #address-cells = <1>;
> > > +        #size-cells = <0>;
> > > +        clocks = <&clks IMX6QDL_CLK_HSI_TX>,
> > > +                 <&clks IMX6QDL_CLK_VIDEO_27M>,
> > > +                 <&clks IMX6QDL_CLK_EIM_PODF>;
> > > +        clock-names = "dphy", "ref", "pix";
> > > +
> > > +        port@0 {
> > > +            reg = <0>;
> > > +
> > > +            endpoint {
> > > +                remote-endpoint = <&ov5640_to_mipi_csi2>;
> > > +                clock-lanes = <0>;
> > > +                data-lanes = <1 2>;
> > > +            };
> > > +        };
> > 
> > I would think at least 1 output port is required?
> 
> I checked dts file, only input port. I think old csi2 only need get data
> from camera. csi's dma should save to memory.

There are no ports in imx6qdl.dtsi, but there's a &mipi_csi with four
output ports in imx6q.dtsi and imx6dl.dtsi each, because whether data
flows through a mux or directly into the IPU CSI ports differs between
the two platforms.

regards
Philipp
Frank Li April 16, 2025, 3:31 p.m. UTC | #5
On Wed, Apr 16, 2025 at 05:26:19PM +0200, Philipp Zabel wrote:
> On Mi, 2025-04-16 at 11:17 -0400, Frank Li wrote:
> > On Wed, Apr 16, 2025 at 07:42:26AM -0500, Rob Herring wrote:
> > > On Mon, Apr 14, 2025 at 05:07:18PM -0400, Frank Li wrote:
> > > > Convert binding doc imx.txt to yaml format. Create two yaml files:
> > > > fsl,imx6-mipi-csi2.yaml and fsl,imx-capture-subsystem.yaml.
> > > >
> > > > Additional changes:
> > > > - add example for fsl,imx6-mipi-csi2
> > > >
> > > > Signed-off-by: Frank Li <Frank.Li@nxp.com>
> > > > ---
> > > >  .../media/fsl,imx-capture-subsystem.yaml      |  38 ++++++
> > > >  .../bindings/media/fsl,imx6-mipi-csi2.yaml    | 126 ++++++++++++++++++
> > > >  .../devicetree/bindings/media/imx.txt         |  53 --------
> > > >  3 files changed, 164 insertions(+), 53 deletions(-)
> > > >  create mode 100644 Documentation/devicetree/bindings/media/fsl,imx-capture-subsystem.yaml
> > > >  create mode 100644 Documentation/devicetree/bindings/media/fsl,imx6-mipi-csi2.yaml
> > > >  delete mode 100644 Documentation/devicetree/bindings/media/imx.txt
> > > >
> > > > diff --git a/Documentation/devicetree/bindings/media/fsl,imx-capture-subsystem.yaml b/Documentation/devicetree/bindings/media/fsl,imx-capture-subsystem.yaml
> > > > new file mode 100644
> > > > index 0000000000000..77be3c1f37c5b
> > > > --- /dev/null
> > > > +++ b/Documentation/devicetree/bindings/media/fsl,imx-capture-subsystem.yaml
> > > > @@ -0,0 +1,38 @@
> > > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > > > +%YAML 1.2
> > > > +---
> > > > +$id: http://devicetree.org/schemas/media/fsl,imx-capture-subsystem.yaml#
> > > > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > > > +
> > > > +title: Freescale i.MX Media Video Device
> > > > +
> > ...
> > > > +        reg = <0x021dc000 0x4000>;
> > > > +        #address-cells = <1>;
> > > > +        #size-cells = <0>;
> > > > +        clocks = <&clks IMX6QDL_CLK_HSI_TX>,
> > > > +                 <&clks IMX6QDL_CLK_VIDEO_27M>,
> > > > +                 <&clks IMX6QDL_CLK_EIM_PODF>;
> > > > +        clock-names = "dphy", "ref", "pix";
> > > > +
> > > > +        port@0 {
> > > > +            reg = <0>;
> > > > +
> > > > +            endpoint {
> > > > +                remote-endpoint = <&ov5640_to_mipi_csi2>;
> > > > +                clock-lanes = <0>;
> > > > +                data-lanes = <1 2>;
> > > > +            };
> > > > +        };
> > >
> > > I would think at least 1 output port is required?
> >
> > I checked dts file, only input port. I think old csi2 only need get data
> > from camera. csi's dma should save to memory.
>
> There are no ports in imx6qdl.dtsi, but there's a &mipi_csi with four
> output ports in imx6q.dtsi and imx6dl.dtsi each, because whether data
> flows through a mux or directly into the IPU CSI ports differs between
> the two platforms.

Thank you very much!

Frank
>
> regards
> Philipp
>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/media/fsl,imx-capture-subsystem.yaml b/Documentation/devicetree/bindings/media/fsl,imx-capture-subsystem.yaml
new file mode 100644
index 0000000000000..77be3c1f37c5b
--- /dev/null
+++ b/Documentation/devicetree/bindings/media/fsl,imx-capture-subsystem.yaml
@@ -0,0 +1,38 @@ 
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/media/fsl,imx-capture-subsystem.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Freescale i.MX Media Video Device
+
+description:
+  This is the media controller node for video capture support. It is a
+  virtual device that lists the camera serial interface nodes that the
+  media device will control
+
+maintainers:
+  - Frank Li <Frank.Li@nxp.com>
+
+properties:
+  compatible:
+    const: fsl,imx-capture-subsystem
+
+  ports:
+    $ref: /schemas/types.yaml#/definitions/phandle-array
+    description:
+      Should contain a list of phandles pointing to camera
+      sensor interface ports of IPU devices.
+
+required:
+  - compatible
+
+additionalProperties: false
+
+examples:
+  - |
+    capture-subsystem {
+        compatible = "fsl,imx-capture-subsystem";
+        ports = <&ipu1_csi0>, <&ipu1_csi1>;
+    };
+
diff --git a/Documentation/devicetree/bindings/media/fsl,imx6-mipi-csi2.yaml b/Documentation/devicetree/bindings/media/fsl,imx6-mipi-csi2.yaml
new file mode 100644
index 0000000000000..1e69a1ff868cd
--- /dev/null
+++ b/Documentation/devicetree/bindings/media/fsl,imx6-mipi-csi2.yaml
@@ -0,0 +1,126 @@ 
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/media/fsl,imx6-mipi-csi2.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: MIPI CSI-2 Receiver core in the i.MX SoC
+
+description:
+  This is the device node for the MIPI CSI-2 Receiver core in the i.MX
+  SoC. This is a Synopsys Designware MIPI CSI-2 host controller core
+  combined with a D-PHY core mixed into the same register block. In
+  addition this device consists of an i.MX-specific "CSI2IPU gasket"
+  glue logic, also controlled from the same register block. The CSI2IPU
+  gasket demultiplexes the four virtual channel streams from the host
+  controller's 32-bit output image bus onto four 16-bit parallel busses
+  to the i.MX IPU CSIs.
+
+maintainers:
+  - Frank Li <Frank.Li@nxp.com>
+
+properties:
+  compatible:
+    const: fsl,imx6-mipi-csi2
+
+  reg:
+    maxItems: 1
+
+  clocks:
+    items:
+      - description: hsi_tx (the D-PHY clock)
+      - description: video_27m (D-PHY PLL reference clock)
+      - description: eim_podf;
+
+  clock-names:
+    items:
+      - const: dphy
+      - const: ref
+      - const: pix
+
+  interrupts:
+    maxItems: 2
+
+  '#address-cells':
+    const: 1
+
+  '#size-cells':
+    const: 0
+
+  port@0:
+    $ref: /schemas/graph.yaml#/$defs/port-base
+    unevaluatedProperties: false
+    description:
+      Input port node, single endpoint describing the CSI-2 transmitter.
+
+    properties:
+      endpoint:
+        $ref: video-interfaces.yaml#
+        unevaluatedProperties: false
+
+        properties:
+          clock-lanes:
+            const: 0
+
+          data-lanes:
+            minItems: 1
+            items:
+              - const: 1
+              - const: 2
+              - const: 3
+              - const: 4
+
+        required:
+          - data-lanes
+
+patternProperties:
+  '^port@[1-4]':
+    $ref: /schemas/graph.yaml#/$defs/port-base
+    unevaluatedProperties: false
+    description:
+      ports 1 through 4 are output ports connecting with parallel bus sink
+      endpoint nodes and correspond to the four MIPI CSI-2 virtual channel
+      outputs.
+
+    properties:
+      endpoint@0:
+        $ref: video-interfaces.yaml#
+        unevaluatedProperties: false
+
+      endpoint@1:
+        $ref: video-interfaces.yaml#
+        unevaluatedProperties: false
+
+required:
+  - compatible
+  - reg
+  - clocks
+  - clock-names
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/clock/imx6qdl-clock.h>
+
+    mipi@21dc000 {
+        compatible = "fsl,imx6-mipi-csi2";
+        reg = <0x021dc000 0x4000>;
+        #address-cells = <1>;
+        #size-cells = <0>;
+        clocks = <&clks IMX6QDL_CLK_HSI_TX>,
+                 <&clks IMX6QDL_CLK_VIDEO_27M>,
+                 <&clks IMX6QDL_CLK_EIM_PODF>;
+        clock-names = "dphy", "ref", "pix";
+
+        port@0 {
+            reg = <0>;
+
+            endpoint {
+                remote-endpoint = <&ov5640_to_mipi_csi2>;
+                clock-lanes = <0>;
+                data-lanes = <1 2>;
+            };
+        };
+    };
+
diff --git a/Documentation/devicetree/bindings/media/imx.txt b/Documentation/devicetree/bindings/media/imx.txt
deleted file mode 100644
index 77f4b0a7fd2b0..0000000000000
--- a/Documentation/devicetree/bindings/media/imx.txt
+++ /dev/null
@@ -1,53 +0,0 @@ 
-Freescale i.MX Media Video Device
-=================================
-
-Video Media Controller node
----------------------------
-
-This is the media controller node for video capture support. It is a
-virtual device that lists the camera serial interface nodes that the
-media device will control.
-
-Required properties:
-- compatible : "fsl,imx-capture-subsystem";
-- ports      : Should contain a list of phandles pointing to camera
-		sensor interface ports of IPU devices
-
-example:
-
-capture-subsystem {
-	compatible = "fsl,imx-capture-subsystem";
-	ports = <&ipu1_csi0>, <&ipu1_csi1>;
-};
-
-
-mipi_csi2 node
---------------
-
-This is the device node for the MIPI CSI-2 Receiver core in the i.MX
-SoC. This is a Synopsys Designware MIPI CSI-2 host controller core
-combined with a D-PHY core mixed into the same register block. In
-addition this device consists of an i.MX-specific "CSI2IPU gasket"
-glue logic, also controlled from the same register block. The CSI2IPU
-gasket demultiplexes the four virtual channel streams from the host
-controller's 32-bit output image bus onto four 16-bit parallel busses
-to the i.MX IPU CSIs.
-
-Required properties:
-- compatible	: "fsl,imx6-mipi-csi2";
-- reg           : physical base address and length of the register set;
-- clocks	: the MIPI CSI-2 receiver requires three clocks: hsi_tx
-		  (the D-PHY clock), video_27m (D-PHY PLL reference
-		  clock), and eim_podf;
-- clock-names	: must contain "dphy", "ref", "pix";
-- port@*        : five port nodes must exist, containing endpoints
-		  connecting to the source and sink devices according to
-		  of_graph bindings. The first port is an input port,
-		  connecting with a MIPI CSI-2 source, and ports 1
-		  through 4 are output ports connecting with parallel
-		  bus sink endpoint nodes and correspond to the four
-		  MIPI CSI-2 virtual channel outputs.
-
-Optional properties:
-- interrupts	: must contain two level-triggered interrupts,
-		  in order: 100 and 101;