Skip to contentSkip to conversation

Enable USB3 for OMAP5

PATCH Superseded Felipe Balbi 3 participants 8 messages Jul 15, 2013 – Jul 16, 2013

Subsystems (5)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover Enable USB3 for OMAP5

Hi,

I have just tested all these patches on OMAP5 uEVM and it's working fine.

| [1141397.137900] usb 10-2: USB disconnect, device number 3
| [1142023.549485] usb 10-2: new SuperSpeed USB device number 4 using xhci_hcd
| [1142024.185535] usb 10-2: Parent hub missing LPM exit latency info.  Power management will be impacted.
| [1142025.458738] usb 10-2: New USB device found, idVendor=0525, idProduct=a4a0
| [1142025.458744] usb 10-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
| [1142025.458748] usb 10-2: Product: Gadget Zero
| [1142025.458752] usb 10-2: Manufacturer: Linux 3.11.0-rc1-00068-g6df6cd3-dirty with dwc3-gadget
| [1142025.458755] usb 10-2: SerialNumber: 0123456789.0123456789.0123456789
| [1142025.866540] usbtest 10-2:3.0: Linux gadget zero
| [1142025.866547] usbtest 10-2:3.0: super-speed {control in/out bulk-in bulk-out} tests (+alt)

please consider applying them.

Benoit Cousson (1):
arm: omap5: hwmod: add missing ocp2scp hwmod data

Felipe Balbi (3):
arm: omap5: dts: fix reg property size
arm: omap5: dts: add palmas-usb node
arm: omap2plus_defconfig: enable dwc3 and dependencies

 arch/arm/boot/dts/omap5-uevm.dts           | 10 +++++++
 arch/arm/boot/dts/omap5.dtsi               |  9 +++---
 arch/arm/configs/omap2plus_defconfig       |  9 ++++++
 arch/arm/mach-omap2/omap_hwmod_54xx_data.c | 45 ++++++++++++++++++++++++++++++
 4 files changed, 69 insertions(+), 4 deletions(-)
Signature · 1 line
1.8.2.1
#1 lore raw

PATCH 1/4 arm: omap5: dts: fix reg property size

USB3 block has a 64KiB space, another 64KiB is
used for the wrapper.

Without this change, resource_size() will get
confused and driver won't probe because size
will be negative.

---
 arch/arm/boot/dts/omap5.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/boot/dts/omap5.dtsi +2 -2
index e643620..5c99f19 100644
@@ -637,7 +637,7 @@
 		omap_dwc3 at 4a020000 {
 			compatible = "ti,dwc3";
 			ti,hwmods = "usb_otg_ss";
-			reg = <0x4a020000 0x1000>;
+			reg = <0x4a020000 0x10000>;
 			interrupts = <GIC_SPI 93 IRQ_TYPE_LEVEL_HIGH>;
 			#address-cells = <1>;
 			#size-cells = <1>;
@@ -645,7 +645,7 @@
 			ranges;
 			dwc3 at 4a030000 {
 				compatible = "synopsys,dwc3";
-				reg = <0x4a030000 0x1000>;
+				reg = <0x4a030000 0x10000>;
 				interrupts = <GIC_SPI 92 IRQ_TYPE_LEVEL_HIGH>;
 				usb-phy = <&usb2_phy>, <&usb3_phy>;
 				tx-fifo-resize;
Signature · 1 line
1.8.2.1
#2 lore raw

PATCH 2/4 arm: omap5: hwmod: add missing ocp2scp hwmod data

In reply to Felipe Balbi

From: Benoit Cousson <[email protected]>

without that hwmod data, USB3 will not in OMAP5 boards.

While at that, also fix DTS data to pass reg property, otherwise driver won't probe.

---
 arch/arm/boot/dts/omap5.dtsi               |  3 +-
 arch/arm/mach-omap2/omap_hwmod_54xx_data.c | 45 ++++++++++++++++++++++++++++++
 2 files changed, 47 insertions(+), 1 deletion(-)
arch/arm/boot/dts/omap5.dtsi +2 -1
index 5c99f19..4e41409 100644
@@ -652,10 +652,11 @@
 			};
 		};
 
