All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Dahl <ada@thorsis.com>
To: linux-usb@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, rca@thorsis.com
Subject: Enable HSIC Host Port on Atmel/Microchip SAMA5D2
Date: Mon, 23 Aug 2021 11:24:35 +0200	[thread overview]
Message-ID: <2869763.XZdSvA6Ref@ada> (raw)

Hello,

for a new embedded board featuring a Microchip SAMA5D2 SoC (64 MiB SiP variant 
SAMA5D27C-D5M) we connected the third USB host port (HSIC only) with an 
USB3503 hub chip. This doesn't work out of the box with the Linux kernel 
currently, because neither the SoC nor the kernel does enable the HSIC 
interface by default.

That SoC has three USB host ports, from the SAMA5D2 Series Datasheet [1] I 
learned there's a flag in an EHCI register, which has to be set to enable the 
HSIC interface on port C, the third port. (Section "41.7.14 EHCI: REG08 - HSIC 
Enable/Disable" of the datasheet.) I suppose that register is vendor specific. 
The register definitions in '/include/linux/usb/ehci_def.h' do not contain 
that register.

Where would I add that register definition and set that flag in the kernel 
then?  I suppose in the vendor specific ehci driver?  
That would be 'drivers/usb/host/ehci-atmel.c' right?

Since that feature is optional (other boards don't need to turn on hsic on 
that port), some driver specific new device tree binding would be necessary, 
right?  I suppose that would have to be documented in 'Documentation/
devicetree/bindings/usb/atmel-usb.txt' right? (Or that would have to be 
converted to yaml first?)

Is this the right track?  If yes, I'm going to develop patches for this. 
Otherwise any hint into the right direction are highly appreciated.

FWIW, I'm not the first one struggling [2] with this problem. ;-)

Greets
Alex

[1] https://www.microchip.com/en-us/product/ATSAMA5D27C-D5M#document-table
[2] https://community.atmel.com/forum/sama5d2-using-hsic-under-linux




WARNING: multiple messages have this Message-ID (diff)
From: Alexander Dahl <ada@thorsis.com>
To: linux-usb@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, rca@thorsis.com
Subject: Enable HSIC Host Port on Atmel/Microchip SAMA5D2
Date: Mon, 23 Aug 2021 11:24:35 +0200	[thread overview]
Message-ID: <2869763.XZdSvA6Ref@ada> (raw)

Hello,

for a new embedded board featuring a Microchip SAMA5D2 SoC (64 MiB SiP variant 
SAMA5D27C-D5M) we connected the third USB host port (HSIC only) with an 
USB3503 hub chip. This doesn't work out of the box with the Linux kernel 
currently, because neither the SoC nor the kernel does enable the HSIC 
interface by default.

That SoC has three USB host ports, from the SAMA5D2 Series Datasheet [1] I 
learned there's a flag in an EHCI register, which has to be set to enable the 
HSIC interface on port C, the third port. (Section "41.7.14 EHCI: REG08 - HSIC 
Enable/Disable" of the datasheet.) I suppose that register is vendor specific. 
The register definitions in '/include/linux/usb/ehci_def.h' do not contain 
that register.

Where would I add that register definition and set that flag in the kernel 
then?  I suppose in the vendor specific ehci driver?  
That would be 'drivers/usb/host/ehci-atmel.c' right?

Since that feature is optional (other boards don't need to turn on hsic on 
that port), some driver specific new device tree binding would be necessary, 
right?  I suppose that would have to be documented in 'Documentation/
devicetree/bindings/usb/atmel-usb.txt' right? (Or that would have to be 
converted to yaml first?)

Is this the right track?  If yes, I'm going to develop patches for this. 
Otherwise any hint into the right direction are highly appreciated.

FWIW, I'm not the first one struggling [2] with this problem. ;-)

Greets
Alex

[1] https://www.microchip.com/en-us/product/ATSAMA5D27C-D5M#document-table
[2] https://community.atmel.com/forum/sama5d2-using-hsic-under-linux




_______________________________________________
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-23  9:29 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-23  9:24 Alexander Dahl [this message]
2021-08-23  9:24 ` Enable HSIC Host Port on Atmel/Microchip SAMA5D2 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
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=2869763.XZdSvA6Ref@ada \
    --to=ada@thorsis.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=rca@thorsis.com \
    /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.