diff options
author | Roman Stratiienko <r.stratiienko@gmail.com> | 2020-05-12 21:24:49 +0300 |
---|---|---|
committer | Jagan Teki <jagan@amarulasolutions.com> | 2020-06-01 22:37:51 +0530 |
commit | 462a9c7a9ccec444ecb5b8bc3ee3edecbab7e18c (patch) | |
tree | bb896fe665a67faae2c3778f4f393de378e68c97 /drivers/phy | |
parent | d09b832cd8ccb7e37e2b188394df5a73d7074c3b (diff) | |
download | u-boot-462a9c7a9ccec444ecb5b8bc3ee3edecbab7e18c.tar.gz |
phy: sun4i-usb: Align H6 initialization logic with the kernel
H6 SOC needs additional initialization of PHY registers. Corresponding
changes can be found in the kernel patch [1].
Without this changes there is no enumeration of 'musb' gadget.
[1] - https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ae409cc7c3cdb9ac4a1dba3eae70efec3d6b6c79
Fixes: 35fa673e0e5f ("sunxi: phy: Add USB PHY support for Allwinner H6")
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
Diffstat (limited to 'drivers/phy')
-rw-r--r-- | drivers/phy/allwinner/phy-sun4i-usb.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/phy/allwinner/phy-sun4i-usb.c b/drivers/phy/allwinner/phy-sun4i-usb.c index b4bae22c2c..f050645044 100644 --- a/drivers/phy/allwinner/phy-sun4i-usb.c +++ b/drivers/phy/allwinner/phy-sun4i-usb.c @@ -282,7 +282,8 @@ static int sun4i_usb_phy_init(struct phy *phy) return ret; } - if (data->cfg->type == sun8i_a83t_phy) { + if (data->cfg->type == sun8i_a83t_phy || + data->cfg->type == sun50i_h6_phy) { if (phy->id == 0) { val = readl(data->base + data->cfg->phyctl_offset); val |= PHY_CTL_VBUSVLDEXT; @@ -324,7 +325,8 @@ static int sun4i_usb_phy_exit(struct phy *phy) int ret; if (phy->id == 0) { - if (data->cfg->type == sun8i_a83t_phy) { + if (data->cfg->type == sun8i_a83t_phy || + data->cfg->type == sun50i_h6_phy) { void __iomem *phyctl = data->base + data->cfg->phyctl_offset; |