Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp359591rdb; Tue, 5 Dec 2023 07:24:54 -0800 (PST) X-Google-Smtp-Source: AGHT+IG2Uy7ACWz0Gy/Db3Z4tw68s/9+0pnQUTQA7AGbtzUq0Sx1Ldjpv5d/By52xgqflKs+HkYd X-Received: by 2002:a17:902:e887:b0:1d0:b095:9ad5 with SMTP id w7-20020a170902e88700b001d0b0959ad5mr2795915plg.99.1701789894297; Tue, 05 Dec 2023 07:24:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701789894; cv=none; d=google.com; s=arc-20160816; b=h5BYsFsBjFtyPxTh3TtC4SW9VeB36e3fYVk/e1RyZDrUK1cGhu+PsbEElLqs96XNtA yOCsMYA/YATGfuTbdZvU/KM1qbNLm/7iyPk/Br4BeX72xdgew8+CaqjZ0hvz/pOGfSqd iXaI4lEtDOVDZzqZSpPaMpMlNyzKTXzz980smfV8SjRqg4W+I7633ccJM6o0fVWPmKtT LcQwOInIwgq4wAK7kPGTFRGEoM4cJX4QZDz+l5NJ0TcuMD62nkdVhWemj+9zbq8ceUZG wvCc6mEPIYkftxlNybIxPB18B58JHOzQz4QZCLP7CbbtDaNPCfDGr/JXjiuCXcoufotZ qGbA== 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=PZz8shHVcIyOxi2PRKLTE3318p5hkyrxQLzPCBqR+zE=; fh=F5WKF7NVGkEOG8RmpBE00yShwd1pdhUvNglO0nTYjto=; b=CVP3Aa77pg2mZlC8u7IPMfcqryhn5Doh1OR3CJoDes/pG3TH5HOuC5YPqKw16Vr8L8 japecHFRXi98TkuaOZ5m0Gs7FbRrZV0YanZ2E6ytCWqJYZaYr7+avNVj6DvVrsBJk6JM 1v5Ue3ve97j321nAyjfeL/Uq0YZSVbWAcp3D3eXvFXTWI0RXVkxcNBy3BEp174LfLAVl a/FsEF47N93y6Z5p1vMLCjPhiqhxJbScszVM9xxWTaTs/LsOhmQkAPhagO6UB75W/5XR sN+BGzUn5miRVpOgKuoCmAvD8fkhvIxpPNgRCmV5pHejAr1LoVSiT7b7utcksQt7xo6p yo9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=bjOuP3IU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 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 pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id l3-20020a170902f68300b001cfad02b963si1007444plg.167.2023.12.05.07.24.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Dec 2023 07:24:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=bjOuP3IU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 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 pete.vger.email (Postfix) with ESMTP id E56CA802388C; Tue, 5 Dec 2023 07:24:45 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1442420AbjLEPY3 (ORCPT + 99 others); Tue, 5 Dec 2023 10:24:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50054 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346213AbjLEPYR (ORCPT ); Tue, 5 Dec 2023 10:24:17 -0500 Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::222]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3C8E21BC6; Tue, 5 Dec 2023 07:23:25 -0800 (PST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 7F1814001A; Tue, 5 Dec 2023 15:23:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1701789803; 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=PZz8shHVcIyOxi2PRKLTE3318p5hkyrxQLzPCBqR+zE=; b=bjOuP3IU/Ejwm3v4qJ9i5J0M7w0ZQgFjidCe8Djk54T0y2gsy2uIKUbAd997ZNr3v0ybdy 77F7MVgRAN1v/YyU775xrE5BULyhsU5/WrKccjNoCZyX3QxKqUZ22dm/JOMT60gVU3u7El 7bBgpqaZvj/sWEQq0jCQX7Ays6X1xi75WcALLjorzU1UycPsGavnbERVVHX+ZceuioD2mi 1nyPBnur0fzE4Ost24Z6/jBIc9sQLo68z/yppbq43yK5KZWI5ksmg20/4r9z5qfZ6ueigl BD8Kb6egbZhS5OwWS+kTG0EuVcg2tOUTvtOxAk8s5UUmPi+dRIZn2MdR6vtf1w== Date: Tue, 5 Dec 2023 16:23:21 +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: <20231205162321.4bd165eb@kmaincent-XPS-13-7390> In-Reply-To: <20231205142147.GL981228@pengutronix.de> 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> 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 pete.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 (pete.vger.email [0.0.0.0]); Tue, 05 Dec 2023 07:24:46 -0800 (PST) On Tue, 5 Dec 2023 15:21:47 +0100 Oleksij Rempel wrote: > On Tue, Dec 05, 2023 at 02:31:23PM +0100, K=C3=B6ry Maincent wrote: > > 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 this > > 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. Just to be clear, are you saying we should use the regulator framework or i= s it simply a way of speaking as it behaves like regulator? > > Finally, the devicetree would not know the matrix between logical port = 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. It could be known in the of_pse_control_get() function if there is two phan= dles in the "pses" parameter. Then we add a new enum c33_pse_mode member in the pse_control struct to store the mode. PoE2 and PoE4 is not a parameter of the logical port, it depends of the num= ber of PSE ports wired to an 8P8C connector.=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 configu= red to one physical port. Two physical ports (which mean two logical ports) can still be used to have PoE4 mode. For PoE4, in the pd692x0 driver we use one logical port (one pse_control->i= d) configured to two physical ports but in the tps23881 we will need two logic= al ports (two pse_control->id). So with the tps23881 driver we will need two phandle in the "pses" paramete= r to have PoE4, that's why my proposition seems relevant. The same goes with your pse-regulator driver, you can't do PoE4 if two regulators is needed for each two pairs group. Regards, --=20 K=C3=B6ry Maincent, Bootlin Embedded Linux and kernel engineering https://bootlin.com