]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
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 5fa12720039272f0b2ee84a55129df5d7227bd2c..efa2097b2d67c33f68d8f70c11754fb09af3ff72 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"