From: Conor Dooley <conor@kernel.org>
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, linux@armlinux.org.uk,
andrei.botila@oss.nxp.com, netdev@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 net-next 2/3] net: phy: tja11xx: replace "nxp,rmii-refclk-in" with "nxp,phy-output-refclk"
Date: Thu, 22 Aug 2024 09:47:01 +0100 [thread overview]
Message-ID: <20240822-headed-sworn-877211c3931f@spud> (raw)
In-Reply-To: <20240822013721.203161-3-wei.fang@nxp.com>
[-- Attachment #1: Type: text/plain, Size: 1978 bytes --]
On Thu, Aug 22, 2024 at 09:37:20AM +0800, Wei Fang wrote:
> As the new property "nxp,phy-output-refclk" is added to instead of
> the "nxp,rmii-refclk-in" property, so replace the "nxp,rmii-refclk-in"
> property used in the driver with the "nxp,reverse-mode" property and
> make slight modifications.
Can you explain what makes this backwards compatible please?
>
> Signed-off-by: Wei Fang <wei.fang@nxp.com>
> ---
> V2 changes:
> 1. Changed the property name.
> ---
> drivers/net/phy/nxp-tja11xx.c | 13 ++++++-------
> 1 file changed, 6 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/net/phy/nxp-tja11xx.c b/drivers/net/phy/nxp-tja11xx.c
> index 2c263ae44b4f..7aa0599c38c3 100644
> --- a/drivers/net/phy/nxp-tja11xx.c
> +++ b/drivers/net/phy/nxp-tja11xx.c
> @@ -78,8 +78,7 @@
> #define MII_COMMCFG 27
> #define MII_COMMCFG_AUTO_OP BIT(15)
>
> -/* Configure REF_CLK as input in RMII mode */
> -#define TJA110X_RMII_MODE_REFCLK_IN BIT(0)
> +#define TJA11XX_REVERSE_MODE BIT(0)
>
> struct tja11xx_priv {
> char *hwmon_name;
> @@ -274,10 +273,10 @@ static int tja11xx_get_interface_mode(struct phy_device *phydev)
> mii_mode = MII_CFG1_REVMII_MODE;
> break;
> case PHY_INTERFACE_MODE_RMII:
> - if (priv->flags & TJA110X_RMII_MODE_REFCLK_IN)
> - mii_mode = MII_CFG1_RMII_MODE_REFCLK_IN;
> - else
> + if (priv->flags & TJA11XX_REVERSE_MODE)
> mii_mode = MII_CFG1_RMII_MODE_REFCLK_OUT;
> + else
> + mii_mode = MII_CFG1_RMII_MODE_REFCLK_IN;
> break;
> default:
> return -EINVAL;
> @@ -517,8 +516,8 @@ static int tja11xx_parse_dt(struct phy_device *phydev)
> if (!IS_ENABLED(CONFIG_OF_MDIO))
> return 0;
>
> - if (of_property_read_bool(node, "nxp,rmii-refclk-in"))
> - priv->flags |= TJA110X_RMII_MODE_REFCLK_IN;
> + if (of_property_read_bool(node, "nxp,phy-output-refclk"))
> + priv->flags |= TJA11XX_REVERSE_MODE;
>
> return 0;
> }
> --
> 2.34.1
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2024-08-22 8:47 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-22 1:37 [PATCH v2 net-next 0/3] add "nxp,phy-output-refclk" to instead of "nxp,rmii-refclk-in" Wei Fang
2024-08-22 1:37 ` [PATCH v2 net-next 1/3] dt-bindings: net: tja11xx: use phy-output-refclk to instead of rmii-refclk-in Wei Fang
2024-08-22 1:37 ` [PATCH v2 net-next 2/3] net: phy: tja11xx: replace "nxp,rmii-refclk-in" with "nxp,phy-output-refclk" Wei Fang
2024-08-22 8:47 ` Conor Dooley [this message]
2024-08-22 9:37 ` Wei Fang
2024-08-22 16:14 ` Conor Dooley
2024-08-23 1:31 ` Wei Fang
2024-08-23 15:56 ` Conor Dooley
2024-08-22 1:37 ` [PATCH v2 net-next 3/3] net: phy: c45-tja11xx: add support for outputing RMII reference clock 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=20240822-headed-sworn-877211c3931f@spud \
--to=conor@kernel.org \
--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=krzk+dt@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox