summary refs log tree commit diff
path: root/drivers/i2c
diff options
context:
space:
mode:
authorSagar Shrikant Kadam <sagar.kadam@sifive.com>2019-06-01 11:41:14 +0530
committerWolfram Sang <wsa@the-dreams.de>2019-06-14 23:24:33 +0200
commitd9ce957d414bf871a57da332dff033a501698b9c (patch)
tree218ed7847b77c39a9eb9e3bb32d899d3226c076d /drivers/i2c
parent7ea651ec392ecbd52227e009a482b571ce7b3bce (diff)
downloadlinux-d9ce957d414bf871a57da332dff033a501698b9c.tar.gz
i2c: ocores: add support for i2c device on Sifive FU540-c000 SoC
Update device id table for Opencore's I2C master based re-implementation
used in FU540-c000 chipset on HiFive Unleashed platform.

Device ID's include Sifive, soc-specific device for chip specific tweaks
and sifive IP block specific device for generic programming model.

Signed-off-by: Sagar Shrikant Kadam <sagar.kadam@sifive.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/busses/i2c-ocores.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/i2c/busses/i2c-ocores.c b/drivers/i2c/busses/i2c-ocores.c
index c3dabee0aa35..b334fa2329ba 100644
--- a/drivers/i2c/busses/i2c-ocores.c
+++ b/drivers/i2c/busses/i2c-ocores.c
@@ -82,6 +82,7 @@ struct ocores_i2c {
 
 #define TYPE_OCORES		0
 #define TYPE_GRLIB		1
+#define TYPE_SIFIVE_REV0	2
 
 static void oc_setreg_8(struct ocores_i2c *i2c, int reg, u8 value)
 {
@@ -462,6 +463,14 @@ static const struct of_device_id ocores_i2c_match[] = {
 		.compatible = "aeroflexgaisler,i2cmst",
 		.data = (void *)TYPE_GRLIB,
 	},
+	{
+		.compatible = "sifive,fu540-c000-i2c",
+		.data = (void *)TYPE_SIFIVE_REV0,
+	},
+	{
+		.compatible = "sifive,i2c0",
+		.data = (void *)TYPE_SIFIVE_REV0,
+	},
 	{},
 };
 MODULE_DEVICE_TABLE(of, ocores_i2c_match);