Add Altera I2C Controller Driver
Subsystems (2)
cover Add Altera I2C Controller Driver
From: Thor Thayer <[email protected]>
Add the Altera I2C Controller driver for use in FPGAs.
Thor Thayer (3):
MAINTAINERS: Add Altera I2C Controller Driver
Documentation: dt: i2c: Add Altera I2C Controller
i2c: altera: Add Altera I2C Controller driver
.../devicetree/bindings/i2c/i2c-altera.txt | 37 ++ MAINTAINERS | 5 + drivers/i2c/busses/Kconfig | 10 + drivers/i2c/busses/Makefile | 1 + drivers/i2c/busses/i2c-altera.c | 509 +++++++++++++++++++++ 5 files changed, 562 insertions(+) create mode 100644 Documentation/devicetree/bindings/i2c/i2c-altera.txt create mode 100644 drivers/i2c/busses/i2c-altera.c
Signature · 1 line
1.9.1
PATCH 1/3 MAINTAINERS: Add Altera I2C Controller Driver
From: Thor Thayer <[email protected]>
Add maintainer for the Altera I2C Controller Driver.
--- MAINTAINERS | 5 +++++ 1 file changed, 5 insertions(+)
MAINTAINERS +5 -0
@@ -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 <[email protected]> +S: Maintained +F: drivers/i2c/busses/i2c-altera.c + ALTERA MAILBOX DRIVER M: Ley Foon Tan <[email protected]> L: [email protected] (moderated for non-subscribers)
Signature · 1 line
1.9.1
PATCH 2/3 Documentation: dt: i2c: Add Altera I2C Controller
In reply to [email protected]From: Thor Thayer <[email protected]>
Add the documentation to support the Altera I2C Controller.
--- .../devicetree/bindings/i2c/i2c-altera.txt | 37 ++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 Documentation/devicetree/bindings/i2c/i2c-altera.txt
Documentation/devicetree/bindings/i2c/i2c-altera.txt new file +37 -0
@@ -0,0 +1,37 @@ +* Altera I2C Controller + +Required properties : + - compatible : should be "altr,sip-i2c" + - reg : Offset and length of the register set for the device + - interrupts : <IRQ> where IRQ is the interrupt number. + - clocks : phandles to input clocks. + - #address-cells = <1>; + - #size-cells = <0>; + +Recommended properties : + - clock-frequency : desired I2C bus clock frequency in Hz. + +Optional properties : + - altr,fifo-size : Size of the RX and TX FIFOs. + - Child nodes conforming to i2c bus binding + +Example : + + i2c@100080000 { + compatible = "altr,sip-i2c"; + reg = <0x00000001 0x00080000 0x00000040>; + interrupt-parent = <&intc>; + interrupts = <0 43 4>; + clocks = <&clk_0>; + clock-frequency = <100000>; + #address-cells = <1>; + #size-cells = <0>; + altr,fifo-size = <4>; + + eeprom@51 { + compatible = "atmel,24c32"; + reg = <0x51>; + pagesize = <32>; + }; + }; +
Signature · 1 line
1.9.1
A message that is not in the archive (sent off-list or not yet received): 1491926547-29510-3-git-send-email-thor.thayer-VuQAYsv1563Yd54FQh9/[email protected]
Re: [PATCH 2/3] Documentation: dt: i2c: Add Altera I2C Controller
Quoted 3 lines · On Tue, Apr 11, 2017 at 11:02:26AM -0500…
From: Thor Thayer <thor.thayer-VuQAYsv1563Yd54FQh9/[email protected]>
Add the documentation to support the Altera I2C Controller.
"dt-bindings: i2c: ..." for the subject.
Quoted 13 lines
--- .../devicetree/bindings/i2c/i2c-altera.txt | 37 ++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 Documentation/devicetree/bindings/i2c/i2c-altera.txtDocumentation/devicetree/bindings/i2c/i2c-altera.txt new file +0
-0
Documentation/devicetree/bindings/i2c/i2c-altera.txt line 1
Quoted 1 line
Documentation/devicetree/bindings/i2c/i2c-altera.txt new file +1
-0@@ -0,0 +1,37 @@ +* Altera I2C Controller
This is the only one? For synthesizable logic or a hard block in socfpga?
Documentation/devicetree/bindings/i2c/i2c-altera.txt line 4
Quoted 3 lines
Documentation/devicetree/bindings/i2c/i2c-altera.txt new file +3
-0+ +Required properties : + - compatible : should be "altr,sip-i2c"
Seems kind of generic.
Documentation/devicetree/bindings/i2c/i2c-altera.txt line 7
Quoted 3 lines
Documentation/devicetree/bindings/i2c/i2c-altera.txt new file +3
-0+ - reg : Offset and length of the register set for the device + - interrupts : <IRQ> where IRQ is the interrupt number. + - clocks : phandles to input clocks.
Need to specify how many clocks.
Documentation/devicetree/bindings/i2c/i2c-altera.txt line 15
Quoted 8 lines
Documentation/devicetree/bindings/i2c/i2c-altera.txt new file +8
-0+ - #address-cells = <1>; + - #size-cells = <0>; + +Recommended properties : + - clock-frequency : desired I2C bus clock frequency in Hz. + +Optional properties : + - altr,fifo-size : Size of the RX and TX FIFOs.
in bytes?
Just "fifo-size" is already fairly common, so drop the vendor prefix.
Quoted 25 lines
Documentation/devicetree/bindings/i2c/i2c-altera.txt new file +22
-0+ - Child nodes conforming to i2c bus binding + +Example : + + i2c@100080000 { + compatible = "altr,sip-i2c"; + reg = <0x00000001 0x00080000 0x00000040>; + interrupt-parent = <&intc>; + interrupts = <0 43 4>; + clocks = <&clk_0>; + clock-frequency = <100000>; + #address-cells = <1>; + #size-cells = <0>; + altr,fifo-size = <4>; + + eeprom@51 { + compatible = "atmel,24c32"; + reg = <0x51>; + pagesize = <32>; + }; + }; +Signature · 1 line
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
Re: [PATCH 2/3] Documentation: dt: i2c: Add Altera I2C Controller
Hi Rob,
Quoted 7 lines · Rob Herring
Quoted 3 lines · On Tue, Apr 11, 2017 at 11:02:26AM -0500…
From: Thor Thayer <thor.thayer-VuQAYsv1563Yd54FQh9/[email protected]>
Add the documentation to support the Altera I2C Controller.
"dt-bindings: i2c: ..." for the subject.
Got it. Thanks.
Quoted 7 lines
Quoted 7 lines
--- .../devicetree/bindings/i2c/i2c-altera.txt | 37 ++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 Documentation/devicetree/bindings/i2c/i2c-altera.txt
Quoted 11 lines
Documentation/devicetree/bindings/i2c/i2c-altera.txt line 1
Quoted 7 lines
Documentation/devicetree/bindings/i2c/i2c-altera.txt new file +1
-0@@ -0,0 +1,37 @@ +* Altera I2C ControllerThis is the only one? For synthesizable logic or a hard block in socfpga?
This is synthesizable logic in an FPGA.
Quoted 6 lines
Documentation/devicetree/bindings/i2c/i2c-altera.txt line 4
Quoted 3 lines
Documentation/devicetree/bindings/i2c/i2c-altera.txt new file +3
-0+ +Required properties : + - compatible : should be "altr,sip-i2c"Seems kind of generic.
I'm using sip for soft IP - right now we only offer 1 flavor.
Quoted 6 lines
Documentation/devicetree/bindings/i2c/i2c-altera.txt line 7
Quoted 3 lines
Documentation/devicetree/bindings/i2c/i2c-altera.txt new file +3
-0+ - reg : Offset and length of the register set for the device + - interrupts : <IRQ> where IRQ is the interrupt number. + - clocks : phandles to input clocks.Need to specify how many clocks.
OK. There is only 1 so I'll change to singular. phandle to input clock.
Quoted 11 lines
Documentation/devicetree/bindings/i2c/i2c-altera.txt line 15
Quoted 8 lines
Documentation/devicetree/bindings/i2c/i2c-altera.txt new file +8
-0+ - #address-cells = <1>; + - #size-cells = <0>; + +Recommended properties : + - clock-frequency : desired I2C bus clock frequency in Hz. + +Optional properties : + - altr,fifo-size : Size of the RX and TX FIFOs.in bytes?
Quoted 2 lines
Just "fifo-size" is already fairly common, so drop the vendor prefix.
Yes, it is in bytes. I'll make the change.
Thanks for reviewing!
Quoted 17 lines
Quoted 17 lines
Documentation/devicetree/bindings/i2c/i2c-altera.txt new file +17
-0+ - Child nodes conforming to i2c bus binding + +Example : + + i2c@100080000 { + compatible = "altr,sip-i2c"; + reg = <0x00000001 0x00080000 0x00000040>; + interrupt-parent = <&intc>; + interrupts = <0 43 4>; + clocks = <&clk_0>; + clock-frequency = <100000>; + #address-cells = <1>; + #size-cells = <0>; + altr,fifo-size = <4>; + + eeprom@51 { + compatible = "atmel,24c32";
Quoted 8 lines
Quoted 8 lines
Documentation/devicetree/bindings/i2c/i2c-altera.txt new file +5
-1+ reg = <0x51>; + pagesize = <32>; + }; + }; + --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
A message that is not in the archive (sent off-list or not yet received): 7c803e53-5c1b-cd59-6c59-5a32b07edcb8-VuQAYsv1563Yd54FQh9/[email protected]
Re: [PATCH 2/3] Documentation: dt: i2c: Add Altera I2C Controller
Quoted 8 lines · Thor Thayer
Hi Rob,
Quoted 5 lines · Rob Herring
Quoted 2 lines · On Tue, Apr 11, 2017 at 11:02:26AM -0500…
From: Thor Thayer <thor.thayer-VuQAYsv1563Yd54FQh9/[email protected]>
[...]
Quoted 7 lines
Quoted 6 lines
Quoted 2 lines
+Required properties :
+ - compatible : should be "altr,sip-i2c"Seems kind of generic.
I'm using sip for soft IP - right now we only offer 1 flavor.
There is no versioning or release numbering associated with it?
Rob
--
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
A message that is not in the archive (sent off-list or not yet received): CAL_JsqLcrFsRDXfVUtnvUT+RWuk-eduJKV9vN94_d9TswEuCdQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
Re: [PATCH 2/3] Documentation: dt: i2c: Add Altera I2C Controller
Quoted 17 lines · Rob Herring
Quoted 8 lines · Thor Thayer
Hi Rob,
Quoted 5 lines · Rob Herring
Quoted 2 lines · On Tue, Apr 11, 2017 at 11:02:26AM -0500…
From: Thor Thayer <thor.thayer-VuQAYsv1563Yd54FQh9/[email protected]>
[...]
Quoted 4 lines
Quoted 4 lines
Quoted 2 lines
+Required properties :
+ - compatible : should be "altr,sip-i2c"
Quoted 8 lines
Quoted 3 lines
Quoted 2 lines
Seems kind of generic.
I'm using sip for soft IP - right now we only offer 1 flavor.
There is no versioning or release numbering associated with it?
Rob
Hi Rob,
No. After double checking with the soft IP owners, there isn't any versioning or release number for this.
Thanks,
Thor
--
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
PATCH 3/3 i2c: altera: Add Altera I2C Controller driver
In reply to [email protected]From: Thor Thayer <[email protected]>
Add driver support for the Altera I2C Controller. The I2C controller is soft IP for use in FPGAs.
--- 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
@@ -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
@@ -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 · 1 line
1.9.1