1 // SPDX-License-Identifier: GPL-2.0+
3 * Copyright (C) 2017 Texas Instruments Incorporated - http://www.ti.com/
4 * Written by Jean-Jacques Hiblot <jjhiblot@ti.com>
10 #include <dm/device.h>
11 #include <dm/device_compat.h>
12 #include <generic-phy.h>
18 static int nop_phy_init(struct phy *phy)
20 struct nop_phy_priv *priv = dev_get_priv(phy->dev);
22 if (CONFIG_IS_ENABLED(CLK))
23 return clk_enable_bulk(&priv->bulk);
28 static int nop_phy_probe(struct udevice *dev)
30 struct nop_phy_priv *priv = dev_get_priv(dev);
33 if (CONFIG_IS_ENABLED(CLK)) {
34 ret = clk_get_bulk(dev, &priv->bulk);
36 dev_err(dev, "Failed to get clk: %d\n", ret);
44 static const struct udevice_id nop_phy_ids[] = {
45 { .compatible = "nop-phy" },
46 { .compatible = "usb-nop-xceiv" },
50 static struct phy_ops nop_phy_ops = {
54 U_BOOT_DRIVER(nop_phy) = {
57 .of_match = nop_phy_ids,
59 .probe = nop_phy_probe,
60 .priv_auto = sizeof(struct nop_phy_priv),