From patchwork Fri Nov 17 09:28:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jai Luthra X-Patchwork-Id: 166033 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9910:0:b0:403:3b70:6f57 with SMTP id i16csp406295vqn; Fri, 17 Nov 2023 01:31:49 -0800 (PST) X-Google-Smtp-Source: AGHT+IFXbrnFg74X56PI9Ung2fkwAcwxWLUTt8t/xkXLurihh6W4dMc2ePjIMrQnG+KUf2mueL+0 X-Received: by 2002:a17:903:1108:b0:1cc:50f6:7fc1 with SMTP id n8-20020a170903110800b001cc50f67fc1mr12825095plh.56.1700213509194; Fri, 17 Nov 2023 01:31:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700213509; cv=none; d=google.com; s=arc-20160816; b=0qy9ru9FUkSby1Z6DeWeehwp/dXgnXrRTzR5txfLp7TdLQqB3PrehQocJySWPT6X5i K/LAZ//laQUffQkZGRi/JLXOldvnTkaCDUX1H/Rut3tKipo+VmfTcOOhUTdlvuGtVJZ4 KrK2FdpXSq8bnD17L08r+D/nECm4kvoREp2np3pLOqYP5cSVXbk9qcj/owLTGxndnlfS pQ2HYX89AMlJEVcUS96oZmtLeCIf2nPe3PKkY0B0+pve/pHe31eS+SZs910CVuuPjCAB idWodkTAda8baxM7UlFmT4+VCYcaqnVilgNXKHvJSkGbPVrP5Qep5l0+xsgiC9mld/4q NGmg== 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=6yu9FgSk5G531XV23fSb7BMi9z4z4ZTSbSGgn0oAhwQ=; fh=gjf50MpIeI4y7DsLDR8KPyZZDZn0L+YVyMCrolRSpx0=; b=pZw1i+EAI8QVOoNfc2KJp8ldpUMA0v+hn3JWJbCHh5SruZe4SMxhkMTtFKOHTPxY5x B+/g14lMtHvMANsEnyjIs3EUSGpPwBBJTtBEpQXzAA6EL8NTXJ0er4EwYOSZpCD5nGQc /X2KofsFQbeSAU7JXcamR+/PzRmbYxYejgelJnecA0SVW9S11XcbY5qQzLXt1ffwZrbs FyjZzzq9Ok/Z3GQGX+5ezzeUUtycwlWEP0AXmUS2+GBs4+aVfjiH2CokhkAW3I8ZsiYH DQBacJXP+MNiyFhsIG18tHH0jkp9VXB5iGD+4Ob0stThYDBjrLYQW6SZTtbpvH+aFOtv c0sg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=iGiyeiaj; 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 x11-20020a170902b40b00b001cc16aa4981si1415718plr.39.2023.11.17.01.31.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Nov 2023 01:31:49 -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=iGiyeiaj; 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 6A9538090FB4; Fri, 17 Nov 2023 01:30:52 -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 S1345753AbjKQJag (ORCPT + 30 others); Fri, 17 Nov 2023 04:30:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45242 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345756AbjKQJaI (ORCPT ); Fri, 17 Nov 2023 04:30:08 -0500 Received: from fllv0015.ext.ti.com (fllv0015.ext.ti.com [198.47.19.141]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EFBAB10D5; Fri, 17 Nov 2023 01:30:03 -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 3AH9Tfdi058802; Fri, 17 Nov 2023 03:29:41 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1700213381; bh=6yu9FgSk5G531XV23fSb7BMi9z4z4ZTSbSGgn0oAhwQ=; h=From:Date:Subject:References:In-Reply-To:To:CC; b=iGiyeiajABe9pu0npjMLIAKm1OYIdmEHqawkkw3yeiWiE3c2QRAGqT8An7W/2RiLS 01XzPrZtwwod4mw0WFdU4YvQ/GIJnr7zpJQLN2awhkEDQdxScHePVfnYm9/7Efjfoh ORVOzbt0LizVXrntf/omJP1gCTtYEiCP3LHK6PC0= Received: from DLEE110.ent.ti.com (dlee110.ent.ti.com [157.170.170.21]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 3AH9Tfgb079505 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 17 Nov 2023 03:29:41 -0600 Received: from DLEE109.ent.ti.com (157.170.170.41) by DLEE110.ent.ti.com (157.170.170.21) 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:41 -0600 Received: from fllv0040.itg.ti.com (10.64.41.20) by DLEE109.ent.ti.com (157.170.170.41) 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:41 -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 3AH9Teom125344; Fri, 17 Nov 2023 03:29:40 -0600 From: Jai Luthra Date: Fri, 17 Nov 2023 14:58:14 +0530 Subject: [PATCH v2 6/9] arm64: dts: ti: k3-am62x: Add overlays for OV5640 MIME-Version: 1.0 Message-ID: <20231117-csi_dts-v2-6-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=6127; i=j-luthra@ti.com; h=from:subject:message-id; bh=qununk8hdzdLtwkyZowaid7gFVw8TK/X3B+ByuZ/0ow=; b=owEBbQKS/ZANAwAIAUPekfkkmnFFAcsmYgBlVzJw6cCnjOgzxwiql/NKu4ohliw9sbESD1x4p mUX7zzSbZ2JAjMEAAEIAB0WIQRN4NgY5dV16NRar8VD3pH5JJpxRQUCZVcycAAKCRBD3pH5JJpx RQ8UD/0aipRRZnKwwwGOE17phrwhLN3xMLFE3UtI0+VTU+jjlhfVd/Ujc287duPjpkncYxp0b8M djd6DytVWZxi5gYK7Z+TdId5lG/9UU6tpko4CNjqGtiK7lkkV3O4PZFSgu7R3eL11wx13RxXBg8 lZWgokGOqiSkKJFAkhTgl1zUOR9K8T6tIxdS64dEPuC6bFH2dMsvTN76h6E1lcFgMYNzDwao8rc yw2jp7k2saDnbTsgmYN0tCTtr9RtIUi7T6v+mMViEzs3x/fenoNB0f53syuqz3VQokcFXiNViDB wzVg6pDDcDAkXkU+5fVsy9WID/uanOZm/3TL7cd9KnWSxKjSOUP8XYPxy1Y+wFLbkq1mnYm1PK9 kp1aTYSxL1nHJAS36rHjnPuOFk9ZvKASzGbjcEbFmgOFcH7uQimD4Ytkbd9KfSa1kcX6hjIsped En3MfOxqBRfkQozO7eUv/U9546/3b098Vua1f7N3JeIg5jbb/+UdNChKER4oZCi0uzE2SMsObCH bB9TgPeNQVm+/zRLR07VKyOcYxET0ragzEQovxinwjfmxOH3HEeSBQaCGbmDVe296dOGxIwsPEH CLmW1VFBwHUT6hyUw3FNivisqp2PN1YBePAUiXmrklq5zsyJ5SReVagfRqJpn+eBTDwagyepGQv TclHnGbukHwxCCQ== 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, URIBL_BLOCKED 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]); Fri, 17 Nov 2023 01:30:52 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782803080991677570 X-GMAIL-MSGID: 1782803080991677570 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 | 74 ++++++++++++++++++++++ .../boot/dts/ti/k3-am62x-sk-csi2-tevi-ov5640.dtso | 74 ++++++++++++++++++++++ 3 files changed, 166 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..790340673094 --- /dev/null +++ b/arch/arm64/boot/dts/ti/k3-am62x-sk-csi2-ov5640.dtso @@ -0,0 +1,74 @@ +// 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>; + }; + }; + }; +}; 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..d7772767f49d --- /dev/null +++ b/arch/arm64/boot/dts/ti/k3-am62x-sk-csi2-tevi-ov5640.dtso @@ -0,0 +1,74 @@ +// 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>; + }; + }; + }; +};