Lines Matching +full:mmp3 +full:- +full:usb +full:- +full:phy
1 // SPDX-License-Identifier: GPL-2.0
11 #include <linux/phy/phy.h>
110 struct phy *phy; member
141 static int mmp3_usb_phy_init(struct phy *phy) in mmp3_usb_phy_init() argument
143 struct mmp3_usb_phy *mmp3_usb_phy = phy_get_drvdata(phy); in mmp3_usb_phy_init()
144 void __iomem *base = mmp3_usb_phy->base; in mmp3_usb_phy_init()
159 dev_err(&phy->dev, "unsupported silicon revision\n"); in mmp3_usb_phy_init()
160 return -ENODEV; in mmp3_usb_phy_init()
196 static int mmp3_usb_phy_calibrate(struct phy *phy) in mmp3_usb_phy_calibrate() argument
198 struct mmp3_usb_phy *mmp3_usb_phy = phy_get_drvdata(phy); in mmp3_usb_phy_calibrate()
199 void __iomem *base = mmp3_usb_phy->base; in mmp3_usb_phy_calibrate()
211 * | 200us | 400us | 40| 400us | USB PHY READY in mmp3_usb_phy_calibrate()
227 dev_err(&phy->dev, "PLL_READY not set after 100mS.\n"); in mmp3_usb_phy_calibrate()
228 return -ETIMEDOUT; in mmp3_usb_phy_calibrate()
242 { .compatible = "marvell,mmp3-usb-phy", },
249 struct device *dev = &pdev->dev; in mmp3_usb_phy_probe()
255 return -ENOMEM; in mmp3_usb_phy_probe()
257 mmp3_usb_phy->base = devm_platform_ioremap_resource(pdev, 0); in mmp3_usb_phy_probe()
258 if (IS_ERR(mmp3_usb_phy->base)) { in mmp3_usb_phy_probe()
259 dev_err(dev, "failed to remap PHY regs\n"); in mmp3_usb_phy_probe()
260 return PTR_ERR(mmp3_usb_phy->base); in mmp3_usb_phy_probe()
263 mmp3_usb_phy->phy = devm_phy_create(dev, NULL, &mmp3_usb_phy_ops); in mmp3_usb_phy_probe()
264 if (IS_ERR(mmp3_usb_phy->phy)) { in mmp3_usb_phy_probe()
265 dev_err(dev, "failed to create PHY\n"); in mmp3_usb_phy_probe()
266 return PTR_ERR(mmp3_usb_phy->phy); in mmp3_usb_phy_probe()
269 phy_set_drvdata(mmp3_usb_phy->phy, mmp3_usb_phy); in mmp3_usb_phy_probe()
272 dev_err(dev, "failed to register PHY provider\n"); in mmp3_usb_phy_probe()
282 .name = "mmp3-usb-phy",
289 MODULE_DESCRIPTION("Marvell MMP3 USB PHY Driver");