Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions arch/arm64/boot/dts/qcom/glymur.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -5493,8 +5493,6 @@
<&intc GIC_SPI 163 IRQ_TYPE_LEVEL_HIGH>,
<&pdc 12 IRQ_TYPE_LEVEL_HIGH>,
<&pdc 11 IRQ_TYPE_LEVEL_HIGH>,
<&pdc 14 IRQ_TYPE_LEVEL_HIGH>,
<&pdc 13 IRQ_TYPE_LEVEL_HIGH>,
<&pdc 78 IRQ_TYPE_LEVEL_HIGH>,
<&pdc 77 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "dwc_usb3",
Expand All @@ -5504,8 +5502,6 @@
"hs_phy_2",
"dp_hs_phy_1",
"dm_hs_phy_1",
"dp_hs_phy_2",
"dm_hs_phy_2",
"ss_phy_1",
"ss_phy_2";

Expand Down
10 changes: 5 additions & 5 deletions drivers/clk/qcom/gcc-glymur.c
Original file line number Diff line number Diff line change
Expand Up @@ -7785,7 +7785,7 @@ static struct gdsc gcc_usb20_prim_gdsc = {
.pd = {
.name = "gcc_usb20_prim_gdsc",
},
.pwrsts = PWRSTS_OFF_ON,
.pwrsts = PWRSTS_RET_ON,
.flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE,
};

Expand All @@ -7797,7 +7797,7 @@ static struct gdsc gcc_usb30_mp_gdsc = {
.pd = {
.name = "gcc_usb30_mp_gdsc",
},
.pwrsts = PWRSTS_OFF_ON,
.pwrsts = PWRSTS_RET_ON,
.flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE,
};

Expand All @@ -7809,7 +7809,7 @@ static struct gdsc gcc_usb30_prim_gdsc = {
.pd = {
.name = "gcc_usb30_prim_gdsc",
},
.pwrsts = PWRSTS_OFF_ON,
.pwrsts = PWRSTS_RET_ON,
.flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE,
};

Expand All @@ -7821,7 +7821,7 @@ static struct gdsc gcc_usb30_sec_gdsc = {
.pd = {
.name = "gcc_usb30_sec_gdsc",
},
.pwrsts = PWRSTS_OFF_ON,
.pwrsts = PWRSTS_RET_ON,
.flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE,
};

Expand All @@ -7833,7 +7833,7 @@ static struct gdsc gcc_usb30_tert_gdsc = {
.pd = {
.name = "gcc_usb30_tert_gdsc",
},
.pwrsts = PWRSTS_OFF_ON,
.pwrsts = PWRSTS_RET_ON,
.flags = POLL_CFG_GDSCR | RETAIN_FF_ENABLE,
};

Expand Down
3 changes: 3 additions & 0 deletions drivers/phy/qualcomm/phy-qcom-eusb2-repeater.c
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,10 @@ static int eusb2_repeater_set_mode(struct phy *phy,
static int eusb2_repeater_exit(struct phy *phy)
{
struct eusb2_repeater *rptr = phy_get_drvdata(phy);
struct regmap *regmap = rptr->regmap;
u32 base = rptr->base;

regmap_write(regmap, base + EUSB2_EN_CTL1, 0);
return regulator_bulk_disable(rptr->cfg->num_vregs, rptr->vregs);
}

Expand Down
3 changes: 3 additions & 0 deletions drivers/usb/dwc3/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1694,6 +1694,9 @@ static void dwc3_get_software_properties(struct dwc3 *dwc,
if (properties->needs_full_reinit)
dwc->needs_full_reinit = true;

if (properties->skip_phy_init)
dwc->skip_phy_init = true;

dwc->gsbuscfg0_reqinfo = DWC3_GSBUSCFG0_REQINFO_UNSPECIFIED;

if (properties->gsbuscfg0_reqinfo !=
Expand Down
1 change: 1 addition & 0 deletions drivers/usb/dwc3/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -1415,6 +1415,7 @@ struct dwc3 {
unsigned wakeup_configured:1;
unsigned suspended:1;
unsigned susphy_state:1;
unsigned skip_phy_init:1;

u16 imod_interval;

Expand Down
16 changes: 1 addition & 15 deletions drivers/usb/dwc3/dwc3-qcom.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#include <linux/usb/hcd.h>
#include <linux/pm_domain.h>
#include <linux/usb.h>
#include <linux/property.h>
#include <linux/usb/qcom_eud.h>
#include "core.h"
#include "glue.h"
Expand Down Expand Up @@ -448,16 +447,6 @@ static irqreturn_t qcom_dwc3_resume_irq(int irq, void *data)
return IRQ_HANDLED;
}

static int dwc3_qcom_set_swnode(struct device *dev)
{
const struct property_entry props[] = {
PROPERTY_ENTRY_BOOL("xhci-skip-phy-init-quirk"),
{}
};

return device_create_managed_software_node(dev, props, NULL);
}

static void dwc3_qcom_select_utmi_clk(struct dwc3_qcom *qcom)
{
/* Configure dwc3 to use UTMI clock as PIPE clock not present */
Expand Down Expand Up @@ -735,10 +724,6 @@ static int dwc3_qcom_probe(struct platform_device *pdev)
if (ignore_pipe_clk)
dwc3_qcom_select_utmi_clk(qcom);

ret = dwc3_qcom_set_swnode(dev);
if (ret)
goto clk_disable;

qcom->mode = usb_get_dr_mode(dev);

if (qcom->mode == USB_DR_MODE_HOST) {
Expand All @@ -761,6 +746,7 @@ static int dwc3_qcom_probe(struct platform_device *pdev)
probe_data.res = &res;
probe_data.ignore_clocks_and_resets = true;
probe_data.properties = DWC3_DEFAULT_PROPERTIES;
probe_data.properties.skip_phy_init = true;
ret = dwc3_core_probe(&probe_data);
if (ret) {
ret = dev_err_probe(dev, ret, "failed to register DWC3 Core\n");
Expand Down
2 changes: 2 additions & 0 deletions drivers/usb/dwc3/glue.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@
* @gsbuscfg0_reqinfo: Value to be programmed in the GSBUSCFG0.REQINFO field
* @needs_full_reinit: indicate the controller may not remain power during system
* pm and need full initialization
* @skip_phy_init: skip xHCI PHY initialization on host init
*/
struct dwc3_properties {
u32 gsbuscfg0_reqinfo;
unsigned needs_full_reinit:1;
unsigned skip_phy_init:1;
};

#define DWC3_DEFAULT_PROPERTIES ((struct dwc3_properties){ \
Expand Down
5 changes: 4 additions & 1 deletion drivers/usb/dwc3/host.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ static int dwc3_host_get_irq(struct dwc3 *dwc)

int dwc3_host_init(struct dwc3 *dwc)
{
struct property_entry props[6];
struct property_entry props[7];
struct platform_device *xhci;
int ret, irq;
int prop_idx = 0;
Expand Down Expand Up @@ -173,6 +173,9 @@ int dwc3_host_init(struct dwc3 *dwc)
if (dwc->usb2_lpm_disable)
props[prop_idx++] = PROPERTY_ENTRY_BOOL("usb2-lpm-disable");

if (dwc->skip_phy_init)
props[prop_idx++] = PROPERTY_ENTRY_BOOL("xhci-skip-phy-init-quirk");

/**
* WORKAROUND: dwc3 revisions <=3.00a have a limitation
* where Port Disable command doesn't work.
Expand Down
Loading