Skip to contentSkip to conversation

ARM: dts: omap: add dt data for dwc3

PATCH In review Kishon Vijay Abraham I 4 participants 15 messages Jan 25, 2013 – Feb 5, 2013 Device tree bindings

lore
Share & tools
lore
#0 lore raw

v2 cover ARM: dts: omap: add dt data for dwc3

This patch series adds dt data to get dwc3 working in omap5.

Changes from v1:
* rename "ctrl_module" to "ctrl-module" and "usb_phy" to "usb-phy"

This patch series is developed on
git://github.com/rrnayak/linux.git omap5-3.8-rc4-base-palmas

This is the last series of the series of patches. I've kept everything in a single branch
git://gitorious.org/linux-usb/linux-usb.git omap5-with-palmas (changes up to 23b4dfa2ab7052569cd88acc6383c4b1a8e8a482)

Did enumeration testing on omap5 evm.

Kishon Vijay Abraham I (6):
ARM: dts: omap5: Add omap control usb data
ARM: dts: omap5: Add ocp2scp data
ARM: dts: omap5: Add omap-usb3 and omap-usb2 dt data
ARM: dts: omap5: add dwc3 omap dt data
ARM: dts: omap5: add dwc3 core dt data
ARM: dts: palmas: update dt data for palmas-usb

 arch/arm/boot/dts/omap5.dtsi  |   48 +++++++++++++++++++++++++++++++++++++++++
 arch/arm/boot/dts/palmas.dtsi |    4 ++--
 2 files changed, 50 insertions(+), 2 deletions(-)
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH v2 1/6 ARM: dts: omap5: Add omap control usb data

Add omap control usb data in omap5 device tree file. This will have the register address of registers to power on the USB2 PHY and USB3 PHY. The information for the node added here is available in Documentation/devicetree/bindings/usb/omap-usb.txt

---
 arch/arm/boot/dts/omap5.dtsi |    8 ++++++++
 1 file changed, 8 insertions(+)
arch/arm/boot/dts/omap5.dtsi +8 -0
index 7a78d1b..edc7464 100644
@@ -504,5 +504,13 @@
 			hw-caps-ll-interface;
 			hw-caps-temp-alert;
 		};
+
+		omap_control_usb: omap-control-usb at 4a002300 {
+			compatible = "ti,omap-control-usb";
+			reg = <0x4a002300 0x4>,
+			      <0x4a002370 0x4>;
+			reg-names = "control_dev_conf", "phy_power_usb";
+			ti,type = <2>;
+		};
 	};
 };
Signature · 1 line
1.7.9.5
#2 lore raw

PATCH v2 2/6 ARM: dts: omap5: Add ocp2scp data

In reply to Kishon Vijay Abraham I

Add ocp2scp data node in omap5 device tree file. The information for the node added here can be found @ Documentation/devicetree/bindings/bus/omap-ocp2scp.txt

---
 arch/arm/boot/dts/omap5.dtsi |    8 ++++++++
 1 file changed, 8 insertions(+)
arch/arm/boot/dts/omap5.dtsi +8 -0
index edc7464..d149330 100644
@@ -512,5 +512,13 @@
 			reg-names = "control_dev_conf", "phy_power_usb";
 			ti,type = <2>;
 		};
+
+		ocp2scp {
+			compatible = "ti,omap-ocp2scp";
+			#address-cells = <1>;
+			#size-cells = <1>;
+			ranges;
+			ti,hwmods = "ocp2scp1";
+		};
 	};
 };
Signature · 1 line
1.7.9.5
#3 lore raw

PATCH v2 3/6 ARM: dts: omap5: Add omap-usb3 and omap-usb2 dt data

In reply to Kishon Vijay Abraham I

Add omap-usb3 and omap-usb2 data node in omap5 device tree file. The information for the node added here is available @ Documentation/devicetree/bindings/usb/usb-phy.txt

