Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3531147pxf; Mon, 15 Mar 2021 11:37:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyZRQigFJ9GZ8UEIgETzL3iV2WCfsAL0lctV1yYDhpJxop0oU4iEAsxOnjD4px3DDI0OXwa X-Received: by 2002:a17:906:18a1:: with SMTP id c1mr9205691ejf.62.1615833463234; Mon, 15 Mar 2021 11:37:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615833463; cv=none; d=google.com; s=arc-20160816; b=XamUyQlUse5WNXldlj/DiMY79z9q17cM5yCHnJeH2zTWP1A+MYFYnzgA1eowsM0Acy EvAEDSyXyUfwsLfXyPLc2TfjJ3f3FiGBnWFFP1bgWSwVrU8z6O3CcKU2sxOY4EYaKsPg bNgEfZJHP1rbjOvt+gtUIzIzxO/dO780dQjLcoU5VZZ+wfugs3ngumOx2FCidkz/3b/J PsCBt/B90vrNiApZsXCq2zZW4NkWux6Iq42jlazzgp2+7k7tjkgy1yT8BrZ0+ZPxorP8 zcG8pWHkYA6MBDiX0vIvaSQv1GuBVt/uMjMXDTIVut9ThmyY8moOyTHvHUp9ocvUOV9Z MruA== 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=GtzPYvzcyi4iYQu67bdZug6AqZQVoD7bx5nL3XQHX7I=; b=SsMKtmBjbF4jQD6AH6gn8LqlwHnPXO02xU5q3LsXGJQJx4pygghDnwQOVueJZlOXZj 89tlWM5hoZwR1CYga4NbyJA/LG/rh3TSbC1osuEoHxF49teLZnBZjzR0k1WiWYKoo18q pph1zuCmJJ3LpNUwS5eZxviB2Z6btH2hGeWfKqdR9Am5wg2e6PHUshZq2sBCMA7zNIGz A71m0BhrUng/nbs+KXGapq36hyM2GEin3lbPBsHYLYcC8WQZ0GbYARWX7BJwTUP17m99 k+GVOCiRcBPeBlMrFZ/0kzCYN9b3y3Pj4Gj9XINMmvB4nvahny4lE2YVzjR2O2jOgZKR ppzg== 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 d17si991551edv.29.2021.03.15.11.37.21; Mon, 15 Mar 2021 11:37:43 -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 S232744AbhCOQbD (ORCPT + 99 others); Mon, 15 Mar 2021 12:31:03 -0400 Received: from relay1-d.mail.gandi.net ([217.70.183.193]:64737 "EHLO relay1-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231197AbhCOQaw (ORCPT ); Mon, 15 Mar 2021 12:30:52 -0400 X-Originating-IP: 79.22.58.175 Received: from uno.homenet.telecomitalia.it (host-79-22-58-175.retail.telecomitalia.it [79.22.58.175]) (Authenticated sender: jacopo@jmondi.org) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id DCB4E240012; Mon, 15 Mar 2021 16:30:48 +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 v2 3/4] arm64: dts: renesas: eagle: Add GMSL .dtsi Date: Mon, 15 Mar 2021 17:30:27 +0100 Message-Id: <20210315163028.173148-4-jacopo+renesas@jmondi.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210315163028.173148-1-jacopo+renesas@jmondi.org> References: <20210315163028.173148-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 | 186 ++++++++++++++++++++ 1 file changed, 186 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..ec3e7493aa71 --- /dev/null +++ b/arch/arm64/boot/dts/renesas/eagle-gmsl.dtsi @@ -0,0 +1,186 @@ +// 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: + * "imi,rdacm20" + * "imi,rdacm21" + */ + +#include + +/* + * Select which cameras are in use: + * #define EAGLE_CAMERA0_RDACM20 + * #define EAGLE_CAMERA0_RDACM21 + * + * The two camera modules are configured with different image formats + * and cannot be mixed. + */ +#define EAGLE_CAMERA0_RDACM20 +#define EAGLE_CAMERA1_RDACM20 +#define EAGLE_CAMERA2_RDACM20 +#define EAGLE_CAMERA3_RDACM20 + +/* Set the compatible string based on the camera model. */ +#if defined(EAGLE_CAMERA0_RDACM21) || defined(EAGLE_CAMERA1_RDACM21) || \ + defined(EAGLE_CAMERA2_RDACM21) || defined(EAGLE_CAMERA3_RDACM21) +#define EAGLE_CAMERA_MODEL "imi,rdacm21" +#define EAGLE_USE_RDACM21 +#elif defined(EAGLE_CAMERA0_RDACM20) || defined(EAGLE_CAMERA1_RDACM20) || \ + defined(EAGLE_CAMERA2_RDACM20) || defined(EAGLE_CAMERA3_RDACM20) +#define EAGLE_CAMERA_MODEL "imi,rdacm20" +#define EAGLE_USE_RDACM20 +#endif + +/* Define which cameras are available. */ +#if defined(EAGLE_CAMERA0_RDACM21) || defined(EAGLE_CAMERA0_RDACM20) +#define EAGLE_USE_CAMERA_0 +#endif + +#if defined(EAGLE_CAMERA1_RDACM21) || defined(EAGLE_CAMERA1_RDACM20) +#define EAGLE_USE_CAMERA_1 +#endif + +#if defined(EAGLE_CAMERA2_RDACM21) || defined(EAGLE_CAMERA2_RDACM20) +#define EAGLE_USE_CAMERA_2 +#endif + +#if defined(EAGLE_CAMERA3_RDACM21) || defined(EAGLE_CAMERA3_RDACM20) +#define EAGLE_USE_CAMERA_3 +#endif + +/* Define the endpoint links. */ +#ifdef EAGLE_USE_CAMERA_0 +&max9286_in0 { + remote-endpoint = <&fakra_con0>; +}; +#endif + +#ifdef EAGLE_USE_CAMERA_1 +&max9286_in1 { + remote-endpoint = <&fakra_con1>; +}; +#endif + +#ifdef EAGLE_USE_CAMERA_2 +&max9286_in2 { + remote-endpoint = <&fakra_con2>; +}; +#endif + +#ifdef EAGLE_USE_CAMERA_3 +&max9286_in3 { + remote-endpoint = <&fakra_con3>; +}; +#endif + +/* Populate the GMSL i2c-mux bus with camera nodes. */ +#if defined(EAGLE_USE_RDACM21) || defined(EAGLE_USE_RDACM20) + +#ifdef EAGLE_USE_CAMERA_0 +&vin0 { + status = "okay"; +}; +#endif + +#ifdef EAGLE_USE_CAMERA_1 +&vin1 { + status = "okay"; +}; +#endif + +#ifdef EAGLE_USE_CAMERA_2 +&vin2 { + status = "okay"; +}; +#endif + +#ifdef EAGLE_USE_CAMERA_3 +&vin3 { + status = "okay"; +}; +#endif + +&gmsl { + + status = "okay"; + maxim,reverse-channel-microvolt = <100000>; + + i2c-mux { +#ifdef EAGLE_USE_CAMERA_0 + i2c@0 { + status = "okay"; + + camera@51 { + compatible = EAGLE_CAMERA_MODEL; + reg = <0x51>, <0x61>; + + port { + fakra_con0: endpoint { + remote-endpoint = <&max9286_in0>; + }; + }; + }; + }; +#endif + +#ifdef EAGLE_USE_CAMERA_1 + i2c@1 { + status = "okay"; + + camera@52 { + compatible = EAGLE_CAMERA_MODEL; + reg = <0x52>, <0x62>; + + port { + fakra_con1: endpoint { + remote-endpoint = <&max9286_in1>; + }; + }; + }; + }; +#endif + +#ifdef EAGLE_USE_CAMERA_2 + i2c@2 { + status = "okay"; + + camera@53 { + compatible = EAGLE_CAMERA_MODEL; + reg = <0x53>, <0x63>; + + port { + fakra_con2: endpoint { + remote-endpoint = <&max9286_in2>; + }; + }; + }; + }; +#endif + +#ifdef EAGLE_USE_CAMERA_3 + i2c@3 { + status = "okay"; + + camera@54 { + compatible = EAGLE_CAMERA_MODEL; + reg = <0x54>, <0x64>; + + port { + fakra_con3: endpoint { + remote-endpoint = <&max9286_in3>; + }; + }; + }; + }; +#endif + }; +}; +#endif -- 2.30.0