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>; + }; + }; + }; +};