dm: test: usb: Add tests for the 'usb tree' command
Add tests that this command produces the right output, even when a rescan
results in a device disappearing from the bus.
Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/arch/sandbox/dts/test.dts b/arch/sandbox/dts/test.dts
index e2c4971..52749c0 100644
--- a/arch/sandbox/dts/test.dts
+++ b/arch/sandbox/dts/test.dts
@@ -307,12 +307,24 @@
compatible = "sandbox,usb-hub";
#address-cells = <1>;
#size-cells = <0>;
- flash-stick {
+ flash-stick@0 {
reg = <0>;
compatible = "sandbox,usb-flash";
sandbox,filepath = "testflash.bin";
};
+ flash-stick@1 {
+ reg = <1>;
+ compatible = "sandbox,usb-flash";
+ sandbox,filepath = "testflash1.bin";
+ };
+
+ flash-stick@2 {
+ reg = <2>;
+ compatible = "sandbox,usb-flash";
+ sandbox,filepath = "testflash2.bin";
+ };
+
};
};
};