aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Horman <horms+renesas@verge.net.au>2016-12-07 05:39:36 -0500
committerWolfram Sang <wsa@the-dreams.de>2016-12-11 16:52:28 -0500
commitb880ccaf1742c28e91534ad7820c4405c04dabf9 (patch)
treed55c51108c3aac137a1f0cc29b35e1c17cfb38c1
parentad4a8dc3fec6485b18654d1090ef8012fcfc37b8 (diff)
i2c: sh_mobile: Add per-Generation fallback bindings
Add per-Generation fallback bindings for R-Car SoCs. This is in keeping with the compatibility string scheme is being adopted for drivers for Renesas SoCs. Also, improve readability by listing the rmobile fallback compatibility string after the more-specific compatibility strings they provide a fallback for. Signed-off-by: Simon Horman <horms+renesas@verge.net.au> Acked-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
-rw-r--r--Documentation/devicetree/bindings/i2c/i2c-sh_mobile.txt17
-rw-r--r--drivers/i2c/busses/i2c-sh_mobile.c4
2 files changed, 17 insertions, 4 deletions
diff --git a/Documentation/devicetree/bindings/i2c/i2c-sh_mobile.txt b/Documentation/devicetree/bindings/i2c/i2c-sh_mobile.txt
index 214f94c25d37..7716acc55dec 100644
--- a/Documentation/devicetree/bindings/i2c/i2c-sh_mobile.txt
+++ b/Documentation/devicetree/bindings/i2c/i2c-sh_mobile.txt
@@ -1,8 +1,7 @@
1Device tree configuration for Renesas IIC (sh_mobile) driver 1Device tree configuration for Renesas IIC (sh_mobile) driver
2 2
3Required properties: 3Required properties:
4- compatible : "renesas,iic-<soctype>". "renesas,rmobile-iic" as fallback 4- compatible :
5 Examples with soctypes are:
6 - "renesas,iic-r8a73a4" (R-Mobile APE6) 5 - "renesas,iic-r8a73a4" (R-Mobile APE6)
7 - "renesas,iic-r8a7740" (R-Mobile A1) 6 - "renesas,iic-r8a7740" (R-Mobile A1)
8 - "renesas,iic-r8a7790" (R-Car H2) 7 - "renesas,iic-r8a7790" (R-Car H2)
@@ -12,6 +11,17 @@ Required properties:
12 - "renesas,iic-r8a7794" (R-Car E2) 11 - "renesas,iic-r8a7794" (R-Car E2)
13 - "renesas,iic-r8a7795" (R-Car H3) 12 - "renesas,iic-r8a7795" (R-Car H3)
14 - "renesas,iic-sh73a0" (SH-Mobile AG5) 13 - "renesas,iic-sh73a0" (SH-Mobile AG5)
14 - "renesas,rcar-gen2-iic" (generic R-Car Gen2 compatible device)
15 - "renesas,rcar-gen3-iic" (generic R-Car Gen3 compatible device)
16 - "renesas,rmobile-iic" (generic device)
17
18 When compatible with a generic R-Car version, nodes
19 must list the SoC-specific version corresponding to
20 the platform first followed by the generic R-Car
21 version.
22
23 renesas,rmobile-iic must always follow.
24
15- reg : address start and address range size of device 25- reg : address start and address range size of device
16- interrupts : interrupt of device 26- interrupts : interrupt of device
17- clocks : clock for device 27- clocks : clock for device
@@ -31,7 +41,8 @@ Pinctrl properties might be needed, too. See there.
31Example: 41Example:
32 42
33 iic0: i2c@e6500000 { 43 iic0: i2c@e6500000 {
34 compatible = "renesas,iic-r8a7790", "renesas,rmobile-iic"; 44 compatible = "renesas,iic-r8a7790", "renesas,rcar-gen2-iic",
45 "renesas,rmobile-iic";
35 reg = <0 0xe6500000 0 0x425>; 46 reg = <0 0xe6500000 0 0x425>;
36 interrupts = <0 174 IRQ_TYPE_LEVEL_HIGH>; 47 interrupts = <0 174 IRQ_TYPE_LEVEL_HIGH>;
37 clocks = <&mstp3_clks R8A7790_CLK_IIC0>; 48 clocks = <&mstp3_clks R8A7790_CLK_IIC0>;
diff --git a/drivers/i2c/busses/i2c-sh_mobile.c b/drivers/i2c/busses/i2c-sh_mobile.c
index 192f36f00e4d..3d9ebe6e5716 100644
--- a/drivers/i2c/busses/i2c-sh_mobile.c
+++ b/drivers/i2c/busses/i2c-sh_mobile.c
@@ -827,7 +827,6 @@ static const struct sh_mobile_dt_config r8a7740_dt_config = {
827}; 827};
828 828
829static const struct of_device_id sh_mobile_i2c_dt_ids[] = { 829static const struct of_device_id sh_mobile_i2c_dt_ids[] = {
830 { .compatible = "renesas,rmobile-iic", .data = &default_dt_config },
831 { .compatible = "renesas,iic-r8a73a4", .data = &fast_clock_dt_config }, 830 { .compatible = "renesas,iic-r8a73a4", .data = &fast_clock_dt_config },
832 { .compatible = "renesas,iic-r8a7740", .data = &r8a7740_dt_config }, 831 { .compatible = "renesas,iic-r8a7740", .data = &r8a7740_dt_config },
833 { .compatible = "renesas,iic-r8a7790", .data = &fast_clock_dt_config }, 832 { .compatible = "renesas,iic-r8a7790", .data = &fast_clock_dt_config },
@@ -835,8 +834,11 @@ static const struct of_device_id sh_mobile_i2c_dt_ids[] = {
835 { .compatible = "renesas,iic-r8a7792", .data = &fast_clock_dt_config }, 834 { .compatible = "renesas,iic-r8a7792", .data = &fast_clock_dt_config },
836 { .compatible = "renesas,iic-r8a7793", .data = &fast_clock_dt_config }, 835 { .compatible = "renesas,iic-r8a7793", .data = &fast_clock_dt_config },
837 { .compatible = "renesas,iic-r8a7794", .data = &fast_clock_dt_config }, 836 { .compatible = "renesas,iic-r8a7794", .data = &fast_clock_dt_config },
837 { .compatible = "renesas,rcar-gen2-iic", .data = &fast_clock_dt_config },
838 { .compatible = "renesas,iic-r8a7795", .data = &fast_clock_dt_config }, 838 { .compatible = "renesas,iic-r8a7795", .data = &fast_clock_dt_config },
839 { .compatible = "renesas,rcar-gen3-iic", .data = &fast_clock_dt_config },
839 { .compatible = "renesas,iic-sh73a0", .data = &fast_clock_dt_config }, 840 { .compatible = "renesas,iic-sh73a0", .data = &fast_clock_dt_config },
841 { .compatible = "renesas,rmobile-iic", .data = &default_dt_config },
840 {}, 842 {},
841}; 843};
842MODULE_DEVICE_TABLE(of, sh_mobile_i2c_dt_ids); 844MODULE_DEVICE_TABLE(of, sh_mobile_i2c_dt_ids);