Skip to contentSkip to conversation

ARM: tegra: enable USB device mode port on Dalmore

PATCH New Stephen Warren 2 participants 3 messages Feb 11, 2016 – Feb 15, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: tegra: enable USB device mode port on Dalmore

From: Stephen Warren <[email protected]>

This allows U-Boot to expose UMS and DFU protocols on this port in device mode, or to act as a USB host on the port, using an "OTG" (micro-B to female A host) cable.

---
 arch/arm/dts/tegra114-dalmore.dts | 9 ++++++++-
 include/configs/dalmore.h         | 2 ++
 2 files changed, 10 insertions(+), 1 deletion(-)
arch/arm/dts/tegra114-dalmore.dts +8 -1
index 51ff266d760a..49195c35964a 100644
@@ -18,7 +18,8 @@
 		i2c4 = "/i2c at 7000c700";
 		sdhci0 = "/sdhci at 78000600";
 		sdhci1 = "/sdhci at 78000400";
-		usb0 = "/usb at 7d008000";
+		usb0 = "/usb at 7d000000";
+		usb1 = "/usb at 7d008000";
 	};
 
 	memory {
@@ -67,6 +68,12 @@
 		status = "okay";
 	};
 
+	usb at 7d000000 {
+		status = "okay";
+		dr_mode = "otg";
+		nvidia,vbus-gpio = <&gpio TEGRA_GPIO(N, 4) GPIO_ACTIVE_HIGH>;
+	};
+
 	usb at 7d008000 {
 		nvidia,vbus-gpio = <&gpio TEGRA_GPIO(K, 6) GPIO_ACTIVE_HIGH>;
 		status = "okay";
include/configs/dalmore.h +2 -0
index fdfda6b90348..917573da4368 100644
@@ -48,6 +48,7 @@
 /* USB Host support */
 #define CONFIG_USB_EHCI
 #define CONFIG_USB_EHCI_TEGRA
+#define CONFIG_USB_MAX_CONTROLLER_COUNT	2
 #define CONFIG_USB_STORAGE
 #define CONFIG_CMD_USB
 
@@ -58,6 +59,7 @@
 /* General networking support */
 #define CONFIG_CMD_DHCP
 
+#include "tegra-common-usb-gadget.h"
 #include "tegra-common-post.h"
 
 #endif /* __CONFIG_H */
Signature · 1 line
2.7.0
#1 lore raw

PATCH 1/1 ARM: tegra: enable USB device mode port on Dalmore

Hi Stephen,

Quoted 44 lines · Stephen Warren

From: Stephen Warren <[email protected]>

This allows U-Boot to expose UMS and DFU protocols on this port in device mode, or to act as a USB host on the port, using an "OTG" (micro-B to female A host) cable.

---
 arch/arm/dts/tegra114-dalmore.dts | 9 ++++++++-
 include/configs/dalmore.h         | 2 ++
 2 files changed, 10 insertions(+), 1 deletion(-)
arch/arm/dts/tegra114-dalmore.dts +8 -1
index 51ff266d760a..49195c35964a 100644
@@ -18,7 +18,8 @@
                i2c4 = "/i2c at 7000c700";
                sdhci0 = "/sdhci at 78000600";
                sdhci1 = "/sdhci at 78000400";
-               usb0 = "/usb at 7d008000";
+               usb0 = "/usb at 7d000000";
+               usb1 = "/usb at 7d008000";
        };
 
        memory {
@@ -67,6 +68,12 @@
                status = "okay";
        };
 
+       usb at 7d000000 {
+               status = "okay";
+               dr_mode = "otg";
+               nvidia,vbus-gpio = <&gpio TEGRA_GPIO(N, 4) GPIO_ACTIVE_HIGH>;
+       };
+
        usb at 7d008000 {
                nvidia,vbus-gpio = <&gpio TEGRA_GPIO(K, 6) GPIO_ACTIVE_HIGH>;
                status = "okay";
include/configs/dalmore.h +0 -0
index fdfda6b90348..917573da4368 100644

include/configs/dalmore.h line 51

Quoted 4 lines
include/configs/dalmore.h +1 -0
@@ -48,6 +48,7 @@
 /* USB Host support */
 #define CONFIG_USB_EHCI
 #define CONFIG_USB_EHCI_TEGRA
+#define CONFIG_USB_MAX_CONTROLLER_COUNT        2

This shouldn't be needed with driver model (CONFIG_DM_USB). What effect does it have?

Quoted 12 lines
include/configs/dalmore.h +1 -1
 #define CONFIG_USB_STORAGE
 #define CONFIG_CMD_USB
 
@@ -58,6 +59,7 @@
 /* General networking support */
 #define CONFIG_CMD_DHCP
 
+#include "tegra-common-usb-gadget.h"
 #include "tegra-common-post.h"
 
 #endif /* __CONFIG_H */
--
Quoted 2 lines

2.7.0

Regards,
Simon

#2 lore raw

PATCH 1/1 ARM: tegra: enable USB device mode port on Dalmore

Quoted 9 lines · Simon Glass

Hi Stephen,

Quoted 5 lines · Stephen Warren

From: Stephen Warren <[email protected]>

This allows U-Boot to expose UMS and DFU protocols on this port in device mode, or to act as a USB host on the port, using an "OTG" (micro-B to female A host) cable.

Quoted 6 lines

include/configs/dalmore.h

Quoted 3 lines
include/configs/dalmore.h +1 -0
 
+#define CONFIG_USB_MAX_CONTROLLER_COUNT        2

This shouldn't be needed with driver model (CONFIG_DM_USB). What effect does it have?

It might have no effect. However, I added it to keep the content of all Tegra config headers identical (at least those that enable USB device mode w.r.t. this line). Perhaps this line should be removed from all the other headers too?