From patchwork Fri Jan 22 11:34:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 12039059 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 94724C433DB for ; Fri, 22 Jan 2021 11:36:09 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4E9BA235E4 for ; Fri, 22 Jan 2021 11:36:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4E9BA235E4 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=glider.be Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=kBXKazhnW2ixpiuThJdH2wqJuJg50Ge6airlxXlOXFU=; b=ZpIOVjb9TmmlcxvqGHtT1a/un ivN1QNrQexFCS9cKNygt3LwPl+ZRzemKD4dUCs7qIh9S9IkJfT+/aDMc84eM4za0gnuuJHFQghGaA ivFyHySJc7GNmEN+xemtSKHk9YsdLDO25xGv23JLSmgTVcoqj0HzEmgg9WkOcb+WniWX9ZvYKu8JI ASRafSV4eLkmfUm/4vFz8v1GA97myU2YPcQNIPEa3lbbzx0MZI5+2oIM61ezdJLCib/+77hfb6T1X 3ao64X+sEuTJZzjGCokQeTtXRJv/Sw/LkSbhNTWGgFJYGlPuoI93ZpQWMtNKZSiHgLyYAF24zGmbp omyba8Q1g==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l2ui9-0000S8-UJ; Fri, 22 Jan 2021 11:34:41 +0000 Received: from baptiste.telenet-ops.be ([2a02:1800:120:4::f00:13]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l2ui4-0000RE-Qt for linux-arm-kernel@lists.infradead.org; Fri, 22 Jan 2021 11:34:38 +0000 Received: from ramsan.of.borg ([84.195.186.194]) by baptiste.telenet-ops.be with bizsmtp id KnaV2400D4C55Sk01naV3W; Fri, 22 Jan 2021 12:34:32 +0100 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1l2uhw-005lFc-Qj; Fri, 22 Jan 2021 12:34:28 +0100 Received: from geert by rox.of.borg with local (Exim 4.93) (envelope-from ) id 1l2uhw-00Bt2Y-7W; Fri, 22 Jan 2021 12:34:28 +0100 From: Geert Uytterhoeven To: Prabhakar , Magnus Damm , Rob Herring Subject: [PATCH v5 2/2] ARM: dts: r8a7742-iwg21d-q7-dbcm-ca: Add support for 8-bit ov7725 sensors Date: Fri, 22 Jan 2021 12:34:24 +0100 Message-Id: <20210122113424.2833127-3-geert+renesas@glider.be> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210122113424.2833127-1-geert+renesas@glider.be> References: <20210122113424.2833127-1-geert+renesas@glider.be> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210122_063436_995999_541B3061 X-CRM114-Status: GOOD ( 16.21 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Jacopo Mondi , Geert Uytterhoeven , Lad Prabhakar , linux-renesas-soc@vger.kernel.org, Biju Das , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Lad Prabhakar The 8-bit ov7725 sensors can also be connected to the camera daughter board. This patch creates a separate dtsi file to describe an ov7725 sensor, and includes it multiple times in r8a7742-iwg21d-q7-dbcm-ca.dts. The user can (un)comment #include statements depending on the cameras connected. Signed-off-by: Lad Prabhakar Reviewed-by: Biju Das [geert: describe a single camera in the .dtsi, include multiple times] Signed-off-by: Geert Uytterhoeven Reviewed-by: Lad Prabhakar --- v5: - Enable parent i2c bus when needed, v4: - Describe a single camera in the .dtsi file, - Include the .dtsi multiple times. --- .../boot/dts/r8a7742-iwg21d-q7-dbcm-ca.dts | 6 +++- .../r8a7742-iwg21d-q7-dbcm-ov7725-single.dtsi | 29 +++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ov7725-single.dtsi diff --git a/arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ca.dts b/arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ca.dts index bc8280b2ac47e3ec..2bcb229844abc5c2 100644 --- a/arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ca.dts +++ b/arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ca.dts @@ -198,7 +198,7 @@ &scifb1 { /* * Below configuration ties VINx endpoints to ov5640/ov7725 camera endpoints * - * Uncomment the #include statements to change configuration + * (un)comment the #include statements to change configuration */ /* 8bit CMOS Camera 1 (J13) */ @@ -208,6 +208,7 @@ &scifb1 { #define VIN_EP vin0ep #undef CAM_ENABLED #include "r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi" +//#include "r8a7742-iwg21d-q7-dbcm-ov7725-single.dtsi" #ifdef CAM_ENABLED &vin0 { @@ -241,6 +242,7 @@ vin0ep: endpoint { #define VIN_EP vin1ep #undef CAM_ENABLED #include "r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi" +//#include "r8a7742-iwg21d-q7-dbcm-ov7725-single.dtsi" #ifdef CAM_ENABLED &vin1 { @@ -272,6 +274,7 @@ vin1ep: endpoint { #define VIN_EP vin2ep #undef CAM_ENABLED #include "r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi" +//#include "r8a7742-iwg21d-q7-dbcm-ov7725-single.dtsi" #ifdef CAM_ENABLED &vin2 { @@ -302,6 +305,7 @@ vin2ep: endpoint { #define VIN_EP vin3ep #undef CAM_ENABLED #include "r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi" +//#include "r8a7742-iwg21d-q7-dbcm-ov7725-single.dtsi" #ifdef CAM_ENABLED &vin3 { diff --git a/arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ov7725-single.dtsi b/arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ov7725-single.dtsi new file mode 100644 index 0000000000000000..f5e77f0242516720 --- /dev/null +++ b/arch/arm/boot/dts/r8a7742-iwg21d-q7-dbcm-ov7725-single.dtsi @@ -0,0 +1,29 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * This include file ties a VIN interface with a single ov7725 sensor on + * the iWave-RZ/G1H Qseven board development platform connected with the + * camera daughter board. + * + * Copyright (C) 2020 Renesas Electronics Corp. + */ + +#define CAM_ENABLED 1 + +&CAM_PARENT_I2C { + status = "okay"; + + ov7725@21 { + compatible = "ovti,ov7725"; + reg = <0x21>; + clocks = <&MCLK_CAM>; + status = "okay"; + + port { + CAM_EP: endpoint { + bus-width = <8>; + bus-type = <6>; + remote-endpoint = <&VIN_EP>; + }; + }; + }; +};