All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
To: Jacopo Mondi <jacopo@jmondi.org>, linux-renesas-soc@vger.kernel.org
Subject: [RFC PATCH v6 06/13] arm64: dts: renesas: eagle: Provide Eagle FAKRA dynamic overlay
Date: Mon, 16 Dec 2019 10:29:23 +0000	[thread overview]
Message-ID: <20191216102930.5867-7-kieran.bingham+renesas@ideasonboard.com> (raw)
In-Reply-To: <20191216102930.5867-1-kieran.bingham+renesas@ideasonboard.com>

From: Kieran Bingham <kieran.bingham@ideasonboard.com>

This overlay currently supports either the RDACM20, or RDACM21 cameras
and can be included directly at the end of the Eagle-V3M dtb.

Ideally this would be an externally provided (and loaded) device tree
overlay (dto).

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>

---
v2:
 - Fix up SPDX header

v6:
 - Use new i2c-mux subnodes
 - Remove incorrect enable-gpio line
---
 arch/arm64/boot/dts/renesas/eagle-fakra.dtsi | 128 +++++++++++++++++++
 1 file changed, 128 insertions(+)
 create mode 100644 arch/arm64/boot/dts/renesas/eagle-fakra.dtsi

diff --git a/arch/arm64/boot/dts/renesas/eagle-fakra.dtsi b/arch/arm64/boot/dts/renesas/eagle-fakra.dtsi
new file mode 100644
index 000000000000..95acc535e230
--- /dev/null
+++ b/arch/arm64/boot/dts/renesas/eagle-fakra.dtsi
@@ -0,0 +1,128 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Device Tree Source (overlay) for the Eagle V3M FAKRA connectors
+ *
+ * Copyright (C) 2017 Ideas on Board <kieran.bingham@ideasonboard.com>
+ *
+ * This overlay allows you to define cameras connected to the FAKRA connectors
+ * on the Eagle-V3M (or compatible) board.
+ *
+ * Enable the cameras by specifying the camera compatible on the appropriate
+ * line. Comment out the defines to disconnect the camera from the DTB.
+ *
+ * The following cameras are currently supported:
+ *    "imi,rdacm20"
+ *    "imi,rdacm21"
+ */
+
+#include <dt-bindings/gpio/gpio.h>
+
+#define EAGLE_CAMERA0 "imi,rdacm20"
+#define EAGLE_CAMERA1 "imi,rdacm20"
+#define EAGLE_CAMERA2 "imi,rdacm20"
+#define EAGLE_CAMERA3 "imi,rdacm20"
+
+/* Define the endpoint links */
+#ifdef EAGLE_CAMERA0
+&max9286_in0 {
+	remote-endpoint = <&fakra_con0>;
+};
+#endif
+
+#ifdef EAGLE_CAMERA1
+&max9286_in1 {
+	remote-endpoint = <&fakra_con1>;
+};
+#endif
+
+#ifdef EAGLE_CAMERA2
+&max9286_in2 {
+	remote-endpoint = <&fakra_con2>;
+};
+#endif
+
+#ifdef EAGLE_CAMERA3
+&max9286_in3 {
+	remote-endpoint = <&fakra_con3>;
+};
+#endif
+
+/* Cameras are 'attached' to the GMSL I2C busses */
+&gmsl {
+
+#if defined(EAGLE_CAMERA0) || defined(EAGLE_CAMERA1) || \
+    defined(EAGLE_CAMERA2) || defined(EAGLE_CAMERA3)
+	status = "okay";
+
+#endif
+
+	i2c-mux {
+#ifdef EAGLE_CAMERA0
+		i2c@0 {
+			status = "okay";
+
+			camera@51 {
+				compatible = EAGLE_CAMERA0;
+				reg = <0x51 0x61>;
+
+				port {
+					fakra_con0: endpoint {
+						remote-endpoint = <&max9286_in0>;
+					};
+				};
+			};
+		};
+#endif
+
+#ifdef EAGLE_CAMERA1
+		i2c@1 {
+			status = "okay";
+
+			camera@52 {
+				compatible = EAGLE_CAMERA1;
+				reg = <0x52 0x62>;
+
+				port {
+					fakra_con1: endpoint {
+						remote-endpoint = <&max9286_in1>;
+					};
+				};
+			};
+		};
+#endif
+
+#ifdef EAGLE_CAMERA2
+		i2c@2 {
+			status = "okay";
+
+			camera@53 {
+				compatible = EAGLE_CAMERA2;
+				reg = <0x53 0x63>;
+
+				port {
+					fakra_con2: endpoint {
+						remote-endpoint = <&max9286_in2>;
+					};
+				};
+			};
+		};
+#endif
+
+#ifdef EAGLE_CAMERA3
+		i2c@3 {
+			status = "okay";
+
+			camera@54 {
+				compatible = EAGLE_CAMERA3;
+				reg = <0x54 0x64>;
+
+				port {
+					fakra_con3: endpoint {
+						remote-endpoint = <&max9286_in3>;
+					};
+				};
+			};
+		};
+#endif
+	};
+};
-- 
2.20.1


  parent reply	other threads:[~2019-12-16 10:29 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-11 12:44 [PATCH v6 0/2] MAX9286 GMSL Support Kieran Bingham
2019-12-11 12:44 ` [PATCH v6 1/2] dt-bindings: media: i2c: Add bindings for Maxim Integrated MAX9286 Kieran Bingham
2019-12-18 18:13   ` Rob Herring
2019-12-19 11:46     ` Kieran Bingham
2019-12-11 12:44 ` [PATCH v6 2/2] media: i2c: Add MAX9286 driver Kieran Bingham
2019-12-16 10:29 ` [RFC PATCH v6 00/13] GMSL Renesas Platform Support Kieran Bingham
2019-12-16 10:29   ` [RFC PATCH v6 01/13] media: i2c: max9286: Add GPIO chip controller Kieran Bingham
2019-12-16 10:29   ` [RFC PATCH v6 02/13] dt-bindings: media: i2c: Add bindings for IMI RDACM20 Kieran Bingham
2019-12-16 10:29   ` [RFC PATCH v6 03/13] media: i2c: Add RDACM20 driver Kieran Bingham
2019-12-16 10:29   ` [RFC PATCH v6 04/13] arm64: dts: renesas: eagle: enable VIN Kieran Bingham
2019-12-16 10:29   ` [RFC PATCH v6 05/13] arm64: dts: renesas: eagle: Provide MAX9286 GMSL deserialiser Kieran Bingham
2019-12-16 10:29   ` Kieran Bingham [this message]
2019-12-16 10:29   ` [RFC PATCH v6 07/13] arm64: dts: renesas: salvator-x: Add MAX9286 expansion board Kieran Bingham
2019-12-16 10:29   ` [RFC PATCH v6 08/13] arm64: dts: renesas: eagle: Include Eagle FAKRA overlay Kieran Bingham
2019-12-16 10:29   ` [RFC PATCH v6 09/13] arm64: dts: renesas: r8a7795-es1-salvator-x: Include MAX9286 8 Camera expansion board Kieran Bingham
2019-12-16 10:29   ` [RFC PATCH v6 10/13] media: i2c: max9286: Introduce a debugfs layer Kieran Bingham
2019-12-16 10:29   ` [RFC PATCH v6 11/13] [DNI:DEBUG] media: i2c: max9286: Add max9286_check_config_link() Kieran Bingham
2019-12-16 10:29   ` [RFC PATCH v6 12/13] media: i2c: max9286: [Workaround] Hard delay while waiting to enable the V3M cameras Kieran Bingham
2019-12-16 10:29   ` [RFC PATCH v6 13/13] media: i2c: max9286: [Workaround] 'device is bound' Kieran Bingham

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191216102930.5867-7-kieran.bingham+renesas@ideasonboard.com \
    --to=kieran.bingham+renesas@ideasonboard.com \
    --cc=jacopo@jmondi.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.