4df9bf043b1699bc85fb601c79074e56bf83bd3a
[openwrt/openwrt.git] / target / linux / realtek / patches-5.10 / 310-add-i2c-rtl9300-support.patch
1 From 63a0a4d85bc900464c5b046b13808a582345f8c8 Mon Sep 17 00:00:00 2001
2 From: Birger Koblitz <git@birger-koblitz.de>
3 Date: Sat, 11 Dec 2021 20:14:47 +0100
4 Subject: [PATCH] realtek: Add support for RTL9300/RTL9310 I2C controller
5
6 This adds support for the RTL9300 and RTL9310 I2C controller.
7 The controller implements the SMBus protocol for SMBus transfers
8 over an I2C bus. The driver supports selecting one of the 2 possible
9 SCL pins and any of the 8 possible SDA pins. Bus speeds of
10 100kHz (standard speed) and 400kHz (high speed I2C) are supported.
11
12 Submitted-by: Birger Koblitz <git@birger-koblitz.de>
13 ---
14 drivers/i2c/busses/Kconfig | 10 +++++++++
15 drivers/i2c/busses/Makefile | 1 +
16 2 files changed, 11 insertions(+)
17
18 --- a/drivers/i2c/busses/Kconfig
19 +++ b/drivers/i2c/busses/Kconfig
20 @@ -954,6 +954,16 @@ config I2C_RK3X
21 This driver can also be built as a module. If so, the module will
22 be called i2c-rk3x.
23
24 +config I2C_RTL9300
25 + tristate "Realtek RTL9300 I2C adapter"
26 + depends on OF
27 + help
28 + Say Y here to include support for the I2C adapter in Realtek RTL9300
29 + and RTL9310 SoCs.
30 +
31 + This driver can also be built as a module. If so, the module will
32 + be called i2c-rtl9300.
33 +
34 config HAVE_S3C2410_I2C
35 bool
36 help
37 --- a/drivers/i2c/busses/Makefile
38 +++ b/drivers/i2c/busses/Makefile
39 @@ -95,6 +95,7 @@ obj-$(CONFIG_I2C_QCOM_GENI) += i2c-qcom-
40 obj-$(CONFIG_I2C_QUP) += i2c-qup.o
41 obj-$(CONFIG_I2C_RIIC) += i2c-riic.o
42 obj-$(CONFIG_I2C_RK3X) += i2c-rk3x.o
43 +obj-$(CONFIG_I2C_RTL9300) += i2c-rtl9300.o
44 obj-$(CONFIG_I2C_S3C2410) += i2c-s3c2410.o
45 obj-$(CONFIG_I2C_SH7760) += i2c-sh7760.o
46 obj-$(CONFIG_I2C_SH_MOBILE) += i2c-sh_mobile.o