linux-stable/drivers/phy
Yoshihiro Shimoda 3d9038f6f4 phy: renesas: rcar-gen3-usb2: Disable clearing VBUS in over-current
commit e6839c31a6 upstream.

The hardware manual should be revised, but the initial value of
VBCTRL.OCCLREN is set to 1 actually. If the bit is set, the hardware
clears VBCTRL.VBOUT and ADPCTRL.DRVVBUS registers automatically
when the hardware detects over-current signal from a USB power switch.
However, since the hardware doesn't have any registers which
indicates over-current, the driver cannot handle it at all. So, if
"is_otg_channel" hardware detects over-current, since ADPCTRL.DRVVBUS
register is cleared automatically, the channel cannot be used after
that.

To resolve this behavior, this patch sets the VBCTRL.OCCLREN to 0
to keep ADPCTRL.DRVVBUS even if the "is_otg_channel" hardware
detects over-current. (We assume a USB power switch itself protects
over-current and turns the VBUS off.)

This patch is inspired by a BSP patch from Kazuya Mizuguchi.

Fixes: 1114e2d317 ("phy: rcar-gen3-usb2: change the mode to OTG on the combined channel")
Cc: <stable@vger.kernel.org> # v4.5+
Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-09-21 07:15:27 +02:00
..
allwinner phy: sun4i-usb: Make sure to disable PHY0 passby for peripheral mode 2019-05-31 06:47:26 -07:00
amlogic
broadcom License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
hisilicon
lantiq
marvell License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mediatek phy: phy-mtk-tphy: use auto instead of force to bypass utmi signals 2018-08-15 18:12:48 +02:00
motorola phy: cpcap-usb: Fix platform_get_irq_byname's error checking. 2018-03-03 10:24:22 +01:00
qualcomm phy: qcom-qusb2: Fix crash if nvmem cell not specified 2018-06-16 09:45:16 +02:00
ralink
renesas phy: renesas: rcar-gen3-usb2: Disable clearing VBUS in over-current 2019-09-21 07:15:27 +02:00
rockchip phy: rockchip-emmc: retry calpad busy trimming 2018-05-30 07:52:35 +02:00
samsung License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
st
tegra phy: tegra: remove redundant self assignment of 'map' 2019-02-27 10:08:09 +01:00
ti License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Kconfig Merge branch '4.14-features' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2017-09-15 20:43:33 -07:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
phy-core.c phy: work around 'phys' references to usb-nop-xceiv devices 2018-01-23 19:58:16 +01:00
phy-lpc18xx-usb-otg.c
phy-pistachio-usb.c
phy-xgene.c