---
 arch/arm/boot/dts/omap5.dtsi |   14 ++++++++++++++
 1 file changed, 14 insertions(+)
arch/arm/boot/dts/omap5.dtsi +14 -0
index d149330..5f59bf2 100644
@@ -519,6 +519,20 @@
 			#size-cells = <1>;
 			ranges;
 			ti,hwmods = "ocp2scp1";
+			usb2_phy: usb2phy at 4a084000 {
+				compatible = "ti,omap-usb2";
+				reg = <0x4a084000 0x7c>;
+				ctrl-module = <&omap_control_usb>;
+			};
+
+			usb3_phy: usb3phy at 4a084400 {
+				compatible = "ti,omap-usb3";
+				reg = <0x4a084400 0x80>,
+				      <0x4a084800 0x64>,
+				      <0x4a084c00 0x40>;
+				reg-names = "phy_rx", "phy_tx", "pll_ctrl";
+				ctrl-module = <&omap_control_usb>;
+			};
 		};
 	};
 };
Signature · 1 line
1.7.9.5
#4 lore raw

PATCH v2 4/6 ARM: dts: omap5: add dwc3 omap dt data

In reply to Kishon Vijay Abraham I

Add dwc3 omap glue data to the omap5 dt data file. The information about the dt node added here is available @ Documentation/devicetree/bindings/usb/omap-usb.txt

---
 arch/arm/boot/dts/omap5.dtsi |   11 +++++++++++
 1 file changed, 11 insertions(+)
arch/arm/boot/dts/omap5.dtsi +11 -0
index 5f59bf2..1703a72 100644
@@ -513,6 +513,17 @@
 			ti,type = <2>;
 		};
 
+		omap_dwc3 at 4a020000 {
+			compatible = "ti,dwc3";
+			ti,hwmods = "usb_otg_ss";
+			reg = <0x4a020000 0x1ff>;
+			interrupts = <0 93 4>;
+			#address-cells = <1>;
+			#size-cells = <1>;
+			utmi-mode = <2>;
+			ranges;
+		};
+
 		ocp2scp {
 			compatible = "ti,omap-ocp2scp";
 			#address-cells = <1>;
Signature · 1 line
1.7.9.5
#11 lore raw

PATCH v2 5/6 ARM: dts: omap5: add dwc3 core dt data

In reply to Kishon Vijay Abraham I

Add dwc3 core dt data as a subnode to dwc3 omap glue data in omap5 dt data file. The information for the entered data node is available @ Documentation/devicetree/bindings/usb/dwc3.txt

---
 arch/arm/boot/dts/omap5.dtsi |    7 +++++++
 1 file changed, 7 insertions(+)
arch/arm/boot/dts/omap5.dtsi +7 -0
index 1703a72..58118c4 100644
@@ -522,6 +522,13 @@
 			#size-cells = <1>;
 			utmi-mode = <2>;
 			ranges;
+			dwc3 at 4a030000 {
+				compatible = "synopsys,dwc3";
+				reg = <0x4a030000 0xcfff>;
+				interrupts = <0 92 4>;
+				usb-phy = <&usb2_phy>, <&usb3_phy>;
+				tx-fifo-resize;
+			};
 		};
 
 		ocp2scp {
Signature · 1 line
1.7.9.5
#13 lore raw

PATCH v2 6/6 ARM: dts: palmas: update dt data for palmas-usb

In reply to Kishon Vijay Abraham I

Update palmas-usb data node in palmas device tree file

---
 arch/arm/boot/dts/palmas.dtsi |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/boot/dts/palmas.dtsi +2 -2
index d20adb4..0cf39da 100644
@@ -318,8 +318,8 @@
 
 	palmas_usb {
 		compatible = "ti,palmas-usb";
-		ti,no_control_vbus = <0>;
-		ti,wakeup = <0>;
+		ti,wakeup;
+		vbus-supply = <&smps10_reg>;
 	};
 };
 
