mbox series

[v5,0/6] media: rcar-vin: Brush endpoint properties

Message ID 1531145962-1540-1-git-send-email-jacopo+renesas@jmondi.org
Headers show
Series media: rcar-vin: Brush endpoint properties | expand

Message

Jacopo Mondi July 9, 2018, 2:19 p.m. UTC
Hello,
   based on Niklas', Laurent's and Sakari's comments on v4, here it is a new
version of this series brushing R-Car VIN interface device tree bindings
description.

The interface supports the following configurable properties:
- hsync, vsync and data-enable signal polarities
- field signal polarity during even field
- parallel data bus widht and data shift.

As preferred by Niklas, I have listed the properties in the Gen2 section of the
bindings documentation, and referred to them in the Gen3 one.

The series, as v4 did, does introduce a new properties in 'video-interfaces.txt'
and for this reason the audiance is still a little larger than v3.

Thanks
   j

Jacopo Mondi (6):
  dt-bindings: media: rcar-vin: Align Gen2 and Gen3
  dt-bindings: media: rcar-vin: Describe optional ep properties
  dt-bindings: media: Document data-enable-active property
  media: v4l2-fwnode: parse 'data-enable-active' prop
  dt-bindings: media: rcar-vin: Add 'data-enable-active'
  media: rcar-vin: Handle data-enable polarity

 .../devicetree/bindings/media/rcar_vin.txt         | 29 +++++++++++++++++++---
 .../devicetree/bindings/media/video-interfaces.txt |  2 ++
 drivers/media/platform/rcar-vin/rcar-dma.c         |  5 ++++
 drivers/media/v4l2-core/v4l2-fwnode.c              |  4 +++
 include/media/v4l2-mediabus.h                      |  2 ++
 5 files changed, 38 insertions(+), 4 deletions(-)

--
2.7.4

Comments

Jacopo Mondi July 9, 2018, 2:26 p.m. UTC | #1
Ah ups,
   I initially had this one in the series (see, it's [7/7]), then I
dropped it not to sparkle any more debate, and re-generated patches,
but forget to remove this one, which has been sent with the rest of
the series.

So please ignore it.

Sorry for the noise.
   j

On Mon, Jul 09, 2018 at 04:19:22PM +0200, Jacopo Mondi wrote:
> Remove from VIN interface description properties that are not listed as
> supported in bindings documentation, as their value is fixed in the hardware.
>
> Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
> ---
>  arch/arm/boot/dts/r8a7790-lager.dts   | 2 --
>  arch/arm/boot/dts/r8a7791-koelsch.dts | 2 --
>  arch/arm/boot/dts/r8a7793-gose.dts    | 2 --
>  3 files changed, 6 deletions(-)
>
> diff --git a/arch/arm/boot/dts/r8a7790-lager.dts b/arch/arm/boot/dts/r8a7790-lager.dts
> index 092610e..250f698 100644
> --- a/arch/arm/boot/dts/r8a7790-lager.dts
> +++ b/arch/arm/boot/dts/r8a7790-lager.dts
> @@ -888,8 +888,6 @@
>  			bus-width = <24>;
>  			hsync-active = <0>;
>  			vsync-active = <0>;
> -			pclk-sample = <1>;
> -			data-active = <1>;
>  		};
>  	};
>  };
> diff --git a/arch/arm/boot/dts/r8a7791-koelsch.dts b/arch/arm/boot/dts/r8a7791-koelsch.dts
> index 8ab793d..1becb79 100644
> --- a/arch/arm/boot/dts/r8a7791-koelsch.dts
> +++ b/arch/arm/boot/dts/r8a7791-koelsch.dts
> @@ -860,8 +860,6 @@
>  			bus-width = <24>;
>  			hsync-active = <0>;
>  			vsync-active = <0>;
> -			pclk-sample = <1>;
> -			data-active = <1>;
>  		};
>  	};
>  };
> diff --git a/arch/arm/boot/dts/r8a7793-gose.dts b/arch/arm/boot/dts/r8a7793-gose.dts
> index aa209f6..f57a7ae 100644
> --- a/arch/arm/boot/dts/r8a7793-gose.dts
> +++ b/arch/arm/boot/dts/r8a7793-gose.dts
> @@ -768,8 +768,6 @@
>  			bus-width = <24>;
>  			hsync-active = <0>;
>  			vsync-active = <0>;
> -			pclk-sample = <1>;
> -			data-active = <1>;
>  		};
>  	};
>  };
> --
> 2.7.4
>
Rob Herring July 11, 2018, 1:51 p.m. UTC | #2
On Mon, Jul 09, 2018 at 04:19:16PM +0200, Jacopo Mondi wrote:
> Align description of the Gen2 and Gen3 bindings for parallel input.
> This commit prepares for description of optional endpoint properties in ports
> subnodes accepting parallel video connections.
> 
> Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
> ---
>  Documentation/devicetree/bindings/media/rcar_vin.txt | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)

