devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCHv2 22/22] dt-bindings: tc358767: add IRQ & HPD support
       [not found] <20190326103146.24795-1-tomi.valkeinen@ti.com>
@ 2019-03-26 10:31 ` Tomi Valkeinen
  2019-03-31  6:42   ` Rob Herring
  2019-04-01 10:13   ` [PATCHv2.1 22/22] dt-bindings: tc358767: add " Tomi Valkeinen
  0 siblings, 2 replies; 4+ messages in thread
From: Tomi Valkeinen @ 2019-03-26 10:31 UTC (permalink / raw)
  To: Andrzej Hajda, Laurent Pinchart, dri-devel, Lucas Stach,
	Andrey Gusakov, Philipp Zabel, Andrey Smirnov, Jyri Sarha,
	Peter Ujfalusi, Benoit Parrot
  Cc: devicetree, Tomi Valkeinen

Add DT properties needed for IRQ and HPD support.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: devicetree@vger.kernel.org
Cc: Rob Herring <robh@kernel.org>
---

A quick summary of tc358767's HPD/GPIO support:

tc358767 has two pins that can be used as GPIOs. Those can be used for
HPD by configuring the pin as input. tc358767 supports HW detection of a
"short" HPD pulse (programmable length) which can be used to detect
DisplayPort IRQ from the monitor. Afaik, this kind of short pulse
detection is not possible with common GPIOs found in SoCs.

While I think the HPD support works ok, I'm unsure about the DT binding.
I first tried implementing the HPD as a gpiochip, but for interrupts I
then needed irqchip, and the amount of code started to increase a lot.

I decided that gpiochip + irqchip just isn't worth the effort and
complexity here, as most likely the pins will ever be used for HPD.

So, here I have a simple 'hpd-num' DT property to mark which (if any) of
the two GPIO pins is used for HPD.

Suggestions welcome.


 .../devicetree/bindings/display/bridge/toshiba,tc358767.txt    | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/Documentation/devicetree/bindings/display/bridge/toshiba,tc358767.txt b/Documentation/devicetree/bindings/display/bridge/toshiba,tc358767.txt
index e3f6aa6a214d..79c71e7eb71f 100644
--- a/Documentation/devicetree/bindings/display/bridge/toshiba,tc358767.txt
+++ b/Documentation/devicetree/bindings/display/bridge/toshiba,tc358767.txt
@@ -12,6 +12,9 @@ Optional properties:
                    (active high shutdown input)
  - reset-gpios: OF device-tree gpio specification for RSTX pin
                 (active low system reset)
+ - interrupt-parent: phandle of the parent interrupt controller
+ - interrupts: interrupt specifier for the bridge's interrupt
+ - hpd-num: TC358767 GPIO pin number to which HPD is connected to (0 or 1)
  - ports: the ports node can contain video interface port nodes to connect
    to a DPI/DSI source and to an eDP/DP sink according to [1][2]:
     - port@0: DSI input port
-- 
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

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

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

* Re: [PATCHv2 22/22] dt-bindings: tc358767: add IRQ & HPD support
  2019-03-26 10:31 ` [PATCHv2 22/22] dt-bindings: tc358767: add IRQ & HPD support Tomi Valkeinen
@ 2019-03-31  6:42   ` Rob Herring
  2019-04-01 10:13   ` [PATCHv2.1 22/22] dt-bindings: tc358767: add " Tomi Valkeinen
  1 sibling, 0 replies; 4+ messages in thread
From: Rob Herring @ 2019-03-31  6:42 UTC (permalink / raw)
  To: Tomi Valkeinen
  Cc: devicetree, Andrey Smirnov, Andrey Gusakov, Jyri Sarha, dri-devel,
	Peter Ujfalusi, Laurent Pinchart

On Tue, Mar 26, 2019 at 12:31:46PM +0200, Tomi Valkeinen wrote:
> Add DT properties needed for IRQ and HPD support.
> 
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
> Cc: devicetree@vger.kernel.org
> Cc: Rob Herring <robh@kernel.org>
> ---
> 
> A quick summary of tc358767's HPD/GPIO support:
> 
> tc358767 has two pins that can be used as GPIOs. Those can be used for
> HPD by configuring the pin as input. tc358767 supports HW detection of a
> "short" HPD pulse (programmable length) which can be used to detect
> DisplayPort IRQ from the monitor. Afaik, this kind of short pulse
> detection is not possible with common GPIOs found in SoCs.
> 
> While I think the HPD support works ok, I'm unsure about the DT binding.
> I first tried implementing the HPD as a gpiochip, but for interrupts I
> then needed irqchip, and the amount of code started to increase a lot.
> 
> I decided that gpiochip + irqchip just isn't worth the effort and
> complexity here, as most likely the pins will ever be used for HPD.
> 
> So, here I have a simple 'hpd-num' DT property to mark which (if any) of
> the two GPIO pins is used for HPD.

There's similar properties for other chips where some signal has a 
selectable pin assignment.

