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

spi: sh-msiof: Add R-Car Gen 2 and 3 fallback bindings

In the case of Renesas R-Car hardware we know that there are generations of
SoCs, e.g. Gen 2 and Gen 3. But beyond that it's 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.

Also:
* Deprecate renesas,sh-msiof. It seems poorly named as it is only
compatible with SH-Mobile. It also appears unused in mainline.

Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Simon Horman and committed by
Mark Brown
4286db84 fafd6794

+16 -7
+13 -6
Documentation/devicetree/bindings/spi/sh-msiof.txt
··· 1 1 Renesas MSIOF spi controller 2 2 3 3 Required properties: 4 - - compatible : "renesas,msiof-<soctype>" for SoCs, 5 - "renesas,sh-msiof" for SuperH, or 6 - "renesas,sh-mobile-msiof" for SH Mobile series. 7 - Examples with soctypes are: 8 - "renesas,msiof-r8a7790" (R-Car H2) 4 + - compatible : "renesas,msiof-r8a7790" (R-Car H2) 9 5 "renesas,msiof-r8a7791" (R-Car M2-W) 10 6 "renesas,msiof-r8a7792" (R-Car V2H) 11 7 "renesas,msiof-r8a7793" (R-Car M2-N) 12 8 "renesas,msiof-r8a7794" (R-Car E2) 13 9 "renesas,msiof-r8a7796" (R-Car M3-W) 14 10 "renesas,msiof-sh73a0" (SH-Mobile AG5) 11 + "renesas,sh-mobile-msiof" (generic SH-Mobile compatibile device) 12 + "renesas,rcar-gen2-msiof" (generic R-Car Gen2 compatible device) 13 + "renesas,rcar-gen3-msiof" (generic R-Car Gen3 compatible device) 14 + "renesas,sh-msiof" (deprecated) 15 + 16 + When compatible with the generic version, nodes 17 + must list the SoC-specific version corresponding 18 + to the platform first followed by the generic 19 + version. 20 + 15 21 - reg : A list of offsets and lengths of the register sets for 16 22 the device. 17 23 If only one register set is present, it is to be used ··· 67 61 Example: 68 62 69 63 msiof0: spi@e6e20000 { 70 - compatible = "renesas,msiof-r8a7791"; 64 + compatible = "renesas,msiof-r8a7791", 65 + "renesas,rcar-gen2-msiof"; 71 66 reg = <0 0xe6e20000 0 0x0064>; 72 67 interrupts = <0 156 IRQ_TYPE_LEVEL_HIGH>; 73 68 clocks = <&mstp0_clks R8A7791_CLK_MSIOF0>;
+3 -1
drivers/spi/spi-sh-msiof.c
··· 973 973 }; 974 974 975 975 static const struct of_device_id sh_msiof_match[] = { 976 - { .compatible = "renesas,sh-msiof", .data = &sh_data }, 977 976 { .compatible = "renesas,sh-mobile-msiof", .data = &sh_data }, 978 977 { .compatible = "renesas,msiof-r8a7790", .data = &r8a779x_data }, 979 978 { .compatible = "renesas,msiof-r8a7791", .data = &r8a779x_data }, 980 979 { .compatible = "renesas,msiof-r8a7792", .data = &r8a779x_data }, 981 980 { .compatible = "renesas,msiof-r8a7793", .data = &r8a779x_data }, 982 981 { .compatible = "renesas,msiof-r8a7794", .data = &r8a779x_data }, 982 + { .compatible = "renesas,rcar-gen2-msiof", .data = &r8a779x_data }, 983 983 { .compatible = "renesas,msiof-r8a7796", .data = &r8a779x_data }, 984 + { .compatible = "renesas,rcar-gen3-msiof", .data = &r8a779x_data }, 985 + { .compatible = "renesas,sh-msiof", .data = &sh_data }, // Deprecated 984 986 {}, 985 987 }; 986 988 MODULE_DEVICE_TABLE(of, sh_msiof_match);