i2c: hibvt: add Hisilicon BVT I2C controller driver
Subsystems (2)
PATCH v4 1/1 i2c: hibvt: add Hisilicon BVT I2C controller driver
add Hisilicon BVT I2C controller driver support.
Signed-off-by Pan Wen <wenpan-C8/M+/[email protected]>
---
change log
v4:
Modify the default frequency to 100KHz.
v3:
Add a SoC specific compatible string.
v2:
1)Fixed a compile error.
2)Dropped the clock-names property.
.../devicetree/bindings/i2c/i2c-hibvt.txt | 24 + drivers/i2c/busses/Kconfig | 10 + drivers/i2c/busses/Makefile | 1 + drivers/i2c/busses/i2c-hibvt.c | 737 +++++++++++++++++++++ 4 files changed, 772 insertions(+) create mode 100644 Documentation/devicetree/bindings/i2c/i2c-hibvt.txt create mode 100644 drivers/i2c/busses/i2c-hibvt.c
Documentation/devicetree/bindings/i2c/i2c-hibvt.txt new file +24 -0
@@ -0,0 +1,24 @@ +Hisilicon BVT I2C master controller + +Required properties: +- compatible: should be "hisilicon,hibvt-i2c" and one of the following: + "hisilicon,hi3516cv300-i2c" +- reg: physical base address of the controller and length of memory mapped. + region. +- interrupts: interrupt number to the cpu. +- clocks: phandles to input clocks. + +Optional properties: +- clock-frequency: Desired I2C bus frequency in Hz, otherwise defaults to 100000. + +Other properties: +see Documentation/devicetree/bindings/i2c/i2c.txt. + +Examples: +i2c_bus0: i2c@12110000 { + compatible = "hisilicon,hi3516cv300-i2c", "hisilicon,hibvt-i2c"; + reg = <0x12110000 0x100>; + interrupts = <20>; + clocks = <&crg_ctrl HI3516CV300_APB_CLK>; + clock-frequency = <100000>; +};
drivers/i2c/busses/Kconfig +10 -0
@@ -555,6 +555,16 @@ config I2C_GPIO This is a very simple bitbanging I2C driver utilizing the arch-neutral GPIO API to control the SCL and SDA lines. +config I2C_HIBVT + tristate "Hisilicon BVT I2C Controller" + depends on ARCH_HISI + help + Say Y here to include support for Hisilicon BVT I2C controller in the + Hisilicon BVT SoCs. + + This driver can also be built as a module. If so, the module + will be called i2c-hibvt. + config I2C_HIGHLANDER tristate "Highlander FPGA SMBus interface" depends on SH_HIGHLANDER
drivers/i2c/busses/Makefile +1 -0
@@ -51,6 +51,7 @@ obj-$(CONFIG_I2C_EG20T) += i2c-eg20t.o obj-$(CONFIG_I2C_EMEV2) += i2c-emev2.o obj-$(CONFIG_I2C_EXYNOS5) += i2c-exynos5.o obj-$(CONFIG_I2C_GPIO) += i2c-gpio.o +obj-$(CONFIG_I2C_HIBVT) += i2c-hibvt.o obj-$(CONFIG_I2C_HIGHLANDER) += i2c-highlander.o obj-$(CONFIG_I2C_HIX5HD2) += i2c-hix5hd2.o obj-$(CONFIG_I2C_IBM_IIC) += i2c-ibm_iic.o
drivers/i2c/busses/i2c-hibvt.c new file +737 -0
737 lines not on this page · raw message
Signature · 6 lines
2.9.3 -- 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
Quoted 12 lines · Pan Wen
add Hisilicon BVT I2C controller driver support.
Signed-off-by Pan Wen <[email protected]>---
change log
v4:
Modify the default frequency to 100KHz.
v3:
Add a SoC specific compatible string.
v2:
1)Fixed a compile error.
2)Dropped the clock-names property.
Quoted 1 line
.../devicetree/bindings/i2c/i2c-hibvt.txt | 24 +
Acked-by Rob Herring <[email protected]>
Quoted 6 lines
drivers/i2c/busses/Kconfig | 10 + drivers/i2c/busses/Makefile | 1 + drivers/i2c/busses/i2c-hibvt.c | 737 +++++++++++++++++++++ 4 files changed, 772 insertions(+) create mode 100644 Documentation/devicetree/bindings/i2c/i2c-hibvt.txt create mode 100644 drivers/i2c/busses/i2c-hibvt.c