Skip to contentSkip to conversation

i2c: xiic: Add Xilinx AXI I2C driver

PATCH New Marek Vasut 3 participants 5 messages Dec 19, 2018 – Jan 7, 2019

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

PATCH v2 1/1 i2c: xiic: Add Xilinx AXI I2C driver

Add Xilinx AXI I2C controller driver based on the Linux i2c-xiic driver. This driver is stripped of all the IRQ handling and uses pure polling, yet tries to retain most of the structure of the Linux driver to make backporting of fixes easy.

Note that the IP has a known limitation on 255 bytes read and write, according to xilinx this is still being worked on [1].

[1] https://forums.xilinx.com/t5/Embedded-Processor-System-Design/AXI-IIC-V2-0-I2C-Master-Reading-multiple-bytes-from-I2C-slave/m-p/854419/highlight/true#M39387

Cc Michal Simek <[email protected]>
Cc Michal Simek <[email protected]>
Cc Heiko Schocher <[email protected]>

---
V2: - Sort Makefile
- Fix formatting in Kconfig

---
 drivers/i2c/Kconfig       |   6 +
 drivers/i2c/Makefile      |   1 +
 drivers/i2c/xilinx_xiic.c | 340 ++++++++++++++++++++++++++++++++++++++
 3 files changed, 347 insertions(+)
 create mode 100644 drivers/i2c/xilinx_xiic.c
drivers/i2c/Kconfig +6 -0
index 1ef22e6bcd..536617115a 100644
@@ -450,6 +450,12 @@ config SYS_I2C_BUS_MAX
 	help
 	  Define the maximum number of available I2C buses.
 
+config SYS_I2C_XILINX_XIIC
+	bool "Xilinx AXI I2C driver"
+	depends on DM_I2C
+	help
+	  Support for Xilinx AXI I2C controller.
+
 config SYS_I2C_ZYNQ
 	bool "Xilinx I2C driver"
 	depends on ARCH_ZYNQMP || ARCH_ZYNQ
drivers/i2c/Makefile +1 -0
index d3637bcd8d..ec2d1964c3 100644
@@ -37,6 +37,7 @@ obj-$(CONFIG_SYS_I2C_TEGRA) += tegra_i2c.o
 obj-$(CONFIG_SYS_I2C_UNIPHIER) += i2c-uniphier.o
 obj-$(CONFIG_SYS_I2C_UNIPHIER_F) += i2c-uniphier-f.o
 obj-$(CONFIG_SYS_I2C_VERSATILE) += i2c-versatile.o
+obj-$(CONFIG_SYS_I2C_XILINX_XIIC) += xilinx_xiic.o
 obj-$(CONFIG_SYS_I2C_ZYNQ) += zynq_i2c.o
 obj-$(CONFIG_TEGRA186_BPMP_I2C) += tegra186_bpmp_i2c.o
 
drivers/i2c/xilinx_xiic.c new file +340 -0

340 lines not on this page · raw message

Signature · 1 line
2.18.0
#1 lore raw

PATCH v2 1/1 i2c: xiic: Add Xilinx AXI I2C driver

Hello Marek,

Am 19.12.2018 um 12:26 schrieb Marek Vasut:

Quoted 17 lines

Add Xilinx AXI I2C controller driver based on the Linux i2c-xiic driver. This driver is stripped of all the IRQ handling and uses pure polling, yet tries to retain most of the structure of the Linux driver to make backporting of fixes easy.

Note that the IP has a known limitation on 255 bytes read and write, according to xilinx this is still being worked on [1].

[1] https://forums.xilinx.com/t5/Embedded-Processor-System-Design/AXI-IIC-V2-0-I2C-Master-Reading-multiple-bytes-from-I2C-slave/m-p/854419/highlight/true#M39387

Cc Michal Simek <[email protected]>
Cc Michal Simek <[email protected]>
Cc Heiko Schocher <[email protected]>

---
V2: - Sort Makefile
- Fix formatting in Kconfig

Quoted 6 lines
---
  drivers/i2c/Kconfig       |   6 +
  drivers/i2c/Makefile      |   1 +
  drivers/i2c/xilinx_xiic.c | 340 ++++++++++++++++++++++++++++++++++++++
  3 files changed, 347 insertions(+)

create mode 100644 drivers/i2c/xilinx_xiic.c

bye,
Heiko

Signature · 3 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52   Fax: +49-8142-66989-80   Email: hs at denx.de
#2 lore raw

PATCH v2 1/1 i2c: xiic: Add Xilinx AXI I2C driver

Quoted 29 lines · Heiko Schocher

Hello Marek,

Am 19.12.2018 um 12:26 schrieb Marek Vasut:

Quoted 23 lines

