From patchwork Wed Nov 15 09:51:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jai Luthra X-Patchwork-Id: 13456437 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8E7F5C47072 for ; Wed, 15 Nov 2023 09:52:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:CC:To:In-Reply-To:References:Message-ID :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=INLv8Yt33W/oSjHDxgi9catQPjYm1UEJefO9HLomC+8=; b=SB16u59gQo72B8 7PhLYibdN1OZe6JBdmNpam9OcKhQUPd1QovTmhVxyY7cGwjN85QjPSkfCddFueWHDxNdokb/r1Xj+ zua0TI2cOv9JfplauxaCPKle+58pN31O638P4E1sXKC5JHd2eqhoA3p6YYQk5fZ0IrXo8nWEqvXCR vobOTQqeaCRJRe19/ZVfO0p4N6yBlZ3/VZky5ofjra2kb5qtTMvZ/bZUur2SEQKtwIay0aSI5jvj4 yUU9RfeNtyJsRV7Aj8GVqYGBTO8Ec8im3WOQRB9KS4+n4rn37O3jg4W3/qCpWRJWklb/Cz/b9cf9d FKIVowuVQU3/lP0s6QDw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r3CZM-000Nay-22; Wed, 15 Nov 2023 09:52:24 +0000 Received: from lelv0142.ext.ti.com ([198.47.23.249]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r3CZJ-000NZU-0t for linux-arm-kernel@lists.infradead.org; Wed, 15 Nov 2023 09:52:22 +0000 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 3AF9q92b104991; Wed, 15 Nov 2023 03:52:09 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1700041929; bh=LLGGCOQ7unGDSmJmEvT2dCwuXArAIgSDeOPgzN9Q4Ec=; h=From:Date:Subject:References:In-Reply-To:To:CC; b=Af4LcLhLLJaAvc5OGBYF2ljSURLSPbirtXj15P5eoVxQDs7gUirl1XdLH1hfKsEK3 UkanFSUVM37mlyo7XRkI836Ou53UGScDTTVWEcnhJIcJcqYr4RNOkVoJJ+1FPk+1u0 pVEib10FGJYKktcXyEmNu3BkiPwVOgbR4/qniRYU= Received: from DLEE110.ent.ti.com (dlee110.ent.ti.com [157.170.170.21]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 3AF9q9bs109154 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 15 Nov 2023 03:52:09 -0600 Received: from DLEE100.ent.ti.com (157.170.170.30) by DLEE110.ent.ti.com (157.170.170.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Wed, 15 Nov 2023 03:52:09 -0600 Received: from lelv0326.itg.ti.com (10.180.67.84) by DLEE100.ent.ti.com (157.170.170.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Wed, 15 Nov 2023 03:52:09 -0600 Received: from localhost (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 3AF9q8gA009683; Wed, 15 Nov 2023 03:52:08 -0600 From: Jai Luthra Date: Wed, 15 Nov 2023 15:21:09 +0530 Subject: [PATCH 1/8] arm64: defconfig: Enable AM62 CSI2RX MIME-Version: 1.0 Message-ID: <20231115-csi_dts-v1-1-99fc535b2bde@ti.com> References: <20231115-csi_dts-v1-0-99fc535b2bde@ti.com> In-Reply-To: <20231115-csi_dts-v1-0-99fc535b2bde@ti.com> To: Catalin Marinas , Will Deacon , Nishanth Menon , Vignesh Raghavendra , Tero Kristo , Rob Herring , Krzysztof Kozlowski , Conor Dooley CC: , , , Aradhya Bhatia , Devarsh Thakkar , Vaishnav Achath , Julien Massot , Martyn Welch , Jai Luthra X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=1229; i=j-luthra@ti.com; h=from:subject:message-id; bh=8U3EQOnnnQs+YWq5bKXi7ppSCeJNZ30pVpHqlXgkXMA=; b=owEBbQKS/ZANAwAIAUPekfkkmnFFAcsmYgBlVJS5ClHbIj0PBE9t2b/G0B5Dhzy9g7A5MYJcm tCTl4pBhJmJAjMEAAEIAB0WIQRN4NgY5dV16NRar8VD3pH5JJpxRQUCZVSUuQAKCRBD3pH5JJpx RXC/D/45/M7qdoBGBRU7UODDT0uKAMafjqTYos26JFwLBx0via4aA1DvTFzE/r/Q5lgDnZY7CJH LFGDJv1AtRQAC4ZRCqT6Bx/nuFhj6w5hR/ac8Hi6YEPiX8IoGo0Lg+nkb81rN1yyV0VMa+5oA+M IaN5F9kPQohyeQk4yFWbmPB8DxMb7Y9EdNrV0GAQSty49XtMqNAZ7wMi1L3OjJl4mtUuKDh1m7f WjLarCc0DKjltP3dC7zRyf8vqEroh16+1K4dW2U4jqK2tsIwaBOqOLrhLaigxCuQ3e+q1JxMSyj g01XlNmI4O7GVXAooQugG7XYncnzaEmqIgL8vlQykvNYeoU6fTozPvYCSj/IWoCfexdS6JVYNzW 6ymcPCeZBMrz9QcQrsEKeSLDKi89w/jHE+Z5MN578PWI5FhCpyvN5OeZKkQO2aa/c5L+/mDWZe1 PDegbnR6EYYOftTRCjYBg8NN2/g/3znXAKa3oslrvXWcP+FDzrxp1C2yYHJC4JQQmxDfrW06B5e J/v99C24yEo1Bu6+jKu3jLMnPFJMNMJgUSTf5iiyV+6LyFH3tEmEdF+2dJn1ajlpIoZF41cb/q4 yZpW9Cwr/RgcO/RvRtkxDmrfaSYA/qXcDCBTAz2zvc4TC37MpXCYI1jdewMuJY5jJRAFzXHuQlK IhctqwmWIOyhRlg== X-Developer-Key: i=j-luthra@ti.com; a=openpgp; fpr=4DE0D818E5D575E8D45AAFC543DE91F9249A7145 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231115_015221_418380_9B89436D X-CRM114-Status: UNSURE ( 9.18 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org AM62 and other K3 based SoCs use Cadence DPHY and CSI-RX bridge drivers, along with a DMA wrapper CSI IP for the camera pipeline. Signed-off-by: Jai Luthra --- arch/arm64/configs/defconfig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig index b60aa1f89343..aa2df39d072e 100644 --- a/arch/arm64/configs/defconfig +++ b/arch/arm64/configs/defconfig @@ -783,6 +783,7 @@ CONFIG_USB_VIDEO_CLASS=m CONFIG_V4L_PLATFORM_DRIVERS=y CONFIG_SDR_PLATFORM_DRIVERS=y CONFIG_V4L_MEM2MEM_DRIVERS=y +CONFIG_VIDEO_CADENCE_CSI2RX=m CONFIG_VIDEO_MEDIATEK_JPEG=m CONFIG_VIDEO_MEDIATEK_VCODEC=m CONFIG_VIDEO_IMX7_CSI=m @@ -804,6 +805,7 @@ CONFIG_VIDEO_SAMSUNG_EXYNOS_GSC=m CONFIG_VIDEO_SAMSUNG_S5P_JPEG=m CONFIG_VIDEO_SAMSUNG_S5P_MFC=m CONFIG_VIDEO_SUN6I_CSI=m +CONFIG_VIDEO_TI_J721E_CSI2RX=m CONFIG_VIDEO_HANTRO=m CONFIG_VIDEO_IMX219=m CONFIG_VIDEO_IMX412=m @@ -1421,6 +1423,7 @@ CONFIG_PHY_XGENE=y CONFIG_PHY_CAN_TRANSCEIVER=m CONFIG_PHY_SUN4I_USB=y CONFIG_PHY_CADENCE_TORRENT=m +CONFIG_PHY_CADENCE_DPHY_RX=m CONFIG_PHY_CADENCE_SIERRA=m CONFIG_PHY_MIXEL_MIPI_DPHY=m CONFIG_PHY_FSL_IMX8M_PCIE=y From patchwork Wed Nov 15 09:51:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jai Luthra X-Patchwork-Id: 13456438 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C4FEDC07548 for ; Wed, 15 Nov 2023 09:53:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:CC:To:In-Reply-To:References:Message-ID :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=i3n7Qe4pywgY13dNTh3Wo7Ee9vCBhuBHBsOb72BfLXo=; b=0dzO2qmZkSSebv 8RdA4aHpjKeDUOumUbiKo7frg2pdZHhAQpiSNIJRvtplh1ACq5HyXsMNt4hVUTpqlY6K1Tu9v/49E rg5pHBtwcOuzCwlc5+nLuSeppM/qS9up8LMEs3GFzagyO+avhbEG5FPf6p1/omBW994b2QfHYFy1o WSUlWkycV8PwYqyNpA26QSvlyEKXiODYf4K51241bhR9JQmwiKMMwgjrQKwEbPumFUoXh98YMSiqo yj65Va7N0pdlciyjqN3ah7zu1db2HlKcWw8pavCt+yLofqKqkPPsN521DHdJnngCfoFhwXdA9BhpZ 5sYk8yHhD+OCnHUkfqvA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r3CZU-000Nfa-05; Wed, 15 Nov 2023 09:52:32 +0000 Received: from lelv0143.ext.ti.com ([198.47.23.248]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r3CZK-000NZT-0v for linux-arm-kernel@lists.infradead.org; Wed, 15 Nov 2023 09:52:23 +0000 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 3AF9qA0Z027067; Wed, 15 Nov 2023 03:52:10 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1700041930; bh=kxbQ/hRc7Q4aD40Sxi+FHzPEYPOdcxP2qr3BfgtMY7o=; h=From:Date:Subject:References:In-Reply-To:To:CC; b=Y80Q7x2BWuu1Cpz9/3aEpcuUvVeo3yw+v2WsMFxDO1Xph5XUmd6XJJ2chrSDHEVxf A8F0kJWV8OVA42kQiQKJHl5gaWk7l48zsuadZU8VlscKbiFtUrui1Q7nJ1Ji1Xtjdo yqhPP11ufykWDVywSOwsG63LOhQreEoAJEF4RDPQ= Received: from DLEE115.ent.ti.com (dlee115.ent.ti.com [157.170.170.26]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 3AF9qAmn109170 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 15 Nov 2023 03:52:10 -0600 Received: from DLEE107.ent.ti.com (157.170.170.37) by DLEE115.ent.ti.com (157.170.170.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Wed, 15 Nov 2023 03:52:10 -0600 Received: from lelv0326.itg.ti.com (10.180.67.84) by DLEE107.ent.ti.com (157.170.170.37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Wed, 15 Nov 2023 03:52:10 -0600 Received: from localhost (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 3AF9q9hf009700; Wed, 15 Nov 2023 03:52:10 -0600 From: Jai Luthra Date: Wed, 15 Nov 2023 15:21:10 +0530 Subject: [PATCH 2/8] arm64: dts: ti: Enable CSI-RX on AM62 MIME-Version: 1.0 Message-ID: <20231115-csi_dts-v1-2-99fc535b2bde@ti.com> References: <20231115-csi_dts-v1-0-99fc535b2bde@ti.com> In-Reply-To: <20231115-csi_dts-v1-0-99fc535b2bde@ti.com> To: Catalin Marinas , Will Deacon , Nishanth Menon , Vignesh Raghavendra , Tero Kristo , Rob Herring , Krzysztof Kozlowski , Conor Dooley CC: , , , Aradhya Bhatia , Devarsh Thakkar , Vaishnav Achath , Julien Massot , Martyn Welch , Jai Luthra X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=2175; i=j-luthra@ti.com; h=from:subject:message-id; bh=Ygo3DMdffwbzu3W24FhQXSDCuiW/4zp9AmLaS/aTiyk=; b=owEBbQKS/ZANAwAIAUPekfkkmnFFAcsmYgBlVJS5K58USh8mBD3DC3jzqtI6iwmtg6IcPoD/W 2rgL9AGiLeJAjMEAAEIAB0WIQRN4NgY5dV16NRar8VD3pH5JJpxRQUCZVSUuQAKCRBD3pH5JJpx RaqmD/9rxFCqMJtUlFUV/4S/uzP/3qTmJag8aliPz2OXZivPWQ7uLxDniA+osdaRrlg32f8cSAd YJeWfANcBTRFi6qxAcuYA7ln+yklxL+sVq1ubsm7kqFXop2R+gDcEB2zLEsT28+R0tPH+z0QmsO pn8HqRb/1sjuwUYZJEhaaASAghwUmwQ9ACS0KKXq9aWcRl9rgAwZwF7leF47Pg+USvjc5Dt9AE2 ZhXeB2MOe4hd2NOy7Od+Q/T0OpRKPWWvw6mzWWAfozIWGrx8W1bONRWuvD5iAV0wDbEpPPIf0rm aU7IOmGZFy54Obr6vcTkSz+AH/CgzsxrtD6S9Uvl5F8PpXCjus+kvYAeWEho2SNf4OCWVw0CnkW Wwug4wIgG4yn/j2j2/vg2FjiI2JYd8o7lwA7MNlUBfOUAx+OdT5IgTG+EfMrYe8XlLq6cw0yFXf nTmRR6RP/rfzrTz4/AQmjlbQhswktVP8QuWTPEJt95RBbgLIxqKNlMmEqVaNKQB402sCQGjrZBi 7IsSCqh/8TkYQeMaaGCJPlMhi7QkM+yFBQNrO/UZ/aGc+dPNSAzoPW7nR9k40CTrakcGofbflrs KpfXWD0uSB0uTw5R/ppHPI/3U3sU+KKDZCYYY5OEWLiD35TddRJEkIDReUJngoRiLofMyXucQQh g5rjSKKa2JsbdhQ== X-Developer-Key: i=j-luthra@ti.com; a=openpgp; fpr=4DE0D818E5D575E8D45AAFC543DE91F9249A7145 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231115_015222_405523_3817D460 X-CRM114-Status: GOOD ( 11.31 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The CSI2RX subsystem can be used to capture video frames from CSI-2 cameras. Add nodes for the CSI core, SHIM layer, and the DPHY. Signed-off-by: Jai Luthra --- arch/arm64/boot/dts/ti/k3-am62-main.dtsi | 62 ++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/arch/arm64/boot/dts/ti/k3-am62-main.dtsi b/arch/arm64/boot/dts/ti/k3-am62-main.dtsi index e5c64c86d1d5..c0a95f6aff5e 100644 --- a/arch/arm64/boot/dts/ti/k3-am62-main.dtsi +++ b/arch/arm64/boot/dts/ti/k3-am62-main.dtsi @@ -965,4 +965,66 @@ mcasp2: audio-controller@2b20000 { power-domains = <&k3_pds 192 TI_SCI_PD_EXCLUSIVE>; status = "disabled"; }; + + ti_csi2rx0: ticsi2rx@30102000 { + compatible = "ti,j721e-csi2rx-shim"; + dmas = <&main_bcdma 0 0x4700 0>; + dma-names = "rx0"; + reg = <0x00 0x30102000 0x00 0x1000>; + power-domains = <&k3_pds 182 TI_SCI_PD_EXCLUSIVE>; + #address-cells = <2>; + #size-cells = <2>; + ranges; + status = "disabled"; + + cdns_csi2rx0: csi-bridge@30101000 { + compatible = "ti,j721e-csi2rx", "cdns,csi2rx"; + reg = <0x00 0x30101000 0x00 0x1000>; + clocks = <&k3_clks 182 0>, <&k3_clks 182 3>, <&k3_clks 182 0>, + <&k3_clks 182 0>, <&k3_clks 182 4>, <&k3_clks 182 4>; + clock-names = "sys_clk", "p_clk", "pixel_if0_clk", + "pixel_if1_clk", "pixel_if2_clk", "pixel_if3_clk"; + phys = <&dphy0>; + phy-names = "dphy"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + csi0_port0: port@0 { + reg = <0>; + status = "disabled"; + }; + + csi0_port1: port@1 { + reg = <1>; + status = "disabled"; + }; + + csi0_port2: port@2 { + reg = <2>; + status = "disabled"; + }; + + csi0_port3: port@3 { + reg = <3>; + status = "disabled"; + }; + + csi0_port4: port@4 { + reg = <4>; + status = "disabled"; + }; + }; + }; + }; + + dphy0: phy@30110000 { + compatible = "cdns,dphy-rx"; + reg = <0x00 0x30110000 0x00 0x1100>; + #phy-cells = <0>; + power-domains = <&k3_pds 185 TI_SCI_PD_EXCLUSIVE>; + status = "disabled"; + }; + }; From patchwork Wed Nov 15 09:51:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jai Luthra X-Patchwork-Id: 13456440 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 672F0C07548 for ; Wed, 15 Nov 2023 09:53:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:CC:To:In-Reply-To:References:Message-ID :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=6WBtjG5ENSYiVsk1oGGwFGU1jmZaJHFKaIlSQJ4NfH8=; b=Ok2dO2+9DBLF5j Bq1f/M+kKBYpXjvuEEz2SBfmlMe1/SuMfXg7Ocvxk0rq7Gs2JeQ3zevK+nFrg275ulRx6EZ4YW84q Axr0yUjNtu/cJ5A8zLb/fpvpa6KuqT7jBdpqQhicTgUrD9EleJ5TrdBMev2zL2YRKIYcEl0hxxW/r apfxzeojilUv6ZFz/+KMQAPPMojyDimTOjoZENna0dUq74jzU3OZnpNTCfmRPUFyxXTFOGR6CyOBV SN6//HQ+laAqXqOO5PPGeLZ/4uJ4StoUaiHtj+rGMAzVgTfY39UbgWNIntoVPKxgIRjPnjyJEYVk9 6He3V/WcGtqAKlwD7/pw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r3CZU-000Ng8-27; Wed, 15 Nov 2023 09:52:32 +0000 Received: from fllv0016.ext.ti.com ([198.47.19.142]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r3CZL-000NZf-0n for linux-arm-kernel@lists.infradead.org; Wed, 15 Nov 2023 09:52:24 +0000 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 3AF9qCCE049246; Wed, 15 Nov 2023 03:52:12 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1700041932; bh=6ItgAaMkCxt60XJc1WHuFhFNITAxxpb0vOwKj0LoWdI=; h=From:Date:Subject:References:In-Reply-To:To:CC; b=caCCBhNyFiFNco61diKyBBjxK8ccYCQOV1YIlkPUIYLt9StbqE01t+4rJgqcq1FfT iXTLr8+JdTcDe/pGN9/48dKegYM8InoUGe3aPvwoZaq9X2SMWUZ1mG74tjkjEvdzbA BuMK4Nk18LmJAtSvkLWGCItnH5stiUGd+ZMUaqSc= Received: from DFLE100.ent.ti.com (dfle100.ent.ti.com [10.64.6.21]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 3AF9qCAT101606 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 15 Nov 2023 03:52:12 -0600 Received: from DFLE101.ent.ti.com (10.64.6.22) by DFLE100.ent.ti.com (10.64.6.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Wed, 15 Nov 2023 03:52:12 -0600 Received: from lelv0327.itg.ti.com (10.180.67.183) by DFLE101.ent.ti.com (10.64.6.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Wed, 15 Nov 2023 03:52:12 -0600 Received: from localhost (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 3AF9qBj9055719; Wed, 15 Nov 2023 03:52:11 -0600 From: Jai Luthra Date: Wed, 15 Nov 2023 15:21:11 +0530 Subject: [PATCH 3/8] arm64: dts: ti: Enable CSI-RX on AM62A MIME-Version: 1.0 Message-ID: <20231115-csi_dts-v1-3-99fc535b2bde@ti.com> References: <20231115-csi_dts-v1-0-99fc535b2bde@ti.com> In-Reply-To: <20231115-csi_dts-v1-0-99fc535b2bde@ti.com> To: Catalin Marinas , Will Deacon , Nishanth Menon , Vignesh Raghavendra , Tero Kristo , Rob Herring , Krzysztof Kozlowski , Conor Dooley CC: , , , Aradhya Bhatia , Devarsh Thakkar , Vaishnav Achath , Julien Massot , Martyn Welch , Jai Luthra X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=3544; i=j-luthra@ti.com; h=from:subject:message-id; bh=UdyZV1rZtSB6XPR1HDnodj8ZtnvMZqzU69UiUMbOr4Y=; b=owEBbQKS/ZANAwAIAUPekfkkmnFFAcsmYgBlVJS6wvd+DF8tVzwp+G1mefDi4IcXjlAKWTc4z GzHkfHPxrmJAjMEAAEIAB0WIQRN4NgY5dV16NRar8VD3pH5JJpxRQUCZVSUugAKCRBD3pH5JJpx RZgKD/0fgE95KKhQCUPdRGij9hhXzHXofq0V2RebEW6+Z9xXKviF5Hdf7q0DF55Sd9zfM0hwiXi Xr7N0YKhV0m5THtPlGGCUCnQteVQNysKDYVKR/OiY4QoNtuTBWTwUsYCf0XTMVsXablGUvSzSc/ UgWL3HlALU2dlh82+tOCJWMy65z9mKd37IzxbmJYSrT4kn9ic9ub0tSlv/n2NoYzABZDwV9unGc YxW+4zrWt3yh2eCJrSpJZGzPS0IaiMkbb5DM41SdkRO5tSiekNVHNojD3ZlN+UusQOWl4hCXZxG +dUmCPcqHI+BLkFRcKrbPDkyCEM8yY3ercP/t+I/ujuUkCcS/z5/xhftmNcy9ACk5Etbl7KBfIE jx7mIc1ZyJy2z9bDAcpBCVhy+mmXvW75hT8MEm8u0EXbNi49V3jjoqz6plGnfTeutkmfq282zZZ KoYIZRhUSDunYk+75Rl9gFjRT9j9USShImyDfS+xaZnso3xyTgiBw7jj47O9FTR4J+Sig0ESd/f B17Io/Cf5+/ke4/bVjU8+pHuWmVmgy3IxjWBxCjueqfc7QwofrLtx31AXIHKbdvbHloZBrTlLjN vSRipc6J0151EzkmJYVLPJ3ctkFWrugjSLoxc+sRlI+OOqvHjcPLJ73h2yxK18torhFHUhb0ZYo egAvMXKmES1lfqg== X-Developer-Key: i=j-luthra@ti.com; a=openpgp; fpr=4DE0D818E5D575E8D45AAFC543DE91F9249A7145 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231115_015223_369416_706C31F7 X-CRM114-Status: GOOD ( 10.21 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add nodes for Cadence DPHY, CSI2RX and TI's pixel-grabbing wrapper. AM62A uses a dedicated BCDMA instance for CSI-RX traffic, so enable that as well. Signed-off-by: Jai Luthra --- arch/arm64/boot/dts/ti/k3-am62a-main.dtsi | 99 +++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) diff --git a/arch/arm64/boot/dts/ti/k3-am62a-main.dtsi b/arch/arm64/boot/dts/ti/k3-am62a-main.dtsi index 4ae7fdc5221b..ea70d78eb132 100644 --- a/arch/arm64/boot/dts/ti/k3-am62a-main.dtsi +++ b/arch/arm64/boot/dts/ti/k3-am62a-main.dtsi @@ -144,6 +144,44 @@ main_pktdma: dma-controller@485c0000 { }; }; + dmss_csi: bus@4e000000 { + compatible = "simple-bus"; + #address-cells = <2>; + #size-cells = <2>; + dma-ranges; + ranges = <0x00 0x4e000000 0x00 0x4e000000 0x00 0x300000>; + + ti,sci-dev-id = <198>; + + inta_main_dmss_csi: interrupt-controller@4e0a0000 { + compatible = "ti,sci-inta"; + reg = <0x00 0x4e0a0000 0x00 0x8000>; + #interrupt-cells = <0>; + interrupt-controller; + interrupt-parent = <&gic500>; + msi-controller; + ti,sci = <&dmsc>; + ti,sci-dev-id = <200>; + ti,interrupt-ranges = <0 237 8>; + ti,unmapped-event-sources = <&main_bcdma_csi>; + power-domains = <&k3_pds 182 TI_SCI_PD_EXCLUSIVE>; + }; + + main_bcdma_csi: dma-controller@4e230000 { + compatible = "ti,am62a-dmss-bcdma-csirx"; + reg = <0x00 0x4e230000 0x00 0x100>, + <0x00 0x4e180000 0x00 0x8000>, + <0x00 0x4e100000 0x00 0x10000>; + reg-names = "gcfg", "rchanrt", "ringrt"; + msi-parent = <&inta_main_dmss_csi>; + #dma-cells = <3>; + ti,sci = <&dmsc>; + ti,sci-dev-id = <199>; + ti,sci-rm-range-rchan = <0x21>; + power-domains = <&k3_pds 182 TI_SCI_PD_EXCLUSIVE>; + }; + }; + dmsc: system-controller@44043000 { compatible = "ti,k2g-sci"; reg = <0x00 0x44043000 0x00 0xfe0>; @@ -876,4 +914,65 @@ mcasp2: audio-controller@2b20000 { power-domains = <&k3_pds 192 TI_SCI_PD_EXCLUSIVE>; status = "disabled"; }; + + ti_csi2rx0: ticsi2rx@30102000 { + compatible = "ti,j721e-csi2rx-shim"; + dmas = <&main_bcdma_csi 0 0x5000 0>; + dma-names = "rx0"; + reg = <0x00 0x30102000 0x00 0x1000>; + power-domains = <&k3_pds 182 TI_SCI_PD_EXCLUSIVE>; + #address-cells = <2>; + #size-cells = <2>; + ranges; + status = "disabled"; + + cdns_csi2rx0: csi-bridge@30101000 { + compatible = "ti,j721e-csi2rx", "cdns,csi2rx"; + reg = <0x00 0x30101000 0x00 0x1000>; + clocks = <&k3_clks 182 0>, <&k3_clks 182 3>, <&k3_clks 182 0>, + <&k3_clks 182 0>, <&k3_clks 182 4>, <&k3_clks 182 4>; + clock-names = "sys_clk", "p_clk", "pixel_if0_clk", + "pixel_if1_clk", "pixel_if2_clk", "pixel_if3_clk"; + phys = <&dphy0>; + phy-names = "dphy"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + csi0_port0: port@0 { + reg = <0>; + status = "disabled"; + }; + + csi0_port1: port@1 { + reg = <1>; + status = "disabled"; + }; + + csi0_port2: port@2 { + reg = <2>; + status = "disabled"; + }; + + csi0_port3: port@3 { + reg = <3>; + status = "disabled"; + }; + + csi0_port4: port@4 { + reg = <4>; + status = "disabled"; + }; + }; + }; + }; + + dphy0: phy@30110000 { + compatible = "cdns,dphy-rx"; + reg = <0x00 0x30110000 0x00 0x1100>; + #phy-cells = <0>; + power-domains = <&k3_pds 185 TI_SCI_PD_EXCLUSIVE>; + status = "disabled"; + }; }; From patchwork Wed Nov 15 09:51:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jai Luthra X-Patchwork-Id: 13456443 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0E892C47072 for ; Wed, 15 Nov 2023 09:53:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:CC:To:In-Reply-To:References:Message-ID :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=fCHT24WucQlmrbWaFJDV5TT60NaofPjCBb7F2uyCPYQ=; b=Ia6DhI9Mmu8FvR P14+j83OvU12U32kOWf9AdD020Aqs5YT1QpPwPznNvZI4MB/iIVBNBhS6I8Rjg56s1HsW+kXm/cFu WmK6hrRh1yMliBHX6gA/bwc3G2sYYPytS9N27WvIAAd7EYt5dvJu81HlLepWnTYix63Z9hi5pmrIk NWfvY7lquVwAK56Xjtop1E6wi2wgid55KAKkwQMAa528zSy/p/XFNynuW1hCjmdvaa40t6pTJpM3Q Cr5M8bcxGJUCqKf7/ih092DjvQg+1Z1GIdd8Q+J7CJAPk/Dnz25Cxe1sD8y8AEoy5LPFockqNeoIj +hw7/iYUsUx2nWLlco1w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r3CZf-000NoC-2I; Wed, 15 Nov 2023 09:52:43 +0000 Received: from fllv0015.ext.ti.com ([198.47.19.141]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r3CZQ-000Nbp-2e for linux-arm-kernel@lists.infradead.org; Wed, 15 Nov 2023 09:52:31 +0000 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 3AF9qEi3100732; Wed, 15 Nov 2023 03:52:14 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1700041934; bh=0egtVVfTMmKrQOnxNs4fOcJmVsBrZtzSGTcVwpwUzS0=; h=From:Date:Subject:References:In-Reply-To:To:CC; b=Vs3lrv+qJiu7wZzRjCtJ/nKQQIpG1lfpVoJ0AGhGdr65Uu6YN30dM4cwbuxUKBVM+ ypgx7j3fhBYUeFWbPPgGxzitH0gcUuUa2qNIQi1Qai3rWNqZlZGK4IfYqoawxmZz68 +ugLiFsE5ElvaDLfwQvl69LxtuQat+uGZ99dqJEY= Received: from DFLE101.ent.ti.com (dfle101.ent.ti.com [10.64.6.22]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 3AF9qEZt101616 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 15 Nov 2023 03:52:14 -0600 Received: from DFLE110.ent.ti.com (10.64.6.31) by DFLE101.ent.ti.com (10.64.6.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Wed, 15 Nov 2023 03:52:13 -0600 Received: from lelv0326.itg.ti.com (10.180.67.84) by DFLE110.ent.ti.com (10.64.6.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Wed, 15 Nov 2023 03:52:13 -0600 Received: from localhost (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 3AF9qCQP009743; Wed, 15 Nov 2023 03:52:13 -0600 From: Jai Luthra Date: Wed, 15 Nov 2023 15:21:12 +0530 Subject: [PATCH 4/8] arm64: dts: ti: k3-am625-beagleplay: Add overlays for OV5640 MIME-Version: 1.0 Message-ID: <20231115-csi_dts-v1-4-99fc535b2bde@ti.com> References: <20231115-csi_dts-v1-0-99fc535b2bde@ti.com> In-Reply-To: <20231115-csi_dts-v1-0-99fc535b2bde@ti.com> To: Catalin Marinas , Will Deacon , Nishanth Menon , Vignesh Raghavendra , Tero Kristo , Rob Herring , Krzysztof Kozlowski , Conor Dooley CC: , , , Aradhya Bhatia , Devarsh Thakkar , Vaishnav Achath , Julien Massot , Martyn Welch , Jai Luthra X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=5305; i=j-luthra@ti.com; h=from:subject:message-id; bh=qrgb8ErCemuQw6kO4MMScDp+qbZjHNTYyfKmJCDO+tY=; b=owEBbQKS/ZANAwAIAUPekfkkmnFFAcsmYgBlVJS71S0sZoUF0Zqgws5oCFaXuASw65z50x9In IYkU5mLKsOJAjMEAAEIAB0WIQRN4NgY5dV16NRar8VD3pH5JJpxRQUCZVSUuwAKCRBD3pH5JJpx RRlUD/9k7sSdh2NuqxLo6Rr16CxndXjTnFqbFI/Gt+TmPsra5SVhnsDBQpp9Do41IuZLrFLeljR f2HGpEtG2wZoUbqavAbSlShe1tRA7ureh1fTJe6grdLe8zS9mbLN7Ihwx9QYLQvyezcCuvMTeLF n+KKXTeWq9IzRtLmSN89xCkuNUx6NT/SXZNRAdDrFR/EEhEaxB/WVfP9rv/NfLVl8L5zw7XV7ly tw0kzyP6saSd2PkiOU1mKtnv1LgRCaZM7Kh7IVg2Hz9J1XsL5c6N+Sj0CfpoceagiA0nLb069R5 ZuDDbB+YFwv8tZ5p7586PxS8HzVBRyWImIydS8YJR+k0cL1xmU1AN9/VEijPrsCmu9oQdjzVcj9 0KQbJDqXBE4vBIRwDMaV9ncjQM7zlpNzH5kEh2u5bADCdqdW/e8ptafDNYexipTl43dJr0NLG4z 4tSC0xkS4UBOIA+SnER87vzYNq2qTPJLv82ve28YzVCaG8umbm5lMo7fPu9FdYzxQyK3ec9bVO+ frnR3nv5KDHb13XcLprIBTv/T1gcZVBhAlgKH5FYGSP48vH+/mm+m/pfAuxavZKXuF6oK47sg8y 92cKxL6uqpi4Nql02rbHBhvP4ZkL9qvCi4XRDAY2Fkf12LQKkwIhhNyHwaBeuYYjPi5cQoFzY4W CL2GDR1X2ci167w== X-Developer-Key: i=j-luthra@ti.com; a=openpgp; fpr=4DE0D818E5D575E8D45AAFC543DE91F9249A7145 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231115_015228_944518_819565B4 X-CRM114-Status: GOOD ( 14.25 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Three different OV5640 modules are supported using the FFC connector on BeaglePlay: - Digilent PCam 5C - ALINX AN5641 - TEVI-OV5640-*-RPI The Digilent and ALINX modules supply a 12Mhz XCLK to the sensor, while the TEVI module supplies a 24Mhz XCLK, thus requiring a separate overlay. Signed-off-by: Jai Luthra --- arch/arm64/boot/dts/ti/Makefile | 7 ++ .../dts/ti/k3-am625-beagleplay-csi2-ov5640.dtso | 77 ++++++++++++++++++++++ .../ti/k3-am625-beagleplay-csi2-tevi-ov5640.dtso | 77 ++++++++++++++++++++++ 3 files changed, 161 insertions(+) diff --git a/arch/arm64/boot/dts/ti/Makefile b/arch/arm64/boot/dts/ti/Makefile index 77a347f9f47d..e49e32414560 100644 --- a/arch/arm64/boot/dts/ti/Makefile +++ b/arch/arm64/boot/dts/ti/Makefile @@ -9,9 +9,15 @@ # alphabetically. # Boards with AM62x SoC +k3-am625-beagleplay-csi2-ov5640-dtbs := k3-am625-beagleplay.dtb \ + k3-am625-beagleplay-csi2-ov5640.dtbo +k3-am625-beagleplay-csi2-tevi-ov5640-dtbs := k3-am625-beagleplay.dtb \ + k3-am625-beagleplay-csi2-tevi-ov5640.dtbo k3-am625-sk-hdmi-audio-dtbs := k3-am625-sk.dtb k3-am62x-sk-hdmi-audio.dtbo k3-am62-lp-sk-hdmi-audio-dtbs := k3-am62-lp-sk.dtb k3-am62x-sk-hdmi-audio.dtbo dtb-$(CONFIG_ARCH_K3) += k3-am625-beagleplay.dtb +dtb-$(CONFIG_ARCH_K3) += k3-am625-beagleplay-csi2-ov5640.dtb +dtb-$(CONFIG_ARCH_K3) += k3-am625-beagleplay-csi2-tevi-ov5640.dtb dtb-$(CONFIG_ARCH_K3) += k3-am625-phyboard-lyra-rdk.dtb dtb-$(CONFIG_ARCH_K3) += k3-am625-sk.dtb dtb-$(CONFIG_ARCH_K3) += k3-am625-verdin-nonwifi-dahlia.dtb @@ -81,6 +87,7 @@ dtb-$(CONFIG_ARCH_K3) += k3-am69-sk.dtb dtb-$(CONFIG_ARCH_K3) += k3-j784s4-evm.dtb # Enable support for device-tree overlays +DTC_FLAGS_k3-am625-beagleplay += -@ DTC_FLAGS_k3-am625-sk += -@ DTC_FLAGS_k3-am62-lp-sk += -@ DTC_FLAGS_k3-am6548-iot2050-advanced-m2 += -@ diff --git a/arch/arm64/boot/dts/ti/k3-am625-beagleplay-csi2-ov5640.dtso b/arch/arm64/boot/dts/ti/k3-am625-beagleplay-csi2-ov5640.dtso new file mode 100644 index 000000000000..5e80ca7033ba --- /dev/null +++ b/arch/arm64/boot/dts/ti/k3-am625-beagleplay-csi2-ov5640.dtso @@ -0,0 +1,77 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * ALINX AN5641 & Digilent PCam 5C - OV5640 camera module + * Copyright (C) 2022-2023 Texas Instruments Incorporated - https://www.ti.com/ + */ + +/dts-v1/; +/plugin/; + +#include + +&{/} { + clk_ov5640_fixed: ov5640-xclk { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <12000000>; + }; +}; + +&main_gpio0 { + p11-hog { + /* P11 - CSI2_CAMERA_GPIO1 */ + gpio-hog; + gpios = <11 GPIO_ACTIVE_HIGH>; + output-high; + line-name = "CSI2_CAMERA_GPIO1"; + }; +}; + +&wkup_i2c0 { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + ov5640: camera@3c { + compatible = "ovti,ov5640"; + reg = <0x3c>; + + clocks = <&clk_ov5640_fixed>; + clock-names = "xclk"; + + port { + csi2_cam0: endpoint { + remote-endpoint = <&csi2rx0_in_sensor>; + clock-lanes = <0>; + data-lanes = <1 2>; + }; + }; + }; +}; + +&cdns_csi2rx0 { + ports { + #address-cells = <1>; + #size-cells = <0>; + + csi0_port0: port@0 { + reg = <0>; + status = "okay"; + + csi2rx0_in_sensor: endpoint { + remote-endpoint = <&csi2_cam0>; + bus-type = <4>; /* CSI2 DPHY. */ + clock-lanes = <0>; + data-lanes = <1 2>; + }; + }; + }; +}; + +&dphy0 { + status = "okay"; +}; + +&ti_csi2rx0 { + status = "okay"; +}; diff --git a/arch/arm64/boot/dts/ti/k3-am625-beagleplay-csi2-tevi-ov5640.dtso b/arch/arm64/boot/dts/ti/k3-am625-beagleplay-csi2-tevi-ov5640.dtso new file mode 100644 index 000000000000..5e1cbbc27c8f --- /dev/null +++ b/arch/arm64/boot/dts/ti/k3-am625-beagleplay-csi2-tevi-ov5640.dtso @@ -0,0 +1,77 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Technexion TEVI-OV5640-*-RPI - OV5640 camera module + * Copyright (C) 2022-2023 Texas Instruments Incorporated - https://www.ti.com/ + */ + +/dts-v1/; +/plugin/; + +#include + +&{/} { + clk_ov5640_fixed: ov5640-xclk { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <24000000>; + }; +}; + +&main_gpio0 { + p11-hog { + /* P11 - CSI2_CAMERA_GPIO1 */ + gpio-hog; + gpios = <11 GPIO_ACTIVE_HIGH>; + output-high; + line-name = "CSI2_CAMERA_GPIO1"; + }; +}; + +&wkup_i2c0 { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + ov5640: camera@3c { + compatible = "ovti,ov5640"; + reg = <0x3c>; + + clocks = <&clk_ov5640_fixed>; + clock-names = "xclk"; + + port { + csi2_cam0: endpoint { + remote-endpoint = <&csi2rx0_in_sensor>; + clock-lanes = <0>; + data-lanes = <1 2>; + }; + }; + }; +}; + +&cdns_csi2rx0 { + ports { + #address-cells = <1>; + #size-cells = <0>; + + csi0_port0: port@0 { + reg = <0>; + status = "okay"; + + csi2rx0_in_sensor: endpoint { + remote-endpoint = <&csi2_cam0>; + bus-type = <4>; /* CSI2 DPHY. */ + clock-lanes = <0>; + data-lanes = <1 2>; + }; + }; + }; +}; + +&dphy0 { + status = "okay"; +}; + +&ti_csi2rx0 { + status = "okay"; +}; From patchwork Wed Nov 15 09:51:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jai Luthra X-Patchwork-Id: 13456436 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 46F5DC47074 for ; Wed, 15 Nov 2023 09:52:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:CC:To:In-Reply-To:References:Message-ID :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=QDHhCArxfbHwPwUfy2Gi7qQMWm6UNaAEueRKY9S4tZ0=; b=0ba+aGw78IJRx5 Ajy34iXdZGDir5gw04aZX9ZnuPR2tkiG7TZ2uguNuqP7GJQQvJswSYAhFTMFcJbpxEk8gQUpNCRQ+ 0VIcsFVa3gyzDV76r73N+gIO8ZnwhvdoyUNih0t5C9sJYN8AWJMa9nONt2DA83U+Q7RO9yJLFJCsE ZOzMN76uUk2EMqygz85qiI7z3AUKILHazkOyuRaRsr5oRKb20Ico/Z+BWTl9cm7BXSNedAJakwJeE kOGFE0BsbpISK2UHBol5N5gf2bdiVi+zBfZ6US9mepkFWyz4+vWT0eiqckMkIajKGprrJ/0l29XPB dc3KQmTkjmmzDluPBrWQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r3CZN-000NbR-0i; Wed, 15 Nov 2023 09:52:25 +0000 Received: from lelv0142.ext.ti.com ([198.47.23.249]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r3CZJ-000NZy-31 for linux-arm-kernel@lists.infradead.org; Wed, 15 Nov 2023 09:52:23 +0000 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 3AF9qF1B105004; Wed, 15 Nov 2023 03:52:15 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1700041935; bh=Sy2cqL5S5oxFfbE7V7ZjL7hiD86FRrhKijn9W4cm3aQ=; h=From:Date:Subject:References:In-Reply-To:To:CC; b=ilhqxYXwzdc3Z/GwCvKtsV+6lyvRCHiERxQIlnn5geotQ13GDj0+N7PDJ+cJob7ZA d+w2WHHSt1R/HCwdG0WWjB9Gxn8ibiK3Atgb0lyq8CNIGTcv8dvjye5mLvAApIBRPQ woMVcfhC9ouNAXmime99mB/RSuoAkiQ45uWhIUwA= Received: from DFLE112.ent.ti.com (dfle112.ent.ti.com [10.64.6.33]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 3AF9qF85109197 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 15 Nov 2023 03:52:15 -0600 Received: from DFLE105.ent.ti.com (10.64.6.26) by DFLE112.ent.ti.com (10.64.6.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Wed, 15 Nov 2023 03:52:15 -0600 Received: from fllv0039.itg.ti.com (10.64.41.19) by DFLE105.ent.ti.com (10.64.6.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Wed, 15 Nov 2023 03:52:15 -0600 Received: from localhost (ileaxei01-snat.itg.ti.com [10.180.69.5]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id 3AF9qELp015908; Wed, 15 Nov 2023 03:52:14 -0600 From: Jai Luthra Date: Wed, 15 Nov 2023 15:21:13 +0530 Subject: [PATCH 5/8] arm64: dts: ti: k3-am62x-sk: Enable camera peripherals MIME-Version: 1.0 Message-ID: <20231115-csi_dts-v1-5-99fc535b2bde@ti.com> References: <20231115-csi_dts-v1-0-99fc535b2bde@ti.com> In-Reply-To: <20231115-csi_dts-v1-0-99fc535b2bde@ti.com> To: Catalin Marinas , Will Deacon , Nishanth Menon , Vignesh Raghavendra , Tero Kristo , Rob Herring , Krzysztof Kozlowski , Conor Dooley CC: , , , Aradhya Bhatia , Devarsh Thakkar , Vaishnav Achath , Julien Massot , Martyn Welch , Jai Luthra X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=1094; i=j-luthra@ti.com; h=from:subject:message-id; bh=u6T5A1bh0HbjqVMvmWnZa1mJiyWBQtuXf9p93arc/0M=; b=owEBbQKS/ZANAwAIAUPekfkkmnFFAcsmYgBlVJS8eRD4W4OrTF2JZ/HlxgUAuCM8fSqhlnBHm hD59HPVp2KJAjMEAAEIAB0WIQRN4NgY5dV16NRar8VD3pH5JJpxRQUCZVSUvAAKCRBD3pH5JJpx RQc+D/9oT6DHx2HuteewUaSm2cSTSm6XaepiV7wh/SqBpZoOGdDQZazTTfFV49fjiRlDAUDM9oy WCh4YfUckPSPvr0dbWyBNfzF3RBs3o+MRa/2NMrhRD7iX2bGOGHVrNvotoHAigw3a3FOnstPDlN /4Tt6J57dDxfnq9G9YwVS/grTPuKsopg0Inx9d+7LXDIriwYCJ5AZNyV07BRYSO2oF2ClIbbucN sSxA4qHSrcefXziVpQnCAm6mjGDp/Vac3KrlqBtLKd+eyE171w1IAFUx37Ua2hf4n/zuvf8PaJ+ SI8Vc4xCE/XAaWodbsVhifZeEp7On/VGuGcd4bN+fRUu1gHJESVCPKbh46X3VIkpRiGQqEkiKDK /n95r3SqdtdTgWL4CpFc9/3Mlwvlzjew08vrjwd6thgBwoMmCBsTAzUiPCMKlxvLyzInWPz3TrO cJy8Kr3r8XyfRiW6d4sDLfiq9u6NiX2ytBQdCO8/Xid7YngZCzGldn1t63Ggjh2WFa8y7b1Z50w 8youzsIoI0Pop04D82I9vPbsumQuSg76ShFTF/WA4j8DV3Ap3bG2uoJssrjqtoqJRFlOVzunWvw mEP1Xs48OiPOy/Y6bAMzGCQ8qQ+OJLNl/Pw0ncNvACxOOnGCgrPa8tqdWhuHkG8sNjDM3ToIUJV 2x0+0tJKywqTl8g== X-Developer-Key: i=j-luthra@ti.com; a=openpgp; fpr=4DE0D818E5D575E8D45AAFC543DE91F9249A7145 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231115_015222_056264_0DD2B3D4 X-CRM114-Status: GOOD ( 10.09 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org CSI cameras are controlled using I2C, on SK-AM62 and derivative boards this is routed to I2C-2, so enable that bus. Also enable the nodes for CSI-RX and DPHY-RX IPs. Specific sensor connected to this bus will be described in the DT overlay for each sensor. Signed-off-by: Jai Luthra --- arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi b/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi index 19f57ead4ebd..21658f811307 100644 --- a/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi +++ b/arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi @@ -399,6 +399,13 @@ sii9022_out: endpoint { }; }; +&main_i2c2 { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&main_i2c2_pins_default>; + clock-frequency = <400000>; +}; + &sdhci0 { bootph-all; status = "okay"; @@ -517,3 +524,11 @@ dpi1_out: endpoint { }; }; }; + +&ti_csi2rx0 { + status = "okay"; +}; + +&dphy0 { + status = "okay"; +}; From patchwork Wed Nov 15 09:51:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jai Luthra X-Patchwork-Id: 13456439 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 04B10C47072 for ; Wed, 15 Nov 2023 09:53:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:CC:To:In-Reply-To:References:Message-ID :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=fD6mAmKywtXVL20Q+bkVNChdFjt0GZhJHFhp+WOJd10=; b=4AEpoTnUTP9xM2 U3+TFL53BsLfjs4dfDrcCTJkP9Q10Z+xIQ6nPHCdQUcYslvCfFRLpRpw8MhoTc2og/YEm+N6cPn5h 4IfRLo6yQc5TLX8AhXjOJfFhPr4oD/jzRyvXGJ3cXmIJDTdGHr6zqHc07MuSr8gn4UlR/FlKwlz5U KfHBfjRDbItXYxCeDQfi1QIKsd6JwmxvWJuMrZoJFhHHpPAvm350q2swld9+iLE3DZJdbrAZvDUnJ 3j+jd53Hz1Vug34E741UzlBhDQhF1Ux1dmhKogHJmUeivaFtP4uelqSv8ZZXxYce7Oi5v3cZfM4lK 9NSSIe1TmW72XXN7YDqw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r3CZV-000Ngi-1J; Wed, 15 Nov 2023 09:52:33 +0000 Received: from lelv0142.ext.ti.com ([198.47.23.249]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r3CZP-000NcC-1q for linux-arm-kernel@lists.infradead.org; Wed, 15 Nov 2023 09:52:29 +0000 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 3AF9qGBj105013; Wed, 15 Nov 2023 03:52:16 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1700041936; bh=mRAU8jI1AioMbrAdlPtsoL9voWGDmm90R0csjxrNMiU=; h=From:Date:Subject:References:In-Reply-To:To:CC; b=Eiz9mSNQjFDuSnR/wZ3nkrtMxA0edHUUpey+Wqzzuq3nPsFvtuYSWVWRpV6P0bhc6 H3uhhIxAX4qWsgrTeWF7LX4ybgmLp6x5rXHdDTjkuCKoTwpbhS8LFsitoAkolieLR9 LE0QL3kug0hDQcxSyyGRNL83wi+czL5KryrIOoGI= Received: from DLEE113.ent.ti.com (dlee113.ent.ti.com [157.170.170.24]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 3AF9qGNr009537 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 15 Nov 2023 03:52:16 -0600 Received: from DLEE113.ent.ti.com (157.170.170.24) by DLEE113.ent.ti.com (157.170.170.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Wed, 15 Nov 2023 03:52:16 -0600 Received: from fllv0039.itg.ti.com (10.64.41.19) by DLEE113.ent.ti.com (157.170.170.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Wed, 15 Nov 2023 03:52:16 -0600 Received: from localhost (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id 3AF9qFAY015928; Wed, 15 Nov 2023 03:52:16 -0600 From: Jai Luthra Date: Wed, 15 Nov 2023 15:21:14 +0530 Subject: [PATCH 6/8] arm64: dts: ti: k3-am62x: Add overlays for OV5640 MIME-Version: 1.0 Message-ID: <20231115-csi_dts-v1-6-99fc535b2bde@ti.com> References: <20231115-csi_dts-v1-0-99fc535b2bde@ti.com> In-Reply-To: <20231115-csi_dts-v1-0-99fc535b2bde@ti.com> To: Catalin Marinas , Will Deacon , Nishanth Menon , Vignesh Raghavendra , Tero Kristo , Rob Herring , Krzysztof Kozlowski , Conor Dooley CC: , , , Aradhya Bhatia , Devarsh Thakkar , Vaishnav Achath , Julien Massot , Martyn Welch , Jai Luthra X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=5592; i=j-luthra@ti.com; h=from:subject:message-id; bh=eqhyf+uTzMZydQCtlSszufOlsILQBZP8e0W07wHu1xQ=; b=owEBbQKS/ZANAwAIAUPekfkkmnFFAcsmYgBlVJS9af+KiODBJGNKHtclYi4BUTdj7gTzeN4AL ZqYNZ3BKZGJAjMEAAEIAB0WIQRN4NgY5dV16NRar8VD3pH5JJpxRQUCZVSUvQAKCRBD3pH5JJpx RR+TD/4g3HZLufjMw2MIBfInj2SEXJQwupGuReGHTVN2roIXuOS5qKxmQbHRIgDbD/2XMS8XpU6 v22J+Pruzcuv/AQd+TGXdZ2AkRUQ4rfSHoVblwnXi82JjPnM+QsgwPfrlE2MlxMuJ4pAd6iiCF/ 7yDpPbfJB3FMgd6PllcoNU0+LLKPT5KMr/nR5DLptEwz3uzO+G2tYnF7sF8OvUvb0G1sAtNGPTX Nfj02MLPtQo4KDKHL+VXynXpY8hDeGpjBtYNZBEjTy5QSFqXR+iCYpFal5DNZKA33Lm4nIgMc2F TAjLQIzqMx1KWaBQk26xnpDziLO8y6LcU9d3lksNmLGLK+iR+BoI19hb+BWPpK0NxhC4QUuVPDx psXTqSHeK4UZ4H/H8Rqo9QZP//3I7yqQ4i0KvNNon/WDsAtXIL1p9BGm4GWz8GUMiqcS3robs0+ wGTRtJHkdHX7zVwmvVwS4VeU4hmIyFmkEwpnmEQH9XYWU/pyw2jk5PMxc/npxfbZxFP9khvdrjX dvH0gUOUDw63VpvbOEXajIVpA4sIaDMw1IF5IhFQGGbqXmrEJ9sN1EXzyubSvm1CYyAerz/Pkkw d6w26lyTAkSyMsj+7tSF6AtFhrdCe08h7RCeYRDhPCS/qdoslsvKD/2/6kCHSbJfZdqVvnXpkUX Ny850iU8XerDWbg== X-Developer-Key: i=j-luthra@ti.com; a=openpgp; fpr=4DE0D818E5D575E8D45AAFC543DE91F9249A7145 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231115_015227_692334_A25F1663 X-CRM114-Status: GOOD ( 15.00 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Three different OV5640 modules are supported using the 15-pin FFC connector on SK-AM62: - Digilent PCam 5C - ALINX AN5641 - TEVI-OV5640-*-RPI The Digilent and ALINX modules supply a 12Mhz XCLK to the sensor, while the TEVI module supplies a 24Mhz XCLK, thus requiring a separate overlay. These overlays can be used on other boards of the SK-AM62* family that have a 15/22-pin FFC connector, so we name the overlays with the prefix k3-am62x-. Signed-off-by: Jai Luthra --- arch/arm64/boot/dts/ti/Makefile | 6 ++ .../arm64/boot/dts/ti/k3-am62x-sk-csi2-ov5640.dtso | 74 ++++++++++++++++++++++ .../boot/dts/ti/k3-am62x-sk-csi2-tevi-ov5640.dtso | 74 ++++++++++++++++++++++ 3 files changed, 154 insertions(+) diff --git a/arch/arm64/boot/dts/ti/Makefile b/arch/arm64/boot/dts/ti/Makefile index e49e32414560..a09b16cbefb4 100644 --- a/arch/arm64/boot/dts/ti/Makefile +++ b/arch/arm64/boot/dts/ti/Makefile @@ -13,6 +13,10 @@ k3-am625-beagleplay-csi2-ov5640-dtbs := k3-am625-beagleplay.dtb \ k3-am625-beagleplay-csi2-ov5640.dtbo k3-am625-beagleplay-csi2-tevi-ov5640-dtbs := k3-am625-beagleplay.dtb \ k3-am625-beagleplay-csi2-tevi-ov5640.dtbo +k3-am625-sk-csi2-ov5640-dtbs := k3-am625-sk.dtb \ + k3-am62x-sk-csi2-ov5640.dtbo +k3-am625-sk-csi2-tevi-ov5640-dtbs := k3-am625-sk.dtb \ + k3-am62x-sk-csi2-tevi-ov5640.dtbo k3-am625-sk-hdmi-audio-dtbs := k3-am625-sk.dtb k3-am62x-sk-hdmi-audio.dtbo k3-am62-lp-sk-hdmi-audio-dtbs := k3-am62-lp-sk.dtb k3-am62x-sk-hdmi-audio.dtbo dtb-$(CONFIG_ARCH_K3) += k3-am625-beagleplay.dtb @@ -20,6 +24,8 @@ dtb-$(CONFIG_ARCH_K3) += k3-am625-beagleplay-csi2-ov5640.dtb dtb-$(CONFIG_ARCH_K3) += k3-am625-beagleplay-csi2-tevi-ov5640.dtb dtb-$(CONFIG_ARCH_K3) += k3-am625-phyboard-lyra-rdk.dtb dtb-$(CONFIG_ARCH_K3) += k3-am625-sk.dtb +dtb-$(CONFIG_ARCH_K3) += k3-am625-sk-csi2-ov5640.dtb +dtb-$(CONFIG_ARCH_K3) += k3-am625-sk-csi2-tevi-ov5640.dtb dtb-$(CONFIG_ARCH_K3) += k3-am625-verdin-nonwifi-dahlia.dtb dtb-$(CONFIG_ARCH_K3) += k3-am625-verdin-nonwifi-dev.dtb dtb-$(CONFIG_ARCH_K3) += k3-am625-verdin-nonwifi-yavia.dtb diff --git a/arch/arm64/boot/dts/ti/k3-am62x-sk-csi2-ov5640.dtso b/arch/arm64/boot/dts/ti/k3-am62x-sk-csi2-ov5640.dtso new file mode 100644 index 000000000000..790340673094 --- /dev/null +++ b/arch/arm64/boot/dts/ti/k3-am62x-sk-csi2-ov5640.dtso @@ -0,0 +1,74 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * ALINX AN5641 & Digilent PCam 5C - OV5640 camera module + * Copyright (C) 2022 Texas Instruments Incorporated - https://www.ti.com/ + */ + +/dts-v1/; +/plugin/; + +#include + +&{/} { + clk_ov5640_fixed: ov5640-xclk { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <12000000>; + }; +}; + +&main_i2c2 { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + i2c-switch@71 { + compatible = "nxp,pca9543"; + #address-cells = <1>; + #size-cells = <0>; + reg = <0x71>; + + /* CAM port */ + i2c@1 { + #address-cells = <1>; + #size-cells = <0>; + reg = <1>; + + ov5640: camera@3c { + compatible = "ovti,ov5640"; + reg = <0x3c>; + + clocks = <&clk_ov5640_fixed>; + clock-names = "xclk"; + powerdown-gpios = <&exp1 13 GPIO_ACTIVE_LOW>; + + port { + csi2_cam0: endpoint { + remote-endpoint = <&csi2rx0_in_sensor>; + clock-lanes = <0>; + data-lanes = <1 2>; + }; + }; + }; + }; + }; +}; + +&cdns_csi2rx0 { + ports { + #address-cells = <1>; + #size-cells = <0>; + + csi0_port0: port@0 { + reg = <0>; + status = "okay"; + + csi2rx0_in_sensor: endpoint { + remote-endpoint = <&csi2_cam0>; + bus-type = <4>; /* CSI2 DPHY. */ + clock-lanes = <0>; + data-lanes = <1 2>; + }; + }; + }; +}; diff --git a/arch/arm64/boot/dts/ti/k3-am62x-sk-csi2-tevi-ov5640.dtso b/arch/arm64/boot/dts/ti/k3-am62x-sk-csi2-tevi-ov5640.dtso new file mode 100644 index 000000000000..d7772767f49d --- /dev/null +++ b/arch/arm64/boot/dts/ti/k3-am62x-sk-csi2-tevi-ov5640.dtso @@ -0,0 +1,74 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Technexion TEVI-OV5640-*-RPI - OV5640 camera module + * Copyright (C) 2022 Texas Instruments Incorporated - https://www.ti.com/ + */ + +/dts-v1/; +/plugin/; + +#include + +&{/} { + clk_ov5640_fixed: ov5640-xclk { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <24000000>; + }; +}; + +&main_i2c2 { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + i2c-switch@71 { + compatible = "nxp,pca9543"; + #address-cells = <1>; + #size-cells = <0>; + reg = <0x71>; + + /* CAM port */ + i2c@1 { + #address-cells = <1>; + #size-cells = <0>; + reg = <1>; + + ov5640: camera@3c { + compatible = "ovti,ov5640"; + reg = <0x3c>; + + clocks = <&clk_ov5640_fixed>; + clock-names = "xclk"; + powerdown-gpios = <&exp1 13 GPIO_ACTIVE_LOW>; + + port { + csi2_cam0: endpoint { + remote-endpoint = <&csi2rx0_in_sensor>; + clock-lanes = <0>; + data-lanes = <1 2>; + }; + }; + }; + }; + }; +}; + +&cdns_csi2rx0 { + ports { + #address-cells = <1>; + #size-cells = <0>; + + csi0_port0: port@0 { + reg = <0>; + status = "okay"; + + csi2rx0_in_sensor: endpoint { + remote-endpoint = <&csi2_cam0>; + bus-type = <4>; /* CSI2 DPHY. */ + clock-lanes = <0>; + data-lanes = <1 2>; + }; + }; + }; +}; From patchwork Wed Nov 15 09:51:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jai Luthra X-Patchwork-Id: 13456441 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1356FC47072 for ; Wed, 15 Nov 2023 09:53:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:CC:To:In-Reply-To:References:Message-ID :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=hatar6+D1r/Ra5tXnEyyNQmQetzo71H75icUqeTTkqI=; b=GuMKq6igq9jCxL +Q2Atv3s6SNLbCIndp9SmhOA2ngpKF6PWZYI+whziIN9nshrJCZuf7DlxuysNQEHnymACt/dJdbea 2MTf5XJ9avN0ZjPLnaYLwTAD8ibFQRuFIkItMNTp9ucCc/VQeZWtLvzQNm/7Rl20EhXlkCVvaPCmJ 5fhNVG6rTjxOtWGWkSquYQN8KxRp9brapk4guUrGozj2+mvKe7B4K4LcH1GewB6p4eywE41O+8Wt8 sXC4n9aJADkBVOOEL8J4b0RZESjzwEmviTGuH7zk0SI8ANpzH48TaaVl/0macuIxhbXc6jUcXtIEy MZGOK/6ib0HbNG7Vp9Mg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r3CZW-000NhM-0c; Wed, 15 Nov 2023 09:52:34 +0000 Received: from fllv0015.ext.ti.com ([198.47.19.141]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r3CZQ-000Nc8-2f for linux-arm-kernel@lists.infradead.org; Wed, 15 Nov 2023 09:52:30 +0000 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 3AF9qImS100743; Wed, 15 Nov 2023 03:52:18 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1700041938; bh=PNUVApjVYaIGK9JiiY4OVOF3nsNslR6FLMX8Zywxucg=; h=From:Date:Subject:References:In-Reply-To:To:CC; b=PFjK70W+5y9a82/TLUNRSGcOwROC4P0Ke4iRo6p85Mk+LydlJ3UKQindAcJAk3c8w 2U6GYAsCRCeofef7V8ozm1co2HBMcT8lCwQZZCm/X/d5uapkN0p7JezrFGS3nlW2At HEe7+qPTQIV2sOBfNYzDMTwcSpjUzfhYYH3+2FWI= Received: from DFLE113.ent.ti.com (dfle113.ent.ti.com [10.64.6.34]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 3AF9qI37109218 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 15 Nov 2023 03:52:18 -0600 Received: from DFLE103.ent.ti.com (10.64.6.24) by DFLE113.ent.ti.com (10.64.6.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Wed, 15 Nov 2023 03:52:18 -0600 Received: from lelv0326.itg.ti.com (10.180.67.84) by DFLE103.ent.ti.com (10.64.6.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Wed, 15 Nov 2023 03:52:17 -0600 Received: from localhost (ileaxei01-snat.itg.ti.com [10.180.69.5]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 3AF9qHto009790; Wed, 15 Nov 2023 03:52:17 -0600 From: Jai Luthra Date: Wed, 15 Nov 2023 15:21:15 +0530 Subject: [PATCH 7/8] arm64: dts: ti: k3-am62a7-sk: Enable camera peripherals MIME-Version: 1.0 Message-ID: <20231115-csi_dts-v1-7-99fc535b2bde@ti.com> References: <20231115-csi_dts-v1-0-99fc535b2bde@ti.com> In-Reply-To: <20231115-csi_dts-v1-0-99fc535b2bde@ti.com> To: Catalin Marinas , Will Deacon , Nishanth Menon , Vignesh Raghavendra , Tero Kristo , Rob Herring , Krzysztof Kozlowski , Conor Dooley CC: , , , Aradhya Bhatia , Devarsh Thakkar , Vaishnav Achath , Julien Massot , Martyn Welch , Jai Luthra X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=1496; i=j-luthra@ti.com; h=from:subject:message-id; bh=gz9E1SzSNspg9BAAZhjLumqrDg19fknMHvxVHY3oO+E=; b=owEBbQKS/ZANAwAIAUPekfkkmnFFAcsmYgBlVJS+SQwuO3y5czKQptuHNVtnvW/0c6tvCBl8y 9qeg9MJ84WJAjMEAAEIAB0WIQRN4NgY5dV16NRar8VD3pH5JJpxRQUCZVSUvgAKCRBD3pH5JJpx RWAAD/4vFcUOIxprUiXAS+TvJxuxnVBqtEX/d31DvULFnPjH9NdgZiimn/J7xeiXYPrhrRsHPOL DsVZauJc9GIOVbKKgU/DVr66JHHXbd2MupDQJUerw7uQKd1emkxMgP5K6gxoR6rgyJmi4jFMxRG e7oV3m7EAIrQfDnJIalNlXZNStLD7QUS1uSIo+Unkq69YZrLLibdy3NM5HP4i+2qOsGTIfTX8aW wuA5OL9FUBn5Gf4hyQRfV7EQ3L/AzobzM2fhLnGKKvBEsgFtkNU2RE1T0s4D9gFhGVlMG4KRr07 dfFw1zuE8rK7jbBf9bVU+rHP/qSIzUvhKrr2hShQ6Y54wiI4b+ulAMzyOw9kRPYFw3v9l48gNaT NXgoCKrWe8+PAYQ42Sln6RuI1C3oLOrg3rChUcXSzRGAhdc1BzYqsx6txgTCdScZ32oan2KalWH 1RGf1umjKZVOQeEL69aDHwkNlEQCOuP90yvASXvDGFW2/359lhOUwFn3yO7SXBPnnHD/0GPVPmz fiTLU3kO26CgZtHpzg9w+iqsyq/5hmKMxtoS4dMjbBdG+3nwsf7d0Nor6tmYFXk/afGqOBh+AIS jv44T+jjzaUVP5M7t1Aal4kKzmISSJTS7k2hcvauyWEmyGS4RJTsXXw3Qkjab1qPQvyh8BSIbbv DtZAA8FQernGuGA== X-Developer-Key: i=j-luthra@ti.com; a=openpgp; fpr=4DE0D818E5D575E8D45AAFC543DE91F9249A7145 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231115_015228_999222_F5923BF8 X-CRM114-Status: GOOD ( 10.54 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Enable the nodes for CSI-RX, DPHY-RX and I2C-2 as it is used to control CSI based sensors. Also enable IO-EXP-2 as it controls the mux between different CSI-2 connectors. Signed-off-by: Jai Luthra --- arch/arm64/boot/dts/ti/k3-am62a7-sk.dts | 35 +++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts b/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts index 8f64ac2c7568..20ec07a5237c 100644 --- a/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts +++ b/arch/arm64/boot/dts/ti/k3-am62a7-sk.dts @@ -434,6 +434,33 @@ tlv320aic3106: audio-codec@1b { DRVDD-supply = <&vcc_3v3_sys>; DVDD-supply = <&buck5>; }; + + exp2: gpio@23 { + compatible = "ti,tca6424"; + reg = <0x23>; + gpio-controller; + #gpio-cells = <2>; + + gpio-line-names = "", "", + "", "", + "", "", + "", "", + "WL_LT_EN", "CSI_RSTz", + "", "", + "", "", + "", "", + "SPI0_FET_SEL", "SPI0_FET_OE", + "RGMII2_BRD_CONN_DET", "CSI_SEL2", + "CSI_EN", "AUTO_100M_1000M_CONFIG", + "CSI_VLDO_SEL", "SoC_WLAN_SDIO_RST"; + }; +}; + +&main_i2c2 { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&main_i2c2_pins_default>; + clock-frequency = <400000>; }; &sdhci1 { @@ -544,3 +571,11 @@ &mcasp1 { tx-num-evt = <32>; rx-num-evt = <32>; }; + +&ti_csi2rx0 { + status = "okay"; +}; + +&dphy0 { + status = "okay"; +}; From patchwork Wed Nov 15 09:51:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jai Luthra X-Patchwork-Id: 13456444 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9935AC07548 for ; Wed, 15 Nov 2023 09:53:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:CC:To:In-Reply-To:References:Message-ID :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=U5cueZ4VdjoKslrkZteo3sVyAmYhTkDPl4R+QgA1Rgk=; b=poseB6cfC5VxRI TuNJ1LKWkyL9gxKB11j3OGR0vbxfbrt+rg70SAIuRF6yQ1N9766K09WnuKffh0882AQDmmcEtEOtt KrKZDuZN+OBm52O80zD4e747NTG+ZEp43cyiqJdefMOHf5KOdAAq3ERrFCXDLCBM5luaq7AqsrD6E ePcRS+NQsbVU5TKAsZVkXVyXYDiohaYv54VCT+dhFZPSR4oUZl5PLyLL4wTHF8gO9gk1UnVN794Oc Ogp9adubMqe8K5m2W+8H+hpdUN6eBA3qC8PBPrerBBmY6LdMU4ocmRDwBYpQGNeFBosxZGKAUqpt/ BY3VFkqSZIATgGY4QfVg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r3CZg-000Nok-1R; Wed, 15 Nov 2023 09:52:44 +0000 Received: from lelv0142.ext.ti.com ([198.47.23.249]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r3CZQ-000Ncg-2l for linux-arm-kernel@lists.infradead.org; Wed, 15 Nov 2023 09:52:31 +0000 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 3AF9qJ2Q105032; Wed, 15 Nov 2023 03:52:19 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1700041939; bh=wqiNtajspM2Vcwa3njm3c9Igmlpl9oNUS/rMg4Wqd8g=; h=From:Date:Subject:References:In-Reply-To:To:CC; b=bfbg7JGJ0/Xoclvgv5i/ZrcyWoYsQfgURUBH6fMrSicLunvfNESEUq1V7ChZQSKkO /KyruPnoOFUdnd5ifJ6oFvydux2EXPCFhDG6h5uQTYuxYTGNjARbDENg6pVdeqx+Sk 2tuwfiu1GYM554TBBvNVc0q8CEB5/ZQ1Wnrtn5SI= Received: from DLEE112.ent.ti.com (dlee112.ent.ti.com [157.170.170.23]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 3AF9qJcm101669 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 15 Nov 2023 03:52:19 -0600 Received: from DLEE102.ent.ti.com (157.170.170.32) by DLEE112.ent.ti.com (157.170.170.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Wed, 15 Nov 2023 03:52:19 -0600 Received: from lelv0326.itg.ti.com (10.180.67.84) by DLEE102.ent.ti.com (157.170.170.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Wed, 15 Nov 2023 03:52:19 -0600 Received: from localhost (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 3AF9qI9o009800; Wed, 15 Nov 2023 03:52:19 -0600 From: Jai Luthra Date: Wed, 15 Nov 2023 15:21:16 +0530 Subject: [PATCH 8/8] arm64: dts: ti: k3-am62x: Add overlay for IMX219 MIME-Version: 1.0 Message-ID: <20231115-csi_dts-v1-8-99fc535b2bde@ti.com> References: <20231115-csi_dts-v1-0-99fc535b2bde@ti.com> In-Reply-To: <20231115-csi_dts-v1-0-99fc535b2bde@ti.com> To: Catalin Marinas , Will Deacon , Nishanth Menon , Vignesh Raghavendra , Tero Kristo , Rob Herring , Krzysztof Kozlowski , Conor Dooley CC: , , , Aradhya Bhatia , Devarsh Thakkar , Vaishnav Achath , Julien Massot , Martyn Welch , Jai Luthra X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=3170; i=j-luthra@ti.com; h=from:subject:message-id; bh=R4Pz6G6ZrGv5Qkr/jjdVZhmrMN2R5FPJxbqhP5Eaai0=; b=owEBbQKS/ZANAwAIAUPekfkkmnFFAcsmYgBlVJS/gXlpcY1OXa45nzruOPwgoa2cibCigIosR jzoIrj03ACJAjMEAAEIAB0WIQRN4NgY5dV16NRar8VD3pH5JJpxRQUCZVSUvwAKCRBD3pH5JJpx RUSkEACbCUIe52YaC5hFb01EK//gREfgKm0vNpRr7k0cREWxzwlVIGTa4hr3RlIj8hV6ScHAlBU J1H/a9NQ+oLi5gqov0tKDHd30bubuS4+9Mx2mLx8TH415QSv6z9upgXkELIE8eCjvW5Q4ig9unp sz2496uve83ylwKHnrJvi6uZPABlTLjAGxPa21QloenTR7SSVq1Fu32k0RZgRK9GWxdcBWYClKa GFbOreZg05sOIc6LseLACK/NhSbzW5b3TTxaJqCQiCJbR4EERLSDxZnNk6b9LJ0ty4n6iBzZqVc LSBUnDB86SeqPDlXCkc2rsx0WU+IQNZ+YwA2IvNquQOK9mEhD0h0G/guyObIKvuN7URr/0Eka9e fDcWHQarY8hdCzsylHSV34SsAViSuzOR9JG1B5GAexXlqPNF/XxlqxsIMgMtOgmMW9uelVzBsM8 Vl9MzQPFkp8zu37baPMSFzj/Bm3B1TuY7cidA42n4sLz1tOT/sDE+AQM6dola6uhKsaFBcnXPvi JIwUif4Yhzgiux7ekwnzqJUEEvedQbEAfpNYPLcHF4KL/xD0VbU+I/3yCAwBE4S8KkatjrvVD3E i5mM5XLRiK7ylZ+jL9EVddikygH0mXxTEHSUC0bSvLiiLWWwaUK1kwwpafyOXVS9sLdDgpJMiFa MS0k7ARfHTg4JRw== X-Developer-Key: i=j-luthra@ti.com; a=openpgp; fpr=4DE0D818E5D575E8D45AAFC543DE91F9249A7145 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231115_015229_021698_01940EA7 X-CRM114-Status: GOOD ( 14.31 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org RPi v2 Camera (IMX219) is an 8MP camera that can be used with SK-AM62A through the 22-pin CSI-RX connector. Same overlay can be used across SK-AM62* boards that have a 15/22-pin FFC connector, so we name it with the k3-am62x- prefix. Signed-off-by: Jai Luthra --- arch/arm64/boot/dts/ti/Makefile | 4 ++ .../arm64/boot/dts/ti/k3-am62x-sk-csi2-imx219.dtso | 76 ++++++++++++++++++++++ 2 files changed, 80 insertions(+) diff --git a/arch/arm64/boot/dts/ti/Makefile b/arch/arm64/boot/dts/ti/Makefile index a09b16cbefb4..f89dcbe3c635 100644 --- a/arch/arm64/boot/dts/ti/Makefile +++ b/arch/arm64/boot/dts/ti/Makefile @@ -37,7 +37,10 @@ dtb-$(CONFIG_ARCH_K3) += k3-am625-sk-hdmi-audio.dtb dtb-$(CONFIG_ARCH_K3) += k3-am62-lp-sk-hdmi-audio.dtb # Boards with AM62Ax SoC +k3-am62a7-sk-csi2-imx219-dtbs := k3-am62a7-sk.dtb \ + k3-am62x-sk-csi2-imx219.dtbo dtb-$(CONFIG_ARCH_K3) += k3-am62a7-sk.dtb +dtb-$(CONFIG_ARCH_K3) += k3-am62a7-sk-csi2-imx219.dtb # Boards with AM62Px SoC dtb-$(CONFIG_ARCH_K3) += k3-am62p5-sk.dtb @@ -96,6 +99,7 @@ dtb-$(CONFIG_ARCH_K3) += k3-j784s4-evm.dtb DTC_FLAGS_k3-am625-beagleplay += -@ DTC_FLAGS_k3-am625-sk += -@ DTC_FLAGS_k3-am62-lp-sk += -@ +DTC_FLAGS_k3-am62a7-sk += -@ DTC_FLAGS_k3-am6548-iot2050-advanced-m2 += -@ DTC_FLAGS_k3-j721e-common-proc-board += -@ DTC_FLAGS_k3-j721s2-common-proc-board += -@ diff --git a/arch/arm64/boot/dts/ti/k3-am62x-sk-csi2-imx219.dtso b/arch/arm64/boot/dts/ti/k3-am62x-sk-csi2-imx219.dtso new file mode 100644 index 000000000000..84d08bfda469 --- /dev/null +++ b/arch/arm64/boot/dts/ti/k3-am62x-sk-csi2-imx219.dtso @@ -0,0 +1,76 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * IMX219 (RPi v2) Camera Module + * Copyright (C) 2023 Texas Instruments Incorporated - https://www.ti.com/ + */ + +/dts-v1/; +/plugin/; + +#include + +&{/} { + clk_imx219_fixed: imx219-xclk { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <24000000>; + }; +}; + +&main_i2c2 { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + i2c-switch@71 { + compatible = "nxp,pca9543"; + #address-cells = <1>; + #size-cells = <0>; + reg = <0x71>; + + /* CAM port */ + i2c@1 { + #address-cells = <1>; + #size-cells = <0>; + reg = <1>; + + ov5640: camera@10 { + compatible = "sony,imx219"; + reg = <0x10>; + + clocks = <&clk_imx219_fixed>; + clock-names = "xclk"; + + reset-gpios = <&exp1 13 GPIO_ACTIVE_HIGH>; + + port { + csi2_cam0: endpoint { + remote-endpoint = <&csi2rx0_in_sensor>; + link-frequencies = /bits/ 64 <456000000>; + clock-lanes = <0>; + data-lanes = <1 2>; + }; + }; + }; + }; + }; +}; + +&cdns_csi2rx0 { + ports { + #address-cells = <1>; + #size-cells = <0>; + + csi0_port0: port@0 { + reg = <0>; + status = "okay"; + + csi2rx0_in_sensor: endpoint { + remote-endpoint = <&csi2_cam0>; + bus-type = <4>; /* CSI2 DPHY. */ + clock-lanes = <0>; + data-lanes = <1 2>; + }; + }; + }; +};