Merge branch 'CR_17763_usb_6.6_hal.feng' into 'jh7110-6.6.y-devel'

CR_17763_usb_6.6_hal.feng

See merge request sdk/linux!1088
This commit is contained in:
Atlas Luo
2025-04-22 07:32:12 +00:00

View File

@@ -18,6 +18,8 @@
#include <linux/usb/of.h>
#define USB_125M_CLK_RATE 125000000
#define USB_CLK_MODE_OFF 0x0
#define USB_CLK_MODE_RX_NORMAL_PWR BIT(1)
#define USB_LS_KEEPALIVE_OFF 0x4
#define USB_LS_KEEPALIVE_ENABLE BIT(4)
@@ -78,6 +80,7 @@ static int jh7110_usb2_phy_init(struct phy *_phy)
{
struct jh7110_usb2_phy *phy = phy_get_drvdata(_phy);
int ret;
unsigned int val;
ret = clk_set_rate(phy->usb_125m_clk, USB_125M_CLK_RATE);
if (ret)
@@ -87,6 +90,10 @@ static int jh7110_usb2_phy_init(struct phy *_phy)
if (ret)
return ret;
val = readl(phy->regs + USB_CLK_MODE_OFF);
val |= USB_CLK_MODE_RX_NORMAL_PWR;
writel(val, phy->regs + USB_CLK_MODE_OFF);
return 0;
}