From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1B5697E for ; Mon, 9 May 2022 13:26:53 +0000 (UTC) Received: by mail-wm1-f52.google.com with SMTP id 129so8381126wmz.0 for ; Mon, 09 May 2022 06:26:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=dmJRRWnhcLRlkBeCf6ELmWo3mitMr5vF1s1MIEAWhkY=; b=FBEP0LRmMpH17N7Hbm10/SPehn12jstyd+SVGPW/nQaH/kNcc0UgxF/UxMSJSwNFKd 0h8QK8B6X30Boig/cF/YFEX+fhrdVkzBqiHdg/puhONGuRYJmMCy5gKj9w2B4xs8+MdB +XHQRt0GSX29olfSiXYZ2ZfP3S6Nv053NPMiAggKDE4ZhLVhL0K89uBrXAG0u/mDaiNx xlrb0M47Nn5sSClSGIv6+VUuqKrNrfJq6OxmdbgRm30gDA/khTLNdTWJ7MNCL7jx3jNL nWuroYJZ1S4p4kdCT6n8CuKJGH7yLZly1nGI6AFJZTpS6mHnNCD9EpbxTMxbo5xOsQQl 2O6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=dmJRRWnhcLRlkBeCf6ELmWo3mitMr5vF1s1MIEAWhkY=; b=iYlMGjOar9lArIHeQzCTrAos3bLLIdqhDtMwyyrNS7/PoRumaqUk54pvw50NA8xahn J6+iQt9ByCL8IVgdSDRy7bmGrnAOQH14EB7+CHebtA33RmsUnQgCNdK57q0bMb3MnroR E4kZeesHA4aO1b5PmDGRFXtnNb7JIVT0POsfV5P7hSlofU/vUkz9o6GwNszSsZnjnmZI sRJFJKiCFoqpiI9PV6JtfP3BuNal0gtfh5A9g2DJj3ZNlNobCF5SemDhcyNIua9w/KNR /pCkoLu34uhcA38ZQUI9wEKU+JsZUD6yfFR/XFnzInheHq+bHXTSG7l5LEEeSnV28LTJ CeLQ== X-Gm-Message-State: AOAM533t/C52eKOcq90hLRegMbaEO+AMLc7LvM54VVeJRTPgHnhGUmSC VCzTKgejOI2rWZHIOqcVKP83UA== X-Google-Smtp-Source: ABdhPJxWE9LTJU3muMWgTGpDfT+XKa3yskyOpAPa0F0blBouUa/OJ2NmR4glOPu8x9cBP8Z/EgDiZQ== X-Received: by 2002:a1c:770b:0:b0:394:3fae:ab79 with SMTP id t11-20020a1c770b000000b003943faeab79mr15885832wmi.200.1652102811399; Mon, 09 May 2022 06:26:51 -0700 (PDT) Received: from Red ([2a01:cb1d:3d5:a100:264b:feff:fe03:2806]) by smtp.googlemail.com with ESMTPSA id n16-20020a05600c3b9000b00394699f803dsm13097894wms.46.2022.05.09.06.26.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 May 2022 06:26:50 -0700 (PDT) Date: Mon, 9 May 2022 15:26:47 +0200 From: LABBE Corentin To: Andrew Lunn Cc: alexandre.torgue@foss.st.com, broonie@kernel.org, calvin.johnson@oss.nxp.com, davem@davemloft.net, edumazet@google.com, hkallweit1@gmail.com, jernej.skrabec@gmail.com, joabreu@synopsys.com, krzysztof.kozlowski+dt@linaro.org, kuba@kernel.org, lgirdwood@gmail.com, linux@armlinux.org.uk, pabeni@redhat.com, peppe.cavallaro@st.com, robh+dt@kernel.org, samuel@sholland.org, wens@csie.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@lists.linux.dev Subject: Re: [PATCH 3/6] dt-bindings: net: Add documentation for phy-supply Message-ID: References: <20220509074857.195302-1-clabbe@baylibre.com> <20220509074857.195302-4-clabbe@baylibre.com> Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Le Mon, May 09, 2022 at 02:17:27PM +0200, Andrew Lunn a écrit : > On Mon, May 09, 2022 at 07:48:54AM +0000, Corentin Labbe wrote: > > Add entries for the 2 new phy-supply and phy-io-supply. > > > > Signed-off-by: Corentin Labbe > > --- > > .../devicetree/bindings/net/ethernet-phy.yaml | 10 ++++++++++ > > 1 file changed, 10 insertions(+) > > > > diff --git a/Documentation/devicetree/bindings/net/ethernet-phy.yaml b/Documentation/devicetree/bindings/net/ethernet-phy.yaml > > index ed1415a4381f..2a6b45ddf010 100644 > > --- a/Documentation/devicetree/bindings/net/ethernet-phy.yaml > > +++ b/Documentation/devicetree/bindings/net/ethernet-phy.yaml > > @@ -153,6 +153,16 @@ properties: > > used. The absence of this property indicates the muxers > > should be configured so that the external PHY is used. > > > > + phy-supply: > > + description: > > + Phandle to a regulator that provides power to the PHY. This > > + regulator will be managed during the PHY power on/off sequence. > > + > > + phy-io-supply: > > + description: > > + Phandle to a regulator that provides power to the PHY. This > > + regulator will be managed during the PHY power on/off sequence. > > If you need two differently named regulators, you need to make it clear > how they differ. My _guess_ would be, you only need the io variant in > order to talk to the PHY registers. However, to talk to a link > partner, you need the other one enabled as well. Which means handling > that regulator probably should be in the PHY driver, so it is enabled > only when the interface is configured up. > If I enable only the IO one, stmmac fail to reset, so both are needed to be up. I tried also to keep the "phy" one handled by stmmac (by removing patch 2), this lead to the PHY to not be found by MDIO scan. Proably because stmmac enable the "phy" before the "phy-io". For the difference between the 2, according to my basic read (I am bad a it) of the shematic https://linux-sunxi.org/images/5/50/OrangePi_3_Schematics_v1.5.pdf phy-io(ephy-vdd25) seems to (at least) power MDIO bus. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 075BEC433F5 for ; Mon, 9 May 2022 13:28:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=M++KNaSOKXyeYj2Cs0G30oOu+e6YoJiGk1l4kulKspc=; b=i9oc1dD4lilmSw sX3z9DGARIB3UfcOz/pteO/ddRs6U+7D/5bu8t3teqm2FOmNQ2Y6a33u0qdY5hMQvde3u6JX6nsJA W47gnxMYAr0V9vll2RgBX74y9MPCavcsqE/pIbvkFd+IxlNVq8Cpff8Uv3yHUVJWp4DlvWjSy8thR rkKmz0WdZcgCwcf3pbOFq/vIjNLHpne921wMrse9SF/i8LHTyK0oknEVbFbgdlyu/P1xt9IDAsckA mKCf0U5pO/sPDG9rXHcPFdXPzZZp2brdcFeT/nX7g8taas9r2FUUbZhtqnWkbD8xfaTcziZiM9m4n ZZmhXw+De7f7FCA4AOBA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1no3Pf-00EYRc-BP; Mon, 09 May 2022 13:26:59 +0000 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1no3Pa-00EYQc-M6 for linux-arm-kernel@lists.infradead.org; Mon, 09 May 2022 13:26:57 +0000 Received: by mail-wm1-x32b.google.com with SMTP id m2-20020a1ca302000000b003943bc63f98so8269755wme.4 for ; Mon, 09 May 2022 06:26:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=dmJRRWnhcLRlkBeCf6ELmWo3mitMr5vF1s1MIEAWhkY=; b=FBEP0LRmMpH17N7Hbm10/SPehn12jstyd+SVGPW/nQaH/kNcc0UgxF/UxMSJSwNFKd 0h8QK8B6X30Boig/cF/YFEX+fhrdVkzBqiHdg/puhONGuRYJmMCy5gKj9w2B4xs8+MdB +XHQRt0GSX29olfSiXYZ2ZfP3S6Nv053NPMiAggKDE4ZhLVhL0K89uBrXAG0u/mDaiNx xlrb0M47Nn5sSClSGIv6+VUuqKrNrfJq6OxmdbgRm30gDA/khTLNdTWJ7MNCL7jx3jNL nWuroYJZ1S4p4kdCT6n8CuKJGH7yLZly1nGI6AFJZTpS6mHnNCD9EpbxTMxbo5xOsQQl 2O6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=dmJRRWnhcLRlkBeCf6ELmWo3mitMr5vF1s1MIEAWhkY=; b=ShxAO8GBq869K3blpkyqoaHMHdj6nxjZnVaG5yCeB+Z9CGrmCU2/McpFfX10PuieI/ REDkKhMM8zS8aEAhzP23I2FhG4J4TdYJVI5lPuIgaQ44gFWDwC77zYdeXbwesKcdU/GG ZxbWbOjg6eWKqjta1ENUvOBMC6krKIWgXLxN4KgnafucAQhHJg58MxKA9TWwLpB+Y6AZ nJXFADR9NO3SfNs8VhvwNB46V2/hfSJsXgtizss/wYX/lWVSzDWCPdOtz1Aq/tluN5TN mcJV375VprULAND/w69Ka4e+gdAxoffuJNm0aJ2jq2mGFnpHEQEas3LAbiBHmWEsCwAv 5ltQ== X-Gm-Message-State: AOAM533SCOtujMTVML4mDvuT2jJQhxggYCMWdi5X0FP5vR8998WDSbDx J4iuXlm+/GBJVgPfWDnifVH875g9k2utAA== X-Google-Smtp-Source: ABdhPJxWE9LTJU3muMWgTGpDfT+XKa3yskyOpAPa0F0blBouUa/OJ2NmR4glOPu8x9cBP8Z/EgDiZQ== X-Received: by 2002:a1c:770b:0:b0:394:3fae:ab79 with SMTP id t11-20020a1c770b000000b003943faeab79mr15885832wmi.200.1652102811399; Mon, 09 May 2022 06:26:51 -0700 (PDT) Received: from Red ([2a01:cb1d:3d5:a100:264b:feff:fe03:2806]) by smtp.googlemail.com with ESMTPSA id n16-20020a05600c3b9000b00394699f803dsm13097894wms.46.2022.05.09.06.26.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 May 2022 06:26:50 -0700 (PDT) Date: Mon, 9 May 2022 15:26:47 +0200 From: LABBE Corentin To: Andrew Lunn Cc: alexandre.torgue@foss.st.com, broonie@kernel.org, calvin.johnson@oss.nxp.com, davem@davemloft.net, edumazet@google.com, hkallweit1@gmail.com, jernej.skrabec@gmail.com, joabreu@synopsys.com, krzysztof.kozlowski+dt@linaro.org, kuba@kernel.org, lgirdwood@gmail.com, linux@armlinux.org.uk, pabeni@redhat.com, peppe.cavallaro@st.com, robh+dt@kernel.org, samuel@sholland.org, wens@csie.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@lists.linux.dev Subject: Re: [PATCH 3/6] dt-bindings: net: Add documentation for phy-supply Message-ID: References: <20220509074857.195302-1-clabbe@baylibre.com> <20220509074857.195302-4-clabbe@baylibre.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220509_062654_975163_03EFEBE9 X-CRM114-Status: GOOD ( 25.65 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Le Mon, May 09, 2022 at 02:17:27PM +0200, Andrew Lunn a =E9crit : > On Mon, May 09, 2022 at 07:48:54AM +0000, Corentin Labbe wrote: > > Add entries for the 2 new phy-supply and phy-io-supply. > > = > > Signed-off-by: Corentin Labbe > > --- > > .../devicetree/bindings/net/ethernet-phy.yaml | 10 ++++++++++ > > 1 file changed, 10 insertions(+) > > = > > diff --git a/Documentation/devicetree/bindings/net/ethernet-phy.yaml b/= Documentation/devicetree/bindings/net/ethernet-phy.yaml > > index ed1415a4381f..2a6b45ddf010 100644 > > --- a/Documentation/devicetree/bindings/net/ethernet-phy.yaml > > +++ b/Documentation/devicetree/bindings/net/ethernet-phy.yaml > > @@ -153,6 +153,16 @@ properties: > > used. The absence of this property indicates the muxers > > should be configured so that the external PHY is used. > > = > > + phy-supply: > > + description: > > + Phandle to a regulator that provides power to the PHY. This > > + regulator will be managed during the PHY power on/off sequence. > > + > > + phy-io-supply: > > + description: > > + Phandle to a regulator that provides power to the PHY. This > > + regulator will be managed during the PHY power on/off sequence. > = > If you need two differently named regulators, you need to make it clear > how they differ. My _guess_ would be, you only need the io variant in > order to talk to the PHY registers. However, to talk to a link > partner, you need the other one enabled as well. Which means handling > that regulator probably should be in the PHY driver, so it is enabled > only when the interface is configured up. > = If I enable only the IO one, stmmac fail to reset, so both are needed to be= up. I tried also to keep the "phy" one handled by stmmac (by removing patch 2),= this lead to the PHY to not be found by MDIO scan. Proably because stmmac enable the "phy" before the "phy-io". For the difference between the 2, according to my basic read (I am bad a it= ) of the shematic https://linux-sunxi.org/images/5/50/OrangePi_3_Schematics_v1.5.pdf phy-io(ephy-vdd25) seems to (at least) power MDIO bus. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel