Lines Matching refs:tegra_phy
1180 static int utmi_phy_probe(struct tegra_usb_phy *tegra_phy, in utmi_phy_probe() argument
1187 tegra_phy->is_ulpi_phy = false; in utmi_phy_probe()
1199 tegra_phy->pad_regs = devm_ioremap(&pdev->dev, res->start, in utmi_phy_probe()
1201 if (!tegra_phy->pad_regs) { in utmi_phy_probe()
1206 tegra_phy->config = devm_kzalloc(&pdev->dev, sizeof(*config), in utmi_phy_probe()
1208 if (!tegra_phy->config) in utmi_phy_probe()
1211 config = tegra_phy->config; in utmi_phy_probe()
1243 if (tegra_phy->soc_config->requires_extra_tuning_parameters) { in utmi_phy_probe()
1343 struct tegra_usb_phy *tegra_phy; in tegra_usb_phy_probe() local
1351 tegra_phy = devm_kzalloc(&pdev->dev, sizeof(*tegra_phy), GFP_KERNEL); in tegra_usb_phy_probe()
1352 if (!tegra_phy) in tegra_usb_phy_probe()
1355 tegra_phy->soc_config = of_device_get_match_data(&pdev->dev); in tegra_usb_phy_probe()
1356 tegra_phy->irq = platform_get_irq_optional(pdev, 0); in tegra_usb_phy_probe()
1368 tegra_phy->regs = devm_ioremap(&pdev->dev, res->start, in tegra_usb_phy_probe()
1370 if (!tegra_phy->regs) { in tegra_usb_phy_probe()
1375 tegra_phy->is_legacy_phy = in tegra_usb_phy_probe()
1379 tegra_phy->mode = usb_get_dr_mode(&pdev->dev); in tegra_usb_phy_probe()
1381 tegra_phy->mode = USB_DR_MODE_HOST; in tegra_usb_phy_probe()
1383 if (tegra_phy->mode == USB_DR_MODE_UNKNOWN) { in tegra_usb_phy_probe()
1389 tegra_phy->vbus = devm_regulator_get(&pdev->dev, "vbus"); in tegra_usb_phy_probe()
1390 if (IS_ERR(tegra_phy->vbus)) in tegra_usb_phy_probe()
1391 return PTR_ERR(tegra_phy->vbus); in tegra_usb_phy_probe()
1393 tegra_phy->pll_u = devm_clk_get(&pdev->dev, "pll_u"); in tegra_usb_phy_probe()
1394 err = PTR_ERR_OR_ZERO(tegra_phy->pll_u); in tegra_usb_phy_probe()
1400 err = tegra_usb_phy_parse_pmc(&pdev->dev, tegra_phy); in tegra_usb_phy_probe()
1409 err = utmi_phy_probe(tegra_phy, pdev); in tegra_usb_phy_probe()
1413 tegra_phy->pad_clk = devm_clk_get(&pdev->dev, "utmi-pads"); in tegra_usb_phy_probe()
1414 err = PTR_ERR_OR_ZERO(tegra_phy->pad_clk); in tegra_usb_phy_probe()
1429 tegra_phy->pad_rst = reset; in tegra_usb_phy_probe()
1433 tegra_phy->is_ulpi_phy = true; in tegra_usb_phy_probe()
1435 tegra_phy->clk = devm_clk_get(&pdev->dev, "ulpi-link"); in tegra_usb_phy_probe()
1436 err = PTR_ERR_OR_ZERO(tegra_phy->clk); in tegra_usb_phy_probe()
1453 tegra_phy->reset_gpio = gpiod; in tegra_usb_phy_probe()
1462 tegra_phy->ulpi = phy; in tegra_usb_phy_probe()
1463 tegra_phy->ulpi->io_priv = tegra_phy->regs + ULPI_VIEWPORT; in tegra_usb_phy_probe()
1472 tegra_phy->u_phy.dev = &pdev->dev; in tegra_usb_phy_probe()
1473 tegra_phy->u_phy.init = tegra_usb_phy_init; in tegra_usb_phy_probe()
1474 tegra_phy->u_phy.shutdown = tegra_usb_phy_shutdown; in tegra_usb_phy_probe()
1475 tegra_phy->u_phy.set_wakeup = tegra_usb_phy_set_wakeup; in tegra_usb_phy_probe()
1476 tegra_phy->u_phy.set_suspend = tegra_usb_phy_set_suspend; in tegra_usb_phy_probe()
1478 platform_set_drvdata(pdev, tegra_phy); in tegra_usb_phy_probe()
1480 return usb_add_phy_dev(&tegra_phy->u_phy); in tegra_usb_phy_probe()
1485 struct tegra_usb_phy *tegra_phy = platform_get_drvdata(pdev); in tegra_usb_phy_remove() local
1487 usb_remove_phy(&tegra_phy->u_phy); in tegra_usb_phy_remove()