From patchwork Fri May 18 09:28:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rui Miguel Silva X-Patchwork-Id: 10409107 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 28EA1602CB for ; Fri, 18 May 2018 09:28:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1AB84288D8 for ; Fri, 18 May 2018 09:28:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0F93D288E6; Fri, 18 May 2018 09:28:56 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI 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 85516285CE for ; Fri, 18 May 2018 09:28:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753437AbeERJ2w (ORCPT ); Fri, 18 May 2018 05:28:52 -0400 Received: from mail-wr0-f196.google.com ([209.85.128.196]:37402 "EHLO mail-wr0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753458AbeERJ2q (ORCPT ); Fri, 18 May 2018 05:28:46 -0400 Received: by mail-wr0-f196.google.com with SMTP id h5-v6so8477621wrm.4 for ; Fri, 18 May 2018 02:28:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=wjxDYbAz4IU4olfozatAjZ8MNt7cy7PprEy/RfcHVFg=; b=eAdCA6Pso7wqxumtRQ2NwmkB06ugW6ITRw4cwihQuOyfNfptSuc7bGAQPAbcV1EVdT 2vJdQ0WURbnoIHjSCO41kX6K4JIHqksvyZJRmx4TVgid78Hvi7Hp1e7ltPaRf9j6D2XK NLK/jRn/okveTvI/pIAdANBfQk3smaMcr0KkQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=wjxDYbAz4IU4olfozatAjZ8MNt7cy7PprEy/RfcHVFg=; b=UbKNIMWVKyDha6nQ5Bn+htb721YUezg0lZYfl27scad9q6laaZGKZDFpy0ODvlxpWs LbNvPi9odF9FOwt8q3tFyNXd/JuQkd7iPzw6vVMbIGed2ahU8sCB20b0BQBMBzv6sAeA 7wPyCBjBkli91YZSEjTMcvuBFEmI70HebABtDIU+fMCmXAYVdPiaP/KZyqsYvIJSiboT tq41jyXR/R8dFpeEANp0k3hAIjI8DkDbELlAnXpBELxTVtBUDZrcA8Oln/P/t8zMskay uXEh1oYKue6nNTQ+Hx93b6pbKkbjpa5xwJOAE9SsneodK2v88ZYK712W3iCBZ1It/Qk1 GBkw== X-Gm-Message-State: ALKqPwdQFB1weLfZCLidf98hUPlPRy5sufVz5CTVWfFxskWjCZlstW8F 9tlDsnMO/s/yGOkf6e9U1CqqdA== X-Google-Smtp-Source: AB8JxZqtngPtsJhNeNzKXM/+U0JjaGG1wG4srPmd4KwZVxcKdJcF8pm/k/YlhgDlQ9+P1tVyyo76fA== X-Received: by 2002:adf:e8c2:: with SMTP id k2-v6mr6454789wrn.182.1526635725071; Fri, 18 May 2018 02:28:45 -0700 (PDT) Received: from arch-late.local (a109-49-46-234.cpe.netcabo.pt. [109.49.46.234]) by smtp.gmail.com with ESMTPSA id d125-v6sm6544514wmd.24.2018.05.18.02.28.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 May 2018 02:28:44 -0700 (PDT) From: Rui Miguel Silva To: mchehab@kernel.org, sakari.ailus@linux.intel.com, Steve Longerbeam , Philipp Zabel , Rob Herring Cc: linux-media@vger.kernel.org, devel@driverdev.osuosl.org, Shawn Guo , Fabio Estevam , devicetree@vger.kernel.org, Greg Kroah-Hartman , Ryan Harkin , linux-clk@vger.kernel.org, Rui Miguel Silva Subject: [PATCH v5 09/12] ARM: dts: imx7: Add video mux, csi and mipi_csi and connections Date: Fri, 18 May 2018 10:28:03 +0100 Message-Id: <20180518092806.3829-10-rui.silva@linaro.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180518092806.3829-1-rui.silva@linaro.org> References: <20180518092806.3829-1-rui.silva@linaro.org> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch adds the device tree nodes for csi, video multiplexer and mipi-csi besides the graph connecting the necessary endpoints to make the media capture entities to work in imx7 Warp board. Also add the pin control related with the mipi_csi in that board. Signed-off-by: Rui Miguel Silva --- arch/arm/boot/dts/imx7s-warp.dts | 51 ++++++++++++++++++++++++++++++++ arch/arm/boot/dts/imx7s.dtsi | 28 ++++++++++++++++++ 2 files changed, 79 insertions(+) diff --git a/arch/arm/boot/dts/imx7s-warp.dts b/arch/arm/boot/dts/imx7s-warp.dts index 8a30b148534d..cb175ee2fc9d 100644 --- a/arch/arm/boot/dts/imx7s-warp.dts +++ b/arch/arm/boot/dts/imx7s-warp.dts @@ -310,6 +310,57 @@ status = "okay"; }; +&gpr { + csi_mux { + compatible = "video-mux"; + mux-controls = <&mux 0>; + #address-cells = <1>; + #size-cells = <0>; + + port@1 { + reg = <1>; + + csi_mux_from_mipi_vc0: endpoint { + remote-endpoint = <&mipi_vc0_to_csi_mux>; + }; + }; + + port@2 { + reg = <2>; + + csi_mux_to_csi: endpoint { + remote-endpoint = <&csi_from_csi_mux>; + }; + }; + }; +}; + +&csi { + status = "okay"; + + port { + csi_from_csi_mux: endpoint { + remote-endpoint = <&csi_mux_to_csi>; + }; + }; +}; + +&mipi_csi { + clock-frequency = <166000000>; + status = "okay"; + #address-cells = <1>; + #size-cells = <0>; + fsl,csis-hs-settle = <3>; + + port@1 { + reg = <1>; + + mipi_vc0_to_csi_mux: endpoint { + remote-endpoint = <&csi_mux_from_mipi_vc0>; + }; + }; +}; + &wdog1 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_wdog>; diff --git a/arch/arm/boot/dts/imx7s.dtsi b/arch/arm/boot/dts/imx7s.dtsi index 3590dab529f9..0bae41f2944c 100644 --- a/arch/arm/boot/dts/imx7s.dtsi +++ b/arch/arm/boot/dts/imx7s.dtsi @@ -46,6 +46,7 @@ #include #include #include +#include #include "imx7d-pinfunc.h" / { @@ -738,6 +739,17 @@ status = "disabled"; }; + csi: csi@30710000 { + compatible = "fsl,imx7-csi"; + reg = <0x30710000 0x10000>; + interrupts = ; + clocks = <&clks IMX7D_CLK_DUMMY>, + <&clks IMX7D_CSI_MCLK_ROOT_CLK>, + <&clks IMX7D_CLK_DUMMY>; + clock-names = "axi", "mclk", "dcic"; + status = "disabled"; + }; + lcdif: lcdif@30730000 { compatible = "fsl,imx7d-lcdif", "fsl,imx28-lcdif"; reg = <0x30730000 0x10000>; @@ -747,6 +759,22 @@ clock-names = "pix", "axi"; status = "disabled"; }; + + mipi_csi: mipi-csi@30750000 { + compatible = "fsl,imx7-mipi-csi2"; + reg = <0x30750000 0x10000>; + interrupts = ; + clocks = <&clks IMX7D_IPG_ROOT_CLK>, + <&clks IMX7D_MIPI_CSI_ROOT_CLK>, + <&clks IMX7D_MIPI_DPHY_ROOT_CLK>; + clock-names = "pclk", "wrap", "phy"; + power-domains = <&pgc_mipi_phy>; + phy-supply = <®_1p0d>; + resets = <&src IMX7_RESET_MIPI_PHY_MRST>; + reset-names = "mrst"; + bus-width = <2>; + status = "disabled"; + }; }; aips3: aips-bus@30800000 {