summaryrefslogtreecommitdiff
path: root/drivers/phy/allwinner/phy-sun4i-usb.c
diff options
context:
space:
mode:
authorJagan Teki <jagan@amarulasolutions.com>2018-07-20 12:34:22 +0530
committerJagan Teki <jagan@amarulasolutions.com>2018-07-31 11:41:49 +0530
commit69aa1b234e14503a95f43e33f0b3d4174f350bd2 (patch)
tree0f4a25280da598de3d82fd01410c597df654e300 /drivers/phy/allwinner/phy-sun4i-usb.c
parent52185b094d6283808d67d64949891edbe26abba2 (diff)
phy: sun4i-usb: Update PHY#3 rst_mask only for H3_H5
Only H3 and H5 have 4 PHYS so restrict rst_mask only for them by checking PHY id as 3 and update the proper bits. Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> Tested-by: Jagan Teki <jagan@amarulasolutions.com>
Diffstat (limited to 'drivers/phy/allwinner/phy-sun4i-usb.c')
-rw-r--r--drivers/phy/allwinner/phy-sun4i-usb.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/phy/allwinner/phy-sun4i-usb.c b/drivers/phy/allwinner/phy-sun4i-usb.c
index 3096f12c1c..a7d7e3f044 100644
--- a/drivers/phy/allwinner/phy-sun4i-usb.c
+++ b/drivers/phy/allwinner/phy-sun4i-usb.c
@@ -117,9 +117,6 @@ struct sun4i_usb_phy_info {
.gpio_vbus = CONFIG_USB3_VBUS_PIN,
.gpio_vbus_det = NULL,
.gpio_id_det = NULL,
-#ifdef CONFIG_MACH_SUN6I
- .rst_mask = (CCM_USB_CTRL_PHY3_RST | CCM_USB_CTRL_PHY3_CLK),
-#endif
},
};
@@ -460,6 +457,8 @@ static int sun4i_usb_phy_probe(struct udevice *dev)
phy->id = i;
phy->rst_mask = info->rst_mask;
+ if ((data->cfg->type == sun8i_h3_phy) && (phy->id == 3))
+ phy->rst_mask = (BIT(3) | BIT(11));
};
debug("Allwinner Sun4I USB PHY driver loaded\n");