devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* DT and probeable devices...
@ 2012-12-04 13:12 Ian Molton
       [not found] ` <50BDF6B5.7070306-4yDnlxn2s6sWdaTGBSpHTA@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Ian Molton @ 2012-12-04 13:12 UTC (permalink / raw)
  To: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org

Hi,

Im working on the OMAP5 pandaboard, and have run across a corner case.

the Ethernet is USB attached (and thus discovered / probed by the USB 
controller).

However it has a reset line thats a GPIO on the board.

Is DT supposed to be able to cover cases like this? If so, how?

Thanks!

-Ian

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: DT and probeable devices...
       [not found] ` <50BDF6B5.7070306-4yDnlxn2s6sWdaTGBSpHTA@public.gmane.org>
@ 2012-12-04 14:05   ` Grant Likely
       [not found]     ` <CACxGe6vDNu04HtHVLBS6fJ5GDVfGb1dD7fq-HPh+vmcc+FWxcQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Grant Likely @ 2012-12-04 14:05 UTC (permalink / raw)
  To: Ian Molton; +Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org

On Tue, Dec 4, 2012 at 1:12 PM, Ian Molton <ian.molton-4yDnlxn2s6sWdaTGBSpHTA@public.gmane.org> wrote:
> Hi,
>
> Im working on the OMAP5 pandaboard, and have run across a corner case.
>
> the Ethernet is USB attached (and thus discovered / probed by the USB
> controller).
>
> However it has a reset line thats a GPIO on the board.
>
> Is DT supposed to be able to cover cases like this? If so, how?

USB devices can be described as child nodes of the USB bus, though
they typically aren't because as you mention the USB bus is
discoverable. There is a binding for USB devices[1]. I don't believe
the kernel currently does anything to match USB dt nodes with a
usb_device, but it wouldn't be hard to hook up. You'd probably need a
hook in usb_new_device() to attach the of_node to the usb_device if it
exists. Then the driver would have the ability to query the DT node
for things like gpios.

[1] http://www.openfirmware.org/1275/bindings/usb/usb-1_0.ps

g.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: DT and probeable devices...
       [not found]     ` <CACxGe6vDNu04HtHVLBS6fJ5GDVfGb1dD7fq-HPh+vmcc+FWxcQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2012-12-04 23:04       ` David Gibson
  0 siblings, 0 replies; 3+ messages in thread
From: David Gibson @ 2012-12-04 23:04 UTC (permalink / raw)
  To: Grant Likely; +Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org

On Tue, Dec 04, 2012 at 02:05:33PM +0000, Grant Likely wrote:
> On Tue, Dec 4, 2012 at 1:12 PM, Ian Molton <ian.molton-4yDnlxn2s6sWdaTGBSpHTA@public.gmane.org> wrote:
> > Hi,
> >
> > Im working on the OMAP5 pandaboard, and have run across a corner case.
> >
> > the Ethernet is USB attached (and thus discovered / probed by the USB
> > controller).
> >
> > However it has a reset line thats a GPIO on the board.
> >
> > Is DT supposed to be able to cover cases like this? If so, how?
> 
> USB devices can be described as child nodes of the USB bus, though
> they typically aren't because as you mention the USB bus is
> discoverable. There is a binding for USB devices[1]. I don't believe
> the kernel currently does anything to match USB dt nodes with a
> usb_device, but it wouldn't be hard to hook up. You'd probably need a
> hook in usb_new_device() to attach the of_node to the usb_device if it
> exists. Then the driver would have the ability to query the DT node
> for things like gpios.
> 
> [1] http://www.openfirmware.org/1275/bindings/usb/usb-1_0.ps

In a more general sense, probeable devices with some small
non-probeable parts are not new, though I haven't heard of it with usb
before.  It is very common (or it was, maybe less now in PCIe days) to
have on-board PCI devices, which are probeable of course, but which
have their interrupts routed directly to the PIC in a non-probeable
way.  Standard DT practice in those cases is to include a DT node for
the device, although you can leave out most of the contents except,
obviously, for the interrupt routing information.

As Grant says, extending this practice for USB is conceptually
straightforward, though there will be a bit of implementation work.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-12-04 23:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-04 13:12 DT and probeable devices Ian Molton
     [not found] ` <50BDF6B5.7070306-4yDnlxn2s6sWdaTGBSpHTA@public.gmane.org>
2012-12-04 14:05   ` Grant Likely
     [not found]     ` <CACxGe6vDNu04HtHVLBS6fJ5GDVfGb1dD7fq-HPh+vmcc+FWxcQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-12-04 23:04       ` David Gibson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).