Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp2208135rdb; Fri, 8 Dec 2023 01:06:44 -0800 (PST) X-Google-Smtp-Source: AGHT+IGHqIk/Mjg3NOem8NA+CWQZdfNWusYjqFbFeomfthozHqu5sTLvpni5BAgZKbHJU98IKMrO X-Received: by 2002:a05:6a20:e48c:b0:190:2bfe:bb06 with SMTP id ni12-20020a056a20e48c00b001902bfebb06mr589591pzb.51.1702026404168; Fri, 08 Dec 2023 01:06:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702026404; cv=none; d=google.com; s=arc-20160816; b=zOfVRfkoxgNw5yIJYm5ZD0DI8C6wIRXuQEsa0Rrggfo1kvnpBF/PPGuUD3Q7efa16T Pc8S1dXndgQlv+zs1igy4WxqcgA7MmAL4Rau6xkHKLiW+FUy20EnV7PnkDYu1ZSHRNqe 8H/tJRhC82RQOyycRJrH+4yaKA2Cjbh3WWzAfPZgbjUoJ2dDzfWVNTF8ED/00hQTWNYX uAMNwBKmPZEf9S7+Uq/u9TCMvzPF8tJ4FItmajq+uFshBOx3QqMO9oFD5SDWB7BvXBfU Fgg9LIW4LbeLyB64vAzqD2N3taPWRkFID7zuJPJ6isVFLg4WWyqdAxliaZuoL3xDnH12 8DWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date:dkim-signature; bh=5roaO/aCwaahSO4dVcVLdUYTbvQ3YTQ8egLwSPxt4bM=; fh=F5WKF7NVGkEOG8RmpBE00yShwd1pdhUvNglO0nTYjto=; b=iXy6qs1HF17j1jSt/OusMQ4BUHrX0GAK3Rr/uIuUFuLzWqkTbtZBxRuFwvH0eGu6n7 FGO691kI0rG8U8HPoiNaTt1Z0fSz/kcb1bV4DwMm/5YvShI5JyaMuQXa38k56t267NMm HV+t1jjZvcSwp2AxmkThG1vS/fNOvTwwnpX9anhN/pAT3z7ulP+Z2ZOUQPjV4Fhb8GaV GdbIcdTcoAvJqTThj2Jp5XaTXbAp7HItC+4Uu0/6rdECNDFW/GT8qXON+pOlLNcPSPyG 3kgu5V/1a5+BhsxHXffk0337KcRZ+twm7z3iGDk/m3H/KXm7YbTxvFnnUvrpNDgO3JGD 2AbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b="N/IR1J3Y"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id f15-20020a65628f000000b005b9519d9e3esi1211209pgv.242.2023.12.08.01.06.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Dec 2023 01:06:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b="N/IR1J3Y"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 09CA18080EE7; Fri, 8 Dec 2023 01:06:41 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233312AbjLHJG1 (ORCPT + 99 others); Fri, 8 Dec 2023 04:06:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43044 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230390AbjLHJG0 (ORCPT ); Fri, 8 Dec 2023 04:06:26 -0500 Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [217.70.183.201]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4E9B110F9; Fri, 8 Dec 2023 01:06:31 -0800 (PST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 524531BF203; Fri, 8 Dec 2023 09:06:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1702026389; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5roaO/aCwaahSO4dVcVLdUYTbvQ3YTQ8egLwSPxt4bM=; b=N/IR1J3YGaG2B3y3zFV5bXYB/qJZnhP4RPeZyLOfqlRuwKanawRdBlJDF22sBUFThQchD7 /UVT6ICns1gH9xX1QMFXv8ZaH1zlfWauOJAfcVMP+VFSgBPrb/gxChfVoLoIrqYyHoud3G MygZEk60WMv22KgmDavkfpi6ipk7rOe41YYEHhM+TYwHJsj1pvctPODZfdoHvkefKZ/EF+ zYmnXIVNq0qPNA6KLk5sZt7MJHVsCJxr4Wzcc8xQ75qKRx/+rDQMzpQmX5H/ljfy9YbJ/B ArG/ZX6o3Qc17fygz5FLMqiHckunX4p+ZInvovVUq+szi/rumCkGPEXV54t8mw== Date: Fri, 8 Dec 2023 10:06:27 +0100 From: =?UTF-8?B?S8O2cnk=?= Maincent To: Oleksij Rempel Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Jonathan Corbet , Luis Chamberlain , Russ Weight , Greg Kroah-Hartman , "Rafael J. Wysocki" , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Thomas Petazzoni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, devicetree@vger.kernel.org, Dent Project , Liam Girdwood , Mark Brown Subject: Re: [PATCH net-next v2 7/8] dt-bindings: net: pse-pd: Add bindings for PD692x0 PSE controller Message-ID: <20231208100627.2a78e720@kmaincent-XPS-13-7390> In-Reply-To: <20231205162321.4bd165eb@kmaincent-XPS-13-7390> References: <20231201-feature_poe-v2-0-56d8cac607fa@bootlin.com> <20231201-feature_poe-v2-7-56d8cac607fa@bootlin.com> <20231204230845.GH981228@pengutronix.de> <20231205063606.GI981228@pengutronix.de> <20231205111501.43f80846@kmaincent-XPS-13-7390> <20231205143123.703589c8@kmaincent-XPS-13-7390> <20231205142147.GL981228@pengutronix.de> <20231205162321.4bd165eb@kmaincent-XPS-13-7390> Organization: bootlin X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-GND-Sasl: kory.maincent@bootlin.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 groat.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 (groat.vger.email [0.0.0.0]); Fri, 08 Dec 2023 01:06:41 -0800 (PST) On Tue, 5 Dec 2023 16:23:21 +0100 K=C3=B6ry Maincent wrote: > On Tue, 5 Dec 2023 15:21:47 +0100 > Oleksij Rempel wrote: >=20 > > On Tue, Dec 05, 2023 at 02:31:23PM +0100, K=C3=B6ry Maincent wrote: =20 > > > On Tue, 5 Dec 2023 11:15:01 +0100 > > > K=C3=B6ry Maincent wrote: > > > =20 > > > > On Tue, 5 Dec 2023 07:36:06 +0100 > > > > Oleksij Rempel wrote: =20 > > > =20 > > > > > I would expect a devicetree like this: > > > > >=20 > > > > > ethernet-pse@3c { > > > > > // controller compatible should be precise > > > > > compatible =3D "microchip,pd69210"; > > > > > reg =3D <0x3c>; > > > > > #pse-cells =3D <1>; > > > > > =20 > > > > > managers { > > > > > manager@0 { > > > > > // manager compatible should be included, since we are > > > > > // able to campare it with communication results > > > > > compatible =3D "microchip,pd69208t4" > > > > > // addressing corresponding to the chip select > > > > > addressing reg =3D <0>; > > > > >=20 > > > > > physical-ports { > > > > > phys0: port@0 { > > > > > // each of physical ports is actually a regulator > > > > > =20 > > >=20 > > > If this phys0 is a regulator, which device will be the consumer of th= is > > > regulator? log_port0 as the phys0 regulator consumer seems a bit odd!= =20 > >=20 > > Why? > > =20 > > > A 8P8C node should be the consumer. =20 > >=20 > > PHY is not actual consumer of this regulator. State of the Ethernet PHY > > is not related to the power supply. We should deliver power independent > > of network interface state. There is no other local consumer we can > > use in this case. =20 >=20 > Just to be clear, are you saying we should use the regulator framework or= is > it simply a way of speaking as it behaves like regulator? >=20 > > > Finally, the devicetree would not know the matrix between logical por= t and > > > physical port, this would be cleaner. > > >=20 > > > Did I miss something? =20 > >=20 > > In case different PSE suppliers are linked withing the PHY node, we > > loose most of information needed for PSE functionality. For example how > > we will know if our log_port supports PoE4 and PoE2 mode, or only PoE2. > > This information is vital for proper PSE configuration, this is why I > > suggested to have logica-ports subnodes. With the price of hawing huge > > DT on a switch with 48 ports. =20 >=20 > It could be known in the of_pse_control_get() function if there is two > phandles in the "pses" parameter. Then we add a new enum c33_pse_mode mem= ber > in the pse_control struct to store the mode. > PoE2 and PoE4 is not a parameter of the logical port, it depends of the n= umber > of PSE ports wired to an 8P8C connector.=20 >=20 > In fact I am also working on the tps23881 driver which aimed to be added = to > this series soon. In the tps23881 case the logical port can only be confi= gured > to one physical port. Two physical ports (which mean two logical ports) c= an > still be used to have PoE4 mode. > For PoE4, in the pd692x0 driver we use one logical port (one pse_control-= >id) > configured to two physical ports but in the tps23881 we will need two log= ical > ports (two pse_control->id). >=20 > So with the tps23881 driver we will need two phandle in the "pses" parame= ter > to have PoE4, that's why my proposition seems relevant. >=20 > The same goes with your pse-regulator driver, you can't do PoE4 if two > regulators is needed for each two pairs group. Oleksij, what your thought for the binding I have proposed in the thread. For the PoE4 we could add a "pses-poe4" bool property alongside the two pha= ndle in "pses" property. Here is the current binding proposition: ethernet-pse@3c { // controller compatible should be precise compatible =3D "microchip,pd69210"; reg =3D <0x3c>; #pse-cells =3D <1>; =20 managers { manager@0 { // manager compatible should be included, since we are // able to compare it with communication results compatible =3D "microchip,pd69208t4" // addressing corresponding to the chip select addressing reg =3D <0>; physical-ports { phys_port0: port@0 { // each of physical ports is actually a regulator reg =3D <0>; }; phy_port1: port@1 { reg =3D <1>; }; phy_port2: port@2 { reg =3D <2>; }; ... } manager@1 { ... }; }; }; .... ethernet-phy@1 { reg =3D <1>; pses-poe4; pses =3D <&phy_port0, &phy_port1>; }; ethernet-phy@2 { reg =3D <2>; pses =3D <&phy_port2>; } Regards, --=20 K=C3=B6ry Maincent, Bootlin Embedded Linux and kernel engineering https://bootlin.com