From 07aec3b12f833316963d45681f2dcbf688973621 Mon Sep 17 00:00:00 2001 From: Vladimir Barinov Date: Wed, 25 Mar 2020 14:34:14 +0300 Subject: [PATCH] media: i2c: max9286: increase i2c freq inside GMSL cahnnel This slightly (10%) increases the i2c transaction speed over GMSL. Signed-off-by: Vladimir Barinov --- drivers/media/i2c/soc_camera/max9286.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/media/i2c/soc_camera/max9286.c b/drivers/media/i2c/soc_camera/max9286.c index 05247ff..28bd3c3 100644 --- a/drivers/media/i2c/soc_camera/max9286.c +++ b/drivers/media/i2c/soc_camera/max9286.c @@ -31,7 +31,7 @@ #define MAXIM_I2C_I2C_SPEED_105KHZ (0x3 << 2) /* 105 kbps */ #define MAXIM_I2C_I2C_SPEED_085KHZ (0x2 << 2) /* 84.7 kbps */ #define MAXIM_I2C_I2C_SPEED_028KHZ (0x1 << 2) /* 28.3 kbps */ -#define MAXIM_I2C_I2C_SPEED MAXIM_I2C_I2C_SPEED_339KHZ +#define MAXIM_I2C_I2C_SPEED MAXIM_I2C_I2C_SPEED_837KHZ struct max9286_priv { struct v4l2_subdev sd[4]; @@ -270,6 +270,7 @@ static void max9286_postinit(struct i2c_client *client, int addr) reg8_write(client, 0x0b, priv->csi2_outord); /* CSI2 output order */ reg8_write(client, 0x15, 0x9b); /* enable CSI output, VC is set accordingly to Link number, BIT7 magic must be set */ reg8_write(client, 0x1b, priv->switchin | priv->links_mask); /* coax polarity, enable equalizer for CAMs */ + reg8_write(client, 0x34, 0x22 | MAXIM_I2C_I2C_SPEED); /* disable artificial ACK, I2C speed set */ usleep_range(5000, 5500); /* wait 2ms after any change of reverse channel settings */ if (strcmp(priv->fsync_mode, "manual") == 0) { -- 2.7.4