linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/2] media: soc_camera: rcar_vin: add fallback and r8a7792 bindings
@ 2016-03-15  0:40 Simon Horman
  2016-03-15  0:40 ` [PATCH v4 1/2] media: soc_camera: rcar_vin: add R-Car Gen 2 and 3 fallback compatibility strings Simon Horman
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Simon Horman @ 2016-03-15  0:40 UTC (permalink / raw)
  To: Guennadi Liakhovetski
  Cc: Laurent Pinchart, Magnus Damm, linux-media, linux-renesas-soc,
	Geert Uytterhoeven, Simon Horman

Hi,

this short series adds add fallback and r8a7792 bindings to rcar_vin.

Based on media-tree/master

Changes since v3:
* Add Acks
* Correct typo in changelog

Simon Horman (1):
  media: soc_camera: rcar_vin: add device tree support for r8a7792

Yoshihiro Kaneko (1):
  media: soc_camera: rcar_vin: add R-Car Gen 2 and 3 fallback
    compatibility strings

 Documentation/devicetree/bindings/media/rcar_vin.txt | 12 ++++++++++--
 drivers/media/platform/soc_camera/rcar_vin.c         |  2 ++
 2 files changed, 12 insertions(+), 2 deletions(-)

-- 
2.1.4


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

* [PATCH v4 1/2] media: soc_camera: rcar_vin: add R-Car Gen 2 and 3 fallback compatibility strings
  2016-03-15  0:40 [PATCH v4 0/2] media: soc_camera: rcar_vin: add fallback and r8a7792 bindings Simon Horman
@ 2016-03-15  0:40 ` Simon Horman
  2016-03-15  0:40 ` [PATCH v4 2/2] media: soc_camera: rcar_vin: add device tree support for r8a7792 Simon Horman
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 7+ messages in thread
From: Simon Horman @ 2016-03-15  0:40 UTC (permalink / raw)
  To: Guennadi Liakhovetski
  Cc: Laurent Pinchart, Magnus Damm, linux-media, linux-renesas-soc,
	Geert Uytterhoeven, Yoshihiro Kaneko, Simon Horman

From: Yoshihiro Kaneko <ykaneko0929@gmail.com>

Add fallback compatibility string for R-Car Gen 1 and 2.

In the case of Renesas R-Car hardware we know that there are generations of
SoCs, e.g. Gen 2 and 3. But beyond that its not clear what the relationship
between IP blocks might be. For example, I believe that r8a7790 is older
than r8a7791 but that doesn't imply that the latter is a descendant of the
former or vice versa.

We can, however, by examining the documentation and behaviour of the
hardware at run-time observe that the current driver implementation appears
to be compatible with the IP blocks on SoCs within a given generation.

For the above reasons and convenience when enabling new SoCs a
per-generation fallback compatibility string scheme being adopted for
drivers for Renesas SoCs.

Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
v4 [Simon Horman]
* Added Ack from Geert Uytterhoeven

v3 [Simon Horman]
* Reworked and expanded changelog.
* Minor documentation enhancements.

v2 [Yoshihiro Kaneko]
* As suggested by Geert Uytterhoeven
  drivers/media/platform/soc_camera/rcar_vin.c:
    - The generic compatibility values are listed at the end of the
      rcar_vin_of_table[].

v1 [Yoshihiro Kaneko]
---
 Documentation/devicetree/bindings/media/rcar_vin.txt | 11 +++++++++--
 drivers/media/platform/soc_camera/rcar_vin.c         |  2 ++
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/media/rcar_vin.txt b/Documentation/devicetree/bindings/media/rcar_vin.txt
index 619193ccf7ff..4266123888ed 100644
--- a/Documentation/devicetree/bindings/media/rcar_vin.txt
+++ b/Documentation/devicetree/bindings/media/rcar_vin.txt
@@ -5,7 +5,7 @@ The rcar_vin device provides video input capabilities for the Renesas R-Car
 family of devices. The current blocks are always slaves and suppot one input
 channel which can be either RGB, YUYV or BT656.
 
- - compatible: Must be one of the following
+ - compatible: Must be one or more of the following
    - "renesas,vin-r8a7795" for the R8A7795 device
    - "renesas,vin-r8a7794" for the R8A7794 device
    - "renesas,vin-r8a7793" for the R8A7793 device
@@ -13,6 +13,13 @@ channel which can be either RGB, YUYV or BT656.
    - "renesas,vin-r8a7790" for the R8A7790 device
    - "renesas,vin-r8a7779" for the R8A7779 device
    - "renesas,vin-r8a7778" for the R8A7778 device
+   - "renesas,rcar-gen2-vin" for a generic R-Car Gen2 compatible device.
+   - "renesas,rcar-gen3-vin" for a generic R-Car Gen3 compatible device.
+
+   When compatible with the generic version nodes must list the
+   SoC-specific version corresponding to the platform first
+   followed by the generic version.
+
  - reg: the register base and size for the device registers
  - interrupts: the interrupt for the device
  - clocks: Reference to the parent clock
@@ -37,7 +44,7 @@ Device node example
 	};
 
         vin0: vin@0xe6ef0000 {
-                compatible = "renesas,vin-r8a7790";
+                compatible = "renesas,vin-r8a7790", "renesas,rcar-gen2-vin";
                 clocks = <&mstp8_clks R8A7790_CLK_VIN0>;
                 reg = <0 0xe6ef0000 0 0x1000>;
                 interrupts = <0 188 IRQ_TYPE_LEVEL_HIGH>;
diff --git a/drivers/media/platform/soc_camera/rcar_vin.c b/drivers/media/platform/soc_camera/rcar_vin.c
index 3b8edf458964..3f9c1b8456c3 100644
--- a/drivers/media/platform/soc_camera/rcar_vin.c
+++ b/drivers/media/platform/soc_camera/rcar_vin.c
@@ -1845,6 +1845,8 @@ static const struct of_device_id rcar_vin_of_table[] = {
 	{ .compatible = "renesas,vin-r8a7790", .data = (void *)RCAR_GEN2 },
 	{ .compatible = "renesas,vin-r8a7779", .data = (void *)RCAR_H1 },
 	{ .compatible = "renesas,vin-r8a7778", .data = (void *)RCAR_M1 },
+	{ .compatible = "renesas,rcar-gen3-vin", .data = (void *)RCAR_GEN3 },
+	{ .compatible = "renesas,rcar-gen2-vin", .data = (void *)RCAR_GEN2 },
 	{ },
 };
 MODULE_DEVICE_TABLE(of, rcar_vin_of_table);
-- 
2.1.4


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

* [PATCH v4 2/2] media: soc_camera: rcar_vin: add device tree support for r8a7792
  2016-03-15  0:40 [PATCH v4 0/2] media: soc_camera: rcar_vin: add fallback and r8a7792 bindings Simon Horman
  2016-03-15  0:40 ` [PATCH v4 1/2] media: soc_camera: rcar_vin: add R-Car Gen 2 and 3 fallback compatibility strings Simon Horman