Reviewed-by: Rob Herring <robh@kernel.org>
Niklas Söderlund July 12, 2018, 8:13 a.m. UTC | #3
Hi Jacopo,

On 2018-07-09 16:19:18 +0200, Jacopo Mondi wrote:
> Add 'data-enable-active' property to endpoint node properties list.
> 
> The property allows to specify the polarity of the data-enable signal, which
> when in active state determinates when data lines have to sampled for valid
> pixel data.
> 
> Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
> Reviewed-by: Rob Herring <robh@kernel.org>

Acked-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>

> ---
>  Documentation/devicetree/bindings/media/video-interfaces.txt | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/media/video-interfaces.txt b/Documentation/devicetree/bindings/media/video-interfaces.txt
> index 52b7c7b..baf9d97 100644
> --- a/Documentation/devicetree/bindings/media/video-interfaces.txt
> +++ b/Documentation/devicetree/bindings/media/video-interfaces.txt
> @@ -113,6 +113,8 @@ Optional endpoint properties
>    Note, that if HSYNC and VSYNC polarities are not specified, embedded
>    synchronization may be required, where supported.
>  - data-active: similar to HSYNC and VSYNC, specifies data line polarity.
> +- data-enable-active: similar to HSYNC and VSYNC, specifies the data enable
> +  signal polarity.
>  - field-even-active: field signal level during the even field data transmission.
>  - pclk-sample: sample data on rising (1) or falling (0) edge of the pixel clock
>    signal.
> -- 
> 2.7.4
>
Niklas Söderlund July 12, 2018, 8:14 a.m. UTC | #4
Hi Jacopo,

On 2018-07-09 16:19:16 +0200, Jacopo Mondi wrote:
> Align description of the Gen2 and Gen3 bindings for parallel input.
> This commit prepares for description of optional endpoint properties in ports
> subnodes accepting parallel video connections.
> 
> Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>

Acked-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>

> ---
>  Documentation/devicetree/bindings/media/rcar_vin.txt | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/media/rcar_vin.txt b/Documentation/devicetree/bindings/media/rcar_vin.txt
> index e25ab07..39c4e6a 100644
> --- a/Documentation/devicetree/bindings/media/rcar_vin.txt
> +++ b/Documentation/devicetree/bindings/media/rcar_vin.txt
> @@ -39,9 +39,11 @@ Additionally, an alias named vinX will need to be created to specify
>  which video input device this is.
>  
>  The per-board settings Gen2 platforms:
> - - port sub-node describing a single endpoint connected to the vin
> -   as described in video-interfaces.txt[1]. Only the first one will
> -   be considered as each vin interface has one input port.
> +
> +- port - sub-node describing a single endpoint connected to the VIN
> +  from external SoC pins as described in video-interfaces.txt[1].
> +  Only the first one will be considered as each vin interface has one
> +  input port.
>  
>  The per-board settings Gen3 platforms:
>  
> @@ -52,7 +54,7 @@ from local SoC CSI-2 receivers (port@1) depending on SoC.
>  - renesas,id - ID number of the VIN, VINx in the documentation.
>  - ports
>      - port@0 - sub-node describing a single endpoint connected to the VIN
> -      from external SoC pins described in video-interfaces.txt[1].
> +      from external SoC pins as described in video-interfaces.txt[1].
>        Describing more than one endpoint in port@0 is invalid. Only VIN
>        instances that are connected to external pins should have port@0.
>      - port@1 - sub-nodes describing one or more endpoints connected to
> -- 
> 2.7.4
>