dm: usb: dts: sandbox: Add some sample USB devices to sandbox
authorSimon Glass <sjg@chromium.org>
Wed, 25 Mar 2015 18:22:42 +0000 (12:22 -0600)
committerSimon Glass <sjg@chromium.org>
Sat, 18 Apr 2015 17:11:27 +0000 (11:11 -0600)
These allow basic testing of the USB functionality within sandbox.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Marek Vasut <marex@denx.de>
arch/sandbox/dts/sandbox.dts

index 5fa1272..efa2097 100644 (file)
@@ -1,5 +1,7 @@
 /dts-v1/;
 
+#define USB_CLASS_HUB                  9
+
 / {
        #address-cells = <1>;
        #size-cells = <1>;
                reg = <0x90000000 0x1000>;
                host-raw-interface = "lo";
        };
+
+       usb@0 {
+               compatible = "sandbox,usb";
+               status = "disabled";
+               hub {
+                       compatible = "sandbox,usb-hub";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       flash-stick {
+                               reg = <0>;
+                               compatible = "sandbox,usb-flash";
+                       };
+               };
+       };
+
+       usb@1 {
+               compatible = "sandbox,usb";
+               hub {
+                       compatible = "usb-hub";
+                       usb,device-class = <USB_CLASS_HUB>;
+                       hub-emul {
+                               compatible = "sandbox,usb-hub";
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               flash-stick {
+                                       reg = <0>;
+                                       compatible = "sandbox,usb-flash";
+                                       sandbox,filepath = "flash.bin";
+                               };
+                       };
+               };
+       };
+
+       usb@2 {
+               compatible = "sandbox,usb";
+               status = "disabled";
+       };
+
 };
 
 #include "cros-ec-keyboard.dtsi"