Add Xilinx AXI I2C controller driver based on the Linux i2c-xiic driver. This driver is stripped of all the IRQ handling and uses pure polling, yet tries to retain most of the structure of the Linux driver to make backporting of fixes easy.

Note that the IP has a known limitation on 255 bytes read and write, according to xilinx this is still being worked on [1].

[1]
https://forums.xilinx.com/t5/Embedded-Processor-System-Design/AXI-IIC-V2-0-I2C-Master-Reading-multiple-bytes-from-I2C-slave/m-p/854419/highlight/true#M39387

Cc Michal Simek <[email protected]>
Cc Michal Simek <[email protected]>
Cc Heiko Schocher <[email protected]>

---
V2: - Sort Makefile
     - Fix formatting in Kconfig
---
  drivers/i2c/Kconfig       |   6 +
  drivers/i2c/Makefile      |   1 + drivers/i2c/xilinx_xiic.c | 340 ++++++++++++++++++++++++++++++++++++++

Quoted 2 lines
  3 files changed, 347 insertions(+)

  create mode 100644 drivers/i2c/xilinx_xiic.c

Quoted 1 line

Heiko: I hope you will take it via your tree.

Thanks,
Michal

#3 lore raw

PATCH v2 1/1 i2c: xiic: Add Xilinx AXI I2C driver

Hello Michal,

Am 07.01.2019 um 09:07 schrieb Michal Simek:

Quoted 30 lines · Heiko Schocher
Quoted 29 lines

Hello Marek,

Am 19.12.2018 um 12:26 schrieb Marek Vasut:

Quoted 25 lines

Add Xilinx AXI I2C controller driver based on the Linux i2c-xiic driver. This driver is stripped of all the IRQ handling and uses pure polling, yet tries to retain most of the structure of the Linux driver to make backporting of fixes easy.

Note that the IP has a known limitation on 255 bytes read and write, according to xilinx this is still being worked on [1].

[1]
https://forums.xilinx.com/t5/Embedded-Processor-System-Design/AXI-IIC-V2-0-I2C-Master-Reading-multiple-bytes-from-I2C-slave/m-p/854419/highlight/true#M39387

Cc Michal Simek <[email protected]>
Cc Michal Simek <[email protected]>
Cc Heiko Schocher <[email protected]>

---
V2: - Sort Makefile
     - Fix formatting in Kconfig

---
   drivers/i2c/Kconfig       |   6 +
   drivers/i2c/Makefile      |   1 +
   drivers/i2c/xilinx_xiic.c | 340 ++++++++++++++++++++++++++++++++++++++
   3 files changed, 347 insertions(+)

  create mode 100644 drivers/i2c/xilinx_xiic.c

Quoted 5 lines
Quoted 1 line

Heiko: I hope you will take it via your tree.

Yes, just started a travis build:
https://travis-ci.org/hsdenx/u-boot-i2c/builds/476242314

If fine, I send a pull request.

bye,
Heiko

Signature · 3 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52   Fax: +49-8142-66989-80   Email: hs at denx.de
#4 lore raw

PATCH v2 1/1 i2c: xiic: Add Xilinx AXI I2C driver

Quoted 38 lines · Heiko Schocher

Hello Michal,

Am 07.01.2019 um 09:07 schrieb Michal Simek:

Quoted 35 lines · Heiko Schocher
Quoted 33 lines

Hello Marek,

Am 19.12.2018 um 12:26 schrieb Marek Vasut:

Quoted 26 lines

Add Xilinx AXI I2C controller driver based on the Linux i2c-xiic driver.
This driver is stripped of all the IRQ handling and uses pure polling, yet tries to retain most of the structure of the Linux driver to make backporting of fixes easy.

Note that the IP has a known limitation on 255 bytes read and write, according to xilinx this is still being worked on [1].

[1]
https://forums.xilinx.com/t5/Embedded-Processor-System-Design/AXI-IIC-V2-0-I2C-Master-Reading-multiple-bytes-from-I2C-slave/m-p/854419/highlight/true#M39387

Cc Michal Simek <[email protected]>
Cc Michal Simek <[email protected]>
Cc Heiko Schocher <[email protected]>

---
V2: - Sort Makefile
      - Fix formatting in Kconfig
---
   drivers/i2c/Kconfig       |   6 +
   drivers/i2c/Makefile      |   1 +
   drivers/i2c/xilinx_xiic.c | 340
++++++++++++++++++++++++++++++++++++++

Quoted 2 lines
   3 files changed, 347 insertions(+)

   create mode 100644 drivers/i2c/xilinx_xiic.c

Quoted 8 lines
Quoted 3 lines

Heiko: I hope you will take it via your tree.

Yes, just started a travis build:
https://travis-ci.org/hsdenx/u-boot-i2c/builds/476242314

If fine, I send a pull request.

Great.
M