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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3A529C001DF for ; Mon, 7 Aug 2023 19:51:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229515AbjHGTv2 (ORCPT ); Mon, 7 Aug 2023 15:51:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43364 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229761AbjHGTv0 (ORCPT ); Mon, 7 Aug 2023 15:51:26 -0400 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0CA49199E; Mon, 7 Aug 2023 12:51:09 -0700 (PDT) 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=9J+uImyTN0TfhfemsisSDeyNz12H39me+3+txm8sV1M=; b=5hSOXjVS6SKPKxljJRlznnehnO nlcxQoPku63L4M3AugNjdliGPXLSZYCQFC6lYfYdtvnYKeegtTNneZQwvVTFgmQkqhZZzAezt3VHV 7B2d3r6mhN3E88lPY/c51AYGEJ3UxI/90r9Y8QL2bVFng9dS+vF7BtbV0M/TWO6OpIes=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1qT6Fh-003O16-RO; Mon, 07 Aug 2023 21:50:53 +0200 Date: Mon, 7 Aug 2023 21:50:53 +0200 From: Andrew Lunn To: Bartosz Golaszewski Cc: "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Alexandre Torgue , Jose Abreu , Maxime Coquelin , Andrew Halaney , Alex Elder , Srini Kandagatla , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, Bartosz Golaszewski Subject: Re: [PATCH 0/2] net: stmmac: allow sharing MDIO lines Message-ID: <54421791-75fa-4ed3-8432-e21184556cde@lunn.ch> References: <20230807193102.6374-1-brgl@bgdev.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230807193102.6374-1-brgl@bgdev.pl> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 07, 2023 at 09:31:00PM +0200, Bartosz Golaszewski wrote: > From: Bartosz Golaszewski > > Two MACs may share MDIO lines to the PHYs. Let's allow that in the > stmmac driver by providing a new device-tree property allowing one MAC > node to reference the MDIO bus defined on a second MAC node. I don't understand why this is needed. phy-handle can point to a phy on any MDIO bus. So it is no problem for one MAC to point to the other MACs MDIO bus as is. You do sometimes get into ordering problems, especially if MAC0 is pointing to a PHY on MAC1 MDIO bus. But MAC0 should get a -EPROBE_DEFER, MAC1 then probes, creating its MDIO bus and the two PHYs on it, and then later MAC0 is probes again and is successful. Andrew