netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH can-next 0/2] CAN: rcar: add fallback and r8a779[234] bindings
@ 2016-02-22  2:15 Simon Horman
  2016-02-22  2:15 ` [PATCH can-next 1/2] CAN: rcar: add gen[12] fallback compatibility strings Simon Horman
  2016-02-22  2:15 ` [PATCH can-next 2/2] CAN: rcar: add device tree support for r8a779[234] Simon Horman
  0 siblings, 2 replies; 11+ messages in thread
From: Simon Horman @ 2016-02-22  2:15 UTC (permalink / raw)
  To: Wolfgang Grandegger, Marc Kleine-Budde
  Cc: Magnus Damm, linux-can, netdev, linux-renesas-soc, devicetree,
	Simon Horman

Hi,

this series adds fallback bindings for R-Car Gen 1 and Gen 2 SoCs,
and SoC-specific bindings for the r8a779[234] SoCs which are
of the R-Car Gen 2 SoCs.

The aim is to provide consistent bindings for R-Car Gen 1 and Gen 2
SoCs in a maner consistent with that progressively being used
for drivers for other IP blocks used by Renesas SoCs.

Simon Horman (2):
  CAN: rcar: add gen[12] fallback compatibility strings
  CAN: rcar: add device tree support for r8a779[234]

 Documentation/devicetree/bindings/net/can/rcar_can.txt | 7 ++++++-
 drivers/net/can/rcar_can.c                             | 5 +++++
 2 files changed, 11 insertions(+), 1 deletion(-)

-- 
2.1.4

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

* [PATCH can-next 1/2] CAN: rcar: add gen[12] fallback compatibility strings
  2016-02-22  2:15 [PATCH can-next 0/2] CAN: rcar: add fallback and r8a779[234] bindings Simon Horman
@ 2016-02-22  2:15 ` Simon Horman
  2016-02-22  3:37   ` Rob Herring
  2016-02-22 15:40   ` Geert Uytterhoeven
  2016-02-22  2:15 ` [PATCH can-next 2/2] CAN: rcar: add device tree support for r8a779[234] Simon Horman
  1 sibling, 2 replies; 11+ messages in thread
From: Simon Horman @ 2016-02-22  2:15 UTC (permalink / raw)
  To: Wolfgang Grandegger, Marc Kleine-Budde
  Cc: Magnus Damm, linux-can, netdev, linux-renesas-soc, devicetree,
	Simon Horman

Add fallback compatibility string for R-Car Gen 1 and Gen2 families.
This is in keeping with the fallback scheme being adopted wherever
appropriate for drivers for Renesas SoCs.

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
 Documentation/devicetree/bindings/net/can/rcar_can.txt | 4 +++-
 drivers/net/can/rcar_can.c                             | 2 ++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/net/can/rcar_can.txt b/Documentation/devicetree/bindings/net/can/rcar_can.txt
index 002d8440bf66..036786e1f70d 100644
--- a/Documentation/devicetree/bindings/net/can/rcar_can.txt
+++ b/Documentation/devicetree/bindings/net/can/rcar_can.txt
@@ -6,6 +6,8 @@ Required properties:
 	      "renesas,can-r8a7779" if CAN controller is a part of R8A7779 SoC.
 	      "renesas,can-r8a7790" if CAN controller is a part of R8A7790 SoC.
 	      "renesas,can-r8a7791" if CAN controller is a part of R8A7791 SoC.
+	      "renesas,can-gen1" for a generic R-Car Gen1 compatible device.
+	      "renesas,can-gen2" for a generic R-Car Gen2 compatible device.
 - reg: physical base address and size of the R-Car CAN register map.
 - interrupts: interrupt specifier for the sole interrupt.
 - clocks: phandles and clock specifiers for 3 CAN clock inputs.
