Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1224033pxb; Sun, 21 Feb 2021 16:58:28 -0800 (PST) X-Google-Smtp-Source: ABdhPJy66y0t/ORiTbvYfC1gbkGtoUtKPw7taQIuscD+0LiQbjflP9lZNZ8JW0eV9+//2i8KxjkE X-Received: by 2002:aa7:d617:: with SMTP id c23mr19862274edr.215.1613955507833; Sun, 21 Feb 2021 16:58:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613955507; cv=none; d=google.com; s=arc-20160816; b=0v24OVMiv5QQP8Z5U4XiuNKAzAi6hACvKv9Z0+TWxPbSDYv7R/MF38PQEPTuFOGB5f LDO+N7Z/mtjFcf80Nn87murbjVQ6evNO0wWxgHYVt4PyClE3w6QpOhQ+yMjdhBO7VFiz /zblaVTs3ZB3XgMZhaxf9do2AiaCFvvFQqWDYwfXrGcZPCHwRA7ngtfkDPU3Zqr2V+r6 CrXcTnwMR9G7RoF9WaYLaxWzJr5GHij7vEjYGHrnnilBUxDIMEj5VJt5bJO9CZyYpR0g ymNrZPD8Q8F432rMxX7U9kf0GR/Rhod7FK5eeeZ7rnVq5nhjH3nFWIPA0jwj33ch6iO4 Xe+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=ihE1EoSyyquC76cYnm+mpedjTDsFewzMr12ynf+8NDY=; b=MBuRt2OgSTG0pEuaHvNcxq2p4yRYR8paKJixB2IfhyVh81sSjz4yS9Chl+F70V0sOK 0E2ZWB53VOPnuo6VJm/l/LFQ432Uri2DIRevTXTlnaJR+a6/YDwV55MFJPKxUq2bXCnc Wx7/hCPF02/CuQKSLw0s38UjHgOHfii3PU3IKD6Xe/sUB+Zh8279u08qwh73GFopMSvo fS17dmHgOMZBN5eqht/+L/UnOen964yHR7nqMqDsRrQTcdaRWrwJeYYCmXr9nPDI2B9g FAtHX81A9FFBty4VLFY4leB8kLRQGlZOwL3slQVD4qvYQnFX3vSGIxrXT1WSA1mXGM+7 55Rg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=K4BZpwWf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m19si12834258edd.202.2021.02.21.16.58.05; Sun, 21 Feb 2021 16:58:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=K4BZpwWf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230124AbhBVAuw (ORCPT + 99 others); Sun, 21 Feb 2021 19:50:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53514 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230105AbhBVAuu (ORCPT ); Sun, 21 Feb 2021 19:50:50 -0500 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C5D82C061574; Sun, 21 Feb 2021 16:50:09 -0800 (PST) Received: from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 5E91258E; Mon, 22 Feb 2021 01:50:06 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1613955006; bh=QDgBEUcxtnBMr+2qeCkHrC4sgHHhnA4SnzpEQF/qJU0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=K4BZpwWfzMQy/dLBVQUdRT2fPcMzeBNpBgTaw1zgkwjXP0vUJRq1fGJsDcItWtJDl 7qdHwFV4LKeSULiTygX8VkecNviyqzam71Ab0LeWe2mCgmykgxS985ftzSm4m/7PN2 BA8zV56/iJP9TsQOpW2GOKQE02dkG5iZwLwe0MfE= Date: Mon, 22 Feb 2021 02:49:34 +0200 From: Laurent Pinchart To: Jacopo Mondi Cc: Kieran Bingham , niklas.soderlund+renesas@ragnatech.se, geert@linux-m68k.org, Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 01/16] media: i2c: rdacm20: Enable noise immunity Message-ID: References: <20210216174146.106639-1-jacopo+renesas@jmondi.org> <20210216174146.106639-2-jacopo+renesas@jmondi.org> <5691f68f-724d-9d6a-9ea8-1e017b305c66@ideasonboard.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <5691f68f-724d-9d6a-9ea8-1e017b305c66@ideasonboard.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jacopo, Thank you for the patch. On Wed, Feb 17, 2021 at 12:55:19PM +0000, Kieran Bingham wrote: > On 16/02/2021 17:41, Jacopo Mondi wrote: > > Enable the noise immunity threshold at the end of the rdacm20 > > initialization routine. > > > > The rdcam20 camera module has been so far tested with a startup s/rdcam20/rdacm20/ > > delay that allowed the embedded MCU to program the serializer. If > > the initialization routine is run before the MCU programs the > > serializer and the image sensor and their addresses gets changed > > by the rdacm20 driver it is required to manually enable the noise > > immunity threshold to make the communication on the control channel > > more reliable. > > Oh, this is interesting, ... booting up without the delays would be ... > much nicer. I second that, but I'm a bit worried. The MCU has caused us more pain than gain, the best way to fix it may be with a desoldering station ;-) Jokes aside, if we want to start initializing with the serializer before the MCU completes its initialization, then we'll have a racy process, with two I2C masters configuring the same device. I don't think anything good can come out of that :-S Taking into account the fact that on some platforms we'll want to implement power management for the cameras, disabling power (possibly individually) when the cameras are not in use, we'll have to handle the race carefully, and I'm not sure there any other way than waiting for the camera to be initialized with an initialization delay after power up. Based on this, I'm not concerned about this patch in particular, but potentially about the series as a whole. I'll comment on individual patches as applicable. Regarding this patch, doies the MCU enable high threshold for the reverse channel as part of its initialization procedure ? Do we have a full list of what it configures in the MAX9271 ? If so, could we capture it in a comment in the driver ? That would be very helpful as a reference. > > Signed-off-by: Jacopo Mondi > > --- > > drivers/media/i2c/rdacm20.c | 8 +++++++- > > 1 file changed, 7 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/media/i2c/rdacm20.c b/drivers/media/i2c/rdacm20.c > > index 90eb73f0e6e9..f7fd5ae955d0 100644 > > --- a/drivers/media/i2c/rdacm20.c > > +++ b/drivers/media/i2c/rdacm20.c > > @@ -541,7 +541,13 @@ static int rdacm20_initialize(struct rdacm20_device *dev) > > > > dev_info(dev->dev, "Identified MAX9271 + OV10635 device\n"); > > > > - return 0; > > + /* > > + * Set reverse channel high threshold to increase noise immunity. > > + * > > + * This should be compensated by increasing the reverse channel > > + * amplitude on the remote deserializer side. > > + */ > > + return max9271_set_high_threshold(&dev->serializer, true); > > Does this work 'out of the box' ? I.e. if this patch is applied, I > assume it is required to remove the regulator delays that I/we have in DT? > > Likewise, does that note mean this patch must also be accompanied by the > update in max9286 somehow? > > I guess we can't keep 'test bisectability' with this very easily so it > probably doesn't matter too much, the end result will be the interesting > part. > > Reviewed-by: Kieran Bingham > > > } > > > > static int rdacm20_probe(struct i2c_client *client) -- Regards, Laurent Pinchart