linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] phy: usb: Fix incorrect clearing of tca_drv_sel bit in SETUP reg for 7211
@ 2020-10-02 19:01 Al Cooper
  2020-10-02 20:21 ` Florian Fainelli
  2020-10-28 16:11 ` Vinod Koul
  0 siblings, 2 replies; 3+ messages in thread
From: Al Cooper @ 2020-10-02 19:01 UTC (permalink / raw)
  To: linux-kernel
  Cc: Al Cooper, bcm-kernel-feedback-list, Florian Fainelli,
	Kishon Vijay Abraham I, Vinod Koul

The 7211a0 has a tca_drv_sel bit in the USB SETUP register that
should never be enabled. This feature is only used if there is a
USB Type-C PHY, and the 7211 does not have one. If the bit is
enabled, the VBUS signal will never be asserted. In the 7211a0,
the bit was incorrectly defaulted to on so the driver had to clear
the bit. In the 7211c0 the state was inverted so the driver should
no longer clear the bit. This hasn't been a problem because all
current 7211 boards don't use the VBUS signal, but there are some
future customer boards that may use it.

Signed-off-by: Al Cooper <alcooperx@gmail.com>
---
 drivers/phy/broadcom/phy-brcm-usb-init-synopsys.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/phy/broadcom/phy-brcm-usb-init-synopsys.c b/drivers/phy/broadcom/phy-brcm-usb-init-synopsys.c
index 456dc4a100c2..e63457e145c7 100644
--- a/drivers/phy/broadcom/phy-brcm-usb-init-synopsys.c
+++ b/drivers/phy/broadcom/phy-brcm-usb-init-synopsys.c
@@ -270,11 +270,6 @@ static void usb_init_common_7211b0(struct brcm_usb_init_params *params)
 	reg |= params->mode << USB_PHY_UTMI_CTL_1_PHY_MODE_SHIFT;
 	brcm_usb_writel(reg, usb_phy + USB_PHY_UTMI_CTL_1);
 
-	/* Fix the incorrect default */
-	reg = brcm_usb_readl(ctrl + USB_CTRL_SETUP);
-	reg &= ~USB_CTRL_SETUP_tca_drv_sel_MASK;
-	brcm_usb_writel(reg, ctrl + USB_CTRL_SETUP);
-
 	usb_init_common(params);
 
 	/*
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] phy: usb: Fix incorrect clearing of tca_drv_sel bit in SETUP reg for 7211
  2020-10-02 19:01 [PATCH] phy: usb: Fix incorrect clearing of tca_drv_sel bit in SETUP reg for 7211 Al Cooper
@ 2020-10-02 20:21 ` Florian Fainelli
  2020-10-28 16:11 ` Vinod Koul
  1 sibling, 0 replies; 3+ messages in thread
From: Florian Fainelli @ 2020-10-02 20:21 UTC (permalink / raw)
  To: Al Cooper, linux-kernel
  Cc: bcm-kernel-feedback-list, Kishon Vijay Abraham I, Vinod Koul



On 10/2/2020 12:01 PM, Al Cooper wrote:
> The 7211a0 has a tca_drv_sel bit in the USB SETUP register that
> should never be enabled. This feature is only used if there is a
> USB Type-C PHY, and the 7211 does not have one. If the bit is
> enabled, the VBUS signal will never be asserted. In the 7211a0,
> the bit was incorrectly defaulted to on so the driver had to clear
> the bit. In the 7211c0 the state was inverted so the driver should
> no longer clear the bit. This hasn't been a problem because all
> current 7211 boards don't use the VBUS signal, but there are some
> future customer boards that may use it.
> 
> Signed-off-by: Al Cooper <alcooperx@gmail.com>

Acked-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] phy: usb: Fix incorrect clearing of tca_drv_sel bit in SETUP reg for 7211
  2020-10-02 19:01 [PATCH] phy: usb: Fix incorrect clearing of tca_drv_sel bit in SETUP reg for 7211 Al Cooper
  2020-10-02 20:21 ` Florian Fainelli
@ 2020-10-28 16:11 ` Vinod Koul
  1 sibling, 0 replies; 3+ messages in thread
From: Vinod Koul @ 2020-10-28 16:11 UTC (permalink / raw)
  To: Al Cooper
  Cc: linux-kernel, bcm-kernel-feedback-list, Florian Fainelli,
	Kishon Vijay Abraham I

On 02-10-20, 15:01, Al Cooper wrote:
> The 7211a0 has a tca_drv_sel bit in the USB SETUP register that
> should never be enabled. This feature is only used if there is a
> USB Type-C PHY, and the 7211 does not have one. If the bit is
> enabled, the VBUS signal will never be asserted. In the 7211a0,
> the bit was incorrectly defaulted to on so the driver had to clear
> the bit. In the 7211c0 the state was inverted so the driver should
> no longer clear the bit. This hasn't been a problem because all
> current 7211 boards don't use the VBUS signal, but there are some
> future customer boards that may use it.

Applied, thanks

-- 
~Vinod

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-10-28 22:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-02 19:01 [PATCH] phy: usb: Fix incorrect clearing of tca_drv_sel bit in SETUP reg for 7211 Al Cooper
2020-10-02 20:21 ` Florian Fainelli
2020-10-28 16:11 ` Vinod Koul

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).