@@ -25,7 +27,7 @@ Example
 SoC common .dtsi file:
 
 	can0: can@e6e80000 {
-		compatible = "renesas,can-r8a7791";
+		compatible = "renesas,can-r8a7791", "renesas,can-gen2";
 		reg = <0 0xe6e80000 0 0x1000>;
 		interrupts = <0 186 IRQ_TYPE_LEVEL_HIGH>;
 		clocks = <&mstp9_clks R8A7791_CLK_RCAN0>,
diff --git a/drivers/net/can/rcar_can.c b/drivers/net/can/rcar_can.c
index bc46be39549d..c70a1f795933 100644
--- a/drivers/net/can/rcar_can.c
+++ b/drivers/net/can/rcar_can.c
@@ -904,6 +904,8 @@ static const struct of_device_id rcar_can_of_table[] __maybe_unused = {
 	{ .compatible = "renesas,can-r8a7779" },
 	{ .compatible = "renesas,can-r8a7790" },
 	{ .compatible = "renesas,can-r8a7791" },
+	{ .compatible = "renesas,can-gen1" },
+	{ .compatible = "renesas,can-gen2" },
 	{ }
 };
 MODULE_DEVICE_TABLE(of, rcar_can_of_table);
-- 
2.1.4

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

* [PATCH can-next 2/2] CAN: rcar: add device tree support for r8a779[234]
  2016-02-22  2:15 [PATCH can-next 0/2] CAN: rcar: add fallback and r8a779[234] bindings Simon Horman
  2016-02-22  2:15 ` [PATCH can-next 1/2] CAN: rcar: add gen[12] fallback compatibility strings Simon Horman
@ 2016-02-22  2:15 ` Simon Horman
  2016-02-22  3:36   ` Rob Herring
  2016-02-22 13:48   ` Geert Uytterhoeven
  1 sibling, 2 replies; 11+ messages in thread
From: Simon Horman @ 2016-02-22  2:15 UTC (permalink / raw)
  To: Wolfgang Grandegger, Marc Kleine-Budde
  Cc: Magnus Damm, linux-can, netdev, linux-renesas-soc, devicetree,
	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 sting 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 r8a779[234] IP blocks 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 r8a779[234]-specific driver
code to be activated in an updated driver should the need arise.

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
---
 Documentation/devicetree/bindings/net/can/rcar_can.txt | 3 +++
 drivers/net/can/rcar_can.c                             | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/Documentation/devicetree/bindings/net/can/rcar_can.txt b/Documentation/devicetree/bindings/net/can/rcar_can.txt
index 036786e1f70d..c6fb74d7c809 100644
--- a/Documentation/devicetree/bindings/net/can/rcar_can.txt
+++ b/Documentation/devicetree/bindings/net/can/rcar_can.txt
@@ -6,6 +6,9 @@ Required properties:
 	      "renesas,can-r8a7779" if CAN controller is a part of R8A7779 SoC.
 	      "renesas,can-r8a7790" if CAN controller is a part of R8A7790 SoC.
 	      "renesas,can-r8a7791" if CAN controller is a part of R8A7791 SoC.
+	      "renesas,can-r8a7792" if CAN controller is a part of R8A7792 SoC.
+	      "renesas,can-r8a7793" if CAN controller is a part of R8A7793 SoC.
+	      "renesas,can-r8a7794" if CAN controller is a part of R8A7794 SoC.
 	      "renesas,can-gen1" for a generic R-Car Gen1 compatible device.
 	      "renesas,can-gen2" for a generic R-Car Gen2 compatible device.
 - reg: physical base address and size of the R-Car CAN register map.
diff --git a/drivers/net/can/rcar_can.c b/drivers/net/can/rcar_can.c
index c70a1f795933..73761a4dd1bf 100644
--- a/drivers/net/can/rcar_can.c
+++ b/drivers/net/can/rcar_can.c
@@ -904,6 +904,9 @@ static const struct of_device_id rcar_can_of_table[] __maybe_unused = {
 	{ .compatible = "renesas,can-r8a7779" },
 	{ .compatible = "renesas,can-r8a7790" },
 	{ .compatible = "renesas,can-r8a7791" },
+	{ .compatible = "renesas,can-r8a7792" },
+	{ .compatible = "renesas,can-r8a7793" },
+	{ .compatible = "renesas,can-r8a7794" },
 	{ .compatible = "renesas,can-gen1" },
 	{ .compatible = "renesas,can-gen2" },
 	{ }
-- 
2.1.4


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

* Re: [PATCH can-next 2/2] CAN: rcar: add device tree support for r8a779[234]
  2016-02-22  2:15 ` [PATCH can-next 2/2] CAN: rcar: add device tree support for r8a779[234] Simon Horman
@ 2016-02-22  3:36   ` Rob Herring
  2016-02-22 13:48   ` Geert Uytterhoeven
  1 sibling, 0 replies; 11+ messages in thread
From: Rob Herring @ 2016-02-22  3:36 UTC (permalink / raw)
  To: Simon Horman
  Cc: Wolfgang Grandegger, Marc Kleine-Budde, Magnus Damm, linux-can,
	netdev, linux-renesas-soc, devicetree

On Mon, Feb 22, 2016 at 11:15:50AM +0900, 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 sting 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 r8a779[234] IP blocks 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 r8a779[234]-specific driver
> code to be activated in an updated driver should the need arise.
> 
> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
> ---
>  Documentation/devicetree/bindings/net/can/rcar_can.txt | 3 +++
>  drivers/net/can/rcar_can.c                             | 3 +++
>  2 files changed, 6 insertions(+)

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

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

* Re: [PATCH can-next 1/2] CAN: rcar: add gen[12] fallback compatibility strings
  2016-02-22  2:15 ` [PATCH can-next 1/2] CAN: rcar: add gen[12] fallback compatibility strings Simon Horman
@ 2016-02-22  3:37   ` Rob Herring
  2016-02-22  9:40     ` Marc Kleine-Budde
  2016-02-22 15:40   ` Geert Uytterhoeven
  1 sibling, 1 reply; 11+ messages in thread
From: Rob Herring @ 2016-02-22  3:37 UTC (permalink / raw)
  To: Simon Horman
  Cc: Wolfgang Grandegger, Marc Kleine-Budde, Magnus Damm, linux-can,
	netdev, linux-renesas-soc, devicetree

On Mon, Feb 22, 2016 at 11:15:49AM +0900, Simon Horman wrote:
> Add fallback compatibility string for R-Car Gen 1 and Gen2 families.
> This is in keeping with the fallback scheme being adopted wherever
> appropriate for drivers for Renesas SoCs.
> 
> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
> ---
>  Documentation/devicetree/bindings/net/can/rcar_can.txt | 4 +++-
>  drivers/net/can/rcar_can.c                             | 2 ++
>  2 files changed, 5 insertions(+), 1 deletion(-)

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

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

* Re: [PATCH can-next 1/2] CAN: rcar: add gen[12] fallback compatibility strings
  2016-02-22  3:37   ` Rob Herring
@ 2016-02-22  9:40     ` Marc Kleine-Budde
  2016-02-23  0:08       ` Simon Horman
  0 siblings, 1 reply; 11+ messages in thread
From: Marc Kleine-Budde @ 2016-02-22  9:40 UTC (permalink / raw)
  To: Rob Herring, Simon Horman
  Cc: Wolfgang Grandegger, Magnus Damm, linux-can, netdev,
	linux-renesas-soc, devicetree

[-- Attachment #1: Type: text/plain, Size: 1422 bytes --]

On 02/22/2016 04:37 AM, Rob Herring wrote:
> On Mon, Feb 22, 2016 at 11:15:49AM +0900, Simon Horman wrote:
>> Add fallback compatibility string for R-Car Gen 1 and Gen2 families.
>> This is in keeping with the fallback scheme being adopted wherever
>> appropriate for drivers for Renesas SoCs.
>>
>> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
>> ---
>>  Documentation/devicetree/bindings/net/can/rcar_can.txt | 4 +++-
>>  drivers/net/can/rcar_can.c                             | 2 ++
>>  2 files changed, 5 insertions(+), 1 deletion(-)
> 
> Acked-by: Rob Herring <robh@kernel.org>

I'm not following the latest DT discussions, is there a (new) decision
to add such "generic" compatibles? AFAIK you add the oldest device
that's compatible with your driver to your SoC dtsi at rightmost
compatible. You can add one that identifies your SoC's IP core in front
of it. So there's no need to modify the driver until an IP core needs
different handling.

In your case you'd identify the oldest SoC that implements the Gen1 IP
core and use this instead of "renesas,can-gen1. Same for Gen2 IP core.

regards,
Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 455 bytes --]

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

* Re: [PATCH can-next 2/2] CAN: rcar: add device tree support for r8a779[234]
  2016-02-22  2:15 ` [PATCH can-next 2/2] CAN: rcar: add device tree support for r8a779[234] Simon Horman
  2016-02-22  3:36   ` Rob Herring
@ 2016-02-22 13:48   ` Geert Uytterhoeven
  2016-02-23  0:02     ` Simon Horman
  1 sibling, 1 reply; 11+ messages in thread
From: Geert Uytterhoeven @ 2016-02-22 13:48 UTC (permalink / raw)
  To: Simon Horman
  Cc: Wolfgang Grandegger, Marc Kleine-Budde, Magnus Damm, linux-can,
	netdev, linux-renesas-soc, devicetree

On Mon, Feb 22, 2016 at 3:15 AM, Simon Horman
<horms+renesas@verge.net.au> 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 sting it may be used in DTSs shipped, for

string

> 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 r8a779[234] IP blocks 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 r8a779[234]-specific driver
> code to be activated in an updated driver should the need arise.
>
> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
> ---
>  Documentation/devicetree/bindings/net/can/rcar_can.txt | 3 +++
>  drivers/net/can/rcar_can.c                             | 3 +++
>  2 files changed, 6 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/net/can/rcar_can.txt b/Documentation/devicetree/bindings/net/can/rcar_can.txt
> index 036786e1f70d..c6fb74d7c809 100644
> --- a/Documentation/devicetree/bindings/net/can/rcar_can.txt
> +++ b/Documentation/devicetree/bindings/net/can/rcar_can.txt
> @@ -6,6 +6,9 @@ Required properties:
>               "renesas,can-r8a7779" if CAN controller is a part of R8A7779 SoC.
>               "renesas,can-r8a7790" if CAN controller is a part of R8A7790 SoC.
>               "renesas,can-r8a7791" if CAN controller is a part of R8A7791 SoC.
> +             "renesas,can-r8a7792" if CAN controller is a part of R8A7792 SoC.
> +             "renesas,can-r8a7793" if CAN controller is a part of R8A7793 SoC.
> +             "renesas,can-r8a7794" if CAN controller is a part of R8A7794 SoC.
>               "renesas,can-gen1" for a generic R-Car Gen1 compatible device.
>               "renesas,can-gen2" for a generic R-Car Gen2 compatible device.
>  - reg: physical base address and size of the R-Car CAN register map.
> diff --git a/drivers/net/can/rcar_can.c b/drivers/net/can/rcar_can.c
> index c70a1f795933..73761a4dd1bf 100644
> --- a/drivers/net/can/rcar_can.c
> +++ b/drivers/net/can/rcar_can.c
> @@ -904,6 +904,9 @@ static const struct of_device_id rcar_can_of_table[] __maybe_unused = {
>         { .compatible = "renesas,can-r8a7779" },
>         { .compatible = "renesas,can-r8a7790" },
>         { .compatible = "renesas,can-r8a7791" },
> +       { .compatible = "renesas,can-r8a7792" },
> +       { .compatible = "renesas,can-r8a7793" },
> +       { .compatible = "renesas,can-r8a7794" },

So why do you update the driver?

There's no upstream DTS using "renesas,can-r8a779[234]", so
"renesas,can-gen2" should be fine.

>         { .compatible = "renesas,can-gen1" },
>         { .compatible = "renesas,can-gen2" },
>         { }

Gr{oetje,eeting}s,

                        Geert

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

* Re: [PATCH can-next 1/2] CAN: rcar: add gen[12] fallback compatibility strings
  2016-02-22  2:15 ` [PATCH can-next 1/2] CAN: rcar: add gen[12] fallback compatibility strings Simon Horman
  2016-02-22  3:37   ` Rob Herring
@ 2016-02-22 15:40   ` Geert Uytterhoeven
  2016-02-23  0:03     ` Simon Horman
  1 sibling, 1 reply; 11+ messages in thread
From: Geert Uytterhoeven @ 2016-02-22 15:40 UTC (permalink / raw)
  To: Simon Horman
  Cc: Wolfgang Grandegger, Marc Kleine-Budde, Magnus Damm, linux-can,
	netdev, linux-renesas-soc, devicetree

On Mon, Feb 22, 2016 at 3:15 AM, Simon Horman
<horms+renesas@verge.net.au> wrote:
> Add fallback compatibility string for R-Car Gen 1 and Gen2 families.
> This is in keeping with the fallback scheme being adopted wherever
> appropriate for drivers for Renesas SoCs.
>
> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
> ---
>  Documentation/devicetree/bindings/net/can/rcar_can.txt | 4 +++-
>  drivers/net/can/rcar_can.c                             | 2 ++
>  2 files changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/net/can/rcar_can.txt b/Documentation/devicetree/bindings/net/can/rcar_can.txt
> index 002d8440bf66..036786e1f70d 100644
> --- a/Documentation/devicetree/bindings/net/can/rcar_can.txt
> +++ b/Documentation/devicetree/bindings/net/can/rcar_can.txt
> @@ -6,6 +6,8 @@ Required properties:
>               "renesas,can-r8a7779" if CAN controller is a part of R8A7779 SoC.
>               "renesas,can-r8a7790" if CAN controller is a part of R8A7790 SoC.
>               "renesas,can-r8a7791" if CAN controller is a part of R8A7791 SoC.
> +             "renesas,can-gen1" for a generic R-Car Gen1 compatible device.
> +             "renesas,can-gen2" for a generic R-Car Gen2 compatible device.

"renesas,rcar-gen1-can", "renesas,rcar-gen2-can"?

(Yeah, "can" looks a lot like "rcar" ;-)

Nothing further to say about SoC-specific vs. generic compatible values?

>  - reg: physical base address and size of the R-Car CAN register map.
>  - interrupts: interrupt specifier for the sole interrupt.
>  - clocks: phandles and clock specifiers for 3 CAN clock inputs.
> @@ -25,7 +27,7 @@ Example
>  SoC common .dtsi file:
>
>         can0: can@e6e80000 {
> -               compatible = "renesas,can-r8a7791";
> +               compatible = "renesas,can-r8a7791", "renesas,can-gen2";

"renesas,rcar-gen2-can".

>                 reg = <0 0xe6e80000 0 0x1000>;
>                 interrupts = <0 186 IRQ_TYPE_LEVEL_HIGH>;
>                 clocks = <&mstp9_clks R8A7791_CLK_RCAN0>,
> diff --git a/drivers/net/can/rcar_can.c b/drivers/net/can/rcar_can.c
> index bc46be39549d..c70a1f795933 100644
> --- a/drivers/net/can/rcar_can.c
> +++ b/drivers/net/can/rcar_can.c
> @@ -904,6 +904,8 @@ static const struct of_device_id rcar_can_of_table[] __maybe_unused = {
>         { .compatible = "renesas,can-r8a7779" },
>         { .compatible = "renesas,can-r8a7790" },
>         { .compatible = "renesas,can-r8a7791" },
> +       { .compatible = "renesas,can-gen1" },
> +       { .compatible = "renesas,can-gen2" },

"renesas,rcar-gen1-can"
"renesas,rcar-gen2-can".

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] 11+ messages in thread

* Re: [PATCH can-next 2/2] CAN: rcar: add device tree support for r8a779[234]
  2016-02-22 13:48   ` Geert Uytterhoeven
@ 2016-02-23  0:02     ` Simon Horman
  0 siblings, 0 replies; 11+ messages in thread
From: Simon Horman @ 2016-02-23  0:02 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Wolfgang Grandegger, Marc Kleine-Budde, Magnus Damm, linux-can,
	netdev, linux-renesas-soc, devicetree

On Mon, Feb 22, 2016 at 02:48:39PM +0100, Geert Uytterhoeven wrote:
> On Mon, Feb 22, 2016 at 3:15 AM, Simon Horman
> <horms+renesas@verge.net.au> 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 sting it may be used in DTSs shipped, for
> 
> string
> 
> > 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 r8a779[234] IP blocks 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 r8a779[234]-specific driver
> > code to be activated in an updated driver should the need arise.
> >
> > Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
> > ---
> >  Documentation/devicetree/bindings/net/can/rcar_can.txt | 3 +++
> >  drivers/net/can/rcar_can.c                             | 3 +++
> >  2 files changed, 6 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/net/can/rcar_can.txt b/Documentation/devicetree/bindings/net/can/rcar_can.txt
> > index 036786e1f70d..c6fb74d7c809 100644
> > --- a/Documentation/devicetree/bindings/net/can/rcar_can.txt
> > +++ b/Documentation/devicetree/bindings/net/can/rcar_can.txt
> > @@ -6,6 +6,9 @@ Required properties:
> >               "renesas,can-r8a7779" if CAN controller is a part of R8A7779 SoC.
> >               "renesas,can-r8a7790" if CAN controller is a part of R8A7790 SoC.
> >               "renesas,can-r8a7791" if CAN controller is a part of R8A7791 SoC.
> > +             "renesas,can-r8a7792" if CAN controller is a part of R8A7792 SoC.
> > +             "renesas,can-r8a7793" if CAN controller is a part of R8A7793 SoC.
> > +             "renesas,can-r8a7794" if CAN controller is a part of R8A7794 SoC.
> >               "renesas,can-gen1" for a generic R-Car Gen1 compatible device.
> >               "renesas,can-gen2" for a generic R-Car Gen2 compatible device.
> >  - reg: physical base address and size of the R-Car CAN register map.
> > diff --git a/drivers/net/can/rcar_can.c b/drivers/net/can/rcar_can.c
> > index c70a1f795933..73761a4dd1bf 100644
> > --- a/drivers/net/can/rcar_can.c
> > +++ b/drivers/net/can/rcar_can.c
> > @@ -904,6 +904,9 @@ static const struct of_device_id rcar_can_of_table[] __maybe_unused = {
> >         { .compatible = "renesas,can-r8a7779" },
> >         { .compatible = "renesas,can-r8a7790" },
> >         { .compatible = "renesas,can-r8a7791" },
> > +       { .compatible = "renesas,can-r8a7792" },
> > +       { .compatible = "renesas,can-r8a7793" },
> > +       { .compatible = "renesas,can-r8a7794" },
> 
> So why do you update the driver?
> 
> There's no upstream DTS using "renesas,can-r8a779[234]", so
> "renesas,can-gen2" should be fine.

True. I'm not sure how that slipped in.

> >         { .compatible = "renesas,can-gen1" },
> >         { .compatible = "renesas,can-gen2" },
> >         { }
> 
> 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] 11+ messages in thread

* Re: [PATCH can-next 1/2] CAN: rcar: add gen[12] fallback compatibility strings
  2016-02-22 15:40   ` Geert Uytterhoeven
@ 2016-02-23  0:03     ` Simon Horman
  0 siblings, 0 replies; 11+ messages in thread
From: Simon Horman @ 2016-02-23  0:03 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Wolfgang Grandegger, Marc Kleine-Budde, Magnus Damm, linux-can,
	netdev, linux-renesas-soc, devicetree

On Mon, Feb 22, 2016 at 04:40:39PM +0100, Geert Uytterhoeven wrote:
> On Mon, Feb 22, 2016 at 3:15 AM, Simon Horman
> <horms+renesas@verge.net.au> wrote:
> > Add fallback compatibility string for R-Car Gen 1 and Gen2 families.
> > This is in keeping with the fallback scheme being adopted wherever
> > appropriate for drivers for Renesas SoCs.
> >
> > Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
> > ---
> >  Documentation/devicetree/bindings/net/can/rcar_can.txt | 4 +++-
> >  drivers/net/can/rcar_can.c                             | 2 ++
> >  2 files changed, 5 insertions(+), 1 deletion(-)
> >
> > diff --git a/Documentation/devicetree/bindings/net/can/rcar_can.txt b/Documentation/devicetree/bindings/net/can/rcar_can.txt
> > index 002d8440bf66..036786e1f70d 100644
> > --- a/Documentation/devicetree/bindings/net/can/rcar_can.txt
> > +++ b/Documentation/devicetree/bindings/net/can/rcar_can.txt
> > @@ -6,6 +6,8 @@ Required properties:
> >               "renesas,can-r8a7779" if CAN controller is a part of R8A7779 SoC.
> >               "renesas,can-r8a7790" if CAN controller is a part of R8A7790 SoC.
> >               "renesas,can-r8a7791" if CAN controller is a part of R8A7791 SoC.
> > +             "renesas,can-gen1" for a generic R-Car Gen1 compatible device.
> > +             "renesas,can-gen2" for a generic R-Car Gen2 compatible device.
> 
> "renesas,rcar-gen1-can", "renesas,rcar-gen2-can"?
> 
> (Yeah, "can" looks a lot like "rcar" ;-)

Sure, I'll update that as you suggest.

> Nothing further to say about SoC-specific vs. generic compatible values?

Sure, I'll add some text about that.

> >  - reg: physical base address and size of the R-Car CAN register map.
> >  - interrupts: interrupt specifier for the sole interrupt.
> >  - clocks: phandles and clock specifiers for 3 CAN clock inputs.
> > @@ -25,7 +27,7 @@ Example
> >  SoC common .dtsi file:
> >
> >         can0: can@e6e80000 {
> > -               compatible = "renesas,can-r8a7791";
> > +               compatible = "renesas,can-r8a7791", "renesas,can-gen2";
> 
> "renesas,rcar-gen2-can".
> 
> >                 reg = <0 0xe6e80000 0 0x1000>;
> >                 interrupts = <0 186 IRQ_TYPE_LEVEL_HIGH>;
> >                 clocks = <&mstp9_clks R8A7791_CLK_RCAN0>,
> > diff --git a/drivers/net/can/rcar_can.c b/drivers/net/can/rcar_can.c
> > index bc46be39549d..c70a1f795933 100644
> > --- a/drivers/net/can/rcar_can.c
> > +++ b/drivers/net/can/rcar_can.c
> > @@ -904,6 +904,8 @@ static const struct of_device_id rcar_can_of_table[] __maybe_unused = {
> >         { .compatible = "renesas,can-r8a7779" },
> >         { .compatible = "renesas,can-r8a7790" },
> >         { .compatible = "renesas,can-r8a7791" },
> > +       { .compatible = "renesas,can-gen1" },
> > +       { .compatible = "renesas,can-gen2" },
> 
> "renesas,rcar-gen1-can"
> "renesas,rcar-gen2-can".
> 
> 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] 11+ messages in thread

* Re: [PATCH can-next 1/2] CAN: rcar: add gen[12] fallback compatibility strings
  2016-02-22  9:40     ` Marc Kleine-Budde
@ 2016-02-23  0:08       ` Simon Horman
  0 siblings, 0 replies; 11+ messages in thread
From: Simon Horman @ 2016-02-23  0:08 UTC (permalink / raw)
  To: Marc Kleine-Budde
  Cc: Rob Herring, Wolfgang Grandegger, Magnus Damm, linux-can, netdev,
	linux-renesas-soc, devicetree

On Mon, Feb 22, 2016 at 10:40:37AM +0100, Marc Kleine-Budde wrote:
> On 02/22/2016 04:37 AM, Rob Herring wrote:
> > On Mon, Feb 22, 2016 at 11:15:49AM +0900, Simon Horman wrote:
> >> Add fallback compatibility string for R-Car Gen 1 and Gen2 families.
> >> This is in keeping with the fallback scheme being adopted wherever
> >> appropriate for drivers for Renesas SoCs.
> >>
> >> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
> >> ---
> >>  Documentation/devicetree/bindings/net/can/rcar_can.txt | 4 +++-
> >>  drivers/net/can/rcar_can.c                             | 2 ++
> >>  2 files changed, 5 insertions(+), 1 deletion(-)
> > 
> > Acked-by: Rob Herring <robh@kernel.org>
> 
> I'm not following the latest DT discussions, is there a (new) decision
> to add such "generic" compatibles? AFAIK you add the oldest device
> that's compatible with your driver to your SoC dtsi at rightmost
> compatible. You can add one that identifies your SoC's IP core in front
> of it. So there's no need to modify the driver until an IP core needs
> different handling.
> 
> In your case you'd identify the oldest SoC that implements the Gen1 IP
> core and use this instead of "renesas,can-gen1. Same for Gen2 IP core.

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

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

end of thread, other threads:[~2016-02-23  0:08 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-22  2:15 [PATCH can-next 0/2] CAN: rcar: add fallback and r8a779[234] bindings Simon Horman
2016-02-22  2:15 ` [PATCH can-next 1/2] CAN: rcar: add gen[12] fallback compatibility strings Simon Horman
2016-02-22  3:37   ` Rob Herring
2016-02-22  9:40     ` Marc Kleine-Budde
2016-02-23  0:08       ` Simon Horman
2016-02-22 15:40   ` Geert Uytterhoeven
2016-02-23  0:03     ` Simon Horman
2016-02-22  2:15 ` [PATCH can-next 2/2] CAN: rcar: add device tree support for r8a779[234] Simon Horman
2016-02-22  3:36   ` Rob Herring
2016-02-22 13:48   ` Geert Uytterhoeven
2016-02-23  0:02     ` 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).