From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="uGtbsMYs" Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BD5E91990; Fri, 24 Nov 2023 15:26:12 -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=ZEmM+x5c4j9E2iYripoWJxHgYv7R98NUEa31meAyb3E=; b=uGtbsMYszf8pdWOAfR2MhpRlqV 24g92f2VFULf7WTq8BWo5l/3XruHQvZr13mP5OFmGelaM3YxeSSS2yBBygiKA74EJKa+qbEbmA040 u+t3KbeEDYIYMnJpUxJM0BZ6o/TFnIExVIRCdKpQOVZq3vDeASDU6zGVIgO/6OMynBis=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1r6fYP-0018wU-SA; Sat, 25 Nov 2023 00:25:45 +0100 Date: Sat, 25 Nov 2023 00:25:45 +0100 From: Andrew Lunn To: Conor Dooley Cc: Javier Carrasco , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Heiko Stuebner , David Wu , Alexandre Torgue , Jose Abreu , Maxime Coquelin , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com Subject: Re: [PATCH RFC WIP 1/2] dt-bindings: net: rockchip-dwmac: add rockchip,phy-wol property Message-ID: <42c5c174-e7f2-4323-8db0-0db1ede39ec5@lunn.ch> References: <20231123-dwmac-rk_phy_wol-v1-0-bf4e718081b9@wolfvision.net> <20231123-dwmac-rk_phy_wol-v1-1-bf4e718081b9@wolfvision.net> <20231123-operable-frustrate-6c71ab0dafbf@spud> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231123-operable-frustrate-6c71ab0dafbf@spud> On Thu, Nov 23, 2023 at 05:20:48PM +0000, Conor Dooley wrote: > On Thu, Nov 23, 2023 at 01:14:13PM +0100, Javier Carrasco wrote: > > This property defines if PHY WOL is preferred. If it is not defined, MAC > > WOL will be preferred instead. > > > > Signed-off-by: Javier Carrasco > > --- > > Documentation/devicetree/bindings/net/rockchip-dwmac.yaml | 6 ++++++ > > 1 file changed, 6 insertions(+) > > > > diff --git a/Documentation/devicetree/bindings/net/rockchip-dwmac.yaml b/Documentation/devicetree/bindings/net/rockchip-dwmac.yaml > > index 70bbc4220e2a..fc4b02a5a375 100644 > > --- a/Documentation/devicetree/bindings/net/rockchip-dwmac.yaml > > +++ b/Documentation/devicetree/bindings/net/rockchip-dwmac.yaml > > @@ -91,6 +91,12 @@ properties: > > The phandle of the syscon node for the peripheral general register file. > > $ref: /schemas/types.yaml#/definitions/phandle > > > > + rockchip,phy-wol: > > + type: boolean > > + description: > > + If present, indicates that PHY WOL is preferred. MAC WOL is preferred > > + otherwise. > > Although I suspect this isn't, it sounds like software policy. What > attribute of the hardware determines which is preferred? I tend to agree, its a software policy. Doing WoL in the PHY should be the preferred solution, because it allows the MAC to be powered off, saving more power. If the PHY does not implement it, then the MAC should be used. It should be possible for the MAC driver to pass the WoL settings to the PHY, and if it returns EOPNOTSUPP, or maybe EINVAL, implement the WoL in the MAC. This might be a behaviour change, depending on the MAC driver. So i could imaging a less risk tolerant developers wanting a knob to enable this. However, if done correctly, using the PHY instead of the MAC should not be visible from the users perspective. Andrew