From patchwork Sat Oct 23 20:34:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Ford X-Patchwork-Id: 12579815 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A2FBFC433F5 for ; Sat, 23 Oct 2021 20:35:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8B12060E0B for ; Sat, 23 Oct 2021 20:35:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231319AbhJWUiC (ORCPT ); Sat, 23 Oct 2021 16:38:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53166 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231286AbhJWUiA (ORCPT ); Sat, 23 Oct 2021 16:38:00 -0400 Received: from mail-io1-xd2e.google.com (mail-io1-xd2e.google.com [IPv6:2607:f8b0:4864:20::d2e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C94F4C061714; Sat, 23 Oct 2021 13:35:40 -0700 (PDT) Received: by mail-io1-xd2e.google.com with SMTP id h196so10131634iof.2; Sat, 23 Oct 2021 13:35:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Ppg9ja7hrHSf7CKfWs4u1hP6s6Z/KSngdpkpwehFL0I=; b=Ref1K5KtSGGLL3OOVftfzPzVMoOA9uomKIPpuN12ZKwMqUWBH2VTtGq1PCyJ4CPjv8 ZwGm5ZG8xuw858d066B6dlK9jalgpWqBcN8d8jBcHGTw7a8Vbp+3NdbuVqFrrpuEWgq9 ZePw6ILqXPFZHvVxPqwhdwVnnODPrplTTILSeO09/hVE/t7lQiSES64yvmkcOfzxrqtw CQ/t/CStxGcdntm8ymRmE89Q6QU7bwZuWw6R9pEHg7vW1G+xYfK2NrW8IA0MHcXypJou ZrgdbvD30IwyZkiHUXOkhT1nQKkT/2abFteUPzgm5ViX0eTMFlM4j7IL/9kD6gg8XTOP aroQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Ppg9ja7hrHSf7CKfWs4u1hP6s6Z/KSngdpkpwehFL0I=; b=5fRZ2B5FmQsnqiulOMJ6fagAJLj/m92NmhA2uK2MzvwFSG0VhvLIXmU/55HOTd5rIZ mN7tuRxbmO2ZsjHT1+U9yKbTgAjEFFlJR1GogvKszHU+5bxwTbXDV04So08KGel9xpH9 p4rHGRwjfmtv7sYfDhzLTqnngCG2nNOMudMT777OuyNP1Qq670UT2NciSMjb2wUT4UEv FvMSGr2TEpa0GMKeEbRsspnsiO5954Mf6twaP08IwEbXiWQDKRhLuGbSj8I9Ml7Edwb9 8xH0UhpafrCBmCZOd+RPg53KaXHg10A8kUO6MxnUtRrTATtKyWfI9IPNL+f4j7jaLNAF P18A== X-Gm-Message-State: AOAM531g1JOjfppgoQC3zdyU5VfSi91IKxz4NTTX9rYp6IESVfd6xpO4 Wyf0N1SCLB/tvgzizi3AlIY= X-Google-Smtp-Source: ABdhPJyW8UR+vij9AkeWzvmB6TdgMUeqcv4kEYYT1oS1vYYrwdBezm+1RlhSUosF2bN+hGdw1RWOoA== X-Received: by 2002:a05:6602:483:: with SMTP id y3mr4902695iov.210.1635021340095; Sat, 23 Oct 2021 13:35:40 -0700 (PDT) Received: from aford-IdeaCentre-A730.lan ([2601:448:8400:9e8:1534:f270:7127:bc0a]) by smtp.gmail.com with ESMTPSA id i5sm6128678ilj.49.2021.10.23.13.35.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Oct 2021 13:35:39 -0700 (PDT) From: Adam Ford To: linux-arm-kernel@lists.infradead.org Cc: linux-media@vger.kernel.org, laurent.pinchart@ideasonboard.com, cstevens@beaconembedded.com, aford@beaconembedded.com, Adam Ford , Rob Herring , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Catalin Marinas , Will Deacon , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [RFC V2 1/5] arm64: dts: imx8mm: Add CSI nodes Date: Sat, 23 Oct 2021 15:34:52 -0500 Message-Id: <20211023203457.1217821-2-aford173@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211023203457.1217821-1-aford173@gmail.com> References: <20211023203457.1217821-1-aford173@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org There is a csi bridge and csis interface that tie together to allow csi2 capture. Signed-off-by: Adam Ford Reviewed-by: Laurent Pinchart --- arch/arm64/boot/dts/freescale/imx8mm.dtsi | 55 +++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8mm.dtsi b/arch/arm64/boot/dts/freescale/imx8mm.dtsi index c2f3f118f82e..920f9041ef50 100644 --- a/arch/arm64/boot/dts/freescale/imx8mm.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mm.dtsi @@ -1068,6 +1068,22 @@ aips4: bus@32c00000 { #size-cells = <1>; ranges = <0x32c00000 0x32c00000 0x400000>; + csi: csi@32e20000 { + compatible = "fsl,imx8mm-csi", "fsl,imx7-csi"; + reg = <0x32e20000 0x1000>; + interrupts = ; + clocks = <&clk IMX8MM_CLK_CSI1_ROOT>; + clock-names = "mclk"; + power-domains = <&disp_blk_ctrl IMX8MM_DISPBLK_PD_CSI_BRIDGE>; + status = "disabled"; + + port { + csi_in: endpoint { + remote-endpoint = <&imx8mm_mipi_csi_out>; + }; + }; + }; + disp_blk_ctrl: blk-ctrl@32e28000 { compatible = "fsl,imx8mm-disp-blk-ctrl", "syscon"; reg = <0x32e28000 0x100>; @@ -1095,6 +1111,45 @@ disp_blk_ctrl: blk-ctrl@32e28000 { #power-domain-cells = <1>; }; + mipi_csi2: mipi-csi@32e30000 { + compatible = "fsl,imx8mm-mipi-csi2"; + reg = <0x32e30000 0x1000>; + interrupts = ; + assigned-clocks = <&clk IMX8MM_CLK_CSI1_CORE>, + <&clk IMX8MM_CLK_CSI1_PHY_REF>; + assigned-clock-parents = <&clk IMX8MM_SYS_PLL2_1000M>, + <&clk IMX8MM_SYS_PLL2_1000M>; + clock-frequency = <333000000>; + clocks = <&clk IMX8MM_CLK_DISP_APB_ROOT>, + <&clk IMX8MM_CLK_CSI1_ROOT>, + <&clk IMX8MM_CLK_CSI1_PHY_REF>, + <&clk IMX8MM_CLK_DISP_AXI_ROOT>; + clock-names = "pclk", "wrap", "phy", "axi"; + power-domains = <&disp_blk_ctrl IMX8MM_DISPBLK_PD_MIPI_CSI>; + status = "disabled"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + imx8mm_mipi_csi_in: endpoint { + }; + }; + + port@1 { + reg = <1>; + + imx8mm_mipi_csi_out: endpoint { + remote-endpoint = <&csi_in>; + }; + }; + }; + }; + + usbotg1: usb@32e40000 { compatible = "fsl,imx8mm-usb", "fsl,imx7d-usb"; reg = <0x32e40000 0x200>; From patchwork Sat Oct 23 20:34:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Ford X-Patchwork-Id: 12579817 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C2A2EC4332F for ; Sat, 23 Oct 2021 20:35:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AD32D60E0B for ; Sat, 23 Oct 2021 20:35:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231406AbhJWUiD (ORCPT ); Sat, 23 Oct 2021 16:38:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53176 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231304AbhJWUiC (ORCPT ); Sat, 23 Oct 2021 16:38:02 -0400 Received: from mail-il1-x136.google.com (mail-il1-x136.google.com [IPv6:2607:f8b0:4864:20::136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BBFE2C061714; Sat, 23 Oct 2021 13:35:42 -0700 (PDT) Received: by mail-il1-x136.google.com with SMTP id 3so5740930ilq.7; Sat, 23 Oct 2021 13:35:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=S9jupzanivgTCvIkGDW6h4LgyrrV3Rj+0P0NfjPpEN8=; b=l6JEkJB7vJ6uWGNouTmlI12JZGU2xH6KQJB7Z3f1nOqC0S7Fja8v/CvL5xa8Qino+y 1YrAqt7LahVkMIEhG+37g1al+mhtqHhi+bYSY0ArCtByX7gUga6xJmVfAKbw0b5PcUYi cowrEEADeGyFJzawLKvxsEyISQNZW3my2HzPMj8gx9sqc9SjUoU9KEyGm2tihIDWMdWt CvH4cewGYbtoyjlRKL2BrQ62eIC0Sm9qCpSEckoEOjPlj1XR7xomrbZ8Dy9UfW5Srejg CjlqsAfZ0WCXUDYQXXAvTpdmROxu+TTdGdpjdAJGelyBDY35ekYVZIzxf2EiW5v6xMsQ 78cQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=S9jupzanivgTCvIkGDW6h4LgyrrV3Rj+0P0NfjPpEN8=; b=eu0NAESDAjwny63TSe7pDIJLdmsP2qRTLYiEBZyNWkIuZrGscYhKAsrXSEaH+mbKa0 VjA6Tkl5gokkFuocDGu4kRQ3Do0S5hfs9w4cLLC+4zoLxcwh5UqicQdtuRXHyoMTqCDj YmfLQNDbrnIHY8EZ+UU3YOOi7UXLVfHyrvhpP2h1nkq7Un7qyQ0xlVmC1RBqe6aur7qu RXr8tZR7YfQ7hza4Ou6Ew6mKKBOPm07PybUe5eXM1SN71nV0tVMbDLE3G3TiWD4kuhre bix1v4BYNb4VBilH4ZVZV/4k9ZQ2YTjmxiGIAQxbucC/Dj8WidYh/zZmN/HUvAnYsXzJ Cjag== X-Gm-Message-State: AOAM532OU/uSE0H2IysrAySonBNW4WbXQarZHdWFij7ggP/zbNeXjxGH vbpjCmI0JQZvjdHPtqppIec= X-Google-Smtp-Source: ABdhPJwsDxpTTl/DENPhF927l2Jzmq+wLWWfKntDUjaXu0DNktWdtN0jMbTyyChWrBMI791Mu2nsIg== X-Received: by 2002:a92:dcc1:: with SMTP id b1mr4862590ilr.210.1635021342068; Sat, 23 Oct 2021 13:35:42 -0700 (PDT) Received: from aford-IdeaCentre-A730.lan ([2601:448:8400:9e8:1534:f270:7127:bc0a]) by smtp.gmail.com with ESMTPSA id i5sm6128678ilj.49.2021.10.23.13.35.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Oct 2021 13:35:41 -0700 (PDT) From: Adam Ford To: linux-arm-kernel@lists.infradead.org Cc: linux-media@vger.kernel.org, laurent.pinchart@ideasonboard.com, cstevens@beaconembedded.com, aford@beaconembedded.com, Adam Ford , Rob Herring , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Catalin Marinas , Will Deacon , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [RFC V2 2/5] arm64: defconfig: Enable VIDEO_IMX_MEDIA Date: Sat, 23 Oct 2021 15:34:53 -0500 Message-Id: <20211023203457.1217821-3-aford173@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211023203457.1217821-1-aford173@gmail.com> References: <20211023203457.1217821-1-aford173@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org To use a camera, the CSIS and CSI drivers need to be enabled with VIDEO_IMX_MEDIA. Signed-off-by: Adam Ford --- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig index d04cdfc7daa4..6be8fb8248d5 100644 --- a/arch/arm64/configs/defconfig +++ b/arch/arm64/configs/defconfig @@ -955,6 +955,7 @@ CONFIG_MFD_CROS_EC_DEV=y CONFIG_STAGING=y CONFIG_STAGING_MEDIA=y CONFIG_VIDEO_HANTRO=m +CONFIG_VIDEO_IMX_MEDIA=m CONFIG_CHROME_PLATFORMS=y CONFIG_CROS_EC=y CONFIG_CROS_EC_I2C=y From patchwork Sat Oct 23 20:34:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Ford X-Patchwork-Id: 12579819 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7BF86C433EF for ; Sat, 23 Oct 2021 20:35:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5E2FF60F23 for ; Sat, 23 Oct 2021 20:35:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231416AbhJWUiF (ORCPT ); Sat, 23 Oct 2021 16:38:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53190 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231408AbhJWUiE (ORCPT ); Sat, 23 Oct 2021 16:38:04 -0400 Received: from mail-il1-x129.google.com (mail-il1-x129.google.com [IPv6:2607:f8b0:4864:20::129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8971DC061714; Sat, 23 Oct 2021 13:35:44 -0700 (PDT) Received: by mail-il1-x129.google.com with SMTP id j10so4904046ilu.2; Sat, 23 Oct 2021 13:35:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=KDOP1tCAcTvluW80vZVwTNvTPHQ675ZCbgD2GhXsipY=; b=EymZQsYg6HVkF4fzOeyrwlWNp+qt5S8Fz4YWTxg9nETZHkGoJMGFBQp4Ol/V+jFn6P cadYe1IRZVhbqt2259gj7ifcypiuOwf/Rl3+n5ZVpT+Enog7fLFjB6hGwPcW1/FL+How Oz2nT+qDsk52BiL02dGFx11GyFoU7vFvRW8ec7MR31AA4Wfj/fgOMBVS0q7DK0P6Qvhs 2hW83AXHA6101TaCvjQ4GDSnmyr0b4a2N78ngNw1m4M4+pbw1klkLMsw1YxxKhCIMLmm f2db3lmg6ITh8rOUWMOBBwTDJDYR63M7DMLFzTDAmhyW6mpff533VLDeaEd8x7saV/XV 70vQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=KDOP1tCAcTvluW80vZVwTNvTPHQ675ZCbgD2GhXsipY=; b=dzcINtwxzMfPw/Zvkzbdl0NviwJxnPYVwdOSRIRUTpWqzrOKXwXpOqbXkv4KJymMQ9 ksKOyHlXMc9G1EcbHdatcatcrN3rb2u/dq1eM9XIEzj/hk6F3Y67qWXHGbHSQ/k/HMhs y3WxZsgJBJB52PCgpTgBdjwfDa/fYqCIZ362NS9NeuXlqKFxnh2VBl9sAiSCdYAS2blv eEcs6JTvLTmKwWGktVdjqb54TIpWpfVNqqvAFndYkdhRhUHQFNGHJjU3SJW0FzzdBIOJ XlXH56BsUs9n8UN+2f9GI24ZNC89jp6XSI7L+M69eoSzlZp2kvMung2PcjQqEAzeYYpC a6EA== X-Gm-Message-State: AOAM531dLrMkT26Zc0C/cwQTxyStMBRl0nMhA6qyc4g8e91ZGUkW1Pzq ye2TlY1XkqpJm00bdIhjbRc= X-Google-Smtp-Source: ABdhPJw11YlXTJPFAcwSmNr5wGo1eBMiMJQGN3Z+9b0rBf4UGcEncUFSY9I7jgcnkGQ4e2dmJN/dEA== X-Received: by 2002:a05:6e02:1bcb:: with SMTP id x11mr3566645ilv.147.1635021343882; Sat, 23 Oct 2021 13:35:43 -0700 (PDT) Received: from aford-IdeaCentre-A730.lan ([2601:448:8400:9e8:1534:f270:7127:bc0a]) by smtp.gmail.com with ESMTPSA id i5sm6128678ilj.49.2021.10.23.13.35.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Oct 2021 13:35:43 -0700 (PDT) From: Adam Ford To: linux-arm-kernel@lists.infradead.org Cc: linux-media@vger.kernel.org, laurent.pinchart@ideasonboard.com, cstevens@beaconembedded.com, aford@beaconembedded.com, Adam Ford , Rob Herring , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Catalin Marinas , Will Deacon , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [RFC V2 3/5] arm64: dts: imx8mm-beacon: Enable OV5640 Camera Date: Sat, 23 Oct 2021 15:34:54 -0500 Message-Id: <20211023203457.1217821-4-aford173@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211023203457.1217821-1-aford173@gmail.com> References: <20211023203457.1217821-1-aford173@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org The baseboard has support for a TDNext 5640 Camera which uses an OV5640 connected to a 2-lane CSI2 interface. Signed-off-by: Adam Ford --- .../freescale/imx8mm-beacon-baseboard.dtsi | 55 +++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8mm-beacon-baseboard.dtsi b/arch/arm64/boot/dts/freescale/imx8mm-beacon-baseboard.dtsi index 6f5e63696ec0..cb19c80ac29c 100644 --- a/arch/arm64/boot/dts/freescale/imx8mm-beacon-baseboard.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mm-beacon-baseboard.dtsi @@ -43,6 +43,16 @@ reg_audio: regulator-audio { enable-active-high; }; + reg_camera: regulator-camera { + compatible = "regulator-fixed"; + regulator-name = "mipi_pwr"; + regulator-min-microvolt = <2800000>; + regulator-max-microvolt = <2800000>; + gpio = <&pca6416_1 0 GPIO_ACTIVE_HIGH>; + enable-active-high; + startup-delay-us = <100000>; + }; + reg_usdhc2_vmmc: regulator-usdhc2 { compatible = "regulator-fixed"; regulator-name = "VSD_3V3"; @@ -67,6 +77,10 @@ sound { }; }; +&csi { + status = "okay"; +}; + &ecspi2 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_espi2>; @@ -90,6 +104,30 @@ &i2c2 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_i2c2>; status = "okay"; + + camera@3c { + compatible = "ovti,ov5640"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_ov5640>; + reg = <0x3c>; + clocks = <&clk IMX8MM_CLK_CLKO1>; + clock-names = "xclk"; + assigned-clocks = <&clk IMX8MM_CLK_CLKO1>; + assigned-clock-parents = <&clk IMX8MM_CLK_24M>; + assigned-clock-rates = <24000000>; + AVDD-supply = <®_camera>; /* 2.8v */ + powerdown-gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>; + reset-gpios = <&gpio1 6 GPIO_ACTIVE_LOW>; + + port { + /* MIPI CSI-2 bus endpoint */ + ov5640_to_mipi_csi2: endpoint { + remote-endpoint = <&imx8mm_mipi_csi_in>; + clock-lanes = <0>; + data-lanes = <1 2>; + }; + }; + }; }; &i2c4 { @@ -141,6 +179,15 @@ pca6416_1: gpio@21 { }; }; +&imx8mm_mipi_csi_in { + remote-endpoint = <&ov5640_to_mipi_csi2>; + data-lanes = <1 2>; +}; + +&mipi_csi2 { + status = "okay"; +}; + &sai3 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_sai3>; @@ -209,6 +256,14 @@ MX8MM_IOMUXC_SAI3_RXFS_GPIO4_IO28 0x41 >; }; + pinctrl_ov5640: ov5640grp { + fsl,pins = < + MX8MM_IOMUXC_GPIO1_IO07_GPIO1_IO7 0x19 + MX8MM_IOMUXC_GPIO1_IO06_GPIO1_IO6 0x19 + MX8MM_IOMUXC_GPIO1_IO14_CCMSRCGPCMIX_CLKO1 0x59 + >; + }; + pinctrl_pcal6414: pcal6414-gpiogrp { fsl,pins = < MX8MM_IOMUXC_SAI2_MCLK_GPIO4_IO27 0x19 From patchwork Sat Oct 23 20:34:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Ford X-Patchwork-Id: 12579821 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 65049C433F5 for ; Sat, 23 Oct 2021 20:35:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5261860E8C for ; Sat, 23 Oct 2021 20:35:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231131AbhJWUiJ (ORCPT ); Sat, 23 Oct 2021 16:38:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53204 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231452AbhJWUiF (ORCPT ); Sat, 23 Oct 2021 16:38:05 -0400 Received: from mail-il1-x132.google.com (mail-il1-x132.google.com [IPv6:2607:f8b0:4864:20::132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 345E6C061714; Sat, 23 Oct 2021 13:35:46 -0700 (PDT) Received: by mail-il1-x132.google.com with SMTP id h10so8264722ilq.3; Sat, 23 Oct 2021 13:35:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=M2kws/8h5A47SW8z23Mmx2Z5/tBmFNdnsEpgnc/EWks=; b=cevxLD5Jw0iOV6nl46aI+O5+GY2nR3aTbUJW3ScAAXtJ/tBuzOLTmOzrsRyuumIiQ1 SGAVwRWUOFKgjspArTPHksdPiP8SjZyBBVXslc7oVn+3mmbsCah3V5+eGE/BueCu9A57 yMsAEZyrY2hbLwvhS/sMTdbTnNbvR6KBW3BHz7i/NmZ6jVIpCzA2TfHqOmPuLJPZ5d3b RKywjgJSSS1K3fyk3jaxgntu3E3yBP0ywlDWhnCz8M8SOIvsBNkvFxS64HZiEzB1mIou cMdWjuOa9jmwfgn6W2bl7x4fwHQmwVZTJsnHpLPQBWIri0ZCwJOXuuBvKxCOonJBoai5 BLSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=M2kws/8h5A47SW8z23Mmx2Z5/tBmFNdnsEpgnc/EWks=; b=nTeNzhtI4+WwdC3fgv4G+R79QnYe0PL7kFZTyKfiJU+6M+4IDeEEhtuvblAq+t7gfD +hWz3+9bqIHDgJ9IobX7xzYtCcRnIj/0hODxGu4lNwS0904AYZMJ1XIfdZQ1H4OHgC6s 6m+U/bYjpVDYYNggRBi0U0hjPuWQdYtpuSjrcsRkO3iLgv8MGPnBz4rrBaP3YL8NxNOT +3EyRFftYA4usbnuJDd2yRvgaY/XNLZdPg7lCeCE0YTMfjrjX0C/WN58zpGXiiFIMwCv kcYEOQFwcKttYUixC1hC38IobC17qbuKgraBCtTWGmBTgNhgtoBM5FOOQKfbuvZRnb+I a7kg== X-Gm-Message-State: AOAM5309F52NWjoh1m97IZEqi5Lo/kmQ3BRcduJX2jRXkaym4k6uTySJ UoWWan/iUc4ozBPMHwtalDCtn0IafuTlZQ== X-Google-Smtp-Source: ABdhPJxMwTHhdQAspLxNKsxNcd1WQAXjG+v8/ytAkNBnt26kZGVqshM304hhub7pcncigAEE6nFYyQ== X-Received: by 2002:a05:6e02:1788:: with SMTP id y8mr4880773ilu.75.1635021345603; Sat, 23 Oct 2021 13:35:45 -0700 (PDT) Received: from aford-IdeaCentre-A730.lan ([2601:448:8400:9e8:1534:f270:7127:bc0a]) by smtp.gmail.com with ESMTPSA id i5sm6128678ilj.49.2021.10.23.13.35.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Oct 2021 13:35:45 -0700 (PDT) From: Adam Ford To: linux-arm-kernel@lists.infradead.org Cc: linux-media@vger.kernel.org, laurent.pinchart@ideasonboard.com, cstevens@beaconembedded.com, aford@beaconembedded.com, Adam Ford , Rob Herring , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Catalin Marinas , Will Deacon , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [RFC V2 4/5] arm64: defconfig: Enable OV5640 Date: Sat, 23 Oct 2021 15:34:55 -0500 Message-Id: <20211023203457.1217821-5-aford173@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211023203457.1217821-1-aford173@gmail.com> References: <20211023203457.1217821-1-aford173@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org The Beacon EmbeddedWorks imx8mm development kit has a TD Next 5640 Camera. Enable the OV5640 driver to use the camera. Signed-off-by: Adam Ford --- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig index 6be8fb8248d5..6030fa71bcbd 100644 --- a/arch/arm64/configs/defconfig +++ b/arch/arm64/configs/defconfig @@ -665,6 +665,7 @@ CONFIG_VIDEO_QCOM_VENUS=m CONFIG_SDR_PLATFORM_DRIVERS=y CONFIG_VIDEO_RCAR_DRIF=m CONFIG_VIDEO_IMX219=m +CONFIG_VIDEO_OV5640=m CONFIG_VIDEO_OV5645=m CONFIG_VIDEO_QCOM_CAMSS=m CONFIG_DRM=m From patchwork Sat Oct 23 20:34:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Ford X-Patchwork-Id: 12579823 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 448A1C433F5 for ; Sat, 23 Oct 2021 20:36:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 236BF60F23 for ; Sat, 23 Oct 2021 20:36:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231611AbhJWUiL (ORCPT ); Sat, 23 Oct 2021 16:38:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53218 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231286AbhJWUiH (ORCPT ); Sat, 23 Oct 2021 16:38:07 -0400 Received: from mail-io1-xd34.google.com (mail-io1-xd34.google.com [IPv6:2607:f8b0:4864:20::d34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 37F48C061766; Sat, 23 Oct 2021 13:35:48 -0700 (PDT) Received: by mail-io1-xd34.google.com with SMTP id b188so10078380iof.8; Sat, 23 Oct 2021 13:35:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=kYZLgxf29rXPGIy0NqoVL1o+rM2gGr1j1H+X1hQjOR4=; b=eHfL3shFu7T6yK76H9jVeR+EDD/EFDXGPsO0O//3EIn3jxkpvd3q9KB0AJP5gYBADO O8pGw5yuernxSi5Oy603fzNkIyCsx6URdZHpeBDQT7u8+woDaQhAzlvztu3IkgSWx67/ D9YHf0dFqZJ0mj+bXl3EqANfV4MqkF2LfzIRNxoTG05+uLYizbLR+ju11JZLJ5+n226x WxNfJiHA4q6YOB9AOv3OSOCUQ53sW9/0ZBSceEzAj83vFfRbFTpobTK45NwPjB/FUKj4 fiZ/JdEeUQ+ZTLv+V9rCL1oisWNBZnQVz/hxJKa4bnY/5fuD6QRNzvd7m1Xc+IWe7sX3 Cxew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=kYZLgxf29rXPGIy0NqoVL1o+rM2gGr1j1H+X1hQjOR4=; b=Ex584PeUNNIrSUAyuNeqR92Sf54AZff9jBJlHj1Nn2JunwWQup7FZzyOVN3XQLleyR uc1MddN67WoNd7ZaqVngaGKwtoG9fSPVsOA3vHOauJTkPwpt/uffpgMJg0FkmQ5Gz+Ws gbdh/CD2LZtcw/gebibOI2CmUMBG4OQ60wfRJf116E7ApwgSI9F4lsA+meA4o+Yu+hdT ZvN3Rta4UpLyDjiIz9m335DFw3cc3P3TgRq5I+4j2BFseS9zhSenzfvF5GL+xWMW3lix GYcViYjtpWWwoyqog6l7PI3Q25IcFpTIhdgS0HiRR35kxKcIr/VPKSeFXhFLR91+oXT4 lV6g== X-Gm-Message-State: AOAM532/FXjNfMS7kVHHUgqUIsy4Af5FtC5wkLVGULWJ7u3pFn8uJxBQ s80pEivyKDTy/L+pA46pL+c= X-Google-Smtp-Source: ABdhPJw42x8qNZR2LGFeVm7q250qSCKu/c8Qv6anPb0nZI00cB/D7/iluEnPVCAffgpDmfJURxqlHg== X-Received: by 2002:a05:6602:140d:: with SMTP id t13mr4814913iov.120.1635021347553; Sat, 23 Oct 2021 13:35:47 -0700 (PDT) Received: from aford-IdeaCentre-A730.lan ([2601:448:8400:9e8:1534:f270:7127:bc0a]) by smtp.gmail.com with ESMTPSA id i5sm6128678ilj.49.2021.10.23.13.35.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Oct 2021 13:35:47 -0700 (PDT) From: Adam Ford To: linux-arm-kernel@lists.infradead.org Cc: linux-media@vger.kernel.org, laurent.pinchart@ideasonboard.com, cstevens@beaconembedded.com, aford@beaconembedded.com, Adam Ford , Rob Herring , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Catalin Marinas , Will Deacon , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [RFC V2 5/5] arm64: dts: imx8mm-evk: Enable OV5640 Camera Date: Sat, 23 Oct 2021 15:34:56 -0500 Message-Id: <20211023203457.1217821-6-aford173@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211023203457.1217821-1-aford173@gmail.com> References: <20211023203457.1217821-1-aford173@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org The schematic shows support for a camera interface, and the NXP kernel shows it is an OV5640. Signed-off-by: Adam Ford --- arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi b/arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi index e033d0257b5a..27217d30b8d8 100644 --- a/arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi @@ -239,6 +239,10 @@ ldo6_reg: LDO6 { }; }; +&csi { + status = "okay"; +}; + &i2c2 { clock-frequency = <400000>; pinctrl-names = "default"; @@ -287,6 +291,38 @@ pca6416: gpio@20 { gpio-controller; #gpio-cells = <2>; }; + + camera@3c { + compatible = "ovti,ov5640"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_ov5640>; + reg = <0x3c>; + clocks = <&clk IMX8MM_CLK_CLKO1>; + clock-names = "xclk"; + assigned-clocks = <&clk IMX8MM_CLK_CLKO1>; + assigned-clock-parents = <&clk IMX8MM_CLK_24M>; + assigned-clock-rates = <24000000>; + powerdown-gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>; + reset-gpios = <&gpio1 6 GPIO_ACTIVE_LOW>; + + port { + /* MIPI CSI-2 bus endpoint */ + ov5640_to_mipi_csi2: endpoint { + remote-endpoint = <&imx8mm_mipi_csi_in>; + clock-lanes = <0>; + data-lanes = <1 2>; + }; + }; + }; +}; + +&imx8mm_mipi_csi_in { + remote-endpoint = <&ov5640_to_mipi_csi2>; + data-lanes = <1 2>; +}; + +&mipi_csi2 { + status = "okay"; }; &sai3 { @@ -406,6 +442,14 @@ MX8MM_IOMUXC_I2C3_SDA_I2C3_SDA 0x400001c3 >; }; + pinctrl_ov5640: ov5640grp { + fsl,pins = < + MX8MM_IOMUXC_GPIO1_IO07_GPIO1_IO7 0x19 + MX8MM_IOMUXC_GPIO1_IO06_GPIO1_IO6 0x19 + MX8MM_IOMUXC_GPIO1_IO14_CCMSRCGPCMIX_CLKO1 0x59 + >; + }; + pinctrl_pmic: pmicirqgrp { fsl,pins = < MX8MM_IOMUXC_GPIO1_IO03_GPIO1_IO3 0x141