Lines Matching +full:r9a09g047 +full:- +full:usb3 +full:- +full:phy

1 // SPDX-License-Identifier: GPL-2.0
3 * Renesas RZ/G3E USB3.0 PHY driver
14 #include <linux/phy/phy.h>
140 static int rzg3e_phy_usb3_init(struct phy *p) in rzg3e_phy_usb3_init()
145 if (!r->skip_reinit) in rzg3e_phy_usb3_init()
146 ret = rzg3e_phy_usb3_init_helper(r->base); in rzg3e_phy_usb3_init()
158 struct device *dev = &pdev->dev; in rzg3e_phy_usb3_probe()
161 struct phy *phy; in rzg3e_phy_usb3_probe() local
166 return -ENOMEM; in rzg3e_phy_usb3_probe()
168 r->base = devm_platform_ioremap_resource(pdev, 0); in rzg3e_phy_usb3_probe()
169 if (IS_ERR(r->base)) in rzg3e_phy_usb3_probe()
170 return PTR_ERR(r->base); in rzg3e_phy_usb3_probe()
172 r->rstc = devm_reset_control_get_shared_deasserted(dev, NULL); in rzg3e_phy_usb3_probe()
173 if (IS_ERR(r->rstc)) in rzg3e_phy_usb3_probe()
174 return dev_err_probe(dev, PTR_ERR(r->rstc), "failed to get deasserted reset\n"); in rzg3e_phy_usb3_probe()
177 * devm_phy_create() will call pm_runtime_enable(&phy->dev); in rzg3e_phy_usb3_probe()
178 * And then, phy-core will manage runtime pm for this device. in rzg3e_phy_usb3_probe()
184 phy = devm_phy_create(dev, NULL, &rzg3e_phy_usb3_ops); in rzg3e_phy_usb3_probe()
185 if (IS_ERR(phy)) in rzg3e_phy_usb3_probe()
186 return dev_err_probe(dev, PTR_ERR(phy), "failed to create USB3 PHY\n"); in rzg3e_phy_usb3_probe()
189 phy_set_drvdata(phy, r); in rzg3e_phy_usb3_probe()
193 return dev_err_probe(dev, PTR_ERR(provider), "failed to register PHY provider\n"); in rzg3e_phy_usb3_probe()
203 reset_control_assert(r->rstc); in rzg3e_phy_usb3_suspend()
204 r->skip_reinit = false; in rzg3e_phy_usb3_suspend()
214 ret = reset_control_deassert(r->rstc); in rzg3e_phy_usb3_resume()
222 ret = rzg3e_phy_usb3_init_helper(r->base); in rzg3e_phy_usb3_resume()
226 r->skip_reinit = true; in rzg3e_phy_usb3_resume()
233 reset_control_assert(r->rstc); in rzg3e_phy_usb3_resume()
242 { .compatible = "renesas,r9a09g047-usb3-phy" },
258 MODULE_DESCRIPTION("Renesas RZ/G3E USB3.0 PHY Driver");