Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp2782446lqz; Wed, 3 Apr 2024 08:28:18 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUJzONscSNTacB/yvomXuO6YIWKaraYHja4XOBS4oCz1R0u067xFm49O/zekJWfim+tcgyNdjq0BggaeGlQ9e9rdTn+Wuolh8DUKPfTnA== X-Google-Smtp-Source: AGHT+IFtGhPkp0+BM/LpmTTNPRYg2Yt0qrX44W6Y/Gjj818oQ24EGwKje2/boi0VHQOWs5NP9pQc X-Received: by 2002:ac2:5e62:0:b0:513:fad:3a79 with SMTP id a2-20020ac25e62000000b005130fad3a79mr10043261lfr.41.1712158098191; Wed, 03 Apr 2024 08:28:18 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712158098; cv=pass; d=google.com; s=arc-20160816; b=b6Qg7yKNHMQg61M5lSM4G2Gxw8srLMRIsBdWiBfNs4UrGUa2CWE3fkDVtoDTiprwbH n4mDhN6FzdevpJdTAGZDqMaLRH19IrbUJiB4K4wlHq6cCmxY7PhVY+itslr7Ql2nsHBl KxnRrFP6kpQVTBatqfZ/Xg0u/F8A/MRDh0pEwMdu4TBcVYaMy3vJCRRHpPaApppRUZZ6 Dp7YX5ImGN9oU+d6wJpppaq5Gc0SST9+LAxX0L7uvOU72C+l/ikKFYEFDcsxauzYDeaa gCA0CnVclMyXbfKKTIjJAzAEY7MIF4ZiisPlm3+dnvzFuReOT0s4PkODYr2JIW3NyM8H c0ow== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date; bh=gwAY7ExVMbYhCoqLtr9t5D2YTyqugvC++CyqmTK37RI=; fh=h4jQ+QY/N7+FdY+g7ApBlWJp3kmhz7yNMAWe4pkSFlc=; b=AWweEDSEsyn3Y53Fe5hm+A+ezale9J842M3W+fi6jkwjUJVfVS6Th6r/iEBn9CjOGp JSqLLzfoBYjISA8/aVjuuDBHxP+vVFRRt9KtkxnCQVdOyIfU+cjtLnh6iSGu+k5Obkrb tVtQTPbanIheXUUWt1E9SwV66317rhPhXH+CRiIKi+T1kXOXkSD52sq/uc6+gc64GLpf K9AHGrvZBCGpcR3qRsSLIdWayPfUoItxidkdBP43QP+gTNzG4NJgZhsdLHD6UnVwNzHK L07mzexruT7pzX0Heira4ymwlIRVcYgbbODdDXlntx2x2C40Nz9XYCwFBYiWIt7PW2XR Xk4g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=pengutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-130089-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-130089-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id i21-20020a1709063c5500b00a4e8e807b16si1613251ejg.63.2024.04.03.08.28.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Apr 2024 08:28:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-130089-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=pengutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-130089-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-130089-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id B6AA51F23BC8 for ; Wed, 3 Apr 2024 15:28:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 48A7514A0BF; Wed, 3 Apr 2024 15:28:09 +0000 (UTC) Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0A486148FE8 for ; Wed, 3 Apr 2024 15:28:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712158088; cv=none; b=RzQld4vmF0pqtRcXZFUTIgzpmUVr8ntYWv2cNYEoz/eF8rzZVYFmGHb8uhaWMc0Rau96o1ujg1sdFtpB1eDKdmsQyyB7qPC4afyEVK8zNqCCynF8NqAhXz68De7bG4R6RzKyJbSQSgY9XLOZvfVLK+xF87+Wwroas1/xTo0RqwA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712158088; c=relaxed/simple; bh=GmbD26WMynLhI5PkWa2+VgAcWtdokHdMIyR0DsUfccc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=FRthQAqt7FgPdD6nxdRINlnjd4MH41kh1/nWFNkOQne3dLOYtEJj80Lk9UD9iF3HEd3tjHu51c6SyPyvUdUk6ZutdUJFPeoFHXVS6CbxqbUbjwZ6amtPimORdZjWAWbQGufmw2qc2xzsquPGjgigEKoTzkiOll7xCM2+h2PysLk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rs2WX-0006iQ-Tz; Wed, 03 Apr 2024 17:27:37 +0200 Received: from [2a0a:edc0:2:b01:1d::c5] (helo=pty.whiteo.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rs2WV-00ACng-OF; Wed, 03 Apr 2024 17:27:35 +0200 Received: from ore by pty.whiteo.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1rs2WV-00CU00-22; Wed, 03 Apr 2024 17:27:35 +0200 Date: Wed, 3 Apr 2024 17:27:35 +0200 From: Oleksij Rempel To: Rob Herring Cc: Kory Maincent , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Jonathan Corbet , Luis Chamberlain , Russ Weight , Greg Kroah-Hartman , "Rafael J. Wysocki" , Krzysztof Kozlowski , Conor Dooley , Mark Brown , Frank Rowand , Andrew Lunn , Heiner Kallweit , Russell King , Thomas Petazzoni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, devicetree@vger.kernel.org, Dent Project Subject: Re: [PATCH net-next v6 11/17] dt-bindings: net: pse-pd: Add another way of describing several PSE PIs Message-ID: References: <20240326-feature_poe-v6-0-c1011b6ea1cb@bootlin.com> <20240326-feature_poe-v6-11-c1011b6ea1cb@bootlin.com> <20240402132637.GA3744978-robh@kernel.org> <20240403144448.GB3508225-robh@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20240403144448.GB3508225-robh@kernel.org> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-Accept-Language: de,en X-Accept-Content-Type: text/plain X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ore@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org On Wed, Apr 03, 2024 at 09:44:48AM -0500, Rob Herring wrote: > On Tue, Apr 02, 2024 at 05:47:58PM +0200, Oleksij Rempel wrote: > > On Tue, Apr 02, 2024 at 08:26:37AM -0500, Rob Herring wrote: > > > > + pairsets: > > > > + $ref: /schemas/types.yaml#/definitions/phandle-array > > > > + description: > > > > + List of phandles, each pointing to the power supply for the > > > > + corresponding pairset named in 'pairset-names'. This property > > > > + aligns with IEEE 802.3-2022, Section 33.2.3 and 145.2.4. > > > > + PSE Pinout Alternatives (as per IEEE 802.3-2022 Table 145\u20133) > > > > + |-----------|---------------|---------------|---------------|---------------| > > > > + | Conductor | Alternative A | Alternative A | Alternative B | Alternative B | > > > > + | | (MDI-X) | (MDI) | (X) | (S) | > > > > + |-----------|---------------|---------------|---------------|---------------| > > > > + | 1 | Negative VPSE | Positive VPSE | \u2014 | \u2014 | > > > > + | 2 | Negative VPSE | Positive VPSE | \u2014 | \u2014 | > > > > + | 3 | Positive VPSE | Negative VPSE | \u2014 | \u2014 | > > > > + | 4 | \u2014 | \u2014 | Negative VPSE | Positive VPSE | > > > > + | 5 | \u2014 | \u2014 | Negative VPSE | Positive VPSE | > > > > + | 6 | Positive VPSE | Negative VPSE | \u2014 | \u2014 | > > > > + | 7 | \u2014 | \u2014 | Positive VPSE | Negative VPSE | > > > > + | 8 | \u2014 | \u2014 | Positive VPSE | Negative VPSE | > > > > + minItems: 1 > > > > + maxItems: 2 > > > > > > "pairsets" does not follow the normal design pattern of foos, foo-names, > > > and #foo-cells. You could add #foo-cells I suppose, but what would cells > > > convey? I don't think it's a good fit for what you need. > > > > > > The other oddity is the number of entries and the names are fixed. That > > > is usually defined per consumer. > > > > > > As each entry is just a power rail, why can't the regulator binding be > > > used here? > > > > I'm not against describing it consequent with regulator till the wire > > end, but right now I have no idea how it should be described by using > > regulator bindings. There are maximum 2 rails going in to PSE PI on one > > side and 4 rails with at least 5 combinations supported by standard on > > other side. Instead of inventing anything new, I suggested to describe > > supported output combinations by using IEEE 802.3 standard. > > There's 4 combinations above, what's the 5th combination? SPE? The 5th combination is PoE4 where two rails are supplying power at same time. First 4 variants for PoE: one or two positive rails are attached (but only one is used at same time) to pairs 1-2 or 3-4, or 5-6, or 7-8. Or support all of combinations if some advanced PSE PI is present. PSE PI is kind of MUX for regulators. One more variant in case of PoE4: two positive rail are attached at same time, one to 1-2, second to 5-6. May be one more variant with opposite polarity, this will be the 6th combination. > Seems to me you just describe the 2 rails going to the connector and > then describe all the variations the connector supports. The PSE > (h/w) has little to do with which variations are supported, right? No. In case of mutli-channel PSE, it needs to know if channels are attached to one port or to different ports. PSE is not only responsible to enable the power, it runs classification of devices attached to the port, so it will decide, which rail should be enabled. > For example, MDI-X vs. MDI support is determined by the PHY, right? Yes and No. Until PSE do not start supplying power, PHY will not be able to start communication with the remote PHY, so it will not be able to detect MDI/X configuration. Polarity configuration is important for user space or user to get information about supported pin configuration and if possible, change the configuration. > Or it has to be supported by both the PHY and PSE? In most cases PSE and PHY work independently from each other, they just share same port. Potential exception are: - in case data line should not be shared with power lines, we need to know what pins are used for power, this information would help to provide PHY configuration. - in case PHY autoneg signals disturb PoE classification, we need to coordinate PHY and PSE states. Regards, Oleksij -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |