Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp2031525rdf; Mon, 6 Nov 2023 02:41:58 -0800 (PST) X-Google-Smtp-Source: AGHT+IHxT7Zbf0elo6JQHKdy1JxyknQxc7qu35Vf7rPNtkgjziZ5t6HiTIZLnXiWd7YyVulh2LIv X-Received: by 2002:a17:90b:1d03:b0:280:e85a:9dde with SMTP id on3-20020a17090b1d0300b00280e85a9ddemr5447245pjb.33.1699267318622; Mon, 06 Nov 2023 02:41:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699267318; cv=none; d=google.com; s=arc-20160816; b=djF7+yqG0ASD9eh7a2cpJnrsnOF47tK+WquiNlT7R5R9KAkS+00B3dmVS3CCeGL8cQ 7blxXz86rfpnlUzRaBaFKuDIGLZ2QqEcMJK2QHnrIyay+AJVjgwjC/mj4PmO+6Nlaw0R eH3gGApnIDzMkKsekrzoxq3AZgrDP4qo0PGsB4WioevNABP77mO2FpSfZoyUENUeJst2 GBDAWYxdrFA/ZNtx95cGhNQd8Af3w4U72qzSkiC8Y7LrfkyBfc0vKLS8d9JZDLBkc3gE vi7RkuwrVJJpxZfjMqCt/Ji8l2xroAm9QXymyFUKCJNgnFQq0zmbAPfcpsP/M0VpjI31 TVog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=VEVsEx0DVlJ8O9StGaGoa/zmmVCNV33SO8cBpWQO/eY=; fh=8LiuKVPvFhh/3q8a1uy7AO1GSC6mw9mlMTt8x+4S0cc=; b=jytWC4HrBGJpP1mfk73mbZSFuCWQIHuECdNbjBTyzm5+gN2yVXTOED5HMKwwuttVnr Y/c+hrg3Ulk6KWZosiC1elLnQIeeiaT7e9Bk/jKRXmBvj7PeLWcFwEBvMYuFlx3R9KFp O7l8kPBTLKT+WPyKBXg25JmcSgB+ukBluzZxK5ctQ40Be9+BfvPyO8dKggyALKPhS8RF Nu8Y/Vvhz6A+2Q+Yz6p/Qbajduy80unHSSpvGojSOtrw8/REceBmNWN8VzKZ/7b8ALJl oie7HdHYJwsxnHgkYPSs2ZVYrekWH7jmLtl09Cst+3v/TsUU94PE+yxW/wK/l763YO/Z 4QbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QHr3gpay; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id ce14-20020a17090aff0e00b00277453e82fesi7631117pjb.87.2023.11.06.02.41.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Nov 2023 02:41:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QHr3gpay; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 87CC280A18F0; Mon, 6 Nov 2023 02:41:52 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231159AbjKFKlo (ORCPT + 99 others); Mon, 6 Nov 2023 05:41:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38240 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229478AbjKFKlm (ORCPT ); Mon, 6 Nov 2023 05:41:42 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 47EA394; Mon, 6 Nov 2023 02:41:40 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DC3C9C433CA; Mon, 6 Nov 2023 10:41:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1699267299; bh=lk8OemT9/Tgr+wb+H9H8Ru9jGjmNq1ECVgVrgWwjRKI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=QHr3gpay05l0pR9JDb6GN4xWET2ibO4tePjLzVjoy7VBgkofIN/GYBk20sRJO8v4H 4kqwBlYtW6N9IyJtDRhdts7ZpvEhQBlEgVih8kdUfZLcpeYuYxj/fFIWGa6cHB/Kow jl7Z9jzMn9oqsegxvKXAt0XQh8oKm83Bl6j+6zkJ2LKpGbsyMvUlq0UkNiEwB+0KGL djZ9E/vIfSTuBHBEnst0GlNmJoeTb1Bd+cVNY3hPTa9YYzeXSphsyI8bKOHAhB2oAZ f5LdWATM81YEfJurRJ41cRpmdK/5U90hJ+4IeL0H6luEQzqJZljHEZpsdWm7ausbci WHXihgwy9zK7w== Received: from johan by xi.lan with local (Exim 4.96) (envelope-from ) id 1qzx3o-0007op-1L; Mon, 06 Nov 2023 11:42:25 +0100 Date: Mon, 6 Nov 2023 11:42:24 +0100 From: Johan Hovold To: Stanley =?utf-8?B?Q2hhbmdb5piM6IKy5b63XQ==?= Cc: Stefan Eichenberger , Johan Hovold , Mathias Nyman , Greg Kroah-Hartman , "linux-usb@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" , Maxime Ripard Subject: Re: [PATCH] USB: xhci-plat: fix legacy PHY double inity Message-ID: References: <20231103164323.14294-1-johan+linaro@kernel.org> <5a493e6fedb449bc93f83f31a682e5b9@realtek.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Mon, 06 Nov 2023 02:41:52 -0800 (PST) On Mon, Nov 06, 2023 at 10:37:06AM +0000, Stanley Chang[昌育德] wrote: > > > I use drivers/usb/dwc3/core.c and drivers/usb/dwc3/dwc3-rtk.c I > > > describe the PHY as generic and legacy PHY in device tree. > > > > That's not right. You should just use the generic PHY binding for new platforms. > > > > > Our driver needs the API base on a08799cf17c2 ("usb: phy: add usb phy > > notify port status API"). > > > But generic PHY driver is not support this. > > > > Yes, but you added that interface yourself, and that I think merging that was a > > mistake. > > > > We should not be building functionality on top of the legacy USB PHY > > implementation which is stuck in some transitional limbo. > > > > Apparently, your PHY drivers which were merged for 6.6 are the only users of > > this interface, and there are no upstream devicetrees that use these PHYs. > > > > I think we should revert this mess before we dig ourselves into an even deeper > > hole. > > This is an interim method, as the current generic PHY framework does > not support special operations on USB PHY. Then you need to add that. You can't add a new interface which is broken by design and can't be used unless you abuse the devicetree and describe your PHYs using *both* the generic 'phy' property and the *deprecated* 'usb-phy' property. That's just broken. > Now the generic PHY can't instead USB PHY in this stage. > For example, > drivers/phy/ti/phy-twl4030-usb.c > drivers/phy/qualcomm/phy-qcom-ipq806x-usb.c > drivers/phy/ti/phy-omap-usb2.c These should be fixed as well eventually. Johan