> 
> Suggestions welcome.
> 
> 
>  .../devicetree/bindings/display/bridge/toshiba,tc358767.txt    | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/display/bridge/toshiba,tc358767.txt b/Documentation/devicetree/bindings/display/bridge/toshiba,tc358767.txt
> index e3f6aa6a214d..79c71e7eb71f 100644
> --- a/Documentation/devicetree/bindings/display/bridge/toshiba,tc358767.txt
> +++ b/Documentation/devicetree/bindings/display/bridge/toshiba,tc358767.txt
> @@ -12,6 +12,9 @@ Optional properties:
>                     (active high shutdown input)
>   - reset-gpios: OF device-tree gpio specification for RSTX pin
>                  (active low system reset)
> + - interrupt-parent: phandle of the parent interrupt controller

Drop this, it is implied or in the parent.

> + - interrupts: interrupt specifier for the bridge's interrupt
> + - hpd-num: TC358767 GPIO pin number to which HPD is connected to (0 or 1)

ti,hpd-pin

>   - ports: the ports node can contain video interface port nodes to connect
>     to a DPI/DSI source and to an eDP/DP sink according to [1][2]:
>      - port@0: DSI input port
> -- 
> Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
> Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
> 

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

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

* [PATCHv2.1 22/22] dt-bindings: tc358767: add HPD support
  2019-03-26 10:31 ` [PATCHv2 22/22] dt-bindings: tc358767: add IRQ & HPD support Tomi Valkeinen
  2019-03-31  6:42   ` Rob Herring
@ 2019-04-01 10:13   ` Tomi Valkeinen
  2019-04-06  6:06     ` Rob Herring
  1 sibling, 1 reply; 4+ messages in thread
From: Tomi Valkeinen @ 2019-04-01 10:13 UTC (permalink / raw)
  To: Andrzej Hajda, Laurent Pinchart, dri-devel, Lucas Stach,
	Andrey Gusakov, Philipp Zabel, Andrey Smirnov, Jyri Sarha,
	Peter Ujfalusi, Benoit Parrot
  Cc: devicetree, Tomi Valkeinen

Add DT property for defining the pin used for HPD.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: devicetree@vger.kernel.org
Cc: Rob Herring <robh@kernel.org>
---

* Dropped the interrupt properties
* Renamed hpd-num to hpd-pin
* Added toshiba prefix for hpd-pin

 .../devicetree/bindings/display/bridge/toshiba,tc358767.txt      | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/display/bridge/toshiba,tc358767.txt b/Documentation/devicetree/bindings/display/bridge/toshiba,tc358767.txt
index e3f6aa6a214d..583c5e9dbe6b 100644
--- a/Documentation/devicetree/bindings/display/bridge/toshiba,tc358767.txt
+++ b/Documentation/devicetree/bindings/display/bridge/toshiba,tc358767.txt
@@ -12,6 +12,7 @@ Optional properties:
                    (active high shutdown input)
  - reset-gpios: OF device-tree gpio specification for RSTX pin
                 (active low system reset)
+ - toshiba,hpd-pin: TC358767 GPIO pin number to which HPD is connected to (0 or 1)
  - ports: the ports node can contain video interface port nodes to connect
    to a DPI/DSI source and to an eDP/DP sink according to [1][2]:
     - port@0: DSI input port
-- 
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

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

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

* Re: [PATCHv2.1 22/22] dt-bindings: tc358767: add HPD support
  2019-04-01 10:13   ` [PATCHv2.1 22/22] dt-bindings: tc358767: add " Tomi Valkeinen
@ 2019-04-06  6:06     ` Rob Herring
  0 siblings, 0 replies; 4+ messages in thread
From: Rob Herring @ 2019-04-06  6:06 UTC (permalink / raw)
  Cc: devicetree, Andrey Smirnov, Andrey Gusakov, Jyri Sarha, dri-devel,
	Peter Ujfalusi, Tomi Valkeinen, Laurent Pinchart

On Mon, 1 Apr 2019 13:13:08 +0300, Tomi Valkeinen wrote:
> Add DT property for defining the pin used for HPD.
> 
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
> Cc: devicetree@vger.kernel.org
> Cc: Rob Herring <robh@kernel.org>
> ---
> 
> * Dropped the interrupt properties
> * Renamed hpd-num to hpd-pin
> * Added toshiba prefix for hpd-pin
> 
>  .../devicetree/bindings/display/bridge/toshiba,tc358767.txt      | 1 +
>  1 file changed, 1 insertion(+)
> 

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

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

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

end of thread, other threads:[~2019-04-06  6:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20190326103146.24795-1-tomi.valkeinen@ti.com>
2019-03-26 10:31 ` [PATCHv2 22/22] dt-bindings: tc358767: add IRQ & HPD support Tomi Valkeinen
2019-03-31  6:42   ` Rob Herring
2019-04-01 10:13   ` [PATCHv2.1 22/22] dt-bindings: tc358767: add " Tomi Valkeinen
2019-04-06  6:06     ` Rob Herring

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).