]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
i2c: sh_mobile: Add support for r8a73a4 and sh73a0
authorGeert Uytterhoeven <geert+renesas@glider.be>
Thu, 6 Nov 2014 11:52:07 +0000 (12:52 +0100)
committerWolfram Sang <wsa@the-dreams.de>
Mon, 10 Nov 2014 08:34:56 +0000 (09:34 +0100)
Add support for r8a73a4 (R-Mobile APE6) and sh73a0 (SH-Mobile AG5).
On these SoCs, the operating clock runs faster that on previous SoCs,
and the internal SCL clock counter gets incremented every 2 clocks of
the operating clock, just like on R-Car Gen2.

Cfr. the "/2" in the calculation of ICCL/ICCH in section "I2C Bus
Interface (IIC)", subsection "Transfer Rate" of the datasheets.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/busses/i2c-sh_mobile.c

index 4855188747c94e3cf3536579c544d01bf6c09b44..2ee7547bebed65a34064f06b0ea523c2201f58e7 100644 (file)
@@ -622,17 +622,19 @@ static const struct sh_mobile_dt_config default_dt_config = {
        .clks_per_count = 1,
 };
 
-static const struct sh_mobile_dt_config rcar_gen2_dt_config = {
+static const struct sh_mobile_dt_config fast_clock_dt_config = {
        .clks_per_count = 2,
 };
 
 static const struct of_device_id sh_mobile_i2c_dt_ids[] = {
        { .compatible = "renesas,rmobile-iic", .data = &default_dt_config },
-       { .compatible = "renesas,iic-r8a7790", .data = &rcar_gen2_dt_config },
-       { .compatible = "renesas,iic-r8a7791", .data = &rcar_gen2_dt_config },
-       { .compatible = "renesas,iic-r8a7792", .data = &rcar_gen2_dt_config },
-       { .compatible = "renesas,iic-r8a7793", .data = &rcar_gen2_dt_config },
-       { .compatible = "renesas,iic-r8a7794", .data = &rcar_gen2_dt_config },
+       { .compatible = "renesas,iic-r8a73a4", .data = &fast_clock_dt_config },
+       { .compatible = "renesas,iic-r8a7790", .data = &fast_clock_dt_config },
+       { .compatible = "renesas,iic-r8a7791", .data = &fast_clock_dt_config },
+       { .compatible = "renesas,iic-r8a7792", .data = &fast_clock_dt_config },
+       { .compatible = "renesas,iic-r8a7793", .data = &fast_clock_dt_config },
+       { .compatible = "renesas,iic-r8a7794", .data = &fast_clock_dt_config },
+       { .compatible = "renesas,iic-sh73a0", .data = &fast_clock_dt_config },
        {},
 };
 MODULE_DEVICE_TABLE(of, sh_mobile_i2c_dt_ids);