Lines Matching +full:pxa1928 +full:- +full:usb +full:- +full:phy

1 // SPDX-License-Identifier: GPL-2.0-only
20 #include <linux/phy/phy.h>
22 /* USB PXA1928 PHY mapping */
135 struct phy *phy; member
149 static int mv_usb2_phy_28nm_init(struct phy *phy) in mv_usb2_phy_28nm_init() argument
151 struct mv_usb2_phy *mv_phy = phy_get_drvdata(phy); in mv_usb2_phy_28nm_init()
152 struct platform_device *pdev = mv_phy->pdev; in mv_usb2_phy_28nm_init()
153 void __iomem *base = mv_phy->base; in mv_usb2_phy_28nm_init()
157 clk_prepare_enable(mv_phy->clk); in mv_usb2_phy_28nm_init()
207 /* Make sure PHY Calibration is ready */ in mv_usb2_phy_28nm_init()
212 dev_warn(&pdev->dev, "USB PHY PLL calibrate not done after 100mS."); in mv_usb2_phy_28nm_init()
218 dev_warn(&pdev->dev, "USB PHY RX SQ calibrate not done after 100mS."); in mv_usb2_phy_28nm_init()
221 /* Make sure PHY PLL is ready */ in mv_usb2_phy_28nm_init()
224 dev_warn(&pdev->dev, "PLL_READY not set after 100mS."); in mv_usb2_phy_28nm_init()
230 clk_disable_unprepare(mv_phy->clk); in mv_usb2_phy_28nm_init()
234 static int mv_usb2_phy_28nm_power_on(struct phy *phy) in mv_usb2_phy_28nm_power_on() argument
236 struct mv_usb2_phy *mv_phy = phy_get_drvdata(phy); in mv_usb2_phy_28nm_power_on()
237 void __iomem *base = mv_phy->base; in mv_usb2_phy_28nm_power_on()
247 static int mv_usb2_phy_28nm_power_off(struct phy *phy) in mv_usb2_phy_28nm_power_off() argument
249 struct mv_usb2_phy *mv_phy = phy_get_drvdata(phy); in mv_usb2_phy_28nm_power_off()
250 void __iomem *base = mv_phy->base; in mv_usb2_phy_28nm_power_off()
260 static int mv_usb2_phy_28nm_exit(struct phy *phy) in mv_usb2_phy_28nm_exit() argument
262 struct mv_usb2_phy *mv_phy = phy_get_drvdata(phy); in mv_usb2_phy_28nm_exit()
263 void __iomem *base = mv_phy->base; in mv_usb2_phy_28nm_exit()
270 /* power down PHY Analog part */ in mv_usb2_phy_28nm_exit()
275 /* power down PHY OTG part */ in mv_usb2_phy_28nm_exit()
280 clk_disable_unprepare(mv_phy->clk); in mv_usb2_phy_28nm_exit()
297 mv_phy = devm_kzalloc(&pdev->dev, sizeof(*mv_phy), GFP_KERNEL); in mv_usb2_phy_probe()
299 return -ENOMEM; in mv_usb2_phy_probe()
301 mv_phy->pdev = pdev; in mv_usb2_phy_probe()
303 mv_phy->clk = devm_clk_get(&pdev->dev, NULL); in mv_usb2_phy_probe()
304 if (IS_ERR(mv_phy->clk)) { in mv_usb2_phy_probe()
305 dev_err(&pdev->dev, "failed to get clock.\n"); in mv_usb2_phy_probe()
306 return PTR_ERR(mv_phy->clk); in mv_usb2_phy_probe()
309 mv_phy->base = devm_platform_ioremap_resource(pdev, 0); in mv_usb2_phy_probe()
310 if (IS_ERR(mv_phy->base)) in mv_usb2_phy_probe()
311 return PTR_ERR(mv_phy->base); in mv_usb2_phy_probe()
313 mv_phy->phy = devm_phy_create(&pdev->dev, pdev->dev.of_node, &usb_ops); in mv_usb2_phy_probe()
314 if (IS_ERR(mv_phy->phy)) in mv_usb2_phy_probe()
315 return PTR_ERR(mv_phy->phy); in mv_usb2_phy_probe()
317 phy_set_drvdata(mv_phy->phy, mv_phy); in mv_usb2_phy_probe()
319 phy_provider = devm_of_phy_provider_register(&pdev->dev, of_phy_simple_xlate); in mv_usb2_phy_probe()
324 { .compatible = "marvell,pxa1928-usb-phy", },
332 .name = "mv-usb2-phy",
339 MODULE_DESCRIPTION("Marvell USB2 phy driver");