From patchwork Fri Dec 1 05:09:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jai Luthra X-Patchwork-Id: 172254 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp889826vqy; Thu, 30 Nov 2023 21:11:22 -0800 (PST) X-Google-Smtp-Source: AGHT+IExbpNdy5Qx21AbE3HcR3l1BtV1xuUVZFSyykWRaQvNcIIVsh3h4/sD7Tk/BxtCZd4Zekw4 X-Received: by 2002:a17:902:c947:b0:1cf:de3e:e4ef with SMTP id i7-20020a170902c94700b001cfde3ee4efmr14521431pla.45.1701407482605; Thu, 30 Nov 2023 21:11:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701407482; cv=none; d=google.com; s=arc-20160816; b=i9KVd7Al1GkgXdGPnAw7Vjx/aXVGEVvVtxRFlOJSkam0X31snEiQ29w9wCij5mcTtr XFH9EGaA3ut3+mKGxEpuuAps3quOxlaok96UUIeiRK0BUE3tcGyh66JDfYJm5pRH0DYZ XgGfEKzYBkjwlMbSZaHK77nnJXeGLc2WsaD5KP+E09TQUKlBZeF+ILlahxwLPirk4c21 Le8Tge9Y0AL9FR48vExqc4LFJaKi+dr+5yo7jpv9zUpZlqTn9pVSIhqTaUh8Mj35tVxk +8rvLOpBj/FSNWO/R+yq130eb47i4Nc/8wgFVICezonyVl8dtkcoPy2aBBmTyqAf/7lR u7iA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=3GYwtw59YCcor/NLf8ZP0vjymxatZ5xSsrnhTHTWfNg=; fh=4kSr5OJ7shtrhcKsjRyWBmAMqPnbCfW6aNJsT9zxNW0=; b=s0l/mdde3NvKWTjHQotrKtk13eR12eit8Vy7mwoNw5U2ebOA9Pmn+Iqa6BjWPtWiCI zMtJYfhvUFvtdf2c5sY3ilhQ0DNbr0NTpWihvVIWAkGtliVFDOEiORtHaynRsukf6/av +hVFLf8wGtfxLyakWz66xj1D4QQBA5aubzVFSVL56LZ4nrL1yuljciqAjTg9lcKDoacB WW1BVcD1yN5+YDzvoAqP5e+d5Mw1zPSPceqW14hbXp3PEugJk/6EeYl9cGUsJ65lPMUu 5UDelhSzH9oA2YIDkoDDqFBWMu1fXl1pZTCVgLNqmNFLYBF/IRwZXmU8VRdHdGilRsMr KBsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=gCxbQATg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id jn13-20020a170903050d00b001cfcd30890esi2584202plb.257.2023.11.30.21.11.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 21:11:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=gCxbQATg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (Postfix) with ESMTP id 6DDCC8142DA1; Thu, 30 Nov 2023 21:11:18 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377485AbjLAFKv (ORCPT + 99 others); Fri, 1 Dec 2023 00:10:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43896 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377581AbjLAFK1 (ORCPT ); Fri, 1 Dec 2023 00:10:27 -0500 Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2B1131FDE; Thu, 30 Nov 2023 21:10:23 -0800 (PST) Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 3B15AClE025922; Thu, 30 Nov 2023 23:10:12 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1701407412; bh=3GYwtw59YCcor/NLf8ZP0vjymxatZ5xSsrnhTHTWfNg=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=gCxbQATgUHodfbilIbAfwLt8QN3dLKjxQAPSEh2g+yZMMHtCiafzLDrchVhI2QohS ASbNbumxdv23XQEfqxV+WiqGmMPdIEJTVBZcBq2ZBbn9xujiR04pmUjtufJdZ/j8/8 DCku+UMEu/EaHJi05lu5WY5+O4BJN8BLY2Qsc/Kc= Received: from DLEE112.ent.ti.com (dlee112.ent.ti.com [157.170.170.23]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 3B15ABYc007103 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 30 Nov 2023 23:10:11 -0600 Received: from DLEE105.ent.ti.com (157.170.170.35) 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; Thu, 30 Nov 2023 23:10:11 -0600 Received: from fllv0040.itg.ti.com (10.64.41.20) by DLEE105.ent.ti.com (157.170.170.35) 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; Thu, 30 Nov 2023 23:10:11 -0600 Received: from localhost (ileaxei01-snat.itg.ti.com [10.180.69.5]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 3B15AAep112862; Thu, 30 Nov 2023 23:10:11 -0600 From: Jai Luthra To: Catalin Marinas , Will Deacon , Nishanth Menon , Vignesh Raghavendra , Tero Kristo , Rob Herring , Krzysztof Kozlowski , Conor Dooley CC: Jai Luthra , , , , Aradhya Bhatia , Devarsh Thakkar , Vaishnav Achath , Julien Massot , Martyn Welch , Matthias Schiffer Subject: [PATCH RESEND v3 6/9] arm64: dts: ti: k3-am62x: Add overlays for OV5640 Date: Fri, 1 Dec 2023 10:39:21 +0530 Message-ID: <20231201-csi_dts-v3-6-9f06f31080fe@ti.com> X-Mailer: git-send-email 2.42.1 In-Reply-To: <20231201-csi_dts-v3-0-9f06f31080fe@ti.com> References: <20231201-csi_dts-v3-0-9f06f31080fe@ti.com> MIME-Version: 1.0 X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=openpgp-sha256; l=6292; i=j-luthra@ti.com; h=from:subject:message-id; bh=siE15amp7sBe0tqZO+R7dGdDyBuGj7LaqdT6TjKRyvc=; b=owEBbQKS/ZANAwAIAUPekfkkmnFFAcsmYgBlaWXueF8s2VLBkPfPgociIFMVPyjS33IIwUrDk BEdgI9n6cWJAjMEAAEIAB0WIQRN4NgY5dV16NRar8VD3pH5JJpxRQUCZWll7gAKCRBD3pH5JJpx RbcXD/9CPEgXCMCHUuLszCBsIL02Ve6t5e7cqsNZWB6zAcI9wJpk0/IDhAH7OtQHENiuxVGs/Ko KFF3wLd7r/zB+r1+egs6sgPqalbRls6LAY2YMSzRyjkJ7RiNGzTXDMtGIOWBZPsYIKi40WmT0nz d8rcQNdh34KoHbnwJ34vcbO6WBPwZUPfoBjcG1oDFMrJxPMH4l7ckAgnO4fZktiIaC3vTJMTX6U jVFSBE0VkwLAqR78b+ZSDiGjHA+GmHYeiVf0QLG06EG92PzeJdLXLf24VIBY10fGHYEVrOgPzhq rXp0e6Vtze4PHu9mbb30PqNMPzA+lCNyAS/2uBZz3kO0Zgto8HHIzMSRtVFKFYXp8R8qb6Kh8UF zwDAq22wFrr9bkA6XICiHmdsY3sSr7G11VRixpUcEhDwC4RAkDRA/Wc7FeeTNH87aK5MmsFVMo8 sg4app84quRDQH9dXabxpqBYH9cmQZEXbxy7DunVU3juPwid/Iodx/I/kniBEHLRmtz4+9xSaPH vwiOnVUxTqbuzZqJIW0Q7SXvu0MdXFeQ5HHEtyNZnInp2zT33RmQhRqjT1JqDpYJbduE7tzyFRx ox5YbMyVPecvYfRZN6EPjzm89L6jhqMFq+LA51QWV/6xxAPhLwCZhys52dptaT0eFZIij6wbU68 R+VAIITmQ8hPDQw== 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=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email 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 (lipwig.vger.email [0.0.0.0]); Thu, 30 Nov 2023 21:11:18 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784055052422610534 X-GMAIL-MSGID: 1784055052422610534 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-. Tested-by: Martyn Welch Signed-off-by: Jai Luthra --- arch/arm64/boot/dts/ti/Makefile | 19 ++++- .../arm64/boot/dts/ti/k3-am62x-sk-csi2-ov5640.dtso | 82 ++++++++++++++++++++++ .../boot/dts/ti/k3-am62x-sk-csi2-tevi-ov5640.dtso | 82 ++++++++++++++++++++++ 3 files changed, 182 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/ti/Makefile b/arch/arm64/boot/dts/ti/Makefile index c6c7825b4cb2..f957b5f741ff 100644 --- a/arch/arm64/boot/dts/ti/Makefile +++ b/arch/arm64/boot/dts/ti/Makefile @@ -32,6 +32,10 @@ dtb-$(CONFIG_ARCH_K3) += k3-am62a7-sk.dtb # Boards with AM62Px SoC 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 + # Boards with AM64x SoC dtb-$(CONFIG_ARCH_K3) += k3-am642-evm.dtb dtb-$(CONFIG_ARCH_K3) += k3-am642-phyboard-electra-rdk.dtb @@ -87,13 +91,26 @@ 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-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-beagleplay-csi2-tevi-ov5640.dtb \ + k3-am625-sk-csi2-ov5640.dtb \ + k3-am625-sk-csi2-tevi-ov5640.dtb \ + k3-am62a7-sk-csi2-ov5640.dtb \ + k3-am62a7-sk-csi2-tevi-ov5640.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-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-ov5640.dtso b/arch/arm64/boot/dts/ti/k3-am62x-sk-csi2-ov5640.dtso new file mode 100644 index 000000000000..1f3aebbc8df8 --- /dev/null +++ b/arch/arm64/boot/dts/ti/k3-am62x-sk-csi2-ov5640.dtso @@ -0,0 +1,82 @@ +// 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>; + }; + }; + }; +}; + +&ti_csi2rx0 { + status = "okay"; +}; + +&dphy0 { + status = "okay"; +}; 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..6a367f13be63 --- /dev/null +++ b/arch/arm64/boot/dts/ti/k3-am62x-sk-csi2-tevi-ov5640.dtso @@ -0,0 +1,82 @@ +// 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>; + }; + }; + }; +}; + +&ti_csi2rx0 { + status = "okay"; +}; + +&dphy0 { + status = "okay"; +};