Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2703237pxb; Mon, 19 Apr 2021 11:41:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxylH/kVwwTrKEo3ERPNC4sHekh6iZSgb06QmnANimRyLaN9VoRfh8x6Kbzht6gowv7B9nY X-Received: by 2002:a17:906:9a81:: with SMTP id ag1mr23291680ejc.464.1618857665850; Mon, 19 Apr 2021 11:41:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618857665; cv=none; d=google.com; s=arc-20160816; b=UZaOdti3i337jGpv3Vml7Vn+GwP+04vSqoY2ZwzqKDQ+TV3jBTJTcwdKdug8QXljmu +lEYNBIJMHQC+D7U2rDNQKicS45pTqYilS2l1e9c2HPdU7pF+KJ0QmQvOH8C23mv7uIJ gxfq5daNorAQsqHAYlCkbpjtkdKhdWIm1ce0vuUwcZfZrOFULIpX6lCZtMgEm4pdesEJ SmveQ2xTHBlqXh565qqIwj9cIqMh0rcUmc7kaImAFn93w+YrQmQzEfZ88cW1xUtzIHJ0 Lqg9u/xf3biZhr6lHtxBU106fRYAFxigQmZpQAX+olZCIQAmMoOm7hU6436lCJV6928n qKRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=mvq8FfrnWSdNUJbhYKMohUa9N7NIRojoo8B+96LW9Bo=; b=p0I/47BFtiHT9B1u7o/L6BuXTYR6NYGKSnguytgm8Ft9XQrvW91akFZQ4+FIZhJ2a+ TpvK4Tdb0w6UL48+jYCb9TEMbdUbGyMcp+ZwcHf1jFe2NNN+Igiiq66J5OPsOvjb3tME DR/tDdndzSn47KrWc5+gNTjsLtvyUNMNIBPG5wjLq/YWpaOq6RR/vfvoM96L/trZarSF VVsBjjAL0mwlKNkqlhz6pUmTBXDX89Vi1p5w9sv+r0FwIHcHM6ZQZ0+4OyUObU/DdTeJ NVzPZnN8U7i8TRjT21GAFun0p7ZN6wLiM+8YmVSQo9SjkrtK3brgW4mTA3PVW1NKRz5j lHZw== ARC-Authentication-Results: i=1; mx.google.com; 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 q7si12197703edd.228.2021.04.19.11.40.42; Mon, 19 Apr 2021 11:41:05 -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; 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 S239633AbhDSOYX (ORCPT + 99 others); Mon, 19 Apr 2021 10:24:23 -0400 Received: from relay2-d.mail.gandi.net ([217.70.183.194]:42791 "EHLO relay2-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239579AbhDSOXz (ORCPT ); Mon, 19 Apr 2021 10:23:55 -0400 X-Originating-IP: 93.34.118.233 Received: from uno.lan (93-34-118-233.ip49.fastwebnet.it [93.34.118.233]) (Authenticated sender: jacopo@jmondi.org) by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id 1B9D44000E; Mon, 19 Apr 2021 14:23:22 +0000 (UTC) From: Jacopo Mondi To: Geert Uytterhoeven , Magnus Damm , Laurent Pinchart , Kieran Bingham , Rob Herring Cc: Jacopo Mondi , linux-renesas-soc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v5 6/7] arm64: dts: renesas: eagle: Add GMSL .dtsi Date: Mon, 19 Apr 2021 16:23:44 +0200 Message-Id: <20210419142345.53152-7-jacopo+renesas@jmondi.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210419142345.53152-1-jacopo+renesas@jmondi.org> References: <20210419142345.53152-1-jacopo+renesas@jmondi.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 + +#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 + }; +}; -- 2.31.1