netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Ong Boon Leong <boon.leong.ong@intel.com>
Cc: Alexandre Torgue <alexandre.torgue@foss.st.com>,
	Jose Abreu <Jose.Abreu@synopsys.com>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	Russell King <linux@armlinux.org.uk>,
	Paolo Abeni <pabeni@redhat.com>,
	"David S . Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>,
	Vladimir Oltean <olteanv@gmail.com>,
	Vivien Didelot <vivien.didelot@gmail.com>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	Giuseppe Cavallaro <peppe.cavallaro@st.com>,
	netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	Emilio Riva <emilio.riva@ericsson.com>
Subject: Re: [PATCH net-next v4 4/5] stmmac: intel: add phy-mode and fixed-link ACPI _DSD setting support
Date: Tue, 14 Jun 2022 20:57:53 +0200	[thread overview]
Message-ID: <YqjaMbUERWuBL9FJ@lunn.ch> (raw)
In-Reply-To: <20220614030030.1249850-5-boon.leong.ong@intel.com>

> +	/* For fixed-link setup, we allow phy-mode setting */
> +	fwnode = dev_fwnode(&pdev->dev);
> +	if (fwnode) {
> +		const char *phy_mode;
> +
> +		if (!fwnode_property_read_string(fwnode, "phy-mode",
> +						 &phy_mode)) {
> +			if (!strcmp(phy_mode, "sgmii"))
> +				plat->phy_interface = PHY_INTERFACE_MODE_SGMII;
> +			if (!strcmp(phy_mode, "1000base-x"))
> +				plat->phy_interface = PHY_INTERFACE_MODE_1000BASEX;
> +		}

fwnode_get_phy_mode() and then validate the value afterwards.

      Andrew

  reply	other threads:[~2022-06-14 19:01 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-14  3:00 [PATCH net-next v4 0/5] pcs-xpcs, stmmac: add 1000BASE-X AN for network switch Ong Boon Leong
2022-06-14  3:00 ` [PATCH net-next v4 1/5] net: make xpcs_do_config to accept advertising for pcs-xpcs and sja1105 Ong Boon Leong
2022-06-14  3:00 ` [PATCH net-next v4 2/5] stmmac: intel: prepare to support 1000BASE-X phy interface setting Ong Boon Leong
2022-06-14  3:00 ` [PATCH net-next v4 3/5] net: pcs: xpcs: add CL37 1000BASE-X AN support Ong Boon Leong
2022-06-14  8:47   ` Russell King (Oracle)
2022-06-15  1:06     ` Ong, Boon Leong
2022-06-14  3:00 ` [PATCH net-next v4 4/5] stmmac: intel: add phy-mode and fixed-link ACPI _DSD setting support Ong Boon Leong
2022-06-14 18:57   ` Andrew Lunn [this message]
2022-06-14  3:00 ` [PATCH net-next v4 5/5] net: stmmac: make mdio register skips PHY scanning for fixed-link Ong Boon Leong
2022-06-14  6:55   ` Ong, Boon Leong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YqjaMbUERWuBL9FJ@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=Jose.Abreu@synopsys.com \
    --cc=alexandre.torgue@foss.st.com \
    --cc=boon.leong.ong@intel.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=emilio.riva@ericsson.com \
    --cc=f.fainelli@gmail.com \
    --cc=hkallweit1@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=linux@armlinux.org.uk \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=pabeni@redhat.com \
    --cc=peppe.cavallaro@st.com \
    --cc=vivien.didelot@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).