[U-Boot] [PATCH v2 54/80] dm: usb: dts: sandbox: Add some sample USB devices to sandbox

Simon Glass sjg at chromium.org
Wed Mar 25 19:22:42 CET 2015


These allow basic testing of the USB functionality within sandbox.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

Changes in v2: None

 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 7d050d9..03b540c 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>;
@@ -219,4 +221,42 @@
 		reg = <0x90000000 0x1000>;
 		host-raw-interface = "lo";
 	};
+
+	usb at 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 at 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 at 2 {
+		compatible = "sandbox,usb";
+		status = "disabled";
+	};
+
 };
-- 
2.2.0.rc0.207.ga3a616c



More information about the U-Boot mailing list