linux-stable/drivers/phy
Yoshihiro Shimoda 4fb95f2995 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:16:42 +02:00
..
allwinner phy: sun4i-usb: Make sure to disable PHY0 passby for peripheral mode 2019-05-31 06:46:20 -07:00
amlogic phy: amlogic: add USB3 PHY support for Meson GXL and GXM 2018-03-16 13:40:44 +05:30
broadcom Merge 4.18-rc7 into usb-next 2018-07-30 10:04:58 +02:00
hisilicon phy: add inno-usb2-phy driver for hi3798cv200 SoC 2018-03-16 16:55:29 +05:30
lantiq phy: Add an USB PHY driver for the Lantiq SoCs using the RCU module 2017-09-04 21:19:02 +02:00
marvell phy: mvebu-cp110-comphy: switch to SPDX identifier 2018-07-24 11:12:15 +05:30
mediatek phy: phy-mtk-tphy: add property for BC12 2018-07-10 13:45:08 +05:30
motorola phy: mapphone-mdm6600: add gpiolib dependency 2019-05-31 06:46:20 -07:00
qualcomm phy: ath79-usb: Fix the main reset name to match the DT binding 2019-03-05 17:58:48 +01:00
ralink phy: add 'depends on HAS_IOMEM' to fix unmet dependency 2018-03-16 13:40:45 +05:30
renesas phy: renesas: rcar-gen3-usb2: Disable clearing VBUS in over-current 2019-09-21 07:16:42 +02:00
rockchip phy: rockchip-typec: fall back to working in host-mode if extcon is missing. 2018-03-16 16:55:37 +05:30
samsung phy: exynos-mipi-video: Simplify code by using regmap_update_bits() 2018-04-25 10:52:59 +05:30
st phy: stm32: fix usbphyc static checker and checkpatch warnings 2018-05-20 21:51:25 +05:30
tegra phy: tegra: Convert to use match_string() helper 2018-05-20 21:51:22 +05:30
ti phy: ti-pipe3: fix missing bit-wise or operator when assigning val 2019-05-25 18:23:27 +02: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: core: Allow phy_pm_runtime_xxx API calls with NULL phy 2018-04-25 10:52:59 +05:30
phy-lpc18xx-usb-otg.c phy: lpc18xx-usb-otg: error handling in lpc18xx_usb_otg_phy_power_on() 2018-03-16 13:40:42 +05:30
phy-pistachio-usb.c
phy-xgene.c