Lines Matching refs:phy
64 struct usb_phy phy; member
126 static int phy_8x16_notify_connect(struct usb_phy *phy, in phy_8x16_notify_connect() argument
129 struct phy_8x16 *qphy = container_of(phy, struct phy_8x16, phy); in phy_8x16_notify_connect()
133 usb_phy_io_write(&qphy->phy, val, ULPI_SET(ULPI_MISC_A)); in phy_8x16_notify_connect()
142 static int phy_8x16_notify_disconnect(struct usb_phy *phy, in phy_8x16_notify_disconnect() argument
145 struct phy_8x16 *qphy = container_of(phy, struct phy_8x16, phy); in phy_8x16_notify_disconnect()
149 usb_phy_io_write(&qphy->phy, val, ULPI_CLR(ULPI_MISC_A)); in phy_8x16_notify_disconnect()
160 phy_8x16_notify_connect(&qphy->phy, USB_SPEED_UNKNOWN); in phy_8x16_vbus_on()
170 phy_8x16_notify_disconnect(&qphy->phy, USB_SPEED_UNKNOWN); in phy_8x16_vbus_off()
191 static int phy_8x16_init(struct usb_phy *phy) in phy_8x16_init() argument
193 struct phy_8x16 *qphy = container_of(phy, struct phy_8x16, phy); in phy_8x16_init()
199 usb_phy_io_write(phy, init[idx], addr + idx); in phy_8x16_init()
235 usb_phy_io_write(phy, val, ULPI_SET(ULPI_PWR_CLK_MNG_REG)); in phy_8x16_init()
243 val = usb_phy_io_read(&qphy->phy, ULPI_FUNC_CTRL); in phy_8x16_init()
246 usb_phy_io_write(&qphy->phy, val, ULPI_FUNC_CTRL); in phy_8x16_init()
251 static void phy_8x16_shutdown(struct usb_phy *phy) in phy_8x16_shutdown() argument
256 val = usb_phy_io_read(phy, ULPI_FUNC_CTRL); in phy_8x16_shutdown()
259 usb_phy_io_write(phy, val, ULPI_FUNC_CTRL); in phy_8x16_shutdown()
265 struct device *dev = qphy->phy.dev; in phy_8x16_read_devicetree()
319 struct usb_phy *phy; in phy_8x16_probe() local
336 phy = &qphy->phy; in phy_8x16_probe()
337 phy->dev = &pdev->dev; in phy_8x16_probe()
338 phy->label = dev_name(&pdev->dev); in phy_8x16_probe()
339 phy->init = phy_8x16_init; in phy_8x16_probe()
340 phy->shutdown = phy_8x16_shutdown; in phy_8x16_probe()
341 phy->notify_connect = phy_8x16_notify_connect; in phy_8x16_probe()
342 phy->notify_disconnect = phy_8x16_notify_disconnect; in phy_8x16_probe()
343 phy->io_priv = qphy->regs + HSPHY_ULPI_VIEWPORT; in phy_8x16_probe()
344 phy->io_ops = &ulpi_viewport_access_ops; in phy_8x16_probe()
345 phy->type = USB_PHY_TYPE_USB2; in phy_8x16_probe()
351 qphy->vbus_edev = extcon_get_edev_by_phandle(phy->dev, 0); in phy_8x16_probe()
357 dev_dbg(phy->dev, "Can't boost core clock\n"); in phy_8x16_probe()
377 ret = usb_add_phy_dev(&qphy->phy); in phy_8x16_probe()
412 usb_remove_phy(&qphy->phy); in phy_8x16_remove()