From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 33DB1C433EF for ; Mon, 18 Jul 2022 16:24:01 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6F37183FC5; Mon, 18 Jul 2022 18:23:58 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=akkea.ca Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=akkea.ca header.i=@akkea.ca header.b="jNdPBOjx"; dkim=pass (1024-bit key) header.d=akkea.ca header.i=@akkea.ca header.b="jNdPBOjx"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 28F4783F81; Mon, 18 Jul 2022 18:23:56 +0200 (CEST) Received: from node.akkea.ca (li1434-30.members.linode.com [45.33.107.30]) (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 4D1DF83FEA for ; Mon, 18 Jul 2022 18:23:53 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=akkea.ca Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=angus@akkea.ca Received: from localhost (localhost [127.0.0.1]) by node.akkea.ca (Postfix) with ESMTP id 8C5FF4E200C; Mon, 18 Jul 2022 16:23:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=akkea.ca; s=mail; t=1658161431; bh=qA8ht37hPLDf1HrlhlX89dzFhJVSPwhWK0ekuZrChGI=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=jNdPBOjxl6r+JOJJvPA5eHeKU/qPOGXg8K72SIrC3bwshyBcl/6I3czy0NPzaYW6Y ZMKb7CRqgArceHXF/Bw/MDCZF1XAOgWrODG21g4Z0YA02/VFWECcueLbTyte4xdpgW 3vVH/U6YZQMl2iaUM8zbGXoe+rxHxgnMnypmbk+M= Received: from node.akkea.ca ([127.0.0.1]) by localhost (mail.akkea.ca [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id oobyonJYjuAP; Mon, 18 Jul 2022 16:23:51 +0000 (UTC) Received: from www.akkea.ca (localhost [127.0.0.1]) by node.akkea.ca (Postfix) with ESMTP id 4C7774E2006; Mon, 18 Jul 2022 16:23:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=akkea.ca; s=mail; t=1658161431; bh=qA8ht37hPLDf1HrlhlX89dzFhJVSPwhWK0ekuZrChGI=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=jNdPBOjxl6r+JOJJvPA5eHeKU/qPOGXg8K72SIrC3bwshyBcl/6I3czy0NPzaYW6Y ZMKb7CRqgArceHXF/Bw/MDCZF1XAOgWrODG21g4Z0YA02/VFWECcueLbTyte4xdpgW 3vVH/U6YZQMl2iaUM8zbGXoe+rxHxgnMnypmbk+M= MIME-Version: 1.0 Date: Mon, 18 Jul 2022 09:23:51 -0700 From: Angus Ainslie To: Michal Simek Cc: Marek Vasut , U Boot , Michal Simek , kernel@puri.sm Subject: Re: DWC3 host support In-Reply-To: <147796d0-76af-c712-a426-1b3830691587@amd.com> References: <13226946-1652-f917-f580-e626f51c2525@denx.de> <0d799969-37a5-cafb-6d5d-8692dc5645c2@denx.de> <147796d0-76af-c712-a426-1b3830691587@amd.com> Message-ID: <33999919934dd27e026ff6b765227dbb@akkea.ca> X-Sender: angus@akkea.ca User-Agent: Roundcube Webmail/1.3.17 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.103.6 at phobos.denx.de X-Virus-Status: Clean Hi, On 2022-07-18 01:13, Michal Simek wrote: > On 7/17/22 17:23, Marek Vasut wrote: >> On 7/17/22 05:00, Angus Ainslie wrote: >>> On 2022-07-16 11:37, Marek Vasut wrote: >>>> On 7/16/22 15:02, Angus Ainslie wrote: >>>>> Hi Michal, >>>>> >>>>> I recently rebased my librem5 tree onto the latest u-boot-imx >>>>> branch >>>>> and the dwc3 host mode stopped working. >>>>> >>>>> I bisected it down to this commit: >>>>> >>>>> 142d50fbce7c364a74f5e8204dba491b9f066e6c usb: dwc3: Add support for >>>>> usb3-phy PHY configuration >>>>> >>>>> Reverting that commit allows usb host mode to work on the librem5 >>>>> again. >>>>> >>>>> Should this initialization go into an SOC specific glue_configure >>>>> function ? >>>>> >>>>> Is the imx8mq.dtsi missing something that will keep usb host >>>>> working >>>>> with this patch ? >>>>> >>>>> Does this break usb host on other imx8mq devices ? >>>> >>>> Wasn't this fixed by: >>>> 868d58f69c ("usb: dwc3: Fix non-usb3 configurations") >>>> ? >>> >>> I've got that in my tree and it still fails to probe the USB2 hub and >>> USB 2 storage. >> >> I assume you do have CONFIG_PHY_IMX8MQ_USB enabled ? >> >> What does generic_phy_get_by_name() return for you in >> drivers/usb/dwc3/dwc3-generic.c ? > > As Marek said there was one patch which fixes origin patch which > didn't handle all the error cases properly. We need to know return > value from generic_phy_get_by_name(), also if you still have usb3-phy > in DT (as is in imx8mq.dtsi) with phy DT status enabled and enabled > phy driver (CONFIG_PHY_IMX8MQ_USB). > Removing the usb3 phy definition also "fixes" it --- a/arch/arm/dts/imx8mq-librem5-r4.dts +++ b/arch/arm/dts/imx8mq-librem5-r4.dts @@ -33,3 +33,8 @@ &proximity { proximity-near-level = <10>; }; + +&usb_dwc3_1 { + phys = <&usb3_phy1>; + phy-names = "usb2-phy"; +}; Thanks Angus > Thanks, > Michal