Commit 3f9c37a0 authored by Joachim Eastwood's avatar Joachim Eastwood Committed by Wolfram Sang

i2c: lpc2k: add driver

Add support for the I2C controller found on several NXP devices
including LPC2xxx, LPC178x/7x and LPC18xx/43xx. The controller
is implemented as a state machine and the driver act upon the
state changes when the bus is accessed.

The I2C controller supports master/slave operation, bus
arbitration, programmable clock rate, and speeds up to 1 Mbit/s.
Signed-off-by: default avatarJoachim Eastwood <manabian@gmail.com>
Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
parent b3fdd327
NXP I2C controller for LPC2xxx/178x/18xx/43xx
Required properties:
- compatible: must be "nxp,lpc1788-i2c"
- reg: physical address and length of the device registers
- interrupts: a single interrupt specifier
- clocks: clock for the device
- #address-cells: should be <1>
- #size-cells: should be <0>
Optional properties:
- clock-frequency: the desired I2C bus clock frequency in Hz; in
absence of this property the default value is used (100 kHz).
Example:
i2c0: i2c@400a1000 {
compatible = "nxp,lpc1788-i2c";
reg = <0x400a1000 0x1000>;
interrupts = <18>;
clocks = <&ccu1 CLK_APB1_I2C0>;
#address-cells = <1>;
#size-cells = <0>;
};
&i2c0 {
clock-frequency = <400000>;
lm75@48 {
compatible = "nxp,lm75";
reg = <0x48>;
};
};
......@@ -619,6 +619,16 @@ config I2C_KEMPLD
This driver can also be built as a module. If so, the module
will be called i2c-kempld.
config I2C_LPC2K
tristate "I2C bus support for NXP LPC2K/LPC178x/18xx/43xx"
depends on OF && (ARCH_LPC18XX || COMPILE_TEST)
help
This driver supports the I2C interface found several NXP
devices including LPC2xxx, LPC178x/7x and LPC18xx/43xx.
This driver can also be built as a module. If so, the module
will be called i2c-lpc2k.
config I2C_MESON
tristate "Amlogic Meson I2C controller"
depends on ARCH_MESON
......
......@@ -59,6 +59,7 @@ 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_LPC2K) += i2c-lpc2k.o
obj-$(CONFIG_I2C_MESON) += i2c-meson.o
obj-$(CONFIG_I2C_MPC) += i2c-mpc.o
obj-$(CONFIG_I2C_MT65XX) += i2c-mt65xx.o
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment