Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp1464660imc; Mon, 11 Mar 2019 14:31:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqzF7NDJcrA+J8HTDj7wzJW4VFzU7kmghrFOM6rVJB6A3uHQthckPPeQICy5xpni/w577WXD X-Received: by 2002:aa7:92da:: with SMTP id k26mr35359657pfa.216.1552339874651; Mon, 11 Mar 2019 14:31:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552339874; cv=none; d=google.com; s=arc-20160816; b=ujMMdhxH7PNtlLtD2xKL649fcPP3bNLjk2itDHVUyAAncn+uVZtxHZV5BUMge+C2Iz +G8fBdY6HQsHH3CTnGvakIN8EXyTnxNUyHaEOldU7MPXzp4YG8snR8pAWQc7eMmbXcBY z6MbrDAma3D1mMS0anKwqACuFbOrFQYfhGMTmqYH1Rnfhoa9c/MdUbUmqysyaI/O7Kpg 9uDCh3CJUZGLQM1hltZxOskYIako5bvOwZJar2hlpz66B/V0M25awuv7h2c0aNMu3WU5 9tYIAyo2ECQGPTjljZTSpcxCRFpTHf08jAJv18rzBpcwMavHIvyh5QknKVB5gEqWfXih QQEA== 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=PFhOZAUEDtWYDW0GDceaUlWynPHernIUxw1Yc+JJsD0=; b=eXfFgxnbSNbJFx2UHZM4jS20B/gRp4539jbYeSSZYvoYPJEliW4WLLiopg8tMsvpV1 Su4u6LeCxoBVtJQWZU4YNkaoOHdqcUM2y0S9OP/ejveY7uMLz2sB2RIKEBAEEgwroUyA Carbl/MKdTTrQutqxgHjoLOdEjGpdSQYLQwiK5jkpjI87/6c93eYEop+7iOSs1QpBOi9 YLZL9nqmFEiWFYKyLeExyANZ3Jd4IivFvGWUP3vGyuoPc9GRxCdxlaCLLloYCRSiqocB tnJQIdbRUhFzQqmalbckVBaBpca4VC6S0m++6qPbqwiUSeJhYSC3/zbhnlGebB+e3ShX BMiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=C8SkrrjL; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e67si6037166pfh.212.2019.03.11.14.30.58; Mon, 11 Mar 2019 14:31:14 -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=@kernel.org header.s=default header.b=C8SkrrjL; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728173AbfCKVai (ORCPT + 99 others); Mon, 11 Mar 2019 17:30:38 -0400 Received: from mail.kernel.org ([198.145.29.99]:54504 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727830AbfCKVah (ORCPT ); Mon, 11 Mar 2019 17:30:37 -0400 Received: from mail-qt1-f171.google.com (mail-qt1-f171.google.com [209.85.160.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D07412064A; Mon, 11 Mar 2019 21:30:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1552339837; bh=ZN55pZtl4a4BzShPoF2ymQiDoDFSOYwCDjRwiPP9XBs=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=C8SkrrjL+IPPOlghfd0vMoeCZd61ZfXpFGdmadLaU9gfgl0UVgq3fl5fpIKDg0SJM UhNPb8At8Mv6buRX1KErVdFAdafC5/ZI+XRT2VPP95CmAFQDXdslg840gmq9VNi4et 9+WCt0I4GIu6vUQ05bqMCmhQXQ04XDO8LWC30nmI= Received: by mail-qt1-f171.google.com with SMTP id h39so324068qte.2; Mon, 11 Mar 2019 14:30:36 -0700 (PDT) X-Gm-Message-State: APjAAAV8YvRuRVzhw+02ZxcMbfQ0IiEW0UZMeWitVe9YQK9EbJRR1wTC 7mjeMX83S+9ww3RqDJaOmQZti+xffE6ykIOc6Q== X-Received: by 2002:a0c:ecc5:: with SMTP id o5mr27934281qvq.106.1552339836104; Mon, 11 Mar 2019 14:30:36 -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: Rob Herring Date: Mon, 11 Mar 2019 16:30:24 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v4 1/3] dt-bindings: phy: Add Stingray USB PHY binding document To: Srinath Mannam 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 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