* Re: Exynos5422 EHCI (USB 2.0) - Odroid XU4 - port 1 resume error -110
2017-01-29 13:35 Exynos5422 EHCI (USB 2.0) - Odroid XU4 - port 1 resume error -110 Krzysztof Kozlowski
@ 2017-01-30 6:38 ` Anand Moon
0 siblings, 0 replies; 2+ messages in thread
From: Anand Moon @ 2017-01-30 6:38 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Kamil Debski, Sylwester Nawrocki, Kishon Vijay Abraham I,
Felipe Balbi, Kukjin Kim, Javier Martinez Canillas,
Linux USB Mailing List, linux-samsung-soc, Linux Kernel,
Felipe Balbi, Richard Genoud, Marek Szyprowski, Markus Reichl
[-- Attachment #1: Type: text/plain, Size: 2212 bytes --]
Hi Krzysztof,
On 29 January 2017 at 19:05, Krzysztof Kozlowski <krzk@kernel.org> wrote:
> Hi,
>
> On Odroid XU4 with an external usb2514 hub (evaluation board from SMSC
> or TI) connected to the USB2.0 port of EHCI controller, whenever I
> plug some USB device into the usb2514 hub I see errors like:
> [ 73.969179] exynos-ehci 12110000.usb: port 1 resume error -110
> [ 74.003259] usb 1-1: USB disconnect, device number 2
> [ 74.017432] usb usb1-port1: cannot reset (err = -32)
> [ 74.021141] usb usb1-port1: cannot reset (err = -32)
> [ 74.026832] usb usb1-port1: cannot reset (err = -32)
> [ 74.030974] usb usb1-port1: cannot reset (err = -32)
> [ 74.036677] usb usb1-port1: cannot reset (err = -32)
> [ 74.041919] usb usb1-port1: Cannot enable. Maybe the USB cable is bad?
> [ 74.140923] usb usb1-port1: unable to enumerate USB device
>
> Flooding the console. USB device does not work.
>
> Tested:
> 1. next-20170125,
> 2. mainline v4.10-rc5-393-g53cd1ad1a68f,
> 3. Hardkernel vendor kernel 3.10
>
>
> It does not look like an issue of usb2514 but rather a combination of
> usb2514 + Exynos EHCI because:
> 1. Happens only when usb2514 hub is directly connected to the USB2.0
> port of EHCI controller.
> 2. If usb2514 is connected through other hub (like to other ports on
> the board) - everything works fine.
> 3. I tested two different usb2514 hubs - one from TI, second from
> SMSC. Both behave the same.
> 4. I had the same issue on DWC3 controller (USB 3.0 port) and in that
> case helped ENABLING bits DWC3_GUSB2PHYCFG_SUSPHY and
> DWC3_GUSB3PIPECTL_SUSPHY which is I think equal to disabling the
> snps,dis_u3_susphy_quirk quirks.
>
>
> It seems that issue is strictly related to Exynos5422 USB 2.0 driver
> (phy?) and this hub. The drivers involved:
> - drivers/phy/phy-exynos5250-usb2.c
> - drivers/phy/phy-samsung-usb2.c
> - drivers/usb/host/ehci-exynos.c
>
> Any ideas?
>
> Best regards,
> Krzysztof
I feel vbus input configuration is missing in the OdroidXU4.
for both ehci 2.0 port and dwc3 controller.
id-gpio and vbus-gpio configuration is also missing.
I am just attaching small changes from my side but it's not working
correctly at my end.
-Best Regards
-Anand
[-- Attachment #2: usbvbus.patch --]
[-- Type: application/octet-stream, Size: 3126 bytes --]
diff --git a/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi b/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi
index 05b9afdd..520df86 100644
--- a/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi
+++ b/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi
@@ -145,6 +145,34 @@
};
};
};
+
+ usb300_vbus_reg: regulator-usb300 {
+ compatible = "regulator-fixed";
+ regulator-name = "VUSB_BOOST_5V0";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ gpio = <&gpy6 2 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default";
+ pinctrl-1 = <&usb300_vbus_en>;
+ enable-active-high;
+ };
+
+ usb301_vbus_reg: regulator-usb301 {
+ compatible = "regulator-fixed";
+ regulator-name = "VUSB_BOOST_5V1";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ gpio = <&gpg1 4 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default";
+ pinctrl-1 = <&usb301_vbus_en>;
+ enable-active-high;
+ };
+
+ usb-switch {
+ samsung,id-gpio = <&gpx3 1 0xf>;
+ pinctrl-names = "default";
+ pinctrl-1 = <&id2_irq>;
+ };
};
&adc {
@@ -570,6 +598,12 @@
samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
samsung,pin-drv = <EXYNOS5420_PIN_DRV_LV1>;
};
+
+ id2_irq: id2-irq {
+ samsung,pins = "gpx3-1";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_F>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ };
};
&pinctrl_1 {
@@ -579,6 +613,20 @@
samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
samsung,pin-drv = <EXYNOS5420_PIN_DRV_LV1>;
};
+
+ usb300_vbus_en: usb300-vbus-en {
+ samsung,pins = "gpy6-2";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ samsung,pin-drv = <EXYNOS5420_PIN_DRV_LV1>;
+ };
+
+ usb301_vbus_en: usb301-vbus-en {
+ samsung,pins = "gpg1-4";
+ samsung,pin-function = <EXYNOS_PIN_FUNC_OUTPUT>;
+ samsung,pin-pud = <EXYNOS_PIN_PULL_NONE>;
+ samsung,pin-drv = <EXYNOS5420_PIN_DRV_LV1>;
+ };
};
&tmu_cpu0 {
@@ -607,6 +655,10 @@
clock-names = "rtc", "rtc_src";
};
+&usbhost2 {
+ samsung,vbus-gpio = <&gpx2 6 GPIO_ACTIVE_HIGH>;
+};
+
&usbdrd_dwc3_0 {
dr_mode = "host";
};
@@ -614,11 +666,13 @@
/* usbdrd_dwc3_1 mode customized in each board */
&usbdrd3_0 {
+ vbus-supply = <&usb300_vbus_reg>;
vdd33-supply = <&ldo9_reg>;
vdd10-supply = <&ldo11_reg>;
};
&usbdrd3_1 {
+ vbus-supply = <&usb301_vbus_reg>;
vdd33-supply = <&ldo9_reg>;
vdd10-supply = <&ldo11_reg>;
};
diff --git a/arch/arm/boot/dts/exynos54xx.dtsi b/arch/arm/boot/dts/exynos54xx.dtsi
index 0389e8a..0ca0977 100644
--- a/arch/arm/boot/dts/exynos54xx.dtsi
+++ b/arch/arm/boot/dts/exynos54xx.dtsi
@@ -134,6 +134,9 @@
interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>;
phys = <&usbdrd_phy0 0>, <&usbdrd_phy0 1>;
phy-names = "usb2-phy", "usb3-phy";
+ snps,usb3_lpm_capable;
+ snps,dis_u3_susphy_quirk;
+ snps,dis_u2_susphy_quirk;
};
};
@@ -154,6 +157,9 @@
reg = <0x12400000 0x10000>;
phys = <&usbdrd_phy1 0>, <&usbdrd_phy1 1>;
phy-names = "usb2-phy", "usb3-phy";
+ snps,usb3_lpm_capable;
+ snps,dis_u3_susphy_quirk;
+ snps,dis_u2_susphy_quirk;
};
};
^ permalink raw reply related [flat|nested] 2+ messages in thread