Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp40033pxj; Wed, 16 Jun 2021 19:41:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxmjX0NoY4jkf1B6Y3qrIV0PTVTjS+p4JRXCrwWFFSE/hxHN47mbvjlBELB1LEozUVHcmot X-Received: by 2002:a92:c748:: with SMTP id y8mr1757997ilp.41.1623897712507; Wed, 16 Jun 2021 19:41:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623897712; cv=none; d=google.com; s=arc-20160816; b=oQ9QFMmGxQCoXabmQ99qRGjHSZFjeQqXOcrCHrr2EWgXi/y9Suumr93CDu5eQO+QNz 9Ru537qvuKoWaDpq5BNcldTCkXXvdNFw60+YsKABXyhAnb2BPZVpt44tCjhegTPz3Di4 U5avRJ4fH33r7SukljbPK+vQ8ya/wqyVUmA5ihF07QOvCA5ewOow9SOESrl/4m+ZiioK qo36RHinXRDhd0zz2Qy/vzxMY0rEzfsroMRBScv0FvZ4ffMQ6pdjBYGqX5ymkH/tb//E g+O6DpXSiAO6zYIcyxDd610LM7xhH+oudz8lQsvIEiYFjy3nnxpqAskita4RYGtUbG0o 45vg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=8LfGmBwPQ/Ov5pnKHibue1mvtNvnasgElZrbXaDj01Q=; b=CdIsXkrQiojJEXea8iksHjg5y7Zw4Dz7MZAhoygBViS99QhgmnC2RNZfyZ/HGM6ZEJ l74AYjredDBbbfC4Tu8mfjMvMBmnzXwciFj9KaBzIVEJE3qX4vJ/nGpdRppCPN8uokBB dlOJHaegJj1DBdW9xxNcqX49iQHysd/KI9VHcOag1dkx3sNbrfGvX4eoVMsTEfJx9MUc vgLxyxcn0CcO0IzxNUPwPsj5NGVn365wha1fgzgHzjFIpHcrEkfFJBlEBKTb6war0aM8 P2GbrUm4XBKxFbo/wHRGVyXrkvn/n341OewSX9FYmVo81EjLTYUe0h6uf/lIA6jrNbS4 31Pg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b="v9lJ/R6i"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g7si4308329jaq.75.2021.06.16.19.41.40; Wed, 16 Jun 2021 19:41:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b="v9lJ/R6i"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234669AbhFQAcf (ORCPT + 99 others); Wed, 16 Jun 2021 20:32:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46510 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231322AbhFQAce (ORCPT ); Wed, 16 Jun 2021 20:32:34 -0400 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 91EBCC061574; Wed, 16 Jun 2021 17:30:27 -0700 (PDT) Received: from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 10257E53; Thu, 17 Jun 2021 02:30:26 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1623889826; bh=JBDmNnImH82BqV+2ZChPRpqr7p0yLYXLmBnOswUqrwo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=v9lJ/R6if8PMlIj3BcExEbbI4OiRFQt96oudUfepQyJ6uQ3qp1so6mMZAj2eztCTk z6Hx8GW84GS86U4LWp3dl0VFHu0pGwI9yRLLmNijX74V7trZCaUq3/rGZdMiukvJAU /dA4LuyQ51huvBBvE8dnvV6W1GQI893MX9D46Cdo= Date: Thu, 17 Jun 2021 03:30:05 +0300 From: Laurent Pinchart To: Jacopo Mondi Cc: Geert Uytterhoeven , Magnus Damm , Kieran Bingham , Rob Herring , linux-renesas-soc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v5 6/7] arm64: dts: renesas: eagle: Add GMSL .dtsi Message-ID: References: <20210419142345.53152-1-jacopo+renesas@jmondi.org> <20210419142345.53152-7-jacopo+renesas@jmondi.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20210419142345.53152-7-jacopo+renesas@jmondi.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jacopo and Kieran, Thank you for the patch. On Mon, Apr 19, 2021 at 04:23:44PM +0200, Jacopo Mondi wrote: > From: Kieran Bingham > > Describe the FAKRA connector available on Eagle board that allows > connecting GMSL camera modules such as IMI RDACM20 and RDACM21. > > Signed-off-by: Kieran Bingham > Signed-off-by: Jacopo Mondi > --- > arch/arm64/boot/dts/renesas/eagle-gmsl.dtsi | 178 ++++++++++++++++++++ > 1 file changed, 178 insertions(+) > create mode 100644 arch/arm64/boot/dts/renesas/eagle-gmsl.dtsi > > diff --git a/arch/arm64/boot/dts/renesas/eagle-gmsl.dtsi b/arch/arm64/boot/dts/renesas/eagle-gmsl.dtsi > new file mode 100644 > index 000000000000..d2e48dc3e820 > --- /dev/null > +++ b/arch/arm64/boot/dts/renesas/eagle-gmsl.dtsi > @@ -0,0 +1,178 @@ > +// SPDX-License-Identifier: GPL-2.0+ > +/* > + * Device Tree Source (overlay) for the Eagle V3M GMSL connectors > + * > + * Copyright (C) 2017 Ideas on Board > + * Copyright (C) 2021 Jacopo Mondi > + * > + * This overlay allows you to define GMSL cameras connected to the FAKRA > + * connectors on the Eagle-V3M (or compatible) board. > + * > + * The following cameras are currently supported: RDACM20 and RDACM21. > + * > + * The board .dts files that include this select which cameras are in use > + * by specifying the camera model with: > + * > + * #define GMSL_CAMERA_RDACM20 > + * or > + * #define GMSL_CAMERA_RDACM21 > + * > + * And which cameras are connected to the board by defining: > + * #define GMSL_CAMERA_0 > + * #define GMSL_CAMERA_1 > + * #define GMSL_CAMERA_2 > + * #define GMSL_CAMERA_3 > + */ > + > +#include > + > +/* Validate the board file settings. */ > +#if !defined(GMSL_CAMERA_RDACM20) && !defined(GMSL_CAMERA_RDACM21) > +#error "Camera model should be defined by the board file" > +#endif > + > +#if defined(GMSL_CAMERA_RDACM20) && defined(GMSL_CAMERA_RDACM21) > +#error "A single camera model should be selected" > +#endif This won't scale when we'll support more than two different cameras, but we'll switch to overlays then :-) Reviewed-by: Laurent Pinchart > + > +#if !defined(GMSL_CAMERA_0) && !defined(GMSL_CAMERA_1) && \ > + !defined(GMSL_CAMERA_2) && !defined(GMSL_CAMERA_3) > +#error "At least one camera should be selected" > +#endif > + > +#if defined(GMSL_CAMERA_RDACM20) > +#define GMSL_CAMERA_MODEL "imi,rdacm20" > +#elif defined(GMSL_CAMERA_RDACM21) > +#define GMSL_CAMERA_MODEL "imi,rdacm21" > +#endif > + > +&vin0 { > + status = "okay"; > +}; > + > +&vin1 { > + status = "okay"; > +}; > + > +&vin2 { > + status = "okay"; > +}; > + > +&vin3 { > + status = "okay"; > +}; > + > +&gmsl { > + status = "okay"; > + > +#if defined(GMSL_CAMERA_RDACM21) > + maxim,reverse-channel-microvolt = <100000>; > +#endif > + > + ports { > +#ifdef GMSL_CAMERA_0 > + port@0 { > + max9286_in0: endpoint { > + remote-endpoint = <&fakra_con0>; > + }; > + }; > +#endif > + > +#ifdef GMSL_CAMERA_1 > + port@1 { > + max9286_in1: endpoint{ > + remote-endpoint = <&fakra_con1>; > + }; > + > + }; > +#endif > + > +#ifdef GMSL_CAMERA_2 > + port@2 { > + max9286_in2: endpoint { > + remote-endpoint = <&fakra_con2>; > + }; > + > + }; > +#endif > + > +#ifdef GMSL_CAMERA_3 > + port@3 { > + max9286_in3: endpoint { > + remote-endpoint = <&fakra_con3>; > + }; > + > + }; > +#endif > + }; > + > + i2c-mux { > +#ifdef GMSL_CAMERA_0 > + i2c@0 { > + status = "okay"; > + > + camera@51 { > + compatible = GMSL_CAMERA_MODEL; > + reg = <0x51>, <0x61>; > + > + port { > + fakra_con0: endpoint { > + remote-endpoint = <&max9286_in0>; > + }; > + }; > + }; > + }; > +#endif > + > +#ifdef GMSL_CAMERA_1 > + i2c@1 { > + status = "okay"; > + > + camera@52 { > + compatible = GMSL_CAMERA_MODEL; > + reg = <0x52>, <0x62>; > + > + port { > + fakra_con1: endpoint { > + remote-endpoint = <&max9286_in1>; > + }; > + }; > + }; > + }; > +#endif > + > +#ifdef GMSL_CAMERA_2 > + i2c@2 { > + status = "okay"; > + > + camera@53 { > + compatible = GMSL_CAMERA_MODEL; > + reg = <0x53>, <0x63>; > + > + port { > + fakra_con2: endpoint { > + remote-endpoint = <&max9286_in2>; > + }; > + }; > + }; > + }; > +#endif > + > +#ifdef GMSL_CAMERA_3 > + i2c@3 { > + status = "okay"; > + > + camera@54 { > + compatible = GMSL_CAMERA_MODEL; > + reg = <0x54>, <0x64>; > + > + port { > + fakra_con3: endpoint { > + remote-endpoint = <&max9286_in3>; > + }; > + }; > + }; > + }; > +#endif > + }; > +}; -- Regards, Laurent Pinchart