Skip to content

Commit 2bbd681

Browse files
Subhendu Sekhar BeheraWolfram Sang
authored andcommitted
i2c: xlp9xx: Driver for Netlogic XLP9XX/5XX I2C controller
Add an I2C bus driver i2c-xlp9xx.c to support the I2C block in the XLP9xx/XLP5xx MIPS SoC. Update Kconfig and Makefile to add the CONFIG_I2C_XLP9XX option. Signed-off-by: Subhendu Sekhar Behera <sbehera@broadcom.com> Signed-off-by: Jayachandran C <jchandra@broadcom.com> Reviewed-by: Ray Jui <rjui@broadcom.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
1 parent 85e4564 commit 2bbd681

4 files changed

Lines changed: 478 additions & 0 deletions

File tree

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
Device tree configuration for the I2C controller on the XLP9xx/5xx SoC
2+
3+
Required properties:
4+
- compatible : should be "netlogic,xlp980-i2c"
5+
- reg : bus address start and address range size of device
6+
- interrupts : interrupt number
7+
8+
Optional properties:
9+
- clock-frequency : frequency of bus clock in Hz
10+
Defaults to 100 KHz when the property is not specified
11+
12+
Example:
13+
14+
i2c0: i2c@113100 {
15+
compatible = "netlogic,xlp980-i2c";
16+
#address-cells = <1>;
17+
#size-cells = <0>;
18+
reg = <0 0x113100 0x100>;
19+
clock-frequency = <400000>;
20+
interrupts = <30>;
21+
interrupt-parent = <&pic>;
22+
};

‎drivers/i2c/busses/Kconfig‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -916,6 +916,16 @@ config I2C_XLR
916916
This driver can also be built as a module. If so, the module
917917
will be called i2c-xlr.
918918

919+
config I2C_XLP9XX
920+
tristate "XLP9XX I2C support"
921+
depends on CPU_XLP || COMPILE_TEST
922+
help
923+
This driver enables support for the on-chip I2C interface of
924+
the Broadcom XLP9xx/XLP5xx MIPS processors.
925+
926+
This driver can also be built as a module. If so, the module will
927+
be called i2c-xlp9xx.
928+
919929
config I2C_RCAR
920930
tristate "Renesas R-Car I2C Controller"
921931
depends on ARCH_SHMOBILE || COMPILE_TEST

‎drivers/i2c/busses/Makefile‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ obj-$(CONFIG_I2C_WMT) += i2c-wmt.o
8989
obj-$(CONFIG_I2C_OCTEON) += i2c-octeon.o
9090
obj-$(CONFIG_I2C_XILINX) += i2c-xiic.o
9191
obj-$(CONFIG_I2C_XLR) += i2c-xlr.o
92+
obj-$(CONFIG_I2C_XLP9XX) += i2c-xlp9xx.o
9293
obj-$(CONFIG_I2C_RCAR) += i2c-rcar.o
9394

9495
# External I2C/SMBus adapter drivers

0 commit comments

Comments
 (0)