Lines Matching full:usb2
28 struct bcm_ns_usb2 *usb2 = phy_get_drvdata(phy); in bcm_ns_usb2_phy_init() local
29 struct device *dev = usb2->dev; in bcm_ns_usb2_phy_init()
30 void __iomem *dmu = usb2->dmu; in bcm_ns_usb2_phy_init()
34 err = clk_prepare_enable(usb2->ref_clk); in bcm_ns_usb2_phy_init()
40 ref_clk_rate = clk_get_rate(usb2->ref_clk); in bcm_ns_usb2_phy_init()
57 /* Calculate ndiv based on a solid 1920 MHz that is for USB2 PHY */ in bcm_ns_usb2_phy_init()
72 clk_disable_unprepare(usb2->ref_clk); in bcm_ns_usb2_phy_init()
85 struct bcm_ns_usb2 *usb2; in bcm_ns_usb2_probe() local
89 usb2 = devm_kzalloc(&pdev->dev, sizeof(*usb2), GFP_KERNEL); in bcm_ns_usb2_probe()
90 if (!usb2) in bcm_ns_usb2_probe()
92 usb2->dev = dev; in bcm_ns_usb2_probe()
95 usb2->dmu = devm_ioremap_resource(dev, res); in bcm_ns_usb2_probe()
96 if (IS_ERR(usb2->dmu)) { in bcm_ns_usb2_probe()
98 return PTR_ERR(usb2->dmu); in bcm_ns_usb2_probe()
101 usb2->ref_clk = devm_clk_get(dev, "phy-ref-clk"); in bcm_ns_usb2_probe()
102 if (IS_ERR(usb2->ref_clk)) { in bcm_ns_usb2_probe()
104 return PTR_ERR(usb2->ref_clk); in bcm_ns_usb2_probe()
107 usb2->phy = devm_phy_create(dev, NULL, &ops); in bcm_ns_usb2_probe()
108 if (IS_ERR(usb2->phy)) in bcm_ns_usb2_probe()
109 return PTR_ERR(usb2->phy); in bcm_ns_usb2_probe()
111 phy_set_drvdata(usb2->phy, usb2); in bcm_ns_usb2_probe()
112 platform_set_drvdata(pdev, usb2); in bcm_ns_usb2_probe()
119 { .compatible = "brcm,ns-usb2-phy", },