diff options
author | Alexandre Bailon <abailon@baylibre.com> | 2016-11-07 14:05:06 +0100 |
---|---|---|
committer | Kishon Vijay Abraham I <kishon@ti.com> | 2016-11-18 18:19:15 +0530 |
commit | 23e9b38d8e7250ef1e202aea5df8d268601a3b5f (patch) | |
tree | b4e1d2724002ff40a88fcb6af931f4c75f154625 /drivers/phy | |
parent | fb954c48aea6de309018ecc1b68728d858277975 (diff) | |
download | linux-23e9b38d8e7250ef1e202aea5df8d268601a3b5f.tar.bz2 |
phy: da8xx-usb: Configure CFGCHIP2 to support OTG workaround
If we configure the da8xx OTG phy in OTG mode, neither device or host
mode will work. That is because the PHY is not able to detect and notify
the driver that value of ID pin changed.
To work despite this hardware limitation, the da8xx glue implement a
workaround.
But to work, the workaround require the VBUS sense and the session end
comparator to enabled.
Enable them if the phy is configured in OTG mode.
Signed-off-by: Alexandre Bailon <abailon@baylibre.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Diffstat (limited to 'drivers/phy')
-rw-r--r-- | drivers/phy/phy-da8xx-usb.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/phy/phy-da8xx-usb.c b/drivers/phy/phy-da8xx-usb.c index c85fb0b59729..1b82bff6330f 100644 --- a/drivers/phy/phy-da8xx-usb.c +++ b/drivers/phy/phy-da8xx-usb.c @@ -23,6 +23,8 @@ #include <linux/platform_device.h> #include <linux/regmap.h> +#define PHY_INIT_BITS (CFGCHIP2_SESENDEN | CFGCHIP2_VBDTCTEN) + struct da8xx_usb_phy { struct phy_provider *phy_provider; struct phy *usb11_phy; @@ -208,6 +210,9 @@ static int da8xx_usb_phy_probe(struct platform_device *pdev) dev_warn(dev, "Failed to create usb20 phy lookup\n"); } + regmap_write_bits(d_phy->regmap, CFGCHIP(2), + PHY_INIT_BITS, PHY_INIT_BITS); + return 0; } |