-		ocp2scp {
+		ocp2scp at 4a080000 {
 			compatible = "ti,omap-ocp2scp";
 			#address-cells = <1>;
 			#size-cells = <1>;
+			reg = <0x4a080000 0x20>;
 			ranges;
 			ti,hwmods = "ocp2scp1";
 			usb2_phy: usb2phy at 4a084000 {
arch/arm/mach-omap2/omap_hwmod_54xx_data.c +45 -0

63 lines not on this page · raw message

Signature · 1 line
1.8.2.1
#3 lore raw

PATCH 2/4 arm: omap5: hwmod: add missing ocp2scp hwmod data

Hi,

Quoted 19 lines · Felipe Balbi

From: Benoit Cousson <[email protected]>

without that hwmod data, USB3 will not in OMAP5 boards.

While at that, also fix DTS data to pass reg property, otherwise driver won't probe.

---
 arch/arm/boot/dts/omap5.dtsi               |  3 +-
 arch/arm/mach-omap2/omap_hwmod_54xx_data.c | 45 ++++++++++++++++++++++++++++++
 2 files changed, 47 insertions(+), 1 deletion(-)
arch/arm/boot/dts/omap5.dtsi +0 -0
index 5c99f19..4e41409 100644

arch/arm/boot/dts/omap5.dtsi line 655

Quoted 5 lines
arch/arm/boot/dts/omap5.dtsi +1 -1
@@ -652,10 +652,11 @@
 			};
 		};
 
-		ocp2scp {
+		ocp2scp at 4a080000 {

While at that, can we also name it ocp2scp1 since we have 3 instances of ocp2scp and it'll conflict when we want to add it for SATA and PCIE.

Thanks
Kishon

#4 lore raw

PATCH 2/4 arm: omap5: hwmod: add missing ocp2scp hwmod data

Quoted 25 lines · Kishon Vijay Abraham I

Hi,

Quoted 22 lines · Felipe Balbi

From: Benoit Cousson <[email protected]>

without that hwmod data, USB3 will not in OMAP5 boards.

While at that, also fix DTS data to pass reg property, otherwise driver won't probe.

---
 arch/arm/boot/dts/omap5.dtsi               |  3 +-
 arch/arm/mach-omap2/omap_hwmod_54xx_data.c | 45 ++++++++++++++++++++++++++++++
 2 files changed, 47 insertions(+), 1 deletion(-)
arch/arm/boot/dts/omap5.dtsi +0 -0
index 5c99f19..4e41409 100644
@@ -652,10 +652,11 @@
 			};
 		};
 
Quoted 5 lines

arch/arm/boot/dts/omap5.dtsi line 655

Quoted 2 lines
arch/arm/boot/dts/omap5.dtsi +1 -1
-		ocp2scp {
+		ocp2scp at 4a080000 {

While at that, can we also name it ocp2scp1 since we have 3 instances of ocp2scp and it'll conflict when we want to add it for SATA and PCIE.

Tony/Benoit, you want that in same patch or as a separate patch altogether ?

Signature · 8 lines
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130715/a33075f5/attachment.sig>
maintainer
#5 lore raw

PATCH 2/4 arm: omap5: hwmod: add missing ocp2scp hwmod data

Quoted 26 lines · Felipe Balbi
Quoted 25 lines · Kishon Vijay Abraham I

Hi,

Quoted 22 lines · Felipe Balbi

From: Benoit Cousson <[email protected]>

without that hwmod data, USB3 will not in OMAP5 boards.

While at that, also fix DTS data to pass reg property, otherwise driver won't probe.

---
 arch/arm/boot/dts/omap5.dtsi               |  3 +-
 arch/arm/mach-omap2/omap_hwmod_54xx_data.c | 45 ++++++++++++++++++++++++++++++
 2 files changed, 47 insertions(+), 1 deletion(-)
arch/arm/boot/dts/omap5.dtsi +0 -0
index 5c99f19..4e41409 100644
@@ -652,10 +652,11 @@
 			};
 		};
 
Quoted 5 lines
Quoted 5 lines

arch/arm/boot/dts/omap5.dtsi line 655

Quoted 2 lines
arch/arm/boot/dts/omap5.dtsi +1 -1
-		ocp2scp {
+		ocp2scp at 4a080000 {

While at that, can we also name it ocp2scp1 since we have 3 instances of ocp2scp and it'll conflict when we want to add it for SATA and PCIE.

Hmm the differentiatior is the name, so ocp2scp at 4a800000 should be enough and actually follows the naming standars where the name should describe the type. I guess it could be just ocp at 4a080000 or scp at 4a080000 but I think it translates both ways, so ocp2scp is probably pretty good.

Quoted 2 lines

Tony/Benoit, you want that in same patch or as a separate patch altogether ?

Please do the .dts changes in separate patches as they should get merged separately for most part.

Regards,

Tony

#6 lore raw

PATCH 3/4 arm: omap5: dts: add palmas-usb node

In reply to Felipe Balbi

Without this node, there will be no palmas
driver to notify dwc3 that a cable has
been connected and, without that, dwc3
will never initialize.

---
 arch/arm/boot/dts/omap5-uevm.dts | 10 ++++++++++
 arch/arm/boot/dts/omap5.dtsi     |  2 +-
 2 files changed, 11 insertions(+), 1 deletion(-)
arch/arm/boot/dts/omap5-uevm.dts +10 -0
index 08b7267..badceb8 100644
@@ -272,6 +272,11 @@
 		interrupt-controller;
 		#interrupt-cells = <2>;
 
+		extcon_usb3: palmas_usb {
+			compatible = "ti,palmas-usb";
+			ti,wakeup;
+		};
+
 		palmas_pmic {
 			compatible = "ti,palmas-pmic";
 			interrupt-parent = <&palmas>;
@@ -450,6 +455,11 @@
 	phys = <0 &hsusb2_phy &hsusb3_phy>;
 };
 
+&usb3 {
+	extcon = <&extcon_usb3>;
+	vbus-supply = <&smps10_reg>;
+};
+
 &mcspi1 {
 
 };
arch/arm/boot/dts/omap5.dtsi +1 -1
index 4e41409..1659246 100644
@@ -634,7 +634,7 @@
 			ti,type = <2>;
 		};
 
-		omap_dwc3 at 4a020000 {
+		usb3: omap_dwc3 at 4a020000 {
 			compatible = "ti,dwc3";
 			ti,hwmods = "usb_otg_ss";
 			reg = <0x4a020000 0x10000>;
Signature · 1 line
1.8.2.1
#7 lore raw

PATCH 4/4 arm: omap2plus_defconfig: enable dwc3 and dependencies

In reply to Felipe Balbi

DWC3 enables USB3 functionality for OMAP5 boards, it's safe to enable those drivers in omap2plus_defconfig.

---
 arch/arm/configs/omap2plus_defconfig | 9 +++++++++
 1 file changed, 9 insertions(+)
arch/arm/configs/omap2plus_defconfig +9 -0
index 5339e6a..aed3cce 100644
@@ -81,6 +81,7 @@ CONFIG_CMA=y
 CONFIG_CONNECTOR=y
 CONFIG_DEVTMPFS=y
 CONFIG_DEVTMPFS_MOUNT=y
+CONFIG_OMAP_OCP2SCP=y
 CONFIG_MTD=y
 CONFIG_MTD_CMDLINE_PARTS=y
 CONFIG_MTD_CHAR=y
@@ -167,9 +168,11 @@ CONFIG_THERMAL_GOV_USER_SPACE=y
 CONFIG_CPU_THERMAL=y
 CONFIG_OMAP_WATCHDOG=y
 CONFIG_TWL4030_WATCHDOG=y
+CONFIG_MFD_PALMAS=y
 CONFIG_MFD_TPS65217=y
 CONFIG_MFD_TPS65910=y
 CONFIG_TWL6040_CORE=y
+CONFIG_REGULATOR_PALMAS=y
 CONFIG_REGULATOR_TWL4030=y
 CONFIG_REGULATOR_TPS65023=y
 CONFIG_REGULATOR_TPS6507X=y
@@ -222,10 +225,14 @@ CONFIG_USB_MON=y
 CONFIG_USB_WDM=y
 CONFIG_USB_STORAGE=y
 CONFIG_USB_LIBUSUAL=y
+CONFIG_USB_DWC3=m
+CONFIG_USB_DWC3_OMAP=m
 CONFIG_USB_TEST=y
 CONFIG_USB_PHY=y
 CONFIG_NOP_USB_XCEIV=y
 CONFIG_USB_GADGET=y
+CONFIG_OMAP_USB2=y
+CONFIG_OMAP_USB3=y
 CONFIG_USB_GADGET_DEBUG=y
 CONFIG_USB_GADGET_DEBUG_FILES=y
 CONFIG_USB_GADGET_DEBUG_FS=y
@@ -258,6 +265,8 @@ CONFIG_TI_THERMAL=y
 CONFIG_OMAP4_THERMAL=y
 CONFIG_OMAP5_THERMAL=y
 CONFIG_DRA752_THERMAL=y
+CONFIG_EXTCON=y
+CONFIG_EXTCON_PALMAS=y
 CONFIG_EXT2_FS=y
 CONFIG_EXT3_FS=y
 # CONFIG_EXT3_FS_XATTR is not set
Signature · 1 line
1.8.2.1