i2c: hibvt: add Hisilicon BVT I2C controller driver
Subsystems (2)
PATCH v2 1/1 i2c: hibvt: add Hisilicon BVT I2C controller driver
add Hisilicon BVT I2C controller driver support.
---
change log
v2:
1)Fixed a compile error.
2)Dropped the clock-names property.
.../devicetree/bindings/i2c/i2c-hibvt.txt | 23 + drivers/i2c/busses/Kconfig | 10 + drivers/i2c/busses/Makefile | 1 + drivers/i2c/busses/i2c-hibvt.c | 736 +++++++++++++++++++++ 4 files changed, 770 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 +23 -0
@@ -0,0 +1,23 @@ +Hisilicon BVT I2C master controller + +Required properties: +- compatible: should be "hisilicon,hibvt-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,hibvt-i2c"; + reg = <0x12110000 0x100>; + interrupts = <20>; + clocks = <&crg_ctrl HI3516CV300_APB_CLK>; + clock-frequency = <100000>; +};
drivers/i2c/busses/Kconfig +10 -0
@@ -552,6 +552,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 +736 -0
736 lines not on this page · raw message
Signature · 1 line
2.3.7
Rob Herring
maintainerQuoted 22 lines · Pan Wen
add Hisilicon BVT I2C controller driver support.
Signed-off-by Pan Wen <[email protected]>---
change log
v2:
1)Fixed a compile error.
2)Dropped the clock-names property..../devicetree/bindings/i2c/i2c-hibvt.txt | 23 + drivers/i2c/busses/Kconfig | 10 + drivers/i2c/busses/Makefile | 1 + drivers/i2c/busses/i2c-hibvt.c | 736 +++++++++++++++++++++ 4 files changed, 770 insertions(+) create mode 100644 Documentation/devicetree/bindings/i2c/i2c-hibvt.txt create mode 100644 drivers/i2c/busses/i2c-hibvt.cDocumentation/devicetree/bindings/i2c/i2c-hibvt.txt new file +0
-0
Documentation/devicetree/bindings/i2c/i2c-hibvt.txt line 4
Quoted 4 lines
Documentation/devicetree/bindings/i2c/i2c-hibvt.txt new file +4
-0@@ -0,0 +1,23 @@ +Hisilicon BVT I2C master controller + +Required properties: +- compatible: should be "hisilicon,hibvt-i2c".
Needs a SoC specific compatible string.
Quoted 19 lines
Documentation/devicetree/bindings/i2c/i2c-hibvt.txt new file +19
-0+- 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,hibvt-i2c"; + reg = <0x12110000 0x100>; + interrupts = <20>; + clocks = <&crg_ctrl HI3516CV300_APB_CLK>; + clock-frequency = <100000>; +};
Hi Rob,
Quoted 17 lines · Rob Herring
Quoted 16 lines · Pan Wen
add Hisilicon BVT I2C controller driver support.
Signed-off-by Pan Wen <[email protected]>---
change log
v2:
1)Fixed a compile error.
2)Dropped the clock-names property..../devicetree/bindings/i2c/i2c-hibvt.txt | 23 + drivers/i2c/busses/Kconfig | 10 + drivers/i2c/busses/Makefile | 1 + drivers/i2c/busses/i2c-hibvt.c | 736 +++++++++++++++++++++ 4 files changed, 770 insertions(+) create mode 100644 Documentation/devicetree/bindings/i2c/i2c-hibvt.txt create mode 100644 drivers/i2c/busses/i2c-hibvt.c
Quoted 13 lines
Documentation/devicetree/bindings/i2c/i2c-hibvt.txt line 4
Quoted 10 lines
Documentation/devicetree/bindings/i2c/i2c-hibvt.txt new file +4
-0@@ -0,0 +1,23 @@ +Hisilicon BVT I2C master controller + +Required properties: +- compatible: should be "hisilicon,hibvt-i2c".Needs a SoC specific compatible string.
OK. Thanks for your comments. I will add a SoC specific compatible string in next version.
Thanks,
Pan.
Quoted 22 lines
Quoted 9 lines
Documentation/devicetree/bindings/i2c/i2c-hibvt.txt new file +9
-0+- 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:Documentation/devicetree/bindings/i2c/i2c-hibvt.txt line 23
Quoted 10 lines
Documentation/devicetree/bindings/i2c/i2c-hibvt.txt new file +10
-0+see Documentation/devicetree/bindings/i2c/i2c.txt. + +Examples: +i2c_bus0: i2c@12110000 { + compatible = "hisilicon,hibvt-i2c"; + reg = <0x12110000 0x100>; + interrupts = <20>; + clocks = <&crg_ctrl HI3516CV300_APB_CLK>; + clock-frequency = <100000>; +};.