Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

phy: usb: Fix incorrect clearing of tca_drv_sel bit in SETUP reg for 7211

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>
Link: https://lore.kernel.org/r/20201002190115.48017-1-alcooperx@gmail.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Al Cooper and committed by
Vinod Koul
209c8058 3650b228

-5
-5
drivers/phy/broadcom/phy-brcm-usb-init-synopsys.c
··· 270 270 reg |= params->mode << USB_PHY_UTMI_CTL_1_PHY_MODE_SHIFT; 271 271 brcm_usb_writel(reg, usb_phy + USB_PHY_UTMI_CTL_1); 272 272 273 - /* Fix the incorrect default */ 274 - reg = brcm_usb_readl(ctrl + USB_CTRL_SETUP); 275 - reg &= ~USB_CTRL_SETUP_tca_drv_sel_MASK; 276 - brcm_usb_writel(reg, ctrl + USB_CTRL_SETUP); 277 - 278 273 usb_init_common(params); 279 274 280 275 /*