1Generic USB Device Properties 2 3Usually, we only use device tree for hard wired USB device. 4The reference binding doc is from: 5http://www.devicetree.org/open-firmware/bindings/usb/usb-1_0.ps 6 7Four types of device-tree nodes are defined: "host-controller nodes" 8representing USB host controllers, "device nodes" representing USB devices, 9"interface nodes" representing USB interfaces and "combined nodes" 10representing simple USB devices. 11 12A combined node shall be used instead of a device node and an interface node 13for devices of class 0 or 9 (hub) with a single configuration and a single 14interface. 15 16A "hub node" is a combined node or an interface node that represents a USB 17hub. 18 19 20Required properties for device nodes: 21- compatible: "usbVID,PID", where VID is the vendor id and PID the product id. 22 The textual representation of VID and PID shall be in lower case hexadecimal 23 with leading zeroes suppressed. The other compatible strings from the above 24 standard binding could also be used, but a device adhering to this binding 25 may leave out all except for "usbVID,PID". 26- reg: the number of the USB hub port or the USB host-controller port to which 27 this device is attached. The range is 1-255. 28 29 30Required properties for device nodes with interface nodes: 31- #address-cells: shall be 2 32- #size-cells: shall be 0 33 34 35Required properties for interface nodes: 36- compatible: "usbifVID,PID.configCN.IN", where VID is the vendor id, PID is 37 the product id, CN is the configuration value and IN is the interface 38 number. The textual representation of VID, PID, CN and IN shall be in lower 39 case hexadecimal with leading zeroes suppressed. The other compatible 40 strings from the above standard binding could also be used, but a device 41 adhering to this binding may leave out all except for 42 "usbifVID,PID.configCN.IN". 43- reg: the interface number and configuration value 44 45The configuration component is not included in the textual representation of 46an interface-node unit address for configuration 1. 47 48 49Required properties for combined nodes: 50- compatible: "usbVID,PID", where VID is the vendor id and PID the product id. 51 The textual representation of VID and PID shall be in lower case hexadecimal 52 with leading zeroes suppressed. The other compatible strings from the above 53 standard binding could also be used, but a device adhering to this binding 54 may leave out all except for "usbVID,PID". 55- reg: the number of the USB hub port or the USB host-controller port to which 56 this device is attached. The range is 1-255. 57 58 59Required properties for hub nodes with device nodes: 60- #address-cells: shall be 1 61- #size-cells: shall be 0 62 63 64Required properties for host-controller nodes with device nodes: 65- #address-cells: shall be 1 66- #size-cells: shall be 0 67 68 69Example: 70 71&usb1 { /* host controller */ 72 #address-cells = <1>; 73 #size-cells = <0>; 74 75 hub@1 { /* hub connected to port 1 */ 76 compatible = "usb5e3,608"; 77 reg = <1>; 78 }; 79 80 device@2 { /* device connected to port 2 */ 81 compatible = "usb123,4567"; 82 reg = <2>; 83 }; 84 85 device@3 { /* device connected to port 3 */ 86 compatible = "usb123,abcd"; 87 reg = <3>; 88 89 #address-cells = <2>; 90 #size-cells = <0>; 91 92 interface@0 { /* interface 0 of configuration 1 */ 93 compatible = "usbif123,abcd.config1.0"; 94 reg = <0 1>; 95 }; 96 97 interface@0,2 { /* interface 0 of configuration 2 */ 98 compatible = "usbif123,abcd.config2.0"; 99 reg = <0 2>; 100 }; 101 }; 102}; 103