Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp2505749rdb; Mon, 20 Nov 2023 12:46:19 -0800 (PST) X-Google-Smtp-Source: AGHT+IEoLI8ioTM4+4sE9Fu2mO6HMddCrJYtIB1/XXmWcwyymq7G9A3ItSdLI41CAyOQFVljwjMl X-Received: by 2002:a05:6a21:19b:b0:189:dc00:cf85 with SMTP id le27-20020a056a21019b00b00189dc00cf85mr6510996pzb.36.1700513178825; Mon, 20 Nov 2023 12:46:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700513178; cv=none; d=google.com; s=arc-20160816; b=uYBi0jgi16b5oKrFGRzm1Glr8tgfvToFhNg2oJ6l9VhINiqwVjJbTugEJ+Wk6oS32z 3TyaCSAA/8eBzmZPb0sT6P4eW7RQwVsPmwvGeLFD/tKQAau2Fik1s+IXthZvD0gTlTzp iBkZ/z6mALHPnV1BOLrC7+uFDKO1u6ib0gTo5/4ubs2XEiovDuW3meFuIGyJIz+qPzIX +8x0PSTXf2DwD6Jw5Gu1bT1r27jMv3tACfVRuF/BrBO+Iw+x0DuUQAe6k+NrKcKmBqUs oIpzbh2w1qxlFFeVJ/oop9IV9gXwYDqpS+Gx/A64yMpKv9QGPNybY0ts6Pb3DDTe+v2g PctQ== 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=sIArtSu73qZ+pj+BkJUnVf1olPkA9bvYl7JJi8jdX28=; fh=+k2ac32NMQohGfx41aqcCJ8a0dRKeYTq2xCKQy0sbrE=; b=x8fa9DuO6v8hCJqNzzJHSDvPqJ/ua3B5p0KTi5CA0HyxTmGo8aPLmpPN40+OuzAtO8 RZlKENuNDEc12lnOQqAFHLq2CBz7KAEjt+5EawN8YYiqVIkGH7zccildiqtQRD81a8iV XXzD8ZJXdMkgDWub6vTqOnzYomR+1B1WUkGIV+QL+OHhPzDNToVc5jYoXmoAbXXrsAoA XkqC0vc/xdeAYTGLNk3YJAwANSQEMwrLuEOgDVK83C3Mo5qsjSJfhchDyfVUSX4itCHi dkiSKEbdSdi7MR7tWexgiSUL4MRtBB3x0nbjWja7O7/vbzMquaaBc/hk/pmJXxrWBNDB wZXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=yuT8rGT0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id d12-20020a63d70c000000b0056336fb99aasi8486666pgg.850.2023.11.20.12.46.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 12:46:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=yuT8rGT0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (Postfix) with ESMTP id 8FB5A807C5D9; Mon, 20 Nov 2023 12:45:30 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230213AbjKTUpY (ORCPT + 99 others); Mon, 20 Nov 2023 15:45:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36124 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229476AbjKTUpW (ORCPT ); Mon, 20 Nov 2023 15:45:22 -0500 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 27204CD; Mon, 20 Nov 2023 12:45:19 -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=sIArtSu73qZ+pj+BkJUnVf1olPkA9bvYl7JJi8jdX28=; b=yuT8rGT0TTi4VPzDs6M2tW4+WD t30M18tp5flsnRnUYv0P085yVZDhzSKt6/kQdYDCH5cy2zQMSZ8DTp7v66dUeDdQVEETNn0QxSktR NxU60V3wCYit/jTCg0cdTlQVb8Fwyhu8m5Ecqct7NMmQ19I4zPSWZD1sZXTlmaP7DVEA=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1r5B8c-000gjh-WD; Mon, 20 Nov 2023 21:44:59 +0100 Date: Mon, 20 Nov 2023 21:44:58 +0100 From: Andrew Lunn To: Christian Marangi Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Andy Gross , Bjorn Andersson , Konrad Dybcio , Heiner Kallweit , Russell King , Florian Fainelli , Broadcom internal kernel review list , Daniel Golle , Qingfang Deng , SkyLake Huang , Matthias Brugger , AngeloGioacchino Del Regno , David Epping , Vladimir Oltean , "Russell King (Oracle)" , Harini Katakam , Simon Horman , Robert Marko , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: Re: [net-next RFC PATCH 03/14] dt-bindings: net: document ethernet PHY package nodes Message-ID: References: <20231120135041.15259-1-ansuelsmth@gmail.com> <20231120135041.15259-4-ansuelsmth@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231120135041.15259-4-ansuelsmth@gmail.com> 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 lipwig.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 (lipwig.vger.email [0.0.0.0]); Mon, 20 Nov 2023 12:45:30 -0800 (PST) On Mon, Nov 20, 2023 at 02:50:30PM +0100, Christian Marangi wrote: > Document ethernet PHY package nodes used to describe PHY shipped in > bundle of 4-5 PHY. These particular PHY require specific PHY in the > package for global onfiguration of the PHY package. > > Example are PHY package that have some regs only in one PHY of the > package and will affect every other PHY in the package, for example > related to PHY interface mode calibration or global PHY mode selection. I think you are being overly narrow here. The 'global' registers could be spread over multiple addresses. Particularly for a C22 PHY. I suppose they could even be in a N+1 address space, where there is no PHY at all. Where the global registers are is specific to a PHY package vendor/model. The PHY driver should know this. All the PHY driver needs to know is some sort of base offset. PHY0 in this package is using address X. It can then use relative addressing from this base to access the global registers for this package. > It's also possible to specify the property phy-mode to specify that the > PHY package sets a global PHY interface mode and every PHY of the > package requires to have the same PHY interface mode. I don't think it is what simple. See the QCA8084 for example. 3 of the 4 PHYs must use QXGMII. The fourth PHY can also use QXGMII but it can be multiplexed to a different PMA and use 1000BaseX, SGMII or 2500BaseX. I do think we need somewhere to put package properties. But i don't think phy-mode is such a property. At the moment, i don't have a good example of a package property. > +examples: > + - | > + ethernet { > + #address-cells = <1>; > + #size-cells = <0>; > + > + ethernet-phy-package { > + compatible = "ethernet-phy-package"; > + #address-cells = <1>; > + #size-cells = <0>; You have the PHYs within the Ethernet node. This is allowed by DT, for historic reasons. However, i don't remember the last time a patch was submitted that actually used this method. Now a days, PHYs are on an MDIO bus, and they are children of that bus in the DT representation. However you represent the package needs to work with MDIO busses. Andrew --- pw-bot: cr