Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp5550157pxb; Wed, 19 Jan 2022 22:45:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJxV7r4HdeivfDgSx2jMY5wH15RbEDYHllAZV6PwlVLeJvb4vGY8VTd5u5uvO1c95q6Mnlnd X-Received: by 2002:aa7:961b:0:b0:4bf:306a:e057 with SMTP id q27-20020aa7961b000000b004bf306ae057mr34551910pfg.84.1642661108662; Wed, 19 Jan 2022 22:45:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642661108; cv=none; d=google.com; s=arc-20160816; b=Xtz80vv0WnjnDTw/sAH93Xxr6f0Osx10wgedQ8r5yfL5Xc6ZqMUkZoXUWy643S1282 l6T9SRAEjQ1Tv6EUiBshGvrTAVZN56hgLAqtXaVnrTcAqrrhkxo9cUqGo50dYEgmzgrt 7QbGBmolTWHh0k4vY8aAQewmibcUeCdzDKDhxtjG0JnZGpJOmfdaCnLB9qMUrTmj0Ha9 5LvpMkoN+eQsyE1IxvSu268hMARHebEYXZmIrEgJfbRqY49Lyk2TCE/xiB8x6Ln7U4SI MthVHbPeAnCAN7jwKSuw4vDivDA27h+X63dYBgbwQ4u6p0TiatbL9jkxP0gTM2nkvd3c 2kDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=nPt9N64IaDnBh7bjJWIKwHKKVjvabFOfHbFr+GEBwYs=; b=q7ZS2CNB4VrwSUZIr6OFiGjc60LVnKRMhVrLXYTmhKIO+mIR2bSdMYlaBqbLy85ocO O73CyGzzXASTfqXdHi2FR1eZsecibr1i/f6PzNPLy7xN7b0k/WX1iw0yfSs4KOCfjefU O76SSIisMVlFSdIunKvInlkmEvtBcS4JEaSuGaQZP/XMsSKvpPR7UmFbpHurUp/HqUyx hCSGsRcY9r1wiA/iLpFjqrJQ7KuQirahtAFUYwzepWrFOuapNXjhqceG8uvcQjoPaKYu 4zgSfZAenf4bGXTuB+Kn0tBzCNwtqrraNKUJcymiL8F2eiieNamVqYPK0BreFR5z8uaB 68UQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ragnatech-se.20210112.gappssmtp.com header.s=20210112 header.b=TfPJqulu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h132si2527298pgc.809.2022.01.19.22.44.56; Wed, 19 Jan 2022 22:45:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ragnatech-se.20210112.gappssmtp.com header.s=20210112 header.b=TfPJqulu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237479AbiARKdU (ORCPT + 99 others); Tue, 18 Jan 2022 05:33:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58616 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237475AbiARKdM (ORCPT ); Tue, 18 Jan 2022 05:33:12 -0500 Received: from mail-lf1-x131.google.com (mail-lf1-x131.google.com [IPv6:2a00:1450:4864:20::131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D03C2C06173F for ; Tue, 18 Jan 2022 02:33:11 -0800 (PST) Received: by mail-lf1-x131.google.com with SMTP id bu18so45696944lfb.5 for ; Tue, 18 Jan 2022 02:33:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ragnatech-se.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=nPt9N64IaDnBh7bjJWIKwHKKVjvabFOfHbFr+GEBwYs=; b=TfPJquluQSbMwDcvHHqtZcvbQjYmPCvkq8cadU/kDGgsd5GrhblkHtkczwVoPL94GU bO2xZw8LnjqPLON52DLB9Rve7Nfa3A0EF7Hfji/oAKdIhoZ4gN0VR3qUM4m/LvR7Q2+e hr9Fre2K0UWmumptpXzQiZ9Ta12CdyfcC4eEcGAFbUew4YXEl+SfFZSWnBRI0KgFx3Ed jGh1A0k4JI1OnNU7QgiSzQZa6tf94EULghl6+Ex0N1S2P5re60q18bZJwPU+0IQ4PF4g j+EEDg27OPIaKLEIA76dAfTJ2r9nnowLtuGwsippyz+jl0+0ZEaeS9OYIPMTG7AESjIX uyKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=nPt9N64IaDnBh7bjJWIKwHKKVjvabFOfHbFr+GEBwYs=; b=p3CgQNko5PkVM2vN9coNcTpCh89zyFOAqlBsL+lzVBykqYjM5tXJAX1kip/esYRz29 h+rJHIBGIvUW0lLI347LLn9TXyWmIQ8AqJor1u1vAMgoiN0cAGJQnQk3KtKHlaKQD7Qh AT/QNcXlaKE7bVyp3U4Jq7zDJw+F6PjcrUtI8QaLYAYJBEIqRcA6dQQed94XgbozJbAN N72diC5fhQMppCI0GjHi+xwOm65IhM91ndgld/s3U/sd6NqbfCuRV0DgDB8hHYEGDKGx 8VQhMoCHcN9HNvhNJyHFYJMkwE68jMX9nJMUObKecq8B0XC0DJXH6V8hGHBvDtMVvILX FJfg== X-Gm-Message-State: AOAM532n0A5EOXo2tZp88dPwpn2uiDDprb3Y9Lqf7J878i+rgOtW9Hv8 aiCUXbdOGBpiS1N5kUpvhOYPrQ== X-Received: by 2002:a2e:531c:: with SMTP id h28mr19125625ljb.400.1642501990022; Tue, 18 Jan 2022 02:33:10 -0800 (PST) Received: from localhost (h-85-24-188-65.A463.priv.bahnhof.se. [85.24.188.65]) by smtp.gmail.com with ESMTPSA id h11sm1645652lfv.281.2022.01.18.02.33.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Jan 2022 02:33:09 -0800 (PST) Date: Tue, 18 Jan 2022 11:33:08 +0100 From: Niklas =?iso-8859-1?Q?S=F6derlund?= To: Jacopo Mondi Cc: Lad Prabhakar , Mauro Carvalho Chehab , Rob Herring , Geert Uytterhoeven , Prabhakar , Biju Das , linux-media@vger.kernel.org, linux-renesas-soc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] media: dt-bindings: media: renesas,csi2: Update data-lanes property Message-ID: References: <20220113103215.27080-1-prabhakar.mahadev-lad.rj@bp.renesas.com> <20220117081110.bkwr3ttoexgr2wjt@uno.localdomain> <20220117100040.wa3ple6meahebtni@uno.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220117100040.wa3ple6meahebtni@uno.localdomain> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jacopo, Thanks for your feedback. On 2022-01-17 11:00:40 +0100, Jacopo Mondi wrote: > Hi Niklas, > > On Mon, Jan 17, 2022 at 10:23:28AM +0100, Niklas S?derlund wrote: > > Hello Jacopo, > > > > On 2022-01-17 09:11:10 +0100, Jacopo Mondi wrote: > > > Hello Prabhakar, > > > > > > On Thu, Jan 13, 2022 at 10:32:14AM +0000, Lad Prabhakar wrote: > > > > CSI-2 (CSI4LNK0) on R-Car and RZ/G2 supports 4-lane mode which is already > > > > handled by rcar-csi2.c driver. This patch updates the data-lanes property > > > > to describe the same. > > > > > > > > Signed-off-by: Lad Prabhakar > > > > --- > > > > .../devicetree/bindings/media/renesas,csi2.yaml | 9 ++++++++- > > > > 1 file changed, 8 insertions(+), 1 deletion(-) > > > > > > > > diff --git a/Documentation/devicetree/bindings/media/renesas,csi2.yaml b/Documentation/devicetree/bindings/media/renesas,csi2.yaml > > > > index e6a036721082..064a0a4c5737 100644 > > > > --- a/Documentation/devicetree/bindings/media/renesas,csi2.yaml > > > > +++ b/Documentation/devicetree/bindings/media/renesas,csi2.yaml > > > > @@ -67,7 +67,14 @@ properties: > > > > maxItems: 1 > > > > > > > > data-lanes: > > > > - maxItems: 1 > > > > + items: > > > > + minItems: 1 > > > > + maxItems: 4 > > > > + items: > > > > + - const: 1 > > > > + - const: 2 > > > > + - const: 3 > > > > + - const: 4 > > > > > > Seeing "maxItems: 1" there confuses me too, as the property is an > > > array of data-lanes, but I'm afraid your change does not what you > > > intend as it would allow you to specify the number of data lanes as an > > > integer rather than as an array. > > > > > > I think it would probably be correct to set > > > > > > data-lanes: true > > > > > > (maybe maxItems: 1 is correct already) > > > > > > And restrict the number of valid combinations in the board DTS file > > > with a construct like: > > > > > > data-lanes: > > > oneOf: > > > - items: > > > - const: 1 > > > - const: 2 > > > - const: 3 > > > - const: 4 > > > - items: > > > - const: 1 > > > - const: 2 > > > > I don't think this is correct, what if data lanes 2 and 3 are used? > > > > These were examples that allow you to accept <1 2> and <1 2 3 4> as > valid properties. If other combinations are accepted they can be > specified there, in your example, <2 3> with > > - items: > - const: 2 > - const: 3 > > As lane re-reordering is quite unusual as a feature (afaik) there are > usually just an handful of supported combinations for 1, 2 and 4 data > lanes setups. R-Car CSI-2 hardware and driver supports full lane swapping, see the LSWAP register and usage of struct rcar_csi2.lane_swap. I think it's a good idea to extend the binding description to limit the data-lanes property to an array of max 4 items where each value use is ether a 1, 2, 3 or 4. But it must allow for any combination of the values. > > If full lane re-ordering is supported then it's enough to set > data-lanes: true and accepts all combinations. > > Also, the reason why imho the property should go in the board DTS and > not in the SoC .dtsi is that not all the available data lanes of the > IP-core might be routed out on a specific board. > > That's at least my understanding which I would be glad to be disproved > as specifying the valid combinations in each board dts is rather > un-convenient. > > Thanks > j > > > > > > > Thanks > > > j > > > > > > > > > > > required: > > > > - clock-lanes > > > > -- > > > > 2.17.1 > > > > > > > > -- > > Kind Regards, > > Niklas S?derlund -- Kind Regards, Niklas S?derlund