All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Dahl <ada@thorsis.com>
To: cristian.birsan@microchip.com
Cc: stern@rowland.harvard.edu, gregkh@linuxfoundation.org,
	nicolas.ferre@microchip.com, alexandre.belloni@bootlin.com,
	ludovic.desroches@microchip.com, linux-usb@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] USB: host: ehci-atmel: Add support for HSIC phy
Date: Mon, 13 Sep 2021 13:39:22 +0200	[thread overview]
Message-ID: <2607416.cmL5XOGpRJ@ada> (raw)
In-Reply-To: <20210910163842.1596407-3-cristian.birsan@microchip.com>

Hello Christian,

Am Freitag, 10. September 2021, 18:38:42 CEST schrieb 
cristian.birsan@microchip.com:
> From: Cristian Birsan <cristian.birsan@microchip.com>
> 
> Add support for USB Host High Speed Port HSIC phy.
> 
> Signed-off-by: Cristian Birsan <cristian.birsan@microchip.com>
> ---
>  drivers/usb/host/ehci-atmel.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/drivers/usb/host/ehci-atmel.c b/drivers/usb/host/ehci-atmel.c
> index e893467d659c..05d41fd65f25 100644
> --- a/drivers/usb/host/ehci-atmel.c
> +++ b/drivers/usb/host/ehci-atmel.c
> @@ -18,6 +18,8 @@
>  #include <linux/platform_device.h>
>  #include <linux/usb.h>
>  #include <linux/usb/hcd.h>
> +#include <linux/usb/phy.h>
> +#include <linux/usb/of.h>
> 
>  #include "ehci.h"
> 
> @@ -25,6 +27,9 @@
> 
>  static const char hcd_name[] = "ehci-atmel";
> 
> +#define EHCI_INSNREG(index)			((index) * 4 + 0x90)
> +#define EHCI_INSNREG08_HSIC_EN			BIT(2)
> +
>  /* interface and function clocks */
>  #define hcd_to_atmel_ehci_priv(h) \
>  	((struct atmel_ehci_priv *)hcd_to_ehci(h)->priv)
> @@ -154,6 +159,9 @@ static int ehci_atmel_drv_probe(struct platform_device
> *pdev) goto fail_add_hcd;
>  	device_wakeup_enable(hcd->self.controller);
> 
> +	if (of_usb_get_phy_mode(pdev->dev.of_node) == USBPHY_INTERFACE_MODE_HSIC)
> +		writel(EHCI_INSNREG08_HSIC_EN, hcd->regs + EHCI_INSNREG(8));
> +
>  	return retval;
> 
>  fail_add_hcd:

Tested-by: Alexander Dahl <ada@thorsis.com>

Greets
Alex




WARNING: multiple messages have this Message-ID (diff)
From: Alexander Dahl <ada@thorsis.com>
To: cristian.birsan@microchip.com
Cc: alexandre.belloni@bootlin.com, gregkh@linuxfoundation.org,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	ludovic.desroches@microchip.com, stern@rowland.harvard.edu,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 2/2] USB: host: ehci-atmel: Add support for HSIC phy
Date: Mon, 13 Sep 2021 13:39:22 +0200	[thread overview]
Message-ID: <2607416.cmL5XOGpRJ@ada> (raw)
In-Reply-To: <20210910163842.1596407-3-cristian.birsan@microchip.com>

Hello Christian,

Am Freitag, 10. September 2021, 18:38:42 CEST schrieb 
cristian.birsan@microchip.com:
> From: Cristian Birsan <cristian.birsan@microchip.com>
> 
> Add support for USB Host High Speed Port HSIC phy.
> 
> Signed-off-by: Cristian Birsan <cristian.birsan@microchip.com>
> ---
>  drivers/usb/host/ehci-atmel.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/drivers/usb/host/ehci-atmel.c b/drivers/usb/host/ehci-atmel.c
> index e893467d659c..05d41fd65f25 100644
> --- a/drivers/usb/host/ehci-atmel.c
> +++ b/drivers/usb/host/ehci-atmel.c
> @@ -18,6 +18,8 @@
>  #include <linux/platform_device.h>
>  #include <linux/usb.h>
>  #include <linux/usb/hcd.h>
> +#include <linux/usb/phy.h>
> +#include <linux/usb/of.h>
> 
>  #include "ehci.h"
> 
> @@ -25,6 +27,9 @@
> 
>  static const char hcd_name[] = "ehci-atmel";
> 
> +#define EHCI_INSNREG(index)			((index) * 4 + 0x90)
> +#define EHCI_INSNREG08_HSIC_EN			BIT(2)
> +
>  /* interface and function clocks */
>  #define hcd_to_atmel_ehci_priv(h) \
>  	((struct atmel_ehci_priv *)hcd_to_ehci(h)->priv)
> @@ -154,6 +159,9 @@ static int ehci_atmel_drv_probe(struct platform_device
> *pdev) goto fail_add_hcd;
>  	device_wakeup_enable(hcd->self.controller);
> 
> +	if (of_usb_get_phy_mode(pdev->dev.of_node) == USBPHY_INTERFACE_MODE_HSIC)
> +		writel(EHCI_INSNREG08_HSIC_EN, hcd->regs + EHCI_INSNREG(8));
> +
>  	return retval;
> 
>  fail_add_hcd:

Tested-by: Alexander Dahl <ada@thorsis.com>

Greets
Alex




_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2021-09-13 11:39 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-10 16:38 [PATCH 0/2] USB: host: ehci-atmel: Enable HSIC port on SAMA5D2 cristian.birsan
2021-09-10 16:38 ` cristian.birsan
2021-09-10 16:38 ` [PATCH 1/2] dt-bindings: usb: atmel: add USB PHY type property cristian.birsan
2021-09-10 16:38   ` cristian.birsan
2021-09-10 19:07   ` Sergei Shtylyov
2021-09-10 19:07     ` Sergei Shtylyov
2021-09-13 16:38     ` Cristian.Birsan
2021-09-13 16:38       ` Cristian.Birsan
2021-09-10 16:38 ` [PATCH 2/2] USB: host: ehci-atmel: Add support for HSIC phy cristian.birsan
2021-09-10 16:38   ` cristian.birsan
2021-09-10 20:49   ` Alan Stern
2021-09-10 20:49     ` Alan Stern
2021-09-13 11:39   ` Alexander Dahl [this message]
2021-09-13 11:39     ` Alexander Dahl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2607416.cmL5XOGpRJ@ada \
    --to=ada@thorsis.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=cristian.birsan@microchip.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=ludovic.desroches@microchip.com \
    --cc=nicolas.ferre@microchip.com \
    --cc=stern@rowland.harvard.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.