Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ata: sata_rcar: add gen[23] fallback compatibility strings

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

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

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Acked-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Tejun Heo <tj@kernel.org>

authored by

Simon Horman and committed by
Tejun Heo
6ac1d153 ae867937

+19 -3
+11 -3
Documentation/devicetree/bindings/ata/sata_rcar.txt
··· 1 1 * Renesas R-Car SATA 2 2 3 3 Required properties: 4 - - compatible : should contain one of the following: 4 + - compatible : should contain one or more of the following: 5 5 - "renesas,sata-r8a7779" for R-Car H1 6 - ("renesas,rcar-sata" is deprecated) 7 6 - "renesas,sata-r8a7790-es1" for R-Car H2 ES1 8 7 - "renesas,sata-r8a7790" for R-Car H2 other than ES1 9 8 - "renesas,sata-r8a7791" for R-Car M2-W 10 9 - "renesas,sata-r8a7793" for R-Car M2-N 11 10 - "renesas,sata-r8a7795" for R-Car H3 11 + - "renesas,rcar-gen2-sata" for a generic R-Car Gen2 compatible device 12 + - "renesas,rcar-gen3-sata" for a generic R-Car Gen3 compatible device 13 + - "renesas,rcar-sata" is deprecated 14 + 15 + When compatible with the generic version nodes 16 + must list the SoC-specific version corresponding 17 + to the platform first followed by the generic 18 + version. 19 + 12 20 - reg : address and length of the SATA registers; 13 21 - interrupts : must consist of one interrupt specifier. 14 22 - clocks : must contain a reference to the functional clock. ··· 24 16 Example: 25 17 26 18 sata0: sata@ee300000 { 27 - compatible = "renesas,sata-r8a7791"; 19 + compatible = "renesas,sata-r8a7791", "renesas,rcar-gen2-sata"; 28 20 reg = <0 0xee300000 0 0x2000>; 29 21 interrupt-parent = <&gic>; 30 22 interrupts = <0 105 IRQ_TYPE_LEVEL_HIGH>;
+8
drivers/ata/sata_rcar.c
··· 858 858 .compatible = "renesas,sata-r8a7795", 859 859 .data = (void *)RCAR_GEN2_SATA 860 860 }, 861 + { 862 + .compatible = "renesas,rcar-gen2-sata", 863 + .data = (void *)RCAR_GEN2_SATA 864 + }, 865 + { 866 + .compatible = "renesas,rcar-gen3-sata", 867 + .data = (void *)RCAR_GEN2_SATA 868 + }, 861 869 { }, 862 870 }; 863 871 MODULE_DEVICE_TABLE(of, sata_rcar_match);