From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Wei Fang <wei.fang@nxp.com>
Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, robh@kernel.org, krzk+dt@kernel.org,
conor+dt@kernel.org, andrew@lunn.ch, f.fainelli@gmail.com,
hkallweit1@gmail.com, andrei.botila@oss.nxp.com,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
netdev@vger.kernel.org, imx@lists.linux.dev
Subject: Re: [PATCH v2 net-next 2/2] net: phy: c45-tja11xx: add support for outputing RMII reference clock
Date: Tue, 8 Oct 2024 09:31:13 +0100 [thread overview]
Message-ID: <ZwTt0R_n40ohJqH1@shell.armlinux.org.uk> (raw)
In-Reply-To: <20241008070708.1985805-3-wei.fang@nxp.com>
On Tue, Oct 08, 2024 at 03:07:08PM +0800, Wei Fang wrote:
> @@ -1561,8 +1565,13 @@ static int nxp_c45_set_phy_mode(struct phy_device *phydev)
> phydev_err(phydev, "rmii mode not supported\n");
> return -EINVAL;
> }
> - phy_write_mmd(phydev, MDIO_MMD_VEND1, VEND1_MII_BASIC_CONFIG,
> - MII_BASIC_CONFIG_RMII);
> +
> + if (priv->flags & TJA11XX_REVERSE_MODE)
> + phy_write_mmd(phydev, MDIO_MMD_VEND1, VEND1_MII_BASIC_CONFIG,
> + MII_BASIC_CONFIG_RMII | MII_BASIC_CONFIG_REV);
> + else
> + phy_write_mmd(phydev, MDIO_MMD_VEND1, VEND1_MII_BASIC_CONFIG,
> + MII_BASIC_CONFIG_RMII);
Netdev has an 80 column limit, and this needs commenting because we have
PHY_INTERFACE_MODE_REVRMII which could be confused with this (although
I haven't checked.)
u16 basic_config;
...
basic_config = MII_BASIC_CONFIG_RMII;
/* This is not PHY_INTERFACE_MODE_REVRMII */
if (priv->flags & TJA11XX_REVERSE_MODE)
basic_config |= MII_BASIC_CONFIG_REV;
phy_write_mmd(phydev, MDIO_MMD_VEND1, VEND1_MII_BASIC_CONFIG,
basic_config);
is much nicer to read.
Thanks.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
next prev parent reply other threads:[~2024-10-08 8:31 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-08 7:07 [PATCH v2 net-next 0/2] make PHY output RMII reference clock Wei Fang
2024-10-08 7:07 ` [PATCH v2 net-next 1/2] dt-bindings: net: tja11xx: add "nxp,rmii-refclk-out" property Wei Fang
2024-10-09 15:12 ` Rob Herring
2024-10-10 2:17 ` Wei Fang
2024-10-08 7:07 ` [PATCH v2 net-next 2/2] net: phy: c45-tja11xx: add support for outputing RMII reference clock Wei Fang
2024-10-08 8:31 ` Russell King (Oracle) [this message]
2024-10-08 9:43 ` Wei Fang
2024-10-09 11:57 ` Simon Horman
2024-10-09 12:45 ` Wei Fang
2024-10-08 7:25 ` [PATCH v2 net-next 0/2] make PHY output " Wei Fang
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=ZwTt0R_n40ohJqH1@shell.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=andrei.botila@oss.nxp.com \
--cc=andrew@lunn.ch \
--cc=conor+dt@kernel.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=hkallweit1@gmail.com \
--cc=imx@lists.linux.dev \
--cc=krzk+dt@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=robh@kernel.org \
--cc=wei.fang@nxp.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.