usb: dwc3-msm: Request for otg_interrupt irq

DWC3 has separate irq line for OTG interrupts (e.g. ID / BSV).
These interrupts are needed to detect cable connect and disconnect
events. Hence, request for this interrupt line from OTG driver.
Also, update device tree binding documentation for DWC3 core.

Change-Id: Ie97e4b3b5dcf840eabeb01b5c5d6531a8a70a3c9
Signed-off-by: Manu Gautam <mgautam@codeaurora.org>
This commit is contained in:
Manu Gautam 2012-06-21 10:17:53 +05:30 committed by Stephen Boyd
parent f9c721b247
commit 11f413581a
3 changed files with 21 additions and 6 deletions

View file

@ -3,7 +3,13 @@ MSM SuperSpeed USB3.0 SoC controller
Required properties :
- compatible : should be "qcom,dwc-usb3-msm"
- reg : offset and length of the register set in the memory map
- interrupts: IRQ line
- interrupts: IRQ lines used by this controller
- interrupt-names : Required interrupt resource entries are:
"irq" : Interrupt for DWC3 core
"otg_irq" : Interrupt for DWC3 core's OTG Events
- <supply-name>-supply: phandle to the regulator device tree node
Required "supply-name" examples are "SSUSB_VDDCX", "SSUSB_1p8",
"HSUSB_VDDCX", "HSUSB_1p8", "HSUSB_3p3".
- qcom,dwc-usb3-msm-dbm-eps: Number of endpoints avaliable for
the DBM (Device Bus Manager). The DBM is HW unit which is part of
the MSM USB3.0 core (which also includes the Synopsys DesignWare
@ -12,7 +18,13 @@ Required properties :
Example MSM USB3.0 controller device node :
usb@f9200000 {
compatible = "qcom,dwc-usb3-msm";
reg = <0xf9200000 0xCCFF>;
interrupts = <0 131 0>
reg = <0xF9200000 0xFA000>;
interrupts = <0 131 0 0 179 0>;
interrupt-names = "irq", "otg_irq";
SSUSB_VDDCX-supply = <&pm8841_s2>;
SSUSB_1p8-supply = <&pm8941_l6>;
HSUSB_VDDCX-supply = <&pm8841_s2>;
HSUSB_1p8-supply = <&pm8941_l6>;
HSUSB_3p3-supply = <&pm8941_l24>;
qcom,dwc-usb3-msm-dbm-eps = <4>
};

View file

@ -321,7 +321,8 @@
qcom,ssusb@F9200000 {
compatible = "qcom,dwc-usb3-msm";
reg = <0xF9200000 0xFA000>;
interrupts = <0 131 0>;
interrupts = <0 131 0 0 179 0>;
interrupt-names = "irq", "otg_irq";
SSUSB_VDDCX-supply = <&pm8841_s2>;
SSUSB_1p8-supply = <&pm8941_l6>;
HSUSB_VDDCX-supply = <&pm8841_s2>;

View file

@ -579,9 +579,11 @@ int dwc3_otg_init(struct dwc3 *dwc)
return -ENOMEM;
}
dotg->irq = platform_get_irq(to_platform_device(dwc->dev), 0);
/* DWC3 has separate IRQ line for OTG events (ID/BSV etc.) */
dotg->irq = platform_get_irq_byname(to_platform_device(dwc->dev),
"otg_irq");
if (dotg->irq < 0) {
dev_err(dwc->dev, "%s: missing IRQ\n", __func__);
dev_err(dwc->dev, "%s: missing OTG IRQ\n", __func__);
ret = -ENODEV;
goto err1;
}