From 16082df9fc35be0488ddd3b4280187a9a361b511 Mon Sep 17 00:00:00 2001 From: Vladimir Barinov Date: Wed, 25 Mar 2020 14:29:31 +0300 Subject: [PATCH] media: i2c: ti9x4: increase i2c freq on master bus This increase the serializer (remote) i2c frequency on master bus. This speed up imager access since deafult timings are 100Khz Signed-off-by: Vladimir Barinov --- drivers/media/i2c/soc_camera/ti9x4.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/media/i2c/soc_camera/ti9x4.c b/drivers/media/i2c/soc_camera/ti9x4.c index 627612a..ca86f1fc 100644 --- a/drivers/media/i2c/soc_camera/ti9x4.c +++ b/drivers/media/i2c/soc_camera/ti9x4.c @@ -147,9 +147,6 @@ static void ti9x4_initial_setup(struct i2c_client *client) /* Initial setup */ client->addr = priv->des_addr; /* TI9x4 I2C */ - reg8_write(client, 0x08, 0x1c); /* I2C glitch filter depth */ - reg8_write(client, 0x0a, 0x79); /* I2C high pulse width */ - reg8_write(client, 0x0b, 0x79); /* I2C low pulse width */ reg8_write(client, 0x0d, 0xb9); /* VDDIO 3.3V */ switch (priv->csi_rate) { case 1600: /* REFCLK = 25MHZ */ @@ -340,6 +337,8 @@ static int ti9x4_initialize(struct i2c_client *client) switch (priv->ser_id) { case TI913_ID: reg8_write(client, 0x0d, 0x55); /* Enable remote GPIO0/1 */ + reg8_write(client, 0x11, 0x10); /* I2C high pulse width */ + reg8_write(client, 0x12, 0x10); /* I2C low pulse width */ break; case TI953_ID: reg8_write(client, 0x0d, (priv->gpio[0] & 0x1) << 0 | @@ -354,6 +353,8 @@ static int ti9x4_initialize(struct i2c_client *client) (!!priv->gpio[1] << 5) | (!!priv->gpio[2] << 6) | (!!priv->gpio[3] << 7)); /* Enable serializer GPIOs only for output */ + reg8_write(client, 0x0b, 0x10); /* I2C high pulse width */ + reg8_write(client, 0x0c, 0x10); /* I2C low pulse width */ break; } client->addr = priv->des_addr; -- 2.7.4