@ 2016-03-15  0:40 ` Simon Horman
  2016-04-05 20:56   ` Guennadi Liakhovetski
  2016-03-17 11:08 ` [PATCH v4 0/2] media: soc_camera: rcar_vin: add fallback and r8a7792 bindings Laurent Pinchart
  2016-03-25  2:20 ` Simon Horman
  3 siblings, 1 reply; 7+ messages in thread
From: Simon Horman @ 2016-03-15  0:40 UTC (permalink / raw)
  To: Guennadi Liakhovetski
  Cc: Laurent Pinchart, Magnus Damm, linux-media, linux-renesas-soc,
	Geert Uytterhoeven, Simon Horman

Simply document new compatibility string.
As a previous patch adds a generic R-Car Gen2 compatibility string
there appears to be no need for a driver updates.

By documenting this compat string it may be used in DTSs shipped, for
example as part of ROMs. It must be used in conjunction with the Gen2
fallback compat string. At this time there are no known differences between
the r8a7792 IP block and that implemented by the driver for the Gen2
fallback compat string. Thus there is no need to update the driver as the
use of the Gen2 fallback compat string will activate the correct code in
the current driver while leaving the option for r8a7792-specific driver
code to be activated in an updated driver should the need arise.

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
v4
* s/sting/string/ in changelog
* Added Ack from Geert Uytterhoeven

v3
* New patch
---
 Documentation/devicetree/bindings/media/rcar_vin.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/media/rcar_vin.txt b/Documentation/devicetree/bindings/media/rcar_vin.txt
index 4266123888ed..6a4e61cbe011 100644
--- a/Documentation/devicetree/bindings/media/rcar_vin.txt
+++ b/Documentation/devicetree/bindings/media/rcar_vin.txt
@@ -9,6 +9,7 @@ channel which can be either RGB, YUYV or BT656.
    - "renesas,vin-r8a7795" for the R8A7795 device
    - "renesas,vin-r8a7794" for the R8A7794 device
    - "renesas,vin-r8a7793" for the R8A7793 device
+   - "renesas,vin-r8a7792" for the R8A7792 device
    - "renesas,vin-r8a7791" for the R8A7791 device
    - "renesas,vin-r8a7790" for the R8A7790 device
    - "renesas,vin-r8a7779" for the R8A7779 device
-- 
2.1.4


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

