• Théo Lebrun's avatar
    i2c: nomadik: support Mobileye EyeQ5 I2C controller · 7d4c57ab
    Théo Lebrun authored
    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: default avatarLinus Walleij <linus.walleij@linaro.org>
    Signed-off-by: default avatarThéo Lebrun <theo.lebrun@bootlin.com>
    Reviewed-by: default avatarAndi Shyti <andi.shyti@kernel.org>
    Signed-off-by: default avatarAndi Shyti <andi.shyti@kernel.org>
    7d4c57ab
i2c-nomadik.c 30.4 KB