Lines Matching full:utmi
8 * Marvell CP110 UTMI PHY driver
24 /* CP110 UTMI register macro definetions */
178 struct mvebu_cp110_utmi *utmi = port->priv; in mvebu_cp110_utmi_phy_power_off() local
181 /* Power down UTMI PHY port */ in mvebu_cp110_utmi_phy_power_off()
182 regmap_clear_bits(utmi->syscon, SYSCON_UTMI_CFG_REG(port->id), in mvebu_cp110_utmi_phy_power_off()
186 int test = regmap_test_bits(utmi->syscon, in mvebu_cp110_utmi_phy_power_off()
189 /* skip PLL shutdown if there are active UTMI PHY ports */ in mvebu_cp110_utmi_phy_power_off()
194 /* PLL Power down if all UTMI PHYs are down */ in mvebu_cp110_utmi_phy_power_off()
195 regmap_clear_bits(utmi->syscon, SYSCON_USB_CFG_REG, USB_CFG_PLL_MASK); in mvebu_cp110_utmi_phy_power_off()
203 struct mvebu_cp110_utmi *utmi = port->priv; in mvebu_cp110_utmi_phy_power_on() local
208 /* It is necessary to power off UTMI before configuration */ in mvebu_cp110_utmi_phy_power_on()
211 dev_err(dev, "UTMI power OFF before power ON failed\n"); in mvebu_cp110_utmi_phy_power_on()
216 * If UTMI port is connected to USB Device controller, in mvebu_cp110_utmi_phy_power_on()
217 * configure the USB MUX prior to UTMI PHY initialization. in mvebu_cp110_utmi_phy_power_on()
222 regmap_update_bits(utmi->syscon, SYSCON_USB_CFG_REG, in mvebu_cp110_utmi_phy_power_on()
228 /* Set Test suspendm mode and enable Test UTMI select */ in mvebu_cp110_utmi_phy_power_on()
233 /* Wait for UTMI power down */ in mvebu_cp110_utmi_phy_power_on()
239 /* Power UP UTMI PHY */ in mvebu_cp110_utmi_phy_power_on()
240 regmap_set_bits(utmi->syscon, SYSCON_UTMI_CFG_REG(port->id), in mvebu_cp110_utmi_phy_power_on()
243 /* Disable Test UTMI select */ in mvebu_cp110_utmi_phy_power_on()
253 dev_err(dev, "Failed to end UTMI impedance calibration\n"); in mvebu_cp110_utmi_phy_power_on()
262 dev_err(dev, "Failed to end UTMI PLL calibration\n"); in mvebu_cp110_utmi_phy_power_on()
276 regmap_set_bits(utmi->syscon, SYSCON_USB_CFG_REG, USB_CFG_PLL_MASK); in mvebu_cp110_utmi_phy_power_on()
288 { .compatible = "marvell,cp110-utmi-phy" },
296 struct mvebu_cp110_utmi *utmi; in mvebu_cp110_utmi_phy_probe() local
302 utmi = devm_kzalloc(dev, sizeof(*utmi), GFP_KERNEL); in mvebu_cp110_utmi_phy_probe()
303 if (!utmi) in mvebu_cp110_utmi_phy_probe()
306 utmi->dev = dev; in mvebu_cp110_utmi_phy_probe()
309 utmi->syscon = syscon_regmap_lookup_by_phandle(dev->of_node, in mvebu_cp110_utmi_phy_probe()
311 if (IS_ERR(utmi->syscon)) { in mvebu_cp110_utmi_phy_probe()
312 dev_err(dev, "Missing UTMI system controller\n"); in mvebu_cp110_utmi_phy_probe()
313 return PTR_ERR(utmi->syscon); in mvebu_cp110_utmi_phy_probe()
316 /* Get UTMI memory region */ in mvebu_cp110_utmi_phy_probe()
317 utmi->regs = devm_platform_ioremap_resource(pdev, 0); in mvebu_cp110_utmi_phy_probe()
318 if (IS_ERR(utmi->regs)) in mvebu_cp110_utmi_phy_probe()
319 return PTR_ERR(utmi->regs); in mvebu_cp110_utmi_phy_probe()
365 utmi->ops = &mvebu_cp110_utmi_phy_ops; in mvebu_cp110_utmi_phy_probe()
368 phy = devm_phy_create(dev, child, utmi->ops); in mvebu_cp110_utmi_phy_probe()
370 dev_err(dev, "Failed to create the UTMI PHY\n"); in mvebu_cp110_utmi_phy_probe()
375 port->priv = utmi; in mvebu_cp110_utmi_phy_probe()
383 dev_set_drvdata(dev, utmi); in mvebu_cp110_utmi_phy_probe()
392 .name = "mvebu-cp110-utmi-phy",
399 MODULE_DESCRIPTION("Marvell Armada CP110 UTMI PHY driver");