Skip to contentSkip to conversation

ARM: dts: OMAP2+: Enable USB dual-role on supported boards

PATCH In review Roger Quadros 2 participants 9 messages Jul 8, 2015 – Aug 4, 2015 Device tree bindings

lore
Share & tools
lore
#0 lore raw

v3 cover ARM: dts: OMAP2+: Enable USB dual-role on supported boards

Hi,

Enables dual-role feaure on supported boards.

Depends on
[1] - core USB DRD support - http://thread.gmane.org/gmane.linux.kernel/1991413
[2] - dwc3 DRD support - http://thread.gmane.org/gmane.linux.usb.general/127890

Tested on am437x-gp-evm and dra7-evm.

cheers,
-roger

Felipe Balbi (1):
ARM: dts: am4372: Add named interrupt property for dwc3

Roger Quadros (4):
ARM: dts: omap5: Add named interrupt property for dwc3
ARM: dts: dra7: Add named interrupt property for dwc3
ARM: dts: dra7*-evm: Enable dual-role for usb1
ARM: dts: am43xx: Enable dual-role on USB1

 arch/arm/boot/dts/am4372.dtsi        | 14 ++++++++++++--
 arch/arm/boot/dts/am437x-gp-evm.dts  |  2 +-
 arch/arm/boot/dts/am437x-sk-evm.dts  |  2 +-
 arch/arm/boot/dts/am43x-epos-evm.dts |  2 +-
 arch/arm/boot/dts/dra7-evm.dts       |  2 +-
 arch/arm/boot/dts/dra7.dtsi          | 21 ++++++++++++++++++---
 arch/arm/boot/dts/dra72-evm.dts      |  2 +-
 arch/arm/boot/dts/dra74x.dtsi        |  7 ++++++-
 arch/arm/boot/dts/omap5.dtsi         |  7 ++++++-
 9 files changed, 47 insertions(+), 12 deletions(-)
Signature · 6 lines
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#1 lore raw

PATCH v3 1/5 ARM: dts: am4372: Add named interrupt property for dwc3

From: Felipe Balbi <[email protected]>

Add interrupt names so that the same can be used for OTG easily.

---
 arch/arm/boot/dts/am4372.dtsi | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)
