Linux-Devicetree Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH 1/2] dt-bindings: display: sun4i-tcon: Add LVDS Dual Link property
@ 2020-02-14 12:32 Maxime Ripard
  2020-02-14 12:32 ` [PATCH 2/2] drm/sun4i: tcon: Support LVDS dual-link Maxime Ripard
  2020-02-14 13:10 ` [PATCH 1/2] dt-bindings: display: sun4i-tcon: Add LVDS Dual Link property Laurent Pinchart
  0 siblings, 2 replies; 9+ messages in thread
From: Maxime Ripard @ 2020-02-14 12:32 UTC (permalink / raw)
  To: Chen-Yu Tsai, Maxime Ripard, dri-devel
  Cc: Maarten Lankhorst, Sean Paul, Daniel Vetter, David Airlie,
	devicetree, Mark Rutland, Rob Herring, Frank Rowand,
	Laurent Pinchart, linux-arm-kernel, Maxime Ripard

SoCs that have multiple TCONs can use the two set of pins on the first TCON
to drive a dual-link display. Add a property to enable the dual link.

Signed-off-by: Maxime Ripard <maxime@cerno.tech>
---
 .../bindings/display/allwinner,sun4i-a10-tcon.yaml         | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/Documentation/devicetree/bindings/display/allwinner,sun4i-a10-tcon.yaml b/Documentation/devicetree/bindings/display/allwinner,sun4i-a10-tcon.yaml
index 86ad617d2327..aa6dd8409dbc 100644
--- a/Documentation/devicetree/bindings/display/allwinner,sun4i-a10-tcon.yaml
+++ b/Documentation/devicetree/bindings/display/allwinner,sun4i-a10-tcon.yaml
@@ -105,6 +105,13 @@ properties:
         - const: edp
         - const: lvds
 
+  allwinner,lvds-dual-link:
+    type: boolean
+    description: |
+      On a SoC with two TCON with LVDS support, the first TCON can
+      operate over both pins sets to output in a dual-link setup. This
+      will be triggered by setting this property.
+
   ports:
     type: object
     description: |
-- 
2.24.1


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 2/2] drm/sun4i: tcon: Support LVDS dual-link
  2020-02-14 12:32 [PATCH 1/2] dt-bindings: display: sun4i-tcon: Add LVDS Dual Link property Maxime Ripard
@ 2020-02-14 12:32 ` Maxime Ripard
  2020-02-14 13:10 ` [PATCH 1/2] dt-bindings: display: sun4i-tcon: Add LVDS Dual Link property Laurent Pinchart
  1 sibling, 0 replies; 9+ messages in thread
From: Maxime Ripard @ 2020-02-14 12:32 UTC (permalink / raw)
  To: Chen-Yu Tsai, Maxime Ripard, dri-devel
  Cc: Maarten Lankhorst, Sean Paul, Daniel Vetter, David Airlie,
	devicetree, Mark Rutland, Rob Herring, Frank Rowand,
	Laurent Pinchart, linux-arm-kernel, Maxime Ripard

Some LVDS encoders in the Allwinner SoCs can output on a dual-link. Let's
add a DT property to toggle it.

Signed-off-by: Maxime Ripard <maxime@cerno.tech>
---
 drivers/gpu/drm/sun4i/sun4i_tcon.c | 6 ++++++
 drivers/gpu/drm/sun4i/sun4i_tcon.h | 4 ++++
 2 files changed, 10 insertions(+)

