aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c
diff options
context:
space:
mode:
authorAlain Volmat <alain.volmat@foss.st.com>2022-07-07 09:44:02 +0200
committerWolfram Sang <wsa@kernel.org>2022-07-16 14:24:41 +0200
commitd4d2f170dd3313f55ec83ef60b4508ffcbc59695 (patch)
treefd4840daed8ef650dc7a7dfb44a91901d96ec359 /drivers/i2c
parentdt-bindings: i2c: st,stm32-i2c: add entry for stm32mp13 (diff)
downloadlinux-dev-d4d2f170dd3313f55ec83ef60b4508ffcbc59695.tar.xz
linux-dev-d4d2f170dd3313f55ec83ef60b4508ffcbc59695.zip
i2c: stm32: add support for the STM32MP13 soc
Add a new compatible for the stm32mp13. Fast Mode Plus control register address differ from the one for STM32MP15. Signed-off-by: Alain Volmat <alain.volmat@foss.st.com> Reviewed-by: Pierre-Yves MORDRET <pierre-yves.mordret@foss.st.com> Signed-off-by: Wolfram Sang <wsa@kernel.org>
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/busses/i2c-stm32f7.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/i2c/busses/i2c-stm32f7.c b/drivers/i2c/busses/i2c-stm32f7.c
index 6d4aa64b195d..d1c59d83a65b 100644
--- a/drivers/i2c/busses/i2c-stm32f7.c
+++ b/drivers/i2c/busses/i2c-stm32f7.c
@@ -410,6 +410,12 @@ static const struct stm32f7_i2c_setup stm32mp15_setup = {
.fmp_clr_offset = 0x40,
};
+static const struct stm32f7_i2c_setup stm32mp13_setup = {
+ .rise_time = STM32F7_I2C_RISE_TIME_DEFAULT,
+ .fall_time = STM32F7_I2C_FALL_TIME_DEFAULT,
+ .fmp_clr_offset = 0x4,
+};
+
static inline void stm32f7_i2c_set_bits(void __iomem *reg, u32 mask)
{
writel_relaxed(readl_relaxed(reg) | mask, reg);
@@ -2468,6 +2474,7 @@ static const struct dev_pm_ops stm32f7_i2c_pm_ops = {
static const struct of_device_id stm32f7_i2c_match[] = {
{ .compatible = "st,stm32f7-i2c", .data = &stm32f7_setup},
{ .compatible = "st,stm32mp15-i2c", .data = &stm32mp15_setup},
+ { .compatible = "st,stm32mp13-i2c", .data = &stm32mp13_setup},
{},
};
MODULE_DEVICE_TABLE(of, stm32f7_i2c_match);