Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp772105imm; Fri, 28 Sep 2018 06:37:43 -0700 (PDT) X-Google-Smtp-Source: ACcGV61R11vivjr3cffTHXKOYX9oQe4jS+Ppa7GIYeCFs6Ykg7xIWO4fh+U0J2SXwLvnIvjECIu2 X-Received: by 2002:a63:5c10:: with SMTP id q16-v6mr15032313pgb.452.1538141863319; Fri, 28 Sep 2018 06:37:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538141863; cv=none; d=google.com; s=arc-20160816; b=umVJnquFoBGZRyoz+zmOokRL63apJB24ZXqCF1Y3dK+mC/67P9O56vAMrWWThfni5s cO9bFY8cO09obUwE7PrIKKTmOCGaHPo7ublcmYkz0j3pkWuTHRiSV4INoMOnfPR+bsHo mudbOyPIeQmQl5icC9vc25JGthheNdqQ9HfRC01C2RWEXs/ZBsCBu50sPeSqBBXmhlGL Nyv367wNZClxxSF15dAMCYQj3NdJPWZ/HI+HbWS+rhEu03v9LOS7jNwzWUG4dqPOrnQ5 X4P6tQ9ap4Op9dJvXHv/9rMIfVnsMuiVc0zV0BHINgmv6wwakrd9lzVDnvaX5fkgXrO3 Qgdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=um4FdkU2TTeeNm69u7l+jrYHjGDwvCgSo5dq4twZvNY=; b=Ev6I001cy0jsHaSunOyiaJDM34+xgAovBfRv7mCPuHJySCIqvkWoo+osgR40CdzcLk xFFHSvvKihCDhH/Eb3T65e7bkIXTvYftmHpcyYKLG1ogaxz9EMrJU+RRxL9FxvGtiZii RQVW+3KYE2qHIImdP+t0winu2KOM1dpJ2bGLr65km0aP+HT/qsrkMALMIgao/hVwA06R gtJGxlUPei/QZFxUfTCJ0Oz3KXn2MpW2GazWtCgaRhR02bAEykmsFKie+igqGq7mILXL r60YpdUsbpTa5GK1orQ4bJQ3F+71RaWgmQfpQ9l4qtcXKWdy84Hy0kHZpvGeNvfSlt+t yI0A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q2-v6si4776198pgg.108.2018.09.28.06.37.26; Fri, 28 Sep 2018 06:37:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729181AbeI1UAk (ORCPT + 99 others); Fri, 28 Sep 2018 16:00:40 -0400 Received: from mail.bootlin.com ([62.4.15.54]:60762 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726934AbeI1UAj (ORCPT ); Fri, 28 Sep 2018 16:00:39 -0400 Received: by mail.bootlin.com (Postfix, from userid 110) id 460CC20737; Fri, 28 Sep 2018 15:36:43 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT shortcircuit=ham autolearn=disabled version=3.4.0 Received: from localhost (nat-240.udc.es [193.144.61.240]) by mail.bootlin.com (Postfix) with ESMTPSA id D26EA206D0; Fri, 28 Sep 2018 15:36:42 +0200 (CEST) Date: Fri, 28 Sep 2018 15:36:42 +0200 From: Maxime Ripard To: Sakari Ailus Cc: Chen-Yu Tsai , Laurent Pinchart , Yong Deng , Mauro Carvalho Chehab , Rob Herring , Mark Rutland , David Miller , Greg Kroah-Hartman , Andrew Morton , Arnd Bergmann , Hans Verkuil , Geert Uytterhoeven , Jacob Chen , Neil Armstrong , Thierry Reding , Philipp Zabel , Todor Tomov , Linux Media Mailing List , devicetree , linux-arm-kernel , linux-kernel , linux-sunxi Subject: Re: [PATCH v11 1/2] dt-bindings: media: Add Allwinner V3s Camera Sensor Interface (CSI) Message-ID: <20180928133642.3vmjm766cdm2oh6e@flea> References: <1537951204-24672-1-git-send-email-yong.deng@magewell.com> <20180928093833.gwmskm2jvby6x4s6@paasikivi.fi.intel.com> <14114604.4rraf0qJLU@avalon> <20180928102345.r2g342tg5mgcwfw6@paasikivi.fi.intel.com> <20180928125601.6ye5tvrmh57amvh5@paasikivi.fi.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180928125601.6ye5tvrmh57amvh5@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 Hi Sakari, Thanks for taking the time to review. On Fri, Sep 28, 2018 at 03:56:01PM +0300, Sakari Ailus wrote: > Hi Chen-Yu, > > On Fri, Sep 28, 2018 at 07:10:58PM +0800, Chen-Yu Tsai wrote: > > On Fri, Sep 28, 2018 at 6:23 PM Sakari Ailus > > wrote: > > > > > > Hi Laurent, > > > > > > On Fri, Sep 28, 2018 at 12:45:12PM +0300, Laurent Pinchart wrote: > > > > Hi Sakari, > > > > > > > > On Friday, 28 September 2018 12:38:33 EEST Sakari Ailus wrote: > > > > > On Wed, Sep 26, 2018 at 04:40:04PM +0800, Yong Deng wrote: > > > > > > Add binding documentation for Allwinner V3s CSI. > > > > > > > > > > > > Acked-by: Maxime Ripard > > > > > > Acked-by: Sakari Ailus > > > > > > > > > > I know... but I have a few more comments. > > > > > > > > > > > Reviewed-by: Rob Herring > > > > > > Signed-off-by: Yong Deng > > > > > > --- > > > > > > > > > > > > .../devicetree/bindings/media/sun6i-csi.txt | 59 +++++++++++++++++ > > > > > > 1 file changed, 59 insertions(+) > > > > > > create mode 100644 Documentation/devicetree/bindings/media/sun6i-csi.txt > > > > > > > > > > > > diff --git a/Documentation/devicetree/bindings/media/sun6i-csi.txt > > > > > > b/Documentation/devicetree/bindings/media/sun6i-csi.txt new file mode > > > > > > 100644 > > > > > > index 000000000000..2ff47a9507a6 > > > > > > --- /dev/null > > > > > > +++ b/Documentation/devicetree/bindings/media/sun6i-csi.txt > > > > > > @@ -0,0 +1,59 @@ > > > > > > +Allwinner V3s Camera Sensor Interface > > > > > > +------------------------------------- > > > > > > + > > > > > > +Allwinner V3s SoC features two CSI module. CSI0 is used for MIPI CSI-2 > > > > > > +interface and CSI1 is used for parallel interface. > > > > > > + > > > > > > +Required properties: > > > > > > + - compatible: value must be "allwinner,sun8i-v3s-csi" > > > > > > + - reg: base address and size of the memory-mapped region. > > > > > > + - interrupts: interrupt associated to this IP > > > > > > + - clocks: phandles to the clocks feeding the CSI > > > > > > + * bus: the CSI interface clock > > > > > > + * mod: the CSI module clock > > > > > > + * ram: the CSI DRAM clock > > > > > > + - clock-names: the clock names mentioned above > > > > > > + - resets: phandles to the reset line driving the CSI > > > > > > + > > > > > > +Each CSI node should contain one 'port' child node with one child > > > > > > 'endpoint' +node, according to the bindings defined in > > > > > > +Documentation/devicetree/bindings/media/video-interfaces.txt. As > > > > > > mentioned > > > > > > +above, the endpoint's bus type should be MIPI CSI-2 for CSI0 and parallel > > > > > > or +Bt656 for CSI1. > > > > > > > > > > Which port represents CSI0 and which one is CSI1? That needs to be > > > > > documented. > > > > > > > > There are two CSI devices, named CSI0 and CSI1, with one port each. The CSI0 > > > > device supports CSI-2 only, and the CSI1 device parallel (BT.601 or BT.656) > > > > only. > > > > > > > > > > + > > > > > > +Endpoint node properties for CSI1 > > > > > > > > > > How about CSI0? I'd expect at least data-lanes, and clock-lanes as well if > > > > > the hardware supports lane mapping. > > > > > > > > I enquired about that too. As far as I understand, CSI0 isn't supported yet in > > > > the driver due to lack of documentation and lack of open-source vendor- > > > > provided source code. While DT bindings are not tied to driver > > > > implementations, it's not the best idea to design DT bindings without at least > > > > one working implementation to test them. I thus proposed just listing CSI0 as > > > > being unsupported for now. > > > > > > Ack. > > > > > > We should still define which receiver corresponds to a given port. Probably > > > 1 for CSI1 would make sense, in order to avoid changing the order the > > > hardware already uses. 0 doesn't need to be documented no IMO. > > > > > > What do you think? > > > > AFAICT it would be a completely seperate node, since they have different address > > spaces, clocks and reset controls. So there's no possibility of confusion. > > > > According to Yong, CSI0 is tied internally to some unknown MIPI CSI2-receiver, > > which is the undocumented part. CSI1 has its parallel data pins exposed to the > > outside. > > Thanks for clearing up the confusion. If these are truly different kinds of > devices, then don't they also deserve different compatible strings? And > possibly also different DT binding documentation in a separate file. It can, and will if it's ever supported, but I'm not quite sure what's confusing you about those bindings. It never claims to support CSI0, and we will only add a new document and compatible and whatever is needed when we'll have the need for it? Maxime -- Maxime Ripard, Bootlin Embedded Linux and Kernel engineering https://bootlin.com