diff options
author | Stefan Roese <sr@denx.de> | 2019-06-17 10:31:17 +0200 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2019-06-26 15:19:01 +0200 |
commit | d04913ec5f89f13760f8e8411c93cee542560d68 (patch) | |
tree | 677c8db645a830a73dfe8eb86705ac0b0c91adf9 /drivers/i2c/busses/Kconfig | |
parent | 71731e1b2da17f5d2a9ca654c66c393d89cba9e6 (diff) |
i2c: mt7621: Add MediaTek MT7621/7628/7688 I2C driver
This patch adds a driver for the I2C controller found on the MediaTek
MT7621/7628/7688 SoC's. The base version of this driver was done by
Steven Liu (according to the copyright and MODULE_AUTHOR lines). It
can be found in the OpenWRT repositories (v4.14 at the time I looked).
The base driver had many issues, which are disccussed here:
https://en.forum.labs.mediatek.com/t/openwrt-15-05-loads-non-working-i2c-kernel-module-for-mt7688/1286/3
>From this link an enhanced driver version (complete rewrite, mayor
changes: support clock stretching, repeated start, ACK handling and
unlimited message length) from Jan Breuer can be found here:
https://gist.github.com/j123b567/9b555b635c2b4069d716b24198546954
This patch now adds this enhanced I2C driver to mainline.
Changes by Stefan Roese for upstreaming:
- Add devicetree bindings
- checkpatch clean
- Use module_platform_driver()
- Minor cosmetic enhancements
- Removed IO warpped functions
- Use readl_relaxed_poll_timeout() and drop poll_down_timeout()
- Removed superfluous barrier() in mtk_i2c_reset()
- Use i2c_8bit_addr_from_msg()
- Added I2C_FUNC_PROTOCOL_MANGLING
- Removed adap->class = I2C_CLASS_HWMON | I2C_CLASS_SPD;
Signed-off-by: Stefan Roese <sr@denx.de>
Tested-by: René van Dorst <opensource@vdorst.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/i2c/busses/Kconfig')
-rw-r--r-- | drivers/i2c/busses/Kconfig | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig index 07c86cd058cd..68b677be1fa4 100644 --- a/drivers/i2c/busses/Kconfig +++ b/drivers/i2c/busses/Kconfig @@ -747,6 +747,13 @@ config I2C_MT65XX If you want to use MediaTek(R) I2C interface, say Y or M here. If unsure, say N. +config I2C_MT7621 + tristate "MT7621/MT7628 I2C Controller" + depends on (RALINK && (SOC_MT7620 || SOC_MT7621)) || COMPILE_TEST + help + Say Y here to include support for I2C controller in the + MediaTek MT7621/MT7628 SoCs. + config I2C_MV64XXX tristate "Marvell mv64xxx I2C Controller" depends on MV64X60 || PLAT_ORION || ARCH_SUNXI || ARCH_MVEBU |