diff mbox series

[1/2] RFC: media: i2c: max9286: Compensate reverse channel

Message ID 20200916154338.159747-2-jacopo+renesas@jmondi.org (mailing list archive)
State Superseded
Delegated to: Kieran Bingham
Headers show
Series media: i2c: Add support for RDACM21 camera module | expand

Commit Message

Jacopo Mondi Sept. 16, 2020, 3:43 p.m. UTC
Adjust the MAX9286 reverse channel amplitude to support devices which
are not pre-programmed, like the RDACM21 camera module.

The de-serializer starts with a 100mV channel amplitude, and increases
it to 170mV after all remote ends have probed and enabled their
'high-threshold' noise immunity feature.

Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
---
 drivers/media/i2c/max9286.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

--
2.28.0
diff mbox series

Patch

diff --git a/drivers/media/i2c/max9286.c b/drivers/media/i2c/max9286.c
index 6852448284ea..992eb15a59be 100644
--- a/drivers/media/i2c/max9286.c
+++ b/drivers/media/i2c/max9286.c
@@ -535,6 +535,11 @@  static int max9286_notify_bound(struct v4l2_async_notifier *notifier,
 	 * - Disable auto-ack as communication on the control channel are now
 	 *   stable.
 	 */
+	max9286_write(priv, 0x3f, MAX9286_EN_REV_CFG | MAX9286_REV_FLEN(35));
+	max9286_write(priv, 0x3b, MAX9286_REV_TRF(1) | MAX9286_REV_AMP(70) |
+		      MAX9286_REV_AMP_X);
+	usleep_range(2000, 2500);
+
 	max9286_check_config_link(priv, priv->source_mask);

 	/*
@@ -953,8 +958,7 @@  static int max9286_setup(struct max9286_priv *priv)
 	 *   high threshold enabled by the serializer driver.
 	 */
 	max9286_write(priv, 0x3f, MAX9286_EN_REV_CFG | MAX9286_REV_FLEN(35));
-	max9286_write(priv, 0x3b, MAX9286_REV_TRF(1) | MAX9286_REV_AMP(70) |
-		      MAX9286_REV_AMP_X);
+	max9286_write(priv, 0x3b, MAX9286_REV_TRF(1) | MAX9286_REV_AMP(100));
 	usleep_range(2000, 2500);

 	/*