diff --git a/drivers/gpu/drm/sun4i/sun4i_tcon.c b/drivers/gpu/drm/sun4i/sun4i_tcon.c
index e616cc901b4e..ed1f09e52ef3 100644
--- a/drivers/gpu/drm/sun4i/sun4i_tcon.c
+++ b/drivers/gpu/drm/sun4i/sun4i_tcon.c
@@ -488,6 +488,9 @@ static void sun4i_tcon0_mode_set_lvds(struct sun4i_tcon *tcon,
 	else
 		reg |= SUN4I_TCON0_LVDS_IF_DATA_POL_NORMAL;
 
+	if (tcon->lvds_dual_link)
+		reg |= SUN4I_TCON0_LVDS_IF_DUAL_LINK;
+
 	if (sun4i_tcon_get_pixel_depth(encoder) == 24)
 		reg |= SUN4I_TCON0_LVDS_IF_BITWIDTH_24BITS;
 	else
@@ -1219,6 +1222,9 @@ static int sun4i_tcon_bind(struct device *dev, struct device *master,
 		} else {
 			can_lvds = true;
 		}
+
+		tcon->lvds_dual_link = of_property_read_bool(dev->of_node,
+							     "allwinner,lvds-dual-link");
 	} else {
 		can_lvds = false;
 	}
diff --git a/drivers/gpu/drm/sun4i/sun4i_tcon.h b/drivers/gpu/drm/sun4i/sun4i_tcon.h
index d36c304b1607..2a57d24e2772 100644
--- a/drivers/gpu/drm/sun4i/sun4i_tcon.h
+++ b/drivers/gpu/drm/sun4i/sun4i_tcon.h
@@ -98,6 +98,7 @@
 
 #define SUN4I_TCON0_LVDS_IF_REG			0x84
 #define SUN4I_TCON0_LVDS_IF_EN				BIT(31)
+#define SUN4I_TCON0_LVDS_IF_DUAL_LINK			BIT(30)
 #define SUN4I_TCON0_LVDS_IF_BITWIDTH_MASK		BIT(26)
 #define SUN4I_TCON0_LVDS_IF_BITWIDTH_18BITS		(1 << 26)
 #define SUN4I_TCON0_LVDS_IF_BITWIDTH_24BITS		(0 << 26)
@@ -263,6 +264,9 @@ struct sun4i_tcon {
 	/* Associated crtc */
 	struct sun4i_crtc		*crtc;
 
+	/* Is the LVDS link a dual-channel link? */
+	bool				lvds_dual_link;
+
 	int				id;
 
 	/* TCON list management */
-- 
2.24.1


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/2] dt-bindings: display: sun4i-tcon: Add LVDS Dual Link property
  2020-02-14 12:32 [PATCH 1/2] dt-bindings: display: sun4i-tcon: Add LVDS Dual Link property Maxime Ripard
  2020-02-14 12:32 ` [PATCH 2/2] drm/sun4i: tcon: Support LVDS dual-link Maxime Ripard
@ 2020-02-14 13:10 ` Laurent Pinchart
  2020-02-14 15:44   ` Maxime Ripard
  1 sibling, 1 reply; 9+ messages in thread
From: Laurent Pinchart @ 2020-02-14 13:10 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Chen-Yu Tsai, Maxime Ripard, dri-devel, Maarten Lankhorst,
	Sean Paul, Daniel Vetter, David Airlie, devicetree, Mark Rutland,
	Rob Herring, Frank Rowand, linux-arm-kernel

Hi Maxime,

Thank you for the patch.

On Fri, Feb 14, 2020 at 01:32:43PM +0100, Maxime Ripard wrote:
> SoCs that have multiple TCONs can use the two set of pins on the first TCON
> to drive a dual-link display. Add a property to enable the dual link.
> 
> Signed-off-by: Maxime Ripard <maxime@cerno.tech>
> ---
>  .../bindings/display/allwinner,sun4i-a10-tcon.yaml         | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/display/allwinner,sun4i-a10-tcon.yaml b/Documentation/devicetree/bindings/display/allwinner,sun4i-a10-tcon.yaml
> index 86ad617d2327..aa6dd8409dbc 100644
> --- a/Documentation/devicetree/bindings/display/allwinner,sun4i-a10-tcon.yaml
> +++ b/Documentation/devicetree/bindings/display/allwinner,sun4i-a10-tcon.yaml
> @@ -105,6 +105,13 @@ properties:
>          - const: edp
>          - const: lvds
>  
> +  allwinner,lvds-dual-link:
> +    type: boolean
> +    description: |
> +      On a SoC with two TCON with LVDS support, the first TCON can
> +      operate over both pins sets to output in a dual-link setup. This
> +      will be triggered by setting this property.

Could you maybe provide an example of how this property is supposed to
be used ? I'm especially wondering what ports are used in that case and
how they're connected.

> +
>    ports:
>      type: object
>      description: |

-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/2] dt-bindings: display: sun4i-tcon: Add LVDS Dual Link property
  2020-02-14 13:10 ` [PATCH 1/2] dt-bindings: display: sun4i-tcon: Add LVDS Dual Link property Laurent Pinchart
