Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp8025953ybn; Tue, 1 Oct 2019 01:54:13 -0700 (PDT) X-Google-Smtp-Source: APXvYqx4oqt14++T6gWBu4P1f415/m14Rvb9EwTjt5uFcUYtPY6CTGC8V0U024LFgDgmLuBEeUHH X-Received: by 2002:a17:906:2542:: with SMTP id j2mr23436577ejb.278.1569920052895; Tue, 01 Oct 2019 01:54:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569920052; cv=none; d=google.com; s=arc-20160816; b=WjDXExcr5DLVsZr7MFGe8KYLxS74yhFTEh18qF1XIlgHeDS1tpakPRNzUebF5WI4cs R+BgIvb1MQxuUk1gGpkcfGNSyp4j8nAaqpfNVnOUzAJ0sy68XeTeQgLhCcjp+UyANMdn L8UxatNucZLKsfkssTQ7BlyMNuZJzqGnNSKF6SMcAY24MMpJbW7qXJHGXWtSJGrr7q+v TDRhcn513qebdMW1RuKr+V65uE3mFS1l6b8E6IVV2HA8G92u6Y7BYC9SrmyPT7C3wR3K ypsy7WAHzuGqBL+gIyjnUZdCCAq1vWhSjkA35oVO5/V5S4Qp2ttRlqGvKYW5cyqE+HyU P/ZQ== 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:dkim-signature; bh=nNPRen4KwvNuhLdVJyywJVbcdTrK0Ek++tHITpMvrSo=; b=VBAdjkQzj0i9Dz8lEfZ3vto4h1vP/wXjPqrSHij344dBK3m9Sr571Sk67KIm8p+keF VY9jaeKoIZnTUrmWPKTjuTVzJuSPP4Cmr1xUsvUQs1Dwwv1NXHl7rEQcv8UP0nqxN/5V ExNDx8xUSvhVcnVZsN+Bg455izlPlWjmX79xFA1H0/oNG7KohN4peJcfpIn3Zf8QHxKT qpPYynyS6ikAiE1k8lmf/2y9XV/rmcY9kJTlSF9CpKkcmR+0K8BjrvlC6Lvkfn3g7Ne3 WBHkiNomxiOcomegYTO0zB7Ddk3tvX2VemteWGlrPLZ643jU8yRnmbWieuGZh7YcDcTV 7LgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Pcq6+VW4; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ox5si8169230ejb.252.2019.10.01.01.53.48; Tue, 01 Oct 2019 01:54:12 -0700 (PDT) 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=@kernel.org header.s=default header.b=Pcq6+VW4; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733176AbfJAIwv (ORCPT + 99 others); Tue, 1 Oct 2019 04:52:51 -0400 Received: from mail.kernel.org ([198.145.29.99]:35036 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726672AbfJAIwv (ORCPT ); Tue, 1 Oct 2019 04:52:51 -0400 Received: from localhost (lfbn-1-10718-76.w90-89.abo.wanadoo.fr [90.89.68.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 872D82133F; Tue, 1 Oct 2019 08:52:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1569919970; bh=TYXtlG+fiA+pF3jSsz1tPLK5DQwytXD+ciUdbJAWuhk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Pcq6+VW4s9nKnunOdT0D2PQSwt06qFkxoutKMOh6lfzCjv0B+CUXME6uoPjRpjMRG 1KExkyTabs+UJgSqaLRPYZyj4KicHav4PbAdLBmqDsnfYA2BQWDSdDQP66AhfCHpH9 fl8DS+0XLZDHcBytry97Ks7aXl8rbOpD6/Wa2SQM= Date: Tue, 1 Oct 2019 10:52:46 +0200 From: Maxime Ripard To: Chen-Yu Tsai Cc: Hans Verkuil , Sakari Ailus , Mauro Carvalho Chehab , Laurent Pinchart , Linux Media Mailing List , linux-kernel , linux-arm-kernel , devicetree , Mark Rutland , Rob Herring Subject: Re: [PATCH v6 1/5] dt-bindings: media: Add Allwinner A10 CSI binding Message-ID: <20191001085246.55srb62bpfc6jhtu@gilmour> References: <110dd9ff1784c29fa16304825a41d1603a33f166.1562847292.git-series.maxime.ripard@bootlin.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="xnpqoekd4qgpls3t" 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 --xnpqoekd4qgpls3t Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, Thanks for looking into this. On Sun, Sep 15, 2019 at 04:54:16PM +0800, Chen-Yu Tsai wrote: > On Thu, Aug 15, 2019 at 4:34 PM Chen-Yu Tsai wrote: > > > > Hi, > > > > Sorry for chiming in so late. > > > > On Thu, Jul 11, 2019 at 8:15 PM Maxime Ripard wrote: > > > > > > The Allwinner A10 CMOS Sensor Interface is a camera capture interface also > > > used in later (A10s, A13, A20, R8 and GR8) SoCs. > > > > > > On some SoCs, like the A10, there's multiple instances of that controller, > > > with one instance supporting more channels and having an ISP. > > > > > > Reviewed-by: Rob Herring > > > Signed-off-by: Maxime Ripard > > > --- > > > Documentation/devicetree/bindings/media/allwinner,sun4i-a10-csi.yaml | 94 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- > > > 1 file changed, 94 insertions(+) > > > create mode 100644 Documentation/devicetree/bindings/media/allwinner,sun4i-a10-csi.yaml > > > > > > diff --git a/Documentation/devicetree/bindings/media/allwinner,sun4i-a10-csi.yaml b/Documentation/devicetree/bindings/media/allwinner,sun4i-a10-csi.yaml > > > new file mode 100644 > > > index 000000000000..97c9fc3b5050 > > > --- /dev/null > > > +++ b/Documentation/devicetree/bindings/media/allwinner,sun4i-a10-csi.yaml > > > @@ -0,0 +1,94 @@ > > > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > > > +%YAML 1.2 > > > +--- > > > +$id: http://devicetree.org/schemas/arm/allwinner,sun4i-a10-csi.yaml# > > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > > + > > > +title: Allwinner A10 CMOS Sensor Interface (CSI) Device Tree Bindings > > > + > > > +maintainers: > > > + - Chen-Yu Tsai > > > + - Maxime Ripard > > > + > > > +description: |- > > > + The Allwinner A10 and later has a CMOS Sensor Interface to retrieve > > > + frames from a parallel or BT656 sensor. > > > + > > > + > > > +properties: > > > + compatible: > > > + oneOf: > > > + - items: > > > + - enum: > > > + - allwinner,sun7i-a20-csi0 > > > + - const: allwinner,sun4i-a10-csi0 > > > > CSI0 on the A10 has an ISP. Do we know if the one in the A20 does > > as well? It certainly doesn't say so in the user manual. If not, > > then we can't claim that A20 CSI0 is compatible with A10 CSI0. > > > > > + > > > + - items: > > > + - const: allwinner,sun4i-a10-csi0 > > > + > > > + reg: > > > + maxItems: 1 > > > + > > > + interrupts: > > > + maxItems: 1 > > > + > > > + clocks: > > > + items: > > > + - description: The CSI interface clock > > > + - description: The CSI module clock > > > + - description: The CSI ISP clock > > > + - description: The CSI DRAM clock > > > + > > > + clock-names: > > > + items: > > > + - const: bus > > > + - const: mod > > > > I doubt this actually is a module clock. Based on the usage in your > > device tree patch, and the csi driver in the old linux-sunxi kernel, > > the clock rate is set to 24 MHz, or whatever the sensor requires for > > MCLK. > > I'm working on adding support for this on the R40, and it seems with > this SoC the picture is much clearer. It has the same CSI interface > block, but the CCU has the clocks correctly named. We have: > > - CSI_MCLK0 > - CSI_MCLK1 > - CSI_SCLK > > in addition to the bus clocks. > > The CSI section also explains the clock signals: > > 6.1.3.2. Clock Sources > Two Clocks need to be configured for CSI controller. CSI0/1_MCLK > provides the master clock for sensor and other devices. CSI_SCLK > is the top clock for the whole CSI module. > > So it would seem the ISP clock we currently have in the DT is simply > the module clock shared by all CSI-related hardware blocks, and the > module clock is bogus. I don't think it is. It looks like there's no ISP in the R40 CSI controllers, so that would mean that we don't have an ISP clock, and the SCLK is the module clock. Does that make sense? Maxime --xnpqoekd4qgpls3t Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCXZMT3gAKCRDj7w1vZxhR xS3GAQChjJb/Uh7KohG6iZVuImDjv2jvfjSVwaddzLEzegEoVwD/RqeeW3t/PRw3 H9mwot1F7alalXIAAbHRVcaRaKwlXQE= =vdGi -----END PGP SIGNATURE----- --xnpqoekd4qgpls3t--