]> git.baikalelectronics.ru Git - kernel.git/commit
usb: dwc3: xilinx: Add gpio-reset support
authorPiyush Mehta <piyush.mehta@xilinx.com>
Wed, 4 May 2022 07:53:09 +0000 (13:23 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 May 2022 20:02:39 +0000 (22:02 +0200)
commit13e72f7ca7e4e4c8152520b0a90c762d7d4d8ee7
tree58cb3edef537afe19b4ac917a319b9f875f7d0ee
parent3649de87491342529165f8e895b6b18fc491d18c
usb: dwc3: xilinx: Add gpio-reset support

This patch adds a USB GPIO based reset for dwc3-xilinx driver. The PHY
needs to be reset after the completion of phy initialization. As part
of the reset, check for gpio-reset binding before toggling the pin.
This feature is advantageous when the user toggle GPIO to trigger the
ULPI-PHY reset.

Delay of milliseconds is added in between low and high to meet the setup
and hold time requirement of the reset. The reset-gpio error handling is
added for error notification.

Some GPIO controllers must be accessed using message-based buses, like
I2C or SPI, to address this problem, updates GPIO access with sleep API.

This reset is specific to the zynqMp.

Signed-off-by: Piyush Mehta <piyush.mehta@xilinx.com>
Link: https://lore.kernel.org/r/20220504075309.6244-3-piyush.mehta@xilinx.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/dwc3/dwc3-xilinx.c