Lines Matching defs:phy
18 #include <linux/phy/phy.h>
74 struct phy *phy;
80 static int rockchip_usb_phy_power(struct rockchip_usb_phy *phy,
85 return regmap_write(phy->base->reg_base, phy->reg_offset, val);
96 struct rockchip_usb_phy *phy = container_of(hw,
100 if (phy->vbus)
101 regulator_disable(phy->vbus);
103 /* Power down usb phy analog blocks by set siddq 1 */
104 rockchip_usb_phy_power(phy, 1);
109 struct rockchip_usb_phy *phy = container_of(hw,
113 /* Power up usb phy analog blocks by set siddq 0 */
114 return rockchip_usb_phy_power(phy, 0);
119 struct rockchip_usb_phy *phy = container_of(hw,
125 ret = regmap_read(phy->base->reg_base, phy->reg_offset, &val);
139 static int rockchip_usb_phy_power_off(struct phy *_phy)
141 struct rockchip_usb_phy *phy = phy_get_drvdata(_phy);
143 if (phy->uart_enabled)
146 clk_disable_unprepare(phy->clk480m);
151 static int rockchip_usb_phy_power_on(struct phy *_phy)
153 struct rockchip_usb_phy *phy = phy_get_drvdata(_phy);
155 if (phy->uart_enabled)
158 if (phy->vbus) {
161 ret = regulator_enable(phy->vbus);
166 return clk_prepare_enable(phy->clk480m);
169 static int rockchip_usb_phy_reset(struct phy *_phy)
171 struct rockchip_usb_phy *phy = phy_get_drvdata(_phy);
173 if (phy->reset) {
174 reset_control_assert(phy->reset);
176 reset_control_deassert(phy->reset);
224 rk_phy->reset = of_reset_control_get(child, "phy-reset");
245 dev_err(base->dev, "phy data not found\n");
250 dev_dbg(base->dev, "phy%d used as uart output\n", i);
284 rk_phy->phy = devm_phy_create(base->dev, child, &ops);
285 if (IS_ERR(rk_phy->phy)) {
287 return PTR_ERR(rk_phy->phy);
289 phy_set_drvdata(rk_phy->phy, rk_phy);
291 rk_phy->vbus = devm_regulator_get_optional(&rk_phy->phy->dev, "vbus");
300 * only power up usb phy when it use, so disable it when init
334 * Also disable the analog phy components to save power.
371 * Enable the bypass of uart2 data through the otg usb phy.
410 * Enable the bypass of uart2 data through the otg usb phy.
471 dev_err(dev, "missing phy data\n");
503 { .compatible = "rockchip,rk3066a-usb-phy", .data = &rk3066a_pdata },
504 { .compatible = "rockchip,rk3188-usb-phy", .data = &rk3188_pdata },
505 { .compatible = "rockchip,rk3288-usb-phy", .data = &rk3288_pdata },
514 .name = "rockchip-usb-phy",