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=-14.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED 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 9669AC388F9 for ; Tue, 27 Oct 2020 09:53:08 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1D19421D24 for ; Tue, 27 Oct 2020 09:53:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="WdXUwqyW" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1D19421D24 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=bootlin.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Type:Cc: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To:MIME-Version:References:Message-ID:Subject:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=GUkQjR+08jBQ2Ehnc8cwToeRxOiwi4v5HtOt6nzY+/I=; b=WdXUwqyWdqGr8GG7KiC34rB9p sdu3sLwFLiAwbixxtT++mLul+5mYDdKKv9mr6iU5F9pIDW6fdnzLYvV/zTzSTY7F+YqfPn4sJT8qN gMU5mBcl5GIDwydSbXCjaZY9/f9w4JjH6ON/oQrzD/T56W4QufSnUd16zupvIvXuUy2xOraZFxxRG EnO6GeQkbgFyarMdzsBYxxdkArJm/w82ZguNwSFmJRYuT1SvRPDcu2wE5HSIE0HlaMjjIjHxEi0rQ ieaQ7ukfK8ZrSPytdqPNeCCHrIbwn0v/rU0tmKEYj+7NuQiDl25Lz+ImbGihs656ZIYT9FtTd3B9w LE4X4qtSw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kXLed-0006vy-TE; Tue, 27 Oct 2020 09:52:35 +0000 Received: from relay7-d.mail.gandi.net ([217.70.183.200]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kXLeX-0006sq-TL for linux-arm-kernel@lists.infradead.org; Tue, 27 Oct 2020 09:52:31 +0000 X-Originating-IP: 93.29.109.196 Received: from aptenodytes (196.109.29.93.rev.sfr.net [93.29.109.196]) (Authenticated sender: paul.kocialkowski@bootlin.com) by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id 34CAC20010; Tue, 27 Oct 2020 09:52:22 +0000 (UTC) Date: Tue, 27 Oct 2020 10:52:21 +0100 From: Paul Kocialkowski To: Maxime Ripard Subject: Re: [PATCH 07/14] dt-bindings: media: i2c: Add A31 MIPI CSI-2 bindings documentation Message-ID: <20201027095221.GE168350@aptenodytes> References: <20201023174546.504028-1-paul.kocialkowski@bootlin.com> <20201023174546.504028-8-paul.kocialkowski@bootlin.com> <20201026161450.gr3dqpltxw2ccc3s@gilmour.lan> MIME-Version: 1.0 In-Reply-To: <20201026161450.gr3dqpltxw2ccc3s@gilmour.lan> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201027_055230_202305_DBE7BD04 X-CRM114-Status: GOOD ( 30.39 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devel@driverdev.osuosl.org, devicetree@vger.kernel.org, Philipp Zabel , Kishon Vijay Abraham I , Thomas Petazzoni , Greg Kroah-Hartman , Helen Koike , linux-kernel@vger.kernel.org, Chen-Yu Tsai , Hans Verkuil , linux-sunxi@googlegroups.com, Rob Herring , Vinod Koul , Yong Deng , Sakari Ailus , Hans Verkuil , Mauro Carvalho Chehab , kevin.lhopital@hotmail.com, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org Content-Type: multipart/mixed; boundary="===============7673589111504189984==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============7673589111504189984== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ILuaRSyQpoVaJ1HG" Content-Disposition: inline --ILuaRSyQpoVaJ1HG Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, On Mon 26 Oct 20, 17:14, Maxime Ripard wrote: > i2c? :) Oops, good catch! =20 > On Fri, Oct 23, 2020 at 07:45:39PM +0200, Paul Kocialkowski wrote: > > This introduces YAML bindings documentation for the A31 MIPI CSI-2 > > controller. > >=20 > > Signed-off-by: Paul Kocialkowski > > --- > > .../media/allwinner,sun6i-a31-mipi-csi2.yaml | 168 ++++++++++++++++++ > > 1 file changed, 168 insertions(+) > > create mode 100644 Documentation/devicetree/bindings/media/allwinner,s= un6i-a31-mipi-csi2.yaml > >=20 > > diff --git a/Documentation/devicetree/bindings/media/allwinner,sun6i-a3= 1-mipi-csi2.yaml b/Documentation/devicetree/bindings/media/allwinner,sun6i-= a31-mipi-csi2.yaml > > new file mode 100644 > > index 000000000000..9adc0bc27033 > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/media/allwinner,sun6i-a31-mipi-= csi2.yaml > > @@ -0,0 +1,168 @@ > > +# SPDX-License-Identifier: GPL-2.0 > > +%YAML 1.2 > > +--- > > +$id: http://devicetree.org/schemas/media/allwinner,sun6i-a31-mipi-csi2= =2Eyaml# > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > + > > +title: Allwinner A31 MIPI CSI-2 Device Tree Bindings > > + > > +maintainers: > > + - Paul Kocialkowski > > + > > +properties: > > + compatible: > > + oneOf: > > + - const: allwinner,sun6i-a31-mipi-csi2 > > + - items: > > + - const: allwinner,sun8i-v3s-mipi-csi2 > > + - const: allwinner,sun6i-a31-mipi-csi2 > > + > > + reg: > > + maxItems: 1 > > + > > + interrupts: > > + maxItems: 1 > > + > > + clocks: > > + items: > > + - description: Bus Clock > > + - description: Module Clock > > + > > + clock-names: > > + items: > > + - const: bus > > + - const: mod > > + > > + phys: > > + items: > > + - description: MIPI D-PHY > > + > > + phy-names: > > + items: > > + - const: dphy > > + > > + resets: > > + maxItems: 1 > > + > > + # See ./video-interfaces.txt for details > > + ports: > > + type: object > > + > > + properties: > > + port@0: > > + type: object > > + description: Input port, connect to a MIPI CSI-2 sensor > > + > > + properties: > > + reg: > > + const: 0 > > + > > + endpoint: > > + type: object > > + > > + properties: > > + remote-endpoint: true > > + > > + bus-type: > > + const: 4 > > + > > + clock-lanes: > > + maxItems: 1 > > + > > + data-lanes: > > + minItems: 1 > > + maxItems: 4 > > + > > + required: > > + - bus-type > > + - data-lanes > > + - remote-endpoint > > + > > + additionalProperties: false > > + > > + required: > > + - endpoint > > + > > + additionalProperties: false > > + > > + port@1: > > + type: object > > + description: Output port, connect to a CSI controller > > + > > + properties: > > + reg: > > + const: 1 > > + > > + endpoint: > > + type: object > > + > > + properties: > > + remote-endpoint: true > > + > > + bus-type: > > + const: 4 >=20 > That one seems a bit weird. If the input and output ports are using the > same format, what is that "bridge" supposed to be doing? Fair enough. What this represents is the internal link (likely a FIFO) betw= een the two controllers. It is definitely not a MIPI CSI-2 bus but there's no mbus type for an internal link (probably because it's not a bus after all). Note that on the CSI controller side, we need the bus-type to be set to 4 f= or it to properly select the MIPI CSI-2 input. So it just felt more logical to ha= ve the same on the other side of the endpoint. On the other hand, we can just remove it on the MIPI CSI-2 controller side since it won't check it and hav= e it fallback to the unknown mbus type. But that would make the types inconsistent on the two sides of the link. I don't think V4L2 will complain about it at the moment, but it would also = make sense that it does eventually. What do you think? > > + additionalProperties: false > > + > > + required: > > + - endpoint > > + > > + additionalProperties: false > > + > > +required: > > + - compatible > > + - reg > > + - interrupts > > + - clocks > > + - clock-names > > + - resets > > + > > +additionalProperties: false > > + > > +examples: > > + - | > > + #include > > + #include > > + #include > > + > > + mipi_csi2: mipi-csi2@1cb1000 { >=20 > The unit name should be pretty standard, with the list here: >=20 > https://github.com/devicetree-org/devicetree-specification/blob/master/so= urce/chapter2-devicetree-basics.rst#generic-names-recommendation >=20 > there's nothing really standing out for us in that list, but given that > there's dsi, we should stick with csi Then what really surprises me is that the CSI controllers are called "camer= a", not "csi". If "camera" is supposed to cover both image sensor and camera se= nsor interfaces, it would probably fit MIPI CSI-2 as well. I see lots of names with -controller for controllers with specific devices attached, like "nand-controller" or "lcd-controller". Maybe using "camera-controller" for the CSI and MIPI CSI-2 controllers would make the m= ost sense, while keeping "camera" for the actual image sensors. What do you think? Cheers, Paul --=20 Paul Kocialkowski, Bootlin Embedded Linux and kernel engineering https://bootlin.com --ILuaRSyQpoVaJ1HG Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEJZpWjZeIetVBefti3cLmz3+fv9EFAl+X7dUACgkQ3cLmz3+f v9HIzgf/VU3frpGzprIvTeXBh32se5uXZB/3cj0cUb++7oXeTXSc/db0LOwDu7jo /UyfvdYNUhuUMMOPT/ltm0ObonZzOv4GkAl0rjQYccWmwqAhi9/m/ac++ub7WjUk yv159tAbN+dorR6X2Q548Y8JKAYXBM/of0RVIs0ms/J8rnBkozXBv89gxTiIxrnH 3swwmgsFAYEklUApRcIUcgSdsbxyRu10JTQ7vlmimb5/4Z3mEmOXGe7SkxKREFym fGumuTIXAWceJ0NLAXkUw3XxHku1Xczzmj78crBFvE0L8fUDKAoMFOG96oQqbI5t GlF0jyE3FZO/rbmGafQtSqE/B9JOFw== =CWwJ -----END PGP SIGNATURE----- --ILuaRSyQpoVaJ1HG-- --===============7673589111504189984== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============7673589111504189984==--