@ 2020-02-14 15:44   ` Maxime Ripard
  2020-02-14 15:49     ` Laurent Pinchart
  0 siblings, 1 reply; 9+ messages in thread
From: Maxime Ripard @ 2020-02-14 15:44 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: Chen-Yu Tsai, dri-devel, Maarten Lankhorst, Sean Paul,
	Daniel Vetter, David Airlie, devicetree, Mark Rutland,
	Rob Herring, Frank Rowand, linux-arm-kernel

[-- Attachment #1: Type: text/plain, Size: 1621 bytes --]

Hi Laurent,

On Fri, Feb 14, 2020 at 03:10:25PM +0200, Laurent Pinchart wrote:
> Hi Maxime,
>
> Thank you for the patch.
>
> On Fri, Feb 14, 2020 at 01:32:43PM +0100, Maxime Ripard wrote:
> > SoCs that have multiple TCONs can use the two set of pins on the first TCON
> > to drive a dual-link display. Add a property to enable the dual link.
> >
> > Signed-off-by: Maxime Ripard <maxime@cerno.tech>
> > ---
> >  .../bindings/display/allwinner,sun4i-a10-tcon.yaml         | 7 +++++++
> >  1 file changed, 7 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/display/allwinner,sun4i-a10-tcon.yaml b/Documentation/devicetree/bindings/display/allwinner,sun4i-a10-tcon.yaml
> > index 86ad617d2327..aa6dd8409dbc 100644
> > --- a/Documentation/devicetree/bindings/display/allwinner,sun4i-a10-tcon.yaml
> > +++ b/Documentation/devicetree/bindings/display/allwinner,sun4i-a10-tcon.yaml
> > @@ -105,6 +105,13 @@ properties:
> >          - const: edp
> >          - const: lvds
> >
> > +  allwinner,lvds-dual-link:
> > +    type: boolean
> > +    description: |
> > +      On a SoC with two TCON with LVDS support, the first TCON can
> > +      operate over both pins sets to output in a dual-link setup. This
> > +      will be triggered by setting this property.
>
> Could you maybe provide an example of how this property is supposed to
> be used ? I'm especially wondering what ports are used in that case and
> how they're connected.

It's pretty trivial to support, it's only a property to set on the
encoder node itself.

I'm not really sure what you meant by your question with the ports
though :/

Maxime

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/2] dt-bindings: display: sun4i-tcon: Add LVDS Dual Link property
  2020-02-14 15:44   ` Maxime Ripard
@ 2020-02-14 15:49     ` Laurent Pinchart
  2020-02-17 17:42       ` Maxime Ripard
  0 siblings, 1 reply; 9+ messages in thread
From: Laurent Pinchart @ 2020-02-14 15:49 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Chen-Yu Tsai, dri-devel, Maarten Lankhorst, Sean Paul,
	Daniel Vetter, David Airlie, devicetree, Mark Rutland,
	Rob Herring, Frank Rowand, linux-arm-kernel

Hi Maxime,

On Fri, Feb 14, 2020 at 04:44:05PM +0100, Maxime Ripard wrote:
> On Fri, Feb 14, 2020 at 03:10:25PM +0200, Laurent Pinchart wrote:
> > On Fri, Feb 14, 2020 at 01:32:43PM +0100, Maxime Ripard wrote:
> > > SoCs that have multiple TCONs can use the two set of pins on the first TCON
> > > to drive a dual-link display. Add a property to enable the dual link.
> > >
> > > Signed-off-by: Maxime Ripard <maxime@cerno.tech>
> > > ---
> > >  .../bindings/display/allwinner,sun4i-a10-tcon.yaml         | 7 +++++++
> > >  1 file changed, 7 insertions(+)
> > >
> > > diff --git a/Documentation/devicetree/bindings/display/allwinner,sun4i-a10-tcon.yaml b/Documentation/devicetree/bindings/display/allwinner,sun4i-a10-tcon.yaml
> > > index 86ad617d2327..aa6dd8409dbc 100644
> > > --- a/Documentation/devicetree/bindings/display/allwinner,sun4i-a10-tcon.yaml
> > > +++ b/Documentation/devicetree/bindings/display/allwinner,sun4i-a10-tcon.yaml
> > > @@ -105,6 +105,13 @@ properties:
> > >          - const: edp
> > >          - const: lvds
> > >
> > > +  allwinner,lvds-dual-link:
> > > +    type: boolean
> > > +    description: |
> > > +      On a SoC with two TCON with LVDS support, the first TCON can
> > > +      operate over both pins sets to output in a dual-link setup. This
> > > +      will be triggered by setting this property.
> >
> > Could you maybe provide an example of how this property is supposed to
> > be used ? I'm especially wondering what ports are used in that case and
> > how they're connected.
> 
> It's pretty trivial to support, it's only a property to set on the
> encoder node itself.
> 
> I'm not really sure what you meant by your question with the ports
> though :/

I assume that, in the single-link case, you have two TCON instances that
operate independently, each of them with one port that models an LVDS
connection to a panel. In the dual-link mode, how does that look like ?
Does the TCON instance that operate in dual-link mode have two ports in
DT ? There are two physical ports, so I think it makes sense to always
have two ports in DT. That's what we're doing for the LVDS encoders on
R-Car Gen3, in order to specify in DT which LVDS input of the dual-link
panel is connected to which LVDS output of the SoC. That allows
configuring the LVDS encoder to send the even and odd pixels on the
right port.

-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/2] dt-bindings: display: sun4i-tcon: Add LVDS Dual Link property
  2020-02-14 15:49     ` Laurent Pinchart
