From: justinpopo6@gmail.com
To: alcooperx@gmail.com, kishon@ti.com, vkoul@kernel.org,
f.fainelli@gmail.com, linux-kernel@vger.kernel.org,
linux-phy@lists.infradead.org
Cc: bcm-kernel-feedback-list@broadcom.com,
Justin Chen <justinpopo6@gmail.com>
Subject: [PATCH 4/6] phy: usb: Disable phy auto-suspend
Date: Wed, 5 Oct 2022 14:30:16 -0700 [thread overview]
Message-ID: <1665005418-15807-5-git-send-email-justinpopo6@gmail.com> (raw)
In-Reply-To: <1665005418-15807-1-git-send-email-justinpopo6@gmail.com>
From: Justin Chen <justinpopo6@gmail.com>
The BDC block requires the PLL lock in order to grab the PLL clock.
The phy auto-suspend feature turns off the phy when nothing is attached
leading to the PLL to not lock. This leads the BDC block to grab the AUX
clock instead of the PLL clock. This is not ideal, so lets turn this
feature off.
Signed-off-by: Justin Chen <justinpopo6@gmail.com>
---
drivers/phy/broadcom/phy-brcm-usb-init-synopsys.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/phy/broadcom/phy-brcm-usb-init-synopsys.c b/drivers/phy/broadcom/phy-brcm-usb-init-synopsys.c
index 26e9585e..6a4d478 100644
--- a/drivers/phy/broadcom/phy-brcm-usb-init-synopsys.c
+++ b/drivers/phy/broadcom/phy-brcm-usb-init-synopsys.c
@@ -62,6 +62,7 @@
/* Register definitions for the USB_PHY block in 7211b0 */
#define USB_PHY_PLL_CTL 0x00
+#define USB_PHY_PLL_CTL_PLL_SUSPEND_MASK BIT(27)
#define USB_PHY_PLL_CTL_PLL_RESETB_MASK BIT(30)
#define USB_PHY_PLL_LDO_CTL 0x08
#define USB_PHY_PLL_LDO_CTL_AFE_BG_PWRDWNB_MASK BIT(0)
@@ -259,6 +260,11 @@ static void usb_init_common_7211b0(struct brcm_usb_init_params *params)
brcm_usb_writel(reg, usb_phy + USB_PHY_UTMI_CTL_1);
}
+ /* Disable PLL auto suspend */
+ reg = brcm_usb_readl(usb_phy + USB_PHY_PLL_CTL);
+ reg |= USB_PHY_PLL_CTL_PLL_SUSPEND_MASK;
+ brcm_usb_writel(reg, usb_phy + USB_PHY_PLL_CTL);
+
/* Init the PHY */
reg = USB_PHY_PLL_LDO_CTL_AFE_CORERDY_MASK |
USB_PHY_PLL_LDO_CTL_AFE_LDO_PWRDWNB_MASK |
--
2.7.4
next prev parent reply other threads:[~2022-10-05 21:30 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-05 21:30 [PATCH 0/6] Various bug fixes/improvements for phy-brcm-usb driver justinpopo6
2022-10-05 21:30 ` [PATCH 1/6] phy: usb: Improve port mode selection justinpopo6
2022-10-06 22:05 ` Florian Fainelli
2022-10-05 21:30 ` [PATCH 2/6] phy: usb: s2 WoL wakeup_count not incremented for USB->Eth devices justinpopo6
2022-10-06 22:05 ` Florian Fainelli
2022-10-05 21:30 ` [PATCH 3/6] phy: usb: Migrate to BIT and BITMASK macros justinpopo6
2022-10-06 22:07 ` Florian Fainelli
2022-10-05 21:30 ` justinpopo6 [this message]
2022-10-06 22:07 ` [PATCH 4/6] phy: usb: Disable phy auto-suspend Florian Fainelli
2022-10-05 21:30 ` [PATCH 5/6] phy: usb: Use slow clock for wake enabled suspend justinpopo6
2022-10-06 22:07 ` Florian Fainelli
2022-10-05 21:30 ` [PATCH 6/6] phy: usb: Fix clock imbalance for suspend/resume justinpopo6
2022-10-06 22:08 ` Florian Fainelli
2022-11-01 17:40 ` [PATCH 0/6] Various bug fixes/improvements for phy-brcm-usb driver Justin Chen
2022-11-05 7:43 ` 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=1665005418-15807-5-git-send-email-justinpopo6@gmail.com \
--to=justinpopo6@gmail.com \
--cc=alcooperx@gmail.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=f.fainelli@gmail.com \
--cc=kishon@ti.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--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
all inboxes | Powered by JetHome®