From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.6 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D906DC3A59E for ; Wed, 21 Aug 2019 11:57:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A01612339F for ; Wed, 21 Aug 2019 11:57:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566388663; bh=vzV50aK7lDvwz6lMyupuXqdrTQf9pceOREc9MLPjXDA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=BPZ75DSExki2LF+jAQiWf8C3+x1ShZk/t2M7CHaRavigOAjpG5D7DHWG5pQU4bzUY PNpOaIfDdjboFgSIkfquIHg6/af6jRkGMB1XB2iNpEQPYVfHy0ZgDRH+x9kg10MIU7 nt0q1bE7/6bxlUt4o2i0DHg6YLxeIduWh3sapqsE= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726899AbfHUL5m (ORCPT ); Wed, 21 Aug 2019 07:57:42 -0400 Received: from mail.kernel.org ([198.145.29.99]:52192 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726351AbfHUL5m (ORCPT ); Wed, 21 Aug 2019 07:57:42 -0400 Received: from localhost (lfbn-1-17395-211.w86-250.abo.wanadoo.fr [86.250.200.211]) (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 9B17C206BB; Wed, 21 Aug 2019 11:57:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566388661; bh=vzV50aK7lDvwz6lMyupuXqdrTQf9pceOREc9MLPjXDA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ErsoLiwFvVa4rb4uLVibjPKKg37prkawlSogG246Bql64GbTFVcbjAdJEsqfxdtpg t/T9fuApibipBMV5XIlwzJERndrgD1LMe2CEi1NiuSyrE3AAwO3y0t9vgPxVknuhr2 XIHNqq7kTNCvuIxF5g/OL1vLp3iqYReP6SqQdaso= Date: Wed, 21 Aug 2019 13:57:38 +0200 From: Maxime Ripard To: Sakari Ailus Cc: Hans Verkuil , Mauro Carvalho Chehab , Thomas Petazzoni , Laurent Pinchart , linux-media@vger.kernel.org, Chen-Yu Tsai , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, Mark Rutland , Rob Herring , Frank Rowand , Rob Herring Subject: Re: [PATCH v7 1/5] dt-bindings: media: Add Allwinner A10 CSI binding Message-ID: <20190821115738.3amrk5td544mhpwd@flea> References: <20190820114849.GD5123@paasikivi.fi.intel.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="6ow4c2sufu6lsmjk" Content-Disposition: inline In-Reply-To: <20190820114849.GD5123@paasikivi.fi.intel.com> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --6ow4c2sufu6lsmjk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi Sakari, On Tue, Aug 20, 2019 at 02:48:49PM +0300, Sakari Ailus wrote: > Hi Maxime, > > On Tue, Aug 20, 2019 at 01:24:32PM +0200, Maxime Ripard wrote: > > From: Maxime Ripard > > > > 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 | 107 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- > > 1 file changed, 107 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..9000bca344f9 > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/media/allwinner,sun4i-a10-csi.yaml > > @@ -0,0 +1,107 @@ > > +# 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: > > + const: allwinner,sun7i-a20-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 > > + - const: isp > > + - const: ram > > + > > + resets: > > + maxItems: 1 > > + > > + port: > > + type: object > > + additionalProperties: false > > + > > + properties: > > + endpoint: > > + properties: > > + bus-width: > > + const: 8 > > + description: Number of data lines actively used. > > Are other values supported? If not, you could omit this. It can also support 16 bits data input, but this description is redundant anyway, I'll remove it. > > + > > + data-active: true > > + hsync-active: true > > + pclk-sample: true > > + remote-endpoint: true > > + vsync-active: true > > + > > + required: > > + - bus-width > > + - data-active > > + - hsync-active > > + - pclk-sample > > + - remote-endpoint > > + - vsync-active > > Some of these are not allowed in the Bt.656 mode (vsync-active and > hsync-active) while they're required in Bt.601 mode. Is there a way to tell > that in YAML-based bindings? You could, but that would be more suited in another schemas. The way schemas works is that you can have several layers of them, and each being validated in isolation from the others. Here, we're just listing the values usable by that binding, and it will be used only to validate that binding. Eventually, we'll want to have a video-interfaces schemas that will apply to all the OF graph users, with those constraints defined. This way, we can avoid a lot of duplication and just have the binding description. I guess I could just have the remote endpoint being required, and the rest will be in the generic part. > Similarly, video-interfaces.txt should be referenced from here, shouldn't > it? Sure. Maxime -- Maxime Ripard, Bootlin Embedded Linux and Kernel engineering https://bootlin.com --6ow4c2sufu6lsmjk Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCXV0xsgAKCRDj7w1vZxhR xZRVAQCiMCXGC+Jhj5UArGqGUPo8RfUmzov8i8LF6Y+puf29bQD9FukZcvSbUwWP 7Nb97AhXzuzAohNb4SnGTSQI6zT4lQQ= =wBTw -----END PGP SIGNATURE----- --6ow4c2sufu6lsmjk--