@ 2020-02-17 17:42       ` Maxime Ripard
  2020-02-17 18:10         ` Laurent Pinchart
  0 siblings, 1 reply; 9+ messages in thread
From: Maxime Ripard @ 2020-02-17 17:42 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: Chen-Yu Tsai, dri-devel, Maarten Lankhorst, Sean Paul,
	Daniel Vetter, David Airlie, devicetree, Mark Rutland,
	Rob Herring, Frank Rowand, linux-arm-kernel

[-- Attachment #1: Type: text/plain, Size: 2841 bytes --]

On Fri, Feb 14, 2020 at 05:49:53PM +0200, Laurent Pinchart wrote:
> On Fri, Feb 14, 2020 at 04:44:05PM +0100, Maxime Ripard wrote:
> > On Fri, Feb 14, 2020 at 03:10:25PM +0200, Laurent Pinchart wrote:
> > > On Fri, Feb 14, 2020 at 01:32:43PM +0100, Maxime Ripard wrote:
> > > > SoCs that have multiple TCONs can use the two set of pins on the first TCON
> > > > to drive a dual-link display. Add a property to enable the dual link.
> > > >
> > > > Signed-off-by: Maxime Ripard <maxime@cerno.tech>
> > > > ---
> > > >  .../bindings/display/allwinner,sun4i-a10-tcon.yaml         | 7 +++++++
> > > >  1 file changed, 7 insertions(+)
> > > >
> > > > diff --git a/Documentation/devicetree/bindings/display/allwinner,sun4i-a10-tcon.yaml b/Documentation/devicetree/bindings/display/allwinner,sun4i-a10-tcon.yaml
> > > > index 86ad617d2327..aa6dd8409dbc 100644
> > > > --- a/Documentation/devicetree/bindings/display/allwinner,sun4i-a10-tcon.yaml
> > > > +++ b/Documentation/devicetree/bindings/display/allwinner,sun4i-a10-tcon.yaml
> > > > @@ -105,6 +105,13 @@ properties:
> > > >          - const: edp
> > > >          - const: lvds
> > > >
> > > > +  allwinner,lvds-dual-link:
> > > > +    type: boolean
> > > > +    description: |
> > > > +      On a SoC with two TCON with LVDS support, the first TCON can
> > > > +      operate over both pins sets to output in a dual-link setup. This
> > > > +      will be triggered by setting this property.
> > >
> > > Could you maybe provide an example of how this property is supposed to
> > > be used ? I'm especially wondering what ports are used in that case and
> > > how they're connected.
> >
> > It's pretty trivial to support, it's only a property to set on the
> > encoder node itself.
> >
> > I'm not really sure what you meant by your question with the ports
> > though :/
>
> I assume that, in the single-link case, you have two TCON instances that
> operate independently, each of them with one port that models an LVDS
> connection to a panel.

Indeed,

> In the dual-link mode, how does that look like ? Does the TCON
> instance that operate in dual-link mode have two ports in DT ? There
> are two physical ports, so I think it makes sense to always have two
> ports in DT. That's what we're doing for the LVDS encoders on R-Car
> Gen3, in order to specify in DT which LVDS input of the dual-link
> panel is connected to which LVDS output of the SoC. That allows
> configuring the LVDS encoder to send the even and odd pixels on the
> right port.

As far as I can tell, you can't control that in our TCON. It just on
more lanes, that's it. Also, we currently have multiple ports, to map
another feature of the TCON, which is that it can drive directly a
panel, or will send its output to the HDMI / TV encoders. Adding
another port in that will break the current binding we have.

Maxime

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/2] dt-bindings: display: sun4i-tcon: Add LVDS Dual Link property
  2020-02-17 17:42       ` Maxime Ripard
@ 2020-02-17 18:10         ` Laurent Pinchart
  2020-02-20 17:53           ` Maxime Ripard
  0 siblings, 1 reply; 9+ messages in thread
From: Laurent Pinchart @ 2020-02-17 18:10 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Chen-Yu Tsai, dri-devel, Maarten Lankhorst, Sean Paul,
	Daniel Vetter, David Airlie, devicetree, Mark Rutland,
	Rob Herring, Frank Rowand, linux-arm-kernel

Hi Maxime,

On Mon, Feb 17, 2020 at 06:42:53PM +0100, Maxime Ripard wrote:
> On Fri, Feb 14, 2020 at 05:49:53PM +0200, Laurent Pinchart wrote:
> > On Fri, Feb 14, 2020 at 04:44:05PM +0100, Maxime Ripard wrote:
> > > On Fri, Feb 14, 2020 at 03:10:25PM +0200, Laurent Pinchart wrote:
> > > > On Fri, Feb 14, 2020 at 01:32:43PM +0100, Maxime Ripard wrote:
> > > > > SoCs that have multiple TCONs can use the two set of pins on the first TCON
> > > > > to drive a dual-link display. Add a property to enable the dual link.
> > > > >
> > > > > Signed-off-by: Maxime Ripard <maxime@cerno.tech>
> > > > > ---
> > > > >  .../bindings/display/allwinner,sun4i-a10-tcon.yaml         | 7 +++++++
> > > > >  1 file changed, 7 insertions(+)
> > > > >
> > > > > diff --git a/Documentation/devicetree/bindings/display/allwinner,sun4i-a10-tcon.yaml b/Documentation/devicetree/bindings/display/allwinner,sun4i-a10-tcon.yaml
> > > > > index 86ad617d2327..aa6dd8409dbc 100644
> > > > > --- a/Documentation/devicetree/bindings/display/allwinner,sun4i-a10-tcon.yaml
> > > > > +++ b/Documentation/devicetree/bindings/display/allwinner,sun4i-a10-tcon.yaml
> > > > > @@ -105,6 +105,13 @@ properties:
> > > > >          - const: edp
> > > > >          - const: lvds
> > > > >
> > > > > +  allwinner,lvds-dual-link:
> > > > > +    type: boolean
> > > > > +    description: |
> > > > > +      On a SoC with two TCON with LVDS support, the first TCON can
> > > > > +      operate over both pins sets to output in a dual-link setup. This
> > > > > +      will be triggered by setting this property.
> > > >
> > > > Could you maybe provide an example of how this property is supposed to
> > > > be used ? I'm especially wondering what ports are used in that case and
> > > > how they're connected.
> > >
> > > It's pretty trivial to support, it's only a property to set on the
> > > encoder node itself.
> > >
> > > I'm not really sure what you meant by your question with the ports
> > > though :/
> >
> > I assume that, in the single-link case, you have two TCON instances that
> > operate independently, each of them with one port that models an LVDS
> > connection to a panel.
> 
> Indeed,
> 
> > In the dual-link mode, how does that look like ? Does the TCON
> > instance that operate in dual-link mode have two ports in DT ? There
> > are two physical ports, so I think it makes sense to always have two
> > ports in DT. That's what we're doing for the LVDS encoders on R-Car
> > Gen3, in order to specify in DT which LVDS input of the dual-link
> > panel is connected to which LVDS output of the SoC. That allows
> > configuring the LVDS encoder to send the even and odd pixels on the
> > right port.
> 
> As far as I can tell, you can't control that in our TCON. It just on
> more lanes, that's it. Also, we currently have multiple ports, to map
> another feature of the TCON, which is that it can drive directly a
> panel, or will send its output to the HDMI / TV encoders. Adding
> another port in that will break the current binding we have.

This will create one issue though, in that the dual-link sinks are
supposed to have two input ports, in order to expose the odd and even
pixels ordering. If you have a single ouput port in your TCON, how will
you interface with such sinks ?

-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/2] dt-bindings: display: sun4i-tcon: Add LVDS Dual Link property
  2020-02-17 18:10         ` Laurent Pinchart
