i2c: rk3x: add support for rv1108
authorAndy Yan <andy.yan@rock-chips.com>
Fri, 11 Aug 2017 03:39:13 +0000 (11:39 +0800)
committerWolfram Sang <wsa@the-dreams.de>
Sat, 12 Aug 2017 14:39:47 +0000 (16:39 +0200)
Support for the i2c controller on rv1108 soc.

Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/busses/i2c-rk3x.c

index df220666d62741f15eb4bbf99c960d3ec4a0f444..fe234578380ac85eb5c3919d4bcf7180653379ad 100644 (file)
@@ -1131,6 +1131,11 @@ static const struct i2c_algorithm rk3x_i2c_algorithm = {
        .functionality          = rk3x_i2c_func,
 };
 
+static const struct rk3x_i2c_soc_data rv1108_soc_data = {
+       .grf_offset = -1,
+       .calc_timings = rk3x_i2c_v1_calc_timings,
+};
+
 static const struct rk3x_i2c_soc_data rk3066_soc_data = {
        .grf_offset = 0x154,
        .calc_timings = rk3x_i2c_v0_calc_timings,
@@ -1157,6 +1162,10 @@ static const struct rk3x_i2c_soc_data rk3399_soc_data = {
 };
 
 static const struct of_device_id rk3x_i2c_match[] = {
+       {
+               .compatible = "rockchip,rv1108-i2c",
+               .data = (void *)&rv1108_soc_data
+       },
        {
                .compatible = "rockchip,rk3066-i2c",
                .data = (void *)&rk3066_soc_data