[PATCH] usb: phy: samsung-usb2: Toggle HSIC GPIO from device tree

Felipe Balbi balbi at ti.com
Wed Jul 10 15:25:34 EST 2013


On Tue, Jul 09, 2013 at 05:34:15PM -0700, Julius Werner wrote:
> This patch adds support for a new 'samsung,hsic-reset-gpio' in the
> device tree, which will be interpreted as an active-low reset pin during
> PHY initialization when it exists. Useful for intergrated HSIC devices
> like an SMSC 3503 hub. It is necessary to add this directly to the PHY
> initialization to get the timing right, since resetting a HSIC device
> after it has already been enumerated can confuse the USB stack.
> 
> Also fixes PHY semaphore code to make sure we always go through the
> setup at least once, even if it was already turned on (e.g. by
> firmware), and changes a spinlock to a mutex to allow sleeping in the
> critical section.
> 
> Change-Id: Ieecac52c27daa7a17a7ed3b2863ddba3aeb8d16f
> Signed-off-by: Julius Werner <jwerner at chromium.org>
> ---
>  .../devicetree/bindings/usb/samsung-usbphy.txt     | 10 ++++++
>  drivers/usb/phy/phy-samsung-usb.c                  | 17 ++++++++++
>  drivers/usb/phy/phy-samsung-usb.h                  |  7 ++--
>  drivers/usb/phy/phy-samsung-usb2.c                 | 38 ++++++++++------------
>  drivers/usb/phy/phy-samsung-usb3.c                 | 12 +++----
>  5 files changed, 55 insertions(+), 29 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/usb/samsung-usbphy.txt b/Documentation/devicetree/bindings/usb/samsung-usbphy.txt
> index 33fd354..82e2e16 100644
> --- a/Documentation/devicetree/bindings/usb/samsung-usbphy.txt
> +++ b/Documentation/devicetree/bindings/usb/samsung-usbphy.txt
> @@ -31,6 +31,12 @@ Optional properties:
>  - ranges: allows valid translation between child's address space and parent's
>  	  address space.
>  
> +- samsung,hsic-reset-gpio: an active low GPIO pin that resets a device
> +			connected to the HSIC port. Useful for things like
> +			an on-board SMSC3503 hub.
> +- pinctrl-0: Pin control group containing the HSIC reset GPIO pin.
> +- pinctrl-names: Should contain only one value - "default".
> +
>  - The child node 'usbphy-sys' to the node 'usbphy' is for the system controller
>    interface for usb-phy. It should provide the following information required by
>    usb-phy controller to control phy.
> @@ -56,6 +62,10 @@ Example:
>  		clocks = <&clock 2>, <&clock 305>;
>  		clock-names = "xusbxti", "otg";
>  
> +		samsung,hsic-reset-gpio = <&gpx2 4 1>;

looks like this should be modeled as a fixed-regulator ?

-- 
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.ozlabs.org/pipermail/devicetree-discuss/attachments/20130710/8382d05e/attachment.sig>


More information about the devicetree-discuss mailing list