Skip to contentSkip to conversation

Fixes for Tegra XUSB

PATCH New Jon Hunter 3 participants 6 messages Jun 29, 2016 – Jul 1, 2016

Subsystems (4)
lore
Share & tools
lore

Jon Hunter

author maintainer
#0 lore raw

cover Fixes for Tegra XUSB

Fixes for Tegra XUSB dt-binding documentation and the XUSB mailbox interrupt.

When testing XUSB on the Tegra210 Smaug, I found that USB connect and disconnect events were not being seen. I have debug this and found that the XUSB mailbox is incorrect and I was never receiving any interrupts from the XUSB mailbox. Interestingly, this behaviour is not seen on the Tegra210 Jetson TX1 despite the fact that there were no mailbox interrupts. The two boards have different USB connectors and so may be the connection is slightly different. After fixing the mailbox interrupt both boards now receive interrupts from the XUSB mailbox as expected.

Jon Hunter (3):
dt-bindings: phy: Fix description of Tegra210 PHY nodes
dt-bindings: usb: Fix Tegra XUSB example
arm64: tegra: Correct Tegra210 XUSB mailbox interrupt

 .../devicetree/bindings/phy/nvidia,tegra124-xusb-padctl.txt       | 2 +-
 Documentation/devicetree/bindings/usb/nvidia,tegra124-xusb.txt    | 8 ++++----
 arch/arm64/boot/dts/nvidia/tegra210.dtsi                          | 2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)
Signature · 1 line
2.1.4
author maintainer
#1 lore raw

PATCH 1/3 dt-bindings: phy: Fix description of Tegra210 PHY nodes

The dt-binding document for the Tegra XUSB pad controller states that 'utmi' is one of the valid choices for the Tegra210 PHY node names and has child lanes named, 'utmi-0', 'utmi-1', 'utmi-2' and 'utmi-3'. However, neither the XUSB pad controller PHY driver or the actual Tegra210 binding for the XUSB pad controller use these names. Instead both the driver and binding use the node name 'usb2' and for the child lanes use the names 'usb2-0', 'usb2-1', 'usb2-2' and 'usb2-3'. Given that the driver and binding are consistent with the naming, up date the dt-binding documentation to match.

---
 Documentation/devicetree/bindings/phy/nvidia,tegra124-xusb-padctl.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/devicetree/bindings/phy/nvidia,tegra124-xusb-padctl.txt +1 -1
index 0bf1ae243552..3742c152c467 100644
@@ -124,7 +124,7 @@ For Tegra124 and Tegra132, the list of valid PHY nodes is given below:
   - functions: "usb3-ss", "sata"
 
 For Tegra210, the list of valid PHY nodes is given below:
-- utmi: utmi-0, utmi-1, utmi-2, utmi-3
+- usb2: usb2-0, usb2-1, usb2-2, usb2-3
   - functions: "snps", "xusb", "uart"
 - hsic: hsic-0, hsic-1
   - functions: "snps", "xusb"
Signature · 1 line
2.1.4
maintainer
#2 lore raw

PATCH 1/3 dt-bindings: phy: Fix description of Tegra210 PHY nodes

Quoted 10 lines · Jon Hunter

The dt-binding document for the Tegra XUSB pad controller states that 'utmi' is one of the valid choices for the Tegra210 PHY node names and has child lanes named, 'utmi-0', 'utmi-1', 'utmi-2' and 'utmi-3'. However, neither the XUSB pad controller PHY driver or the actual Tegra210 binding for the XUSB pad controller use these names. Instead both the driver and binding use the node name 'usb2' and for the child lanes use the names 'usb2-0', 'usb2-1', 'usb2-2' and 'usb2-3'. Given that the driver and binding are consistent with the naming, up date the dt-binding documentation to match.

Quoted 4 lines
---
 Documentation/devicetree/bindings/phy/nvidia,tegra124-xusb-padctl.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
author maintainer
#3 lore raw

PATCH 2/3 dt-bindings: usb: Fix Tegra XUSB example

In reply to Jon Hunter

