All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Alexander Dahl <ada@thorsis.com>
Cc: linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	Alan Stern <stern@rowland.harvard.edu>,
	Nicolas Ferre <nicolas.ferre@microchip.com>,
	Alexandre Belloni <alexandre.belloni@bootlin.com>,
	Ludovic Desroches <ludovic.desroches@microchip.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH] USB: host: ehci-atmel: Allow enabling HSIC on SAMA5D2
Date: Tue, 24 Aug 2021 08:45:25 +0200	[thread overview]
Message-ID: <YSSVhblgt/45TvzF@kroah.com> (raw)
In-Reply-To: <20210824063702.24586-1-ada@thorsis.com>

On Tue, Aug 24, 2021 at 08:37:02AM +0200, Alexander Dahl wrote:
> Unlike other SoC series featuring the 'atmel,at91sam9g45-ehci' USB EHCI
> controller, which have embedded USB high-speed transceivers for each
> port, the third port on the SAMA5D2 series is HSIC only.  That HSIC
> interface is not enabled after a power-on reset, but can be enabled by
> setting a flag in a vendor specific EHCI register.
> 
> The register offsets added to the new header file were compared with
> those for the SAM9G45, SAM9X25, SAMA5D3, SAMA5D4, and SAM9X60 series and
> there are no differences in the offsets or contents of those registers.
> Which of those additional vendor specific registers are supported,
> differs by SoC family.  So while the HSIC enable feature is currently
> only present for SAMA5D2, it probably does not hurt to set it on the
> other families, hence no additional check for SoC family here.
> 
> Tested on a custom board featuring a SAMA5D27C-D5M SiP connected to an
> USB3503 hub with an upstream HSIC interface.
> 
> Link: https://community.atmel.com/forum/sama5d2-using-hsic-under-linux
> Signed-off-by: Alexander Dahl <ada@thorsis.com>
> ---
> 
> Notes:
>     - for introducing new dt binding, would be nice to convert old one
>       first, probably needs split up and multiple iteration review?
>     - name of that new dt property?
>     - register definitions put to a separate file, like
>       'drivers/usb/host/ehci-fsl.h'
>     - unsure where exactly in the probe process that register write should
>       happen, datasheet gives no hint
>     - should suspend/resume be considered?
> 
>  drivers/usb/host/ehci-atmel.c | 17 +++++++++++++++++
>  drivers/usb/host/ehci-atmel.h | 19 +++++++++++++++++++

No need for a new .h file that is only used in a single .c file.  Just
put those few lines in the .c file please.

thanks,

greg k-h

WARNING: multiple messages have this Message-ID (diff)
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Alexander Dahl <ada@thorsis.com>
Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	Ludovic Desroches <ludovic.desroches@microchip.com>,
	Alan Stern <stern@rowland.harvard.edu>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [RFC PATCH] USB: host: ehci-atmel: Allow enabling HSIC on SAMA5D2
Date: Tue, 24 Aug 2021 08:45:25 +0200	[thread overview]
Message-ID: <YSSVhblgt/45TvzF@kroah.com> (raw)
In-Reply-To: <20210824063702.24586-1-ada@thorsis.com>

On Tue, Aug 24, 2021 at 08:37:02AM +0200, Alexander Dahl wrote:
> Unlike other SoC series featuring the 'atmel,at91sam9g45-ehci' USB EHCI
> controller, which have embedded USB high-speed transceivers for each
> port, the third port on the SAMA5D2 series is HSIC only.  That HSIC
> interface is not enabled after a power-on reset, but can be enabled by
> setting a flag in a vendor specific EHCI register.
> 
> The register offsets added to the new header file were compared with
> those for the SAM9G45, SAM9X25, SAMA5D3, SAMA5D4, and SAM9X60 series and
> there are no differences in the offsets or contents of those registers.
> Which of those additional vendor specific registers are supported,
> differs by SoC family.  So while the HSIC enable feature is currently
> only present for SAMA5D2, it probably does not hurt to set it on the
> other families, hence no additional check for SoC family here.
> 
> Tested on a custom board featuring a SAMA5D27C-D5M SiP connected to an
> USB3503 hub with an upstream HSIC interface.
> 
> Link: https://community.atmel.com/forum/sama5d2-using-hsic-under-linux
> Signed-off-by: Alexander Dahl <ada@thorsis.com>
> ---
> 
> Notes:
>     - for introducing new dt binding, would be nice to convert old one
>       first, probably needs split up and multiple iteration review?
>     - name of that new dt property?
>     - register definitions put to a separate file, like
>       'drivers/usb/host/ehci-fsl.h'
>     - unsure where exactly in the probe process that register write should
>       happen, datasheet gives no hint
>     - should suspend/resume be considered?
> 
>  drivers/usb/host/ehci-atmel.c | 17 +++++++++++++++++
>  drivers/usb/host/ehci-atmel.h | 19 +++++++++++++++++++

No need for a new .h file that is only used in a single .c file.  Just
put those few lines in the .c file please.

thanks,

greg k-h

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

  reply	other threads:[~2021-08-24  6:45 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-23  9:24 Enable HSIC Host Port on Atmel/Microchip SAMA5D2 Alexander Dahl
2021-08-23  9:24 ` Alexander Dahl
2021-08-23 14:00 ` Alan Stern
2021-08-23 14:00   ` Alan Stern
2021-08-24  6:37   ` [RFC PATCH] USB: host: ehci-atmel: Allow enabling HSIC on SAMA5D2 Alexander Dahl
2021-08-24  6:37     ` Alexander Dahl
2021-08-24  6:45     ` Greg Kroah-Hartman [this message]
2021-08-24  6:45       ` Greg Kroah-Hartman
2021-09-02 15:33     ` Nicolas Ferre
2021-09-02 15:33       ` Nicolas Ferre
2021-09-06  7:20       ` Alexander Dahl
2021-09-06  7:20         ` 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=YSSVhblgt/45TvzF@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=ada@thorsis.com \
    --cc=alexandre.belloni@bootlin.com \
    --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.