Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp245913imu; Thu, 6 Dec 2018 23:48:35 -0800 (PST) X-Google-Smtp-Source: AFSGD/UHJVghJz8f80o1aAaLo7ND5tfdPGB8cq3SwxonlicjbqlVdqkqChixyqDp8yGAybGWtCbR X-Received: by 2002:a63:3c44:: with SMTP id i4mr1044959pgn.286.1544168915733; Thu, 06 Dec 2018 23:48:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544168915; cv=none; d=google.com; s=arc-20160816; b=yTQfn3TxKy8H0Zs2WV2qd0HkVztTkILi07hk5R8FKnNP8NU2RRI79OPCzGNWs60mKN d4PO81rYrxXHwpdvAJeuZpussErAiM3Src8EkGGD+ldirt8zh/DaeMwW67+yEWTyH3yR vdleujT9nR9zfQSlxo8lvl0IHtrexVKfxMq97h+FAwF8v2FpYsEFsCaOD3RkU+NKoOQe DKLRAuvGYLFTPqzCs05iVb6SPMqMQURgq7FYEw4loayg5IP4izoNsV09F67RSuVD+ODD NXL3sCcv9gh54dw4NTIEKd3dWp726KcF3EfKq/5kJb6/3oXEkPKtI9N587y/Zl6qGku3 htIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=VSHXCME6mPhbh9qBMutXUSJghIuvbAGs/D6AiFo7RAc=; b=lQ671eFYuwtRu/jCYk/3lf9ddaEdbu6AM0rHtn2okxqQuHLetkcR5ahgimFThGVJGR SRTJZ7b+i8rqyYkYPsk3CRuH7pqAGOPPbYTsnb2NKTLN+FvUKnFaOTYzXKxiV0Kr+nRD 2A9igEWkjm/HNoG/dtJqNDlpYMfzuiZ08aPUc8Ha1foMIGwEPEg1hYZ9Hs2KlmaQbhGa Xgia3z6l5zqMqfe+P7DZXF7G7rw6RRUGdXSF0pdF3i0iQdq9Q2W+rygwwLtk2oaEBOfQ +z5YSquLTCCqTkMS5E4zLk5xzWBxpBPBKnzOL7T/qH2nILA1qrL2RRr1u45SshY1iB1Q t3/g== ARC-Authentication-Results: i=1; mx.google.com; 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 s4si2287691plr.306.2018.12.06.23.48.20; Thu, 06 Dec 2018 23:48:35 -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; 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 S1726084AbeLGHr0 (ORCPT + 99 others); Fri, 7 Dec 2018 02:47:26 -0500 Received: from mail.bootlin.com ([62.4.15.54]:43958 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725952AbeLGHrZ (ORCPT ); Fri, 7 Dec 2018 02:47:25 -0500 Received: by mail.bootlin.com (Postfix, from userid 110) id 7DADA2073D; Fri, 7 Dec 2018 08:47:23 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.2 Received: from localhost (aaubervilliers-681-1-79-44.w90-88.abo.wanadoo.fr [90.88.21.44]) by mail.bootlin.com (Postfix) with ESMTPSA id 41D9520701; Fri, 7 Dec 2018 08:47:23 +0100 (CET) Date: Fri, 7 Dec 2018 08:47:23 +0100 From: Maxime Ripard To: Michael Nazzareno Trimarchi Cc: Jagan Teki , Chen-Yu Tsai , Rob Herring , Mark Rutland , linux-arm-kernel , devicetree , LKML , linux-amarula@amarulasolutions.com Subject: Re: [PATCH v2 2/3] arm64: dts: allwinner: a64: Add A64 CSI controller Message-ID: <20181207074723.l3ykhqojfkd4y4ie@flea> References: <20181206132306.11843-1-jagan@amarulasolutions.com> <20181206132306.11843-2-jagan@amarulasolutions.com> <20181206153445.kqu2pep5orktr6yv@flea> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="q57fppkqpm6lotdb" Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --q57fppkqpm6lotdb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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/arm= 64/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 =3D <3>; > > > > > > + csi_pins: csi-pins { > > > + pins =3D "PE0", "PE2", "PE3", "PE4", "P= E5", "PE6", > > > + "PE7", "PE8", "PE9", "PE10", "PE= 11"; > > > + function =3D "csi0"; > > > + }; > > > + > > > i2c0_pins: i2c0_pins { > > > pins =3D "PH0", "PH1"; > > > function =3D "i2c0"; > > > @@ -899,6 +905,23 @@ > > > status =3D "disabled"; > > > }; > > > > > > + csi: csi@1cb0000 { > > > + compatible =3D "allwinner,sun50i-a64-csi", > > > + "allwinner,sun8i-h3-csi"; > > > + reg =3D <0x01cb0000 0x1000>; > > > + interrupts =3D ; > > > + clocks =3D <&ccu CLK_BUS_CSI>, > > > + <&ccu CLK_CSI_SCLK>, > > > + <&ccu CLK_DRAM_CSI>; > > > + clock-names =3D "bus", "mod", "ram"; > > > + resets =3D <&ccu RST_BUS_CSI>; > > > + pinctrl-names =3D "default"; > > > + pinctrl-0 =3D <&csi_pins>; > > > + assigned-clocks =3D <&ccu CLK_CSI_SCLK>; > > > + assigned-clock-rates =3D <300000000>; > > > > That should be enforced in the driver. > > >=20 > 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. So really, putting it in the DT is nothing but a hack. Maxime --=20 Maxime Ripard, Bootlin Embedded Linux and Kernel engineering https://bootlin.com --q57fppkqpm6lotdb Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCXAoliwAKCRDj7w1vZxhR xbJmAPkBbeagcGDS3eBgc2WbrSNp5OJbl2fCL3tVsvnrFFTFuAD/c2rcynmQmY1Z XStuyRJGuSt3w8eU/Y7g5To9pHbMCgk= =huPr -----END PGP SIGNATURE----- --q57fppkqpm6lotdb--