All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Archit Taneja <architt@codeaurora.org>
Cc: Eric Anholt <eric@anholt.net>, Rob Herring <robh+dt@kernel.org>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	Thierry Reding <thierry.reding@gmail.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Andrzej Hajda <a.hajda@samsung.com>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/4] dt-bindings: Document the Raspberry Pi Touchscreen nodes.
Date: Fri, 19 May 2017 12:32:27 +0300	[thread overview]
Message-ID: <21080088.MT6ayIGAs6@avalon> (raw)
In-Reply-To: <c01609b7-d2d6-8ed1-5f51-4b910ba8bef0@codeaurora.org>

Hi Archit,

On Friday 19 May 2017 14:24:36 Archit Taneja wrote:
> On 05/18/2017 08:25 PM, Laurent Pinchart wrote:
> > On Thursday 18 May 2017 13:56:19 Archit Taneja wrote:
> >> On 05/17/2017 12:16 AM, Eric Anholt wrote:
> >
> > [snip]
> > 
> >>> In terms of physical connections:
> >>>    [15-pin "DSI" connector on 2835]
> >>>     | I2C               | DSI
> >>>    / \        SPI       |
> >>> [TS]  [Atmel]------[TC358762]
> >>>        \                |
> >>>         \PWM            |
> >>>          \              | DPI
> >>> 
> >>> [some backlight]------[some unknown panel]
> >>> 
> >>> The binding I'm trying to create is to expose what's necessary for a
> >>> driver that talks I2C to the Atmel, which then controls the PWM and does
> >>> the command sequence over SPI to the Toshiba that sets up its end of the
> >>> DSI link.
> >> 
> >> The bridge (Atmel + TC358762 combination) here looks like it's primarily
> >> an i2c device (i.e, the control bus is i2c). Therefore, the drm-bridge
> >> driver here should be an i2c driver instead of a mipi_dsi_driver.
> > 
> > Glad to see we agree, that's what I've proposed in a separate answer :-)
> > I'd go one step further though, there should be no DRM bridge, just a DRM
> > panel.
>
> If the PCB containing the controller chips and the panel are part of a
> single casing, and the set up won't work with another panel, then yeah, I
> agree. If the bridge chips are on a separate adapter board, and there is a
> possibility to connect other panels, then maybe a separate DRM bridge and a
> DRM panel might be a safer bet.

I thought it was a single black box, but upon closer inspection there's a 
separate PCB with the Microcontroller and TC358762.

Eric, do you know if it's possible to exchange the panel for another one (and 
not just an model with identical features from another vendor, but another 
panel with a different mode for instance) without reprogramming the 
microcontroller, or is the bridge board tied to the panel model ?

