* Help needed USB hub disconnected at resume
[not found] ` <F690310232FDDF4AB457E8B3EF90DDE0AA85E1E7@MARCM-SBS2011.marcmltd.local>
@ 2014-03-03 10:04 ` Marc Murphy
2014-03-03 11:06 ` Roger Quadros
0 siblings, 1 reply; 13+ messages in thread
From: Marc Murphy @ 2014-03-03 10:04 UTC (permalink / raw)
To: linux-omap@vger.kernel.org
Hi,
I am using the latest stable 3.4.80 kernel with some changes to get the EMAC Phy to initialise correctly after a suspend/resume. The platform is AM3517 with most of the system working nice and smoothly. I have 1 issue though and need some advice/help to get the system to use the USB hub I have connected to the EHCI controller after a suspend to memory and resume.
At boot all is recognised;
[ 1.486816] usbcore: registered new interface driver cdc_ether
[ 1.493255] usbcore: registered new interface driver cdc_ncm
[ 1.499450] usbcore: registered new interface driver qmi_wwan
[ 1.506622] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 1.513580] ehci-omap.0 supply hsusb0 not found, using dummy regulator
[ 2.521881] ehci-omap ehci-omap.0: OMAP-EHCI Host Controller
[ 2.528411] ehci-omap ehci-omap.0: new USB bus registered, assigned bus number 1
[ 2.536468] ehci-omap ehci-omap.0: irq 77, io mem 0x48064800
[ 2.553070] ehci-omap ehci-omap.0: USB 2.0 started, EHCI 1.00
[ 2.559295] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[ 2.566436] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 2.574035] usb usb1: Product: OMAP-EHCI Host Controller
[ 2.579620] usb usb1: Manufacturer: Linux 3.4.80 ehci_hcd
[ 2.585296] usb usb1: SerialNumber: ehci-omap.0
[ 2.591278] hub 1-0:1.0: USB hub found
[ 2.595306] hub 1-0:1.0: 3 ports detected
And I can see everything OK.
# lsusb
Bus 001 Device 002: ID 0424:2513 Standard Microsystems Corp. 2.0 Hub
Bus 002 Device 002: ID 05e3:0718 Genesys Logic, Inc. IDE/SATA Adapter
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 1199:68a2 Sierra Wireless, Inc.
#
#
# echo mem > /sys/power/state
[ 73.736572] PM: Syncing filesystems ... done.
[ 73.743530] Freezing user space processes ... (elapsed 0.01 seconds) done.
[ 73.766784] Freezing remaining freezable tasks ... (elapsed 0.02 seconds) done.
[ 73.959289] davinci_mdio davinci_mdio.0: timed out waiting for idle
[ 73.968872] PM: suspend of devices complete after 170.410 msecs
[ 73.975433] PM: late suspend of devices complete after 0.305 msecs
[ 73.982635] PM: noirq suspend of devices complete after 0.732 msecs
[ 83.430450] Powerdomain (core_pwrdm) didn't enter target state 1
[ 83.436737] Could not enter target state in pm_suspend
[ 83.443176] PM: noirq resume of devices complete after 0.915 msecs
[ 83.450164] PM: early resume of devices complete after 0.274 msecs
[ 83.457336] <6>Waiting for PHY clock good...
[ 83.463287] davinci_mdio davinci_mdio.0: resetting idled controller
[ 83.471343] net eth0: attached PHY driver [SMSC LAN8710/LAN8720] (mii_bus:phy_addr=davinci_mdio-0:00, id=7c0f1)
[ 84.771881] PM: resume of devices complete after 1315.185 msecs
[ 84.778472] Restarting tasks ...
[ 84.782379] usb 1-1: USB disconnect, device number 2
[ 84.790557] done.
[ 84.792938] mmc0: mmc_rescan_try_freq: trying to init card at 400000 Hz
sh: write error:[ 84.800781] usb 1-1.1: USB disconnect, device number 3
Operation not p[ 84.808349] qmi_wwan 1-1.1:1.8: wwan0: unregister 'qmi_wwan' usb-ehci-omap.0-1.1, Sierra Wireless wwan/QMI device
ermitted
[ 84.859191] mmc1: mmc_rescan_try_freq: trying to init card at 400000 Hz
[ 86.490356] PHY: davinci_mdio-0:00 - Link is Up - 100/Full
#
#
# lsusb
Bus 002 Device 002: ID 05e3:0718 Genesys Logic, Inc. IDE/SATA Adapter
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
#
Is there any relevant patch out there that would address the issue that I see ?
Kind Regards
Marc
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Help needed USB hub disconnected at resume
2014-03-03 10:04 ` Help needed USB hub disconnected at resume Marc Murphy
@ 2014-03-03 11:06 ` Roger Quadros
2014-03-03 12:16 ` Igor Grinberg
0 siblings, 1 reply; 13+ messages in thread
From: Roger Quadros @ 2014-03-03 11:06 UTC (permalink / raw)
To: Marc Murphy, linux-omap@vger.kernel.org
Hi Marc,
On 03/03/2014 12:04 PM, Marc Murphy wrote:
> Hi,
> I am using the latest stable 3.4.80 kernel with some changes to get the EMAC Phy to initialise correctly after a suspend/resume. The platform is AM3517 with most of the system working nice and smoothly. I have 1 issue though and need some advice/help to get the system to use the USB hub I have connected to the EHCI controller after a suspend to memory and resume.
>
> At boot all is recognised;
>
> [ 1.486816] usbcore: registered new interface driver cdc_ether
> [ 1.493255] usbcore: registered new interface driver cdc_ncm
> [ 1.499450] usbcore: registered new interface driver qmi_wwan
> [ 1.506622] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
> [ 1.513580] ehci-omap.0 supply hsusb0 not found, using dummy regulator
> [ 2.521881] ehci-omap ehci-omap.0: OMAP-EHCI Host Controller
> [ 2.528411] ehci-omap ehci-omap.0: new USB bus registered, assigned bus number 1
> [ 2.536468] ehci-omap ehci-omap.0: irq 77, io mem 0x48064800
> [ 2.553070] ehci-omap ehci-omap.0: USB 2.0 started, EHCI 1.00
> [ 2.559295] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
> [ 2.566436] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
> [ 2.574035] usb usb1: Product: OMAP-EHCI Host Controller
> [ 2.579620] usb usb1: Manufacturer: Linux 3.4.80 ehci_hcd
> [ 2.585296] usb usb1: SerialNumber: ehci-omap.0
> [ 2.591278] hub 1-0:1.0: USB hub found
> [ 2.595306] hub 1-0:1.0: 3 ports detected
>
> And I can see everything OK.
>
> # lsusb
> Bus 001 Device 002: ID 0424:2513 Standard Microsystems Corp. 2.0 Hub
> Bus 002 Device 002: ID 05e3:0718 Genesys Logic, Inc. IDE/SATA Adapter
> Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
> Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
> Bus 001 Device 003: ID 1199:68a2 Sierra Wireless, Inc.
> #
> #
> # echo mem > /sys/power/state
> [ 73.736572] PM: Syncing filesystems ... done.
> [ 73.743530] Freezing user space processes ... (elapsed 0.01 seconds) done.
> [ 73.766784] Freezing remaining freezable tasks ... (elapsed 0.02 seconds) done.
> [ 73.959289] davinci_mdio davinci_mdio.0: timed out waiting for idle
> [ 73.968872] PM: suspend of devices complete after 170.410 msecs
> [ 73.975433] PM: late suspend of devices complete after 0.305 msecs
> [ 73.982635] PM: noirq suspend of devices complete after 0.732 msecs
> [ 83.430450] Powerdomain (core_pwrdm) didn't enter target state 1
> [ 83.436737] Could not enter target state in pm_suspend
> [ 83.443176] PM: noirq resume of devices complete after 0.915 msecs
> [ 83.450164] PM: early resume of devices complete after 0.274 msecs
> [ 83.457336] <6>Waiting for PHY clock good...
> [ 83.463287] davinci_mdio davinci_mdio.0: resetting idled controller
> [ 83.471343] net eth0: attached PHY driver [SMSC LAN8710/LAN8720] (mii_bus:phy_addr=davinci_mdio-0:00, id=7c0f1)
> [ 84.771881] PM: resume of devices complete after 1315.185 msecs
> [ 84.778472] Restarting tasks ...
> [ 84.782379] usb 1-1: USB disconnect, device number 2
> [ 84.790557] done.
> [ 84.792938] mmc0: mmc_rescan_try_freq: trying to init card at 400000 Hz
> sh: write error:[ 84.800781] usb 1-1.1: USB disconnect, device number 3
> Operation not p[ 84.808349] qmi_wwan 1-1.1:1.8: wwan0: unregister 'qmi_wwan' usb-ehci-omap.0-1.1, Sierra Wireless wwan/QMI device
> ermitted
> [ 84.859191] mmc1: mmc_rescan_try_freq: trying to init card at 400000 Hz
> [ 86.490356] PHY: davinci_mdio-0:00 - Link is Up - 100/Full
> #
> #
> # lsusb
> Bus 002 Device 002: ID 05e3:0718 Genesys Logic, Inc. IDE/SATA Adapter
> Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
> Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
> #
>
> Is there any relevant patch out there that would address the issue that I see ?
Does this happen because of OFF mode?
Can you please try the tests with off mode disabled?
e.g.
mount -t debugfs none /sys/kernel/debug
echo 0 > /sys/kernel/debug/pm_debug/enable_off_mode
suspend & resume
Also please send the output of /sys/kernel/debug/pm_debug/count
before suspend and after resume. Thanks.
cheers,
-roger
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Help needed USB hub disconnected at resume
2014-03-03 11:06 ` Roger Quadros
@ 2014-03-03 12:16 ` Igor Grinberg
2014-03-03 14:11 ` Marc Murphy
0 siblings, 1 reply; 13+ messages in thread
From: Igor Grinberg @ 2014-03-03 12:16 UTC (permalink / raw)
To: Roger Quadros, Marc Murphy, linux-omap@vger.kernel.org
On 03/03/14 13:06, Roger Quadros wrote:
> Hi Marc,
>
> On 03/03/2014 12:04 PM, Marc Murphy wrote:
>> Hi,
>> I am using the latest stable 3.4.80 kernel with some changes to get the EMAC Phy to initialise correctly after a suspend/resume. The platform is AM3517 with most of the system working nice and smoothly. I have 1 issue though and need some advice/help to get the system to use the USB hub I have connected to the EHCI controller after a suspend to memory and resume.
>>
>> At boot all is recognised;
>>
>> [ 1.486816] usbcore: registered new interface driver cdc_ether
>> [ 1.493255] usbcore: registered new interface driver cdc_ncm
>> [ 1.499450] usbcore: registered new interface driver qmi_wwan
>> [ 1.506622] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
>> [ 1.513580] ehci-omap.0 supply hsusb0 not found, using dummy regulator
>> [ 2.521881] ehci-omap ehci-omap.0: OMAP-EHCI Host Controller
>> [ 2.528411] ehci-omap ehci-omap.0: new USB bus registered, assigned bus number 1
>> [ 2.536468] ehci-omap ehci-omap.0: irq 77, io mem 0x48064800
>> [ 2.553070] ehci-omap ehci-omap.0: USB 2.0 started, EHCI 1.00
>> [ 2.559295] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
>> [ 2.566436] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
>> [ 2.574035] usb usb1: Product: OMAP-EHCI Host Controller
>> [ 2.579620] usb usb1: Manufacturer: Linux 3.4.80 ehci_hcd
>> [ 2.585296] usb usb1: SerialNumber: ehci-omap.0
>> [ 2.591278] hub 1-0:1.0: USB hub found
>> [ 2.595306] hub 1-0:1.0: 3 ports detected
>>
>> And I can see everything OK.
>>
>> # lsusb
>> Bus 001 Device 002: ID 0424:2513 Standard Microsystems Corp. 2.0 Hub
>> Bus 002 Device 002: ID 05e3:0718 Genesys Logic, Inc. IDE/SATA Adapter
>> Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
>> Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
>> Bus 001 Device 003: ID 1199:68a2 Sierra Wireless, Inc.
>> #
>> #
>> # echo mem > /sys/power/state
>> [ 73.736572] PM: Syncing filesystems ... done.
>> [ 73.743530] Freezing user space processes ... (elapsed 0.01 seconds) done.
>> [ 73.766784] Freezing remaining freezable tasks ... (elapsed 0.02 seconds) done.
>> [ 73.959289] davinci_mdio davinci_mdio.0: timed out waiting for idle
>> [ 73.968872] PM: suspend of devices complete after 170.410 msecs
>> [ 73.975433] PM: late suspend of devices complete after 0.305 msecs
>> [ 73.982635] PM: noirq suspend of devices complete after 0.732 msecs
>> [ 83.430450] Powerdomain (core_pwrdm) didn't enter target state 1
>> [ 83.436737] Could not enter target state in pm_suspend
>> [ 83.443176] PM: noirq resume of devices complete after 0.915 msecs
>> [ 83.450164] PM: early resume of devices complete after 0.274 msecs
>> [ 83.457336] <6>Waiting for PHY clock good...
>> [ 83.463287] davinci_mdio davinci_mdio.0: resetting idled controller
>> [ 83.471343] net eth0: attached PHY driver [SMSC LAN8710/LAN8720] (mii_bus:phy_addr=davinci_mdio-0:00, id=7c0f1)
>> [ 84.771881] PM: resume of devices complete after 1315.185 msecs
>> [ 84.778472] Restarting tasks ...
>> [ 84.782379] usb 1-1: USB disconnect, device number 2
>> [ 84.790557] done.
>> [ 84.792938] mmc0: mmc_rescan_try_freq: trying to init card at 400000 Hz
>> sh: write error:[ 84.800781] usb 1-1.1: USB disconnect, device number 3
>> Operation not p[ 84.808349] qmi_wwan 1-1.1:1.8: wwan0: unregister 'qmi_wwan' usb-ehci-omap.0-1.1, Sierra Wireless wwan/QMI device
>> ermitted
>> [ 84.859191] mmc1: mmc_rescan_try_freq: trying to init card at 400000 Hz
>> [ 86.490356] PHY: davinci_mdio-0:00 - Link is Up - 100/Full
>> #
>> #
>> # lsusb
>> Bus 002 Device 002: ID 05e3:0718 Genesys Logic, Inc. IDE/SATA Adapter
>> Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
>> Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
>> #
>>
>> Is there any relevant patch out there that would address the issue that I see ?
>
> Does this happen because of OFF mode?
> Can you please try the tests with off mode disabled?
>
> e.g.
> mount -t debugfs none /sys/kernel/debug
> echo 0 > /sys/kernel/debug/pm_debug/enable_off_mode
> suspend & resume
AFAIK, AM3517 does not have OFF mode.
We had something similar with runtime pm...
It might be useful to know which hub is this and how is it connected...
>
> Also please send the output of /sys/kernel/debug/pm_debug/count
> before suspend and after resume. Thanks.
--
Regards,
Igor.
^ permalink raw reply [flat|nested] 13+ messages in thread
* RE: Help needed USB hub disconnected at resume
2014-03-03 12:16 ` Igor Grinberg
@ 2014-03-03 14:11 ` Marc Murphy
2014-03-04 6:43 ` Igor Grinberg
0 siblings, 1 reply; 13+ messages in thread
From: Marc Murphy @ 2014-03-03 14:11 UTC (permalink / raw)
To: Igor Grinberg, Roger Quadros, linux-omap@vger.kernel.org
Hi Igor
The Hub is a Microchip USB2513B-AEZG and is connected to EHCI controller port via the DUP_P and DUP_N pins. There is a reset applied to the chip at power on.
Regards
Marc
________________________________________
From: Igor Grinberg [grinberg@compulab.co.il]
Sent: 03 March 2014 12:16
To: Roger Quadros; Marc Murphy; linux-omap@vger.kernel.org
Subject: Re: Help needed USB hub disconnected at resume
On 03/03/14 13:06, Roger Quadros wrote:
> Hi Marc,
>
> On 03/03/2014 12:04 PM, Marc Murphy wrote:
>> Hi,
>> I am using the latest stable 3.4.80 kernel with some changes to get the EMAC Phy to initialise correctly after a suspend/resume. The platform is AM3517 with most of the system working nice and smoothly. I have 1 issue though and need some advice/help to get the system to use the USB hub I have connected to the EHCI controller after a suspend to memory and resume.
>>
>> At boot all is recognised;
>>
>> [ 1.486816] usbcore: registered new interface driver cdc_ether
>> [ 1.493255] usbcore: registered new interface driver cdc_ncm
>> [ 1.499450] usbcore: registered new interface driver qmi_wwan
>> [ 1.506622] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
>> [ 1.513580] ehci-omap.0 supply hsusb0 not found, using dummy regulator
>> [ 2.521881] ehci-omap ehci-omap.0: OMAP-EHCI Host Controller
>> [ 2.528411] ehci-omap ehci-omap.0: new USB bus registered, assigned bus number 1
>> [ 2.536468] ehci-omap ehci-omap.0: irq 77, io mem 0x48064800
>> [ 2.553070] ehci-omap ehci-omap.0: USB 2.0 started, EHCI 1.00
>> [ 2.559295] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
>> [ 2.566436] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
>> [ 2.574035] usb usb1: Product: OMAP-EHCI Host Controller
>> [ 2.579620] usb usb1: Manufacturer: Linux 3.4.80 ehci_hcd
>> [ 2.585296] usb usb1: SerialNumber: ehci-omap.0
>> [ 2.591278] hub 1-0:1.0: USB hub found
>> [ 2.595306] hub 1-0:1.0: 3 ports detected
>>
>> And I can see everything OK.
>>
>> # lsusb
>> Bus 001 Device 002: ID 0424:2513 Standard Microsystems Corp. 2.0 Hub
>> Bus 002 Device 002: ID 05e3:0718 Genesys Logic, Inc. IDE/SATA Adapter
>> Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
>> Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
>> Bus 001 Device 003: ID 1199:68a2 Sierra Wireless, Inc.
>> #
>> #
>> # echo mem > /sys/power/state
>> [ 73.736572] PM: Syncing filesystems ... done.
>> [ 73.743530] Freezing user space processes ... (elapsed 0.01 seconds) done.
>> [ 73.766784] Freezing remaining freezable tasks ... (elapsed 0.02 seconds) done.
>> [ 73.959289] davinci_mdio davinci_mdio.0: timed out waiting for idle
>> [ 73.968872] PM: suspend of devices complete after 170.410 msecs
>> [ 73.975433] PM: late suspend of devices complete after 0.305 msecs
>> [ 73.982635] PM: noirq suspend of devices complete after 0.732 msecs
>> [ 83.430450] Powerdomain (core_pwrdm) didn't enter target state 1
>> [ 83.436737] Could not enter target state in pm_suspend
>> [ 83.443176] PM: noirq resume of devices complete after 0.915 msecs
>> [ 83.450164] PM: early resume of devices complete after 0.274 msecs
>> [ 83.457336] <6>Waiting for PHY clock good...
>> [ 83.463287] davinci_mdio davinci_mdio.0: resetting idled controller
>> [ 83.471343] net eth0: attached PHY driver [SMSC LAN8710/LAN8720] (mii_bus:phy_addr=davinci_mdio-0:00, id=7c0f1)
>> [ 84.771881] PM: resume of devices complete after 1315.185 msecs
>> [ 84.778472] Restarting tasks ...
>> [ 84.782379] usb 1-1: USB disconnect, device number 2
>> [ 84.790557] done.
>> [ 84.792938] mmc0: mmc_rescan_try_freq: trying to init card at 400000 Hz
>> sh: write error:[ 84.800781] usb 1-1.1: USB disconnect, device number 3
>> Operation not p[ 84.808349] qmi_wwan 1-1.1:1.8: wwan0: unregister 'qmi_wwan' usb-ehci-omap.0-1.1, Sierra Wireless wwan/QMI device
>> ermitted
>> [ 84.859191] mmc1: mmc_rescan_try_freq: trying to init card at 400000 Hz
>> [ 86.490356] PHY: davinci_mdio-0:00 - Link is Up - 100/Full
>> #
>> #
>> # lsusb
>> Bus 002 Device 002: ID 05e3:0718 Genesys Logic, Inc. IDE/SATA Adapter
>> Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
>> Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
>> #
>>
>> Is there any relevant patch out there that would address the issue that I see ?
>
> Does this happen because of OFF mode?
> Can you please try the tests with off mode disabled?
>
> e.g.
> mount -t debugfs none /sys/kernel/debug
> echo 0 > /sys/kernel/debug/pm_debug/enable_off_mode
> suspend & resume
AFAIK, AM3517 does not have OFF mode.
We had something similar with runtime pm...
It might be useful to know which hub is this and how is it connected...
>
> Also please send the output of /sys/kernel/debug/pm_debug/count
> before suspend and after resume. Thanks.
--
Regards,
Igor.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Help needed USB hub disconnected at resume
2014-03-03 14:11 ` Marc Murphy
@ 2014-03-04 6:43 ` Igor Grinberg
2014-03-04 9:48 ` Marc Murphy
2014-03-04 22:34 ` Marc Murphy
0 siblings, 2 replies; 13+ messages in thread
From: Igor Grinberg @ 2014-03-04 6:43 UTC (permalink / raw)
To: Marc Murphy, Roger Quadros, linux-omap@vger.kernel.org
On 03/03/14 16:11, Marc Murphy wrote:
> Hi Igor
>
> The Hub is a Microchip USB2513B-AEZG and is connected to EHCI controller port via the DUP_P and DUP_N pins. There is a reset applied to the chip at power on.
>
If the reset signal is sw controllable, you might want to toggle it
before the EHCI controller resumes.
There is also a USB phy on the way from EHCI controller to the hub.
You might also want to check if the phy resumes correctly.
Which phy do you use and how is it reset?
> Regards
> Marc
> ________________________________________
> From: Igor Grinberg [grinberg@compulab.co.il]
> Sent: 03 March 2014 12:16
> To: Roger Quadros; Marc Murphy; linux-omap@vger.kernel.org
> Subject: Re: Help needed USB hub disconnected at resume
>
> On 03/03/14 13:06, Roger Quadros wrote:
>> Hi Marc,
>>
>> On 03/03/2014 12:04 PM, Marc Murphy wrote:
>>> Hi,
>>> I am using the latest stable 3.4.80 kernel with some changes to get the EMAC Phy to initialise correctly after a suspend/resume. The platform is AM3517 with most of the system working nice and smoothly. I have 1 issue though and need some advice/help to get the system to use the USB hub I have connected to the EHCI controller after a suspend to memory and resume.
>>>
>>> At boot all is recognised;
>>>
>>> [ 1.486816] usbcore: registered new interface driver cdc_ether
>>> [ 1.493255] usbcore: registered new interface driver cdc_ncm
>>> [ 1.499450] usbcore: registered new interface driver qmi_wwan
>>> [ 1.506622] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
>>> [ 1.513580] ehci-omap.0 supply hsusb0 not found, using dummy regulator
>>> [ 2.521881] ehci-omap ehci-omap.0: OMAP-EHCI Host Controller
>>> [ 2.528411] ehci-omap ehci-omap.0: new USB bus registered, assigned bus number 1
>>> [ 2.536468] ehci-omap ehci-omap.0: irq 77, io mem 0x48064800
>>> [ 2.553070] ehci-omap ehci-omap.0: USB 2.0 started, EHCI 1.00
>>> [ 2.559295] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
>>> [ 2.566436] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
>>> [ 2.574035] usb usb1: Product: OMAP-EHCI Host Controller
>>> [ 2.579620] usb usb1: Manufacturer: Linux 3.4.80 ehci_hcd
>>> [ 2.585296] usb usb1: SerialNumber: ehci-omap.0
>>> [ 2.591278] hub 1-0:1.0: USB hub found
>>> [ 2.595306] hub 1-0:1.0: 3 ports detected
>>>
>>> And I can see everything OK.
>>>
>>> # lsusb
>>> Bus 001 Device 002: ID 0424:2513 Standard Microsystems Corp. 2.0 Hub
>>> Bus 002 Device 002: ID 05e3:0718 Genesys Logic, Inc. IDE/SATA Adapter
>>> Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
>>> Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
>>> Bus 001 Device 003: ID 1199:68a2 Sierra Wireless, Inc.
>>> #
>>> #
>>> # echo mem > /sys/power/state
>>> [ 73.736572] PM: Syncing filesystems ... done.
>>> [ 73.743530] Freezing user space processes ... (elapsed 0.01 seconds) done.
>>> [ 73.766784] Freezing remaining freezable tasks ... (elapsed 0.02 seconds) done.
>>> [ 73.959289] davinci_mdio davinci_mdio.0: timed out waiting for idle
>>> [ 73.968872] PM: suspend of devices complete after 170.410 msecs
>>> [ 73.975433] PM: late suspend of devices complete after 0.305 msecs
>>> [ 73.982635] PM: noirq suspend of devices complete after 0.732 msecs
>>> [ 83.430450] Powerdomain (core_pwrdm) didn't enter target state 1
>>> [ 83.436737] Could not enter target state in pm_suspend
>>> [ 83.443176] PM: noirq resume of devices complete after 0.915 msecs
>>> [ 83.450164] PM: early resume of devices complete after 0.274 msecs
>>> [ 83.457336] <6>Waiting for PHY clock good...
>>> [ 83.463287] davinci_mdio davinci_mdio.0: resetting idled controller
>>> [ 83.471343] net eth0: attached PHY driver [SMSC LAN8710/LAN8720] (mii_bus:phy_addr=davinci_mdio-0:00, id=7c0f1)
>>> [ 84.771881] PM: resume of devices complete after 1315.185 msecs
>>> [ 84.778472] Restarting tasks ...
>>> [ 84.782379] usb 1-1: USB disconnect, device number 2
>>> [ 84.790557] done.
>>> [ 84.792938] mmc0: mmc_rescan_try_freq: trying to init card at 400000 Hz
>>> sh: write error:[ 84.800781] usb 1-1.1: USB disconnect, device number 3
>>> Operation not p[ 84.808349] qmi_wwan 1-1.1:1.8: wwan0: unregister 'qmi_wwan' usb-ehci-omap.0-1.1, Sierra Wireless wwan/QMI device
>>> ermitted
>>> [ 84.859191] mmc1: mmc_rescan_try_freq: trying to init card at 400000 Hz
>>> [ 86.490356] PHY: davinci_mdio-0:00 - Link is Up - 100/Full
>>> #
>>> #
>>> # lsusb
>>> Bus 002 Device 002: ID 05e3:0718 Genesys Logic, Inc. IDE/SATA Adapter
>>> Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
>>> Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
>>> #
>>>
>>> Is there any relevant patch out there that would address the issue that I see ?
>>
>> Does this happen because of OFF mode?
>> Can you please try the tests with off mode disabled?
>>
>> e.g.
>> mount -t debugfs none /sys/kernel/debug
>> echo 0 > /sys/kernel/debug/pm_debug/enable_off_mode
>> suspend & resume
>
> AFAIK, AM3517 does not have OFF mode.
> We had something similar with runtime pm...
> It might be useful to know which hub is this and how is it connected...
>
>>
>> Also please send the output of /sys/kernel/debug/pm_debug/count
>> before suspend and after resume. Thanks.
>
>
>
> --
> Regards,
> Igor.
>
--
Regards,
Igor.
^ permalink raw reply [flat|nested] 13+ messages in thread
* RE: Help needed USB hub disconnected at resume
2014-03-04 6:43 ` Igor Grinberg
@ 2014-03-04 9:48 ` Marc Murphy
2014-03-04 22:34 ` Marc Murphy
1 sibling, 0 replies; 13+ messages in thread
From: Marc Murphy @ 2014-03-04 9:48 UTC (permalink / raw)
To: Igor Grinberg, Roger Quadros, linux-omap@vger.kernel.org
>> Hi Igor
>>
>> The Hub is a Microchip USB2513B-AEZG and is connected to EHCI controller port via the DUP_P and DUP_N pins. There is a reset applied to the chip at power on.
>>
>If the reset signal is sw controllable, you might want to toggle it
>before the EHCI controller resumes.
The reset control is currently connected to the system reset signal that is generated at power up. I will disconnect it and try mapping it to a GPIO.
>There is also a USB phy on the way from EHCI controller to the hub.
>You might also want to check if the phy resumes correctly.
>Which phy do you use and how is it reset?
>From what I can see the USB2513B IC has the Phy built in and is connected directly to the AM3517. I am having the hardware engineer look into it but from what I can see on the circuit diagram its a direct connection.
Regards
Marc
>> Regards
>> Marc
>> ________________________________________
>> From: Igor Grinberg [grinberg@compulab.co.il]
>> Sent: 03 March 2014 12:16
>> To: Roger Quadros; Marc Murphy; linux-omap@vger.kernel.org
> Subject: Re: Help needed USB hub disconnected at resume
>
> On 03/03/14 13:06, Roger Quadros wrote:
>> Hi Marc,
>>
>> On 03/03/2014 12:04 PM, Marc Murphy wrote:
>>> Hi,
>>> I am using the latest stable 3.4.80 kernel with some changes to get the EMAC Phy to initialise correctly after a suspend/resume. The platform is AM3517 with most of the system working nice and smoothly. I have 1 issue though and need some advice/help to get the system to use the USB hub I have connected to the EHCI controller after a suspend to memory and resume.
>>>
>>> At boot all is recognised;
>>>
>>> [ 1.486816] usbcore: registered new interface driver cdc_ether
>>> [ 1.493255] usbcore: registered new interface driver cdc_ncm
>>> [ 1.499450] usbcore: registered new interface driver qmi_wwan
>>> [ 1.506622] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
>>> [ 1.513580] ehci-omap.0 supply hsusb0 not found, using dummy regulator
>>> [ 2.521881] ehci-omap ehci-omap.0: OMAP-EHCI Host Controller
>>> [ 2.528411] ehci-omap ehci-omap.0: new USB bus registered, assigned bus number 1
>>> [ 2.536468] ehci-omap ehci-omap.0: irq 77, io mem 0x48064800
>>> [ 2.553070] ehci-omap ehci-omap.0: USB 2.0 started, EHCI 1.00
>>> [ 2.559295] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
>>> [ 2.566436] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
>>> [ 2.574035] usb usb1: Product: OMAP-EHCI Host Controller
>>> [ 2.579620] usb usb1: Manufacturer: Linux 3.4.80 ehci_hcd
>>> [ 2.585296] usb usb1: SerialNumber: ehci-omap.0
>>> [ 2.591278] hub 1-0:1.0: USB hub found
>>> [ 2.595306] hub 1-0:1.0: 3 ports detected
>>>
>>> And I can see everything OK.
>>>
>>> # lsusb
>>> Bus 001 Device 002: ID 0424:2513 Standard Microsystems Corp. 2.0 Hub
>>> Bus 002 Device 002: ID 05e3:0718 Genesys Logic, Inc. IDE/SATA Adapter
>>> Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
>>> Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
>>> Bus 001 Device 003: ID 1199:68a2 Sierra Wireless, Inc.
>>> #
>>> #
>>> # echo mem > /sys/power/state
>>> [ 73.736572] PM: Syncing filesystems ... done.
>>> [ 73.743530] Freezing user space processes ... (elapsed 0.01 seconds) done.
>>> [ 73.766784] Freezing remaining freezable tasks ... (elapsed 0.02 seconds) done.
>>> [ 73.959289] davinci_mdio davinci_mdio.0: timed out waiting for idle
>>> [ 73.968872] PM: suspend of devices complete after 170.410 msecs
>>> [ 73.975433] PM: late suspend of devices complete after 0.305 msecs
>>> [ 73.982635] PM: noirq suspend of devices complete after 0.732 msecs
>>> [ 83.430450] Powerdomain (core_pwrdm) didn't enter target state 1
>>> [ 83.436737] Could not enter target state in pm_suspend
>>> [ 83.443176] PM: noirq resume of devices complete after 0.915 msecs
>>> [ 83.450164] PM: early resume of devices complete after 0.274 msecs
>>> [ 83.457336] <6>Waiting for PHY clock good...
>>> [ 83.463287] davinci_mdio davinci_mdio.0: resetting idled controller
>>> [ 83.471343] net eth0: attached PHY driver [SMSC LAN8710/LAN8720] (mii_bus:phy_addr=davinci_mdio-0:00, id=7c0f1)
>>> [ 84.771881] PM: resume of devices complete after 1315.185 msecs
>>> [ 84.778472] Restarting tasks ...
>>> [ 84.782379] usb 1-1: USB disconnect, device number 2
>>> [ 84.790557] done.
>>> [ 84.792938] mmc0: mmc_rescan_try_freq: trying to init card at 400000 Hz
>>> sh: write error:[ 84.800781] usb 1-1.1: USB disconnect, device number 3
>>> Operation not p[ 84.808349] qmi_wwan 1-1.1:1.8: wwan0: unregister 'qmi_wwan' usb-ehci-omap.0-1.1, Sierra Wireless wwan/QMI device
>>> ermitted
>>> [ 84.859191] mmc1: mmc_rescan_try_freq: trying to init card at 400000 Hz
>>> [ 86.490356] PHY: davinci_mdio-0:00 - Link is Up - 100/Full
>>> #
>>> #
>>> # lsusb
>>> Bus 002 Device 002: ID 05e3:0718 Genesys Logic, Inc. IDE/SATA Adapter
>>> Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
>>> Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
>>> #
>>>
>>> Is there any relevant patch out there that would address the issue that I see ?
>>
>> Does this happen because of OFF mode?
>> Can you please try the tests with off mode disabled?
>>
>> e.g.
>> mount -t debugfs none /sys/kernel/debug
>> echo 0 > /sys/kernel/debug/pm_debug/enable_off_mode
>> suspend & resume
>
> AFAIK, AM3517 does not have OFF mode.
> We had something similar with runtime pm...
> It might be useful to know which hub is this and how is it connected...
>
>>
>> Also please send the output of /sys/kernel/debug/pm_debug/count
>> before suspend and after resume. Thanks.
>
>
>
> --
> Regards,
> Igor.
>
--
Regards,
Igor.
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 13+ messages in thread
* RE: Help needed USB hub disconnected at resume
2014-03-04 6:43 ` Igor Grinberg
2014-03-04 9:48 ` Marc Murphy
@ 2014-03-04 22:34 ` Marc Murphy
2014-03-04 22:44 ` Felipe Balbi
1 sibling, 1 reply; 13+ messages in thread
From: Marc Murphy @ 2014-03-04 22:34 UTC (permalink / raw)
To: 'Igor Grinberg', Roger Quadros,
linux-omap@vger.kernel.org
> -----Original Message-----
> From: linux-omap-owner@vger.kernel.org [mailto:linux-omap-
> owner@vger.kernel.org] On Behalf Of Igor Grinberg
> Sent: 04 March 2014 06:44
> To: Marc Murphy; Roger Quadros; linux-omap@vger.kernel.org
> Subject: Re: Help needed USB hub disconnected at resume
>
> On 03/03/14 16:11, Marc Murphy wrote:
> > Hi Igor
> >
> > The Hub is a Microchip USB2513B-AEZG and is connected to EHCI controller
> port via the DUP_P and DUP_N pins. There is a reset applied to the chip at
> power on.
> >
>
> If the reset signal is sw controllable, you might want to toggle it before the
> EHCI controller resumes.
>
> There is also a USB phy on the way from EHCI controller to the hub.
> You might also want to check if the phy resumes correctly.
> Which phy do you use and how is it reset?
I have now had a look with the schematics and the hardware engineer.
The AM3517 has a PHY connected and it is a SMSC USB3320. The device has a reset connection via GPIO_25.
I have it configured as follows
#define TAM3517_EHCI_RESET 25
static const struct usbhs_omap_board_data tam3517_ehci_pdata __initconst = {
.port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
.port_mode[1] = OMAP_USBHS_PORT_MODE_UNUSED,
.port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
.phy_reset = true,
.reset_gpio_port[0] = TAM3517_EHCI_RESET,
.reset_gpio_port[1] = -EINVAL,
.reset_gpio_port[2] = -EINVAL
};
static __init void tam3517_ehci_init(void)
{
/* Configure GPIO for EHCI port */
omap_mux_init_gpio(TAM3517_EHCI_RESET, OMAP_PIN_OUTPUT);
gpio_request(TAM3517_EHCI_RESET, "USB_RESET");
gpio_direction_output(TAM3517_EHCI_RESET, 1);
gpio_export(TAM3517_EHCI_RESET, 0);
msleep(100);
gpio_set_value(TAM3517_EHCI_RESET, 1);
usbhs_init(&tam3517_ehci_pdata);
}
I have tried without the phy reset control but stull get the same behaviour.
I have asked for some tap wires onto the control signals for the Phy and I will have a look with a scope to make sure the pin is toggled correctly.
If you see anything wrong with the initialisation then please let me know.
Thanks
Marc
>
> > Regards
> > Marc
> > ________________________________________
> > From: Igor Grinberg [grinberg@compulab.co.il]
> > Sent: 03 March 2014 12:16
> > To: Roger Quadros; Marc Murphy; linux-omap@vger.kernel.org
> > Subject: Re: Help needed USB hub disconnected at resume
> >
> > On 03/03/14 13:06, Roger Quadros wrote:
> >> Hi Marc,
> >>
> >> On 03/03/2014 12:04 PM, Marc Murphy wrote:
> >>> Hi,
> >>> I am using the latest stable 3.4.80 kernel with some changes to get the
> EMAC Phy to initialise correctly after a suspend/resume. The platform is
> AM3517 with most of the system working nice and smoothly. I have 1 issue
> though and need some advice/help to get the system to use the USB hub I
> have connected to the EHCI controller after a suspend to memory and
> resume.
> >>>
> >>> At boot all is recognised;
> >>>
> >>> [ 1.486816] usbcore: registered new interface driver cdc_ether
> >>> [ 1.493255] usbcore: registered new interface driver cdc_ncm
> >>> [ 1.499450] usbcore: registered new interface driver qmi_wwan
> >>> [ 1.506622] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
> >>> [ 1.513580] ehci-omap.0 supply hsusb0 not found, using dummy
> regulator
> >>> [ 2.521881] ehci-omap ehci-omap.0: OMAP-EHCI Host Controller
> >>> [ 2.528411] ehci-omap ehci-omap.0: new USB bus registered, assigned
> bus number 1
> >>> [ 2.536468] ehci-omap ehci-omap.0: irq 77, io mem 0x48064800
> >>> [ 2.553070] ehci-omap ehci-omap.0: USB 2.0 started, EHCI 1.00
> >>> [ 2.559295] usb usb1: New USB device found, idVendor=1d6b,
> idProduct=0002
> >>> [ 2.566436] usb usb1: New USB device strings: Mfr=3, Product=2,
> SerialNumber=1
> >>> [ 2.574035] usb usb1: Product: OMAP-EHCI Host Controller
> >>> [ 2.579620] usb usb1: Manufacturer: Linux 3.4.80 ehci_hcd
> >>> [ 2.585296] usb usb1: SerialNumber: ehci-omap.0
> >>> [ 2.591278] hub 1-0:1.0: USB hub found
> >>> [ 2.595306] hub 1-0:1.0: 3 ports detected
> >>>
> >>> And I can see everything OK.
> >>>
> >>> # lsusb
> >>> Bus 001 Device 002: ID 0424:2513 Standard Microsystems Corp. 2.0 Hub
> >>> Bus 002 Device 002: ID 05e3:0718 Genesys Logic, Inc. IDE/SATA
> >>> Adapter Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root
> >>> hub Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
> >>> Bus 001 Device 003: ID 1199:68a2 Sierra Wireless, Inc.
> >>> #
> >>> #
> >>> # echo mem > /sys/power/state
> >>> [ 73.736572] PM: Syncing filesystems ... done.
> >>> [ 73.743530] Freezing user space processes ... (elapsed 0.01 seconds)
> done.
> >>> [ 73.766784] Freezing remaining freezable tasks ... (elapsed 0.02
> seconds) done.
> >>> [ 73.959289] davinci_mdio davinci_mdio.0: timed out waiting for idle
> >>> [ 73.968872] PM: suspend of devices complete after 170.410 msecs
> >>> [ 73.975433] PM: late suspend of devices complete after 0.305 msecs
> >>> [ 73.982635] PM: noirq suspend of devices complete after 0.732 msecs
> >>> [ 83.430450] Powerdomain (core_pwrdm) didn't enter target state 1
> >>> [ 83.436737] Could not enter target state in pm_suspend
> >>> [ 83.443176] PM: noirq resume of devices complete after 0.915 msecs
> >>> [ 83.450164] PM: early resume of devices complete after 0.274 msecs
> >>> [ 83.457336] <6>Waiting for PHY clock good...
> >>> [ 83.463287] davinci_mdio davinci_mdio.0: resetting idled controller
> >>> [ 83.471343] net eth0: attached PHY driver [SMSC LAN8710/LAN8720]
> (mii_bus:phy_addr=davinci_mdio-0:00, id=7c0f1)
> >>> [ 84.771881] PM: resume of devices complete after 1315.185 msecs
> >>> [ 84.778472] Restarting tasks ...
> >>> [ 84.782379] usb 1-1: USB disconnect, device number 2
> >>> [ 84.790557] done.
> >>> [ 84.792938] mmc0: mmc_rescan_try_freq: trying to init card at 400000
> Hz
> >>> sh: write error:[ 84.800781] usb 1-1.1: USB disconnect, device number 3
> >>> Operation not p[ 84.808349] qmi_wwan 1-1.1:1.8: wwan0: unregister
> 'qmi_wwan' usb-ehci-omap.0-1.1, Sierra Wireless wwan/QMI device
> >>> ermitted
> >>> [ 84.859191] mmc1: mmc_rescan_try_freq: trying to init card at 400000
> Hz
> >>> [ 86.490356] PHY: davinci_mdio-0:00 - Link is Up - 100/Full
> >>> #
> >>> #
> >>> # lsusb
> >>> Bus 002 Device 002: ID 05e3:0718 Genesys Logic, Inc. IDE/SATA
> >>> Adapter Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root
> >>> hub Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub #
> >>>
> >>> Is there any relevant patch out there that would address the issue that I
> see ?
> >>
> >> Does this happen because of OFF mode?
> >> Can you please try the tests with off mode disabled?
> >>
> >> e.g.
> >> mount -t debugfs none /sys/kernel/debug echo 0 >
> >> /sys/kernel/debug/pm_debug/enable_off_mode
> >> suspend & resume
> >
> > AFAIK, AM3517 does not have OFF mode.
> > We had something similar with runtime pm...
> > It might be useful to know which hub is this and how is it connected...
> >
> >>
> >> Also please send the output of /sys/kernel/debug/pm_debug/count
> >> before suspend and after resume. Thanks.
> >
> >
> >
> > --
> > Regards,
> > Igor.
> >
>
> --
> Regards,
> Igor.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in the
> body of a message to majordomo@vger.kernel.org More majordomo info at
> http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Help needed USB hub disconnected at resume
2014-03-04 22:34 ` Marc Murphy
@ 2014-03-04 22:44 ` Felipe Balbi
2014-03-04 23:01 ` Marc Murphy
2014-03-04 23:05 ` Marc Murphy
0 siblings, 2 replies; 13+ messages in thread
From: Felipe Balbi @ 2014-03-04 22:44 UTC (permalink / raw)
To: Marc Murphy
Cc: 'Igor Grinberg', Roger Quadros,
linux-omap@vger.kernel.org
[-- Attachment #1: Type: text/plain, Size: 431 bytes --]
Hi,
On Tue, Mar 04, 2014 at 10:34:56PM +0000, Marc Murphy wrote:
> static __init void tam3517_ehci_init(void)
> {
> /* Configure GPIO for EHCI port */
> omap_mux_init_gpio(TAM3517_EHCI_RESET, OMAP_PIN_OUTPUT);
>
> gpio_request(TAM3517_EHCI_RESET, "USB_RESET");
> gpio_direction_output(TAM3517_EHCI_RESET, 1);
> gpio_export(TAM3517_EHCI_RESET, 0);
why are you exporting this gpio ?
--
balbi
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* RE: Help needed USB hub disconnected at resume
2014-03-04 22:44 ` Felipe Balbi
@ 2014-03-04 23:01 ` Marc Murphy
2014-03-04 23:05 ` Marc Murphy
1 sibling, 0 replies; 13+ messages in thread
From: Marc Murphy @ 2014-03-04 23:01 UTC (permalink / raw)
To: 'balbi@ti.com'
Cc: 'Igor Grinberg', Roger Quadros,
linux-omap@vger.kernel.org
> -----Original Message-----
> From: Felipe Balbi [mailto:balbi@ti.com]
> Sent: 04 March 2014 22:44
> To: Marc Murphy
> Cc: 'Igor Grinberg'; Roger Quadros; linux-omap@vger.kernel.org
> Subject: Re: Help needed USB hub disconnected at resume
>
> Hi,
>
> On Tue, Mar 04, 2014 at 10:34:56PM +0000, Marc Murphy wrote:
> > static __init void tam3517_ehci_init(void) {
> > /* Configure GPIO for EHCI port */
> > omap_mux_init_gpio(TAM3517_EHCI_RESET, OMAP_PIN_OUTPUT);
> >
> > gpio_request(TAM3517_EHCI_RESET, "USB_RESET");
> > gpio_direction_output(TAM3517_EHCI_RESET, 1);
> > gpio_export(TAM3517_EHCI_RESET, 0);
>
> why are you exporting this gpio ?
I thought I needed to so that the Phy is reset. I will try with it disabled.
Regards
Marc
>
> --
> balbi
^ permalink raw reply [flat|nested] 13+ messages in thread
* RE: Help needed USB hub disconnected at resume
2014-03-04 22:44 ` Felipe Balbi
2014-03-04 23:01 ` Marc Murphy
@ 2014-03-04 23:05 ` Marc Murphy
2014-03-04 23:42 ` Felipe Balbi
1 sibling, 1 reply; 13+ messages in thread
From: Marc Murphy @ 2014-03-04 23:05 UTC (permalink / raw)
To: 'balbi@ti.com'
Cc: 'Igor Grinberg', Roger Quadros,
linux-omap@vger.kernel.org
> -----Original Message-----
> From: Felipe Balbi [mailto:balbi@ti.com]
> Sent: 04 March 2014 22:44
> To: Marc Murphy
> Cc: 'Igor Grinberg'; Roger Quadros; linux-omap@vger.kernel.org
> Subject: Re: Help needed USB hub disconnected at resume
>
> Hi,
>
> On Tue, Mar 04, 2014 at 10:34:56PM +0000, Marc Murphy wrote:
> > static __init void tam3517_ehci_init(void) {
> > /* Configure GPIO for EHCI port */
> > omap_mux_init_gpio(TAM3517_EHCI_RESET, OMAP_PIN_OUTPUT);
> >
> > gpio_request(TAM3517_EHCI_RESET, "USB_RESET");
> > gpio_direction_output(TAM3517_EHCI_RESET, 1);
> > gpio_export(TAM3517_EHCI_RESET, 0);
>
> why are you exporting this gpio ?
It makes no difference whether I configure the GPIO or not.
Regards
Marc
>
> --
> balbi
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Help needed USB hub disconnected at resume
2014-03-04 23:05 ` Marc Murphy
@ 2014-03-04 23:42 ` Felipe Balbi
2014-03-05 23:29 ` Marc Murphy
0 siblings, 1 reply; 13+ messages in thread
From: Felipe Balbi @ 2014-03-04 23:42 UTC (permalink / raw)
To: Marc Murphy
Cc: 'balbi@ti.com', 'Igor Grinberg', Roger Quadros,
linux-omap@vger.kernel.org
[-- Attachment #1: Type: text/plain, Size: 1165 bytes --]
On Tue, Mar 04, 2014 at 11:05:58PM +0000, Marc Murphy wrote:
> > -----Original Message-----
> > From: Felipe Balbi [mailto:balbi@ti.com]
> > Sent: 04 March 2014 22:44
> > To: Marc Murphy
> > Cc: 'Igor Grinberg'; Roger Quadros; linux-omap@vger.kernel.org
> > Subject: Re: Help needed USB hub disconnected at resume
> >
> > Hi,
> >
> > On Tue, Mar 04, 2014 at 10:34:56PM +0000, Marc Murphy wrote:
> > > static __init void tam3517_ehci_init(void) {
> > > /* Configure GPIO for EHCI port */
> > > omap_mux_init_gpio(TAM3517_EHCI_RESET, OMAP_PIN_OUTPUT);
> > >
> > > gpio_request(TAM3517_EHCI_RESET, "USB_RESET");
> > > gpio_direction_output(TAM3517_EHCI_RESET, 1);
> > > gpio_export(TAM3517_EHCI_RESET, 0);
> >
> > why are you exporting this gpio ?
>
>
> It makes no difference whether I configure the GPIO or not.
gpio_export() is only to expose the gpio to sysfs. Check if that pin is
active high or active low. Then what you need, most likely, is something
like below:
gpio_direction_output(RESET, HIGH);
usleep_range(50000, 2000000);
gpio_set_value(RESET, LOW);
(assuming active high here)
--
balbi
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* RE: Help needed USB hub disconnected at resume
2014-03-04 23:42 ` Felipe Balbi
@ 2014-03-05 23:29 ` Marc Murphy
2014-03-06 9:07 ` Roger Quadros
0 siblings, 1 reply; 13+ messages in thread
From: Marc Murphy @ 2014-03-05 23:29 UTC (permalink / raw)
To: 'balbi@ti.com'
Cc: 'Igor Grinberg', Roger Quadros,
linux-omap@vger.kernel.org
> -----Original Message-----
> From: Felipe Balbi [mailto:balbi@ti.com]
> Sent: 04 March 2014 23:43
> To: Marc Murphy
> Cc: 'balbi@ti.com'; 'Igor Grinberg'; Roger Quadros; linux-
> omap@vger.kernel.org
> Subject: Re: Help needed USB hub disconnected at resume
>
> On Tue, Mar 04, 2014 at 11:05:58PM +0000, Marc Murphy wrote:
> > > -----Original Message-----
> > > From: Felipe Balbi [mailto:balbi@ti.com]
> > > Sent: 04 March 2014 22:44
> > > To: Marc Murphy
> > > Cc: 'Igor Grinberg'; Roger Quadros; linux-omap@vger.kernel.org
> > > Subject: Re: Help needed USB hub disconnected at resume
> > >
> > > Hi,
> > >
> > > On Tue, Mar 04, 2014 at 10:34:56PM +0000, Marc Murphy wrote:
> > > > static __init void tam3517_ehci_init(void) {
> > > > /* Configure GPIO for EHCI port */
> > > > omap_mux_init_gpio(TAM3517_EHCI_RESET, OMAP_PIN_OUTPUT);
> > > >
> > > > gpio_request(TAM3517_EHCI_RESET, "USB_RESET");
> > > > gpio_direction_output(TAM3517_EHCI_RESET, 1);
> > > > gpio_export(TAM3517_EHCI_RESET, 0);
> > >
> > > why are you exporting this gpio ?
> >
> >
> > It makes no difference whether I configure the GPIO or not.
>
> gpio_export() is only to expose the gpio to sysfs. Check if that pin is active
> high or active low. Then what you need, most likely, is something like below:
>
> gpio_direction_output(RESET, HIGH);
> usleep_range(50000, 2000000);
> gpio_set_value(RESET, LOW);
>
> (assuming active high here)
Thanks, the export was for sysfs so that I could toggle the state myself to debug. The reference has now been removed and the toggling left to the driver (ehci)
Igor, I have been looking at the ehci driver and the reset pin of the 3320 is toggled at initialisation but there is no resetting when resuming from sleep. I have created a resume function;
static void ehci_hcd_omap_resume(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
struct usb_hcd *hcd = dev_get_drvdata(dev);
struct ehci_hcd_omap_platform_data *pdata = dev->platform_data;
if (pdata->phy_reset) {
if (gpio_is_valid(pdata->reset_gpio_port[0]))
gpio_set_value(pdata->reset_gpio_port[0], 0);
if (gpio_is_valid(pdata->reset_gpio_port[1]))
gpio_set_value(pdata->reset_gpio_port[1], 0);
/* Hold the PHY in RESET for enough time till DIR is high */
udelay(100);
}
if (pdata->phy_reset) {
/* Hold the PHY in RESET for enough time till
* PHY is settled and ready
*/
udelay(10);
if (gpio_is_valid(pdata->reset_gpio_port[0]))
gpio_set_value(pdata->reset_gpio_port[0], 1);
if (gpio_is_valid(pdata->reset_gpio_port[1]))
gpio_set_value(pdata->reset_gpio_port[1], 1);
}
}
And linked in the static struct platform_driver ehci_hcd_omap_driver = {
.resume = ehci_hcd_omap_resume,
It calls the function at resume and I can see the line toggle on the scope but still the same response from the driver of disconnecting the hub.
I have even stepped through ehci_bus_resume (struct usb_hcd *hcd) and it all seems to be OK with the bringup.
Is there any way to enable more debug so that I can see the path through the pm and hci code ?
I have enabled dynamic debug in the kernel but when I pass the dyndbg modules on the command line I don't seem to get any additional output... e.g.
rootfstype=nfs ip=dhcp nohlt no_console_suspend=1 dyndbg=" module ehci_hcd +p ; module uhci_hcd +p ; module ohci_hcd +p" rw
Marc
>
> --
> balbi
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Help needed USB hub disconnected at resume
2014-03-05 23:29 ` Marc Murphy
@ 2014-03-06 9:07 ` Roger Quadros
0 siblings, 0 replies; 13+ messages in thread
From: Roger Quadros @ 2014-03-06 9:07 UTC (permalink / raw)
To: Marc Murphy, 'balbi@ti.com'
Cc: 'Igor Grinberg', linux-omap@vger.kernel.org
On 03/06/2014 01:29 AM, Marc Murphy wrote:
>> -----Original Message-----
>> From: Felipe Balbi [mailto:balbi@ti.com]
>> Sent: 04 March 2014 23:43
>> To: Marc Murphy
>> Cc: 'balbi@ti.com'; 'Igor Grinberg'; Roger Quadros; linux-
>> omap@vger.kernel.org
>> Subject: Re: Help needed USB hub disconnected at resume
>>
>> On Tue, Mar 04, 2014 at 11:05:58PM +0000, Marc Murphy wrote:
>>>> -----Original Message-----
>>>> From: Felipe Balbi [mailto:balbi@ti.com]
>>>> Sent: 04 March 2014 22:44
>>>> To: Marc Murphy
>>>> Cc: 'Igor Grinberg'; Roger Quadros; linux-omap@vger.kernel.org
>>>> Subject: Re: Help needed USB hub disconnected at resume
>>>>
>>>> Hi,
>>>>
>>>> On Tue, Mar 04, 2014 at 10:34:56PM +0000, Marc Murphy wrote:
>>>>> static __init void tam3517_ehci_init(void) {
>>>>> /* Configure GPIO for EHCI port */
>>>>> omap_mux_init_gpio(TAM3517_EHCI_RESET, OMAP_PIN_OUTPUT);
>>>>>
>>>>> gpio_request(TAM3517_EHCI_RESET, "USB_RESET");
>>>>> gpio_direction_output(TAM3517_EHCI_RESET, 1);
>>>>> gpio_export(TAM3517_EHCI_RESET, 0);
>>>>
>>>> why are you exporting this gpio ?
>>>
>>>
>>> It makes no difference whether I configure the GPIO or not.
>>
>> gpio_export() is only to expose the gpio to sysfs. Check if that pin is active
>> high or active low. Then what you need, most likely, is something like below:
>>
>> gpio_direction_output(RESET, HIGH);
>> usleep_range(50000, 2000000);
>> gpio_set_value(RESET, LOW);
>>
>> (assuming active high here)
>
> Thanks, the export was for sysfs so that I could toggle the state myself to debug. The reference has now been removed and the toggling left to the driver (ehci)
>
> Igor, I have been looking at the ehci driver and the reset pin of the 3320 is toggled at initialisation but there is no resetting when resuming from sleep. I have created a resume function;
>
There should be no need to reset the PHY during suspend/resume.
Can you please try your board on v3.13? A lot of cleanup has been done since 3.4.
cheers,
-roger
> static void ehci_hcd_omap_resume(struct platform_device *pdev)
> {
> struct device *dev = &pdev->dev;
> struct usb_hcd *hcd = dev_get_drvdata(dev);
> struct ehci_hcd_omap_platform_data *pdata = dev->platform_data;
>
>
> if (pdata->phy_reset) {
> if (gpio_is_valid(pdata->reset_gpio_port[0]))
> gpio_set_value(pdata->reset_gpio_port[0], 0);
>
> if (gpio_is_valid(pdata->reset_gpio_port[1]))
> gpio_set_value(pdata->reset_gpio_port[1], 0);
>
> /* Hold the PHY in RESET for enough time till DIR is high */
> udelay(100);
> }
>
> if (pdata->phy_reset) {
> /* Hold the PHY in RESET for enough time till
> * PHY is settled and ready
> */
> udelay(10);
>
> if (gpio_is_valid(pdata->reset_gpio_port[0]))
> gpio_set_value(pdata->reset_gpio_port[0], 1);
>
> if (gpio_is_valid(pdata->reset_gpio_port[1]))
> gpio_set_value(pdata->reset_gpio_port[1], 1);
> }
> }
>
> And linked in the static struct platform_driver ehci_hcd_omap_driver = {
> .resume = ehci_hcd_omap_resume,
>
> It calls the function at resume and I can see the line toggle on the scope but still the same response from the driver of disconnecting the hub.
>
> I have even stepped through ehci_bus_resume (struct usb_hcd *hcd) and it all seems to be OK with the bringup.
>
> Is there any way to enable more debug so that I can see the path through the pm and hci code ?
>
> I have enabled dynamic debug in the kernel but when I pass the dyndbg modules on the command line I don't seem to get any additional output... e.g.
> rootfstype=nfs ip=dhcp nohlt no_console_suspend=1 dyndbg=" module ehci_hcd +p ; module uhci_hcd +p ; module ohci_hcd +p" rw
>
>
> Marc
>>
>> --
>> balbi
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2014-03-06 9:07 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <F690310232FDDF4AB457E8B3EF90DDE0AA85E10B@MARCM-SBS2011.marcmltd.local>
[not found] ` <F690310232FDDF4AB457E8B3EF90DDE0AA85E1E7@MARCM-SBS2011.marcmltd.local>
2014-03-03 10:04 ` Help needed USB hub disconnected at resume Marc Murphy
2014-03-03 11:06 ` Roger Quadros
2014-03-03 12:16 ` Igor Grinberg
2014-03-03 14:11 ` Marc Murphy
2014-03-04 6:43 ` Igor Grinberg
2014-03-04 9:48 ` Marc Murphy
2014-03-04 22:34 ` Marc Murphy
2014-03-04 22:44 ` Felipe Balbi
2014-03-04 23:01 ` Marc Murphy
2014-03-04 23:05 ` Marc Murphy
2014-03-04 23:42 ` Felipe Balbi
2014-03-05 23:29 ` Marc Murphy
2014-03-06 9:07 ` Roger Quadros
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).