diff mbox series

[REPOST,v8,2/3] i2c-ocores: sifive: add support for i2c device on FU540-c000 SoC.

Message ID 1559369475-15374-3-git-send-email-sagar.kadam@sifive.com (mailing list archive)
State New, archived
Headers show
Series Extend dt bindings to support I2C on sifive devices and a fix broken IRQ in polling mode. | expand

Commit Message

Sagar Shrikant Kadam June 1, 2019, 6:11 a.m. UTC
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>
---
 drivers/i2c/busses/i2c-ocores.c | 9 +++++++++
 1 file changed, 9 insertions(+)

Comments

Wolfram Sang June 14, 2019, 8:58 p.m. UTC | #1
On Sat, Jun 01, 2019 at 11:41:14AM +0530, Sagar Shrikant Kadam wrote:
> 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>

Applied to for-next, thanks!
diff mbox series

Patch

diff --git a/drivers/i2c/busses/i2c-ocores.c b/drivers/i2c/busses/i2c-ocores.c
index c3dabee..b334fa2 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 u32 ocores_func(struct i2c_adapter *adap)
 		.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);