Devicetree
 help / color / mirror / Atom feed
From: Cyril Brulebois <kibi@debian.org>
To: Stefan Wahren <wahrenst@gmx.net>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Florian Fainelli <florian.fainelli@broadcom.com>,
	Mathias Nyman <mathias.nyman@intel.com>,
	bcm-kernel-feedback-list@broadcom.com, linux-usb@vger.kernel.org,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	Jim Quinlan <james.quinlan@broadcom.com>
Subject: Re: [PATCH V2 0/2] ARM: dts: bcm2711: Add generic xHCI
Date: Fri, 1 Dec 2023 18:38:43 +0100	[thread overview]
Message-ID: <20231201173843.isjlp7zphdvvyvbt@mraw.org> (raw)
In-Reply-To: <20231130154229.22334-1-wahrenst@gmx.net>

[-- Attachment #1: Type: text/plain, Size: 3828 bytes --]

Hi Stefan,

Stefan Wahren <wahrenst@gmx.net> (2023-11-30):
> In contrast to the Raspberry Pi 4, the Compute Module 4 or the IO board
> does not have a VL805 USB 3.0 host controller, which is connected via
> PCIe. Instead, the BCM2711 on the Compute Module provides the built-in
> xHCI.
> 
> Changes in V2:
> - adjust xHCI compatible as suggested by Justin & Florian
> - keep xHCI disabled in order to let the bootloader decide which
>   USB block should be enabled, which result in a drop of patch 3
> 
> Stefan Wahren (2):
>   dt-bindings: usb: xhci: Add optional power-domains
>   ARM: dts: bcm2711: Add generic xHCI
> 
>  .../devicetree/bindings/usb/generic-xhci.yaml      |  3 +++
>  arch/arm/boot/dts/broadcom/bcm2711-rpi.dtsi        |  5 +++++
>  arch/arm/boot/dts/broadcom/bcm2711.dtsi            | 14 ++++++++++++++
>  3 files changed, 22 insertions(+)

Thanks, tests look much better this time!

Tested-by: Cyril Brulebois <cyril@debamax.com>


With CM4 Lite on CM4 IO Board, with a Samsung flash drive and a USB
keyboard connected to onboard USB ports, I'm getting the following
results (still with a Debian 12 arm64 userspace):

1. With unpatched kernel and unmodified config.txt:
     Both USB devices are working fine.

2. With unpatched kernel and otg_mode=1 in config.txt:
     Both USB devices disappear. lsmod reports dwc2 is no longer loaded,
     along with all USB and SCSI related modules.

3. With patched kernel and unmodified config.txt:
     Both USB devices are still working fine. lsmod confirms dwc2 is
     still used.

4. With patched kernel and otg_mode=1 in config.txt:
     Both USB devices are still working fine. lsmod reports dwc2 is
     going away, and other USB modules come up: usbhid, xhci_hcd,
     xhci_plat_hcd, along with others like hid, hid_generic, joydev. 

     Reading from the Samsung flash drive gives a little boost, from
     37.5 MB/s to 38.7 MB/s. Writing to it gives a little boost, from
     16.5 MB/s to 17.4 MB/s. Not as spectacular as Florian's results but
     still not a regression! :)

I tested that initially with a CM4 Lite Rev 1.0 (which was breaking case
number 3 with the v1 of this patch series), then extended testing to CM4
8/32 Rev 1.0 and CM4 4/32 Rev 1.1, which confirmed those results.


Adding a PCIe-to-USB expansion board to see if this has side effects on
other USB things, that still works fine in cases 3 and 4 (so without or
with otg_mode=1), having a Samsung flash drive on the PCIe-to-USB board
and another one the onboard USB port. At this point, I only verified the
block devices were reported by lsblk though (no actual transfer tests).

Of course that relies on also applying Jim Quinlan's PCIe patch series
v8 to make sure PCIe isn't an issue:
  https://lore.kernel.org/all/20231126201946.ffm3bhg5du2xgztv@mraw.org/

I've confirmed the presence of both Samsung flash drives with three
different cards (adding CONFIG_USB_XHCI_PCI_RENESAS=m to the config
shared in the v1 thread, and adding /lib/firmware/renesas_usb_fw.mem):
 - SupaHub PCE6U1C-R02, VER 006
 - SupaHub PCE6U1C-R02, VER 006S
 - Waveshare PCIe TO USB 3.2 Gen1 (B)
   https://www.waveshare.com/wiki/PCIe_TO_USB_3.2_Gen1_(B)


Finally, I've deployed the patched kernel (still this v2 plus Jim's v8)
in a CM4-based product that uses both onboard USB ports and PCIe-to-USB
ports, and all USB components still work fine (3 RF adapters, 1 modem).
That's the case with an unmodified config.txt, but also when adding
otg_mode=1:
 - xhci_pci and xhci_pci_renesas were already loaded;
 - xhci_plat_hcd appears in OTG mode, while dwc2 goes away.


Cheers,
-- 
Cyril Brulebois (kibi@debian.org)            <https://debamax.com/>
D-I release manager -- Release team member -- Freelance Consultant

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

      parent reply	other threads:[~2023-12-01 17:39 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-30 15:42 [PATCH V2 0/2] ARM: dts: bcm2711: Add generic xHCI Stefan Wahren
2023-11-30 15:42 ` [PATCH V2 1/2] dt-bindings: usb: xhci: Add optional power-domains Stefan Wahren
2023-11-30 17:50   ` Florian Fainelli
2023-12-01 16:24     ` Conor Dooley
2023-11-30 15:42 ` [PATCH V2 2/2] ARM: dts: bcm2711: Add generic xHCI Stefan Wahren
2023-11-30 18:09   ` Florian Fainelli
2023-11-30 18:28   ` Justin Chen
2023-12-01 17:38 ` Cyril Brulebois [this message]

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=20231201173843.isjlp7zphdvvyvbt@mraw.org \
    --to=kibi@debian.org \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=florian.fainelli@broadcom.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=james.quinlan@broadcom.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mathias.nyman@intel.com \
    --cc=robh+dt@kernel.org \
    --cc=wahrenst@gmx.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox