Skip to content

Commit 0dfa61b

Browse files
hormsmarckleinebudde
authored andcommitted
can: rcar: add gen[12] fallback compatibility strings
Add fallback compatibility string for R-Car Gen 1 and Gen2. 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. 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: Simon Horman <horms+renesas@verge.net.au> Acked-by: Rob Herring <robh@kernel.org> Acked-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
1 parent 59097ac commit 0dfa61b

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

Documentation/devicetree/bindings/net/can/rcar_can.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ Required properties:
66
"renesas,can-r8a7779" if CAN controller is a part of R8A7779 SoC.
77
"renesas,can-r8a7790" if CAN controller is a part of R8A7790 SoC.
88
"renesas,can-r8a7791" if CAN controller is a part of R8A7791 SoC.
9+
"renesas,rcar-gen1-can" for a generic R-Car Gen1 compatible device.
10+
"renesas,rcar-gen2-can" for a generic R-Car Gen2 compatible device.
11+
When compatible with the generic version, nodes must list the
12+
SoC-specific version corresponding to the platform first
13+
followed by the generic version.
14+
915
- reg: physical base address and size of the R-Car CAN register map.
1016
- interrupts: interrupt specifier for the sole interrupt.
1117
- clocks: phandles and clock specifiers for 3 CAN clock inputs.
@@ -25,7 +31,7 @@ Example
2531
SoC common .dtsi file:
2632

2733
can0: can@e6e80000 {
28-
compatible = "renesas,can-r8a7791";
34+
compatible = "renesas,can-r8a7791", "renesas,rcar-gen2-can";
2935
reg = <0 0xe6e80000 0 0x1000>;
3036
interrupts = <0 186 IRQ_TYPE_LEVEL_HIGH>;
3137
clocks = <&mstp9_clks R8A7791_CLK_RCAN0>,

drivers/net/can/rcar_can.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -904,6 +904,8 @@ static const struct of_device_id rcar_can_of_table[] __maybe_unused = {
904904
{ .compatible = "renesas,can-r8a7779" },
905905
{ .compatible = "renesas,can-r8a7790" },
906906
{ .compatible = "renesas,can-r8a7791" },
907+
{ .compatible = "renesas,rcar-gen1-can" },
908+
{ .compatible = "renesas,rcar-gen2-can" },
907909
{ }
908910
};
909911
MODULE_DEVICE_TABLE(of, rcar_can_of_table);

0 commit comments

Comments
 (0)