Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1586157 > unrolled thread

[PATCH v2 0/3] media: dt-bindings: extend the vpif bindings

Started byBartosz Golaszewski <bgolaszewski@baylibre.com>
First post2017-02-22 14:50 +0100
Last post2017-02-28 13:10 +0100
Articles 9 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH v2 0/3] media: dt-bindings: extend the vpif bindings Bartosz Golaszewski <bgolaszewski@baylibre.com> - 2017-02-22 14:50 +0100
    [PATCH v2 3/3] media: dt-bindings: vpif: new optional property Bartosz Golaszewski <bgolaszewski@baylibre.com> - 2017-02-22 14:50 +0100
      Re: [PATCH v2 3/3] media: dt-bindings: vpif: new optional property Rob Herring <robh@kernel.org> - 2017-02-28 00:00 +0100
        Re: [PATCH v2 3/3] media: dt-bindings: vpif: new optional property Sekhar Nori <nsekhar@ti.com> - 2017-02-28 06:40 +0100
          Re: [PATCH v2 3/3] media: dt-bindings: vpif: new optional property Bartosz Golaszewski <bgolaszewski@baylibre.com> - 2017-02-28 13:00 +0100
          Re: [PATCH v2 3/3] media: dt-bindings: vpif: new optional property Rob Herring <robh@kernel.org> - 2017-02-28 15:30 +0100
    [PATCH v2 2/3] media: dt-bindings: vpif: extend the example with an output port Bartosz Golaszewski <bgolaszewski@baylibre.com> - 2017-02-22 14:50 +0100
      Re: [PATCH v2 2/3] media: dt-bindings: vpif: extend the example with  an output port Rob Herring <robh@kernel.org> - 2017-02-28 00:00 +0100
    Re: [PATCH v2 0/3] media: dt-bindings: extend the vpif bindings Sekhar Nori <nsekhar@ti.com> - 2017-02-28 13:10 +0100

#1586157 — [PATCH v2 0/3] media: dt-bindings: extend the vpif bindings

FromBartosz Golaszewski <bgolaszewski@baylibre.com>
Date2017-02-22 14:50 +0100
Subject[PATCH v2 0/3] media: dt-bindings: extend the vpif bindings
Message-ID<tdFsR-2p2-11@gated-at.bofh.it>
This series extends the DT bindings for TI vpif with an output
port and enable-gpios property.

The first patch just fixes a couple whitespace errors in the vpif
bindings.

The second extends the example with an output port since we want
to support vpif display too.

The third adds an optional property for selecting vpif functionality
by driving GPIOs which is needed on some boards.

v1 -> v2:
- added patch 3/3
- specified the purpose of port@0 and port@1 nodes

Bartosz Golaszewski (3):
  media: dt-bindings: vpif: fix whitespace errors
  media: dt-bindings: vpif: extend the example with an output port
  media: dt-bindings: vpif: new optional property

 .../devicetree/bindings/media/ti,da850-vpif.txt    | 57 +++++++++++++++++-----
 1 file changed, 44 insertions(+), 13 deletions(-)

-- 
2.9.3

[toc] | [next] | [standalone]


#1586158 — [PATCH v2 3/3] media: dt-bindings: vpif: new optional property

FromBartosz Golaszewski <bgolaszewski@baylibre.com>
Date2017-02-22 14:50 +0100
Subject[PATCH v2 3/3] media: dt-bindings: vpif: new optional property
Message-ID<tdFsR-2p2-13@gated-at.bofh.it>
In reply to#1586157
Add an optional property - enable-gpios - which can be used to specify
the GPIOs that must be requested to select the vpif functionality.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
---
 Documentation/devicetree/bindings/media/ti,da850-vpif.txt | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/Documentation/devicetree/bindings/media/ti,da850-vpif.txt b/Documentation/devicetree/bindings/media/ti,da850-vpif.txt
