usb: otg: Add device tree parameter clk-always-on-workaround
The clk-always-on-workaround parameter allows to keep the USB
clocks active upon USB bus suspend when the cable is connected.
This is required for the USB core to respond to remote wakeup.
Add a read for this parameter also for targets which use device tree.
Change-Id: I1feb2bab6cbbcc406dfcc219b33ba7e9f4ea3807
Signed-off-by: Ido Shayevitz <idos@codeaurora.org>
diff --git a/Documentation/devicetree/bindings/usb/msm-hsusb.txt b/Documentation/devicetree/bindings/usb/msm-hsusb.txt
index 23d1505..2ee0461 100644
--- a/Documentation/devicetree/bindings/usb/msm-hsusb.txt
+++ b/Documentation/devicetree/bindings/usb/msm-hsusb.txt
@@ -49,6 +49,9 @@
- qcom,msm_bus,vectors
- qcom,hsusb-otg-lpm-on-dev-suspend: If present then USB enter to
low power mode upon receiving bus suspend.
+- qcom,hsusb-otg-clk-always-on-workaround: If present then USB core clocks
+ remain active upon receiving bus suspend and USB cable is connected.
+ Used for allowing USB to respond for remote wakup.
Example HSUSB OTG controller device node :
usb@f9690000 {
@@ -68,6 +71,7 @@
qcom,hsusb-otg-pclk-src-name = "dfab_usb_clk";
qcom,hsusb-otg-pmic-id-irq = <47>
qcom,hsusb-otg-lpm-on-dev-suspend;
+ qcom,hsusb-otg-clk-always-on-workaround;
qcom,msm_bus,name = "usb2";
qcom,msm_bus,num_cases = <2>;
diff --git a/drivers/usb/otg/msm_otg.c b/drivers/usb/otg/msm_otg.c
index 6530ed6..e479689 100644
--- a/drivers/usb/otg/msm_otg.c
+++ b/drivers/usb/otg/msm_otg.c
@@ -3774,6 +3774,8 @@
"qcom,hsusb-otg-pnoc-errata-fix");
pdata->enable_lpm_on_dev_suspend = of_property_read_bool(node,
"qcom,hsusb-otg-lpm-on-dev-suspend");
+ pdata->core_clk_always_on_workaround = of_property_read_bool(node,
+ "qcom,hsusb-otg-clk-always-on-workaround");
return pdata;
}