public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [Patch v7 3/3] usb: dwc3: qcom: Add device tree binding
Date: Wed, 02 Jul 2014 14:48:17 +0200	[thread overview]
Message-ID: <4545008.qD8N1qWmNz@wuerfel> (raw)
In-Reply-To: <1404290605.3622.6.camel@iivanov-dev>

On Wednesday 02 July 2014 11:43:25 Ivan T. Ivanov wrote:
> > > <snip>
> > >
> > >> > +
> > >> > +                       ranges;
> > >> > +
> > >> > +                       status = "disabled";
> > >> > +
> > >> > +                       dwc3 at 11000000 {
> > >> > +                               compatible = "snps,dwc3";
> > >>
> > >> This sub-node is just wrong. Why can't you have a single node with '
> > >> "qcom,dwc3", "snps,dwc3" ' for the compatible property? All you are
> > >> adding here is clocks. Does the Synopsys block have no clocks?
> > >>
> > >> I guess this is copied from other broken dwc3 bindings... That doesn't
> > >> mean you have to copy it.
> > >
> > > The dwc3 core does not deal with clocks.  That is why everyone has a wrapper.
> > > That, in addition to pm, has to be handled from the wrapper.  That's my take
> > > anyway.  I am sure Felipe can speak more to this.
> > 
> > That is a Linux driver issue which is irrelevant to the binding.
> 
> DWC3 IP core from Synopsys is the same across SoC's (OMAP, Exynos..),
> vendors are adding glue IP to provide necessary clocks and voltages. 
> I think that the DT bindings properly reflect this fact.

Not really. The proper way to do this is to have a single node that
lists multiple compatible strings from the most specific (per SoC variant)
to most generic (the underlying IP core) and have all properties in it.

We have seen many cases before where it later turned out that whatever
feature people thought was SoC specific actually was common to all
of them and that we later want to change the code to handle it in a
common way, and to reflect it in the common binding. The clocks that
Rob mentioned are one example of that.

If you have a binding that separates one IP block into two device nodes,
you cannot later adapt the common driver to be more generic and handle
all sorts of SoCs. See the usb-ehci.txt for an example: it started out
really simple but the generic driver has been extended multiple times
to the point where it handles a lot of SoCs by default.

	Arnd

  reply	other threads:[~2014-07-02 12:48 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-30 16:03 [Patch v7 0/3] DWC3 USB support for Qualcomm platform Andy Gross
2014-06-30 16:03 ` [Patch v7 1/3] usb: dwc3: Add Qualcomm DWC3 glue layer driver Andy Gross
2014-06-30 16:52   ` Felipe Balbi
2014-07-18  2:10   ` Jingoo Han
2014-06-30 16:03 ` [Patch v7 2/3] usb: phy: Add Qualcomm DWC3 HS/SS PHY drivers Andy Gross
2014-06-30 17:00   ` Felipe Balbi
     [not found]   ` <CA+neC=McWS8=iSi2XShJyvc85Aw4PSmF-osNpVgJv42d9or1WQ@mail.gmail.com>
2014-07-17 10:30     ` kiran.padwal at smartplayin.com
2014-07-17 18:28       ` Andy Gross
2014-06-30 16:03 ` [Patch v7 3/3] usb: dwc3: qcom: Add device tree binding Andy Gross
2014-06-30 17:37   ` Kumar Gala
2014-07-01  5:04   ` Rob Herring
2014-07-01 18:01     ` Andy Gross
2014-07-01 19:47       ` Rob Herring
2014-07-02  8:43         ` Ivan T. Ivanov
2014-07-02 12:48           ` Arnd Bergmann [this message]
2014-07-02 15:54             ` Felipe Balbi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4545008.qD8N1qWmNz@wuerfel \
    --to=arnd@arndb.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox