Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2077244imm; Thu, 20 Sep 2018 07:27:24 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZfT+ZOwyV66oyyyLkFK5qOjY7hBM6/7vwpJCzaeA6BY0GDbuRojwg0VvNPBXcmUAQigVxI X-Received: by 2002:a65:4607:: with SMTP id v7-v6mr6898225pgq.448.1537453644068; Thu, 20 Sep 2018 07:27:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537453644; cv=none; d=google.com; s=arc-20160816; b=FzsIFgalWlFI+JnqhVP0+BK3ALnDywnF8Pmh6CvF9YtTZ44rvOyUQBIrtIug+h8S3b to1zLgjBQl6KJFqy4dyX2WXSzWhS21axFy/p7qRfDEcvqIvlFVU4GnLi2OmKmRTRoyv0 jo5CAHjUgc9h4emQVPqmhC6fMTt/ajiyR5wYrwPx73GPSi2eZBzeyh7HRL2YGnnrxAS9 AS3cHj8UZrucoa9hXGgPXQPVraKWCngfZLaPzR4XSOZowtp/kh0AnWWnONeELqjGKohf XUYahbhkXrRVA2IIFgwJNHJjta9UulT4VKbZ+h+jzotdjFJtz2FZVALNgGHgJHB+f5fJ 0FgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=+f0CooeCMQRTdzzfe2UKYPDxRJI8ogjpwrDlVDIuXQ4=; b=NT+sxlaXAtmkfRpnoisNBAcoxzaF3LisHKu1pJrIYwDXax39aKJmJ43YiwocKmA9iW ivHyP3ka8BwyTC3j/EmIfJ6ro7puiebZmycFh+e6XHeo1rg9hGliztKMQ1XsnwNzFyCh 8aEw1TXjRHGp4VvHppvF6JUmcSJiL61QTmzh1ztoOaTOs4vvPax6dPfKdjNj6afTXZ5X n54f1X3IV/zbptg2VXd1eTSASZPB4T5JN42eG9SJKwh0qpk7ZCBZaGOgZUVwdDy1Es9Y 52MO0z2Z1lTVJNw02OXavG/klleOZUzfRCModeSqSqMsemOx2z9VdBMctEpAAnr5xBZI 1BdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@synopsys.com header.s=mail header.b=No82fQL9; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=synopsys.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l190-v6si2354910pga.481.2018.09.20.07.27.07; Thu, 20 Sep 2018 07:27:24 -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; dkim=pass header.i=@synopsys.com header.s=mail header.b=No82fQL9; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=synopsys.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733044AbeITUJw (ORCPT + 99 others); Thu, 20 Sep 2018 16:09:52 -0400 Received: from smtprelay2.synopsys.com ([198.182.60.111]:49516 "EHLO smtprelay.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731025AbeITUJw (ORCPT ); Thu, 20 Sep 2018 16:09:52 -0400 Received: from mailhost.synopsys.com (mailhost2.synopsys.com [10.13.184.66]) by smtprelay.synopsys.com (Postfix) with ESMTP id 59F9D10C1166; Thu, 20 Sep 2018 07:26:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1537453568; bh=vYXaDB7K+xPYlZzvvIQsTH+Y7TjitNWx1YppSjG80Wc=; h=Subject:To:CC:References:From:Date:In-Reply-To:From; b=No82fQL98mYFLn8b24HNMOnTKyp33kvA2JV6abRYcTV9VJ154Uk9SAGtHJETAh71v hQhMtGSyfoPg6tvkoPrIHekH1NYgwNO+pdi5nBhjOvx4w/I236iyoU0+MQuj3GZ4Js tovmCv2RPXHJu0k92VQxthRyfc76obgMkeSGsuU6BeWWWgFBDI9dbYgjgkjFiUpcvP L0J+xJ6QbakwYMKbnverFehGwWAS319/ofeX4L6JyKnyDBG7vENH1VIkxNbt9UqfFI emuRImNYXMOQhdSDOzvXIe9SEnGioZ5tA6gODfGt061kg5rOqGVlDi30dTtIwx7Y7c NFw2PXjuUBhqQ== Received: from US01WXQAHTC1.internal.synopsys.com (us01wxqahtc1.internal.synopsys.com [10.12.238.230]) by mailhost.synopsys.com (Postfix) with ESMTP id 62AD93C80; Thu, 20 Sep 2018 07:26:06 -0700 (PDT) Received: from DE02WEHTCA.internal.synopsys.com (10.225.19.92) by US01WXQAHTC1.internal.synopsys.com (10.12.238.230) with Microsoft SMTP Server (TLS) id 14.3.361.1; Thu, 20 Sep 2018 07:26:05 -0700 Received: from DE02WEHTCB.internal.synopsys.com (10.225.19.94) by DE02WEHTCA.internal.synopsys.com (10.225.19.92) with Microsoft SMTP Server (TLS) id 14.3.361.1; Thu, 20 Sep 2018 16:26:04 +0200 Received: from [10.107.25.72] (10.107.25.72) by DE02WEHTCB.internal.synopsys.com (10.225.19.80) with Microsoft SMTP Server (TLS) id 14.3.361.1; Thu, 20 Sep 2018 16:26:04 +0200 Subject: Re: [V2, 2/5] Documentation: dt-bindings: Document the Synopsys MIPI DPHY Rx bindings To: Laurent Pinchart , Luis Oliveira CC: , , , , Rob Herring , Mark Rutland , "Mauro Carvalho Chehab" , Hans Verkuil , "Geert Uytterhoeven" , Laurent Pinchart , Arnd Bergmann , Jacob Chen , Neil Armstrong , Keiichi Watanabe , Kate Stewart , Philipp Zabel , Todor Tomov , References: <20180920111648.27000-1-lolivei@synopsys.com> <20180920111648.27000-3-lolivei@synopsys.com> <1754496.WQhu2lOnZY@avalon> From: Luis Oliveira Message-ID: <0cc27ea0-7c05-4c07-6c14-2146b0c2b370@synopsys.com> Date: Thu, 20 Sep 2018 15:26:02 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <1754496.WQhu2lOnZY@avalon> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.107.25.72] Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 20-Sep-18 14:11, Laurent Pinchart wrote: > Hi Louis, > > Thank you for the patch. > Hi Laurent, thank you for your review, my answers are inline. > On Thursday, 20 September 2018 14:16:40 EEST Luis Oliveira wrote: >> Add device-tree bindings documentation for SNPS DesignWare MIPI D-PHY in >> RX mode. >> >> Signed-off-by: Luis Oliveira >> --- >> Changelog >> v2: >> - no changes >> >> .../devicetree/bindings/phy/snps,dphy-rx.txt | 36 +++++++++++++++++++ >> 1 file changed, 36 insertions(+) >> create mode 100644 Documentation/devicetree/bindings/phy/snps,dphy-rx.txt >> >> diff --git a/Documentation/devicetree/bindings/phy/snps,dphy-rx.txt >> b/Documentation/devicetree/bindings/phy/snps,dphy-rx.txt new file mode >> 100644 >> index 0000000..9079f4a >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/phy/snps,dphy-rx.txt >> @@ -0,0 +1,36 @@ >> +Synopsys DesignWare MIPI Rx D-PHY block details >> + >> +Description >> +----------- >> + >> +The Synopsys MIPI D-PHY controller supports MIPI-DPHY in receiver mode. >> +Please refer to phy-bindings.txt for more information. >> + >> +Required properties: >> +- compatible : Shall be "snps,dphy-rx". >> +- #phy-cells : Must be 1. >> +- snps,dphy-frequency : Output frequency of the D-PHY. > > If that's the frequency of the clock on the output side of the RX PHY, doesn't > it depend on the frequency on the CSI-2 (or other) bus ? Can't it vary ? Why > do you need to have it in DT ? > But you are right, I will move it to the CSI-2 block. The reason for it to be on the DT is that my use case have a camera with fixed frequency connected, but of course I can change it after. >> +- snps,dphy-te-len : Size of the communication interface (8 bits->8 or >> 12bits->12). > > We have similar properties in various bindings, such as bus-width in video- > interfaces.txt. Couldn't we use a more standard name ? I have read the bus-width property but I don't this is the same. This is not a video quite a video interface. Our D-PHY is configured using an control interface, which is called "test interface" and can have 8-bit or 12-bit. > >> +- reg : Physical base address and size of the device memory mapped >> + registers; > > The example below shows three ranges. Could you document the ranges that are > expected ? > The three ranges is optional, it can be only two. - The first is the interface from which we communicate with the d-phy. A small window the for the referenced above "test interface". - The second and third reg are regions for configuration for the d-phy before the d-phy bring up: a few examples: - 4+4 data lanes max, 1 clk - 8 data lanes max, 1clk - 4+4 data lanes, 2 clk >> +Optional properties: >> +- snps,compat-mode : Compatibility mode control > > What is this ? This toggles a mode for a specific d-phy that we can't auto-detect. So when we use it we activate the compatibility mode for it. I can remove it if you think it's best. > >> +The per-board settings: >> +- gpios : Synopsys testchip used as reference uses this to change > setup >> + configurations. > > Here too, what is this for ? Most of our d-phys have a wrapper around that can be controlled by a gpio-driver that can halt the d-phy. > >> +Example: >> + >> + mipi_dphy_rx1: dphy@3040 { >> + compatible = "snps,dphy-rx"; >> + #phy-cells = <1>; >> + snps,dphy-frequency = <300000>; >> + snps,dphy-te-len = <12>; >> + snps,compat-mode = <1>; >> + reg = < 0x03040 0x20 >> + 0x08000 0x100 >> + 0x09000 0x100>; > > The base addresses are pretty low, what kind of bus does this sit on ? > It sits on top of a bus like this for my configuration. dx_mb { compatible = "simple-bus"; #address-cells = <1>; #size-cells = <1>; ranges = <0x00000000 0x0 0xD0000000 0x10000000>; interrupt-parent = <&he_intc>; ... >> + }; >> + >