* Re: [PATCH v4 0/2] media: soc_camera: rcar_vin: add fallback and r8a7792 bindings
  2016-03-15  0:40 [PATCH v4 0/2] media: soc_camera: rcar_vin: add fallback and r8a7792 bindings Simon Horman
  2016-03-15  0:40 ` [PATCH v4 1/2] media: soc_camera: rcar_vin: add R-Car Gen 2 and 3 fallback compatibility strings Simon Horman
  2016-03-15  0:40 ` [PATCH v4 2/2] media: soc_camera: rcar_vin: add device tree support for r8a7792 Simon Horman
@ 2016-03-17 11:08 ` Laurent Pinchart
  2016-03-25  2:20 ` Simon Horman
  3 siblings, 0 replies; 7+ messages in thread
From: Laurent Pinchart @ 2016-03-17 11:08 UTC (permalink / raw)
  To: Simon Horman
  Cc: Guennadi Liakhovetski, Laurent Pinchart, Magnus Damm,
	linux-media, linux-renesas-soc, Geert Uytterhoeven

Hi Simon,

Thank you for the patches.

For the whole series,

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

On Tuesday 15 March 2016 09:40:25 Simon Horman wrote:
> Hi,
> 
> this short series adds add fallback and r8a7792 bindings to rcar_vin.
> 
> Based on media-tree/master
> 
> Changes since v3:
> * Add Acks
> * Correct typo in changelog
> 
> Simon Horman (1):
>   media: soc_camera: rcar_vin: add device tree support for r8a7792
> 
> Yoshihiro Kaneko (1):
>   media: soc_camera: rcar_vin: add R-Car Gen 2 and 3 fallback
>     compatibility strings
> 
>  Documentation/devicetree/bindings/media/rcar_vin.txt | 12 ++++++++++--
>  drivers/media/platform/soc_camera/rcar_vin.c         |  2 ++
>  2 files changed, 12 insertions(+), 2 deletions(-)

-- 
Regards,

Laurent Pinchart


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

* Re: [PATCH v4 0/2] media: soc_camera: rcar_vin: add fallback and r8a7792 bindings
  2016-03-15  0:40 [PATCH v4 0/2] media: soc_camera: rcar_vin: add fallback and r8a7792 bindings Simon Horman
                   ` (2 preceding siblings ...)
  2016-03-17 11:08 ` [PATCH v4 0/2] media: soc_camera: rcar_vin: add fallback and r8a7792 bindings Laurent Pinchart
@ 2016-03-25  2:20 ` Simon Horman
  3 siblings, 0 replies; 7+ messages in thread
From: Simon Horman @ 2016-03-25  2:20 UTC (permalink / raw)
  To: Guennadi Liakhovetski
  Cc: Laurent Pinchart, Magnus Damm, linux-media, linux-renesas-soc,
	Geert Uytterhoeven

On Tue, Mar 15, 2016 at 09:40:25AM +0900, Simon Horman wrote:
> Hi,
> 
> this short series adds add fallback and r8a7792 bindings to rcar_vin.
> 
> Based on media-tree/master

Hi Guennadi,

I am wondering if you could consider applying this series too.
It still applies cleanly on top of media-tree/master.

Thanks in advance!

> 
> Changes since v3:
> * Add Acks
> * Correct typo in changelog
> 
> Simon Horman (1):
>   media: soc_camera: rcar_vin: add device tree support for r8a7792
> 
> Yoshihiro Kaneko (1):
>   media: soc_camera: rcar_vin: add R-Car Gen 2 and 3 fallback
>     compatibility strings
> 
>  Documentation/devicetree/bindings/media/rcar_vin.txt | 12 ++++++++++--
>  drivers/media/platform/soc_camera/rcar_vin.c         |  2 ++
>  2 files changed, 12 insertions(+), 2 deletions(-)
> 
> -- 
> 2.1.4
> 

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

* Re: [PATCH v4 2/2] media: soc_camera: rcar_vin: add device tree support for r8a7792
  2016-03-15  0:40 ` [PATCH v4 2/2] media: soc_camera: rcar_vin: add device tree support for r8a7792 Simon Horman
@ 2016-04-05 20:56   ` Guennadi Liakhovetski
  2016-04-05 21:19     ` Geert Uytterhoeven
  0 siblings, 1 reply; 7+ messages in thread
From: Guennadi Liakhovetski @ 2016-04-05 20:56 UTC (permalink / raw)
  To: Simon Horman
  Cc: Laurent Pinchart, Magnus Damm, linux-media, linux-renesas-soc,
	Geert Uytterhoeven

Hi Simon,

On Tue, 15 Mar 2016, Simon Horman wrote:

