Lines Matching refs:tegra_phy
1045 static int utmi_phy_probe(struct tegra_usb_phy *tegra_phy, in utmi_phy_probe() argument
1052 tegra_phy->is_ulpi_phy = false; in utmi_phy_probe()
1064 tegra_phy->pad_regs = devm_ioremap(&pdev->dev, res->start, in utmi_phy_probe()
1066 if (!tegra_phy->pad_regs) { in utmi_phy_probe()
1071 tegra_phy->config = devm_kzalloc(&pdev->dev, sizeof(*config), in utmi_phy_probe()
1073 if (!tegra_phy->config) in utmi_phy_probe()
1076 config = tegra_phy->config; in utmi_phy_probe()
1108 if (tegra_phy->soc_config->requires_extra_tuning_parameters) { in utmi_phy_probe()
1162 struct tegra_usb_phy *tegra_phy; in tegra_usb_phy_probe() local
1170 tegra_phy = devm_kzalloc(&pdev->dev, sizeof(*tegra_phy), GFP_KERNEL); in tegra_usb_phy_probe()
1171 if (!tegra_phy) in tegra_usb_phy_probe()
1174 tegra_phy->soc_config = of_device_get_match_data(&pdev->dev); in tegra_usb_phy_probe()
1186 tegra_phy->regs = devm_ioremap(&pdev->dev, res->start, in tegra_usb_phy_probe()
1188 if (!tegra_phy->regs) { in tegra_usb_phy_probe()
1193 tegra_phy->is_legacy_phy = in tegra_usb_phy_probe()
1197 tegra_phy->mode = usb_get_dr_mode(&pdev->dev); in tegra_usb_phy_probe()
1199 tegra_phy->mode = USB_DR_MODE_HOST; in tegra_usb_phy_probe()
1201 if (tegra_phy->mode == USB_DR_MODE_UNKNOWN) { in tegra_usb_phy_probe()
1207 tegra_phy->vbus = devm_regulator_get(&pdev->dev, "vbus"); in tegra_usb_phy_probe()
1208 if (IS_ERR(tegra_phy->vbus)) in tegra_usb_phy_probe()
1209 return PTR_ERR(tegra_phy->vbus); in tegra_usb_phy_probe()
1211 tegra_phy->pll_u = devm_clk_get(&pdev->dev, "pll_u"); in tegra_usb_phy_probe()
1212 err = PTR_ERR_OR_ZERO(tegra_phy->pll_u); in tegra_usb_phy_probe()
1221 err = utmi_phy_probe(tegra_phy, pdev); in tegra_usb_phy_probe()
1225 tegra_phy->pad_clk = devm_clk_get(&pdev->dev, "utmi-pads"); in tegra_usb_phy_probe()
1226 err = PTR_ERR_OR_ZERO(tegra_phy->pad_clk); in tegra_usb_phy_probe()
1241 tegra_phy->pad_rst = reset; in tegra_usb_phy_probe()
1245 tegra_phy->is_ulpi_phy = true; in tegra_usb_phy_probe()
1247 tegra_phy->clk = devm_clk_get(&pdev->dev, "ulpi-link"); in tegra_usb_phy_probe()
1248 err = PTR_ERR_OR_ZERO(tegra_phy->clk); in tegra_usb_phy_probe()
1265 tegra_phy->reset_gpio = gpiod; in tegra_usb_phy_probe()
1274 tegra_phy->ulpi = phy; in tegra_usb_phy_probe()
1275 tegra_phy->ulpi->io_priv = tegra_phy->regs + ULPI_VIEWPORT; in tegra_usb_phy_probe()
1284 tegra_phy->u_phy.dev = &pdev->dev; in tegra_usb_phy_probe()
1285 tegra_phy->u_phy.init = tegra_usb_phy_init; in tegra_usb_phy_probe()
1286 tegra_phy->u_phy.shutdown = tegra_usb_phy_shutdown; in tegra_usb_phy_probe()
1287 tegra_phy->u_phy.set_wakeup = tegra_usb_phy_set_wakeup; in tegra_usb_phy_probe()
1288 tegra_phy->u_phy.set_suspend = tegra_usb_phy_set_suspend; in tegra_usb_phy_probe()
1290 platform_set_drvdata(pdev, tegra_phy); in tegra_usb_phy_probe()
1292 return usb_add_phy_dev(&tegra_phy->u_phy); in tegra_usb_phy_probe()
1297 struct tegra_usb_phy *tegra_phy = platform_get_drvdata(pdev); in tegra_usb_phy_remove() local
1299 usb_remove_phy(&tegra_phy->u_phy); in tegra_usb_phy_remove()