i2c: nomadik: support Mobileye EyeQ5 I2C controller
authorThéo Lebrun <theo.lebrun@bootlin.com>
Wed, 6 Mar 2024 17:59:28 +0000 (18:59 +0100)
committerAndi Shyti <andi.shyti@kernel.org>
Tue, 12 Mar 2024 10:50:45 +0000 (11:50 +0100)
commit7d4c57abb9284030dc58ffac4fb76eb12d3d947c
tree9cd209805014e9b27f61e632cab5e517f92a28d4
parentec189b9fb83cd1c869d45bfe3c9cb27b71093a16
i2c: nomadik: support Mobileye EyeQ5 I2C controller

Add compatible for the integration of the same DB8500 IP block into the
Mobileye EyeQ5 platform. Two quirks are present:

 - The memory bus only supports 32-bit accesses. Avoid writeb() and
   readb() by introducing helper functions that fallback to writel()
   and readl().

 - A register must be configured for the I2C speed mode; it is located
   in a shared register region called OLB. We access that memory region
   using a syscon & regmap that gets passed as a phandle (mobileye,olb).

   A two-bit enum per controller is written into the register; that
   requires us to know the global index of the I2C controller (cell arg
   to the mobileye,olb phandle).

We add #include <linux/mfd/syscon.h> and <linux/regmap.h>.

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
Reviewed-by: Andi Shyti <andi.shyti@kernel.org>
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
drivers/i2c/busses/i2c-nomadik.c