DT and probeable devices...

Grant Likely grant.likely at secretlab.ca
Wed Dec 5 01:05:33 EST 2012


On Tue, Dec 4, 2012 at 1:12 PM, Ian Molton <ian.molton at codethink.co.uk> 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.


More information about the devicetree-discuss mailing list