* USB device nodes in device tree
@ 2015-03-30 15:26 Valentin Longchamp
[not found] ` <55196B2D.7000204-SkAbAL50j+5BDgjK7y7TUQ@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Valentin Longchamp @ 2015-03-30 15:26 UTC (permalink / raw)
To: linux-usb-u79uwXL29TY76Z2rM5mHXA,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Hello,
We are currently developing a board with an USB MFD device (I2C and GPIOs are to
be supported). The device is soldered on the board and is the only one on the
bus, so the bus is not really "dynamic".
Since it's an USB device, it should be dynamically detected by the kernel and it
would not require a node in the board's DTS. However, I need to have the devices
which are "behind" the MFD USB device to be in the DTS (I2C bus topology, and
some of the GPIOs are to be used directly by some other DTS nodes as well).
Is there a way to add a node for USB device in a DTS ? Is there an available
example for this ?
Thank you
Valentin
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: USB device nodes in device tree
[not found] ` <55196B2D.7000204-SkAbAL50j+5BDgjK7y7TUQ@public.gmane.org>
@ 2015-03-30 19:35 ` Alan Stern
[not found] ` <Pine.LNX.4.44L0.1503301534050.1407-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Alan Stern @ 2015-03-30 19:35 UTC (permalink / raw)
To: Valentin Longchamp
Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
On Mon, 30 Mar 2015, Valentin Longchamp wrote:
> Hello,
>
> We are currently developing a board with an USB MFD device (I2C and GPIOs are to
> be supported). The device is soldered on the board and is the only one on the
> bus, so the bus is not really "dynamic".
>
> Since it's an USB device, it should be dynamically detected by the kernel and it
> would not require a node in the board's DTS. However, I need to have the devices
> which are "behind" the MFD USB device to be in the DTS (I2C bus topology, and
> some of the GPIOs are to be used directly by some other DTS nodes as well).
>
> Is there a way to add a node for USB device in a DTS ? Is there an available
> example for this ?
No, there is no way to do it as far as I know. The main problem is
that Device Tree is static whereas USB devices are dynamic.
Alan Stern
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: USB device nodes in device tree
[not found] ` <Pine.LNX.4.44L0.1503301534050.1407-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
@ 2015-04-04 19:08 ` Florian Fainelli
[not found] ` <552036B4.9050405-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Florian Fainelli @ 2015-04-04 19:08 UTC (permalink / raw)
To: Alan Stern, Valentin Longchamp
Cc: linux-usb-u79uwXL29TY76Z2rM5mHXA,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Le 30/03/2015 12:35, Alan Stern a écrit :
> On Mon, 30 Mar 2015, Valentin Longchamp wrote:
>
>> Hello,
>>
>> We are currently developing a board with an USB MFD device (I2C and GPIOs are to
>> be supported). The device is soldered on the board and is the only one on the
>> bus, so the bus is not really "dynamic".
>>
>> Since it's an USB device, it should be dynamically detected by the kernel and it
>> would not require a node in the board's DTS. However, I need to have the devices
>> which are "behind" the MFD USB device to be in the DTS (I2C bus topology, and
>> some of the GPIOs are to be used directly by some other DTS nodes as well).
>>
>> Is there a way to add a node for USB device in a DTS ? Is there an available
>> example for this ?
>
> No, there is no way to do it as far as I know. The main problem is
> that Device Tree is static whereas USB devices are dynamic.
The PCI(e) bus has the same problem, yet you can specify a PCI device
child node, and have a compatible string which will match the vendor
id/device id tuple, device class etc... such that you can use Device
Tree to add additional information not necessarily available in other
ways such as MAC addresses and similar.
Once the PCI bus is scanned, pci_device present in Device Tree get a
device_node pointer assigned.
I don't think there is anything doing this yet for USB devices, but
maybe that's something that should be there?
--
Florian
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: USB device nodes in device tree
[not found] ` <552036B4.9050405-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2015-04-04 23:48 ` Arnd Bergmann
0 siblings, 0 replies; 4+ messages in thread
From: Arnd Bergmann @ 2015-04-04 23:48 UTC (permalink / raw)
To: Florian Fainelli
Cc: Alan Stern, Valentin Longchamp, linux-usb-u79uwXL29TY76Z2rM5mHXA,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
On Saturday 04 April 2015 12:08:36 Florian Fainelli wrote:
> Le 30/03/2015 12:35, Alan Stern a écrit :
> > On Mon, 30 Mar 2015, Valentin Longchamp wrote:
> >
> >> Hello,
> >>
> >> We are currently developing a board with an USB MFD device (I2C and GPIOs are to
> >> be supported). The device is soldered on the board and is the only one on the
> >> bus, so the bus is not really "dynamic".
> >>
> >> Since it's an USB device, it should be dynamically detected by the kernel and it
> >> would not require a node in the board's DTS. However, I need to have the devices
> >> which are "behind" the MFD USB device to be in the DTS (I2C bus topology, and
> >> some of the GPIOs are to be used directly by some other DTS nodes as well).
> >>
> >> Is there a way to add a node for USB device in a DTS ? Is there an available
> >> example for this ?
> >
> > No, there is no way to do it as far as I know. The main problem is
> > that Device Tree is static whereas USB devices are dynamic.
>
> The PCI(e) bus has the same problem, yet you can specify a PCI device
> child node, and have a compatible string which will match the vendor
> id/device id tuple, device class etc... such that you can use Device
> Tree to add additional information not necessarily available in other
> ways such as MAC addresses and similar.
>
> Once the PCI bus is scanned, pci_device present in Device Tree get a
> device_node pointer assigned.
>
> I don't think there is anything doing this yet for USB devices, but
> maybe that's something that should be there?
>
It's come up a number of times. Basically we should support this, and I
believe it's relatively straightforward to do, someone just has to
implement it, but setting the of_node pointer for a USB device that
gets added and if that has a matching node.
There is a binding for USB that we never implemented in Linux. It
used to be at http://playground.sun.com/1275/bindings/usb/usb-1_0.ps
and I can send a copy to anyone that needs one. Most of the contents
are irrelevant unless you want to implement a full Open Firmware
rather than a flattened device tree.
The important parts are:
#address-cells: needs to be 1
#size-cells: needs to be 0
reg: 'The "reg" property for a device node shall consist of the number of the USB hub port or the USB host
controller port to which this USB device is attached. As specified in [2] section 11.11.2.1, port numbers range
from 1 to 255.'
Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-04-04 23:48 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-30 15:26 USB device nodes in device tree Valentin Longchamp
[not found] ` <55196B2D.7000204-SkAbAL50j+5BDgjK7y7TUQ@public.gmane.org>
2015-03-30 19:35 ` Alan Stern
[not found] ` <Pine.LNX.4.44L0.1503301534050.1407-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2015-04-04 19:08 ` Florian Fainelli
[not found] ` <552036B4.9050405-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-04-04 23:48 ` Arnd Bergmann
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).