Skip to content

Commit 5ea5584

Browse files
TroyMitchell911Andi Shyti
authored andcommitted
i2c: spacemit: add support for SpacemiT K1 SoC
This patch introduces basic I2C support for the SpacemiT K1 SoC, utilizing interrupts for transfers. The driver has been tested using i2c-tools on a Bananapi-F3 board, and basic I2C read/write operations have been confirmed to work. Signed-off-by: Troy Mitchell <[email protected]> Reviewed-by: Alex Elder <[email protected]> Signed-off-by: Andi Shyti <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 76fe9ac commit 5ea5584

File tree

3 files changed

+620
-0
lines changed

3 files changed

+620
-0
lines changed

drivers/i2c/busses/Kconfig

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -783,6 +783,23 @@ config I2C_JZ4780
783783

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

786+
config I2C_K1
787+
tristate "SpacemiT K1 I2C adapter"
788+
depends on ARCH_SPACEMIT || COMPILE_TEST
789+
depends on OF
790+
help
791+
This option enables support for the I2C interface on the SpacemiT K1
792+
platform.
793+
794+
If you enable this configuration, the kernel will include support for
795+
the I2C adapter specific to the SpacemiT K1 platform. This driver can
796+
be used to manage I2C bus transactions, which are necessary for
797+
interfacing with I2C peripherals such as sensors, EEPROMs, and other
798+
devices.
799+
800+
This driver can also be built as a module. If so, the
801+
module will be called `i2c-k1`.
802+
786803
config I2C_KEBA
787804
tristate "KEBA I2C controller support"
788805
depends on HAS_IOMEM

drivers/i2c/busses/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ obj-$(CONFIG_I2C_IMX) += i2c-imx.o
7474
obj-$(CONFIG_I2C_IMX_LPI2C) += i2c-imx-lpi2c.o
7575
obj-$(CONFIG_I2C_IOP3XX) += i2c-iop3xx.o
7676
obj-$(CONFIG_I2C_JZ4780) += i2c-jz4780.o
77+
obj-$(CONFIG_I2C_K1) += i2c-k1.o
7778
obj-$(CONFIG_I2C_KEBA) += i2c-keba.o
7879
obj-$(CONFIG_I2C_KEMPLD) += i2c-kempld.o
7980
obj-$(CONFIG_I2C_LPC2K) += i2c-lpc2k.o

0 commit comments

Comments
 (0)