Signature · 1 line
1.7.9.5
#14 lore raw
In reply to Kishon Vijay Abraham I

Hi,

Quoted 8 lines · Kishon Vijay Abraham I

This patch series adds dt data to get dwc3 working in omap5.

Changes from v1:
* rename "ctrl_module" to "ctrl-module" and "usb_phy" to "usb-phy"

This patch series is developed on
git://github.com/rrnayak/linux.git omap5-3.8-rc4-base-palmas

Quoted 6 lines

This is the last series of the series of patches. I've kept everything in a single branch
git://gitorious.org/linux-usb/linux-usb.git omap5-with-palmas (changes up to 23b4dfa2ab7052569cd88acc6383c4b1a8e8a482)

Did enumeration testing on omap5 evm.

I have gone quickly through this series and it looks already to me:

Quoted 15 lines

Kishon Vijay Abraham I (6):
ARM: dts: omap5: Add omap control usb data
ARM: dts: omap5: Add ocp2scp data
ARM: dts: omap5: Add omap-usb3 and omap-usb2 dt data
ARM: dts: omap5: add dwc3 omap dt data
ARM: dts: omap5: add dwc3 core dt data
ARM: dts: palmas: update dt data for palmas-usb

 arch/arm/boot/dts/omap5.dtsi  |   48 +++++++++++++++++++++++++++++++++++++++++
 arch/arm/boot/dts/palmas.dtsi |    4 ++--
 2 files changed, 50 insertions(+), 2 deletions(-)
Signature · 1 line
1.7.9.5
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/20130125/31536255/attachment.sig>
#5 lore raw

Re: [PATCH v2 4/6] ARM: dts: omap5: add dwc3 omap dt data

In reply to Kishon Vijay Abraham I

Hello.

Quoted 14 lines · Kishon Vijay Abraham I

Add dwc3 omap glue data to the omap5 dt data file. The information about the dt node added here is available @ Documentation/devicetree/bindings/usb/omap-usb.txt

---
  arch/arm/boot/dts/omap5.dtsi |   11 +++++++++++
  1 file changed, 11 insertions(+)
arch/arm/boot/dts/omap5.dtsi +0 -0
index 5f59bf2..1703a72 100644

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

Quoted 7 lines
arch/arm/boot/dts/omap5.dtsi +4 -0
@@ -513,6 +513,17 @@
  			ti,type = <2>;
  		};
 
