Lines Matching refs:tegra_phy

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