@ 2020-02-20 17:53           ` Maxime Ripard
  2020-02-20 19:13             ` Laurent Pinchart
  0 siblings, 1 reply; 9+ messages in thread
From: Maxime Ripard @ 2020-02-20 17:53 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: Chen-Yu Tsai, dri-devel, Maarten Lankhorst, Sean Paul,
	Daniel Vetter, David Airlie, devicetree, Mark Rutland,
	Rob Herring, Frank Rowand, linux-arm-kernel

[-- Attachment #1: Type: text/plain, Size: 3607 bytes --]

On Mon, Feb 17, 2020 at 08:10:06PM +0200, Laurent Pinchart wrote:
> Hi Maxime,
>
> On Mon, Feb 17, 2020 at 06:42:53PM +0100, Maxime Ripard wrote:
> > On Fri, Feb 14, 2020 at 05:49:53PM +0200, Laurent Pinchart wrote:
> > > On Fri, Feb 14, 2020 at 04:44:05PM +0100, Maxime Ripard wrote:
> > > > On Fri, Feb 14, 2020 at 03:10:25PM +0200, Laurent Pinchart wrote:
> > > > > On Fri, Feb 14, 2020 at 01:32:43PM +0100, Maxime Ripard wrote:
> > > > > > SoCs that have multiple TCONs can use the two set of pins on the first TCON
> > > > > > to drive a dual-link display. Add a property to enable the dual link.
> > > > > >
> > > > > > Signed-off-by: Maxime Ripard <maxime@cerno.tech>
> > > > > > ---
> > > > > >  .../bindings/display/allwinner,sun4i-a10-tcon.yaml         | 7 +++++++
> > > > > >  1 file changed, 7 insertions(+)
> > > > > >
> > > > > > diff --git a/Documentation/devicetree/bindings/display/allwinner,sun4i-a10-tcon.yaml b/Documentation/devicetree/bindings/display/allwinner,sun4i-a10-tcon.yaml
> > > > > > index 86ad617d2327..aa6dd8409dbc 100644
> > > > > > --- a/Documentation/devicetree/bindings/display/allwinner,sun4i-a10-tcon.yaml
> > > > > > +++ b/Documentation/devicetree/bindings/display/allwinner,sun4i-a10-tcon.yaml
> > > > > > @@ -105,6 +105,13 @@ properties:
> > > > > >          - const: edp
> > > > > >          - const: lvds
> > > > > >
> > > > > > +  allwinner,lvds-dual-link:
> > > > > > +    type: boolean
> > > > > > +    description: |
> > > > > > +      On a SoC with two TCON with LVDS support, the first TCON can
> > > > > > +      operate over both pins sets to output in a dual-link setup. This
> > > > > > +      will be triggered by setting this property.
> > > > >
> > > > > Could you maybe provide an example of how this property is supposed to
> > > > > be used ? I'm especially wondering what ports are used in that case and
> > > > > how they're connected.
> > > >
> > > > It's pretty trivial to support, it's only a property to set on the
> > > > encoder node itself.
> > > >
> > > > I'm not really sure what you meant by your question with the ports
> > > > though :/
> > >
> > > I assume that, in the single-link case, you have two TCON instances that
> > > operate independently, each of them with one port that models an LVDS
> > > connection to a panel.
> >
> > Indeed,
> >
> > > In the dual-link mode, how does that look like ? Does the TCON
> > > instance that operate in dual-link mode have two ports in DT ? There
> > > are two physical ports, so I think it makes sense to always have two
> > > ports in DT. That's what we're doing for the LVDS encoders on R-Car
> > > Gen3, in order to specify in DT which LVDS input of the dual-link
> > > panel is connected to which LVDS output of the SoC. That allows
> > > configuring the LVDS encoder to send the even and odd pixels on the
> > > right port.
> >
> > As far as I can tell, you can't control that in our TCON. It just on
> > more lanes, that's it. Also, we currently have multiple ports, to map
> > another feature of the TCON, which is that it can drive directly a
> > panel, or will send its output to the HDMI / TV encoders. Adding
> > another port in that will break the current binding we have.
>
> This will create one issue though, in that the dual-link sinks are
> supposed to have two input ports, in order to expose the odd and even
> pixels ordering. If you have a single ouput port in your TCON, how will
> you interface with such sinks ?

I guess we could create multiple endpoints in the same port? That's
not going to be trivial either though given the current binding we
have :/

Maxime

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/2] dt-bindings: display: sun4i-tcon: Add LVDS Dual Link property
  2020-02-20 17:53           ` Maxime Ripard
@ 2020-02-20 19:13             ` Laurent Pinchart
  0 siblings, 0 replies; 9+ messages in thread
