Skip to content

Commit c366be7

Browse files
cpackham-atlnzAndi Shyti
authored andcommitted
i2c: Add driver for the RTL9300 I2C controller
Add support for the I2C controller on the RTL9300 SoC. There are two I2C controllers in the RTL9300 that are part of the Ethernet switch register block. Each of these controllers owns a SCL pin (GPIO8 for the fiorst I2C controller, GPIO17 for the second). There are 8 possible SDA pins (GPIO9-16) that can be assigned to either I2C controller. This relationship is represented in the device tree with a child node for each SDA line in use. This is based on the openwrt implementation[1] but has been significantly modified [1] - https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=target/linux/realtek/files-5.15/drivers/i2c/busses/i2c-rtl9300.c Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz> Reviewed-by: Andi Shyti <andi.shyti@kernel.org> Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
1 parent b641af6 commit c366be7

File tree

4 files changed

+441
-0
lines changed

4 files changed

+441
-0
lines changed

MAINTAINERS

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20115,6 +20115,13 @@ S: Maintained
2011520115
T: git https://github.com/pkshih/rtw.git
2011620116
F: drivers/net/wireless/realtek/rtl8xxxu/
2011720117

20118+
RTL9300 I2C DRIVER (rtl9300-i2c)
20119+
M: Chris Packham <chris.packham@alliedtelesis.co.nz>
20120+
L: linux-i2c@vger.kernel.org
20121+
S: Maintained
20122+
F: Documentation/devicetree/bindings/i2c/realtek,rtl9301-i2c.yaml
20123+
F: drivers/i2c/busses/i2c-rtl9300.c
20124+
2011820125
RTRS TRANSPORT DRIVERS
2011920126
M: Md. Haris Iqbal <haris.iqbal@ionos.com>
2012020127
M: Jack Wang <jinpu.wang@ionos.com>

drivers/i2c/busses/Kconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1053,6 +1053,16 @@ config I2C_RK3X
10531053
This driver can also be built as a module. If so, the module will
10541054
be called i2c-rk3x.
10551055

1056+
config I2C_RTL9300
1057+
tristate "Realtek RTL9300 I2C controller"
1058+
depends on MACH_REALTEK_RTL || COMPILE_TEST
1059+
help
1060+
Say Y here to include support for the I2C controller in Realtek
1061+
RTL9300 SoCs.
1062+
1063+
This driver can also be built as a module. If so, the module will
1064+
be called i2c-rtl9300.
1065+
10561066
config I2C_RZV2M
10571067
tristate "Renesas RZ/V2M adapter"
10581068
depends on ARCH_RENESAS || COMPILE_TEST

drivers/i2c/busses/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ obj-$(CONFIG_I2C_QCOM_GENI) += i2c-qcom-geni.o
100100
obj-$(CONFIG_I2C_QUP) += i2c-qup.o
101101
obj-$(CONFIG_I2C_RIIC) += i2c-riic.o
102102
obj-$(CONFIG_I2C_RK3X) += i2c-rk3x.o
103+
obj-$(CONFIG_I2C_RTL9300) += i2c-rtl9300.o
103104
obj-$(CONFIG_I2C_RZV2M) += i2c-rzv2m.o
104105
obj-$(CONFIG_I2C_S3C2410) += i2c-s3c2410.o
105106
obj-$(CONFIG_I2C_SH7760) += i2c-sh7760.o

0 commit comments

Comments
 (0)