+		omap_dwc3 at 4a020000 {
+			compatible = "ti,dwc3";
+			ti,hwmods = "usb_otg_ss";
+			reg = <0x4a020000 0x1ff>;
    Shoudn't the "reg" length be 0x200 here? It's length, not limit.

WBR, Sergei

#12 lore raw

Re: [PATCH v2 5/6] ARM: dts: omap5: add dwc3 core dt data

In reply to Kishon Vijay Abraham I
Quoted 14 lines · Kishon Vijay Abraham I

Add dwc3 core dt data as a subnode to dwc3 omap glue data in omap5 dt data file. The information for the entered data node is available @ Documentation/devicetree/bindings/usb/dwc3.txt

---
  arch/arm/boot/dts/omap5.dtsi |    7 +++++++
  1 file changed, 7 insertions(+)
arch/arm/boot/dts/omap5.dtsi +0 -0
index 1703a72..58118c4 100644

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

Quoted 6 lines
arch/arm/boot/dts/omap5.dtsi +3 -0
@@ -522,6 +522,13 @@
  			#size-cells = <1>;
  			utmi-mode = <2>;
  			ranges;
+			dwc3 at 4a030000 {
+				compatible = "synopsys,dwc3";
+				reg = <0x4a030000 0xcfff>;

Same question here.

WBR, Sergei

author
#6 lore raw

Re: [PATCH v2 4/6] ARM: dts: omap5: add dwc3 omap dt data

In reply to Sergei Shtylyov
Quoted 21 lines · Sergei Shtylyov

Hello.

Quoted 17 lines · Kishon Vijay Abraham I

Add dwc3 omap glue data to the omap5 dt data file. The information about the dt node added here is available @ Documentation/devicetree/bindings/usb/omap-usb.txt

---
  arch/arm/boot/dts/omap5.dtsi |   11 +++++++++++
  1 file changed, 11 insertions(+)
arch/arm/boot/dts/omap5.dtsi +0 -0
index 5f59bf2..1703a72 100644
@@ -513,6 +513,17 @@
              ti,type = <2>;
          };
 
Quoted 6 lines

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

Quoted 4 lines
arch/arm/boot/dts/omap5.dtsi +4 -0
+        omap_dwc3 at 4a020000 {
+            compatible = "ti,dwc3";
+            ti,hwmods = "usb_otg_ss";
+            reg = <0x4a020000 0x1ff>;
    Shoudn't the "reg" length be 0x200 here? It's length, not limit.

I think 0x1ff is correct. I got the data from hwmod data.

Thanks
Kishon

#7 lore raw

Re: [PATCH v2 4/6] ARM: dts: omap5: add dwc3 omap dt data

Quoted 22 lines · kishon
Quoted 21 lines · Sergei Shtylyov

Hello.

Quoted 17 lines · Kishon Vijay Abraham I

Add dwc3 omap glue data to the omap5 dt data file. The information about the dt node added here is available @ Documentation/devicetree/bindings/usb/omap-usb.txt

---
 arch/arm/boot/dts/omap5.dtsi |   11 +++++++++++
 1 file changed, 11 insertions(+)
arch/arm/boot/dts/omap5.dtsi +0 -0
index 5f59bf2..1703a72 100644
@@ -513,6 +513,17 @@
             ti,type = <2>;
         };
 
Quoted 8 lines
Quoted 6 lines

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

Quoted 4 lines
arch/arm/boot/dts/omap5.dtsi +4 -0
+        omap_dwc3 at 4a020000 {
+            compatible = "ti,dwc3";
+            ti,hwmods = "usb_otg_ss";
+            reg = <0x4a020000 0x1ff>;

Shoudn't the "reg" length be 0x200 here? It's length, not limit.

I think 0x1ff is correct. I got the data from hwmod data.

hwmod is utterly wrong. Looking at TRM, it says the size here is 64KiB (0x10000), so is the size for dwc3 itself. Please don't blindly trust hwmod, make sure you read data from TRM ;-)

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/20130205/4e925b99/attachment.sig>
author
#8 lore raw

Re: [PATCH v2 4/6] ARM: dts: omap5: add dwc3 omap dt data

Hi,

Quoted 30 lines · Felipe Balbi
Quoted 29 lines · kishon
Quoted 27 lines · Sergei Shtylyov

Hello.

Quoted 14 lines · Kishon Vijay Abraham I

Add dwc3 omap glue data to the omap5 dt data file. The information about the dt node added here is available @ Documentation/devicetree/bindings/usb/omap-usb.txt

---
  arch/arm/boot/dts/omap5.dtsi |   11 +++++++++++
  1 file changed, 11 insertions(+)
arch/arm/boot/dts/omap5.dtsi +0 -0
index 5f59bf2..1703a72 100644

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

Quoted 7 lines
arch/arm/boot/dts/omap5.dtsi +4 -0
@@ -513,6 +513,17 @@
              ti,type = <2>;
          };
 
+        omap_dwc3 at 4a020000 {
+            compatible = "ti,dwc3";
+            ti,hwmods = "usb_otg_ss";
+            reg = <0x4a020000 0x1ff>;
    Shoudn't the "reg" length be 0x200 here? It's length, not limit.
Quoted 5 lines
Quoted 1 line

I think 0x1ff is correct. I got the data from hwmod data.

hwmod is utterly wrong. Looking at TRM, it says the size here is 64KiB (0x10000), so is the size for dwc3 itself. Please don't blindly trust hwmod, make sure you read data from TRM ;-)

hmm..ok. But it has only 17 registers :-D

Thanks
Kishon

#9 lore raw

Re: [PATCH v2 4/6] ARM: dts: omap5: add dwc3 omap dt data

Quoted 35 lines · kishon

Hi,

Quoted 32 lines · Felipe Balbi
Quoted 31 lines · kishon
Quoted 29 lines · Sergei Shtylyov

Hello.

Quoted 16 lines · Kishon Vijay Abraham I

Add dwc3 omap glue data to the omap5 dt data file. The information about
the dt node added here is available @ Documentation/devicetree/bindings/usb/omap-usb.txt

---
  arch/arm/boot/dts/omap5.dtsi |   11 +++++++++++
  1 file changed, 11 insertions(+)
arch/arm/boot/dts/omap5.dtsi +0 -0
index 5f59bf2..1703a72 100644

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

Quoted 7 lines
arch/arm/boot/dts/omap5.dtsi +4 -0
@@ -513,6 +513,17 @@
              ti,type = <2>;
          };
 
+        omap_dwc3@4a020000 {
+            compatible = "ti,dwc3";
+            ti,hwmods = "usb_otg_ss";
+            reg = <0x4a020000 0x1ff>;
    Shoudn't the "reg" length be 0x200 here? It's length, not limit.
Quoted 8 lines
Quoted 5 lines
Quoted 1 line

I think 0x1ff is correct. I got the data from hwmod data.

hwmod is utterly wrong. Looking at TRM, it says the size here is 64KiB (0x10000), so is the size for dwc3 itself. Please don't blindly trust hwmod, make sure you read data from TRM ;-)

hmm..ok. But it has only 17 registers :-D

As Felipe said, it should be 0x200. And if you are interested in lesser space, there is no need to map entire 64 KB address space if it isn't being used.

Regards,
Santosh

#10 lore raw

Re: [PATCH v2 4/6] ARM: dts: omap5: add dwc3 omap dt data

Quoted 42 lines · Santosh Shilimkar
Quoted 41 lines · kishon

Hi,

Quoted 37 lines · Felipe Balbi
Quoted 24 lines · kishon
Quoted 23 lines · Sergei Shtylyov

Hello.

Quoted 19 lines · Kishon Vijay Abraham I

Add dwc3 omap glue data to the omap5 dt data file. The information about
the dt node added here is available @ Documentation/devicetree/bindings/usb/omap-usb.txt

---
 arch/arm/boot/dts/omap5.dtsi |   11 +++++++++++
 1 file changed, 11 insertions(+)
arch/arm/boot/dts/omap5.dtsi +0 -0
index 5f59bf2..1703a72 100644
@@ -513,6 +513,17 @@
             ti,type = <2>;
         };
 
Quoted 8 lines
Quoted 6 lines

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

Quoted 4 lines
arch/arm/boot/dts/omap5.dtsi +4 -0
+        omap_dwc3 at 4a020000 {
+            compatible = "ti,dwc3";
+            ti,hwmods = "usb_otg_ss";
+            reg = <0x4a020000 0x1ff>;

Shoudn't the "reg" length be 0x200 here? It's length, not limit.

I think 0x1ff is correct. I got the data from hwmod data.

hwmod is utterly wrong. Looking at TRM, it says the size here is 64KiB (0x10000), so is the size for dwc3 itself. Please don't blindly trust hwmod, make sure you read data from TRM ;-)

Quoted 5 lines
Quoted 2 lines

hmm..ok. But it has only 17 registers :-D

As Felipe said, it should be 0x200. And if you are interested in lesser space, there is no need to map entire 64 KB address space if it isn't being used.

We get really close to using all of it. For DWC3, the last address is at 0xcc10 (a 32-bit register).

For dwc3-wrapper, then it's correct, we don't use it, I would still map the whole thing to make it future proof.

Any draw-backs from mapping all 64K ?

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/20130205/3756f02e/attachment.sig>