Loading Documentation/devicetree/bindings/usb/msm-hsusb.txt +1 −0 Original line number Diff line number Diff line Loading @@ -196,6 +196,7 @@ Optional properties : the USB host controller and its RESET_N signal is connected to this ext-hub-reset-gpio GPIO. It should be driven LOW to RESET the HUB. - qcom,usb2-enable-uicc: If present, usb2 port will be used for uicc card connection. - usb-phy: phandle for the PHY device, if described as a separate device tree node Example MSM HSUSB EHCI controller device node : ehci: qcom,ehci-host@f9a55000 { Loading drivers/usb/host/ehci-msm2.c +23 −2 Original line number Diff line number Diff line Loading @@ -43,6 +43,7 @@ #include <linux/usb/ulpi.h> #include <linux/usb/msm_hsusb_hw.h> #include <linux/usb/msm_hsusb.h> #include <linux/usb/phy.h> #include <linux/of.h> #include <linux/debugfs.h> Loading Loading @@ -657,7 +658,12 @@ static int msm_hsusb_reset(struct msm_hcd *mhcd) USB_PHY_CTRL2); /* Reset USB PHY after performing USB Link RESET */ if (hcd->phy) { usb_phy_reset(hcd->phy); usb_phy_init(hcd->phy); } else { msm_usb_phy_reset(mhcd); } msleep(100); Loading Loading @@ -1520,7 +1526,19 @@ static int ehci_msm2_probe(struct platform_device *pdev) goto disable_ldo; } if (pdata && pdata->use_sec_phy) hcd->phy = devm_usb_get_phy_by_phandle(&pdev->dev, "usb-phy", 0); if (IS_ERR(hcd->phy)) { if (PTR_ERR(hcd->phy) == -EPROBE_DEFER) { dev_dbg(&pdev->dev, "usb-phy not probed yet\n"); ret = -EPROBE_DEFER; goto vbus_deinit; } hcd->phy = NULL; } if (hcd->phy) usb_phy_init(hcd->phy); else if (pdata && pdata->use_sec_phy) mhcd->usb_phy_ctrl_reg = USB_PHY_CTRL2; else mhcd->usb_phy_ctrl_reg = USB_PHY_CTRL; Loading Loading @@ -1671,6 +1689,9 @@ static int ehci_msm2_remove(struct platform_device *pdev) usb_remove_hcd(hcd); if (hcd->phy) usb_phy_shutdown(hcd->phy); if (mhcd->xo_clk) { clk_disable_unprepare(mhcd->xo_clk); clk_put(mhcd->xo_clk); Loading Loading
Documentation/devicetree/bindings/usb/msm-hsusb.txt +1 −0 Original line number Diff line number Diff line Loading @@ -196,6 +196,7 @@ Optional properties : the USB host controller and its RESET_N signal is connected to this ext-hub-reset-gpio GPIO. It should be driven LOW to RESET the HUB. - qcom,usb2-enable-uicc: If present, usb2 port will be used for uicc card connection. - usb-phy: phandle for the PHY device, if described as a separate device tree node Example MSM HSUSB EHCI controller device node : ehci: qcom,ehci-host@f9a55000 { Loading
drivers/usb/host/ehci-msm2.c +23 −2 Original line number Diff line number Diff line Loading @@ -43,6 +43,7 @@ #include <linux/usb/ulpi.h> #include <linux/usb/msm_hsusb_hw.h> #include <linux/usb/msm_hsusb.h> #include <linux/usb/phy.h> #include <linux/of.h> #include <linux/debugfs.h> Loading Loading @@ -657,7 +658,12 @@ static int msm_hsusb_reset(struct msm_hcd *mhcd) USB_PHY_CTRL2); /* Reset USB PHY after performing USB Link RESET */ if (hcd->phy) { usb_phy_reset(hcd->phy); usb_phy_init(hcd->phy); } else { msm_usb_phy_reset(mhcd); } msleep(100); Loading Loading @@ -1520,7 +1526,19 @@ static int ehci_msm2_probe(struct platform_device *pdev) goto disable_ldo; } if (pdata && pdata->use_sec_phy) hcd->phy = devm_usb_get_phy_by_phandle(&pdev->dev, "usb-phy", 0); if (IS_ERR(hcd->phy)) { if (PTR_ERR(hcd->phy) == -EPROBE_DEFER) { dev_dbg(&pdev->dev, "usb-phy not probed yet\n"); ret = -EPROBE_DEFER; goto vbus_deinit; } hcd->phy = NULL; } if (hcd->phy) usb_phy_init(hcd->phy); else if (pdata && pdata->use_sec_phy) mhcd->usb_phy_ctrl_reg = USB_PHY_CTRL2; else mhcd->usb_phy_ctrl_reg = USB_PHY_CTRL; Loading Loading @@ -1671,6 +1689,9 @@ static int ehci_msm2_remove(struct platform_device *pdev) usb_remove_hcd(hcd); if (hcd->phy) usb_phy_shutdown(hcd->phy); if (mhcd->xo_clk) { clk_disable_unprepare(mhcd->xo_clk); clk_put(mhcd->xo_clk); Loading