Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp1678333imc; Mon, 11 Mar 2019 20:55:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqwnSTfDJIEXddh92qnnQruCytA/5/VhYXR3ul3fUGMGvcWj3SzhC5CT0XNOxcuNPvOKdOzy X-Received: by 2002:a63:6b03:: with SMTP id g3mr15941777pgc.239.1552362909618; Mon, 11 Mar 2019 20:55:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552362909; cv=none; d=google.com; s=arc-20160816; b=ZUudjPj/hG5fpD1xP1ALvmqp+6FuEBtHWvywyq1YvqvncddGfLGh4yprCkEv11wN1h fPf1Tn24I/pu1IHbmVtUNM2Cxuz3+nJRNiqe6TfeeLz2Mgh05KZZZLaRnYb1JnFK5j9p rFBqNYaolOXhlntlFPZQS7gvbc4XzhdDREX6ARNvUarAiXYrG5HiFTRJC+WEnO8h26At QHElHHpAWq9AQb/b/V54vi8bZJwxn7sdYqRzJ70K43+CQPYLndAd62+CLWBMS0CGhzmA bJek9CmqXkPzq6s+2lwK2UEi0li2f4P0wlkcHDfhP0TBs2s0ou3FbgBpTtpcpQEbwXTg ryAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=uNqG33lDmG2ipNglkTGftnysXD5/Q1zR9XWc/GcmZ+0=; b=ztaGy37LOqEuGLP9bpXlTFMkuW0q3Ks/Gw3bI/LptLZ32bf2qUTMYmz4rvS1VbK+kf Pk4MviycGQ2ihNuiO//ZaBsnx5VJqRdAOYqtk6rhpbKlFCqWSZBmgJAjcBAyh1TME6Ag /4V7LE8qbGJ5DXbFjjepQ+u0jyrBvhBS1jpYaGA4aCNqfczXqTEi1qhwe7u09Gr6o5PJ pcjIVOs3g3ZjrRL3FOfGVFe5pMPIRddgUjNtGvMdqCR17Q9dIV06h5rHgN5tS/HGJjAh KqUKX1QkXWoeTaa76SrR2+5wgzsxiMeiZre0Pf+atHMquADP/Y+l/aIiI946FQU38twH 4hDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=VGaY5fJU; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e68si6461820pgc.552.2019.03.11.20.54.54; Mon, 11 Mar 2019 20:55:09 -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=@broadcom.com header.s=google header.b=VGaY5fJU; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727039AbfCLDyR (ORCPT + 99 others); Mon, 11 Mar 2019 23:54:17 -0400 Received: from mail-wm1-f66.google.com ([209.85.128.66]:56181 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726008AbfCLDyQ (ORCPT ); Mon, 11 Mar 2019 23:54:16 -0400 Received: by mail-wm1-f66.google.com with SMTP id 4so1083779wmf.5 for ; Mon, 11 Mar 2019 20:54:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=uNqG33lDmG2ipNglkTGftnysXD5/Q1zR9XWc/GcmZ+0=; b=VGaY5fJUsusDtdd+ZFgpXiDcv3npszM02UNNcOPeMityn7wwltSM+7usq26qnK/hhV O6UDuHDd5XY0ArNhgHPGxcmfPfHbn8SdUYvT3bkZzMRbMSVYSVfL12piiDzDzuj8Z3mV nE8PGSywIKNjQHxc9DOraGpP1fXgVFggqgUHg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=uNqG33lDmG2ipNglkTGftnysXD5/Q1zR9XWc/GcmZ+0=; b=JNrT6VBY+Vu4FHdreIL3yO4uhcWAdEqyI84kQctnYYTRGCYQfW6zkkvs+ZDL2XqPrl jRIuuWAwOJx9rGOu3u8Ggasq88UE0LaOjfP9ehJkFZoMCLlkgLBpWOsQ+pgG3ZBtu+Uy JVqGOViLIzNg5s3R/Z1J+736j1uD5xJhlgeKjE67kdzXOTC/uT2KSN1eEIujkKwvFVXl jzzLZ6SssS3YjO6xrJ+/G9AbtN8D3u6kSv2iww+sPDgNwYUV4NjuAsUC1cAK10gSV2qh V0YVgWWRYTlBi1w5fE8yi0Kh+VHxIENDBdefRnxG4pUNZdgp6FDUqp0juyim9VFE3iUN UiUQ== X-Gm-Message-State: APjAAAVSzMI/9ZR/QuMCoHiwD5BTTkpf3fhuNFh2r/MuKXXDcjRxSXWB IpgjeSM9iHtQxPT+ZhEL1uK196PL7afFMilm6z59cg== X-Received: by 2002:a1c:2d4c:: with SMTP id t73mr777213wmt.142.1552362854343; Mon, 11 Mar 2019 20:54:14 -0700 (PDT) MIME-Version: 1.0 References: <1550658842-19167-1-git-send-email-srinath.mannam@broadcom.com> <1550658842-19167-2-git-send-email-srinath.mannam@broadcom.com> <20190222172042.GA6792@bogus> In-Reply-To: From: Srinath Mannam Date: Tue, 12 Mar 2019 09:24:02 +0530 Message-ID: Subject: Re: [PATCH v4 1/3] dt-bindings: phy: Add Stingray USB PHY binding document To: Rob Herring Cc: Mark Rutland , Kishon Vijay Abraham I , Tejun Heo , Jayachandran C , devicetree@vger.kernel.org, Linux Kernel Mailing List , BCM Kernel Feedback Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Rob, Thank you, I will send next patch set with the changes as you suggested. Regards, Srinath. On Tue, Mar 12, 2019 at 3:00 AM Rob Herring wrote: > > On Sun, Mar 10, 2019 at 10:32 PM Srinath Mannam > wrote: > > > > Hi Rob, > > > > Please find my comments below, > > > > On Sat, Feb 23, 2019 at 1:05 AM Rob Herring wrote: > > > > > > On Fri, Feb 22, 2019 at 11:29 AM Srinath Mannam > > > wrote: > > > > > > > > Hi Rob, > > > > > > > > Thanks for the review, Please find my comments below in line. > > > > > > > > On Fri, Feb 22, 2019 at 10:50 PM Rob Herring wrote: > > > > > > > > > > On Wed, Feb 20, 2019 at 04:04:00PM +0530, Srinath Mannam wrote: > > > > > > Add DT binding document for Stingray USB PHY. > > > > > > > > > > > > Signed-off-by: Srinath Mannam > > > > > > Reviewed-by: Florian Fainelli > > > > > > Reviewed-by: Scott Branden > > > > > > --- > > > > > > .../bindings/phy/brcm,stingray-usb-phy.txt | 62 ++++++++++++++++++++++ > > > > > > 1 file changed, 62 insertions(+) > > > > > > create mode 100644 Documentation/devicetree/bindings/phy/brcm,stingray-usb-phy.txt > > > > > > > > > > > > diff --git a/Documentation/devicetree/bindings/phy/brcm,stingray-usb-phy.txt b/Documentation/devicetree/bindings/phy/brcm,stingray-usb-phy.txt > > > > > > new file mode 100644 > > > > > > index 0000000..da19236 > > > > > > --- /dev/null > > > > > > +++ b/Documentation/devicetree/bindings/phy/brcm,stingray-usb-phy.txt > > > > > > @@ -0,0 +1,62 @@ > > > > > > +Broadcom Stingray USB PHY > > > > > > + > > > > > > +Required properties: > > > > > > + - compatible : should be one of the listed compatibles > > > > > > + - "brcm,sr-usb-combo-phy" is a combo PHY has one SS PHY and one HS PHY. > > > > > > + - "brcm,sr-usb-hs-phy" has a single HS PHY. > > > > > > + - reg: offset and length of the PHY blocks registers > > > > > > + - address-cells: should be 1 > > > > > > + - size-cells: should be 0 > > > > > > + > > > > > > +Sub-nodes: > > > > > > + brcm,sr-usb-combo-phy have two sub-nodes for one SS PHY and one HS PHY. > > > > > > + > > > > > > +Sub-nodes required properties: > > > > > > + - reg: required for brcm,sr-usb-phy model PHY. > > > > > > + reg value 0 is HS PHY and 1 is SS PHY. > > > > > > + - phy-cells: generic PHY binding; must be 0 > > > > > > + > > > > > > +Refer to phy/phy-bindings.txt for the generic PHY binding properties > > > > > > + > > > > > > +Example: > > > > > > + usbphy0: usb-phy@0 { > > > > > > + compatible = "brcm,sr-usb-combo-phy"; > > > > > > + reg = <0x00000000 0x100>; > > > > > > + #address-cells = <1>; > > > > > > + #size-cells = <0>; > > > > > > + > > > > > > + usb0_phy0: phy@0 { > > > > > > + reg = <0>; > > > > > > + #phy-cells = <0>; > > > > > > + }; > > > > > > + > > > > > > + usb0_phy1: phy@1 { > > > > > > + reg = <1>; > > > > > > + #phy-cells = <0>; > > > > > > + }; > > > > > > > > > > Again, you don't need child nodes here. There are not any per child > > > > > resources. Clients can refer to <&usbphy0 1> just as easily as > > > > > <&usb0_phy1>. This is why we have #phy-cells. > > > > This phy controller is combo PHY it has one Super Speed USB PHY and > > > > one High Speed USB PHY. > > > > We required to create two PHY devices inside driver to initialize and > > > > service(reset) both SS and HS PHYs separately. > > > > That is the reason we used two child nodes. > > > > > > What you do in the driver is your business. That is independent of the > > > binding. Go look at other phy drivers which use #phy-cells=1. > > > .of_xlate() function is what converts the phy cells to a struct phy. > > > > > I have followed exactly same pattern available in open source. > > ex: Documentation/devicetree/bindings/phy/brcm-sata-phy.txt > > In this also, two child nodes are used with #phy-cells 0. > > You'll notice DT maintainers did not review that binding (only changes > to it). There's no shortage of DT examples of how not to do things. > > Rob