Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp745824rdb; Fri, 8 Sep 2023 15:23:18 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH6OxdzdQ4jlZOB+AfISuR/lt3fUdRPuCNGk4swuLXy/Og/7fxz+2eEjYCqpwnVaEHiFnCL X-Received: by 2002:a05:6a00:b52:b0:68c:33a9:e572 with SMTP id p18-20020a056a000b5200b0068c33a9e572mr4066367pfo.29.1694211797676; Fri, 08 Sep 2023 15:23:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694211797; cv=none; d=google.com; s=arc-20160816; b=N7KbRnWsCcHMBuGubCB9PLAaeBmwhTgi3wkownJQG2olhQXgz3dD2vmVYL3zDw3zx8 Ejb6GazjRXs7PCWpveFsO8YLLP68XMVAE5tmjSVunUsxi6nALHJo8NsBQ9M+/sNbh0OG +8akWRlz3A0Lj06YuRi/lWftzB8EbcmyX6C2pppEyuCk3ft5h4Et/2dvpoVZsyMQmRn6 wgR4SmJ1c5VXYen3kxiEmC7Ngt1jU6ZC8+LazXo2zucV0CPkTbXXc9YhqzMaGr56lxvi iT2WhQRQTc3CdKqLEbJV3TC21RMVeasY6LFyzvAccwAZ7lm9rhuk3QrJwUcjTimfSkfh 6qzA== 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=RQHrJPDnb4xb+PjQ1BDT3051UV67gnEmJneQKruXuXs=; fh=3k4OeTxc2rZ3VnncOPBACKbY00qbve902ktVo3eax30=; b=NsX004Se9ruQLnq12IdPhOmJSa5EfG7o28rs2KtozldBHSFQ3qbHAFqIAkbDODY96x iW0hRvcnD0x3J05/vTTtSDBWdWL49anSLf8FTRpeldhfwOjrI99DC4tL3ad4aEd5zD9T Ourf+GJO+95Iv8z9kvVlbVQCBemtXAMHvNMUkUmqtPNQHr+7xroqOp54oo4PD8QytRSo Z5u8SEBED41FOxSGO4p/+LeloqBiRTLiM375U6Wt/lf7RCPHPw1BBFrMtFWn5tWkTEbb c5SbO8NqBUcV/giWcbtqGVDsWu3/QXL4P1DFZOCAuQ7nueS6TUlxlixbLr/SGTd3crdh D7GA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=fN3CZgDk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z62-20020a636541000000b0055b79986063si2090821pgb.300.2023.09.08.15.23.03; Fri, 08 Sep 2023 15:23:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=fN3CZgDk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240138AbjIHR0e (ORCPT + 99 others); Fri, 8 Sep 2023 13:26:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57596 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233155AbjIHR0d (ORCPT ); Fri, 8 Sep 2023 13:26:33 -0400 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 98AF91FC7; Fri, 8 Sep 2023 10:26:29 -0700 (PDT) Received: from pendragon.ideasonboard.com (unknown [31.94.18.223]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id CF8E310FE; Fri, 8 Sep 2023 19:24:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1694193899; bh=oWaVYJ84yTw1F3FOc83sGFaJxwx0456GDMdxWGrUfRI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=fN3CZgDk/6BOrsjuDCPxlMB7Mww+IeF5LEWUm3jf3SUaWSkcGhmp0HWjfqkXp4Hks 1ZWp7AfG39C7bic6LRpn2wHmce4MlZlfDnpg2SFlRvGMN8xk1J7gk4wL8psrllJN2J VTMYwuXqD5+LzpXxvD8dQpirPw+Ixwfbd80BuWTE= Date: Fri, 8 Sep 2023 20:26:41 +0300 From: Laurent Pinchart To: Umang Jain Cc: linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Lee Jackson , Sakari Ailus , Hans Verkuil , Shawn Tu , kieran.bingham@ideasonboard.com, jacopo.mondi@ideasonboard.com Subject: Re: [PATCH v6 2/2] media: i2c: Add driver for IMX519 sensor Message-ID: <20230908172641.GF17610@pendragon.ideasonboard.com> References: <20230908124344.171662-1-umang.jain@ideasonboard.com> <20230908124344.171662-3-umang.jain@ideasonboard.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20230908124344.171662-3-umang.jain@ideasonboard.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Umang, Thank you for the patch. On Fri, Sep 08, 2023 at 08:43:44AM -0400, Umang Jain wrote: > From: Lee Jackson > > Add a driver for the 16MPix IMX519 CSI2 sensor. > Whilst the sensor supports 2 or 4 CSI2 data lanes, this driver > currently only supports 2 lanes. > > The following Bayer modes are currently available: > > 4656x3496 10-bit @ 10fps > 3840x2160 10-bit (cropped) @ 21fps > 2328x1748 10-bit (binned) @ 30fps > 1920x1080 10-bit (cropped/binned) @ 60fps > 1280x720 10-bit (cropped/binned) @ 120fps > > Signed-off-by: Lee Jackson > Signed-off-by: Umang Jain > --- > MAINTAINERS | 1 + > drivers/media/i2c/Kconfig | 14 + > drivers/media/i2c/Makefile | 1 + > drivers/media/i2c/imx519.c | 1842 ++++++++++++++++++++++++++++++++++++ > 4 files changed, 1858 insertions(+) > create mode 100644 drivers/media/i2c/imx519.c [snip] > diff --git a/drivers/media/i2c/imx519.c b/drivers/media/i2c/imx519.c > new file mode 100644 > index 000000000000..f818a3d0bd25 > --- /dev/null > +++ b/drivers/media/i2c/imx519.c > @@ -0,0 +1,1842 @@ [snip] > +/* 16 mpix 10fps */ > +static const struct cci_reg_sequence mode_4656x3496_regs[] = { > + { CCI_REG8(0x0111), 0x02 }, > + { CCI_REG8(0x0112), 0x0a }, > + { CCI_REG8(0x0113), 0x0a }, > + { CCI_REG8(0x0114), 0x01 }, > + { CCI_REG8(0x0342), 0x42 }, > + { CCI_REG8(0x0343), 0x00 }, > + { CCI_REG8(0x0340), 0x0d }, > + { CCI_REG8(0x0341), 0xf4 }, > + { CCI_REG8(0x0344), 0x00 }, > + { CCI_REG8(0x0345), 0x00 }, > + { CCI_REG8(0x0346), 0x00 }, > + { CCI_REG8(0x0347), 0x00 }, > + { CCI_REG8(0x0348), 0x12 }, > + { CCI_REG8(0x0349), 0x2f }, > + { CCI_REG8(0x034a), 0x0d }, > + { CCI_REG8(0x034b), 0xa7 }, > + { CCI_REG8(0x0220), 0x00 }, > + { CCI_REG8(0x0221), 0x11 }, > + { CCI_REG8(0x0222), 0x01 }, > + { CCI_REG8(0x0900), 0x00 }, > + { CCI_REG8(0x0901), 0x11 }, > + { CCI_REG8(0x0902), 0x0a }, > + { CCI_REG8(0x3f4c), 0x01 }, > + { CCI_REG8(0x3f4d), 0x01 }, > + { CCI_REG8(0x4254), 0x7f }, > + { CCI_REG8(0x0401), 0x00 }, > + { CCI_REG8(0x0404), 0x00 }, > + { CCI_REG8(0x0405), 0x10 }, > + { CCI_REG8(0x0408), 0x00 }, > + { CCI_REG8(0x0409), 0x00 }, > + { CCI_REG8(0x040a), 0x00 }, > + { CCI_REG8(0x040b), 0x00 }, > + { CCI_REG8(0x040c), 0x12 }, > + { CCI_REG8(0x040d), 0x30 }, > + { CCI_REG8(0x040e), 0x0d }, > + { CCI_REG8(0x040f), 0xa8 }, > + { CCI_REG8(0x034c), 0x12 }, > + { CCI_REG8(0x034d), 0x30 }, > + { CCI_REG8(0x034e), 0x0d }, > + { CCI_REG8(0x034f), 0xa8 }, > + { CCI_REG8(0x0301), 0x06 }, > + { CCI_REG8(0x0303), 0x04 }, > + { CCI_REG8(0x0305), 0x04 }, > + { CCI_REG8(0x0306), 0x01 }, > + { CCI_REG8(0x0307), 0x57 }, > + { CCI_REG8(0x0309), 0x0a }, > + { CCI_REG8(0x030b), 0x02 }, > + { CCI_REG8(0x030d), 0x04 }, > + { CCI_REG8(0x030e), 0x01 }, > + { CCI_REG8(0x030f), 0x49 }, > + { CCI_REG8(0x0310), 0x01 }, > + { CCI_REG8(0x0820), 0x07 }, > + { CCI_REG8(0x0821), 0xb6 }, > + { CCI_REG8(0x0822), 0x00 }, > + { CCI_REG8(0x0823), 0x00 }, > + { CCI_REG8(0x3e20), 0x01 }, > + { CCI_REG8(0x3e37), 0x00 }, > + { CCI_REG8(0x3e3b), 0x00 }, > + { CCI_REG8(0x0106), 0x00 }, > + { CCI_REG8(0x0b00), 0x00 }, > + { CCI_REG8(0x3230), 0x00 }, > + { CCI_REG8(0x3f14), 0x01 }, > + { CCI_REG8(0x3f3c), 0x01 }, > + { CCI_REG8(0x3f0d), 0x0a }, > + { CCI_REG8(0x3fbc), 0x00 }, > + { CCI_REG8(0x3c06), 0x00 }, > + { CCI_REG8(0x3c07), 0x48 }, > + { CCI_REG8(0x3c0a), 0x00 }, > + { CCI_REG8(0x3c0b), 0x00 }, > + { CCI_REG8(0x3f78), 0x00 }, > + { CCI_REG8(0x3f79), 0x40 }, > + { CCI_REG8(0x3f7c), 0x00 }, > + { CCI_REG8(0x3f7d), 0x00 }, > +}; Looking at the per-mode tables, it appears that all registers below 0x3000 are CCS-compliant. Furthermore, all registers from 0x3000 above (defined in CCS as the manufacturer-specific register - or MSR - range) are identical for all modes. I can't tell if other modes could require different values for MSRs, so it's hard to assess real CCS compliance, but it looks like giving the CCS driver a try would be a good idea. I'm sure Sakari will be delighted :-) [snip] -- Regards, Laurent Pinchart