USB support for device tree

Pavan Kondeti pkondeti at codeaurora.org
Sat Nov 5 14:08:07 EST 2011


Hi

On 11/4/2011 11:42 PM, Grant Likely wrote:
> It is not legal for two device nodes to have overlapping 'reg' regions
> (unless one is a child of the other), so by extension it is not okay
> for two nodes to have the same 'name at addr'.  However, it is perfectly
> acceptable and encouraged for two nodes at different addresses to
> start with the same value for 'name@'.  This is called the generic
> names recommended practice, and it can also be found in the ePAPR
> documentation on node names.
> 
> If you want to have both host and device drivers bound to a single
> device for OTG mode, then you should use a wrapper driver in Linux
> that binds to the single node and instantiates each of the interfaces
> as a child device.  For an example take a look at
> drivers/usb/host/fsl-mph-dr-of.c.

Currently we have two platform devices one for OTG and one for host,
corresponding drivers for them. If I would like to keep it this way, the
device tree becomes something like below

hsusb0-otg: usb-otg at 0xa6000000 {
	compatible = "qcom,hsusb-otg";
        ---
};

hsusb0-device: usb-gadget at 0xa6000000 {
	compatible = "qcom,hsusb-device";
        ---
};

hsusb0-host: usb at 0xa6000000 {
	compatible = "qcom,hsusb-host", "usb-ehci";
        ---
};

Are you okay with above naming convention?

-- 
Sent by a consultant of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.


More information about the devicetree-discuss mailing list