> Simply document new compatibility string.
> As a previous patch adds a generic R-Car Gen2 compatibility string
> there appears to be no need for a driver updates.
> 
> By documenting this compat string it may be used in DTSs shipped, for
> example as part of ROMs. It must be used in conjunction with the Gen2
> fallback compat string. At this time there are no known differences between
> the r8a7792 IP block and that implemented by the driver for the Gen2
> fallback compat string. Thus there is no need to update the driver as the
> use of the Gen2 fallback compat string will activate the correct code in
> the current driver while leaving the option for r8a7792-specific driver
> code to be activated in an updated driver should the need arise.
> 
> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
> Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>

Strictly speaking, I see an ack from Geert to patch 1/2, but I don't see 
one for this patch 2/2. Have I missed it or did Geert mean to ack the 
whole series and forgot to mention that?

Thanks
Guennadi

> ---
> v4
> * s/sting/string/ in changelog
> * Added Ack from Geert Uytterhoeven
> 
> v3
> * New patch
> ---
>  Documentation/devicetree/bindings/media/rcar_vin.txt | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/Documentation/devicetree/bindings/media/rcar_vin.txt b/Documentation/devicetree/bindings/media/rcar_vin.txt
> index 4266123888ed..6a4e61cbe011 100644
> --- a/Documentation/devicetree/bindings/media/rcar_vin.txt
> +++ b/Documentation/devicetree/bindings/media/rcar_vin.txt
> @@ -9,6 +9,7 @@ channel which can be either RGB, YUYV or BT656.
>     - "renesas,vin-r8a7795" for the R8A7795 device
>     - "renesas,vin-r8a7794" for the R8A7794 device
>     - "renesas,vin-r8a7793" for the R8A7793 device
> +   - "renesas,vin-r8a7792" for the R8A7792 device
>     - "renesas,vin-r8a7791" for the R8A7791 device
>     - "renesas,vin-r8a7790" for the R8A7790 device
>     - "renesas,vin-r8a7779" for the R8A7779 device
> -- 
> 2.1.4
> 

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

* Re: [PATCH v4 2/2] media: soc_camera: rcar_vin: add device tree support for r8a7792
  2016-04-05 20:56   ` Guennadi Liakhovetski
@ 2016-04-05 21:19     ` Geert Uytterhoeven
  0 siblings, 0 replies; 7+ messages in thread
From: Geert Uytterhoeven @ 2016-04-05 21:19 UTC (permalink / raw)
  To: Guennadi Liakhovetski
  Cc: Simon Horman, Laurent Pinchart, Magnus Damm,
	Linux Media Mailing List, linux-renesas-soc

Hi Guennadi,

On Tue, Apr 5, 2016 at 10:56 PM, Guennadi Liakhovetski
<g.liakhovetski@gmx.de> wrote:
> On Tue, 15 Mar 2016, Simon Horman wrote:
>> Simply document new compatibility string.
>> As a previous patch adds a generic R-Car Gen2 compatibility string
>> there appears to be no need for a driver updates.
>>
>> By documenting this compat string it may be used in DTSs shipped, for
>> example as part of ROMs. It must be used in conjunction with the Gen2
>> fallback compat string. At this time there are no known differences between
>> the r8a7792 IP block and that implemented by the driver for the Gen2
>> fallback compat string. Thus there is no need to update the driver as the
>> use of the Gen2 fallback compat string will activate the correct code in
>> the current driver while leaving the option for r8a7792-specific driver
>> code to be activated in an updated driver should the need arise.
>>
>> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
>> Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
>
> Strictly speaking, I see an ack from Geert to patch 1/2, but I don't see
> one for this patch 2/2. Have I missed it or did Geert mean to ack the
> whole series and forgot to mention that?

Sorry, apparently I replied with the "sting" comment and my ack to Simon only,
not to all.

Hence FTR:
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

end of thread, other threads:[~2016-04-05 21:19 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-15  0:40 [PATCH v4 0/2] media: soc_camera: rcar_vin: add fallback and r8a7792 bindings Simon Horman
2016-03-15  0:40 ` [PATCH v4 1/2] media: soc_camera: rcar_vin: add R-Car Gen 2 and 3 fallback compatibility strings Simon Horman
2016-03-15  0:40 ` [PATCH v4 2/2] media: soc_camera: rcar_vin: add device tree support for r8a7792 Simon Horman
2016-04-05 20:56   ` Guennadi Liakhovetski
2016-04-05 21:19     ` Geert Uytterhoeven
2016-03-17 11:08 ` [PATCH v4 0/2] media: soc_camera: rcar_vin: add fallback and r8a7792 bindings Laurent Pinchart
2016-03-25  2:20 ` Simon Horman

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