From: Michael Grzeschik <mgr@pengutronix.de>
To: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
Cc: linux-arm-kernel@lists.infradead.org,
linux-phy@lists.infradead.org, vkoul@kernel.org,
kishon@kernel.org, mcoquelin.stm32@gmail.com,
alexandre.torgue@foss.st.com, error27@gmail.com,
kernel@pengutronix.de, linux-stm32@st-md-mailman.stormreply.com,
amelie.delaunay@foss.st.com
Subject: Re: [PATCH v2] phy: stm32-usphyc: add 200 to 300 us delay to fix timeout on some machines
Date: Fri, 10 Mar 2023 11:44:38 +0100 [thread overview]
Message-ID: <20230310104438.GB7352@pengutronix.de> (raw)
In-Reply-To: <27b9e057-bdd7-b4e6-445c-8da700423600@foss.st.com>
[-- Attachment #1.1: Type: text/plain, Size: 1862 bytes --]
Hi Fabrice,
On Tue, Feb 28, 2023 at 06:28:21PM +0100, Fabrice Gasnier wrote:
>On 2/27/23 16:13, Michael Grzeschik wrote:
>> An minimum udelay of 200 us seems to be necessary on some machines. After
>> the setup of the pll, which needs about 100 us to be locked there seem
>> to be additional 100 us to get the phy really functional. Without this
>> delay the usb runs not functional. With this additional short udelay
>> this issue was not reported again.
>>
>> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
>>
>
>Hi Michael,
>
>Thank you for the updates,
>
>Fell free to add my:
>Reviewed-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
Thanks!
Trhough which tree will this be picked?
Wil it be possible to add this to v6.3?
Regards,
Michael
>> ---
>> v1 -> v2: - changed the mdelay to udelay_range(200, 300), like suggested by fabrice
>> - moved the delay to pll enable so it will only be triggered once
>>
>> drivers/phy/st/phy-stm32-usbphyc.c | 3 +++
>> 1 file changed, 3 insertions(+)
>>
>> diff --git a/drivers/phy/st/phy-stm32-usbphyc.c b/drivers/phy/st/phy-stm32-usbphyc.c
>> index 5bb9647b078f12..dd469f57fba7eb 100644
>> --- a/drivers/phy/st/phy-stm32-usbphyc.c
>> +++ b/drivers/phy/st/phy-stm32-usbphyc.c
>> @@ -317,6 +317,9 @@ static int stm32_usbphyc_pll_enable(struct stm32_usbphyc *usbphyc)
>>
>> stm32_usbphyc_set_bits(pll_reg, PLLEN);
>>
>> + /* Wait for maximum lock time */
>> + usleep_range(200, 300);
>> +
>> return 0;
>>
>> reg_disable:
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
[-- Attachment #2: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2023-03-10 10:45 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-24 20:45 [PATCH] phy: stm32-usphyc: add mdelay(1) to fix timeout on some machines Michael Grzeschik
2023-02-01 16:20 ` Fabrice Gasnier
2023-02-13 14:59 ` Michael Grzeschik
2023-02-16 8:30 ` Fabrice Gasnier
2023-02-27 15:13 ` [PATCH v2] phy: stm32-usphyc: add 200 to 300 us delay " Michael Grzeschik
2023-02-28 17:28 ` Fabrice Gasnier
2023-03-10 10:44 ` Michael Grzeschik [this message]
2023-03-20 12:02 ` Michael Grzeschik
2023-03-31 12:06 ` Michael Grzeschik
2023-03-31 13:19 ` Greg KH
2023-03-31 13:27 ` Vinod Koul
2023-03-31 13:29 ` Vinod Koul
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230310104438.GB7352@pengutronix.de \
--to=mgr@pengutronix.de \
--cc=alexandre.torgue@foss.st.com \
--cc=amelie.delaunay@foss.st.com \
--cc=error27@gmail.com \
--cc=fabrice.gasnier@foss.st.com \
--cc=kernel@pengutronix.de \
--cc=kishon@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-phy@lists.infradead.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=vkoul@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox