From: Amelie DELAUNAY <amelie.delaunay@st.com>
To: John Youn <johnyoun@synopsys.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: <linux-usb@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] usb: dwc2: gadget: Fix GUSBCFG.USBTRDTIM value
Date: Thu, 12 Jan 2017 16:41:24 +0100 [thread overview]
Message-ID: <26c07f46-795b-d561-72ed-0548b63a98d9@st.com> (raw)
In-Reply-To: <1484235416-24497-2-git-send-email-amelie.delaunay@st.com>
Hi all,
Sorry, I did not see Pengcheng Li patch which is exactly the same:
https://patchwork.kernel.org/patch/9347979/
Regards
On 01/12/2017 04:36 PM, Amelie Delaunay wrote:
> USBTrdTim must be programmed to 0x5 when phy has a UTMI+ 16-bit wide
> interface or 0x9 when it has a 8-bit wide interface.
> GUSBCFG reset value (Value After Reset: 0x1400) sets USBTrdTim to 0x5.
> In case of 8-bit UTMI+, without clearing GUSBCFG.USBTRDTIM mask, USBTrdTim
> results in 0xD (0x5 | 0x9).
> That's why we need to clear GUSBCFG.USBTRDTIM mask before setting USBTrdTim
> value, to ensure USBTrdTim is correctly set in case of 8-bit UTMI+.
>
> Signed-off-by: Amelie Delaunay <amelie.delaunay@st.com>
> ---
> drivers/usb/dwc2/gadget.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c
> index c55db4a..86b2076 100644
> --- a/drivers/usb/dwc2/gadget.c
> +++ b/drivers/usb/dwc2/gadget.c
> @@ -3169,7 +3169,7 @@ void dwc2_hsotg_core_init_disconnected(struct dwc2_hsotg *hsotg,
> /* keep other bits untouched (so e.g. forced modes are not lost) */
> usbcfg = dwc2_readl(hsotg->regs + GUSBCFG);
> usbcfg &= ~(GUSBCFG_TOUTCAL_MASK | GUSBCFG_PHYIF16 | GUSBCFG_SRPCAP |
> - GUSBCFG_HNPCAP);
> + GUSBCFG_HNPCAP | GUSBCFG_USBTRDTIM_MASK);
>
> if (hsotg->params.phy_type == DWC2_PHY_TYPE_PARAM_FS &&
> (hsotg->params.speed == DWC2_SPEED_PARAM_FULL ||
> @@ -4131,7 +4131,7 @@ static void dwc2_hsotg_init(struct dwc2_hsotg *hsotg)
> /* keep other bits untouched (so e.g. forced modes are not lost) */
> usbcfg = dwc2_readl(hsotg->regs + GUSBCFG);
> usbcfg &= ~(GUSBCFG_TOUTCAL_MASK | GUSBCFG_PHYIF16 | GUSBCFG_SRPCAP |
> - GUSBCFG_HNPCAP);
> + GUSBCFG_HNPCAP | GUSBCFG_USBTRDTIM_MASK);
>
> /* set the PLL on, remove the HNP/SRP and set the PHY */
> trdtim = (hsotg->phyif == GUSBCFG_PHYIF8) ? 9 : 5;
>
next parent reply other threads:[~2017-01-12 15:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1484235416-24497-1-git-send-email-amelie.delaunay@st.com>
[not found] ` <1484235416-24497-2-git-send-email-amelie.delaunay@st.com>
2017-01-12 15:41 ` Amelie DELAUNAY [this message]
2017-01-12 23:45 ` John Youn
2017-01-12 15:09 [PATCH] Fix USBTrdTim value in case of 8-bit UTMI+ phy Amelie Delaunay
2017-01-12 15:09 ` [PATCH] usb: dwc2: gadget: Fix GUSBCFG.USBTRDTIM value Amelie Delaunay
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=26c07f46-795b-d561-72ed-0548b63a98d9@st.com \
--to=amelie.delaunay@st.com \
--cc=gregkh@linuxfoundation.org \
--cc=johnyoun@synopsys.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.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
all inboxes | Powered by JetHome®