Lines Matching +full:en +full:- +full:usb
1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
58 {"usb-nop-xceiv", 1},
89 if (sc->clk_freq != 0) { in usb_nop_xceiv_phy_enable()
91 error = clk_set_freq(sc->clk, sc->clk_freq, in usb_nop_xceiv_phy_enable()
95 sc->clk_freq); in usb_nop_xceiv_phy_enable()
99 error = clk_enable(sc->clk); in usb_nop_xceiv_phy_enable()
101 error = clk_disable(sc->clk); in usb_nop_xceiv_phy_enable()
105 enable ? "En" : "Dis"); in usb_nop_xceiv_phy_enable()
109 if (sc->vcc_supply) { in usb_nop_xceiv_phy_enable()
111 error = regulator_enable(sc->vcc_supply); in usb_nop_xceiv_phy_enable()
113 error = regulator_disable(sc->vcc_supply); in usb_nop_xceiv_phy_enable()
116 enable ? "En" : "Dis"); in usb_nop_xceiv_phy_enable()
134 if (ofw_bus_search_compatible(dev, compat_data)->ocd_data == 0) in usb_nop_xceiv_probe()
137 device_set_desc(dev, "USB NOP PHY"); in usb_nop_xceiv_probe()
151 sc->dev = dev; in usb_nop_xceiv_attach()
155 OF_getencprop(node, "clock-frequency", &sc->clk_freq, sizeof(uint32_t)); in usb_nop_xceiv_attach()
157 error = clk_get_by_ofw_name(dev, node, "main_clk", &sc->clk); in usb_nop_xceiv_attach()
158 if (error != 0 && sc->clk_freq != 0) { in usb_nop_xceiv_attach()
159 device_printf(dev, "clock property is mandatory if clock-frequency is present\n"); in usb_nop_xceiv_attach()
163 regulator_get_by_ofw_property(dev, node, "vcc-supply", &sc->vcc_supply); in usb_nop_xceiv_attach()
170 device_printf(dev, "failed to create USB NOP PHY\n"); in usb_nop_xceiv_attach()
174 device_printf(dev, "failed to create USB NOP PHY\n"); in usb_nop_xceiv_attach()