From patchwork Fri Mar 5 20:03:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Phil Sutter X-Patchwork-Id: 1448187 X-Patchwork-Delegate: sr@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Dsdtk1nNwz9sW5 for ; Sat, 6 Mar 2021 07:02:22 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 2CD6281FB4; Fri, 5 Mar 2021 21:02:17 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=nwl.cc Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id AEBA882016; Fri, 5 Mar 2021 21:02:15 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from orbyte.nwl.cc (orbyte.nwl.cc [IPv6:2001:41d0:e:133a::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id C63D780F58 for ; Fri, 5 Mar 2021 21:02:12 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=nwl.cc Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=phil@nwl.cc Received: from localhost ([::1]:45624 helo=base) by orbyte.nwl.cc with esmtp (Exim 4.94) (envelope-from ) id 1lIGeJ-0006Gz-ET; Fri, 05 Mar 2021 21:02:11 +0100 From: Phil Sutter To: u-boot@lists.denx.de Cc: Tom Rini , Stefan Roese Subject: [PATCH v2 2/5] configs: ds414: Enable XHCI_PCI by default Date: Fri, 5 Mar 2021 21:03:52 +0100 Message-Id: <20210305200352.19605-1-phil@nwl.cc> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210303005526.15056-3-phil@nwl.cc> References: <20210303005526.15056-3-phil@nwl.cc> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.4 at phobos.denx.de X-Virus-Status: Clean With the recent fixes in pci_mvebu and xhci-pci drivers, the two rear USB3 ports are finally usable and accessing them no longer hangs the system. Moreover, if Linux is booted without a prior call to 'pci enum' and 'usb start', the HCD is detected but attached devices are not usable: | xhci_hcd 0000:02:00.0: xHCI Host Controller | xhci_hcd 0000:02:00.0: new USB bus registered, assigned bus number 2 | xhci_hcd 0000:02:00.0: hcc params 0x040040a5 hci version 0x100 quirks 0x0000000000080490 | usb usb2: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.04 | usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1 | usb usb2: Product: xHCI Host Controller | usb usb2: Manufacturer: Linux 5.4.92-1 xhci-hcd | usb usb2: SerialNumber: 0000:02:00.0 | hub 2-0:1.0: USB hub found | ata1: SATA link down (SStatus 0 SControl 300) | hub 2-0:1.0: 2 ports detected | xhci_hcd 0000:02:00.0: xHCI Host Controller | xhci_hcd 0000:02:00.0: new USB bus registered, assigned bus number 3 | xhci_hcd 0000:02:00.0: Host supports USB 3.0 SuperSpeed | usb usb3: We don't know the algorithms for LPM for this host, disabling LPM. | usb usb3: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 5.04 | usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1 | usb usb3: Product: xHCI Host Controller | usb usb3: Manufacturer: Linux 5.4.92-1 xhci-hcd | usb usb3: SerialNumber: 0000:02:00.0 | hub 3-0:1.0: USB hub found | hub 3-0:1.0: 2 ports detected [...] | xhci_hcd 0000:02:00.0: Error while assigning device slot ID | xhci_hcd 0000:02:00.0: Max number of devices this xHCI host supports is 64. | usb usb2-port2: couldn't allocate usb_device To avoid this problem, enumerate PCI (and USB) from PREBOOT. Signed-off-by: Phil Sutter --- Changes since v1: - Have to enable XHCI_HCD as well to fulfill Kconfig dependency. - Explicitly disable XHCI_MARVELL which defaults to enabled. - Prefix PREBOOT with 'pci enum'. - Update commit message accordingly. --- configs/ds414_defconfig | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/configs/ds414_defconfig b/configs/ds414_defconfig index 3e6dcec3edde3..24466d81dffdb 100644 --- a/configs/ds414_defconfig +++ b/configs/ds414_defconfig @@ -22,7 +22,7 @@ CONFIG_BOOTDELAY=3 CONFIG_USE_BOOTARGS=y CONFIG_BOOTARGS="console=ttyS0,115200" CONFIG_USE_PREBOOT=y -CONFIG_PREBOOT="usb start; sf probe" +CONFIG_PREBOOT="pci enum; usb start; sf probe" # CONFIG_DISPLAY_BOARDINFO is not set CONFIG_DISPLAY_BOARDINFO_LATE=y CONFIG_SPL_I2C_SUPPORT=y @@ -65,5 +65,8 @@ CONFIG_SYS_NS16550=y CONFIG_KIRKWOOD_SPI=y CONFIG_USB=y CONFIG_DM_USB=y +CONFIG_USB_XHCI_HCD=y +# CONFIG_USB_XHCI_MVEBU is not set +CONFIG_USB_XHCI_PCI=y CONFIG_USB_EHCI_HCD=y CONFIG_USB_STORAGE=y