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: 165248 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b909:0:b0:403:3b70:6f57 with SMTP id t9csp2430495vqg; Wed, 15 Nov 2023 01:53:03 -0800 (PST) X-Google-Smtp-Source: AGHT+IFaSct6cjFDqZC+nI0+urVzH+bDm1/1TIHN3BbiWC2sEBvxzah2k2mZj/ZleaaKRZZWNXRM X-Received: by 2002:a17:903:230f:b0:1cc:7af4:d136 with SMTP id d15-20020a170903230f00b001cc7af4d136mr5485216plh.28.1700041982796; Wed, 15 Nov 2023 01:53:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700041982; cv=none; d=google.com; s=arc-20160816; b=SWgp60DcBjMGqNvfq+jgQ5A3pKOc6633HmsZECDtftlU2C/V51pReVVBYhdaLQzgO1 n3hv1FIMjd7IQanlGux++go0JXNV0WD5Xk88Y2hnSY9Xd60YxEuqWomc4Y9Yc/ypQ+zq H69vO3+dQkJUp2nWkyV0QdkOcvU7XrSTvDeNP6hNgnjZpbqzRflUItvdNf71LjrYXb22 CjIpJnE51j0D+8aqsO0gVbSfMr5oECihoen3M3YH66tdChpX/UR+kNvVGk24MJHUSK95 nrCmcXd0E5kQjbTi2R6SNT6cVf7+zZttX5JeGDNmVOJKxI5N+/yj915pAqI6yUIF7hgN Jn3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=wqiNtajspM2Vcwa3njm3c9Igmlpl9oNUS/rMg4Wqd8g=; fh=/DmXmFEf5H4yMoXETWO4dsv/SeAJhpaj5Ol0ioZpBwo=; b=g7J+en8UUkV43qx3vdPWb6f3GJCHAG+d+nCZoJ1bp2LNEZx7fkGOsxgFWigGDUK1a4 3ydoF2PRhdCo+aza8HlI1whoKVV9hE12nkK4KFxhvzX2fve6cl9k7FXfYhSl3YCmvexC 6lYcxiuQ+GQc/8fxVAvgGZxXa4lRlH0zxzf43fdxBrKd0wlMiU6a3Uh6RKSKvy2lq1m0 SHdQD00zOLwmeO3PkMBKs1Ln0rt0xnJ04dfcU4ZQvCnYxmgqCgyoNqJ8bIv5zQdtrQ6C fdoXK5DKm/9nyt2T8r+cA25xcteILyEoL9HAYnP6N1tJ1RL8X/7+m+08jyTBuCwNkb+h d1Ww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=bfbg7JGJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id c3-20020a170902d48300b001ca85fddf9esi9986931plg.483.2023.11.15.01.53.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Nov 2023 01:53:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=bfbg7JGJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 075A5813EA92; Wed, 15 Nov 2023 01:53:02 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234936AbjKOJwy (ORCPT + 28 others); Wed, 15 Nov 2023 04:52:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60532 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234855AbjKOJwo (ORCPT ); Wed, 15 Nov 2023 04:52:44 -0500 Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D7CE1194; Wed, 15 Nov 2023 01:52:31 -0800 (PST) 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-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 15 Nov 2023 01:53:02 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782623222314244054 X-GMAIL-MSGID: 1782623222314244054 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>; + }; + }; + }; +};