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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 496F8C433F5 for ; Mon, 14 Feb 2022 16:11:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To:MIME-Version:References:Message-ID:Subject:Cc: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=uuWPgJsp5pptkI09inyYmZa6sXuyN8Hb+dnF9fMJA/M=; b=5A2vzpsCBWQWAkv/x99fQXlDky AfOiAmTxNLICK1p4lpJx6aQnZrO2i1hFcfFpbbBU27EynI0MJ5Ur+ViMFyhQdgOHliEZacinEXX/j NfoayxKl5Z7IwmmRYMcLPVp/ECAfIfLB0eNjIyQcxRVT5Dkv/sAAjJC66yK8q9ySHwdv8+H02u8Ah YrNj7/BDDV9YNzCoutLf54VDE4fH7Ps2/+L7uUzZ8CHsjMJuw/ZzbQYRwyi2c3Cp+e9ax0snRIIqv +Wa0GXRMbPCWl+mJ8jXe1pf0w8EtALUICZstbdBToWJLeRxRPMWtcdN0I77G6jeHCyFwk9P3TKdIw fo+nuKfA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nJdve-00Fwc9-MB; Mon, 14 Feb 2022 16:10:18 +0000 Received: from relay8-d.mail.gandi.net ([2001:4b98:dc4:8::228]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nJdva-00Fwar-Vh; Mon, 14 Feb 2022 16:10:17 +0000 Received: (Authenticated sender: paul.kocialkowski@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id F24851BF215; Mon, 14 Feb 2022 16:10:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1644855010; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=b5eS9fguaP+pvzR5A1Vwu+pYHyCDBG8CctR4OI6MdrE=; b=UCj7f71PmwliZ1ok8P9m8PXiwkU1fLCOpZZ3sk70BvhQuGXFhuBmONFAMuSbUi1XZZ5v6I QVpMk7mSQJwKucLTkeer6lOa1TmqXGX7Fc8xvI5zZRCKgrfQO1bJTpwqiOEHuUOkA+FQtG B77Afoe4dPbz7hemN4PheVD6azW/7wzrlBdV81+M+Au1E4SdQDIlUw2JI8q945X4WT3Uex EzjsmO0+Gws4avZNcm5iT+YhbZCMG1BSYxeAztO1GF0BPVNy4DKCsKgUWKI9yKxNPYZJQW 4Ipo7H5vQB+UwL/Hry4QvOcnMj2k+7AbuSoEE7ZDWIIHjJL8YVdPDn8JYhE5cA== Date: Mon, 14 Feb 2022 17:10:05 +0100 From: Paul Kocialkowski To: Laurent Pinchart Cc: linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org, linux-clk@vger.kernel.org, linux-staging@lists.linux.dev, Yong Deng , Mauro Carvalho Chehab , Rob Herring , Maxime Ripard , Sakari Ailus , Hans Verkuil , Chen-Yu Tsai , Jernej Skrabec , Greg Kroah-Hartman , Helen Koike , Thomas Petazzoni , Rob Herring Subject: Re: [PATCH v2 07/66] dt-bindings: media: sun6i-a31-csi: Add MIPI CSI-2 input port Message-ID: References: <20220205185429.2278860-1-paul.kocialkowski@bootlin.com> <20220205185429.2278860-8-paul.kocialkowski@bootlin.com> MIME-Version: 1.0 In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220214_081015_442521_1FCE6A78 X-CRM114-Status: GOOD ( 47.54 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============5848518156111236750==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============5848518156111236750== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="1K2ddbKyLBZHtd45" Content-Disposition: inline --1K2ddbKyLBZHtd45 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, On Fri 11 Feb 22, 22:56, Laurent Pinchart wrote: > On Fri, Feb 11, 2022 at 05:10:06PM +0100, Paul Kocialkowski wrote: > > Hi Laurent, > >=20 > > Thanks for the review! > >=20 > > On Mon 07 Feb 22, 18:03, Laurent Pinchart wrote: > > > Hi Paul, > > >=20 > > > Thank you for the patch. > > >=20 > > > On Sat, Feb 05, 2022 at 07:53:30PM +0100, Paul Kocialkowski wrote: > > > > The A31 CSI controller supports two distinct input interfaces: > > > > parallel and an external MIPI CSI-2 bridge. The parallel interface > > > > is often connected to a set of hardware pins while the MIPI CSI-2 > > > > bridge is an internal FIFO-ish link. As a result, these two inputs > > > > are distinguished as two different ports. > > > >=20 > > > > Note that only one of the two may be present on a controller instan= ce. > > > > For example, the V3s has one controller dedicated to MIPI-CSI2 and = one > > > > dedicated to parallel. > > >=20 > > > Is it that only one of the two is present, or only one of the two is > > > connected ? In the latter case I'd make both ports required, but with > > > only one of them connected. > >=20 > > There are situations where the actual pins for parallel (port@0) are mi= ssing > > and the controller is dedicated to its mipi csi-2 bridge (port@1), case= s where > > the two are present and cases where the mipi csi-2 bridge doesn't exist. > > So all in all it's really legit that only one port may be defined. >=20 > The port could still exist internally in the IP core though. Of course > that's hard to tell. Yes that's true, the bit to switch input to mipi csi-2 is there in all cases but I don't think it makes sense to expose the port in situations where no controller is attached. > > > > Update the binding with an explicit ports node that holds two disti= nct > > > > port nodes: one for parallel input and one for MIPI CSI-2. > > > >=20 > > > > This is backward-compatible with the single-port approach that was > > > > previously taken for representing the parallel interface port, which > > > > stays enumerated as fwnode port 0. > > > >=20 > > > > Note that additional ports may be added in the future, especially to > > > > support feeding the CSI controller's output to the ISP. > > > >=20 > > > > Signed-off-by: Paul Kocialkowski > > > > Reviewed-by: Rob Herring > > > > Acked-by: Maxime Ripard > > > > --- > > > > .../media/allwinner,sun6i-a31-csi.yaml | 60 +++++++++++++++= ---- > > > > 1 file changed, 47 insertions(+), 13 deletions(-) > > > >=20 > > > > diff --git a/Documentation/devicetree/bindings/media/allwinner,sun6= i-a31-csi.yaml b/Documentation/devicetree/bindings/media/allwinner,sun6i-a3= 1-csi.yaml > > > > index 8b568072a069..3cc61866ea89 100644 > > > > --- a/Documentation/devicetree/bindings/media/allwinner,sun6i-a31-c= si.yaml > > > > +++ b/Documentation/devicetree/bindings/media/allwinner,sun6i-a31-c= si.yaml > > > > @@ -61,6 +61,34 @@ properties: > > > > =20 > > > > additionalProperties: false > > > > =20 > > > > + ports: > > > > + $ref: /schemas/graph.yaml#/properties/ports > > > > + > > > > + properties: > > > > + port@0: > > > > + $ref: "#/properties/port" > > > > + unevaluatedProperties: false > > > > + > > > > + port@1: > > > > + $ref: /schemas/graph.yaml#/$defs/port-base > > > > + description: MIPI CSI-2 bridge input port > > > > + > > > > + properties: > > > > + reg: > > > > + const: 1 > > > > + > > > > + endpoint: > > > > + $ref: video-interfaces.yaml# > > > > + unevaluatedProperties: false > > > > + > > > > + additionalProperties: false > > > > + > > > > + anyOf: > > > > + - required: > > > > + - port@0 > > > > + - required: > > > > + - port@1 > > > > + > > > > required: > > > > - compatible > > > > - reg > > >=20 > > > Shouldn't you specify that either port or ports is required, but not > > > both ? I'd also add a comment in the port node to tell it's deprecate= d, > > > and that ports should be used instead. > >=20 > > Yes I agree on both points. I guess that should be a: > >=20 > > oneOf: > > - required: > > - ports > > - required: > > - port > >=20 > > (but feel free to correct me). > >=20 > > > > @@ -89,19 +117,25 @@ examples: > > > > "ram"; > > > > resets =3D <&ccu RST_BUS_CSI>; > > > > =20 > > > > - port { > > > > - /* Parallel bus endpoint */ > > > > - csi1_ep: endpoint { > > > > - remote-endpoint =3D <&adv7611_ep>; > > > > - bus-width =3D <16>; > > > > - > > > > - /* > > > > - * If hsync-active/vsync-active are missing, > > > > - * embedded BT.656 sync is used. > > > > - */ > > > > - hsync-active =3D <0>; /* Active low */ > > > > - vsync-active =3D <0>; /* Active low */ > > > > - pclk-sample =3D <1>; /* Rising */ > > > > + ports { > > > > + #address-cells =3D <1>; > > > > + #size-cells =3D <0>; > > > > + > > > > + port@0 { > > > > + reg =3D <0>; > > > > + /* Parallel bus endpoint */ > > > > + csi1_ep: endpoint { > > > > + remote-endpoint =3D <&adv7611_ep>; > > > > + bus-width =3D <16>; > > > > + > > > > + /* > > > > + * If hsync-active/vsync-active are missing, > > > > + * embedded BT.656 sync is used. > > > > + */ > > > > + hsync-active =3D <0>; /* Active low */ > > > > + vsync-active =3D <0>; /* Active low */ > > > > + pclk-sample =3D <1>; /* Rising */ > > >=20 > > > Wrong indentation. > >=20 > > The double-space before /* Rising */ or something with the heading inde= nt? >=20 > The heading has one extra space for all three lines, they should be > aligned to the / of /*, not to the *. Oh that's true, good catch thanks! Paul > > > > + }; > > > > }; > > > > }; > > > > }; >=20 > --=20 > Regards, >=20 > Laurent Pinchart --=20 Paul Kocialkowski, Bootlin Embedded Linux and kernel engineering https://bootlin.com --1K2ddbKyLBZHtd45 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEyBAEBCAAdFiEEJZpWjZeIetVBefti3cLmz3+fv9EFAmIKft0ACgkQ3cLmz3+f v9GBzQf4ykgosl0x6xfMvLDDLl0cFnB2eK0Bdp9ZhcxVv+4V0W9kcIZ/NnN4FJ+5 2NODVUSkvCLd8E5R/z8MT4ngVlKnvd26GV3Uiog3yhoQ1SpjkTQT2dZMXOMhPARi mzNpeUfkBY76pRMdDQzmOnwAAj4Iqlizkar0a3su1o/zKAwYJ1k//32QHc5RVF9X i9kE1FldlInxg0HNAuE0SOU0k0DYSbHI0xNugH8Wf5DszFeWTFdMUseOdB3iNaT3 eQRBKtfrzjIrYFSE4LLZTtydLTDyxh1N4udg/t0DMQpjF5vFZWW/Im4iMXwD0IAI WbWJgCPQNoul4HI9EK2vEWjUyDsh =ShHP -----END PGP SIGNATURE----- --1K2ddbKyLBZHtd45-- --===============5848518156111236750== 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 --===============5848518156111236750==--