Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp772835imu; Fri, 7 Dec 2018 08:39:46 -0800 (PST) X-Google-Smtp-Source: AFSGD/XnNJul//kXUNLfC2Ibz7mNk1UXJ0EkUEs40VWN8kbgmK9r1Z60Y+29q0nmTA1TdcqOnBnK X-Received: by 2002:a62:2c4d:: with SMTP id s74mr2915761pfs.6.1544200786319; Fri, 07 Dec 2018 08:39:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544200786; cv=none; d=google.com; s=arc-20160816; b=ytTz8sUAnEaW0TCYjumsDA3rYSbFL6SroYwP/7Jkq0ng/VI8qKR2I801eVhdhk9Ytj gw/7nB7hqJ9Zaz693jHTHHX3JU/ZGdJrEAg4nMp1RmnSQLvDHpvScmdC4MmMX1AZZvlv AqIbC4StYb0KBXjic7AB4s+Jgp9QAiVGO9EhKhvoupPtuO2UKptivuF1bPAKhGV37O65 XFZd3E7uPSdvatbjAaHRh8lCZoV88GbjhawHJ9L93vul/ST1JNbcWtRSX4ZYu3o+GzMU OnxVmYaDBm6zzupr5y2/lPzznETwnYIbM0oi0cyAg5WRzSEe9AWHtI6ENiCzc+vfaAyG ZkTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=h8+IrCx5L4YsuFWt/qdvOgxN1J5jo/dTUc6DKcFQ6JU=; b=xF+sXx1OkhPtgUxZZ+xvHWtimP5/IpmJSt6PxwsHktaki/eVMEhohcdbq8ErVPSXpc M4KLBCGFz1P7FFkh+5nV7htPt75GZ8lzFr9R0e7hQzgAFcJ2A0M1BHDVMb7GfmqIe97e xTw48JY5+qh5kpQ9lcGSTwf6bU+DOxN32eUf4iAQ8xp7r3ndZZLPaeVKnJXMQ+Jo7zr7 jtouZJQ4CIgNwQRCi5WfFbVv5rLmpS6+I6sIjp30fqBaEujtzy0CqAr7aBty/HxTsQpb yXWW1M55ucf+WlH+tR/izqYonBpf/A12plaEz27nJPEnZS0PeQ7g6Yy/QSJ8Xw8Nq/b/ G3fQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=f51UR0bS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o11si3286342pgd.234.2018.12.07.08.39.23; Fri, 07 Dec 2018 08:39:46 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=f51UR0bS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726174AbeLGQgu (ORCPT + 99 others); Fri, 7 Dec 2018 11:36:50 -0500 Received: from mail-it1-f194.google.com ([209.85.166.194]:55547 "EHLO mail-it1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726047AbeLGQgt (ORCPT ); Fri, 7 Dec 2018 11:36:49 -0500 Received: by mail-it1-f194.google.com with SMTP id o19so7741325itg.5 for ; Fri, 07 Dec 2018 08:36:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=h8+IrCx5L4YsuFWt/qdvOgxN1J5jo/dTUc6DKcFQ6JU=; b=f51UR0bSfA9B/9f20QORuqwq0mkpqM7wWOeHhHdA980bowVLvjm2rYOeCYcjQ6kiGM 2FGGBySgfAmn92EQz+PETtsfXrJSCQt7bDtTw8VuH9pkck6Zyvtu0JJ4oEEHhTUsQ4qF fpsCh5q30kCvmweXRfraUPtgxes87/HGRcBUU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=h8+IrCx5L4YsuFWt/qdvOgxN1J5jo/dTUc6DKcFQ6JU=; b=BOJcdh0eu0Vwu9mRhPYeDtf0iIz69ZHJTpWo8FFyIGGhVNuwNIU3hh5R7sUMvrnCfG t61fcPPhoSBM7Sy9NuWbqTdqLMFBaRt5N0wo5/ByFJ8C1grBYtIfPXOdOE9KCx4mOmOh E85eDNh/xHWpy9vQKp3/AwTETm5QSr4ak4FnAmqAbukUwc/hk+qJ7uzmNjeGNkO3f5wc fPL7HoQUftDBOwFieFeTmcpsan300/pbbpEwCqD24XfCVbGhv/adn5I1I7U3cnUZC31b nIfeAc9Rspxwg4NWDFOZy35zPAShpjan+xbAB9spSrZqGf6HtvxZv0iZjstVhyxPSBC4 bzdQ== X-Gm-Message-State: AA+aEWbl/2EUF/krGf13nt6tOIXtirUxum9z8RSCcu4LVceAKphUwR4S N41QwWh4D7mGOUyW8RLQfImgVKitB85hhb+Fh+XRcQ== X-Received: by 2002:a24:10cb:: with SMTP id 194mr2742857ity.173.1544200608302; Fri, 07 Dec 2018 08:36:48 -0800 (PST) MIME-Version: 1.0 References: <20181206132306.11843-1-jagan@amarulasolutions.com> <20181206132306.11843-2-jagan@amarulasolutions.com> <20181206153445.kqu2pep5orktr6yv@flea> <20181207074723.l3ykhqojfkd4y4ie@flea> In-Reply-To: <20181207074723.l3ykhqojfkd4y4ie@flea> From: Jagan Teki Date: Fri, 7 Dec 2018 22:06:34 +0530 Message-ID: Subject: Re: [PATCH v2 2/3] arm64: dts: allwinner: a64: Add A64 CSI controller To: Maxime Ripard Cc: Michael Trimarchi , Chen-Yu Tsai , Rob Herring , Mark Rutland , linux-arm-kernel , devicetree , linux-kernel , linux-amarula@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Dec 7, 2018 at 1:17 PM Maxime Ripard wrote: > > On Thu, Dec 06, 2018 at 06:07:59PM +0100, Michael Nazzareno Trimarchi wrote: > > On Thu, Dec 6, 2018 at 4:34 PM Maxime Ripard wrote: > > > On Thu, Dec 06, 2018 at 06:53:05PM +0530, Jagan Teki wrote: > > > > Allwinner A64 CSI controller has similar features as like in > > > > H3, So add support for A64 via H3 fallback. > > > > > > > > Also updated CSI_SCLK to use 300MHz via assigned-clocks, since > > > > the default clock 600MHz seems unable to drive the sensor(ov5640) > > > > to capture the image. > > > > > > > > Signed-off-by: Jagan Teki > > > > --- > > > > Changes for v2: > > > > - Use CSI_SCLK to 300MHz > > > > > > > > arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 23 +++++++++++++++++++ > > > > 1 file changed, 23 insertions(+) > > > > > > > > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi > > > > index 384c417cb7a2..d7ab0006ebce 100644 > > > > --- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi > > > > +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi > > > > @@ -532,6 +532,12 @@ > > > > interrupt-controller; > > > > #interrupt-cells = <3>; > > > > > > > > + csi_pins: csi-pins { > > > > + pins = "PE0", "PE2", "PE3", "PE4", "PE5", "PE6", > > > > + "PE7", "PE8", "PE9", "PE10", "PE11"; > > > > + function = "csi0"; > > > > + }; > > > > + > > > > i2c0_pins: i2c0_pins { > > > > pins = "PH0", "PH1"; > > > > function = "i2c0"; > > > > @@ -899,6 +905,23 @@ > > > > status = "disabled"; > > > > }; > > > > > > > > + csi: csi@1cb0000 { > > > > + compatible = "allwinner,sun50i-a64-csi", > > > > + "allwinner,sun8i-h3-csi"; > > > > + reg = <0x01cb0000 0x1000>; > > > > + interrupts = ; > > > > + clocks = <&ccu CLK_BUS_CSI>, > > > > + <&ccu CLK_CSI_SCLK>, > > > > + <&ccu CLK_DRAM_CSI>; > > > > + clock-names = "bus", "mod", "ram"; > > > > + resets = <&ccu RST_BUS_CSI>; > > > > + pinctrl-names = "default"; > > > > + pinctrl-0 = <&csi_pins>; > > > > + assigned-clocks = <&ccu CLK_CSI_SCLK>; > > > > + assigned-clock-rates = <300000000>; > > > > > > That should be enforced in the driver. > > > > > > > We are not really sure what is the best here. Our first idea was to > > put in the board file and then Jagan > > decide to put in dtsi. We don't have enough coverage of camera on this > > CPU and I prefer to stay with this > > minimal change that does not impact the driver. > > The thing is that: > - in this commit log, you're stating that it depends on the sensor, > which indicates that this would be a board level addition > - In another patch series, Jagan reported IIRC that it actually > depends on the resolution, so it doesn't belong in the DT at all > - And then, you don't even have any guarantee on the clock rate. The > sole guarantee you have is that when your driver will probe, the > rate will be close to those 300MHz. That's it. It might completely > change after the driver has probed, or be rounded to something > else entirely, who knows. Let's to be clear. - with default clock(600MHz) the sensor get probed but image capture has an issue. - with 300MHz the image capture working with 320x240@30, 640x480@30, 640x480@60, 1280x720@30 with UYVY8_2X8 and YUYV8_2X8 formats but 1080p@30 seems broken (the same I have mentioned in another mail) - since all this is verified on ov5640, I have mentioned the same thing on commit message for future reference.