From: Laurent Pinchart @ 2020-02-20 19:13 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Chen-Yu Tsai, dri-devel, Maarten Lankhorst, Sean Paul,
	Daniel Vetter, David Airlie, devicetree, Mark Rutland,
	Rob Herring, Frank Rowand, linux-arm-kernel

Hi Maxime,

On Thu, Feb 20, 2020 at 06:53:07PM +0100, Maxime Ripard wrote:
> On Mon, Feb 17, 2020 at 08:10:06PM +0200, Laurent Pinchart wrote:
> > On Mon, Feb 17, 2020 at 06:42:53PM +0100, Maxime Ripard wrote:
> >> On Fri, Feb 14, 2020 at 05:49:53PM +0200, Laurent Pinchart wrote:
> >>> On Fri, Feb 14, 2020 at 04:44:05PM +0100, Maxime Ripard wrote:
> >>>> On Fri, Feb 14, 2020 at 03:10:25PM +0200, Laurent Pinchart wrote:
> >>>>> On Fri, Feb 14, 2020 at 01:32:43PM +0100, Maxime Ripard wrote:
> >>>>>> SoCs that have multiple TCONs can use the two set of pins on the first TCON
> >>>>>> to drive a dual-link display. Add a property to enable the dual link.
> >>>>>>
> >>>>>> Signed-off-by: Maxime Ripard <maxime@cerno.tech>
> >>>>>> ---
> >>>>>>  .../bindings/display/allwinner,sun4i-a10-tcon.yaml         | 7 +++++++
> >>>>>>  1 file changed, 7 insertions(+)
> >>>>>>
> >>>>>> diff --git a/Documentation/devicetree/bindings/display/allwinner,sun4i-a10-tcon.yaml b/Documentation/devicetree/bindings/display/allwinner,sun4i-a10-tcon.yaml
> >>>>>> index 86ad617d2327..aa6dd8409dbc 100644
> >>>>>> --- a/Documentation/devicetree/bindings/display/allwinner,sun4i-a10-tcon.yaml
> >>>>>> +++ b/Documentation/devicetree/bindings/display/allwinner,sun4i-a10-tcon.yaml
> >>>>>> @@ -105,6 +105,13 @@ properties:
> >>>>>>          - const: edp
> >>>>>>          - const: lvds
> >>>>>>
> >>>>>> +  allwinner,lvds-dual-link:
> >>>>>> +    type: boolean
> >>>>>> +    description: |
> >>>>>> +      On a SoC with two TCON with LVDS support, the first TCON can
> >>>>>> +      operate over both pins sets to output in a dual-link setup. This
> >>>>>> +      will be triggered by setting this property.
> >>>>>
> >>>>> Could you maybe provide an example of how this property is supposed to
> >>>>> be used ? I'm especially wondering what ports are used in that case and
> >>>>> how they're connected.
> >>>>
> >>>> It's pretty trivial to support, it's only a property to set on the
> >>>> encoder node itself.
> >>>>
> >>>> I'm not really sure what you meant by your question with the ports
> >>>> though :/
> >>>
> >>> I assume that, in the single-link case, you have two TCON instances that
> >>> operate independently, each of them with one port that models an LVDS
> >>> connection to a panel.
> >>
> >> Indeed,
> >>
> >>> In the dual-link mode, how does that look like ? Does the TCON
> >>> instance that operate in dual-link mode have two ports in DT ? There
> >>> are two physical ports, so I think it makes sense to always have two
> >>> ports in DT. That's what we're doing for the LVDS encoders on R-Car
> >>> Gen3, in order to specify in DT which LVDS input of the dual-link
> >>> panel is connected to which LVDS output of the SoC. That allows
> >>> configuring the LVDS encoder to send the even and odd pixels on the
> >>> right port.
> >>
> >> As far as I can tell, you can't control that in our TCON. It just on
> >> more lanes, that's it. Also, we currently have multiple ports, to map
> >> another feature of the TCON, which is that it can drive directly a
> >> panel, or will send its output to the HDMI / TV encoders. Adding
> >> another port in that will break the current binding we have.
> >
> > This will create one issue though, in that the dual-link sinks are
> > supposed to have two input ports, in order to expose the odd and even
> > pixels ordering. If you have a single ouput port in your TCON, how will
> > you interface with such sinks ?
> 
> I guess we could create multiple endpoints in the same port? That's
> not going to be trivial either though given the current binding we
> have :/

That's however not really how endpoints are supposed to be used.

Let's try to find a solution. Could you show me a DT example that
explains why having two ports would create backward-compatibility issues
?

-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, back to index

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-14 12:32 [PATCH 1/2] dt-bindings: display: sun4i-tcon: Add LVDS Dual Link property Maxime Ripard
2020-02-14 12:32 ` [PATCH 2/2] drm/sun4i: tcon: Support LVDS dual-link Maxime Ripard
2020-02-14 13:10 ` [PATCH 1/2] dt-bindings: display: sun4i-tcon: Add LVDS Dual Link property Laurent Pinchart
2020-02-14 15:44   ` Maxime Ripard
2020-02-14 15:49     ` Laurent Pinchart
2020-02-17 17:42       ` Maxime Ripard
2020-02-17 18:10         ` Laurent Pinchart
2020-02-20 17:53           ` Maxime Ripard
2020-02-20 19:13             ` Laurent Pinchart

Linux-Devicetree Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-devicetree/0 linux-devicetree/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-devicetree linux-devicetree/ https://lore.kernel.org/linux-devicetree \
		devicetree@vger.kernel.org
	public-inbox-index linux-devicetree

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-devicetree


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git