Skip to content

Commit

Permalink
i2c: jz4780: Add i2c bus controller driver for Ingenic JZ4780
Browse files Browse the repository at this point in the history
Adds the i2c bus controller driver for the Ingenic JZ4780 SoC.

Signed-off-by: Zubair Lutfullah Kakakhel <[email protected]>
Signed-off-by: Wolfram Sang <[email protected]>
  • Loading branch information
Zubair Lutfullah Kakakhel authored and Wolfram Sang committed Apr 3, 2015
1 parent 3b10db2 commit ba92222
Show file tree
Hide file tree
Showing 4 changed files with 877 additions and 0 deletions.
35 changes: 35 additions & 0 deletions Documentation/devicetree/bindings/i2c/i2c-jz4780.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
* Ingenic JZ4780 I2C Bus controller

Required properties:
- compatible: should be "ingenic,jz4780-i2c"
- reg: Should contain the address & size of the I2C controller registers.
- interrupts: Should specify the interrupt provided by parent.
- clocks: Should contain a single clock specifier for the JZ4780 I2C clock.
- clock-frequency: desired I2C bus clock frequency in Hz.

Recommended properties:
- pinctrl-names: should be "default";
- pinctrl-0: phandle to pinctrl function

Optional properties:
- interrupt-parent: Should be the phandle of the interrupt controller that
delivers interrupts to the I2C block.

Example

/ {
i2c4: i2c4@0x10054000 {
compatible = "ingenic,jz4780-i2c";
reg = <0x10054000 0x1000>;

interrupt-parent = <&intc>;
interrupts = <56>;

clocks = <&cgu JZ4780_CLK_SMB4>;
clock-frequency = <100000>;
pinctrl-names = "default";
pinctrl-0 = <&pins_i2c4_data>;

};
};

9 changes: 9 additions & 0 deletions drivers/i2c/busses/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -583,6 +583,15 @@ config I2C_IOP3XX
This driver can also be built as a module. If so, the module
will be called i2c-iop3xx.

config I2C_JZ4780
tristate "JZ4780 I2C controller interface support"
depends on MACH_JZ4780 || COMPILE_TEST
help
If you say yes to this option, support will be included for the
Ingenic JZ4780 I2C controller.

If you don't know what to do here, say N.

config I2C_KEMPLD
tristate "Kontron COM I2C Controller"
depends on MFD_KEMPLD
Expand Down
1 change: 1 addition & 0 deletions drivers/i2c/busses/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ obj-$(CONFIG_I2C_IBM_IIC) += i2c-ibm_iic.o
obj-$(CONFIG_I2C_IMG) += i2c-img-scb.o
obj-$(CONFIG_I2C_IMX) += i2c-imx.o
obj-$(CONFIG_I2C_IOP3XX) += i2c-iop3xx.o
obj-$(CONFIG_I2C_JZ4780) += i2c-jz4780.o
obj-$(CONFIG_I2C_KEMPLD) += i2c-kempld.o
obj-$(CONFIG_I2C_MESON) += i2c-meson.o
obj-$(CONFIG_I2C_MPC) += i2c-mpc.o
Expand Down
Loading

0 comments on commit ba92222

Please sign in to comment.