linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Luca Ceresoli <luca@lucaceresoli.net>
To: linux-media@vger.kernel.org
Cc: Luca Ceresoli <luca@lucaceresoli.net>,
	Kieran Bingham <kieran.bingham@ideasonboard.com>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	jacopo mondi <jacopo@jmondi.org>,
	Vladimir Zapolskiy <vz@mleia.com>,
	Wolfram Sang <wsa@the-dreams.de>, Peter Rosin <peda@axentia.se>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-i2c@vger.kernel.org
Subject: [RFC 3/4] media: dt-bindings: add DS90UB954-Q1 video deserializer
Date: Tue,  8 Jan 2019 23:39:52 +0100	[thread overview]
Message-ID: <20190108223953.9969-4-luca@lucaceresoli.net> (raw)
In-Reply-To: <20190108223953.9969-1-luca@lucaceresoli.net>

This is a first, tentative DT layout to describe a 2-input video
deserializer with I2C Address Translator and remote GPIOs.

NOTES / TODO:
 * This GPIOs representation is not realistic, it has been used only
   to test that thing work. It shall be rewritten properly.

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
---
 .../bindings/media/ti,ds90ub954-q1.txt        | 151 ++++++++++++++++++
 1 file changed, 151 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/media/ti,ds90ub954-q1.txt

diff --git a/Documentation/devicetree/bindings/media/ti,ds90ub954-q1.txt b/Documentation/devicetree/bindings/media/ti,ds90ub954-q1.txt
new file mode 100644
index 000000000000..3024ef2df100
--- /dev/null
+++ b/Documentation/devicetree/bindings/media/ti,ds90ub954-q1.txt
@@ -0,0 +1,151 @@
+Texas Instruments DS90UB954-Q1 dual video Deserializer
+======================================================
+
+Required properties:
+
+ - compatible: must be "ti,ds90ub954-q1"
+ - reg: I2C bus address of the chip (0x30..0xdd, based on strapping options)
+ - reset-gpios: chip reset GPIO, active low (connected to PDB pin of the chip)
+ - i2c-alias-pool: list of I2C addresses that are known to be available on the
+                   "local" (SoC-to-deser) I2C bus; they will be picked at
+		   runtime and used as aliases to reach remove I2C chips
+
+
+Required subnodes:
+ - ports: A ports node with one port child node per device input and output
+          port, in accordance with the video interface bindings defined in
+          Documentation/devicetree/bindings/media/video-interfaces.txt. The
+          port nodes are numbered as follows:
+
+          Port Description
+          -----------------------------
+          0    Input from FPD-Link 3 RX port 0
+          1    Input from FPD-Link 3 RX port 1
+          2    CSI-2 output
+ - gpios: *** this is a temporary test implementation, ignore it
+ - i2c-mux: contains one child per RX port, each generates an I2C adapter
+            representing the I2C bus on the remote side
+ - rxports: contains one child per RX port, each describes one FPD-Link 3 port
+            with these fields:
+	    - reg: the RX port index
+	    - ser-i2c-alias: the alias to access the remore serializer from
+	      the local bus
+	    - bc-gpio-map: maps backchannel GPIO numbers to local GPIO inputs
+	                   with pairs <fpd_gpio_number gpio_node>
+			   (TODO change when reimplementing the gpios subnode)
+
+
+Device node example
+-------------------
+
+&i2c0 {
+	deser@3d {
+		reg = <0x3d>;
+		compatible = "ti,ds90ub954-q1";
+		reset-gpios = <&gpio1 2 0>;
+
+		i2c-alias-pool = /bits/ 16 <0x20 0x21 0x22 0x23 0x24 0x25>;
+
+		ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			port@0 {
+				reg = <0>;
+				ds90ub954_fpd3_in0: endpoint {
+					remote-endpoint = <&remote_sensor_0_out>;
+				};
+			};
+
+			// TODO enable both ports (and s/1/2/g in th MIPI port below)
+			// port@1 {
+			// 	reg = <1>;
+			// 	ds90ub954_fpd3_in1: endpoint {
+			// 		remote-endpoint = <&remote_sensor_1_out>;
+			// 	};
+			// };
+
+			port@1 {
+				reg = <1>;
+				ds90ub954_mipi_out0: endpoint {
+					data-lanes = <1 2 3 4>;
+					remote-endpoint = <&csirx_0_in>;
+				};
+			};
+		};
+
+		gpios {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			// From sensor to CPU
+			gpio@0 {
+				reg = <0>;
+				output;
+				source = <0>; // RX port 0
+				function = <0>;
+			};
+
+			// CPU to sensor reset, active low
+			remote_sensor1_reset: gpio@1 {
+				reg = <1>;
+				input;
+			};
+		};
+
+		i2c-mux {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			remote_i2c0: i2c@0 {
+				reg = <0>;
+				#address-cells = <1>;
+				#size-cells = <0>;
+				clock-frequency = <400000>;
+			};
+
+			remote_i2c1: i2c@1 {
+				reg = <1>;
+				#address-cells = <1>;
+				#size-cells = <0>;
+				clock-frequency = <400000>;
+			};
+		};
+
+		rxports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			rxport@0 {
+				reg = <0>;
+				ser-i2c-alias = <0x3e>;
+
+				/* Map BC GPIO numbers to local GPIO inputs */
+				bc-gpio-map = <1 &remote_sensor1_reset>;
+			};
+
+			rxport@1 {
+				reg = <1>;
+				ser-i2c-alias = <0x3f>;
+			};
+		};
+	};
+};
+
+&remote_i2c0 {
+	remote_sensor0@1a {
+		reg = <0x1a>;
+		compatible = "sony,imx274";
+
+		#address-cells = <1>;
+		#size-cells = <0>;
+		reset-gpios = <&gpio1 4 0>;
+
+		port@0 {
+			reg = <0>;
+			remote_sensor_0_out: endpoint {
+				remote-endpoint = <&ds90ub954_fpd3_in0>;
+			};
+		};
+	};
+};
-- 
2.17.1


  parent reply	other threads:[~2019-01-08 23:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-08 22:39 [RFC 0/4] TI camera serdes - I2C address translation draft Luca Ceresoli
2019-01-08 22:39 ` [RFC 1/4] i2c: core: let adapters be notified of client attach/detach Luca Ceresoli
2019-01-08 22:39 ` [RFC 2/4] i2c: mux: notify client attach/detach, add ATR Luca Ceresoli
2019-01-08 22:39 ` Luca Ceresoli [this message]
2019-01-08 22:39 ` [RFC 4/4] media: ds90ub954: new driver for TI DS90UB954-Q1 video deserializer Luca Ceresoli
2019-05-21 17:40 ` [RFC 0/4] TI camera serdes - I2C address translation draft Mauro Carvalho Chehab
2019-05-22  7:38   ` Luca Ceresoli

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=20190108223953.9969-4-luca@lucaceresoli.net \
    --to=luca@lucaceresoli.net \
    --cc=devicetree@vger.kernel.org \
    --cc=jacopo@jmondi.org \
    --cc=kieran.bingham@ideasonboard.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mchehab@kernel.org \
    --cc=peda@axentia.se \
    --cc=robh+dt@kernel.org \
    --cc=vz@mleia.com \
    --cc=wsa@the-dreams.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).