Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 28D54C07E95 for ; Fri, 2 Jul 2021 23:36:47 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id EA1CC61352 for ; Fri, 2 Jul 2021 23:36:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EA1CC61352 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id DE2CA814A4; Sat, 3 Jul 2021 01:36:43 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1625269004; bh=4/Wt1TJ5gbFwhu2rxnTpo7FUgl3luEgE+sVNcfKY2uQ=; h=Subject:To:Cc:References:From:Date:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=ZlB0JNgbi8IFw5+e9vs6tJl86HnWN3jo4GCvj1IgMzTuJ9ZvYP2jqVvSfj4LbWYhG r5XtBSD2GpqzTztpBC8mXtcOfflnhN4MNkSt2CrHdn+ejlrvCW+kqDO/n5BYilPY+i mJMNqthOVfCwGi/g5e8wYu5UW+umc7QZpaKLwTOfsci1x/6xnkteh9VP0T7h0Fhh2S a8MekT3dFsCGyVQeILlBIEUSoFMdD/Kj+YPR83C9IBrabw/JH/GjN0aammTkZe7C/J cjJZuc9jOXW0aktQGGNj9Q3YvP/oAbuJdxb7jEvwtRb0f0YZzBPyZVMxsDbYDNv6Jd vSkQMo0XpmnzA== Received: from [IPv6:::1] (p578adb1c.dip0.t-ipconnect.de [87.138.219.28]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: marex@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id 719BB814A4; Sat, 3 Jul 2021 01:36:41 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1625269001; bh=4/Wt1TJ5gbFwhu2rxnTpo7FUgl3luEgE+sVNcfKY2uQ=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=eNZuVoGs48fdDgo3EtEVLJ3S5XuhiNy/gBz+cOh3FGhCX/+uhEIwnKywVI6JelEDW /V7wGZWpxMitQRckmgiceXuwUeGD57y055lFRPlNh9vnw91mc8LyJeweqJFlGf1jdA 6eZcPf2Mj2kRropt+YhnOxUyxM7jcH+Q1X0m8QzTcvS3VnqCMwwDvUruR0tYa1tAtU NxKwfsifhWZmGds56TIXQZnSpQensldghh/nsHAatXWmNiarOPMf5SCVWHHUVT4/2c F98S5O+z5UOJmM3XpS7B2kx6S784UqJasBLGX5Vaq5dsrQE5a6vYoWxkORIdTjtlRo 79goX1JfKM4PQ== Subject: Re: [PATCH v2 1/2] usb: ehci-mx6: move mode set/detect to probe To: Tim Harvey Cc: u-boot , Fabio Estevam , Stefano Babic , "NXP i . MX U-Boot Team" , Adam Ford , Schrempf Frieder , Peng Fan References: <20210702001521.27704-1-tharvey@gateworks.com> <20210702001521.27704-2-tharvey@gateworks.com> <49a1b871-9f8a-8eba-1118-775d3c4346e2@denx.de> <2db88c05-a04b-b6d3-3475-445b6af218d5@denx.de> From: Marek Vasut Message-ID: Date: Sat, 3 Jul 2021 01:36:40 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit 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.103.2 at phobos.denx.de X-Virus-Status: Clean On 7/3/21 12:36 AM, Tim Harvey wrote: > On Fri, Jul 2, 2021 at 3:18 PM Marek Vasut wrote: >> >> On 7/2/21 11:44 PM, Tim Harvey wrote: >>> On Fri, Jul 2, 2021 at 12:53 PM Marek Vasut wrote: >>>> >>>> On 7/2/21 9:43 PM, Tim Harvey wrote: >>>>> On Fri, Jul 2, 2021 at 12:17 PM Marek Vasut wrote: >>>>>> >>>>>> On 7/2/21 2:15 AM, Tim Harvey wrote: >>>>>>> There is no need to set and/or detect mode in of_to_plat >>>>>> >>>>>> Are you absolutely sure of that ? >>>>>> >>>>>> It used to be necessary to know the core mode early to determine which >>>>>> driver (the gadget or host) to probe, that's why this code was in >>>>>> of_to_plat. >>>>>> >>>>> >>>>> Marek, >>>>> >>>>> I can't find a reason for the core mode to be known early and have >>>>> tested it both with host and gadget mode on IMX6 and IMX8MM. Fabio has >>>>> tested this change also (from another thread) with SPL SDP on IMX8MM >>>>> (granted the SPL is not using DM_USB for that). >>>>> >>>>> It appears I accidentally forgot to cc the uboot list so I'll need to >>>>> resend this at any rate. >>>> >>>> If I recall it correctly, the mode determination happened early because >>>> it was necessary to find out which driver to probe (this one, or the >>>> samsung gadget one) before it actually probed. I'm not sure myself if >>>> this is still even applicable. >>> >>> Marek, >>> >>> When I tested UMS with this series on imx6 based gwventana I had to >>> troubleshoot a regression caused when I switched to DM_USB and found >>> that the gadget driver isn't probed until you issue the ums command. I >>> don't know if this helps reduce your hesitation here. >> >> Do I understand it correctly that, because you had to debug a >> regression, this patch should be OK ? That implication there is a bit odd. >> > > Not at all... My regression had to do with the fact that DM_USB uses > the 'usb0' alias to get to the USB OTG controller (which I didn't have > defined right). I merely pointed out that I had to poke around at the > code enough to realize the device controller didn't get probed until > you use the ums command. I didn't realize my regression until I set > out to test gadget mode so that I could resubmit this series and let > you know that I had tested both host and gadget mode on the boards I > have. > >> What I am asking is whether you considered all the things which can go >> wrong with this still messy driver, that's all. > > Oh I most definitely will never be able to consider everything as you > point out the driver is a complete mess and it supports a large > variety of SoC's and configurations. All I can do is make my best > effort to look for possible issues (which I've done), test (which I've > done), and post for review. All right >>> I'm not sure what else you want me to do with this - personally I >>> would like to see some more maintainers of boards using ehci-mx6 chime >>> in (mx7?) with testing results showing host and device un-affected. I >>> only have imx6q/imx6dl/imx8mm/imx8mn to test with here. >> >> The other option is to put it into next and see whether someone >> complains. I am banking toward that option. > > By 'next' do you mean it sits in a branch that never gets merged or > are you saying it gets merged after v2021.07? I would agree it should > not be merged this late into v2021.07 but if it sits in a branch > that's never merged to master it will never get tested. The later, i.e. scheduled for 2021.10 .