i2c: atmel: add driver for atmel i2c
Subsystems (2)
cover i2c: atmel: add driver for atmel i2c
The i2c driver includes two parts.
1) Driver code to implement the i2c function.
2) Device tree binding documentation, it describes how to add the i2c in device tree.
Songjun Wu (2):
i2c: atmel: add i2c driver
i2c: atmel: DT binding for i2c driver
doc/device-tree-bindings/i2c/i2c-at91.txt | 24 +++ drivers/i2c/Kconfig | 10 ++ drivers/i2c/Makefile | 1 + drivers/i2c/at91_i2c.c | 290 ++++++++++++++++++++++++++++++ drivers/i2c/at91_i2c.h | 76 ++++++++ 5 files changed, 401 insertions(+) create mode 100644 doc/device-tree-bindings/i2c/i2c-at91.txt create mode 100644 drivers/i2c/at91_i2c.c create mode 100644 drivers/i2c/at91_i2c.h
Signature · 1 line
2.7.4
PATCH 1/2 i2c: atmel: add i2c driver
Add i2c driver.
---
drivers/i2c/Kconfig | 10 ++ drivers/i2c/Makefile | 1 + drivers/i2c/at91_i2c.c | 290 +++++++++++++++++++++++++++++++++++++++++++++++++ drivers/i2c/at91_i2c.h | 76 +++++++++++++ 4 files changed, 377 insertions(+) create mode 100644 drivers/i2c/at91_i2c.c create mode 100644 drivers/i2c/at91_i2c.h
drivers/i2c/Kconfig +10 -0
@@ -58,6 +58,16 @@ config DM_I2C_GPIO bindings are supported. Binding info: doc/device-tree-bindings/i2c/i2c-gpio.txt +config SYS_I2C_AT91 + bool "Atmel I2C driver" + depends on DM_I2C && ARCH_AT91 + help + Add support for the Atmel I2C driver. A serious problem is that there + is no documented way to issue repeated START conditions for more than + two messages, as needed to support combined I2C messages. Use the + i2c-gpio driver unless your system can cope with this limitation. + Binding info: doc/device-tree-bindings/i2c/i2c-at91.txt + config SYS_I2C_CADENCE tristate "Cadence I2C Controller" depends on DM_I2C && (ARCH_ZYNQ || ARM64)
drivers/i2c/Makefile +1 -0
@@ -16,6 +16,7 @@ obj-$(CONFIG_PCA9564_I2C) += pca9564_i2c.o obj-$(CONFIG_TSI108_I2C) += tsi108_i2c.o obj-$(CONFIG_SH_SH7734_I2C) += sh_sh7734_i2c.o obj-$(CONFIG_SYS_I2C) += i2c_core.o +obj-$(CONFIG_SYS_I2C_AT91) += at91_i2c.o obj-$(CONFIG_SYS_I2C_CADENCE) += i2c-cdns.o obj-$(CONFIG_SYS_I2C_DAVINCI) += davinci_i2c.o obj-$(CONFIG_SYS_I2C_DW) += designware_i2c.o
drivers/i2c/at91_i2c.c new file +290 -0
290 lines not on this page · raw message
drivers/i2c/at91_i2c.h new file +76 -0
76 lines not on this page · raw message
Signature · 1 line
2.7.4
PATCH 1/2 i2c: atmel: add i2c driver
Hello Songjun Wu,
Am 06.05.2016 um 07:32 schrieb Songjun Wu:
Quoted 5 lines
Add i2c driver.
Signed-off-by Songjun Wu <[email protected]>---
Quoted 7 lines
drivers/i2c/Kconfig | 10 ++ drivers/i2c/Makefile | 1 + drivers/i2c/at91_i2c.c | 290 +++++++++++++++++++++++++++++++++++++++++++++++++ drivers/i2c/at91_i2c.h | 76 +++++++++++++ 4 files changed, 377 insertions(+)create mode 100644
drivers/i2c/at91_i2c.c
create mode 100644drivers/i2c/at91_i2c.h
Thanks!
bye,
Heiko
Signature · 2 lines
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
PATCH 2/2 i2c: atmel: DT binding for i2c driver
In reply to Songjun WuDT binding documentation for atmel i2c driver.
---
doc/device-tree-bindings/i2c/i2c-at91.txt | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 doc/device-tree-bindings/i2c/i2c-at91.txt
doc/device-tree-bindings/i2c/i2c-at91.txt new file +24 -0
@@ -0,0 +1,24 @@ +I2C for Atmel platforms + +Required properties : +- compatible : Must be "atmel,at91rm9200-i2c", "atmel,at91sam9261-i2c", + "atmel,at91sam9260-i2c", "atmel,at91sam9g20-i2c", "atmel,at91sam9g10-i2c", + "atmel,at91sam9x5-i2c", "atmel,sama5d4-i2c" or "atmel,sama5d2-i2c". +- reg: physical base address of the controller and length of memory mapped + region. +- #address-cells = <1>; +- #size-cells = <0>; + +Optional properties: +- clock-frequency: Desired I2C bus frequency in Hz, default value is 100000. +- Child nodes conforming to i2c bus binding. + +Examples : + +i2c0: i2c at f8028000 { + compatible = "atmel,sama5d2-i2c"; + reg = <0xf8028000 0x100>; + #address-cells = <1>; + #size-cells = <0>; + clock-frequency = <100000>; +};
Signature · 1 line
2.7.4
PATCH 2/2 i2c: atmel: DT binding for i2c driver
Hello Songjun Wu,
Am 06.05.2016 um 07:32 schrieb Songjun Wu:
Quoted 8 lines
DT binding documentation for atmel i2c driver.
Signed-off-by Songjun Wu <[email protected]>---
doc/device-tree-bindings/i2c/i2c-at91.txt | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+)create mode 100644
doc/device-tree-bindings/i2c/i2c-at91.txt
Thanks!
bye,
Heiko
Signature · 2 lines
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany