From patchwork Tue Nov 28 10:09:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jai Luthra X-Patchwork-Id: 170673 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce62:0:b0:403:3b70:6f57 with SMTP id o2csp3807542vqx; Tue, 28 Nov 2023 02:13:01 -0800 (PST) X-Google-Smtp-Source: AGHT+IEbwyUbGDrzsm3vAyvw2quZvLhGua5jCkYZveXGnUjW+mlBD7jxeN9UTCFfQbocM/ZKvvNV X-Received: by 2002:a17:90a:195e:b0:285:2d62:84c4 with SMTP id 30-20020a17090a195e00b002852d6284c4mr16930053pjh.29.1701166381649; Tue, 28 Nov 2023 02:13:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701166381; cv=none; d=google.com; s=arc-20160816; b=tzRqH6B1Bz8puZqX58d1nlYJeNvHrieu9jmYjGiTKkEdHYV3zFAqfuktH0+X4MJKk1 8JKyYaaQjdw3tczisiVruXhDflIm5FLhL8gn0qz95OIwtObOMlX7g+TYOeqTxIjxFsiS 3JT/53HY30d1KtbiFfIplGkY+BN8e2rba7ZIkWDom5o3VBSMA5Fs6Jl3EosT0ON0BReA /DI4GHoMk0Yn70nw2T381o9LFedOC1eLRQR3jP1j/TrzYbJeta1GD/chmt8oyg9/F4+2 rKtpUZIRTCXj/DPvCqGtQ7/4AZHHZx/6yWslfUCQUibuWeM+xgg7Vjs8PMiXRGnLjJva QPhg== 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=3GYwtw59YCcor/NLf8ZP0vjymxatZ5xSsrnhTHTWfNg=; fh=gjf50MpIeI4y7DsLDR8KPyZZDZn0L+YVyMCrolRSpx0=; b=aCUDy1dn1TCoGLvoggwmHIedpOe+KytyPemkI7O18ZGCvzDKG/+bvyRGjp5toIqbxp dB2gBsKyIKuSDHMSiF4Xcux2bs2iwt0x4tpCchEGTLKQ2Z111nh2+zYP8M9I85WMG5xz op4vQMUeytMBgeaY5bxd1NZ1Uj1OWxXb/4PUkq7QdBNm3gl/OvzcsuUyzB0Nzm9Gro3Q jrYF+kdJKIKdPLV+ka66lGSKqXpr5pHxKpgrkr3zHiXFcMqEozZ85PB/vr/NvlL0QGWA GBvT2a+q2n6csKCf2TlhFYqwdg4YuOSimFCMRAbiu8mmRxPGuzDTEXKSrUfhTatsMSwC mpdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=VqvX2JiR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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. [23.128.96.37]) by mx.google.com with ESMTPS id e31-20020a63545f000000b005c21363f9b0si11666065pgm.766.2023.11.28.02.13.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Nov 2023 02:13:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=VqvX2JiR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 538F5804C215; Tue, 28 Nov 2023 02:13:00 -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 S1343805AbjK1KMn (ORCPT + 99 others); Tue, 28 Nov 2023 05:12:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56440 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344024AbjK1KKk (ORCPT ); Tue, 28 Nov 2023 05:10:40 -0500 Received: from fllv0015.ext.ti.com (fllv0015.ext.ti.com [198.47.19.141]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CE1EA131; Tue, 28 Nov 2023 02:10:45 -0800 (PST) Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 3ASAAXRo079833; Tue, 28 Nov 2023 04:10:33 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1701166233; bh=3GYwtw59YCcor/NLf8ZP0vjymxatZ5xSsrnhTHTWfNg=; h=From:Date:Subject:References:In-Reply-To:To:CC; b=VqvX2JiRwZ34MrSpy0yfYjsFJdmorGbW4T+WidyEka8AYb2q+6hUUZHrtsxpWbuKP R2IUqnVWZL7OBvCZTDhMeXQ/ARCXx7UMtLtcZGmq2efjLzodFCQjIViktRderpBbqV Adn3e6rv8YMKbEkTOW7olqHpX2Ao409YRhwEO6k4= Received: from DFLE110.ent.ti.com (dfle110.ent.ti.com [10.64.6.31]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 3ASAAX4u108294 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 28 Nov 2023 04:10:33 -0600 Received: from DFLE101.ent.ti.com (10.64.6.22) 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; Tue, 28 Nov 2023 04:10:32 -0600 Received: from fllv0040.itg.ti.com (10.64.41.20) 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; Tue, 28 Nov 2023 04:10:32 -0600 Received: from localhost (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 3ASAAVfF070639; Tue, 28 Nov 2023 04:10:31 -0600 From: Jai Luthra Date: Tue, 28 Nov 2023 15:39:48 +0530 Subject: [PATCH v3 6/9] arm64: dts: ti: k3-am62x: Add overlays for OV5640 MIME-Version: 1.0 Message-ID: <20231128-csi_dts-v3-6-0bb11cfa9d43@ti.com> References: <20231128-csi_dts-v3-0-0bb11cfa9d43@ti.com> In-Reply-To: <20231128-csi_dts-v3-0-0bb11cfa9d43@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=6292; i=j-luthra@ti.com; h=from:subject:message-id; bh=siE15amp7sBe0tqZO+R7dGdDyBuGj7LaqdT6TjKRyvc=; b=owEBbQKS/ZANAwAIAUPekfkkmnFFAcsmYgBlZbyDwiFUM/Sl7eGJP2eYSSLTSLkfLwORoqNYj bFH4ZVen5yJAjMEAAEIAB0WIQRN4NgY5dV16NRar8VD3pH5JJpxRQUCZWW8gwAKCRBD3pH5JJpx RfFhD/4xy83j2GWyHUhSMRhMy6p8WNUDl1RF23Elez8LoMNkk2oXL/1I8XkWEJ4FPwx0jDvcA6H 0+JTJObDmSY7nGFY+kPrROCW4NzC1Ar7vHcYgmUtnayCxJHJn63C8YcNxNsyJKdVyNtD33XmJX2 SqDPAoIS1x0NzuGTXoPj1/XNWb4vuOXLhxZNhFm7PUx48HttzAbF5U90dcsmi6v2oCTdfyhCDU2 HblXc/riapjw6OzMcKgCErCisxAW+cbKThJH8nviRwiB55q9uEo+vhbTbJtf/7ND6KRrW7gq/Sv aHVB/1OJiU/XxwKHsZApJJw73xZ9lQsU9UFRAp3yKDc8RXBnMlEVK/dwF9Nq+tQDGSQUvb6PlS4 zwxnH4wq97PqN0OCKVq6li1exU7mgebcQJlCT54V8xZiabEQGQxTTbh5MAN1rxxpBNeqo/CJhLm twGZfeSAU6WutjFcH1Pame1AQvSD55If+IwH7OZfVUL+zqYMTCRoU1QLITVmT01Qic57LXDu+OE cunRlPQ+wc1nGcq5f+3Iw+EKkEdmdPDNN1KC1gc2iRJKqu77DkJlo6Be91DPZ53hvOPkTfcDI5z CYyEsFgWqQOaobdopgM7IUwPXr9IJnQOmJ/bsfWGf7PAf7129LiP+tDBy8szh0/TK1ve8JUG7RF yIJpuMby/A6a09A== 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.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,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]); Tue, 28 Nov 2023 02:13:00 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783802240025892092 X-GMAIL-MSGID: 1783802240025892092 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"; +};