Received: by 2002:a05:6a10:5594:0:0:0:0 with SMTP id ee20csp522985pxb; Mon, 25 Apr 2022 15:31:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy57nUKgdrBlJ5QpB50T0JoDak9zBCGRSswYHTQRbLTPKaj+LDirg92wWkqyePMjru/Nvcn X-Received: by 2002:a63:ec50:0:b0:39d:2d53:76e7 with SMTP id r16-20020a63ec50000000b0039d2d5376e7mr16713226pgj.338.1650925904607; Mon, 25 Apr 2022 15:31:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650925904; cv=none; d=google.com; s=arc-20160816; b=kexHGXil/k82n1TwKcw7Zpy/we9XaBcsJtUrsRLAKX/W6lGV2AS67svGRYw5zXXTPL uO1M4PjHoGpT8wjDVAMi2lZ/g0ESfRKnBb8LfS8ilidFbshivRcOOkGRPPwvgVAplMrS C7xMc0c9OJi8iculX/8UjXN+xdZxPpciVo1fNS3uQxKJuD5EQ8GFwsjyvEcJqVtueCTS bQaxgJwPLhkSzTcHhQ1N5uGmKOgfuC4S4faDr08w2ntngKCTgdeYg5lq5X6dmuWycWR4 Gf1hNNDiDlSmFOsGSp4Lnehv2eJWypETAcbG5yhjQtdQBoQKQj3ONBQ7LnqEub3DhCYU F/Yg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=c9RppN5aDTjXCcWCJ05N8v1cRlmedZ0/iK/cwkqMY7Q=; b=XHk5H92MCLK0pey6x4oWx05nR+nqZYg+RTih/MbvsLf9n2D0yfUcgG6vE/eL5frMK8 Tg+y686GI+QKdBcHYuW1y1PN7rD5r+r4YJIMLnHf+jRfsCMw303oxEWGMo4A1fKsyPx8 N9Wz5dpUW2AMbr6YXABKR4rFHUCElK1GtUXt4CzF7mvhkX0odPvFq+tM2MXQTxaPiyCk eP8C5zDuHAnzpUdhccOBFToCX+fhFt0b5m39o1kp+7KLrV+v5KyRj/6ZC+BLx5hWTc6P VaWXpDRBRmNT8SUxqAz33D7rwg8atqrn1bLlK8PdB8OwaoaspOY8rOsh0RJH4ZiV39ej mxoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=K8VTHVCF; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bf20-20020a656d14000000b003ab7c3328absi1917380pgb.437.2022.04.25.15.31.25; Mon, 25 Apr 2022 15:31:44 -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 header.i=@gmail.com header.s=20210112 header.b=K8VTHVCF; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236347AbiDYMLm (ORCPT + 99 others); Mon, 25 Apr 2022 08:11:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46218 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239005AbiDYMLe (ORCPT ); Mon, 25 Apr 2022 08:11:34 -0400 Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [IPv6:2a00:1450:4864:20::534]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 884725AEF4; Mon, 25 Apr 2022 05:08:30 -0700 (PDT) Received: by mail-ed1-x534.google.com with SMTP id z19so4859204edx.9; Mon, 25 Apr 2022 05:08:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=c9RppN5aDTjXCcWCJ05N8v1cRlmedZ0/iK/cwkqMY7Q=; b=K8VTHVCFjhdnXo6DLKplzZMQxuRWrIiQ9JCYhxordsBWfolL+JYV+kK6T0tgtmNOjv pQe1Rlm3IFiIF8K07VP1EaJ/7muJTC/8hDFM5A3BbgjJDKPlZVx44G4OXuMJpHojhMzN fr+kUU8Dy7HH8m/ndTdr7Pd2tzWMoOY1k4ZZx9Klb10dICE02ylOjgCSTBy0/JSnfEBm TaS2x2wKkklIZs++4b1OnxoWCle8vNLFMfum+ezpoNiSJ/fWe80fMyfehHAHhL5it2/v yINBCFCb7NCEHOXbvKdeTYO7kgM70UefeJSMUd93ZHy4usNzbVZxDMDp+H3g4LbSOJe1 l6/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=c9RppN5aDTjXCcWCJ05N8v1cRlmedZ0/iK/cwkqMY7Q=; b=GC0ixuxKG2qbsrTHmjL8LdCmde7D+2NfqLQcw0hFQnjqxkCfFOZNev5bu0gdQ2/gHQ XFHyo3vyw+TAWKF3JF9ztPJkEPObMPrbAtkK8RQHC0aYu1taN09N8MPorhrq/1XiZFn+ BgylCcUm8T3ODup5ahvG+jz121zlnBP1gWzE2onLvxmm9qSMUhSnCR9Ittt2z7QO8GPg mOQbf0E4v0tsv6n1YZonicI/0mOaCUF7zX5yHYJgLsSrpkK5NS4LRyagHRt2CmAGQb0z nThY8f69/rNjJ/CXDc5h0syfA2A2Li9di8/VSbNgZjSfHKtKWBhsTAfndI7S/Xeryi5P MNFA== X-Gm-Message-State: AOAM531XUrwAGeYAJhS4XEAHmi8TUDwz4gmHbk2VsaVeToCGqtEZV1AO u114yIpOaf42ZAi5T+9ZafVsiWGX+QDv3mDHALrlAWlb X-Received: by 2002:aa7:d543:0:b0:416:13eb:6fec with SMTP id u3-20020aa7d543000000b0041613eb6fecmr18946181edr.348.1650888508669; Mon, 25 Apr 2022 05:08:28 -0700 (PDT) MIME-Version: 1.0 References: <20220412135534.2796158-1-aford173@gmail.com> In-Reply-To: <20220412135534.2796158-1-aford173@gmail.com> From: Adam Ford Date: Mon, 25 Apr 2022 07:08:17 -0500 Message-ID: Subject: Re: [PATCH 0/4] media: i2c: imx219: Enable variable xclk and 4-lane To: linux-media Cc: Prabhakar Mahadev Lad , Tim Harvey , cstevens@beaconembedded.com, Adam Ford-BE , Laurent Pinchart , Dave Stevenson , Mauro Carvalho Chehab , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,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 On Tue, Apr 12, 2022 at 8:55 AM Adam Ford wrote: > > The driver currently only supports a 2-lane camera, a fixed external > clock (XCLK) at 24MHz, a fixed Pixel Rate of 182.4MHz, and a fixed > link rate of 456MHz. There are a bunch of hard-codec values in a > table of operating modes which expect the above to be true. > > According to the datasheet, the driver is capable of operating in > either 4-lane with a pixel rate of 280.8MHz and Linux frequency > of 702MHz or 2-lane configured as stated above. The XCLK can be > anywhere from 6MHz - 27MHz instead of being fixed at 24MHz. > > Split up the hard-coded values into smaller helper functions that > dynamically set the registers of the camera based on the XCLK and > desired number of lanes. > > This series was tested on a Beacon RZ/G2M streaming video at 640x480 > to an LCD with fbdevsink > > media-ctl --links "'rcar_csi2 feaa0000.csi2':1->'VIN0 output':0[1]" -d /dev/media1 > media-ctl --set-v4l2 "'imx219 2-0010':0[fmt:SRGGB8_1X8/640x480 field:none]" -d /dev/media1 > yavta -w '0x009f0905 2048' /dev/v4l-subdev12 > gst-launch-1.0 v4l2src device=/dev/video7 ! video/x-bayer,width=640,height=480,format=rggb ! queue ! bayer2rgb ! fbdevsink > > Due to hardware limitations, the XCLK is still 24MHz, so anyone > willing to test this series with a different XCLK would be appreciated. > > Due to the video format, streaming video at larger resolution was > not feasible, however individual frames captured at 1920x1080 were > successful. > Any comments from anyone on this series? > Adam Ford (4): > media: i2c: imx219: Split common registers from mode tables > media: i2c: imx219: Support four-lane operation > media: i2c: imx219: Enable variable XCLK > media: i2c: imx219: Create DPHY helper function > > drivers/media/i2c/imx219.c | 340 +++++++++++++++++++++++-------------- > 1 file changed, 213 insertions(+), 127 deletions(-) > > -- > 2.34.1 >