Lines Matching full:utmi

8  * Marvell CP110 UTMI PHY driver
24 /* CP110 UTMI register macro definetions */
167 struct mvebu_cp110_utmi *utmi = port->priv; in mvebu_cp110_utmi_phy_power_off() local
170 /* Power down UTMI PHY port */ in mvebu_cp110_utmi_phy_power_off()
171 regmap_clear_bits(utmi->syscon, SYSCON_UTMI_CFG_REG(port->id), in mvebu_cp110_utmi_phy_power_off()
175 int test = regmap_test_bits(utmi->syscon, in mvebu_cp110_utmi_phy_power_off()
178 /* skip PLL shutdown if there are active UTMI PHY ports */ in mvebu_cp110_utmi_phy_power_off()
183 /* PLL Power down if all UTMI PHYs are down */ in mvebu_cp110_utmi_phy_power_off()
184 regmap_clear_bits(utmi->syscon, SYSCON_USB_CFG_REG, USB_CFG_PLL_MASK); in mvebu_cp110_utmi_phy_power_off()
192 struct mvebu_cp110_utmi *utmi = port->priv; in mvebu_cp110_utmi_phy_power_on() local
197 /* It is necessary to power off UTMI before configuration */ in mvebu_cp110_utmi_phy_power_on()
200 dev_err(dev, "UTMI power OFF before power ON failed\n"); in mvebu_cp110_utmi_phy_power_on()
205 * If UTMI port is connected to USB Device controller, in mvebu_cp110_utmi_phy_power_on()
206 * configure the USB MUX prior to UTMI PHY initialization. in mvebu_cp110_utmi_phy_power_on()
211 regmap_update_bits(utmi->syscon, SYSCON_USB_CFG_REG, in mvebu_cp110_utmi_phy_power_on()
217 /* Set Test suspendm mode and enable Test UTMI select */ in mvebu_cp110_utmi_phy_power_on()
222 /* Wait for UTMI power down */ in mvebu_cp110_utmi_phy_power_on()
228 /* Power UP UTMI PHY */ in mvebu_cp110_utmi_phy_power_on()
229 regmap_set_bits(utmi->syscon, SYSCON_UTMI_CFG_REG(port->id), in mvebu_cp110_utmi_phy_power_on()
232 /* Disable Test UTMI select */ in mvebu_cp110_utmi_phy_power_on()
242 dev_err(dev, "Failed to end UTMI impedance calibration\n"); in mvebu_cp110_utmi_phy_power_on()
251 dev_err(dev, "Failed to end UTMI PLL calibration\n"); in mvebu_cp110_utmi_phy_power_on()
265 regmap_set_bits(utmi->syscon, SYSCON_USB_CFG_REG, USB_CFG_PLL_MASK); in mvebu_cp110_utmi_phy_power_on()
277 { .compatible = "marvell,cp110-utmi-phy" },
285 struct mvebu_cp110_utmi *utmi; in mvebu_cp110_utmi_phy_probe() local
290 utmi = devm_kzalloc(dev, sizeof(*utmi), GFP_KERNEL); in mvebu_cp110_utmi_phy_probe()
291 if (!utmi) in mvebu_cp110_utmi_phy_probe()
294 utmi->dev = dev; in mvebu_cp110_utmi_phy_probe()
297 utmi->syscon = syscon_regmap_lookup_by_phandle(dev->of_node, in mvebu_cp110_utmi_phy_probe()
299 if (IS_ERR(utmi->syscon)) { in mvebu_cp110_utmi_phy_probe()
300 dev_err(dev, "Missing UTMI system controller\n"); in mvebu_cp110_utmi_phy_probe()
301 return PTR_ERR(utmi->syscon); in mvebu_cp110_utmi_phy_probe()
304 /* Get UTMI memory region */ in mvebu_cp110_utmi_phy_probe()
305 utmi->regs = devm_platform_ioremap_resource(pdev, 0); in mvebu_cp110_utmi_phy_probe()
306 if (IS_ERR(utmi->regs)) in mvebu_cp110_utmi_phy_probe()
307 return PTR_ERR(utmi->regs); in mvebu_cp110_utmi_phy_probe()
349 utmi->ops = &mvebu_cp110_utmi_phy_ops; in mvebu_cp110_utmi_phy_probe()
352 phy = devm_phy_create(dev, child, utmi->ops); in mvebu_cp110_utmi_phy_probe()
354 dev_err(dev, "Failed to create the UTMI PHY\n"); in mvebu_cp110_utmi_phy_probe()
359 port->priv = utmi; in mvebu_cp110_utmi_phy_probe()
367 dev_set_drvdata(dev, utmi); in mvebu_cp110_utmi_phy_probe()
376 .name = "mvebu-cp110-utmi-phy",
383 MODULE_DESCRIPTION("Marvell Armada CP110 UTMI PHY driver");