diff options
author | Simon Glass <sjg@chromium.org> | 2015-03-25 12:23:05 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2015-04-18 11:11:30 -0600 |
commit | e00cb2232b0e6c2f41f49f3535a7874067a60c3a (patch) | |
tree | b99b179bbb759b99a172201784b9086704ec1226 /test/dm/test.dts | |
parent | 57f54d55bdf7a21034182cf213c1084df214d98c (diff) | |
download | u-boot-e00cb2232b0e6c2f41f49f3535a7874067a60c3a.tar.gz |
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.dts | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/test/dm/test.dts b/test/dm/test.dts index 0ab0916858..d0c40be6b0 100644 --- a/test/dm/test.dts +++ b/test/dm/test.dts @@ -20,6 +20,9 @@ testfdt8 = "/a-test"; eth0 = "/eth@10002000"; eth5 = ð_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"; + }; + }; |