> >> We have the facility to create a mipi DSI device without the need to have
> >> a corresponding node in DT. The ADV7533 and TC358767 drivers are examples
> >> of that.
> >> 
> >> The following is what the binding could look like, it's same as what Rob
> >> also mentioned previously in the thread.
> >> 
> >> Thanks,
> >> Archit
> >> 
> >> dsi1: dsi@7e700000 {
> >> 
> >> 	#address-cells = <1>;
> >> 	#size-cells = <0>;
> >> 	<...>
> >> 	
> >> 	/* The SoC's DSI input/output port */
> >> 	ports {
> >> 		#address-cells = <1>;
> >> 		#size-cells = <0>;
> >> 		
> >> 		/* port@0 if needed */
> >> 		port@1 {
> >> 			dsi_out_port: endpoint {
> >> 				reg = <1>;
> >> 				remote-endpoint = <&bridge_dsi_port>;
> >> 			};
> >> 		};
> >> 	};
> >> };
> >> 
> >> i2c_dsi: i2c {
> >> 	compatible = "i2c-gpio";
> >> 	#address-cells = <1>;
> >> 	#size-cells = <0>;
> >> 	gpios = <&gpio 28 0
> >> 		 &gpio 29 0>;
> >> 	
> >> 	/* the Atmel + TC35872 bridge */
> >> 	pitouchscreen_bridge: bridge@45 {
> > 
> > This should thus be lcd@45.
> > 
> >> 		compatible = "raspberrypi,touchscreen-bridge";
> > 
> > And this raspberrypi,7inch-touchscreen-panel. Shame we haven't
> > standardized
> > the vendor name prefix to rpi :-/
> > 
> >> 		reg = <0x45>;
> >> 		
> >> 		ports {
> >> 			#address-cells = <1>;
> >> 			#size-cells = <0>;
> >> 			port@0 {
> >> 				reg = <0>;
> >> 				bridge_dsi_port: endpoint {
> > 
> > This should be named panel_dsi_port.
> > 
> >> 					remote-endpoint = <&dsi_out_port>;
> >> 				};
> >> 			};
> >> 			port@1 {
> >> 				reg = <1>;
> >> 				bridge_dpi_port: endpoint {
> >> 					remote-endpoint =
> > <&pitouchscreen_panel_port>;
> >> 				};
> >> 			};
> > 
> > The second port is thus not needed.
> > 
> >> 		};
> > 
> > So we can simplify this to
> > 
> > 		port {
> > 			panel_dsi_port: endpoint {
> > 				remote-endpoint = <&dsi_out_port>;
> > 			};
> > 		};
> > 
> > (no need for a ports node when there's a single port)
> > 
> >> 	};
> >> };
> >> 
> >> lcd {
> >> 	compatible = "raspberrypi,7inch-touchscreen-panel";
> >> 	ports {
> >> 		#address-cells = <1>;
> >> 		#size-cells = <0>;
> >> 		port@0 {
> >> 			reg = <0>;
> >> 			pitouchscreen_panel_port: endpoint {
> >> 				remote-endpoint = <&bridge_dpi_port>;
> >> 			};
> >> 		};
> >> 	};
> >> };
> > 
> > And this node can go away.

-- 
Regards,

Laurent Pinchart

WARNING: multiple messages have this Message-ID (diff)
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Archit Taneja <architt@codeaurora.org>
Cc: Mark Rutland <mark.rutland@arm.com>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	Rob Herring <robh+dt@kernel.org>
Subject: Re: [PATCH 2/4] dt-bindings: Document the Raspberry Pi Touchscreen nodes.
Date: Fri, 19 May 2017 12:32:27 +0300	[thread overview]
Message-ID: <21080088.MT6ayIGAs6@avalon> (raw)
In-Reply-To: <c01609b7-d2d6-8ed1-5f51-4b910ba8bef0@codeaurora.org>

Hi Archit,

On Friday 19 May 2017 14:24:36 Archit Taneja wrote:
> On 05/18/2017 08:25 PM, Laurent Pinchart wrote:
> > On Thursday 18 May 2017 13:56:19 Archit Taneja wrote:
> >> On 05/17/2017 12:16 AM, Eric Anholt wrote:
> >
> > [snip]
> > 
> >>> In terms of physical connections:
> >>>    [15-pin "DSI" connector on 2835]
> >>>     | I2C               | DSI
> >>>    / \        SPI       |
> >>> [TS]  [Atmel]------[TC358762]
> >>>        \                |
> >>>         \PWM            |
> >>>          \              | DPI
> >>> 
> >>> [some backlight]------[some unknown panel]
> >>> 
> >>> The binding I'm trying to create is to expose what's necessary for a
> >>> driver that talks I2C to the Atmel, which then controls the PWM and does
> >>> the command sequence over SPI to the Toshiba that sets up its end of the
> >>> DSI link.
> >> 
> >> The bridge (Atmel + TC358762 combination) here looks like it's primarily
> >> an i2c device (i.e, the control bus is i2c). Therefore, the drm-bridge
> >> driver here should be an i2c driver instead of a mipi_dsi_driver.
> > 
> > Glad to see we agree, that's what I've proposed in a separate answer :-)
> > I'd go one step further though, there should be no DRM bridge, just a DRM
> > panel.
>
> If the PCB containing the controller chips and the panel are part of a
> single casing, and the set up won't work with another panel, then yeah, I
> agree. If the bridge chips are on a separate adapter board, and there is a
> possibility to connect other panels, then maybe a separate DRM bridge and a
> DRM panel might be a safer bet.

I thought it was a single black box, but upon closer inspection there's a 
separate PCB with the Microcontroller and TC358762.

Eric, do you know if it's possible to exchange the panel for another one (and 
not just an model with identical features from another vendor, but another 
panel with a different mode for instance) without reprogramming the 
microcontroller, or is the bridge board tied to the panel model ?

