diff mbox

[2/8] dt-bindings: display: bridge: thc63lvd1024: Add lvds map property

Message ID 1524130269-32688-3-git-send-email-jacopo+renesas@jmondi.org (mailing list archive)
State Not Applicable
Delegated to: Geert Uytterhoeven
Headers show

Commit Message

Jacopo Mondi April 19, 2018, 9:31 a.m. UTC
The THC63LVD1024 LVDS to RGB bridge supports two different input mapping
modes, selectable by means of an external pin.

Describe the LVDS mode map through a newly defined mandatory property in
device tree bindings.

Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
---
 .../devicetree/bindings/display/bridge/thine,thc63lvd1024.txt          | 3 +++
 1 file changed, 3 insertions(+)

Comments

Peter Rosin April 22, 2018, 8:02 p.m. UTC | #1
On 2018-04-19 11:31, Jacopo Mondi wrote:
> The THC63LVD1024 LVDS to RGB bridge supports two different input mapping
> modes, selectable by means of an external pin.
> 
> Describe the LVDS mode map through a newly defined mandatory property in
> device tree bindings.
> 
> Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
> ---
>  .../devicetree/bindings/display/bridge/thine,thc63lvd1024.txt          | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/display/bridge/thine,thc63lvd1024.txt b/Documentation/devicetree/bindings/display/bridge/thine,thc63lvd1024.txt
> index 37f0c04..0937595 100644
> --- a/Documentation/devicetree/bindings/display/bridge/thine,thc63lvd1024.txt
> +++ b/Documentation/devicetree/bindings/display/bridge/thine,thc63lvd1024.txt
> @@ -12,6 +12,8 @@ Required properties:
>  - compatible: Shall be "thine,thc63lvd1024"
>  - vcc-supply: Power supply for TTL output, TTL CLOCKOUT signal, LVDS input,
>    PPL and digital circuitry
> +- thine,map: LVDS mapping mode selection signal, pin name "MAP". Shall be <1>
> +  for mapping mode 1, <0> for mapping mode 2

Since the MAP pin is an input pin, I would expect there to be an optional gpio
specifier like thine,map-gpios so that the driver can set it according to
the value given in thine,map in case the HW has a line from some gpio output
to the MAP pin (instead of hardwired hi/low which seem to be your thinking).

Cheers,
Peter

