Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp448873pxf; Wed, 7 Apr 2021 03:41:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy3TVSRwKkB8uhF09aI78ZV2pOaTO68yx3FAm6uSVic6Ch/kQimg4EplcamMnHmpv+jzwxN X-Received: by 2002:aa7:d494:: with SMTP id b20mr1059605edr.173.1617792090358; Wed, 07 Apr 2021 03:41:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617792090; cv=none; d=google.com; s=arc-20160816; b=jjgqI6Q1BiXiY5AVbu72KDf/YupRRGESCIyq68hC/7nTCSJ0aPzRXBDHll+c5QcQTu gdCCHNh+9vx9nW3hxNM8sE9yt5LjIrKfM9hhnfv+rBUC/x4xVqdG3ruedwcEG76tbJcZ Xo3WpnF50CS2+YspbtYOYel7xi5nIb32ZLNuPFMaEmx5xPRAWozWO31sG71MZVuKd3QJ IZbBPt2MfIKucrfJa2e07vH7Wlx88FTm9T9V5iI7+s43BIioY7rmuvnqDC+jndlyRoLQ v1oZMV/41kbvwcEoaYLRt/7eB9ebwPsjBCoi6ua8B8dxRGJJh9ICNlEG7XVIt5yXQWCh y3WA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=fh4SyDkyDF5oOs9/MrTaThouEwEq+Fqg8/szP7jmyyI=; b=DG0V9UhL+L7/kWycsmigGCOep6yOrylTnxN+YvgKzgxuimmYen20uLhiWg3wqRVKpW j6a1k0bUFyDA18b+UQzeEprtD09Xrih9KUkqOerKW2sFNrqNqB4jrWU6crHYX2VvFKlR pBOLNb+a8fyU88lEnxYVXwV7SL1INwN8IN2n/Ukjfm6BQ9B11f4in0wJA73sRcAyxOYL uzggG8Hov4bvMAlvL8gQNd2s4kJaXHybgqivwhNO7owHYCtj/lWZKnr0hnEjWXQz8bBJ wIWUV2cBGn662ViFnixwnQ6NvEeYdbPcGoloL8VWwebQYnAlTFO3OFdkD+puGRg4s5Kx X8uw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=ySz+hZqr; 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; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q1si18431639ejy.298.2021.04.07.03.41.06; Wed, 07 Apr 2021 03:41:30 -0700 (PDT) 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=@ti.com header.s=ti-com-17Q1 header.b=ySz+hZqr; 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; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234817AbhDFSN5 (ORCPT + 99 others); Tue, 6 Apr 2021 14:13:57 -0400 Received: from fllv0015.ext.ti.com ([198.47.19.141]:37596 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232876AbhDFSN4 (ORCPT ); Tue, 6 Apr 2021 14:13:56 -0400 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 136IDTQG078969; Tue, 6 Apr 2021 13:13:29 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1617732809; bh=fh4SyDkyDF5oOs9/MrTaThouEwEq+Fqg8/szP7jmyyI=; h=Date:From:To:CC:Subject:References:In-Reply-To; b=ySz+hZqrkYzWlzi+prP49lK3udwRZoiu9r8SrsW9p+nV6K7nmHuBiB17HhkY/t0lH b1YnS776YNDvp7d8TZokVMzAy6Frex3kV9dq2zu+1WDKQ+k/vIJ+3LN+Z0nqC5u5kA LOWxycaAnPgnF4Su83MLU83ZiQmzOoTs/4hfnC/8= Received: from DLEE113.ent.ti.com (dlee113.ent.ti.com [157.170.170.24]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 136IDTC6015000 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 6 Apr 2021 13:13:29 -0500 Received: from DLEE103.ent.ti.com (157.170.170.33) by DLEE113.ent.ti.com (157.170.170.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Tue, 6 Apr 2021 13:13:28 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DLEE103.ent.ti.com (157.170.170.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2 via Frontend Transport; Tue, 6 Apr 2021 13:13:28 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 136IDSfI068727; Tue, 6 Apr 2021 13:13:28 -0500 Date: Tue, 6 Apr 2021 23:43:27 +0530 From: Pratyush Yadav To: Laurent Pinchart CC: Rob Herring , Mauro Carvalho Chehab , Kishon Vijay Abraham I , Vinod Koul , Peter Ujfalusi , Maxime Ripard , Benoit Parrot , Hans Verkuil , Alexandre Courbot , Stanimir Varbanov , Helen Koike , Michael Tretter , Peter Chen , Chunfeng Yun , , , , , , Vignesh Raghavendra , Tomi Valkeinen Subject: Re: [PATCH 12/16] dt-bindings: media: Add DT bindings for TI CSI2RX driver Message-ID: <20210406181325.62htotc2y4eag4ar@ti.com> References: <20210330173348.30135-1-p.yadav@ti.com> <20210330173348.30135-13-p.yadav@ti.com> <20210401155201.GA488101@robh.at.kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20171215 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/04/21 01:01PM, Laurent Pinchart wrote: > On Thu, Apr 01, 2021 at 10:52:01AM -0500, Rob Herring wrote: > > On Tue, Mar 30, 2021 at 11:03:44PM +0530, Pratyush Yadav wrote: > > > TI's J721E uses the Cadence CSI2RX and DPHY peripherals to facilitate > > > capture over a CSI-2 bus. The TI CSI2RX platform driver glues all the > > > parts together. > > > > > > Signed-off-by: Pratyush Yadav > > > --- > > > .../devicetree/bindings/media/ti,csi2rx.yaml | 70 +++++++++++++++++++ > > > 1 file changed, 70 insertions(+) > > > create mode 100644 Documentation/devicetree/bindings/media/ti,csi2rx.yaml > > > > > > diff --git a/Documentation/devicetree/bindings/media/ti,csi2rx.yaml b/Documentation/devicetree/bindings/media/ti,csi2rx.yaml > > > new file mode 100644 > > > index 000000000000..ebd894364391 > > > --- /dev/null > > > +++ b/Documentation/devicetree/bindings/media/ti,csi2rx.yaml > > > @@ -0,0 +1,70 @@ > > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > > > +%YAML 1.2 > > > +--- > > > +$id: http://devicetree.org/schemas/media/ti,csi2rx.yaml# > > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > > + > > > +title: TI CSI2RX Wrapper Device Tree Bindings > > > + > > A description would be useful, especially given that the TRM doesn't > mention "CSI2RX". Ok. > > > > +maintainers: > > > + - Pratyush Yadav > > > + > > > +properties: > > > + compatible: > > > + items: > > > + - const: ti,csi2rx > > > + > > > + dmas: > > > + description: RX DMA Channel 0 > > > > items: > > - description: RX DMA Channel 0 > > > > Or just 'maxItems: 1' > > > > > + > > > + dma-names: > > > + items: > > > + - const: rx0 > > > + > > > + reg: > > > + maxItems: 1 > > > + description: Base address and size of the TI wrapper registers. > > > > That's all 'reg' properties, drop 'description'. > > According to SPRUIL1B, there are four register banks for the CSI_RX_IF, > and two register banks for the DPHY_RX. What's your plan to support > these ? Not everything need to be implemented at once, but backward > compatibility need to be taken into account in the design. The CSI_RX_IF0_ECC_AGGR_CFG register bank is for safety requirements. The driver does not use them. The CSI_RX_IF0_RX_SHIM_VBUSP_MMR_CSI2RXIF register bank is for the TI wrapper around the Cadence CSI2RX bridge that deals with DMA threads. This bank is what this binding is concerned with. The CSI_RX_IF0_VBUS2APB_WRAP_VBUS_APB_CSI2RX bank is for the Cadence CSI2RX bridge. The Cadence schema should deal with that. And lastly, I don't know what the CSI_RX_IF0_CP_INTD_CFG_INTD_CFG bank is for. The driver does not use it. I don't forsee the first and last bank being used in Kernel, but if we want to be safe I can change maxItems to 3. Sounds good? > > > > + > > > + power-domains: > > > + maxItems: 1 > > > + description: > > > + PM domain provider node and an args specifier containing > > > + the device id value. > > > > Drop. > > > > > + > > > + ranges: true > > > + > > > + "#address-cells": > > > + const: 2 > > > + > > > + "#size-cells": > > > + const: 2 > > > + > > > +patternProperties: > > > + "csi-bridge@": > > > > "^csi-bridge@" > > > > > + type: object > > > + description: CSI2 bridge node. > > > > Just an empty node? > > Even if the node is optional, it would be useful to include it in the > example below, to show how it's supposed to be used. It is not optional. It should be the Cadence CSI2RX bridge node. Will add it in the example. I also need to see if there is any way to make a patternProperty a required property. > > > > + > > > +required: > > > + - compatible > > > + - reg > > > + - dmas > > > + - dma-names > > > + - power-domains > > > + - "#address-cells" > > > + - "#size-cells" > > > + > > > +additionalProperties: false > > > + > > > +examples: > > > + - | > > > + #include > > > + > > > + ti_csi2rx0: ticsi2rx { > > > + compatible = "ti,csi2rx"; > > > + dmas = <&main_udmap 0x4940>; > > > + dma-names = "rx0"; > > > + reg = <0x0 0x4500000 0x0 0x1000>; > > > + power-domains = <&k3_pds 26 TI_SCI_PD_EXCLUSIVE>; > > > + #address-cells = <2>; > > > + #size-cells = <2>; > > > + }; > > -- > Regards, > > Laurent Pinchart -- Regards, Pratyush Yadav Texas Instruments Inc.