Received: by 10.192.165.156 with SMTP id m28csp404010imm; Thu, 19 Apr 2018 00:45:23 -0700 (PDT) X-Google-Smtp-Source: AIpwx48nbIBj5hzqhR6rEFm0Lry69D8nfqLmAF9ppYT2nMf/aqSH4nairX5issot9/9w/7mo1SGW X-Received: by 2002:a17:902:2c83:: with SMTP id n3-v6mr5195763plb.317.1524123923478; Thu, 19 Apr 2018 00:45:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524123923; cv=none; d=google.com; s=arc-20160816; b=XOee3l2Nh0b4QXmi93PvfIUi02PmqysTY/+YIZcGbVHLF8PKuO7s2BMB/ijcaeoKNP skITbK2lK7mnWYu9zo0Q49C0lr9t+jAD66ACNGraMhkYgodjdU+mBi1WKDXUQTySh1tT av+uj6P0k4g2mxxrX25ggp+u+nBJG0DJHBVJjTNBs/JCiL++3ELsxhOqcoCGSKgUVvHa cdNcQga6rM5tqQUUGYB5J52R/t8q73mIITWTxhi2kg78aOMXyvu8Y6FyBIDxgGXOlnxC BVx7udVu36zeSxXlz1wjvLPefB0XsuLZsUGLEyISEvIDYvSRNaYy/gnewzMe4EabUfsn 7/6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=QJV0Nj96oC/7oV4ow1zqHO75VfxDidejcs7C8HNfu4E=; b=aTW8HG6k43rBKXHmsCL0LLxNycjA5w3rKYugQTfzFZwALJ8tm942as0lX0gWe2h0mV 5bji9eVmlFBOPl9YRi/hhVKdlL7KbjXVisdajyvg0JdOniSHxdh2uaXD/NqER5CJKNY/ Xm2Ajh45hlgAFVQ5sF71po+ltujttxWEMGKN5jBriyEtD17OfVuMF4/OjE4rr7Rjj59L twYpYt/P+9y+kxm1Zum1ZJBO0pHoLCXYVVxKWLyktYhyMPQzj5RJEP9zDIEPJO+R0hkY pa/ypfhdmngRWTe1dQmI0pJEatBUo+xCx++UEOeOvMulqannkO24Dq9HTfL0QiNDwST6 GvSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=skRvSRvv; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v5si2648753pfe.306.2018.04.19.00.45.09; Thu, 19 Apr 2018 00:45:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=skRvSRvv; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751489AbeDSHn7 (ORCPT + 99 others); Thu, 19 Apr 2018 03:43:59 -0400 Received: from mail-lf0-f53.google.com ([209.85.215.53]:41179 "EHLO mail-lf0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750881AbeDSHn6 (ORCPT ); Thu, 19 Apr 2018 03:43:58 -0400 Received: by mail-lf0-f53.google.com with SMTP id m202-v6so6354471lfe.8; Thu, 19 Apr 2018 00:43:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=QJV0Nj96oC/7oV4ow1zqHO75VfxDidejcs7C8HNfu4E=; b=skRvSRvvAFEfuNT6ViQawdgelzWkjO/4+7G63dNlx1Jz6inJN6KFvIimWo7p84b/40 JrtvjJ4O+idJKLJzK+4foGo02CcDvkXZeWR0pl2OzF04gzyc+r1YP1QclUBh82EBoIuA blguqHAwG0RqZ+QXPKLGTCEnPaOeMi4hUD18aGfNIuSpFb7knSg6+cS5iSsaBCiH9GOI yctoPdaJQzT9K2vxLGtvQLt1+u+c8KuDKWLECnMiAmERW6PgsXZ6Em0q5OVbyqvzsMLD u0VxY8mYEWP5aay4U47vZ+wvs1fAKKquW9he573ORNqY8SYtli6EULVJ8tHF0UOwxYF4 /B+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=QJV0Nj96oC/7oV4ow1zqHO75VfxDidejcs7C8HNfu4E=; b=tJnmEXKASpJQTuo5A2HcrKDPpVqrzrHBKPah54Kft9nt3LwI8fMXeTLC5r6wsqivos xssql/SIRpy/IVuYObvqtgmFRHJ5V5SypBv6d4vxZNyPCrUqffj8NkB+tZpCSxnlkVBJ pMczUFZQe1vBv4Zk9epipPpvb/G4ghOD+mVvFbYcygCXYzQLoM6qyzQ6b/POhHKSy/Ep GP3aDEaXvNlHQZLD06nPrw/UM3c+qhWw/+mi/5FywCc+7KsyNrDI+fTGd0iWrmMExJw8 KTYy95+JYOegcJZ0mGuqKgJbOoKcT2OzL7WeYfPmsltlNWzJwku/SM8YKuulKsxeUT8Y 6jiw== X-Gm-Message-State: ALQs6tClQpyv3iBw3VPhPhpOeXxNU4/zcM2i635QnXi9Zh+vur+WL9Fu OaSHLWFfl9+RjFswto1ALxA= X-Received: by 10.46.73.73 with SMTP id b9mr1217221ljd.118.1524123836467; Thu, 19 Apr 2018 00:43:56 -0700 (PDT) Received: from xi.terra (c-8bb2e655.07-184-6d6c6d4.cust.bredbandsbolaget.se. [85.230.178.139]) by smtp.gmail.com with ESMTPSA id 76-v6sm619588lfq.70.2018.04.19.00.43.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Apr 2018 00:43:55 -0700 (PDT) Received: from johan by xi.terra with local (Exim 4.90_1) (envelope-from ) id 1f94ET-0007zO-SB; Thu, 19 Apr 2018 09:43:53 +0200 Date: Thu, 19 Apr 2018 09:43:53 +0200 From: Johan Hovold To: Martin Blumenstingl Cc: Johan Hovold , Bin Liu , Greg Kroah-Hartman , Alan Stern , Arnd Bergmann , Kishon Vijay Abraham I , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 0/3] USB: musb: dsps: phy fix and DT-topology support Message-ID: <20180419074353.GK9198@localhost> References: <20180413151505.32663-1-johan@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 18, 2018 at 09:18:30PM +0200, Martin Blumenstingl wrote: > Hi Johan, > > On Fri, Apr 13, 2018 at 5:15 PM, Johan Hovold wrote: > > I've been carrying a patch out-of-tree since my work on improving the > > USB device-tree support which is needed to be able to describe USB > > topologies for musb based controllers. > > > > This patch, which associates the platform controller device with the > > glue device device-tree node, did not play well with the recent changes > > which added generic phy support to USB core however. > I'm the one who added this > > > Like the recent dwc2 regression fixed by Arnd after the device-tree > > #phy-cell changes, the generic phy code in USB core can now also fail > > indefinitly with -EPROBE_DEFER when the controller uses a legacy USB > > phy. > > > > The second patch addresses this for musb, which handles its own (legacy > > and generic) phys, but something more may possibly now be needed for > > other platforms with legacy phys. > I'm not sure if I understand the problem yet - could you please > explain with your words what "legacy PHYs" are and how the "conflict" > with the PHY handling in USB core? > > I am aware of two PHY subsystems: > - drivers/phy > -- also called "generic PHY framework" > -- uses a "phys" property Right, and these are sometimes referred to as generic PHYs, as opposed to... > - drivers/usb/phy > -- also called "USB PHY framework" > -- AFAIK this should not be used for new drivers ...the legacy ones. > -- uses an "usb-phy" property This is unfortunately not always the case however; some legacy USB phys are also referred to using a "phys" property... > the new PHY handling in USB core only parses the "phys" property and > thus should not conflict with "usb-phy" (the legacy property) > however, I probably missed something so I'd appreciate an explanation > how things can break ...and that is the problem. Specifically, since last fall when a number of legacy-phy nodes had a #phy-cells property added to them (to silence DTC warnings), the generic PHY subsubsystem can now return -EPROBE_DEFER indefinitely when looking up a phy as it finds a matching device-tree node, but for which there will never be a generic phy registered (since it's handled by a legacy-phy driver). I referred to Arnd's workaround for "usb-nop-xceiv" devices b7563e2796f8 ("phy: work around 'phys' references to usb-nop-xceiv devices") which has some more background on this. So if we have any other host controllers out there using "phys"-properties with legacy phys other than "usb-nop-xceiv", then these will now fail to register (with -EPROBE_DEFER) unless hcd->skip_phy_initialization is set (or we blacklist them as well in the generic phy code). I'm not aware of any further examples, but we're sure to find out soon enough if there are. Perhaps we should blacklist also "ti,am335x-usb-phy" in the generic phy code even if hcd->skip_phy_initialization is still needed for musb for the time being anyway. Johan