phy: ti: tusb1210: Don't check for write errors when powering on
PATCH 1/1 phy: ti: tusb1210: Don't check for write errors when powering on
On some platforms, like Intel Merrifield, the writing values during power on may timeout:
tusb1210 dwc3.0.auto.ulpi: error -110 writing val 0x41 to reg 0x80 phy phy-dwc3.0.auto.ulpi.0: phy poweron failed --> -110 dwc3 dwc3.0.auto: error -ETIMEDOUT: failed to initialize core
dwc3: probe of dwc3.0.auto failed with error -110
which effectively fails the probe of the USB controller. Drop the check as it was before the culprit commit (see Fixes tag).
--- drivers/phy/ti/phy-tusb1210.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/phy/ti/phy-tusb1210.c +3 -2
@@ -105,8 +105,9 @@ static int tusb1210_power_on(struct phy *phy)msleep (TUSB1210_RESET_TIME_MS );/* Restore the optional eye diagram optimization value */ -return tusb1210_ulpi_write (tusb,TUSB1210_VENDOR_SPECIFIC2 , - tusb->vendor_specific2); +tusb1210_ulpi_write (tusb,TUSB1210_VENDOR_SPECIFIC2 , tusb->vendor_specific2); + +return 0 ; }static int tusb1210_power_off (struct phy *phy)
Signature · 7 lines
2.35.1 -- linux-phy mailing list [email protected] https://lists.infradead.org/mailman/listinfo/linux-phy
Hi
Op 13-06-2022 om 18:08 schreef Andy Shevchenko:
Quoted 4 lines
On some platforms, like Intel Merrifield, the writing values during power on may timeout:
tusb1210 dwc3.0.auto.ulpi: error -110 writing val 0x41 to reg 0x80
with the patch this error continues to appear in the logs
Quoted 3 lines
phy phy-dwc3.0.auto.ulpi.0: phy poweron failed --> -110 dwc3 dwc3.0.auto: error
-ETIMEDOUT: failed to initialize core
dwc3: probe of dwc3.0.auto failed with error -110
these errors are gone
Quoted 1 line
which effectively fails the probe of the USB controller.
and probe of dwc3 succeeds
Tested on Intel Edison (Merrifield)
Quoted 24 lines
Drop the check as it was before the culprit commit (see Fixes tag).
Fixes 09a3512681b3 ("phy: ti: tusb1210: Improve ulpi_read()/_write() error checking")Signed-off-by Andy Shevchenko <[email protected]>--- drivers/phy/ti/phy-tusb1210.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)drivers/phy/ti/phy-tusb1210.c +3
-2@@ -105,8 +105,9 @@ static int tusb1210_power_on(struct phy *phy)msleep (TUSB1210_RESET_TIME_MS );/* Restore the optional eye diagram optimization value */ -return tusb1210_ulpi_write (tusb,TUSB1210_VENDOR_SPECIFIC2 , - tusb->vendor_specific2); +tusb1210_ulpi_write (tusb,TUSB1210_VENDOR_SPECIFIC2 , tusb->vendor_specific2); + +return 0 ; }static int tusb1210_power_off (struct phy *phy)
Signature · 3 lines
linux-phy mailing list [email protected] https://lists.infradead.org/mailman/listinfo/linux-phy
Ferry Toth
Tested-byOp 13-06-2022 om 22:40 schreef Ferry Toth:
Quoted 11 lines
Hi
Op 13-06-2022 om 18:08 schreef Andy Shevchenko:
Quoted 4 lines
On some platforms, like Intel Merrifield, the writing values during power on may timeout:
tusb1210 dwc3.0.auto.ulpi: error -110 writing val
0x41to reg0x80with the patch this error continues to appear in the logs
Quoted 3 lines
phy phy-dwc3.0.auto.ulpi.0: phy poweron failed --> -110 dwc3 dwc3.0.auto: error
-ETIMEDOUT: failed to initialize core
dwc3: probe of dwc3.0.auto failed with error -110
Quoted 6 lines
these errors are gone
Quoted 1 line
which effectively fails the probe of the USB controller.
and probe of dwc3 succeeds
Tested on Intel Edison (Merrifield)
Quoted 23 lines
Quoted 23 lines
Drop the check as it was before the culprit commit (see Fixes tag).
Fixes 09a3512681b3 ("phy: ti: tusb1210: Improve ulpi_read()/_write() error checking")Signed-off-by Andy Shevchenko <[email protected]>---
drivers/phy/ti/phy-tusb1210.c| 5 +++--1 file changed, 3 insertions(+), 2 deletions(-)drivers/phy/ti/phy-tusb1210.c +3
-2@@ -105,8 +105,9 @@ static int tusb1210_power_on(struct phy *phy) msleep(TUSB1210_RESET_TIME_MS); /* Restore the optional eye diagram optimization value */ - return tusb1210_ulpi_write(tusb, TUSB1210_VENDOR_SPECIFIC2, - tusb->vendor_specific2); + tusb1210_ulpi_write(tusb, TUSB1210_VENDOR_SPECIFIC2, tusb->vendor_specific2); + + return 0; } static int tusb1210_power_off(struct phy *phy)
Signature · 3 lines
linux-phy mailing list [email protected] https://lists.infradead.org/mailman/listinfo/linux-phy
Hi,
Quoted 8 lines · Andy Shevchenko
On some platforms, like Intel Merrifield, the writing values during power on may timeout:
tusb1210 dwc3.0.auto.ulpi: error -110 writing val
0x41to reg0x80phy phy-dwc3.0.auto.ulpi.0: phy poweron failed --> -110 dwc3 dwc3.0.auto: error-ETIMEDOUT: failed to initialize core
dwc3: probe of dwc3.0.auto failed with error -110
Quoted 5 lines
which effectively fails the probe of the USB controller. Drop the check as it was before the culprit commit (see Fixes tag).
Fixes 09a3512681b3 ("phy: ti: tusb1210: Improve ulpi_read()/_write() error checking")Signed-off-by Andy Shevchenko <[email protected]>
Copy and pasting my reply about this in another thread to keep everyone up2date:
"""
In my experience with using the phy for charger-type detection on some x86 android tablets which don't have any other way to do charger detection, these errors indicate a real communication issue for reading/writing phy registers. At the same time this usually does not seem to be a big problem since the phy seems to work fine with its power-on defaults.
In case of Bay Trail these errors were related to 2 things:
1. Autosuspend of the phy-interface block in the dwc3, fixed by:
But dwc3_pci_mrfld_properties[] already sets "snps,dis_u2_susphy_quirk", so I guess it is not this.
2. There being no delay in tusb1210_power_on() between toggling the reset IO and then trying to communicate with the phy, fixed in:
Maybe the:
#define TUSB1210_RESET_TIME_MS 30
Added by that commit needs to be a bit bigger for the possibly older phy revision used on the merifield boards?
(note it is fine to just increase it a bit everywhere). """
IMHO it would be good to try and increase TUSB1210_RESET_TIME_MS (start with say 100 and then see if e.g. 50 also works). If increasing that does not work
I'm fine with going with this workaround patch to fix things.
Regards,
Hans
Quoted 20 lines
--- drivers/phy/ti/phy-tusb1210.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)drivers/phy/ti/phy-tusb1210.c +3
-2@@ -105,8 +105,9 @@ static int tusb1210_power_on(struct phy *phy)msleep (TUSB1210_RESET_TIME_MS );/* Restore the optional eye diagram optimization value */ -return tusb1210_ulpi_write (tusb,TUSB1210_VENDOR_SPECIFIC2 , - tusb->vendor_specific2); +tusb1210_ulpi_write (tusb,TUSB1210_VENDOR_SPECIFIC2 , tusb->vendor_specific2); + +return 0 ; }static int tusb1210_power_off (struct phy *phy)
Signature · 3 lines
linux-phy mailing list [email protected] https://lists.infradead.org/mailman/listinfo/linux-phy
Quoted 9 lines · Hans de Goede
Quoted 8 lines · Andy Shevchenko
On some platforms, like Intel Merrifield, the writing values during power on may timeout:
tusb1210 dwc3.0.auto.ulpi: error -110 writing val
0x41to reg0x80phy phy-dwc3.0.auto.ulpi.0: phy poweron failed --> -110 dwc3 dwc3.0.auto: error-ETIMEDOUT: failed to initialize core
dwc3: probe of dwc3.0.auto failed with error -110
Quoted 7 lines
Quoted 5 lines
which effectively fails the probe of the USB controller. Drop the check as it was before the culprit commit (see Fixes tag).
Fixes 09a3512681b3 ("phy: ti: tusb1210: Improve ulpi_read()/_write() error checking")Signed-off-by Andy Shevchenko <[email protected]>Copy and pasting my reply about this in another thread to keep everyone up2date:
Thanks! My replies below.
Quoted 16 lines
"""
In my experience with using the phy for charger-type detection on some x86 android tablets which don't have any other way to do charger detection, these errors indicate a real communication issue for reading/writing phy registers. At the same time this usually does not seem to be a big problem since the phy seems to work fine with its power-on defaults.In case of Bay Trail these errors were related to 2 things:
1. Autosuspend of the phy-interface block in the dwc3, fixed by:
But dwc3_pci_mrfld_properties[] already sets "snps,dis_u2_susphy_quirk", so I guess it is not this.
Quoted 8 lines
2. There being no delay in
tusb1210_power_on()between toggling the reset IO and then trying to communicate with the phy, fixed in:Maybe the:
#define
TUSB1210_RESET_TIME_MS30
Actually it's 50.
Quoted 8 lines
Added by that commit needs to be a bit bigger for the possibly older phy revision used on the merifield boards?
(note it is fine to just increase it a bit everywhere). """
IMHO it would be good to try and increase
TUSB1210_RESET_TIME_MS(start with say 100 and then see if e.g. 50 also works). If increasing that does not work
No help
[ 35.126397] tusb1210 dwc3.0.auto.ulpi: GPIO lookup for consumer reset [ 35.126418] tusb1210 dwc3.0.auto.ulpi: using ACPI for GPIO lookup [ 35.126455] tusb1210 dwc3.0.auto.ulpi: using lookup tables for GPIO lookup [ 35.126465] tusb1210 dwc3.0.auto.ulpi: No GPIO consumer reset found [ 35.126476] tusb1210 dwc3.0.auto.ulpi: GPIO lookup for consumer cs [ 35.126485] tusb1210 dwc3.0.auto.ulpi: using ACPI for GPIO lookup [ 35.126538] tusb1210 dwc3.0.auto.ulpi: using lookup tables for GPIO lookup [ 35.126548] tusb1210 dwc3.0.auto.ulpi: No GPIO consumer cs found [ 40.534107] tusb1210 dwc3.0.auto.ulpi: error -110 writing val 0x41 to reg 0x80
(I put 5000 ms there to be sure)
Quoted 1 line
I'm fine with going with this workaround patch to fix things.
Signature · 2 lines
With Best Regards, Andy Shevchenko
Hi,
Quoted 68 lines · Andy Shevchenko
Quoted 9 lines · Hans de Goede
Quoted 8 lines · Andy Shevchenko
On some platforms, like Intel Merrifield, the writing values during power on may timeout:
tusb1210 dwc3.0.auto.ulpi: error -110 writing val
0x41to reg0x80phy phy-dwc3.0.auto.ulpi.0: phy poweron failed --> -110 dwc3 dwc3.0.auto: error-ETIMEDOUT: failed to initialize core
dwc3: probe of dwc3.0.auto failed with error -110Quoted 7 lines
Quoted 5 lines
which effectively fails the probe of the USB controller. Drop the check as it was before the culprit commit (see Fixes tag).
Fixes 09a3512681b3 ("phy: ti: tusb1210: Improve ulpi_read()/_write() error checking")Signed-off-by Andy Shevchenko <[email protected]>Copy and pasting my reply about this in another thread to keep everyone up2date:
Thanks! My replies below.
Quoted 16 lines
"""
In my experience with using the phy for charger-type detection on some x86 android tablets which don't have any other way to do charger detection, these errors indicate a real communication issue for reading/writing phy registers. At the same time this usually does not seem to be a big problem since the phy seems to work fine with its power-on defaults.In case of Bay Trail these errors were related to 2 things:
1. Autosuspend of the phy-interface block in the dwc3, fixed by:
But dwc3_pci_mrfld_properties[] already sets "snps,dis_u2_susphy_quirk", so I guess it is not this.
Quoted 8 lines
2. There being no delay in
tusb1210_power_on()between toggling the reset IO and then trying to communicate with the phy, fixed in:Maybe the:
#define
TUSB1210_RESET_TIME_MS30Actually it's 50.
Quoted 8 lines
Added by that commit needs to be a bit bigger for the possibly older phy revision used on the merifield boards?
(note it is fine to just increase it a bit everywhere). """
IMHO it would be good to try and increase
TUSB1210_RESET_TIME_MS(start with say 100 and then see if e.g. 50 also works). If increasing that does not workNo help
[ 35.126397] tusb1210 dwc3.0.auto.ulpi: GPIO lookup for consumer reset [ 35.126418] tusb1210 dwc3.0.auto.ulpi: using ACPI for GPIO lookup [ 35.126455] tusb1210 dwc3.0.auto.ulpi: using lookup tables for GPIO lookup [ 35.126465] tusb1210 dwc3.0.auto.ulpi: No GPIO consumer reset found [ 35.126476] tusb1210 dwc3.0.auto.ulpi: GPIO lookup for consumer cs [ 35.126485] tusb1210 dwc3.0.auto.ulpi: using ACPI for GPIO lookup [ 35.126538] tusb1210 dwc3.0.auto.ulpi: using lookup tables for GPIO lookup [ 35.126548] tusb1210 dwc3.0.auto.ulpi: No GPIO consumer cs found [ 40.534107] tusb1210 dwc3.0.auto.ulpi: error -110 writing val 0x41 to reg 0x80
Quoted 3 lines
(I put 5000 ms there to be sure)
Quoted 1 line
I'm fine with going with this workaround patch to fix things.
Ok, so I guess we should just apply this workaround patch to make the error non fatal. Still would be good to dig a little deeper one of these days and see what is going on here...
Regards,
Hans
Signature · 3 lines
linux-phy mailing list [email protected] https://lists.infradead.org/mailman/listinfo/linux-phy
Quoted 3 lines · Hans de Goede
Quoted 2 lines · Andy Shevchenko
Quoted 1 line · Hans de Goede
On 6/13/22 18:08, Andy Shevchenko wrote:
...
Quoted 10 lines
Quoted 10 lines
[ 35.126397] tusb1210 dwc3.0.auto.ulpi: GPIO lookup for consumer reset [ 35.126418] tusb1210 dwc3.0.auto.ulpi: using ACPI for GPIO lookup [ 35.126455] tusb1210 dwc3.0.auto.ulpi: using lookup tables for GPIO lookup [ 35.126465] tusb1210 dwc3.0.auto.ulpi: No GPIO consumer reset found [ 35.126476] tusb1210 dwc3.0.auto.ulpi: GPIO lookup for consumer cs [ 35.126485] tusb1210 dwc3.0.auto.ulpi: using ACPI for GPIO lookup [ 35.126538] tusb1210 dwc3.0.auto.ulpi: using lookup tables for GPIO lookup [ 35.126548] tusb1210 dwc3.0.auto.ulpi: No GPIO consumer cs found [ 40.534107] tusb1210 dwc3.0.auto.ulpi: error -110 writing val 0x41 to reg 0x80
Quoted 7 lines
Quoted 3 lines
(I put 5000 ms there to be sure)
Quoted 1 line
I'm fine with going with this workaround patch to fix things.
Ok, so I guess we should just apply this workaround patch to make the error non fatal. Still would be good to dig a little deeper one of these days and see what is going on here...
Can you give a formal tag?
Signature · 2 lines
With Best Regards, Andy Shevchenko
Hans de Goede
Acked-byHi,
Quoted 19 lines · Andy Shevchenko
Quoted 3 lines · Hans de Goede
Quoted 2 lines · Andy Shevchenko
Quoted 1 line · Hans de Goede
On 6/13/22 18:08, Andy Shevchenko wrote:
...
Quoted 12 lines
Quoted 12 lines
[ 35.126397] tusb1210 dwc3.0.auto.ulpi: GPIO lookup for consumer reset [ 35.126418] tusb1210 dwc3.0.auto.ulpi: using ACPI for GPIO lookup [ 35.126455] tusb1210 dwc3.0.auto.ulpi: using lookup tables for GPIO lookup [ 35.126465] tusb1210 dwc3.0.auto.ulpi: No GPIO consumer reset found [ 35.126476] tusb1210 dwc3.0.auto.ulpi: GPIO lookup for consumer cs [ 35.126485] tusb1210 dwc3.0.auto.ulpi: using ACPI for GPIO lookup [ 35.126538] tusb1210 dwc3.0.auto.ulpi: using lookup tables for GPIO lookup [ 35.126548] tusb1210 dwc3.0.auto.ulpi: No GPIO consumer cs found [ 40.534107] tusb1210 dwc3.0.auto.ulpi: error -110 writing val 0x41 to reg 0x80(I put 5000 ms there to be sure)
Quoted 7 lines
Quoted 5 lines
Quoted 1 line
Quoted 1 line
I'm fine with going with this workaround patch to fix things.
Ok, so I guess we should just apply this workaround patch to make the error non fatal. Still would be good to dig a little deeper one of these days and see what is going on here...
Can you give a formal tag?
Sure:
Regards,
Hans
Quoted 10 lines · Andy Shevchenko
On some platforms, like Intel Merrifield, the writing values during power on may timeout:
tusb1210 dwc3.0.auto.ulpi: error -110 writing val
0x41to reg0x80phy phy-dwc3.0.auto.ulpi.0: phy poweron failed --> -110 dwc3 dwc3.0.auto: error-ETIMEDOUT: failed to initialize core
dwc3: probe of dwc3.0.auto failed with error -110which effectively fails the probe of the USB controller. Drop the check as it was before the culprit commit (see Fixes tag).
Applied, thanks
Signature · 6 lines
~Vinod -- linux-phy mailing list [email protected] https://lists.infradead.org/mailman/listinfo/linux-phy