index df7182a..23c5405 100644
--- a/Documentation/devicetree/bindings/media/ti,da850-vpif.txt
+++ b/Documentation/devicetree/bindings/media/ti,da850-vpif.txt
@@ -13,6 +13,9 @@ Required properties:
 - reg: physical base address and length of the registers set for the device;
 - interrupts: should contain IRQ line for the VPIF
 
+Optional properties:
+- enable-gpios: phandle of the GPIOs used to select the vpif functionality
+
 Video Capture:
 
 VPIF has a 16-bit parallel bus input, supporting 2 8-bit channels or a
@@ -30,6 +33,10 @@ I2C-connected TVP5147 decoder:
 		reg = <0x217000 0x1000>;
 		interrupts = <92>;
 
+		enable-gpios = <&tca6416 7 GPIO_ACTIVE_HIGH
+				&tca6416 6 GPIO_ACTIVE_HIGH
+				&tca6416 5 GPIO_ACTIVE_LOW>;
+
 		port@0 {
 			vpif_input_ch0: endpoint@0 {
 				reg = <0>;
-- 
2.9.3

[toc] | [prev] | [next] | [standalone]


#1589026 — Re: [PATCH v2 3/3] media: dt-bindings: vpif: new optional property

FromRob Herring <robh@kernel.org>
Date2017-02-28 00:00 +0100
SubjectRe: [PATCH v2 3/3] media: dt-bindings: vpif: new optional property
Message-ID<tfCqS-3Po-17@gated-at.bofh.it>
In reply to#1586158
On Wed, Feb 22, 2017 at 02:43:47PM +0100, Bartosz Golaszewski wrote:
> Add an optional property - enable-gpios - which can be used to specify
> the GPIOs that must be requested to select the vpif functionality.
> 
> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> ---
>  Documentation/devicetree/bindings/media/ti,da850-vpif.txt | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/media/ti,da850-vpif.txt b/Documentation/devicetree/bindings/media/ti,da850-vpif.txt
> index df7182a..23c5405 100644
> --- a/Documentation/devicetree/bindings/media/ti,da850-vpif.txt
> +++ b/Documentation/devicetree/bindings/media/ti,da850-vpif.txt
> @@ -13,6 +13,9 @@ Required properties:
>  - reg: physical base address and length of the registers set for the device;
>  - interrupts: should contain IRQ line for the VPIF
>  
> +Optional properties:
> +- enable-gpios: phandle of the GPIOs used to select the vpif functionality

What does this control exactly? The GPIOs belong in the node they are 
connected to and having GPIOs routed to this block seems strange.

There are inputs or outputs?

> +
>  Video Capture:
>  
>  VPIF has a 16-bit parallel bus input, supporting 2 8-bit channels or a
> @@ -30,6 +33,10 @@ I2C-connected TVP5147 decoder:
>  		reg = <0x217000 0x1000>;
>  		interrupts = <92>;
>  
> +		enable-gpios = <&tca6416 7 GPIO_ACTIVE_HIGH
> +				&tca6416 6 GPIO_ACTIVE_HIGH
> +				&tca6416 5 GPIO_ACTIVE_LOW>;
> +
>  		port@0 {
>  			vpif_input_ch0: endpoint@0 {
>  				reg = <0>;
> -- 
> 2.9.3
> 

[toc] | [prev] | [next] | [standalone]


#1589187 — Re: [PATCH v2 3/3] media: dt-bindings: vpif: new optional property

FromSekhar Nori <nsekhar@ti.com>
Date2017-02-28 06:40 +0100
SubjectRe: [PATCH v2 3/3] media: dt-bindings: vpif: new optional property
Message-ID<tfIFX-8oQ-13@gated-at.bofh.it>
In reply to#1589026
On Tuesday 28 February 2017 04:22 AM, Rob Herring wrote:
> On Wed, Feb 22, 2017 at 02:43:47PM +0100, Bartosz Golaszewski wrote:
>> Add an optional property - enable-gpios - which can be used to specify
>> the GPIOs that must be requested to select the vpif functionality.
>>
>> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
>> ---
>>  Documentation/devicetree/bindings/media/ti,da850-vpif.txt | 7 +++++++
>>  1 file changed, 7 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/media/ti,da850-vpif.txt b/Documentation/devicetree/bindings/media/ti,da850-vpif.txt
>> index df7182a..23c5405 100644
>> --- a/Documentation/devicetree/bindings/media/ti,da850-vpif.txt
>> +++ b/Documentation/devicetree/bindings/media/ti,da850-vpif.txt
>> @@ -13,6 +13,9 @@ Required properties:
>>  - reg: physical base address and length of the registers set for the device;
>>  - interrupts: should contain IRQ line for the VPIF
>>  
>> +Optional properties:
>> +- enable-gpios: phandle of the GPIOs used to select the vpif functionality
> 
> What does this control exactly? The GPIOs belong in the node they are 
> connected to and having GPIOs routed to this block seems strange.

The DA850 EVM board implements on-board muxing which lets the video
input (via VPIF) to be routed to a TVP5147 (video decoder) for composite
input or to a camera header. There are other mux options which use the
same VPIF SoC pins (RMII ethernet or character LCD).

There is a three-to-eight demux on the board which drives enable signals
to buffers letting you choose from these options.

From your response, it looks like you want the enable-gpios property to
be in the TVP5147 or camera node. That does make sense to me.

>
> There are inputs or outputs?

These GPIOs are driving a 3-to-8 demux so they are all outputs.

Thanks,
Sekhar

[toc] | [prev] | [next] | [standalone]


#1589390 — Re: [PATCH v2 3/3] media: dt-bindings: vpif: new optional property

FromBartosz Golaszewski <bgolaszewski@baylibre.com>
Date2017-02-28 13:00 +0100
SubjectRe: [PATCH v2 3/3] media: dt-bindings: vpif: new optional property
Message-ID<tfOBI-3VC-17@gated-at.bofh.it>
In reply to#1589187
2017-02-28 6:36 GMT+01:00 Sekhar Nori <nsekhar@ti.com>:
> On Tuesday 28 February 2017 04:22 AM, Rob Herring wrote:
>> On Wed, Feb 22, 2017 at 02:43:47PM +0100, Bartosz Golaszewski wrote:
>>> Add an optional property - enable-gpios - which can be used to specify
>>> the GPIOs that must be requested to select the vpif functionality.
>>>
>>> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
>>> ---
>>>  Documentation/devicetree/bindings/media/ti,da850-vpif.txt | 7 +++++++
>>>  1 file changed, 7 insertions(+)
>>>
>>> diff --git a/Documentation/devicetree/bindings/media/ti,da850-vpif.txt b/Documentation/devicetree/bindings/media/ti,da850-vpif.txt
>>> index df7182a..23c5405 100644
>>> --- a/Documentation/devicetree/bindings/media/ti,da850-vpif.txt
>>> +++ b/Documentation/devicetree/bindings/media/ti,da850-vpif.txt
>>> @@ -13,6 +13,9 @@ Required properties:
>>>  - reg: physical base address and length of the registers set for the device;
>>>  - interrupts: should contain IRQ line for the VPIF
>>>
>>> +Optional properties:
>>> +- enable-gpios: phandle of the GPIOs used to select the vpif functionality
>>
>> What does this control exactly? The GPIOs belong in the node they are
>> connected to and having GPIOs routed to this block seems strange.
>
> The DA850 EVM board implements on-board muxing which lets the video
> input (via VPIF) to be routed to a TVP5147 (video decoder) for composite
> input or to a camera header. There are other mux options which use the
> same VPIF SoC pins (RMII ethernet or character LCD).
>
> There is a three-to-eight demux on the board which drives enable signals
> to buffers letting you choose from these options.
>
> From your response, it looks like you want the enable-gpios property to
> be in the TVP5147 or camera node. That does make sense to me.
>

Wouldn't that cause races again? The TVP5147 ADC is probed from within
the vpif driver as a media subdev (after initialize_vpif(),
v4l2_device_register(), irq requests etc.).

Thanks,
Bartosz

[toc] | [prev] | [next] | [standalone]


#1589506 — Re: [PATCH v2 3/3] media: dt-bindings: vpif: new optional property

FromRob Herring <robh@kernel.org>
Date2017-02-28 15:30 +0100
SubjectRe: [PATCH v2 3/3] media: dt-bindings: vpif: new optional property
Message-ID<tfQWR-5Cn-15@gated-at.bofh.it>
In reply to#1589187
On Mon, Feb 27, 2017 at 11:36 PM, Sekhar Nori <nsekhar@ti.com> wrote:
> On Tuesday 28 February 2017 04:22 AM, Rob Herring wrote:
>> On Wed, Feb 22, 2017 at 02:43:47PM +0100, Bartosz Golaszewski wrote:
>>> Add an optional property - enable-gpios - which can be used to specify
>>> the GPIOs that must be requested to select the vpif functionality.
>>>
>>> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
>>> ---
>>>  Documentation/devicetree/bindings/media/ti,da850-vpif.txt | 7 +++++++
>>>  1 file changed, 7 insertions(+)
>>>
>>> diff --git a/Documentation/devicetree/bindings/media/ti,da850-vpif.txt b/Documentation/devicetree/bindings/media/ti,da850-vpif.txt
>>> index df7182a..23c5405 100644
>>> --- a/Documentation/devicetree/bindings/media/ti,da850-vpif.txt
>>> +++ b/Documentation/devicetree/bindings/media/ti,da850-vpif.txt
>>> @@ -13,6 +13,9 @@ Required properties:
>>>  - reg: physical base address and length of the registers set for the device;
>>>  - interrupts: should contain IRQ line for the VPIF
>>>
>>> +Optional properties:
>>> +- enable-gpios: phandle of the GPIOs used to select the vpif functionality
>>
>> What does this control exactly? The GPIOs belong in the node they are
>> connected to and having GPIOs routed to this block seems strange.
>
> The DA850 EVM board implements on-board muxing which lets the video
> input (via VPIF) to be routed to a TVP5147 (video decoder) for composite
> input or to a camera header. There are other mux options which use the
> same VPIF SoC pins (RMII ethernet or character LCD).
>
> There is a three-to-eight demux on the board which drives enable signals
> to buffers letting you choose from these options.
>
> From your response, it looks like you want the enable-gpios property to
> be in the TVP5147 or camera node. That does make sense to me.

Well, seems like they should be part of a mux node. I'd suggest you
look at the video-multiplexer binding under review[1].

Though for other non video functions, that would be some sort of board
level pin mux control. There's a new mux binding too, maybe that would
work. In any case, it shouldn't be the VPIF driver controlling the
GPIOs directly.

Rob

[1] https://lkml.org/lkml/2017/1/6/1056

[toc] | [prev] | [next] | [standalone]


#1586160 — [PATCH v2 2/3] media: dt-bindings: vpif: extend the example with an output port

FromBartosz Golaszewski <bgolaszewski@baylibre.com>
Date2017-02-22 14:50 +0100
Subject[PATCH v2 2/3] media: dt-bindings: vpif: extend the example with an output port
Message-ID<tdFsR-2p2-17@gated-at.bofh.it>
In reply to#1586157
This makes the example more or less correspond with the da850-evm
hardware setup.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
---
 .../devicetree/bindings/media/ti,da850-vpif.txt    | 40 +++++++++++++++++-----
 1 file changed, 32 insertions(+), 8 deletions(-)

diff --git a/Documentation/devicetree/bindings/media/ti,da850-vpif.txt b/Documentation/devicetree/bindings/media/ti,da850-vpif.txt
index 9c7510b..df7182a 100644
--- a/Documentation/devicetree/bindings/media/ti,da850-vpif.txt
+++ b/Documentation/devicetree/bindings/media/ti,da850-vpif.txt
@@ -16,8 +16,10 @@ Required properties:
 Video Capture:
 
 VPIF has a 16-bit parallel bus input, supporting 2 8-bit channels or a
-single 16-bit channel.  It should contain at least one port child node
-with child 'endpoint' node. Please refer to the bindings defined in
+single 16-bit channel. It should contain one or two port child nodes
+with child 'endpoint' node. If there are two ports then port@0 must
+describe the input and port@1 output channels. Please refer to the
+bindings defined in
 Documentation/devicetree/bindings/media/video-interfaces.txt.
 
 Example using 2 8-bit input channels, one of which is connected to an
@@ -28,19 +30,26 @@ I2C-connected TVP5147 decoder:
 		reg = <0x217000 0x1000>;
 		interrupts = <92>;
 
-		port {
-			vpif_ch0: endpoint@0 {
+		port@0 {
+			vpif_input_ch0: endpoint@0 {
 				reg = <0>;
 				bus-width = <8>;
-				remote-endpoint = <&composite>;
+				remote-endpoint = <&composite_in>;
 			};
 
-			vpif_ch1: endpoint@1 {
+			vpif_input_ch1: endpoint@1 {
 				reg = <1>;
 				bus-width = <8>;
 				data-shift = <8>;
 			};
 		};
+
+		port@1 {
+			vpif_output_ch0: endpoint {
+				bus-width = <8>;
+				remote-endpoint = <&composite_out>;
+			};
+		};
 	};
 
 [ ... ]
@@ -53,13 +62,28 @@ I2C-connected TVP5147 decoder:
 		status = "okay";
 
 		port {
-			composite: endpoint {
+			composite_in: endpoint {
 				hsync-active = <1>;
 				vsync-active = <1>;
 				pclk-sample = <0>;
 
 				/* VPIF channel 0 (lower 8-bits) */
-				remote-endpoint = <&vpif_ch0>;
+				remote-endpoint = <&vpif_input_ch0>;
+				bus-width = <8>;
+			};
+		};
+	};
+
+	adv7343@2a {
+		compatible = "adi,adv7343";
+		reg = <0x2a>;
+
+		port {
+			composite_out: endpoint {
+				adi,dac-enable = <1 1 1>;
+				adi,sd-dac-enable = <1>;
+
+				remote-endpoint = <&vpif_output_ch0>;
 				bus-width = <8>;
 			};
 		};
-- 
2.9.3

[toc] | [prev] | [next] | [standalone]


#1589032 — Re: [PATCH v2 2/3] media: dt-bindings: vpif: extend the example with an output port

FromRob Herring <robh@kernel.org>
Date2017-02-28 00:00 +0100
SubjectRe: [PATCH v2 2/3] media: dt-bindings: vpif: extend the example with an output port
Message-ID<tfCqT-3Po-33@gated-at.bofh.it>
In reply to#1586160
On Wed, Feb 22, 2017 at 02:43:46PM +0100, Bartosz Golaszewski wrote:
> This makes the example more or less correspond with the da850-evm
> hardware setup.
> 
> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> ---
>  .../devicetree/bindings/media/ti,da850-vpif.txt    | 40 +++++++++++++++++-----
>  1 file changed, 32 insertions(+), 8 deletions(-)

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

[toc] | [prev] | [next] | [standalone]


#1589397

FromSekhar Nori <nsekhar@ti.com>
Date2017-02-28 13:10 +0100
Message-ID<tfOLo-4dY-13@gated-at.bofh.it>
In reply to#1586157
On Wednesday 22 February 2017 07:13 PM, Bartosz Golaszewski wrote:
> This series extends the DT bindings for TI vpif with an output
> port and enable-gpios property.

This needs to go through Hans / Mauro and the media subsystem list. Can
you please send with them copied next time.

Thanks,
Sekhar

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web