Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1244100

Re: [RFC PATCH 1/2] usb: doc: Add bindings for ULPI platform driver

Path csiph.com!goblin2!goblin.stu.neva.ru!aioe.org!bofh.it!news.nic.it!robomod
From punnaiah choudary kalluri <punnaia@xilinx.com>
Newsgroups linux.kernel
Subject Re: [RFC PATCH 1/2] usb: doc: Add bindings for ULPI platform driver
Date Sun, 11 Oct 2015 13:20:02 +0200
Message-ID <qimPw-6GL-13@gated-at.bofh.it> (permalink)
References <qchpw-8a5-19@gated-at.bofh.it> <qchpw-8a5-21@gated-at.bofh.it> <qchpx-8a5-23@gated-at.bofh.it> <qchpw-8a5-17@gated-at.bofh.it> <qesgQ-1GU-69@gated-at.bofh.it>
X-Original-To balbi@ti.com
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=YLMY0utBzzsftSACUJnuV1+2R9SaNRJJeW63brqVafU=; b=eT/z1WpCou8Hvi6RWqnfMG74Zgxd/P7t2y6u1O81ZYR0mty+E6ks6bNzYHqLzj3eu7 xu5P07DwGXo3ApH7qUm0O1uo4gTe3vknGeXsPbfSAQ0LeHnrderiJTut87cyrgv2m02k pWWuF8xRBd3xBC4bVv6w8jNlpLJAWGwU5ibup9dpMpG4rNV9wZsfnc2EJbKT5PHN3ZCB /f+/SklKWEIuLrf7QdArzI+10NAfBB74e0VJygICTVEK20fyHDVd0IDg4opqnmhV0F9m vS8gGlma2SNgqtzDpmBqjrp09BHxCnGq/rmP+/36eT7atoiEc6RPlBgsq7kqptcTK6z3 hSMg==
MIME-Version 1.0
X-Received by 10.60.45.201 with SMTP id p9mr12879974oem.22.1444562115027; Sun, 11 Oct 2015 04:15:15 -0700 (PDT)
X-Google-Sender-Auth twhPyv0A547qq-o8uGAQeSPmX-U
Content-Type text/plain; charset=UTF-8
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 101
Organization linux.* mail to news gateway
X-Original-Cc Rob Herring <robh@kernel.org>, Subbaraya Sundeep Bhatta <subbaraya.sundeep.bhatta@xilinx.com>, Peter Chen <peter.chen@freescale.com>, "devicetree@vger.kernel.org" <devicetree@vger.kernel.org>, "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>, "linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>, "kishon@ti.com" <kishon@ti.com>, "linux-arm-kernel@lists.infradead.org" <linux-arm-kernel@lists.infradead.org>
X-Original-Date Sun, 11 Oct 2015 16:45:14 +0530
X-Original-Message-ID <CAGnW=Bb0pdv7i1N=WqZoQLDUpuGw=Xq=cM5ir2Ow25pUDYtvEA@mail.gmail.com>
X-Original-References <1443012841-13673-1-git-send-email-sbhatta@xilinx.com> <20150924091034.GB27847@shlinux2> <F1B223389110CE49B4CF055ABA2E5D3D78C9BCBF@XAP-PVEXMBX02.xlnx.xilinx.com> <CAL_JsqK-aAY+DAwt0YH-mbBo+a9c7WPrBwJJoy3=FkT6ZX2A5w@mail.gmail.com> <20150930161803.GI32625@saruman.tx.rr.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1244100

Show key headers only | View raw


