Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp1080477rdb; Wed, 6 Dec 2023 08:06:03 -0800 (PST) X-Google-Smtp-Source: AGHT+IFh3jwc6xEn9XmVt3x2GpDlwlJUXocOrFZItmoP/kN6WAtd3I7XXMsQPLA7o7IJ2GBMyhD0 X-Received: by 2002:a17:90b:4b43:b0:286:fbb0:2cf2 with SMTP id mi3-20020a17090b4b4300b00286fbb02cf2mr1439113pjb.20.1701878762871; Wed, 06 Dec 2023 08:06:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701878762; cv=none; d=google.com; s=arc-20160816; b=nN7BalVmTnns7bP5YQRfAWuIoNxxlIeLQ3H0M+HmyG99oJrWPSuC86SyZG6cdJEIne 709a8C1SJ1Fximd6i6Y6Y8bs2ep2W1IGdCNDAY8+OZBXJgh3PKJv6RXj7iQFT/yY7ZA/ Ixn+RaVJhaByVGRL11Sw6P0Y/9410Xq6kutNksjqDBWQBTHqo3DOQTC2T52GfnJ/O7yt ig4/rV5HZvpLTK7bVRJnbRA+AvyCeIvGJHhyFaRgvLJD4NRJ3c5Gme8wP+f1ofZhRFdm 6a17v/A4SxNDET/HsLQr5p8hLl1ego5KjrqSdrlpFKiTM/zfK6Dedqt9m0nlDTgwvA/U 4+Lg== 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-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=jWu5AuL7yKoNx7WS0OkakDQa71S04QtMUM2UIOzUW6s=; fh=D7aol+U/tLickY9KaYIvOaYaa3lHKu3Kch1oYoR5Jgw=; b=tadAElh7PraO+qaSkShkoSNl4NpkhdtiubY5mvcQKCMa5tBhfUtAjyBRB1JC6XHXdq UKCQhG5HlQj28LJ2PAQY0DSQN95wD+zjsfQ/lsBkC9qHBItnkwjkGRUUZCVRENt1OVl0 xNwqmLTr82hwGkN4J6YPTrC/NPzSfaiHlWq8IG6aQnQo96/kpYfgf+VKHItdJqHbPgQY THsaL5yB31sKxsj30LNHkzRQ59JrbszEvBLrAhdPwc1EnsNxSi3/PqntLMVB19qlHf2d vhTVNA44SqCtZn6Tc3Mh6WWAUqvY9cFD3hCa633schcyMyQpx4xAXyFwWYL6g/Qj3yp7 1jaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=ceVNIdGl; 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=lunn.ch Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id ns13-20020a17090b250d00b002864499ffe7si927161pjb.1.2023.12.06.08.05.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Dec 2023 08:06:02 -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=@lunn.ch header.s=20171124 header.b=ceVNIdGl; 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=lunn.ch Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 8BC86807782F; Wed, 6 Dec 2023 08:05:16 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1442680AbjLFQEy (ORCPT + 99 others); Wed, 6 Dec 2023 11:04:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50750 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1442679AbjLFQEu (ORCPT ); Wed, 6 Dec 2023 11:04:50 -0500 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B04FD6E; Wed, 6 Dec 2023 08:04:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=jWu5AuL7yKoNx7WS0OkakDQa71S04QtMUM2UIOzUW6s=; b=ceVNIdGl0TNS5phcFLE3/WITrs +6VC9FcJpVAcEXcWHMX1NPQ5JYv+Z671QrQkD3aDpj4QT7n5H3xb4/Ee0aQ9NdHDIIN9uaIS2/hMl q7URm2LkRa8SeWybTtkrDWUStgQhShA+GtuxLFOEvw+AvC+vT0xD1ugYI0oy1S9SyRbM=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1rAuO1-002Dzb-6k; Wed, 06 Dec 2023 17:04:33 +0100 Date: Wed, 6 Dec 2023 17:04:33 +0100 From: Andrew Lunn To: Quentin Schulz Cc: Heiko Stuebner , hkallweit1@gmail.com, linux@armlinux.org.uk, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Heiko Stuebner Subject: Re: [PATCH] net: mdio: enable optional clock when registering a phy from devicetree Message-ID: <853c30b2-afb9-4f86-87bb-ce79cbca1960@lunn.ch> References: <20231201142453.324697-1-heiko@sntech.de> <84c102fa-e3f4-4454-82c9-95eea7eeb941@lunn.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,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]); Wed, 06 Dec 2023 08:05:16 -0800 (PST) > I was just wondering about this as well. Right now, we put the reset on the > MAC controller device tree node for our board (c.f. https://lore.kernel.org/linux-arm-kernel/20231201191103.343097-1-heiko@sntech.de/) > because otherwise it doesn't work. > > I assume this is because the phy net subsystem is not handling the reset at > the proper time (it does so before probing the PHY driver, which is too late > because the auto-detection mechanism has already run before and the MAC > couldn't find the PHY ID since the PHY wasn't reset properly at that time). > > I think essentially we would need to have both the reset assert/deassert and > clock enabling/disabling in the same location as this patch is suggesting to > make all of this work. > > I'll not investigate this, because Florian NACK'ed the whole thing. I do not > personally have an interest in fixing only the reset, because we need the > clock to be enabled for the auto-detection mechanism to work. There was a couple of discussions at LPC this year about resources needed to be enabled before bus discovered would work. I missed the first talk, but was in the second. That concentrated more on PCI, despite it being a generic problem. Ideally we want some way to list all the resources and ordering and delays etc, so that a generic block of code could get the device into an enumerable state. But there was a general push back on this idea from GregKH and the PM Maintainer, but i think the MMC Maintainer was for it, since the MMC subsystem has something which could be made generic. The outcome of the session was a PCI only solution. I still don't think we should be solving this in phylib, so for the moment, we need to keep with ID values in DT, so the driver gets probed. Anything we add to phylib is just going to make it harder to adopt a generic solution, if it ever gets agreed on. Andrew