From 4c3db41ace579d7e9eba7107bb3e74c1dc3f8e5c Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Wed, 25 Mar 2015 12:22:42 -0600 Subject: [PATCH] dm: usb: dts: sandbox: Add some sample USB devices to sandbox These allow basic testing of the USB functionality within sandbox. Signed-off-by: Simon Glass Reviewed-by: Marek Vasut --- arch/sandbox/dts/sandbox.dts | 40 ++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/arch/sandbox/dts/sandbox.dts b/arch/sandbox/dts/sandbox.dts index 5fa1272003..efa2097b2d 100644 --- a/arch/sandbox/dts/sandbox.dts +++ b/arch/sandbox/dts/sandbox.dts @@ -1,5 +1,7 @@ /dts-v1/; +#define USB_CLASS_HUB 9 + / { #address-cells = <1>; #size-cells = <1>; @@ -152,6 +154,44 @@ 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 = ; + 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" -- 2.39.5