From patchwork Fri Nov 17 09:28: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: 13458602 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 B8D31C197A0 for ; Fri, 17 Nov 2023 09:32:34 +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=RUFc9rGwwwe0z4hT3Q7JfZtTiI4Ja5A3UNUnnxYTKJs=; b=3obOwo0rTk/Eyn x3SAvGRG+lLhFZRhv5t1LALgneC18zOZ14npBOZ9qfEnor+9D65Ys832wMl8seouItMO9i9xDNvcQ rApgnhSoBW0Bs7wNwK9gL9YlSRh5CXpmVoQOIVkBeJxmx4uSV6Xe/FvFei5A3oABsS6UOulzjy/tc LfLEMyFK4CFRrDKHS2HRHXcSWFKn05S2Nls72eb+Nt7tbTWSDfpX0D7zzjzzRoGbhwQz6w8lCDKOm tlATgyt8LdCJg5BB1KcEQmr+5h/L/oktZ7wo4SWaWGrINJqY8qVFi8Luq2DTRumB7rZl0ss//vSiw ad+hxVOK/qMFf1hTFxjA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r3vCs-0065U4-0B; Fri, 17 Nov 2023 09:32:10 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r3vCq-0065S9-0o for linux-arm-kernel@bombadil.infradead.org; Fri, 17 Nov 2023 09:32:08 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=CC:To:In-Reply-To:References: Message-ID:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Sender:Reply-To:Content-ID:Content-Description; bh=CdYehB85qz+VazHlhe5ZsKCvZa2lCLts/qjl19Qebi8=; b=PMvzxLI9caaP8/CgDTAFjAt/e9 fjlZzNz4YxZ0LBpTrMzW71jXGAT1Ly7nuk9rxgPqcgFoxRv4Lj0Hl96lPSf2vW5/mW+nrMlT1s4J5 qtZ1UVtewW+KG5hAepbUhTB+ZC43+wXeL05xneUfeuybx8BDW7YAj2z32lubWlfkdZu85JQGwLLFD rYAKZBK0ShEPeiiT7Su174nkSixwq9oUr5xp/h1hHTe0X1mdA7b/ghZaMWWcL6WYRvURQKBipwMNO Md0NfTs142Bl3CR8Wzp+ZjmZlW3/QybsQYfuG5rfBozpP9nsWW3ieU7spknhKn9EbdIk6/caMVp5M XL2dWYaw==; Received: from lelv0143.ext.ti.com ([198.47.23.248]) by desiato.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r3vAo-007BCE-2s for linux-arm-kernel@lists.infradead.org; Fri, 17 Nov 2023 09:32:06 +0000 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 3AH9Ti0Y011205; Fri, 17 Nov 2023 03:29:44 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1700213384; bh=CdYehB85qz+VazHlhe5ZsKCvZa2lCLts/qjl19Qebi8=; h=From:Date:Subject:References:In-Reply-To:To:CC; b=ozmkj2BrNwRp3BlR3d8OzzECb9QhwL7a7FF9JaUPcfs2GCBtmyu1wcbSqpjvFYdoK 8SKgThVokTC+FS5SAQs4alElbj0GX7MzQofsKelSf0OuutQWcl+770+eg9ELY/LaP0 oMDdu87bToUqLBFiZv8vEQelE2Q2fOQ0LsyMzjHQ= Received: from DFLE104.ent.ti.com (dfle104.ent.ti.com [10.64.6.25]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 3AH9TiVU023889 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 17 Nov 2023 03:29:44 -0600 Received: from DFLE113.ent.ti.com (10.64.6.34) by DFLE104.ent.ti.com (10.64.6.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Fri, 17 Nov 2023 03:29:44 -0600 Received: from lelv0326.itg.ti.com (10.180.67.84) 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 via Frontend Transport; Fri, 17 Nov 2023 03:29:44 -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 3AH9ThBW000553; Fri, 17 Nov 2023 03:29:43 -0600 From: Jai Luthra Date: Fri, 17 Nov 2023 14:58:16 +0530 Subject: [PATCH v2 8/9] arm64: dts: ti: k3-am62x: Add overlay for IMX219 MIME-Version: 1.0 Message-ID: <20231117-csi_dts-v2-8-bf4312194a6b@ti.com> References: <20231117-csi_dts-v2-0-bf4312194a6b@ti.com> In-Reply-To: <20231117-csi_dts-v2-0-bf4312194a6b@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 , Matthias Schiffer , Jai Luthra X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=3858; i=j-luthra@ti.com; h=from:subject:message-id; bh=iXVMzPUomin7Bo7+dqj4cRTRBovP3k+BJ2yUHJwzELc=; b=owEBbQKS/ZANAwAIAUPekfkkmnFFAcsmYgBlVzJyj/zVVi0nZL0pDNKndVB8H3LriQbdMbMgH mMEp8HGc5+JAjMEAAEIAB0WIQRN4NgY5dV16NRar8VD3pH5JJpxRQUCZVcycgAKCRBD3pH5JJpx RaOwEACIvwsVspNg8XpS2+nG8gAc+IFQVnURbNeqUUyAbEvmDAfxCxZxmxMbF9yscbku4DwRZG5 8KydHvim5Vl1EUgchCjJxYjIVqeCn1QKk42a1/3GQmY2Vp7FjXxNzSOc/649sxmZ4SSfRE/sKog jShwXH/LWypPWVhAL0b8AEQuTr+v+roAEcJsvEE5uhPQjdA7t4ltwHZ8nrA0lJvmil8wwe/79yr QeR3PDVTM5snNSEcY4SGKbCdYFF1SlRqc66Te9F5ETgF0DbWXn2iXcvJi+w/Wd94/v6qQNe4FDc 1RajbE9sdbH85xitwt3Zzq65vxVDu+AapArqqNIqBwOsTEDPR5de6WGzvwceK5OPnhNNFxaA5Am sNXW0cL7YmkwVjDkuYrLyC7XIAcZzlrrGodmdC8CRtrWr2On+Sk4iu1X89/SDrPiIBsZA8RnXBg ALz3hgCy5QfKGffaIrsxCnI/CQFs8oI+p+c6GyY9V/iotPkV0kuFRXvbsRiOFQT6IWtSDqoytmt VpbJ58dLR7LIvvobWFWhEBSain6gic4U3tVKiOYKs1mSeuo+3tvZwkrFgI8L2jADrU6dLWGF9Sl fa2ci8M4R4PWm4bOWDpYIksQU5dGXnvMmizw7XR9d1rVInnxnDPXO+vq7fq0m5sHoKsv/eUhERi 66sWuITtFY1VLVQ== 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-20231117_093203_871855_A006F893 X-CRM114-Status: GOOD ( 13.47 ) 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 | 7 ++ .../arm64/boot/dts/ti/k3-am62x-sk-csi2-imx219.dtso | 76 ++++++++++++++++++++++ 2 files changed, 83 insertions(+) diff --git a/arch/arm64/boot/dts/ti/Makefile b/arch/arm64/boot/dts/ti/Makefile index f957b5f741ff..fd9166497c32 100644 --- a/arch/arm64/boot/dts/ti/Makefile +++ b/arch/arm64/boot/dts/ti/Makefile @@ -35,6 +35,7 @@ dtb-$(CONFIG_ARCH_K3) += k3-am62p5-sk.dtb # Common overlays for SK-AM62* family of boards dtb-$(CONFIG_ARCH_K3) += k3-am62x-sk-csi2-ov5640.dtbo dtb-$(CONFIG_ARCH_K3) += k3-am62x-sk-csi2-tevi-ov5640.dtbo +dtb-$(CONFIG_ARCH_K3) += k3-am62x-sk-csi2-imx219.dtbo # Boards with AM64x SoC dtb-$(CONFIG_ARCH_K3) += k3-am642-evm.dtb @@ -91,18 +92,24 @@ 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-imx219-dtbs := k3-am625-sk.dtb \ + k3-am62x-sk-csi2-imx219.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-am62a7-sk-csi2-imx219-dtbs := k3-am62a7-sk.dtb \ + k3-am62x-sk-csi2-imx219.dtbo k3-am62a7-sk-csi2-ov5640-dtbs := k3-am62a7-sk.dtb \ k3-am62x-sk-csi2-ov5640.dtbo k3-am62a7-sk-csi2-tevi-ov5640-dtbs := k3-am62a7-sk.dtb \ k3-am62x-sk-csi2-tevi-ov5640.dtbo dtb- += k3-am625-beagleplay-csi2-ov5640.dtb \ k3-am625-beagleplay-csi2-tevi-ov5640.dtb \ + k3-am625-sk-csi2-imx219.dtb \ k3-am625-sk-csi2-ov5640.dtb \ k3-am625-sk-csi2-tevi-ov5640.dtb \ + k3-am62a7-sk-csi2-imx219.dtb \ k3-am62a7-sk-csi2-ov5640.dtb \ k3-am62a7-sk-csi2-tevi-ov5640.dtb 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>; + }; + }; + }; +};