arch/arm/boot/dts/am4372.dtsi +12 -2
index c80a3e2..3f68b27 100644
@@ -859,7 +859,12 @@
 			usb1: usb@48390000 {
 				compatible = "synopsys,dwc3";
 				reg = <0x48390000 0x10000>;
-				interrupts = <GIC_SPI 168 IRQ_TYPE_LEVEL_HIGH>;
+				interrupts = <GIC_SPI 168 IRQ_TYPE_LEVEL_HIGH>,
+					     <GIC_SPI 168 IRQ_TYPE_LEVEL_HIGH>,
+					     <GIC_SPI 172 IRQ_TYPE_LEVEL_HIGH>;
+				interrupt-names = "peripheral",
+						  "host",
+						  "otg";
 				phys = <&usb2_phy1>;
 				phy-names = "usb2-phy";
 				maximum-speed = "high-speed";
@@ -883,7 +888,12 @@
 			usb2: usb@483d0000 {
 				compatible = "synopsys,dwc3";
 				reg = <0x483d0000 0x10000>;
-				interrupts = <GIC_SPI 174 IRQ_TYPE_LEVEL_HIGH>;
+				interrupts = <GIC_SPI 174 IRQ_TYPE_LEVEL_HIGH>,
+					     <GIC_SPI 174 IRQ_TYPE_LEVEL_HIGH>,
+					     <GIC_SPI 178 IRQ_TYPE_LEVEL_HIGH>;
+				interrupt-names = "peripheral",
+						  "host",
+						  "otg";
 				phys = <&usb2_phy2>;
 				phy-names = "usb2-phy";
 				maximum-speed = "high-speed";
Signature · 1 line
2.1.4
#2 lore raw

PATCH v3 2/5 ARM: dts: omap5: Add named interrupt property for dwc3

In reply to Roger Quadros

Add interrupt names so that the same can be used for OTG easily.

---
 arch/arm/boot/dts/omap5.dtsi | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
arch/arm/boot/dts/omap5.dtsi +6 -1
index 7d24ae0..0b25c96 100644
@@ -870,7 +870,12 @@
 			dwc3@4a030000 {
 				compatible = "snps,dwc3";
 				reg = <0x4a030000 0x10000>;
-				interrupts = <GIC_SPI 92 IRQ_TYPE_LEVEL_HIGH>;
+				interrupts = <GIC_SPI 92 IRQ_TYPE_LEVEL_HIGH>,
+					     <GIC_SPI 92 IRQ_TYPE_LEVEL_HIGH>,
+					     <GIC_SPI 93 IRQ_TYPE_LEVEL_HIGH>;
+				interrupt-names = "peripheral",
+						  "host",
+						  "otg";
 				phys = <&usb2_phy>, <&usb3_phy>;
 				phy-names = "usb2-phy", "usb3-phy";
 				dr_mode = "peripheral";
Signature · 6 lines
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#3 lore raw

PATCH v3 3/5 ARM: dts: dra7: Add named interrupt property for dwc3

In reply to Roger Quadros

Add interrupt names so that the same can be used for OTG easily.

---
 arch/arm/boot/dts/dra7.dtsi   | 21 ++++++++++++++++++---
 arch/arm/boot/dts/dra74x.dtsi |  7 ++++++-
 2 files changed, 24 insertions(+), 4 deletions(-)
arch/arm/boot/dts/dra7.dtsi +18 -3
index 8f1e25b..6596baf 100644
@@ -1295,7 +1295,12 @@
 			usb1: usb@48890000 {
 				compatible = "snps,dwc3";
 				reg = <0x48890000 0x17000>;
-				interrupts = <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>;
+				interrupts = <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>,
+					     <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>,
+					     <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>;
+				interrupt-names = "peripheral",
+						  "host",
+						  "otg";
 				phys = <&usb2_phy1>, <&usb3_phy1>;
 				phy-names = "usb2-phy", "usb3-phy";
 				tx-fifo-resize;
@@ -1318,7 +1323,12 @@
 			usb2: usb@488d0000 {
 				compatible = "snps,dwc3";
 				reg = <0x488d0000 0x17000>;
-				interrupts = <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>;
+				interrupts = <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>,
+					     <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>,
+					     <GIC_SPI 87 IRQ_TYPE_LEVEL_HIGH>;
+				interrupt-names = "peripheral",
+						  "host",
+						  "otg";
 				phys = <&usb2_phy2>;
 				phy-names = "usb2-phy";
 				tx-fifo-resize;
@@ -1343,7 +1353,12 @@
 			usb3: usb@48910000 {
 				compatible = "snps,dwc3";
 				reg = <0x48910000 0x17000>;
-				interrupts = <GIC_SPI 88 IRQ_TYPE_LEVEL_HIGH>;
+				interrupts = <GIC_SPI 88 IRQ_TYPE_LEVEL_HIGH>,
+					     <GIC_SPI 88 IRQ_TYPE_LEVEL_HIGH>,
+					     <GIC_SPI 344 IRQ_TYPE_LEVEL_HIGH>;
+				interrupt-names = "peripheral",
+						  "host",
+						  "otg";
 				tx-fifo-resize;
 				maximum-speed = "high-speed";
 				dr_mode = "otg";
arch/arm/boot/dts/dra74x.dtsi +6 -1
index fa995d0..feea98e 100644
@@ -65,7 +65,12 @@
 			usb4: usb@48950000 {
 				compatible = "snps,dwc3";
 				reg = <0x48950000 0x17000>;
-				interrupts = <GIC_SPI 345 IRQ_TYPE_LEVEL_HIGH>;
+				interrupts = <GIC_SPI 345 IRQ_TYPE_LEVEL_HIGH>,
+					     <GIC_SPI 345 IRQ_TYPE_LEVEL_HIGH>,
+					     <GIC_SPI 346 IRQ_TYPE_LEVEL_HIGH>;
+				interrupt-names = "peripheral",
+						  "host",
+						  "otg";
 				tx-fifo-resize;
 				maximum-speed = "high-speed";
 				dr_mode = "otg";
Signature · 6 lines
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#4 lore raw

PATCH v3 4/5 ARM: dts: dra7*-evm: Enable dual-role for usb1

In reply to Roger Quadros

Now that we have dual-role support working at USB core, enable dual-role support for usb1 controller.

---
 arch/arm/boot/dts/dra7-evm.dts  | 2 +-
 arch/arm/boot/dts/dra72-evm.dts | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
arch/arm/boot/dts/dra7-evm.dts +1 -1
index aa46590..9daaf46 100644
@@ -550,7 +550,7 @@
 };
 
 &usb1 {
-	dr_mode = "peripheral";
+	dr_mode = "otg";
 	pinctrl-names = "default";
 	pinctrl-0 = <&usb1_pins>;
 };
arch/arm/boot/dts/dra72-evm.dts +1 -1
index 4e1b605..2ec0985 100644
@@ -476,7 +476,7 @@
 };
 
 &usb1 {
-	dr_mode = "peripheral";
+	dr_mode = "otg";
 	pinctrl-names = "default";
 	pinctrl-0 = <&usb1_pins>;
 };
Signature · 1 line
2.1.4
#5 lore raw

PATCH v3 5/5 ARM: dts: am43xx: Enable dual-role on USB1

In reply to Roger Quadros

USB1 port is micro-AB type and can function as peripheral as well as host. Enable dual-role mode for USB1.

---
 arch/arm/boot/dts/am437x-gp-evm.dts  | 2 +-
 arch/arm/boot/dts/am437x-sk-evm.dts  | 2 +-
 arch/arm/boot/dts/am43x-epos-evm.dts | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
arch/arm/boot/dts/am437x-gp-evm.dts +1 -1
index 84aa30c..eaae329 100644
@@ -613,7 +613,7 @@
 };
 
 &usb1 {
-	dr_mode = "peripheral";
+	dr_mode = "otg";
 	status = "okay";
 };
 
arch/arm/boot/dts/am437x-sk-evm.dts +1 -1
index c17097d..05d874c 100644
@@ -539,7 +539,7 @@
 };
 
 &usb1 {
-	dr_mode = "peripheral";
+	dr_mode = "otg";
 	status = "okay";
 	pinctrl-names = "default";
 	pinctrl-0 = <&usb1_pins>;
arch/arm/boot/dts/am43x-epos-evm.dts +1 -1
index 795d68a..30121a0 100644
@@ -585,7 +585,7 @@
 };
 
 &usb1 {
-	dr_mode = "peripheral";
+	dr_mode = "otg";
 	status = "okay";
 };
 
Signature · 1 line
2.1.4
#7 lore raw

Tony,

Quoted 5 lines · Tony Lindgren
Quoted 4 lines · Roger Quadros

Hi,

Enables dual-role feaure on supported boards.

Quoted 7 lines
Quoted 3 lines

Depends on
[1] - core USB DRD support - http://thread.gmane.org/gmane.linux.kernel/1991413
[2] - dwc3 DRD support - http://thread.gmane.org/gmane.linux.usb.general/127890

Is this series safe to apply separately actually? Adding the interrupts and the mode name may not be a problem without the related driver changes?

The interrupt changes (patches 1 to 3) should be fine but let's not add the otg mode change yet till we have the driver OTG patches in.

cheers,
-roger

#8 lore raw
Quoted 12 lines · Roger Quadros

Tony,

Quoted 9 lines · Tony Lindgren
Quoted 7 lines · Roger Quadros

Hi,

Enables dual-role feaure on supported boards.

Depends on
[1] - core USB DRD support - http://thread.gmane.org/gmane.linux.kernel/1991413
[2] - dwc3 DRD support - http://thread.gmane.org/gmane.linux.usb.general/127890

Quoted 6 lines
Quoted 3 lines

Is this series safe to apply separately actually? Adding the interrupts and the mode name may not be a problem without the related driver changes?

The interrupt changes (patches 1 to 3) should be fine but let's not add the otg mode change yet till we have the driver OTG patches in.

OK applying patches 1 - 3 into omap-for-v4.3/dt and ignoring the rest.

Please resend the rest once the dependencies are merged.

Regards,

Tony