Commit 6575f354 authored by David S. Miller's avatar David S. Miller

Merge branch 'sh_eth-fallback-compat-strings'

Simon Horman says:

====================
net: sh_eth: add R-Car Gen[12] fallback compatibility strings

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

In the case of Renesas R-Car hardware we know that there are generations of
SoCs, f.e. Gen 1 and 2. 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 is being adopted for
drivers for Renesas SoCs.

Changes since v1:
* Correct typos in changelogs
* Consistently use tabs for indentation in bindings document
* Enhance readability of description of bindings usage
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 7a0947e7 b4804e0c
...@@ -4,7 +4,8 @@ This file provides information on what the device node for the SH EtherMAC ...@@ -4,7 +4,8 @@ This file provides information on what the device node for the SH EtherMAC
interface contains. interface contains.
Required properties: Required properties:
- compatible: "renesas,gether-r8a7740" if the device is a part of R8A7740 SoC. - compatible: Must contain one or more of the following:
"renesas,gether-r8a7740" if the device is a part of R8A7740 SoC.
"renesas,ether-r8a7743" if the device is a part of R8A7743 SoC. "renesas,ether-r8a7743" if the device is a part of R8A7743 SoC.
"renesas,ether-r8a7745" if the device is a part of R8A7745 SoC. "renesas,ether-r8a7745" if the device is a part of R8A7745 SoC.
"renesas,ether-r8a7778" if the device is a part of R8A7778 SoC. "renesas,ether-r8a7778" if the device is a part of R8A7778 SoC.
...@@ -14,6 +15,14 @@ Required properties: ...@@ -14,6 +15,14 @@ Required properties:
"renesas,ether-r8a7793" if the device is a part of R8A7793 SoC. "renesas,ether-r8a7793" if the device is a part of R8A7793 SoC.
"renesas,ether-r8a7794" if the device is a part of R8A7794 SoC. "renesas,ether-r8a7794" if the device is a part of R8A7794 SoC.
"renesas,ether-r7s72100" if the device is a part of R7S72100 SoC. "renesas,ether-r7s72100" if the device is a part of R7S72100 SoC.
"renesas,rcar-gen1-ether" for a generic R-Car Gen1 device.
"renesas,rcar-gen2-ether" for a generic R-Car Gen2 or RZ/G1
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: offset and length of (1) the E-DMAC/feLic register block (required), - reg: offset and length of (1) the E-DMAC/feLic register block (required),
(2) the TSU register block (optional). (2) the TSU register block (optional).
- interrupts: interrupt specifier for the sole interrupt. - interrupts: interrupt specifier for the sole interrupt.
...@@ -36,7 +45,8 @@ Optional properties: ...@@ -36,7 +45,8 @@ Optional properties:
Example (Lager board): Example (Lager board):
ethernet@ee700000 { ethernet@ee700000 {
compatible = "renesas,ether-r8a7790"; compatible = "renesas,ether-r8a7790",
"renesas,rcar-gen2-ether";
reg = <0 0xee700000 0 0x400>; reg = <0 0xee700000 0 0x400>;
interrupt-parent = <&gic>; interrupt-parent = <&gic>;
interrupts = <0 162 IRQ_TYPE_LEVEL_HIGH>; interrupts = <0 162 IRQ_TYPE_LEVEL_HIGH>;
......
...@@ -594,7 +594,7 @@ static struct sh_eth_cpu_data r8a7740_data = { ...@@ -594,7 +594,7 @@ static struct sh_eth_cpu_data r8a7740_data = {
}; };
/* There is CPU dependent code */ /* There is CPU dependent code */
static void sh_eth_set_rate_r8a777x(struct net_device *ndev) static void sh_eth_set_rate_rcar(struct net_device *ndev)
{ {
struct sh_eth_private *mdp = netdev_priv(ndev); struct sh_eth_private *mdp = netdev_priv(ndev);
...@@ -608,10 +608,10 @@ static void sh_eth_set_rate_r8a777x(struct net_device *ndev) ...@@ -608,10 +608,10 @@ static void sh_eth_set_rate_r8a777x(struct net_device *ndev)
} }
} }
/* R8A7778/9 */ /* R-Car Gen1 */
static struct sh_eth_cpu_data r8a777x_data = { static struct sh_eth_cpu_data rcar_gen1_data = {
.set_duplex = sh_eth_set_duplex, .set_duplex = sh_eth_set_duplex,
.set_rate = sh_eth_set_rate_r8a777x, .set_rate = sh_eth_set_rate_rcar,
.register_type = SH_ETH_REG_FAST_RCAR, .register_type = SH_ETH_REG_FAST_RCAR,
...@@ -635,10 +635,10 @@ static struct sh_eth_cpu_data r8a777x_data = { ...@@ -635,10 +635,10 @@ static struct sh_eth_cpu_data r8a777x_data = {
.hw_swap = 1, .hw_swap = 1,
}; };
/* R8A7790/1 */ /* R-Car Gen2 and RZ/G1 */
static struct sh_eth_cpu_data r8a779x_data = { static struct sh_eth_cpu_data rcar_gen2_data = {
.set_duplex = sh_eth_set_duplex, .set_duplex = sh_eth_set_duplex,
.set_rate = sh_eth_set_rate_r8a777x, .set_rate = sh_eth_set_rate_rcar,
.register_type = SH_ETH_REG_FAST_RCAR, .register_type = SH_ETH_REG_FAST_RCAR,
...@@ -3086,15 +3086,17 @@ static struct sh_eth_plat_data *sh_eth_parse_dt(struct device *dev) ...@@ -3086,15 +3086,17 @@ static struct sh_eth_plat_data *sh_eth_parse_dt(struct device *dev)
static const struct of_device_id sh_eth_match_table[] = { static const struct of_device_id sh_eth_match_table[] = {
{ .compatible = "renesas,gether-r8a7740", .data = &r8a7740_data }, { .compatible = "renesas,gether-r8a7740", .data = &r8a7740_data },
{ .compatible = "renesas,ether-r8a7743", .data = &r8a779x_data }, { .compatible = "renesas,ether-r8a7743", .data = &rcar_gen2_data },
{ .compatible = "renesas,ether-r8a7745", .data = &r8a779x_data }, { .compatible = "renesas,ether-r8a7745", .data = &rcar_gen2_data },
{ .compatible = "renesas,ether-r8a7778", .data = &r8a777x_data }, { .compatible = "renesas,ether-r8a7778", .data = &rcar_gen1_data },
{ .compatible = "renesas,ether-r8a7779", .data = &r8a777x_data }, { .compatible = "renesas,ether-r8a7779", .data = &rcar_gen1_data },
{ .compatible = "renesas,ether-r8a7790", .data = &r8a779x_data }, { .compatible = "renesas,ether-r8a7790", .data = &rcar_gen2_data },
{ .compatible = "renesas,ether-r8a7791", .data = &r8a779x_data }, { .compatible = "renesas,ether-r8a7791", .data = &rcar_gen2_data },
{ .compatible = "renesas,ether-r8a7793", .data = &r8a779x_data }, { .compatible = "renesas,ether-r8a7793", .data = &rcar_gen2_data },
{ .compatible = "renesas,ether-r8a7794", .data = &r8a779x_data }, { .compatible = "renesas,ether-r8a7794", .data = &rcar_gen2_data },
{ .compatible = "renesas,ether-r7s72100", .data = &r7s72100_data }, { .compatible = "renesas,ether-r7s72100", .data = &r7s72100_data },
{ .compatible = "renesas,rcar-gen1-ether", .data = &rcar_gen1_data },
{ .compatible = "renesas,rcar-gen2-ether", .data = &rcar_gen2_data },
{ } { }
}; };
MODULE_DEVICE_TABLE(of, sh_eth_match_table); MODULE_DEVICE_TABLE(of, sh_eth_match_table);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment