From patchwork Wed Nov 15 09:51:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jai Luthra X-Patchwork-Id: 165249 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b909:0:b0:403:3b70:6f57 with SMTP id t9csp2430514vqg; Wed, 15 Nov 2023 01:53:06 -0800 (PST) X-Google-Smtp-Source: AGHT+IHMnn6PZf1bL+U8aPQPYqhp51tPLavMYArTG8O71I/FKYr+vjCN4GDGNasSkP2OaHXbQDTZ X-Received: by 2002:a05:6808:1413:b0:3ae:50f7:e3a4 with SMTP id w19-20020a056808141300b003ae50f7e3a4mr18481019oiv.22.1700041985845; Wed, 15 Nov 2023 01:53:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700041985; cv=none; d=google.com; s=arc-20160816; b=lWqIdnYqKict9tcN/q3YeiQcDxN7xm8MrzUKrjRt+bIHY07q2GI1aQECHoZoZ3NEuf MH0SVOe4Slf15r2bRaXecmBINwk0KcdInFY4TNnLS30+Fqq78Dg8DvCAsRQ0rvB2bgri r3pm7Dp6iO/XFR8heKWE7emQ2lAqk1m+DwQ0RlqNsEgOIVBODCYOtZAUEd8MDDPtZs/X X4h8WiNPbSLyHWuZsFXuJ7DGVMRPBOIHVoyI2tYWZsvBxZqvT/xTd9Cc+bjJWQUOzP9a 6iLo+NO28pGDUfN/0Az87YUVndI7tDVuac5QewgvHZNgXZXQkaw+nQ9NVx+K05yasBsL N1Aw== 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=0egtVVfTMmKrQOnxNs4fOcJmVsBrZtzSGTcVwpwUzS0=; fh=/DmXmFEf5H4yMoXETWO4dsv/SeAJhpaj5Ol0ioZpBwo=; b=VwUNSSjFOfv2xFE1GwsqoTjpy8z1bWiF1WdhJiEr9HzbJpZJqUxqZSiNBlcSH3HtGb 1zf+y/G/d2o9sSEaADljNtOVdu/BZtS98dTNbGN+nOPtYKc2IbYD0Kkt+SEVKKGFelYn UDHLRyJsCzcKbiJleXS0LbuwMDiDorI0JyMsOVQD0QryVEf40k9CMj/vmfyX/ntxNto8 W3QPqaqSQ0jTY7VRNgw6zJM2UkdglEMZvW0Stnbr0rE8Z5YNbbBX7l/A3M3khWfgzqPE MD59icXAOUULxdQT4td4L4lWJGfSWMOH7/dCSgkbRQvrbvLOgkAujdaSZZXcKK5tUpKj ATqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=Vs3lrv+q; 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 q1-20020a056a00150100b006be322191desi10033882pfu.112.2023.11.15.01.53.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Nov 2023 01:53:05 -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=Vs3lrv+q; 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 AC73E813EA95; Wed, 15 Nov 2023 01:53:04 -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 S234833AbjKOJw4 (ORCPT + 28 others); Wed, 15 Nov 2023 04:52:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60560 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234866AbjKOJwo (ORCPT ); Wed, 15 Nov 2023 04:52:44 -0500 Received: from fllv0015.ext.ti.com (fllv0015.ext.ti.com [198.47.19.141]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B3AA418E; Wed, 15 Nov 2023 01:52:31 -0800 (PST) Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 3AF9qEi3100732; Wed, 15 Nov 2023 03:52:14 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1700041934; bh=0egtVVfTMmKrQOnxNs4fOcJmVsBrZtzSGTcVwpwUzS0=; h=From:Date:Subject:References:In-Reply-To:To:CC; b=Vs3lrv+qJiu7wZzRjCtJ/nKQQIpG1lfpVoJ0AGhGdr65Uu6YN30dM4cwbuxUKBVM+ ypgx7j3fhBYUeFWbPPgGxzitH0gcUuUa2qNIQi1Qai3rWNqZlZGK4IfYqoawxmZz68 +ugLiFsE5ElvaDLfwQvl69LxtuQat+uGZ99dqJEY= Received: from DFLE101.ent.ti.com (dfle101.ent.ti.com [10.64.6.22]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 3AF9qEZt101616 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 15 Nov 2023 03:52:14 -0600 Received: from DFLE110.ent.ti.com (10.64.6.31) 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; Wed, 15 Nov 2023 03:52:13 -0600 Received: from lelv0326.itg.ti.com (10.180.67.84) 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 via Frontend Transport; Wed, 15 Nov 2023 03:52:13 -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 3AF9qCQP009743; Wed, 15 Nov 2023 03:52:13 -0600 From: Jai Luthra Date: Wed, 15 Nov 2023 15:21:12 +0530 Subject: [PATCH 4/8] arm64: dts: ti: k3-am625-beagleplay: Add overlays for OV5640 MIME-Version: 1.0 Message-ID: <20231115-csi_dts-v1-4-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=5305; i=j-luthra@ti.com; h=from:subject:message-id; bh=qrgb8ErCemuQw6kO4MMScDp+qbZjHNTYyfKmJCDO+tY=; b=owEBbQKS/ZANAwAIAUPekfkkmnFFAcsmYgBlVJS71S0sZoUF0Zqgws5oCFaXuASw65z50x9In IYkU5mLKsOJAjMEAAEIAB0WIQRN4NgY5dV16NRar8VD3pH5JJpxRQUCZVSUuwAKCRBD3pH5JJpx RRlUD/9k7sSdh2NuqxLo6Rr16CxndXjTnFqbFI/Gt+TmPsra5SVhnsDBQpp9Do41IuZLrFLeljR f2HGpEtG2wZoUbqavAbSlShe1tRA7ureh1fTJe6grdLe8zS9mbLN7Ihwx9QYLQvyezcCuvMTeLF n+KKXTeWq9IzRtLmSN89xCkuNUx6NT/SXZNRAdDrFR/EEhEaxB/WVfP9rv/NfLVl8L5zw7XV7ly tw0kzyP6saSd2PkiOU1mKtnv1LgRCaZM7Kh7IVg2Hz9J1XsL5c6N+Sj0CfpoceagiA0nLb069R5 ZuDDbB+YFwv8tZ5p7586PxS8HzVBRyWImIydS8YJR+k0cL1xmU1AN9/VEijPrsCmu9oQdjzVcj9 0KQbJDqXBE4vBIRwDMaV9ncjQM7zlpNzH5kEh2u5bADCdqdW/e8ptafDNYexipTl43dJr0NLG4z 4tSC0xkS4UBOIA+SnER87vzYNq2qTPJLv82ve28YzVCaG8umbm5lMo7fPu9FdYzxQyK3ec9bVO+ frnR3nv5KDHb13XcLprIBTv/T1gcZVBhAlgKH5FYGSP48vH+/mm+m/pfAuxavZKXuF6oK47sg8y 92cKxL6uqpi4Nql02rbHBhvP4ZkL9qvCi4XRDAY2Fkf12LQKkwIhhNyHwaBeuYYjPi5cQoFzY4W CL2GDR1X2ci167w== 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]); Wed, 15 Nov 2023 01:53:04 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782623225428756591 X-GMAIL-MSGID: 1782623225428756591 Three different OV5640 modules are supported using the FFC connector on BeaglePlay: - 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. Signed-off-by: Jai Luthra --- arch/arm64/boot/dts/ti/Makefile | 7 ++ .../dts/ti/k3-am625-beagleplay-csi2-ov5640.dtso | 77 ++++++++++++++++++++++ .../ti/k3-am625-beagleplay-csi2-tevi-ov5640.dtso | 77 ++++++++++++++++++++++ 3 files changed, 161 insertions(+) diff --git a/arch/arm64/boot/dts/ti/Makefile b/arch/arm64/boot/dts/ti/Makefile index 77a347f9f47d..e49e32414560 100644 --- a/arch/arm64/boot/dts/ti/Makefile +++ b/arch/arm64/boot/dts/ti/Makefile @@ -9,9 +9,15 @@ # alphabetically. # Boards with AM62x SoC +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-hdmi-audio-dtbs := k3-am625-sk.dtb k3-am62x-sk-hdmi-audio.dtbo k3-am62-lp-sk-hdmi-audio-dtbs := k3-am62-lp-sk.dtb k3-am62x-sk-hdmi-audio.dtbo dtb-$(CONFIG_ARCH_K3) += k3-am625-beagleplay.dtb +dtb-$(CONFIG_ARCH_K3) += k3-am625-beagleplay-csi2-ov5640.dtb +dtb-$(CONFIG_ARCH_K3) += k3-am625-beagleplay-csi2-tevi-ov5640.dtb dtb-$(CONFIG_ARCH_K3) += k3-am625-phyboard-lyra-rdk.dtb dtb-$(CONFIG_ARCH_K3) += k3-am625-sk.dtb dtb-$(CONFIG_ARCH_K3) += k3-am625-verdin-nonwifi-dahlia.dtb @@ -81,6 +87,7 @@ dtb-$(CONFIG_ARCH_K3) += k3-am69-sk.dtb dtb-$(CONFIG_ARCH_K3) += k3-j784s4-evm.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-am6548-iot2050-advanced-m2 += -@ diff --git a/arch/arm64/boot/dts/ti/k3-am625-beagleplay-csi2-ov5640.dtso b/arch/arm64/boot/dts/ti/k3-am625-beagleplay-csi2-ov5640.dtso new file mode 100644 index 000000000000..5e80ca7033ba --- /dev/null +++ b/arch/arm64/boot/dts/ti/k3-am625-beagleplay-csi2-ov5640.dtso @@ -0,0 +1,77 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * ALINX AN5641 & Digilent PCam 5C - OV5640 camera module + * Copyright (C) 2022-2023 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_gpio0 { + p11-hog { + /* P11 - CSI2_CAMERA_GPIO1 */ + gpio-hog; + gpios = <11 GPIO_ACTIVE_HIGH>; + output-high; + line-name = "CSI2_CAMERA_GPIO1"; + }; +}; + +&wkup_i2c0 { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + ov5640: camera@3c { + compatible = "ovti,ov5640"; + reg = <0x3c>; + + clocks = <&clk_ov5640_fixed>; + clock-names = "xclk"; + + 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>; + }; + }; + }; +}; + +&dphy0 { + status = "okay"; +}; + +&ti_csi2rx0 { + status = "okay"; +}; diff --git a/arch/arm64/boot/dts/ti/k3-am625-beagleplay-csi2-tevi-ov5640.dtso b/arch/arm64/boot/dts/ti/k3-am625-beagleplay-csi2-tevi-ov5640.dtso new file mode 100644 index 000000000000..5e1cbbc27c8f --- /dev/null +++ b/arch/arm64/boot/dts/ti/k3-am625-beagleplay-csi2-tevi-ov5640.dtso @@ -0,0 +1,77 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Technexion TEVI-OV5640-*-RPI - OV5640 camera module + * Copyright (C) 2022-2023 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_gpio0 { + p11-hog { + /* P11 - CSI2_CAMERA_GPIO1 */ + gpio-hog; + gpios = <11 GPIO_ACTIVE_HIGH>; + output-high; + line-name = "CSI2_CAMERA_GPIO1"; + }; +}; + +&wkup_i2c0 { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + ov5640: camera@3c { + compatible = "ovti,ov5640"; + reg = <0x3c>; + + clocks = <&clk_ov5640_fixed>; + clock-names = "xclk"; + + 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>; + }; + }; + }; +}; + +&dphy0 { + status = "okay"; +}; + +&ti_csi2rx0 { + status = "okay"; +};