> >> We have the facility to create a mipi DSI device without the need to have
> >> a corresponding node in DT. The ADV7533 and TC358767 drivers are examples
> >> of that.
> >> 
> >> The following is what the binding could look like, it's same as what Rob
> >> also mentioned previously in the thread.
> >> 
> >> Thanks,
> >> Archit
> >> 
> >> dsi1: dsi@7e700000 {
> >> 
> >> 	#address-cells = <1>;
> >> 	#size-cells = <0>;
> >> 	<...>
> >> 	
> >> 	/* The SoC's DSI input/output port */
> >> 	ports {
> >> 		#address-cells = <1>;
> >> 		#size-cells = <0>;
> >> 		
> >> 		/* port@0 if needed */
> >> 		port@1 {
> >> 			dsi_out_port: endpoint {
> >> 				reg = <1>;
> >> 				remote-endpoint = <&bridge_dsi_port>;
> >> 			};
> >> 		};
> >> 	};
> >> };
> >> 
> >> i2c_dsi: i2c {
> >> 	compatible = "i2c-gpio";
> >> 	#address-cells = <1>;
> >> 	#size-cells = <0>;
> >> 	gpios = <&gpio 28 0
> >> 		 &gpio 29 0>;
> >> 	
> >> 	/* the Atmel + TC35872 bridge */
> >> 	pitouchscreen_bridge: bridge@45 {
> > 
> > This should thus be lcd@45.
> > 
> >> 		compatible = "raspberrypi,touchscreen-bridge";
> > 
> > And this raspberrypi,7inch-touchscreen-panel. Shame we haven't
> > standardized
> > the vendor name prefix to rpi :-/
> > 
> >> 		reg = <0x45>;
> >> 		
> >> 		ports {
> >> 			#address-cells = <1>;
> >> 			#size-cells = <0>;
> >> 			port@0 {
> >> 				reg = <0>;
> >> 				bridge_dsi_port: endpoint {
> > 
> > This should be named panel_dsi_port.
> > 
> >> 					remote-endpoint = <&dsi_out_port>;
> >> 				};
> >> 			};
> >> 			port@1 {
> >> 				reg = <1>;
> >> 				bridge_dpi_port: endpoint {
> >> 					remote-endpoint =
> > <&pitouchscreen_panel_port>;
> >> 				};
> >> 			};
> > 
> > The second port is thus not needed.
> > 
> >> 		};
> > 
> > So we can simplify this to
> > 
> > 		port {
> > 			panel_dsi_port: endpoint {
> > 				remote-endpoint = <&dsi_out_port>;
> > 			};
> > 		};
> > 
> > (no need for a ports node when there's a single port)
> > 
> >> 	};
> >> };
> >> 
> >> lcd {
> >> 	compatible = "raspberrypi,7inch-touchscreen-panel";
> >> 	ports {
> >> 		#address-cells = <1>;
> >> 		#size-cells = <0>;
> >> 		port@0 {
> >> 			reg = <0>;
> >> 			pitouchscreen_panel_port: endpoint {
> >> 				remote-endpoint = <&bridge_dpi_port>;
> >> 			};
> >> 		};
> >> 	};
> >> };
> > 
> > And this node can go away.

-- 
Regards,

Laurent Pinchart

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2017-05-19  9:32 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-11 23:56 [PATCH 0/4] Raspberry Pi Touchscreen bridge/panel drivers Eric Anholt
2017-05-11 23:56 ` Eric Anholt
2017-05-11 23:56 ` [PATCH 1/4] drm/vc4: Adjust modes in DSI to work around the integer PLL divider Eric Anholt
2017-05-11 23:56   ` Eric Anholt
2017-05-12  7:55   ` Daniel Vetter
2017-05-12  7:55     ` Daniel Vetter
2017-05-12 11:01   ` Noralf Trønnes
2017-05-12 11:01     ` Noralf Trønnes
2017-05-11 23:56 ` [PATCH 2/4] dt-bindings: Document the Raspberry Pi Touchscreen nodes Eric Anholt
2017-05-11 23:56   ` Eric Anholt
2017-05-15 20:44   ` Rob Herring
2017-05-15 20:44     ` Rob Herring
2017-05-15 21:56     ` Laurent Pinchart
2017-05-15 21:56       ` Laurent Pinchart
2017-05-15 21:53   ` Laurent Pinchart
2017-05-15 21:53     ` Laurent Pinchart
2017-05-16  0:03     ` Eric Anholt
2017-05-16  0:03       ` Eric Anholt
2017-05-16  0:11       ` Rob Herring
2017-05-16 16:47         ` Eric Anholt
2017-05-16 16:47           ` Eric Anholt
2017-05-16 16:54           ` Laurent Pinchart
2017-05-16 16:54             ` Laurent Pinchart
2017-05-16 18:46             ` Eric Anholt
2017-05-16 18:46               ` Eric Anholt
2017-05-18  8:26               ` Archit Taneja
2017-05-18  8:26                 ` Archit Taneja
2017-05-18 14:55                 ` Laurent Pinchart
2017-05-18 14:55                   ` Laurent Pinchart
2017-05-19  8:54                   ` Archit Taneja
2017-05-19  8:54                     ` Archit Taneja
2017-05-19  9:32                     ` Laurent Pinchart [this message]
2017-05-19  9:32                       ` Laurent Pinchart
2017-05-22 20:51                       ` Eric Anholt
2017-05-22 20:51                         ` Eric Anholt
2017-05-18 14:45               ` Laurent Pinchart
2017-05-18 14:45                 ` Laurent Pinchart
2017-05-22 20:50                 ` Eric Anholt
2017-05-22 20:50                   ` Eric Anholt
2017-05-16  7:20       ` Laurent Pinchart
2017-05-16  7:20         ` Laurent Pinchart
2017-05-11 23:56 ` [PATCH 3/4] drm/bridge: Add support for the Raspberry Pi 7" Touchscreen Eric Anholt
2017-05-11 23:56   ` Eric Anholt
2017-05-11 23:56 ` [PATCH 4/4] drm/panel: Add the Raspberry Pi 7" touchscreen's panel Eric Anholt
2017-05-11 23:56   ` Eric Anholt

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=21080088.MT6ayIGAs6@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=a.hajda@samsung.com \
    --cc=architt@codeaurora.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=eric@anholt.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=thierry.reding@gmail.com \
    /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.