The example binding for the Tegra XUSB omits the 'lane' subnode in the XUSB pad controller path which is required according to the binding documentation for the Tegra XUSB pad controller [0]. In addition to this the phy-names with the suffix 'utmi' are also not valid and should have the suffix 'usb2'. Correct both the XUSB pad controller pad path and phy-names for the XUSB example.

[0] Documentation/devicetree/bindings/phy/nvidia,tegra124-xusb-padctl.txt

---
 Documentation/devicetree/bindings/usb/nvidia,tegra124-xusb.txt | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
Documentation/devicetree/bindings/usb/nvidia,tegra124-xusb.txt +4 -4
index d28295a3e55f..3eee9e505400 100644
@@ -104,10 +104,10 @@ Example:
 
 		nvidia,xusb-padctl = <&padctl>;
 
-		phys = <&{/padctl@0,7009f000/pads/usb2/usb2-1}>, /* mini-PCIe USB */
-		       <&{/padctl@0,7009f000/pads/usb2/usb2-2}>, /* USB A */
-		       <&{/padctl@0,7009f000/pads/pcie/pcie-0}>; /* USB A */
-		phy-names = "utmi-1", "utmi-2", "usb3-0";
+		phys = <&{/padctl@0,7009f000/pads/usb2/lanes/usb2-1}>, /* mini-PCIe USB */
+		       <&{/padctl@0,7009f000/pads/usb2/lanes/usb2-2}>, /* USB A */
+		       <&{/padctl@0,7009f000/pads/pcie/lanes/pcie-0}>; /* USB A */
+		phy-names = "usb2-1", "usb2-2", "usb3-0";
 
 		avddio-pex-supply = <&vdd_1v05_run>;
 		dvddio-pex-supply = <&vdd_1v05_run>;
Signature · 1 line
2.1.4
author maintainer
#4 lore raw

PATCH 3/3 arm64: tegra: Correct Tegra210 XUSB mailbox interrupt

In reply to Jon Hunter

The XUSB mailbox interrupt for Tegra210 is 40 and not 49 which is for the XUSB pad controller. For some Tegra210 boards, this is causing USB connect and disconnect events to go undetected. Fix this by changing the interrupt number for the XUSB mailbox to 40.

---
 arch/arm64/boot/dts/nvidia/tegra210.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/nvidia/tegra210.dtsi +1 -1
index efb0fd98b789..6bc60ea95d16 100644
@@ -740,7 +740,7 @@
 		reg-names = "hcd", "fpci", "ipfs";
 
 		interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>,
-			     <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>;
+			     <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>;
 
 		clocks = <&tegra_car TEGRA210_CLK_XUSB_HOST>,
 			 <&tegra_car TEGRA210_CLK_XUSB_HOST_SRC>,
Signature · 1 line
2.1.4
#5 lore raw

cover Fixes for Tegra XUSB

In reply to Jon Hunter
Quoted 17 lines · Jon Hunter

Fixes for Tegra XUSB dt-binding documentation and the XUSB mailbox interrupt.

When testing XUSB on the Tegra210 Smaug, I found that USB connect and disconnect events were not being seen. I have debug this and found that the XUSB mailbox is incorrect and I was never receiving any interrupts from the XUSB mailbox. Interestingly, this behaviour is not seen on the Tegra210 Jetson TX1 despite the fact that there were no mailbox interrupts. The two boards have different USB connectors and so may be the connection is slightly different. After fixing the mailbox interrupt both boards now receive interrupts from the XUSB mailbox as expected.

Jon Hunter (3):
dt-bindings: phy: Fix description of Tegra210 PHY nodes
dt-bindings: usb: Fix Tegra XUSB example
arm64: tegra: Correct Tegra210 XUSB mailbox interrupt

Quoted 4 lines
 .../devicetree/bindings/phy/nvidia,tegra124-xusb-padctl.txt       | 2 +-
 Documentation/devicetree/bindings/usb/nvidia,tegra124-xusb.txt    | 8 ++++----
 arch/arm64/boot/dts/nvidia/tegra210.dtsi                          | 2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)

All applied to for-4.8/dt-bindings (1 and 2) and for-4.8/arm64 (3).

Thanks,
Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160630/1317ddaf/attachment.sig>