From patchwork Thu Dec 8 00:57:44 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Longerbeam X-Patchwork-Id: 9465507 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 89E4360512 for ; Thu, 8 Dec 2016 01:00:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 528FE28565 for ; Thu, 8 Dec 2016 01:00:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 46D2A28575; Thu, 8 Dec 2016 01:00:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DDDBA28589 for ; Thu, 8 Dec 2016 01:00:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932469AbcLHBA3 (ORCPT ); Wed, 7 Dec 2016 20:00:29 -0500 Received: from mail-pg0-f66.google.com ([74.125.83.66]:32914 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753274AbcLHA7r (ORCPT ); Wed, 7 Dec 2016 19:59:47 -0500 Received: by mail-pg0-f66.google.com with SMTP id 3so25047516pgd.0; Wed, 07 Dec 2016 16:59:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=CovWXEt9quFCgWJuc0b/wtSFd65BMUIE0FiA+Ujxh6A=; b=kWtCsVtwX5Pyn0cpY4l4piZEo3AS9p6St7joX0xFid5Zo/jkqDTsax7YLkKPmwjrvI D1pV50nM8fLjRcmrz1gSoIHk2kNCsg+rMVRXGDc2rTAlqviciCRM3mlfDnxOwHbgRecy XXGohNclZuo3+iAbyqGWg/X33CIUOvnjh6EAfIOzqoKA7G2npXan7TF1NPi+ErmcjSyY CIKk1TKlek5sQCtOY3SCbEHtGKLjaMUkULJpgcaKhkP5M48zZ2a1S5+AA8WHBbdkKI7S DjPCpxPexnhJo7s26ez8TYuaoXT4cuJid0m5RwMKEC6PAmgLMyzzXkerh7x/a7BDr72H Gylw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=CovWXEt9quFCgWJuc0b/wtSFd65BMUIE0FiA+Ujxh6A=; b=jijr2jp9+pnRXLRBFfO0uOgA3+rotdym2Ojh5+yt9nfz6syhDkkibb+qxE0GR1eQqQ 8TGpmjiAr97V4k8kQ8p3sFerxbPkF5IPdMFpqyUAjsHQWXFjH3dbIRHxpO0c3n9J3lWm VchM7igwTltCQwcfjAEFsc4klN3HAtnYHFcuXbwdihwP7Ya9ylnsmkAEJs+UQFfY3P4y 045VjYB92WvP5qYuzcq0Hwn0lbmzL4msqPcvp2aik3ue6CqTXYtXrqDE9WZAxxtKicMK gXQXcEKaF0ySeKuM9Iv82YucXfC4EXdK94vthj86L7xgoTGtRHv/CsoRUTpW71c5OxmQ rKiA== X-Gm-Message-State: AKaTC02x27qaexE9UqqkVatFmAP5eTBw84H3yPapyKKPlbLm49hyFjvhVqQ0HzghZO5f5Q== X-Received: by 10.84.217.70 with SMTP id e6mr151721722plj.161.1481158768959; Wed, 07 Dec 2016 16:59:28 -0800 (PST) Received: from majic.sklembedded.com (c-73-241-2-21.hsd1.ca.comcast.net. [73.241.2.21]) by smtp.googlemail.com with ESMTPSA id n25sm45265872pfi.33.2016.12.07.16.59.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 07 Dec 2016 16:59:28 -0800 (PST) From: Steve Longerbeam X-Google-Original-From: Steve Longerbeam To: shawnguo@kernel.org, kernel@pengutronix.de, fabio.estevam@nxp.com, robh+dt@kernel.org, mark.rutland@arm.com, linux@armlinux.org.uk, tomi.valkeinen@ti.com, p.zabel@pengutronix.de Cc: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, Steve Longerbeam Subject: [PATCH 03/12] ARM: dts: imx6qdl: add video capture devices and connections Date: Wed, 7 Dec 2016 16:57:44 -0800 Message-Id: <1481158673-15937-4-git-send-email-steve_longerbeam@mentor.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1481158673-15937-1-git-send-email-steve_longerbeam@mentor.com> References: <1481158673-15937-1-git-send-email-steve_longerbeam@mentor.com> Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Philipp Zabel This patch adds the IPU subunit devices involved in video capture and image conversion, and defines all the possible hardware connections between them via OF graphs. External to the IPU: Video input multiplexers are defined that multiplex inputs from camera sensors and the MIPI-CSI2 gasket, to the IPU CSIs. On i.MX6Q/D two two-input multiplexers in front of IPU1 CSI0 and IPU2 CSI1 allow to select between CSI0/1 parallel input pads and the MIPI CSI-2 virtual channels 0/3. On i.MX6DL/S two five-input multiplexers in front of IPU1 CSI0 and IPU1 CSI1 allow to select between CSI0/1 parallel input pads and any of the four MIPI CSI-2 virtual channels. Internal to the IPU: The IPU CSI, SMFC, IC-PRPENC, IC-PRPVF, and IC-PP subunits are added as children of the IPUs, along with the hardware-supported connections between them. Finally, a media device node is defined. A video camera interface and mem2mem device are defined as children of the media device. Signed-off-by: Steve Longerbeam Signed-off-by: Philipp Zabel --- arch/arm/boot/dts/imx6dl.dtsi | 190 ++++++++++++++++ arch/arm/boot/dts/imx6q.dtsi | 487 +++++++++++++++++++++++++++++++++++++++++ arch/arm/boot/dts/imx6qdl.dtsi | 368 +++++++++++++++++++++++++++++++ 3 files changed, 1045 insertions(+) diff --git a/arch/arm/boot/dts/imx6dl.dtsi b/arch/arm/boot/dts/imx6dl.dtsi index 1ade195..4bab076 100644 --- a/arch/arm/boot/dts/imx6dl.dtsi +++ b/arch/arm/boot/dts/imx6dl.dtsi @@ -109,6 +109,120 @@ compatible = "fsl,imx-gpu-subsystem"; cores = <&gpu_2d>, <&gpu_3d>; }; + + ipu1_csi0_mux: ipu1_csi0_mux@34 { + compatible = "imx-video-mux"; + reg = <0x34 0x07>; + gpr = <&gpr>; + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + sink-ports = <5>; + + port@0 { + reg = <0>; + + ipu1_csi0_mux_from_mipi_vc0: endpoint { + remote-endpoint = <&mipi_vc0_to_ipu1_csi0_mux>; + }; + }; + + port@1 { + reg = <1>; + + ipu1_csi0_mux_from_mipi_vc1: endpoint { + remote-endpoint = <&mipi_vc1_to_ipu1_csi0_mux>; + }; + }; + + port@2 { + reg = <2>; + + ipu1_csi0_mux_from_mipi_vc2: endpoint { + remote-endpoint = <&mipi_vc2_to_ipu1_csi0_mux>; + }; + }; + + port@3 { + reg = <3>; + + ipu1_csi0_mux_from_mipi_vc3: endpoint { + remote-endpoint = <&mipi_vc3_to_ipu1_csi0_mux>; + }; + }; + + port@4 { + reg = <4>; + + ipu1_csi0_mux_from_parallel_sensor: endpoint { + }; + }; + + port@5 { + reg = <5>; + + ipu1_csi0_mux_to_ipu1_csi0: endpoint { + remote-endpoint = <&ipu1_csi0_from_ipu1_csi0_mux>; + }; + }; + }; + + ipu1_csi1_mux: ipu1_csi1_mux@34 { + compatible = "imx-video-mux"; + reg = <0x34 0x38>; + gpr = <&gpr>; + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + sink-ports = <5>; + + port@0 { + reg = <0>; + + ipu1_csi1_mux_from_mipi_vc0: endpoint { + remote-endpoint = <&mipi_vc0_to_ipu1_csi1_mux>; + }; + }; + + port@1 { + reg = <1>; + + ipu1_csi1_mux_from_mipi_vc1: endpoint { + remote-endpoint = <&mipi_vc1_to_ipu1_csi1_mux>; + }; + }; + + port@2 { + reg = <2>; + + ipu1_csi1_mux_from_mipi_vc2: endpoint { + remote-endpoint = <&mipi_vc2_to_ipu1_csi1_mux>; + }; + }; + + port@3 { + reg = <3>; + + ipu1_csi1_mux_from_mipi_vc3: endpoint { + remote-endpoint = <&mipi_vc3_to_ipu1_csi1_mux>; + }; + }; + + port@4 { + reg = <4>; + + ipu1_csi1_mux_from_parallel_sensor: endpoint { + }; + }; + + port@5 { + reg = <5>; + + ipu1_csi1_mux_to_ipu1_csi1: endpoint { + remote-endpoint = <&ipu1_csi1_from_ipu1_csi1_mux>; + }; + }; + }; }; &gpio1 { @@ -184,3 +298,79 @@ &vpu { compatible = "fsl,imx6dl-vpu", "cnm,coda960"; }; + +&ipu1_csi1 { + port@0 { + reg = <0>; + ipu1_csi1_from_ipu1_csi1_mux: endpoint { + remote-endpoint = <&ipu1_csi1_mux_to_ipu1_csi1>; + }; + }; +}; + +&mipi_csi { + sink-ports = <1>; + + port@0 { + reg = <0>; + + mipi_csi_from_mipi_sensor: endpoint { + }; + }; + + port@1 { + reg = <1>; + #address-cells = <1>; + #size-cells = <0>; + + mipi_vc0_to_ipu1_csi0_mux: endpoint@0 { + remote-endpoint = <&ipu1_csi0_mux_from_mipi_vc0>; + }; + + mipi_vc0_to_ipu1_csi1_mux: endpoint@1 { + remote-endpoint = <&ipu1_csi1_mux_from_mipi_vc0>; + }; + }; + + port@2 { + reg = <2>; + #address-cells = <1>; + #size-cells = <0>; + + mipi_vc1_to_ipu1_csi0_mux: endpoint@0 { + remote-endpoint = <&ipu1_csi0_mux_from_mipi_vc1>; + }; + + mipi_vc1_to_ipu1_csi1_mux: endpoint@1 { + remote-endpoint = <&ipu1_csi1_mux_from_mipi_vc1>; + }; + }; + + port@3 { + reg = <3>; + #address-cells = <1>; + #size-cells = <0>; + + mipi_vc2_to_ipu1_csi0_mux: endpoint@0 { + remote-endpoint = <&ipu1_csi0_mux_from_mipi_vc2>; + }; + + mipi_vc2_to_ipu1_csi1_mux: endpoint@1 { + remote-endpoint = <&ipu1_csi1_mux_from_mipi_vc2>; + }; + }; + + port@4 { + reg = <4>; + #address-cells = <1>; + #size-cells = <0>; + + mipi_vc3_to_ipu1_csi0_mux: endpoint@0 { + remote-endpoint = <&ipu1_csi0_mux_from_mipi_vc3>; + }; + + mipi_vc3_to_ipu1_csi1_mux: endpoint@1 { + remote-endpoint = <&ipu1_csi1_mux_from_mipi_vc3>; + }; + }; +}; diff --git a/arch/arm/boot/dts/imx6q.dtsi b/arch/arm/boot/dts/imx6q.dtsi index 2b261ba..a0602c5 100644 --- a/arch/arm/boot/dts/imx6q.dtsi +++ b/arch/arm/boot/dts/imx6q.dtsi @@ -142,11 +142,270 @@ resets = <&src 4>; ipu2_csi0: ipu2_csi@0 { + #address-cells = <1>; + #size-cells = <0>; + sink-ports = <1>; reg = <0>; + + port@0 { + reg = <0>; + ipu2_csi0_from_mipi_vc2: endpoint { + remote-endpoint = <&mipi_vc2_to_ipu2_csi0>; + }; + }; + + port@1 { + reg = <1>; + ipu2_csi0_to_smfc0: smfc0-endpoint { + remote-endpoint = <&ipu2_smfc0_from_csi0>; + }; + ipu2_csi0_to_ic_prpvf: prpvf-endpoint { + remote-endpoint = <&ipu2_ic_prpvf_from_csi0>; + }; + ipu2_csi0_to_ic_prpenc: prpenc-endpoint { + remote-endpoint = <&ipu2_ic_prpenc_from_csi0>; + }; + }; }; ipu2_csi1: ipu2_csi@1 { + #address-cells = <1>; + #size-cells = <0>; + sink-ports = <1>; reg = <1>; + + port@0 { + reg = <0>; + ipu2_csi1_from_ipu2_csi1_mux: endpoint { + remote-endpoint = <&ipu2_csi1_mux_to_ipu2_csi1>; + }; + }; + + port@1 { + reg = <1>; + ipu2_csi1_to_smfc1: smfc1-endpoint { + remote-endpoint = <&ipu2_smfc1_from_csi1>; + }; + ipu2_csi1_to_ic_prpvf: prpvf-endpoint { + remote-endpoint = <&ipu2_ic_prpvf_from_csi1>; + }; + ipu2_csi1_to_ic_prpenc: prpenc-endpoint { + remote-endpoint = <&ipu2_ic_prpenc_from_csi1>; + }; + }; + }; + + ipu2_smfc0: ipu2_smfc@0 { + #address-cells = <1>; + #size-cells = <0>; + sink-ports = <1>; + reg = <0>; + + port@0 { + reg = <0>; + ipu2_smfc0_from_csi0: endpoint { + remote-endpoint = <&ipu2_csi0_to_smfc0>; + }; + }; + + port@1 { + reg = <1>; + ipu2_smfc0_to_ic_pp1: pp-endpoint { + remote-endpoint = <&ipu2_ic_pp1_from_smfc0>; + }; + ipu2_smfc0_to_ic_prpvf: prpvf-endpoint { + remote-endpoint = <&ipu2_ic_prpvf_from_smfc0>; + }; + ipu2_smfc0_to_camif2: camif2-endpoint { + remote-endpoint = <&camif2_from_smfc0>; + }; + ipu2_smfc0_to_camif3: camif3-endpoint { + remote-endpoint = <&camif3_from_smfc0>; + }; + }; + }; + + ipu2_smfc1: ipu2_smfc@1 { + #address-cells = <1>; + #size-cells = <0>; + sink-ports = <1>; + reg = <1>; + + port@0 { + reg = <0>; + ipu2_smfc1_from_csi1: endpoint { + remote-endpoint = <&ipu2_csi1_to_smfc1>; + }; + }; + + port@1 { + reg = <1>; + ipu2_smfc1_to_ic_pp2: pp-endpoint { + remote-endpoint = <&ipu2_ic_pp2_from_smfc1>; + }; + ipu2_smfc1_to_ic_prpvf: prpvf-endpoint { + remote-endpoint = <&ipu2_ic_prpvf_from_smfc1>; + }; + ipu2_smfc1_to_camif2: camif2-endpoint { + remote-endpoint = <&camif2_from_smfc1>; + }; + ipu2_smfc1_to_camif3: camif3-endpoint { + remote-endpoint = <&camif3_from_smfc1>; + }; + }; + }; + + ipu2_ic_prpenc: ipu2_ic_prpenc@0 { + #address-cells = <1>; + #size-cells = <0>; + sink-ports = <1>; + reg = <0>; + + port@0 { + reg = <0>; + ipu2_ic_prpenc_from_csi0: csi0-endpoint { + remote-endpoint = <&ipu2_csi0_to_ic_prpenc>; + }; + ipu2_ic_prpenc_from_csi1: csi1-endpoint { + remote-endpoint = <&ipu2_csi1_to_ic_prpenc>; + }; + }; + + port@1 { + reg = <1>; + ipu2_ic_prpenc_to_camif2: camif2-endpoint { + remote-endpoint = <&camif2_from_ic_prpenc>; + }; + ipu2_ic_prpenc_to_camif3: camif3-endpoint { + remote-endpoint = <&camif3_from_ic_prpenc>; + }; + }; + }; + + ipu2_ic_prpvf: ipu2_ic_prpvf@0 { + #address-cells = <1>; + #size-cells = <0>; + sink-ports = <1>; + reg = <0>; + + port@0 { + reg = <0>; + ipu2_ic_prpvf_from_csi0: csi0-endpoint { + remote-endpoint = <&ipu2_csi0_to_ic_prpvf>; + }; + ipu2_ic_prpvf_from_csi1: csi1-endpoint { + remote-endpoint = <&ipu2_csi1_to_ic_prpvf>; + }; + ipu2_ic_prpvf_from_smfc0: smfc0-endpoint { + remote-endpoint = <&ipu2_smfc0_to_ic_prpvf>; + }; + ipu2_ic_prpvf_from_smfc1: smfc1-endpoint { + remote-endpoint = <&ipu2_smfc1_to_ic_prpvf>; + }; + ipu2_ic_prpvf_from_m2m1: m2m1-endpoint { + remote-endpoint = <&m2m1_to_ic_prpvf>; + }; + }; + + port@1 { + reg = <1>; + ipu2_ic_prpvf_to_camif2: camif2-endpoint { + remote-endpoint = <&camif2_from_ic_prpvf>; + }; + ipu2_ic_prpvf_to_camif3: camif3-endpoint { + remote-endpoint = <&camif3_from_ic_prpvf>; + }; + ipu2_ic_prpvf_to_ic_pp0: pp0-endpoint { + remote-endpoint = <&ipu2_ic_pp0_from_ic_prpvf>; + }; + ipu2_ic_prpvf_to_ic_pp1: pp1-endpoint { + remote-endpoint = <&ipu2_ic_pp1_from_ic_prpvf>; + }; + ipu2_ic_prpvf_to_ic_pp2: pp2-endpoint { + remote-endpoint = <&ipu2_ic_pp2_from_ic_prpvf>; + }; + ipu2_ic_prpvf_to_m2m1: m2m1-endpoint { + remote-endpoint = <&m2m1_from_ic_prpvf>; + }; + }; + }; + + ipu2_ic_pp0: ipu2_ic_pp@0 { + #address-cells = <1>; + #size-cells = <0>; + sink-ports = <1>; + reg = <0>; + + port@0 { + reg = <0>; + ipu2_ic_pp0_from_m2m1: m2m1-endpoint { + remote-endpoint = <&m2m1_to_ic_pp0>; + }; + ipu2_ic_pp0_from_ic_prpvf: prpvf-endpoint { + remote-endpoint = <&ipu2_ic_prpvf_to_ic_pp0>; + }; + }; + + port@1 { + reg = <1>; + ipu2_ic_pp0_to_m2m1: endpoint { + remote-endpoint = <&m2m1_from_ic_pp0>; + }; + }; + }; + + ipu2_ic_pp1: ipu2_ic_pp@1 { + #address-cells = <1>; + #size-cells = <0>; + sink-ports = <1>; + reg = <1>; + + port@0 { + reg = <0>; + ipu2_ic_pp1_from_smfc0: smfc0-endpoint { + remote-endpoint = <&ipu2_smfc0_to_ic_pp1>; + }; + ipu2_ic_pp1_from_ic_prpvf: prpvf-endpoint { + remote-endpoint = <&ipu2_ic_prpvf_to_ic_pp1>; + }; + }; + + port@1 { + reg = <1>; + ipu2_ic_pp1_to_camif2: camif2-endpoint { + remote-endpoint = <&camif2_from_ic_pp1>; + }; + ipu2_ic_pp1_to_camif3: camif3-endpoint { + remote-endpoint = <&camif3_from_ic_pp1>; + }; + }; + }; + + ipu2_ic_pp2: ipu2_ic_pp@2 { + #address-cells = <1>; + #size-cells = <0>; + sink-ports = <1>; + reg = <2>; + + port@0 { + reg = <0>; + ipu2_ic_pp2_from_smfc1: smfc1-endpoint { + remote-endpoint = <&ipu2_smfc1_to_ic_pp2>; + }; + ipu2_ic_pp2_from_ic_prpvf: prpvf-endpoint { + remote-endpoint = <&ipu2_ic_prpvf_to_ic_pp2>; + }; + }; + + port@1 { + reg = <1>; + ipu2_ic_pp2_to_camif2: camif2-endpoint { + remote-endpoint = <&camif2_from_ic_pp2>; + }; + ipu2_ic_pp2_to_camif3: camif3-endpoint { + remote-endpoint = <&camif3_from_ic_pp2>; + }; + }; }; ipu2_di0: ipu2_di@0 { @@ -207,6 +466,73 @@ compatible = "fsl,imx-gpu-subsystem"; cores = <&gpu_2d>, <&gpu_3d>, <&gpu_vg>; }; + + + ipu1_csi0_mux: ipu1_csi0_mux@4 { + compatible = "imx-video-mux"; + reg = <0x04 0x80000>; + gpr = <&gpr>; + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + sink-ports = <2>; + + port@0 { + reg = <0>; + + ipu1_csi0_mux_from_mipi_vc0: endpoint { + remote-endpoint = <&mipi_vc0_to_ipu1_csi0_mux>; + }; + }; + + port@1 { + reg = <1>; + + ipu1_csi0_mux_from_parallel_sensor: endpoint { + }; + }; + + port@2 { + reg = <2>; + + ipu1_csi0_mux_to_ipu1_csi0: endpoint { + remote-endpoint = <&ipu1_csi0_from_ipu1_csi0_mux>; + }; + }; + }; + + ipu2_csi1_mux: ipu2_csi1_mux@4 { + compatible = "imx-video-mux"; + reg = <0x04 0x100000>; + gpr = <&gpr>; + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + sink-ports = <2>; + + port@0 { + reg = <0>; + + ipu2_csi1_mux_from_mipi_vc3: endpoint { + remote-endpoint = <&mipi_vc3_to_ipu2_csi1_mux>; + }; + }; + + port@1 { + reg = <1>; + + ipu2_csi1_mux_from_parallel_sensor: endpoint { + }; + }; + + port@2 { + reg = <2>; + + ipu2_csi1_mux_to_ipu2_csi1: endpoint { + remote-endpoint = <&ipu2_csi1_from_ipu2_csi1_mux>; + }; + }; + }; }; &gpio1 { @@ -266,6 +592,15 @@ }; }; +&ipu1_csi1 { + port@0 { + reg = <0>; + ipu1_csi1_from_mipi_vc1: endpoint { + remote-endpoint = <&mipi_vc1_to_ipu1_csi1>; + }; + }; +}; + &ldb { clocks = <&clks IMX6QDL_CLK_LDB_DI0_SEL>, <&clks IMX6QDL_CLK_LDB_DI1_SEL>, <&clks IMX6QDL_CLK_IPU1_DI0_SEL>, <&clks IMX6QDL_CLK_IPU1_DI1_SEL>, @@ -312,6 +647,49 @@ }; }; +&mipi_csi { + sink-ports = <1>; + + port@0 { + reg = <0>; + + mipi_csi_from_mipi_sensor: endpoint { + }; + }; + + port@1 { + reg = <1>; + + mipi_vc0_to_ipu1_csi0_mux: endpoint { + remote-endpoint = <&ipu1_csi0_mux_from_mipi_vc0>; + }; + }; + + port@2 { + reg = <2>; + + mipi_vc1_to_ipu1_csi1: endpoint { + remote-endpoint = <&ipu1_csi1_from_mipi_vc1>; + }; + }; + + port@3 { + reg = <3>; + + mipi_vc2_to_ipu2_csi0: endpoint { + remote-endpoint = <&ipu2_csi0_from_mipi_vc2>; + }; + }; + + port@4 { + reg = <4>; + + mipi_vc3_to_ipu2_csi1_mux: endpoint { + remote-endpoint = <&ipu2_csi1_mux_from_mipi_vc3>; + }; + }; +}; + &mipi_dsi { ports { port@2 { @@ -335,3 +713,112 @@ &vpu { compatible = "fsl,imx6q-vpu", "cnm,coda960"; }; + +&media0 { + m2m1: m2m@1 { + compatible = "fsl,imx-media-mem2mem"; + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + sink-ports = <2>; + reg = <1>; + + port@0 { + reg = <0>; + }; + + port@1 { + reg = <1>; + m2m1_from_ic_pp0: endpoint { + remote-endpoint = <&ipu2_ic_pp0_to_m2m1>; + }; + m2m1_from_ic_prpvf: prpvf-endpoint { + remote-endpoint = <&ipu2_ic_prpvf_to_m2m1>; + }; + }; + + port@2 { + reg = <2>; + m2m1_to_ic_prpvf: prpvf-endpoint { + remote-endpoint = <&ipu2_ic_prpvf_from_m2m1>; + }; + m2m1_to_ic_pp0: pp0-endpoint { + remote-endpoint = <&ipu2_ic_pp0_from_m2m1>; + }; + }; + + port@3 { + reg = <3>; + }; + }; + + camif2: camif@2 { + compatible = "fsl,imx-media-camif"; + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + sink-ports = <1>; + reg = <2>; + + port@0 { + reg = <0>; + camif2_from_smfc0: smfc0-endpoint { + remote-endpoint = <&ipu2_smfc0_to_camif2>; + }; + camif2_from_smfc1: smfc1-endpoint { + remote-endpoint = <&ipu2_smfc1_to_camif2>; + }; + camif2_from_ic_prpenc: prpenc-endpoint { + remote-endpoint = <&ipu2_ic_prpenc_to_camif2>; + }; + camif2_from_ic_prpvf: prpvf-endpoint { + remote-endpoint = <&ipu2_ic_prpvf_to_camif2>; + }; + camif2_from_ic_pp1: pp1-endpoint { + remote-endpoint = <&ipu2_ic_pp1_to_camif2>; + }; + camif2_from_ic_pp2: pp2-endpoint { + remote-endpoint = <&ipu2_ic_pp2_to_camif2>; + }; + }; + + port@1 { + reg = <1>; + }; + }; + + camif3: camif@3 { + compatible = "fsl,imx-media-camif"; + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + sink-ports = <1>; + reg = <3>; + + port@0 { + reg = <0>; + camif3_from_smfc0: smfc0-endpoint { + remote-endpoint = <&ipu2_smfc0_to_camif3>; + }; + camif3_from_smfc1: smfc1-endpoint { + remote-endpoint = <&ipu2_smfc1_to_camif3>; + }; + camif3_from_ic_prpenc: prpenc-endpoint { + remote-endpoint = <&ipu2_ic_prpenc_to_camif3>; + }; + camif3_from_ic_prpvf: prpvf-endpoint { + remote-endpoint = <&ipu2_ic_prpvf_to_camif3>; + }; + camif3_from_ic_pp1: pp1-endpoint { + remote-endpoint = <&ipu2_ic_pp1_to_camif3>; + }; + camif3_from_ic_pp2: pp2-endpoint { + remote-endpoint = <&ipu2_ic_pp2_to_camif3>; + }; + }; + + port@1 { + reg = <1>; + }; + }; +}; diff --git a/arch/arm/boot/dts/imx6qdl.dtsi b/arch/arm/boot/dts/imx6qdl.dtsi index 2465187..ea1e2f3 100644 --- a/arch/arm/boot/dts/imx6qdl.dtsi +++ b/arch/arm/boot/dts/imx6qdl.dtsi @@ -1123,6 +1123,8 @@ mipi_csi: mipi@021dc000 { compatible = "fsl,imx-mipi-csi2"; reg = <0x021dc000 0x4000>; + #address-cells = <1>; + #size-cells = <0>; interrupts = <0 100 0x04>, <0 101 0x04>; clocks = <&clks IMX6QDL_CLK_HSI_TX>, <&clks IMX6QDL_CLK_VIDEO_27M>, @@ -1227,11 +1229,263 @@ resets = <&src 2>; ipu1_csi0: ipu1_csi@0 { + #address-cells = <1>; + #size-cells = <0>; + sink-ports = <1>; reg = <0>; + + port@0 { + reg = <0>; + ipu1_csi0_from_ipu1_csi0_mux: endpoint { + remote-endpoint = <&ipu1_csi0_mux_to_ipu1_csi0>; + }; + }; + + port@1 { + reg = <1>; + ipu1_csi0_to_smfc0: smfc0-endpoint { + remote-endpoint = <&ipu1_smfc0_from_csi0>; + }; + ipu1_csi0_to_ic_prpvf: prpvf-endpoint { + remote-endpoint = <&ipu1_ic_prpvf_from_csi0>; + }; + ipu1_csi0_to_ic_prpenc: prpenc-endpoint { + remote-endpoint = <&ipu1_ic_prpenc_from_csi0>; + }; + }; }; ipu1_csi1: ipu1_csi@1 { + #address-cells = <1>; + #size-cells = <0>; + sink-ports = <1>; + reg = <1>; + + port@1 { + reg = <1>; + ipu1_csi1_to_smfc1: smfc1-endpoint { + remote-endpoint = <&ipu1_smfc1_from_csi1>; + }; + ipu1_csi1_to_ic_prpvf: prendpoint { + remote-endpoint = <&ipu1_ic_prpvf_from_csi1>; + }; + ipu1_csi1_to_ic_prpenc: prpenc-endpoint { + remote-endpoint = <&ipu1_ic_prpenc_from_csi1>; + }; + }; + }; + + ipu1_smfc0: ipu1_smfc@0 { + #address-cells = <1>; + #size-cells = <0>; + sink-ports = <1>; + reg = <0>; + + port@0 { + reg = <0>; + ipu1_smfc0_from_csi0: endpoint { + remote-endpoint = <&ipu1_csi0_to_smfc0>; + }; + }; + + port@1 { + reg = <1>; + ipu1_smfc0_to_ic_pp1: pp-endpoint { + remote-endpoint = <&ipu1_ic_pp1_from_smfc0>; + }; + ipu1_smfc0_to_ic_prpvf: prpvf-endpoint { + remote-endpoint = <&ipu1_ic_prpvf_from_smfc0>; + }; + ipu1_smfc0_to_camif0: camif0-endpoint { + remote-endpoint = <&camif0_from_smfc0>; + }; + ipu1_smfc0_to_camif1: camif1-endpoint { + remote-endpoint = <&camif1_from_smfc0>; + }; + }; + }; + + ipu1_smfc1: ipu1_smfc@1 { + #address-cells = <1>; + #size-cells = <0>; + sink-ports = <1>; reg = <1>; + + port@0 { + reg = <0>; + ipu1_smfc1_from_csi1: endpoint { + remote-endpoint = <&ipu1_csi1_to_smfc1>; + }; + }; + + port@1 { + reg = <1>; + ipu1_smfc1_to_ic_pp2: pp-endpoint { + remote-endpoint = <&ipu1_ic_pp2_from_smfc1>; + }; + ipu1_smfc1_to_ic_prpvf: prpvf-endpoint { + remote-endpoint = <&ipu1_ic_prpvf_from_smfc1>; + }; + ipu1_smfc1_to_camif0: camif0-endpoint { + remote-endpoint = <&camif0_from_smfc1>; + }; + ipu1_smfc1_to_camif1: camif1-endpoint { + remote-endpoint = <&camif1_from_smfc1>; + }; + }; + }; + + ipu1_ic_prpenc: ipu1_ic_prpenc@0 { + #address-cells = <1>; + #size-cells = <0>; + sink-ports = <1>; + reg = <0>; + + port@0 { + reg = <0>; + ipu1_ic_prpenc_from_csi0: csi0-endpoint { + remote-endpoint = <&ipu1_csi0_to_ic_prpenc>; + }; + ipu1_ic_prpenc_from_csi1: csi1-endpoint { + remote-endpoint = <&ipu1_csi1_to_ic_prpenc>; + }; + }; + + port@1 { + reg = <1>; + ipu1_ic_prpenc_to_camif0: camif0-endpoint { + remote-endpoint = <&camif0_from_ic_prpenc>; + }; + ipu1_ic_prpenc_to_camif1: camif1-endpoint { + remote-endpoint = <&camif1_from_ic_prpenc>; + }; + }; + }; + + ipu1_ic_prpvf: ipu1_ic_prpvf@0 { + #address-cells = <1>; + #size-cells = <0>; + sink-ports = <1>; + reg = <0>; + + port@0 { + reg = <0>; + ipu1_ic_prpvf_from_csi0: csi0-endpoint { + remote-endpoint = <&ipu1_csi0_to_ic_prpvf>; + }; + ipu1_ic_prpvf_from_csi1: csi1-endpoint { + remote-endpoint = <&ipu1_csi1_to_ic_prpvf>; + }; + ipu1_ic_prpvf_from_smfc0: smfc0-endpoint { + remote-endpoint = <&ipu1_smfc0_to_ic_prpvf>; + }; + ipu1_ic_prpvf_from_smfc1: smfc1-endpoint { + remote-endpoint = <&ipu1_smfc1_to_ic_prpvf>; + }; + ipu1_ic_prpvf_from_m2m0: m2m0-endpoint { + remote-endpoint = <&m2m0_to_ic_prpvf>; + }; + }; + + port@1 { + reg = <1>; + ipu1_ic_prpvf_to_camif0: camif0-endpoint { + remote-endpoint = <&camif0_from_ic_prpvf>; + }; + ipu1_ic_prpvf_to_camif1: camif1-endpoint { + remote-endpoint = <&camif1_from_ic_prpvf>; + }; + ipu1_ic_prpvf_to_ic_pp0: pp0-endpoint { + remote-endpoint = <&ipu1_ic_pp0_from_ic_prpvf>; + }; + ipu1_ic_prpvf_to_ic_pp1: pp1-endpoint { + remote-endpoint = <&ipu1_ic_pp1_from_ic_prpvf>; + }; + ipu1_ic_prpvf_to_ic_pp2: pp2-endpoint { + remote-endpoint = <&ipu1_ic_pp2_from_ic_prpvf>; + }; + ipu1_ic_prpvf_to_m2m0: m2m0-endpoint { + remote-endpoint = <&m2m0_from_ic_prpvf>; + }; + }; + }; + + ipu1_ic_pp0: ipu1_ic_pp@0 { + #address-cells = <1>; + #size-cells = <0>; + sink-ports = <1>; + reg = <0>; + + port@0 { + reg = <0>; + ipu1_ic_pp0_from_m2m0: m2m0-endpoint { + remote-endpoint = <&m2m0_to_ic_pp0>; + }; + ipu1_ic_pp0_from_ic_prpvf: prpvf-endpoint { + remote-endpoint = <&ipu1_ic_prpvf_to_ic_pp0>; + }; + }; + + port@1 { + reg = <1>; + ipu1_ic_pp0_to_m2m0: endpoint { + remote-endpoint = <&m2m0_from_ic_pp0>; + }; + }; + }; + + ipu1_ic_pp1: ipu1_ic_pp@1 { + #address-cells = <1>; + #size-cells = <0>; + sink-ports = <1>; + reg = <1>; + + port@0 { + reg = <0>; + ipu1_ic_pp1_from_smfc0: smfc0-endpoint { + remote-endpoint = <&ipu1_smfc0_to_ic_pp1>; + }; + ipu1_ic_pp1_from_ic_prpvf: prpvf-endpoint { + remote-endpoint = <&ipu1_ic_prpvf_to_ic_pp1>; + }; + }; + + port@1 { + reg = <1>; + ipu1_ic_pp1_to_camif0: camif0-endpoint { + remote-endpoint = <&camif0_from_ic_pp1>; + }; + ipu1_ic_pp1_to_camif1: camif1-endpoint { + remote-endpoint = <&camif1_from_ic_pp1>; + }; + }; + }; + + ipu1_ic_pp2: ipu1_ic_pp@2 { + #address-cells = <1>; + #size-cells = <0>; + sink-ports = <1>; + reg = <2>; + + port@0 { + reg = <0>; + ipu1_ic_pp2_from_smfc1: smfc1-endpoint { + remote-endpoint = <&ipu1_smfc1_to_ic_pp2>; + }; + ipu1_ic_pp2_from_ic_prpvf: prpvf-endpoint { + remote-endpoint = <&ipu1_ic_prpvf_to_ic_pp2>; + }; + }; + + port@1 { + reg = <1>; + ipu1_ic_pp2_to_camif0: camif0-endpoint { + remote-endpoint = <&camif0_from_ic_pp2>; + }; + ipu1_ic_pp2_to_camif1: camif1-endpoint { + remote-endpoint = <&camif1_from_ic_pp2>; + }; + }; }; ipu1_di0: ipu1_di@0 { @@ -1284,5 +1538,119 @@ }; }; }; + + media0: media@0 { + compatible = "fsl,imx-media", "simple-bus"; + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + m2m0: m2m@0 { + compatible = "fsl,imx-media-mem2mem"; + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + sink-ports = <2>; + reg = <0>; + + port@0 { + reg = <0>; + }; + + port@1 { + reg = <1>; + m2m0_from_ic_pp0: endpoint { + remote-endpoint = <&ipu1_ic_pp0_to_m2m0>; + }; + m2m0_from_ic_prpvf: prpvf-endpoint { + remote-endpoint = <&ipu1_ic_prpvf_to_m2m0>; + }; + }; + + port@2 { + reg = <2>; + m2m0_to_ic_prpvf: prpvf-endpoint { + remote-endpoint = <&ipu1_ic_prpvf_from_m2m0>; + }; + m2m0_to_ic_pp0: pp0-endpoint { + remote-endpoint = <&ipu1_ic_pp0_from_m2m0>; + }; + }; + + port@3 { + reg = <3>; + }; + }; + + camif0: camif@0 { + compatible = "fsl,imx-media-camif"; + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + sink-ports = <1>; + reg = <0>; + + port@0 { + reg = <0>; + camif0_from_smfc0: smfc0-endpoint { + remote-endpoint = <&ipu1_smfc0_to_camif0>; + }; + camif0_from_smfc1: smfc1-endpoint { + remote-endpoint = <&ipu1_smfc1_to_camif0>; + }; + camif0_from_ic_prpenc: prpenc-endpoint { + remote-endpoint = <&ipu1_ic_prpenc_to_camif0>; + }; + camif0_from_ic_prpvf: prpvf-endpoint { + remote-endpoint = <&ipu1_ic_prpvf_to_camif0>; + }; + camif0_from_ic_pp1: pp1-endpoint { + remote-endpoint = <&ipu1_ic_pp1_to_camif0>; + }; + camif0_from_ic_pp2: pp2-endpoint { + remote-endpoint = <&ipu1_ic_pp2_to_camif0>; + }; + }; + + port@1 { + reg = <1>; + }; + }; + + camif1: camif@1 { + compatible = "fsl,imx-media-camif"; + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + sink-ports = <1>; + reg = <1>; + + port@0 { + reg = <0>; + camif1_from_smfc0: smfc0-endpoint { + remote-endpoint = <&ipu1_smfc0_to_camif1>; + }; + camif1_from_smfc1: smfc1-endpoint { + remote-endpoint = <&ipu1_smfc1_to_camif1>; + }; + camif1_from_ic_prpenc: prpenc-endpoint { + remote-endpoint = <&ipu1_ic_prpenc_to_camif1>; + }; + camif1_from_ic_prpvf: prpvf-endpoint { + remote-endpoint = <&ipu1_ic_prpvf_to_camif1>; + }; + camif1_from_ic_pp1: pp1-endpoint { + remote-endpoint = <&ipu1_ic_pp1_to_camif1>; + }; + camif1_from_ic_pp2: pp2-endpoint { + remote-endpoint = <&ipu1_ic_pp2_to_camif1>; + }; + }; + + port@1 { + reg = <1>; + }; + }; + }; }; };