summaryrefslogtreecommitdiff
path: root/test/dm/test.dts
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2015-03-25 12:23:05 -0600
committerSimon Glass <sjg@chromium.org>2015-04-18 11:11:30 -0600
commite00cb2232b0e6c2f41f49f3535a7874067a60c3a (patch)
treeb99b179bbb759b99a172201784b9086704ec1226 /test/dm/test.dts
parent57f54d55bdf7a21034182cf213c1084df214d98c (diff)
downloadu-boot-imx-e00cb2232b0e6c2f41f49f3535a7874067a60c3a.zip
u-boot-imx-e00cb2232b0e6c2f41f49f3535a7874067a60c3a.tar.gz
u-boot-imx-e00cb2232b0e6c2f41f49f3535a7874067a60c3a.tar.bz2
dm: usb: Add tests for the USB uclass
This adds a simple test for probing and a functional test using the flash stick emulator, which tests a large chunk of the USB stack. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Marek Vasut <marex@denx.de>
Diffstat (limited to 'test/dm/test.dts')
-rw-r--r--test/dm/test.dts41
1 files changed, 41 insertions, 0 deletions
diff --git a/test/dm/test.dts b/test/dm/test.dts
index 0ab0916..d0c40be 100644
--- a/test/dm/test.dts
+++ b/test/dm/test.dts
@@ -20,6 +20,9 @@
testfdt8 = "/a-test";
eth0 = "/eth@10002000";
eth5 = &eth_5;
+ usb0 = &usb_0;
+ usb1 = &usb_1;
+ usb2 = &usb_2;
};
uart0: serial {
@@ -186,4 +189,42 @@
fake-host-hwaddr = <0x00 0x00 0x66 0x44 0x22 0x22>;
};
+ usb_0: 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: usb@1 {
+ compatible = "sandbox,usb";
+ hub {
+ compatible = "usb-hub";
+ usb,device-class = <9>;
+ hub-emul {
+ compatible = "sandbox,usb-hub";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ flash-stick {
+ reg = <0>;
+ compatible = "sandbox,usb-flash";
+ sandbox,filepath = "testflash.bin";
+ };
+
+ };
+ };
+ };
+
+ usb_2: usb@2 {
+ compatible = "sandbox,usb";
+ status = "disabled";
+ };
+
};