On Wed, Sep 30, 2015 at 9:48 PM, Felipe Balbi <balbi@ti.com> wrote:
> On Thu, Sep 24, 2015 at 11:18:01AM -0500, Rob Herring wrote:
>> On Thu, Sep 24, 2015 at 4:26 AM, Subbaraya Sundeep Bhatta
>> <subbaraya.sundeep.bhatta@xilinx.com> wrote:
>> > Hi Peter,
>> >
>> >> -----Original Message-----
>> >> From: Peter Chen [mailto:peter.chen@freescale.com]
>> >> Sent: Thursday, September 24, 2015 2:41 PM
>> >> To: Subbaraya Sundeep Bhatta
>> >> Cc: balbi@ti.com; devicetree@vger.kernel.org; kishon@ti.com;
>> >> gregkh@linuxfoundation.org; linux-usb@vger.kernel.org; linux-
>> >> kernel@vger.kernel.org; Punnaiah Choudary Kalluri; Subbaraya Sundeep Bhatta;
>> >> linux-arm-kernel@lists.infradead.org
>> >> Subject: Re: [RFC PATCH 1/2] usb: doc: Add bindings for ULPI platform driver
>> >>
>> >> On Wed, Sep 23, 2015 at 06:24:01PM +0530, Subbaraya Sundeep Bhatta
>> >> wrote:
>> >> > This patch adds binding doc info for generic ULPI PHYs platform
>> >> > driver.
>> >> >
>> >> > Signed-off-by: Subbaraya Sundeep Bhatta <sbhatta@xilinx.com>
>> >> > ---
>> >> >  .../devicetree/bindings/usb/ulpi-platform-phy.txt  |   34
>> >> ++++++++++++++++++++
>> >> >  1 files changed, 34 insertions(+), 0 deletions(-)  create mode 100644
>> >> > Documentation/devicetree/bindings/usb/ulpi-platform-phy.txt
>> >> >
>> >> > diff --git
>> >> > a/Documentation/devicetree/bindings/usb/ulpi-platform-phy.txt
>> >> > b/Documentation/devicetree/bindings/usb/ulpi-platform-phy.txt
>> >> > new file mode 100644
>> >> > index 0000000..7b8cbb4
>> >> > --- /dev/null
>> >> > +++ b/Documentation/devicetree/bindings/usb/ulpi-platform-phy.txt
>> >> > @@ -0,0 +1,34 @@
>> >> > +Platform driver for generic ULPI PHYs
>> >> > +
>> >> > +Required properties:
>> >> > +- compatible               : Should be "ulpi-phy"
>> >> > +- reg                      : Physical base address and size of the USB
>> >> > +                     controller registers map to which this PHY
>> >> > +                     is connected.
>> >> > +- view-port                : Should contain viewport register offset of the
>> >> > +                     USB controller to which this PHY is connected Optional
>> >> > +properties:
>> >> > +- drv-vbus         : required if turning VBUS on/off has to be driven
>> >> > +                     by writing to PHY. This feature depends on board
>> >> > +                     design.
>> >> > +
>> >> > +Example:
>> >> > +Below example shows the PHY binding for Chipidea USB controller which
>> >> > +has ulpi viewport register at 0x0170
>> >> > +
>> >> > +           usb_phy0: phy0 {
>> >> > +                   compatible = "ulpi-phy";
>> >> > +                   reg = <0xe0002000 0x1000>;
>> >> > +                   view-port = <0x0170>;
>> >> > +                   drv-vbus;
>> >> > +           };
>> >> > +
>> >> > +           usb0: usb@e0002000 {
>> >> > +                        compatible = "chipidea,usb2";
>> >> > +                        interrupt-parent = <&intc>;
>> >> > +                        interrupts = <0 21 4>;
>> >> > +                        reg = <0xe0002000 0x1000>;
>> >>
>> >> Although just call devm_ioremap twice for the same register region does not
>> >> cause any errors, I am not sure if it will has other potential problems. Cc: arm
>> >> list.
>> >
>> > Yes Peter I was also in doubt to call devm_ioremap twice for same register region.
>> > devm_ioremap_resource complained hence modified to devm_ioremap. Thanks for
>> > adding arm-list.
>>
>> Don't put overlapping resources in the DT. Having 2 drivers accessing
>> the same registers is not a clean or safe design.
>
> thanks, saves me the trouble of saying the same thing.
>
> Bottom line, if devm_ioremap_resource() fails, you're wrong. Just fix
> your driver and move on.

Any suggestions on how to move further?
Chipidea controller provides ulpi view port register for accessing the
usb phy registers. Now we want to add new driver for ulpi phy configuration
and that obviously it need of ulpi view port register access. So, sharing the
register space between these two drivers is necessary here.


Regards,
Punnaiah

>
> --
> balbi
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

Re: [RFC PATCH 1/2] usb: doc: Add bindings for ULPI platform driver punnaiah choudary kalluri <punnaia@xilinx.com> - 2015-10-11 13:20 +0200
  Re: [RFC PATCH 1/2] usb: doc: Add bindings for ULPI platform driver Kishon Vijay Abraham I <kishon@ti.com> - 2015-10-11 16:50 +0200

csiph-web