>  
>  Optional properties:
>  - powerdown-gpios: Power down GPIO signal, pin name "/PDWN". Active low
> @@ -36,6 +38,7 @@ Example:
>  
>  		vcc-supply = <&reg_lvds_vcc>;
>  		powerdown-gpios = <&gpio4 15 GPIO_ACTIVE_LOW>;
> +		thine,map = <1>;
>  
>  		ports {
>  			#address-cells = <1>;
>
Jacopo Mondi April 23, 2018, 7:35 a.m. UTC | #2
Hi Peter,
   thanks for commenting,

On Sun, Apr 22, 2018 at 10:02:41PM +0200, Peter Rosin wrote:
> On 2018-04-19 11:31, Jacopo Mondi wrote:
> > The THC63LVD1024 LVDS to RGB bridge supports two different input mapping
> > modes, selectable by means of an external pin.
> >
> > Describe the LVDS mode map through a newly defined mandatory property in
> > device tree bindings.
> >
> > Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
> > ---
> >  .../devicetree/bindings/display/bridge/thine,thc63lvd1024.txt          | 3 +++
> >  1 file changed, 3 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/display/bridge/thine,thc63lvd1024.txt b/Documentation/devicetree/bindings/display/bridge/thine,thc63lvd1024.txt
> > index 37f0c04..0937595 100644
> > --- a/Documentation/devicetree/bindings/display/bridge/thine,thc63lvd1024.txt
> > +++ b/Documentation/devicetree/bindings/display/bridge/thine,thc63lvd1024.txt
> > @@ -12,6 +12,8 @@ Required properties:
> >  - compatible: Shall be "thine,thc63lvd1024"
> >  - vcc-supply: Power supply for TTL output, TTL CLOCKOUT signal, LVDS input,
> >    PPL and digital circuitry
> > +- thine,map: LVDS mapping mode selection signal, pin name "MAP". Shall be <1>
> > +  for mapping mode 1, <0> for mapping mode 2
>
> Since the MAP pin is an input pin, I would expect there to be an optional gpio
> specifier like thine,map-gpios so that the driver can set it according to
> the value given in thine,map in case the HW has a line from some gpio output
> to the MAP pin (instead of hardwired hi/low which seem to be your thinking).

I see... As the only use case I had has the pin tied to vcc, I
thought about making it a binary property, and I wonder in how many
cases the chip 'MAP' pin would actually be GPIO controlled input and
not an hardwired one instead. I don't see the LVDS mapping mode to be
changed at runtime, but you are right, who knows....

Do you think we can add an options 'thine,map-gpios' property along
to the proposed ones?

thanks
   j

>
> Cheers,
> Peter
>
> >
> >  Optional properties:
> >  - powerdown-gpios: Power down GPIO signal, pin name "/PDWN". Active low
> > @@ -36,6 +38,7 @@ Example:
> >
> >  		vcc-supply = <&reg_lvds_vcc>;
> >  		powerdown-gpios = <&gpio4 15 GPIO_ACTIVE_LOW>;
> > +		thine,map = <1>;
> >
> >  		ports {
> >  			#address-cells = <1>;
> >
>
Laurent Pinchart April 23, 2018, 11:59 a.m. UTC | #3
Hi Jacopo,

On Monday, 23 April 2018 10:35:04 EEST jacopo mondi wrote:
> On Sun, Apr 22, 2018 at 10:02:41PM +0200, Peter Rosin wrote:
> > On 2018-04-19 11:31, Jacopo Mondi wrote:
> >> The THC63LVD1024 LVDS to RGB bridge supports two different input mapping
> >> modes, selectable by means of an external pin.
> >> 
> >> Describe the LVDS mode map through a newly defined mandatory property in
> >> device tree bindings.
> >> 
> >> Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
> >> ---
> >> 
> >>  .../devicetree/bindings/display/bridge/thine,thc63lvd1024.txt    | 3 +++
> >>  1 file changed, 3 insertions(+)
> >> 
> >> diff --git
> >> a/Documentation/devicetree/bindings/display/bridge/thine,thc63lvd1024.txt
> >> b/Documentation/devicetree/bindings/display/bridge/thine,thc63lvd1024.txt
> >> index 37f0c04..0937595 100644
> >> ---
> >> a/Documentation/devicetree/bindings/display/bridge/thine,thc63lvd1024.txt
> >> +++
> >> b/Documentation/devicetree/bindings/display/bridge/thine,thc63lvd1024.txt
> >> @@ -12,6 +12,8 @@ Required properties:
> >>  - compatible: Shall be "thine,thc63lvd1024"
> >>  - vcc-supply: Power supply for TTL output, TTL CLOCKOUT signal, LVDS
> >>  input,
> >>    PPL and digital circuitry
> >> 
> >> +- thine,map: LVDS mapping mode selection signal, pin name "MAP". Shall
> >> be <1>
> >> +  for mapping mode 1, <0> for mapping mode 2
> > 
> > Since the MAP pin is an input pin, I would expect there to be an optional
> > gpio specifier like thine,map-gpios so that the driver can set it
> > according to the value given in thine,map in case the HW has a line from
> > some gpio output to the MAP pin (instead of hardwired hi/low which seem
> > to be your thinking).
> 
> I see... As the only use case I had has the pin tied to vcc, I
> thought about making it a binary property, and I wonder in how many
> cases the chip 'MAP' pin would actually be GPIO controlled input and
> not an hardwired one instead. I don't see the LVDS mapping mode to be
> changed at runtime, but you are right, who knows....
> 
> Do you think we can add an options 'thine,map-gpios' property along
> to the proposed ones?

If the MAP pin is connected to an SoC-controlled GPIO for a given platform 
then we will likely need a thine,map-gpios property to control the pin. I 
think we can leave it out for now and add it later if the need arises.

The thine,map property serves a different purpose, it indicates the level of 
the MAP pin for platforms where the pin is hardwired. If we later introduce a 
thine,map-gpios property it should be mutually exclusive with the thine,map 
property. The level of the MAP pin should be then software-controlled, not set 
through DT.

> >>  Optional properties:
> >>  - powerdown-gpios: Power down GPIO signal, pin name "/PDWN". Active low
> >> 
> >> @@ -36,6 +38,7 @@ Example:
> >>  		vcc-supply = <&reg_lvds_vcc>;
> >>  		powerdown-gpios = <&gpio4 15 GPIO_ACTIVE_LOW>;
> >> +		thine,map = <1>;
> >> 
> >>  		ports {
> >>  			#address-cells = <1>;
Laurent Pinchart April 23, 2018, 12:02 p.m. UTC | #4
Hi Jacopo,

Thank you for the patch.

On Thursday, 19 April 2018 12:31:03 EEST Jacopo Mondi wrote:
> The THC63LVD1024 LVDS to RGB bridge supports two different input mapping
> modes, selectable by means of an external pin.
> 
> Describe the LVDS mode map through a newly defined mandatory property in
> device tree bindings.
> 
> Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
> ---
>  .../devicetree/bindings/display/bridge/thine,thc63lvd1024.txt          | 3
> +++ 1 file changed, 3 insertions(+)
> 
> diff --git
> a/Documentation/devicetree/bindings/display/bridge/thine,thc63lvd1024.txt
> b/Documentation/devicetree/bindings/display/bridge/thine,thc63lvd1024.txt
> index 37f0c04..0937595 100644
> ---
> a/Documentation/devicetree/bindings/display/bridge/thine,thc63lvd1024.txt
> +++
> b/Documentation/devicetree/bindings/display/bridge/thine,thc63lvd1024.txt
> @@ -12,6 +12,8 @@ Required properties:
>  - compatible: Shall be "thine,thc63lvd1024"
>  - vcc-supply: Power supply for TTL output, TTL CLOCKOUT signal, LVDS input,
> PPL and digital circuitry
> +- thine,map: LVDS mapping mode selection signal, pin name "MAP". Shall be
> <1>
> +  for mapping mode 1, <0> for mapping mode 2

That's sounds like an odd mapping. I suppose you have modeled it based on the 
state of the MAP pin instead of the mode number (MAP low means mode 2, MAP 
high means mode 1). To avoid confusing readers I would write it as

- thine,map: level of the MAP pin that selects the LVDS mapping mode. Shall be
  <0> for low level (mapping mode 2) or <1> for high level (mapping mode 1).

Apart from that this patch looks good to me.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

>  Optional properties:
>  - powerdown-gpios: Power down GPIO signal, pin name "/PDWN". Active low
> @@ -36,6 +38,7 @@ Example:
> 
>  		vcc-supply = <&reg_lvds_vcc>;
>  		powerdown-gpios = <&gpio4 15 GPIO_ACTIVE_LOW>;
> +		thine,map = <1>;
> 
>  		ports {
>  			#address-cells = <1>;
Rob Herring (Arm) April 24, 2018, 4:37 p.m. UTC | #5
On Thu, Apr 19, 2018 at 11:31:03AM +0200, Jacopo Mondi wrote:
> The THC63LVD1024 LVDS to RGB bridge supports two different input mapping
> modes, selectable by means of an external pin.
> 
> Describe the LVDS mode map through a newly defined mandatory property in
> device tree bindings.
> 
> Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
> ---
>  .../devicetree/bindings/display/bridge/thine,thc63lvd1024.txt          | 3 +++
>  1 file changed, 3 insertions(+)

+1 for what Laurent said.

Reviewed-by: Rob Herring <robh@kernel.org>
diff mbox

Patch

diff --git a/Documentation/devicetree/bindings/display/bridge/thine,thc63lvd1024.txt b/Documentation/devicetree/bindings/display/bridge/thine,thc63lvd1024.txt
index 37f0c04..0937595 100644
--- a/Documentation/devicetree/bindings/display/bridge/thine,thc63lvd1024.txt
+++ b/Documentation/devicetree/bindings/display/bridge/thine,thc63lvd1024.txt
@@ -12,6 +12,8 @@  Required properties:
 - compatible: Shall be "thine,thc63lvd1024"
 - vcc-supply: Power supply for TTL output, TTL CLOCKOUT signal, LVDS input,
   PPL and digital circuitry
+- thine,map: LVDS mapping mode selection signal, pin name "MAP". Shall be <1>
+  for mapping mode 1, <0> for mapping mode 2
 
 Optional properties:
 - powerdown-gpios: Power down GPIO signal, pin name "/PDWN". Active low
@@ -36,6 +38,7 @@  Example:
 
 		vcc-supply = <&reg_lvds_vcc>;
 		powerdown-gpios = <&gpio4 15 GPIO_ACTIVE_LOW>;
+		thine,map = <1>;
 
 		ports {
 			#address-cells = <1>;