Skip to contentSkip to conversation

Add Altera I2C Controller Driver

PATCH New thor.thayer-VuQAYsv1563Yd54FQh9/[email protected] 1 participant 4 messages Apr 17, 2017 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

v2 cover Add Altera I2C Controller Driver

From: Thor Thayer <thor.thayer-VuQAYsv1563Yd54FQh9/[email protected]>

Add the Altera soft IP I2C Controller driver for use in FPGAs.

Thor Thayer (3):
MAINTAINERS: Add Altera I2C Controller Driver
dt-bindings: i2c: Add Altera I2C Controller
i2c: altera: Add Altera I2C Controller driver

 .../devicetree/bindings/i2c/i2c-altera.txt         |  38 ++
 MAINTAINERS                                        |   5 +
 drivers/i2c/busses/Kconfig                         |  10 +
 drivers/i2c/busses/Makefile                        |   1 +
 drivers/i2c/busses/i2c-altera.c                    | 509 +++++++++++++++++++++
 5 files changed, 563 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/i2c/i2c-altera.txt
 create mode 100644 drivers/i2c/busses/i2c-altera.c
Signature · 6 lines
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#2 lore raw

PATCH v2 1/3 MAINTAINERS: Add Altera I2C Controller Driver

In reply to a message not in the archive

From: Thor Thayer <thor.thayer-VuQAYsv1563Yd54FQh9/[email protected]>

Add maintainer for the Altera I2C Controller Driver.

---
v2 No change

---
 MAINTAINERS | 5 +++++
 1 file changed, 5 insertions(+)
MAINTAINERS +5 -0
index 4bfaea4..e654d34 100644
@@ -636,6 +636,11 @@ ALPS PS/2 TOUCHPAD DRIVER
 R:	Pali Rohár <[email protected]>
 F:	drivers/input/mouse/alps.*
 
+ALTERA I2C CONTROLLER DRIVER
+M:	Thor Thayer <thor.thayer-VuQAYsv1563Yd54FQh9/[email protected]>
+S:	Maintained
+F:	drivers/i2c/busses/i2c-altera.c
+
 ALTERA MAILBOX DRIVER
 M:	Ley Foon Tan <[email protected]>
 L:	nios2-dev-g9ZBwUv/Ih/[email protected] (moderated for non-subscribers)
Signature · 6 lines
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#3 lore raw

PATCH v2 2/3 dt-bindings: i2c: Add Altera I2C Controller

In reply to a message not in the archive

From: Thor Thayer <thor.thayer-VuQAYsv1563Yd54FQh9/[email protected]>

Add the documentation to support the Altera synthesizable logic I2C Controller.

---
v2 Change the subject to identify dt-bindings
Add synthesizable logic to description.
Change compatible string to "altr,softip-i2c" Make description of clock phandle singular since 1 clock. Remove altr, from fifo-size
Specify fifo-size is in bytes.

---
 .../devicetree/bindings/i2c/i2c-altera.txt         | 38 ++++++++++++++++++++++
 1 file changed, 38 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/i2c/i2c-altera.txt
Documentation/devicetree/bindings/i2c/i2c-altera.txt new file +38 -0
new file mode 100644
index 0000000..ba25b1ea
@@ -0,0 +1,38 @@
+* Altera I2C Controller
+* This is Altera's synthesizable logic block I2C Controller.
+
+Required properties :
+ - compatible : should be "altr,softip-i2c"
+ - reg        : Offset and length of the register set for the device
+ - interrupts : <IRQ> where IRQ is the interrupt number.
+ - clocks     : phandle to input clock.
+ - #address-cells = <1>;
+ - #size-cells = <0>;
+
+Recommended properties :
+ - clock-frequency : desired I2C bus clock frequency in Hz.
+
+Optional properties :
+ - fifo-size : Size of the RX and TX FIFOs in bytes.
+ - Child nodes conforming to i2c bus binding
+
+Example :
+
+	i2c@100080000 {
+		compatible = "altr,softip-i2c";
+		reg = <0x00000001 0x00080000 0x00000040>;
+		interrupt-parent = <&intc>;
+		interrupts = <0 43 4>;
+		clocks = <&clk_0>;
+		clock-frequency = <100000>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+		fifo-size = <4>;
+
+		eeprom@51 {
+			compatible = "atmel,24c32";
+			reg = <0x51>;
+			pagesize = <32>;
+		};
+	};
+
Signature · 6 lines
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#4 lore raw

PATCH v2 3/3 i2c: altera: Add Altera I2C Controller driver

In reply to a message not in the archive

From: Thor Thayer <thor.thayer-VuQAYsv1563Yd54FQh9/[email protected]>

Add driver support for the Altera I2C Controller. The I2C controller is soft IP for use in FPGAs.

---
v2 Remove altr, from fifo-size to agree with bindings.
Change compatible string to "altr,softip-i2c"

---
 drivers/i2c/busses/Kconfig      |  10 +
 drivers/i2c/busses/Makefile     |   1 +
 drivers/i2c/busses/i2c-altera.c | 509 ++++++++++++++++++++++++++++++++++++++++
 3 files changed, 520 insertions(+)
 create mode 100644 drivers/i2c/busses/i2c-altera.c
drivers/i2c/busses/Kconfig +10 -0
index 144cbad..981ea48 100644
@@ -326,6 +326,16 @@ config I2C_POWERMAC
 
 comment "I2C system bus drivers (mostly embedded / system-on-chip)"
 
+config I2C_ALTERA
+	tristate "Altera Soft IP I2C"
+	depends on (ARCH_SOCFPGA || NIOS2) && OF
+	help
+	  If you say yes to this option, support will be included for the
+	  Altera Soft IP I2C interfaces on SoCFPGA and Nios2 architectures.
+
+	  This driver can also be built as a module.  If so, the module
+	  will be called i2c-altera.
+
 config I2C_AT91
 	tristate "Atmel AT91 I2C Two-Wire interface (TWI)"
 	depends on ARCH_AT91
drivers/i2c/busses/Makefile +1 -0
index 30b6085..4eb5c82 100644
@@ -29,6 +29,7 @@ obj-$(CONFIG_I2C_HYDRA)		+= i2c-hydra.o
 obj-$(CONFIG_I2C_POWERMAC)	+= i2c-powermac.o
 
 # Embedded system I2C/SMBus host controller drivers
+obj-$(CONFIG_I2C_ALTERA)	+= i2c-altera.o
 obj-$(CONFIG_I2C_AT91)		+= i2c-at91.o
 obj-$(CONFIG_I2C_AU1550)	+= i2c-au1550.o
 obj-$(CONFIG_I2C_AXXIA)		+= i2c-axxia.o
drivers/i2c/busses/i2c-altera.c new file +509 -0

509 lines not on this page · raw message

Signature · 6 lines
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html