From: Divya Koppera <divya.koppera@microchip.com>
To: <andrew@lunn.ch>, <arun.ramadoss@microchip.com>,
<UNGLinuxDriver@microchip.com>, <hkallweit1@gmail.com>,
<linux@armlinux.org.uk>, <davem@davemloft.net>,
<edumazet@google.com>, <kuba@kernel.org>, <pabeni@redhat.com>,
<netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<richardcochran@gmail.com>, <vadim.fedorenko@linux.dev>
Subject: [PATCH net-next v3 2/3] net: phy: microchip_t1: Enable pin out specific to lan887x phy for PEROUT signal
Date: Wed, 15 Jan 2025 14:36:33 +0530 [thread overview]
Message-ID: <20250115090634.12941-3-divya.koppera@microchip.com> (raw)
In-Reply-To: <20250115090634.12941-1-divya.koppera@microchip.com>
Adds support for enabling pin out that is required
to generate periodic output signal on lan887x phy.
Signed-off-by: Divya Koppera <divya.koppera@microchip.com>
---
v2 -> v3
- No changes
v1 -> v2
- Added support of periodic output only for the pinout that is specific
to PEROUT
---
drivers/net/phy/microchip_t1.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/drivers/net/phy/microchip_t1.c b/drivers/net/phy/microchip_t1.c
index 76e5b01832f3..62b36a318100 100644
--- a/drivers/net/phy/microchip_t1.c
+++ b/drivers/net/phy/microchip_t1.c
@@ -238,6 +238,9 @@
#define LAN887X_INT_MSK_LINK_UP_MSK BIT(1)
#define LAN887X_INT_MSK_LINK_DOWN_MSK BIT(0)
+#define LAN887X_MX_CHIP_TOP_REG_CONTROL1 0xF002
+#define LAN887X_MX_CHIP_TOP_REG_CONTROL1_EVT_EN BIT(8)
+
#define LAN887X_MX_CHIP_TOP_LINK_MSK (LAN887X_INT_MSK_LINK_UP_MSK |\
LAN887X_INT_MSK_LINK_DOWN_MSK)
@@ -1286,6 +1289,15 @@ static int lan887x_phy_init(struct phy_device *phydev)
if (IS_ERR(priv->clock))
return PTR_ERR(priv->clock);
+ /* Enable pin mux for EVT */
+ phy_modify_mmd(phydev, MDIO_MMD_VEND1,
+ LAN887X_MX_CHIP_TOP_REG_CONTROL1,
+ LAN887X_MX_CHIP_TOP_REG_CONTROL1_EVT_EN,
+ LAN887X_MX_CHIP_TOP_REG_CONTROL1_EVT_EN);
+
+ /* Initialize pin numbers specific to PEROUT */
+ priv->clock->event_pin = 3;
+
priv->init_done = true;
}
@@ -2154,7 +2166,7 @@ static struct phy_driver microchip_t1_phy_driver[] = {
module_phy_driver(microchip_t1_phy_driver);
-static const struct mdio_device_id __maybe_unused microchip_t1_tbl[] = {
+static struct mdio_device_id __maybe_unused microchip_t1_tbl[] = {
{ PHY_ID_MATCH_MODEL(PHY_ID_LAN87XX) },
{ PHY_ID_MATCH_MODEL(PHY_ID_LAN937X) },
{ PHY_ID_MATCH_MODEL(PHY_ID_LAN887X) },
--
2.17.1
next prev parent reply other threads:[~2025-01-15 9:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-15 9:06 [PATCH net-next v3 0/3] Add PEROUT library for RDS PTP supported phys Divya Koppera
2025-01-15 9:06 ` [PATCH net-next v3 1/3] net: phy: microchip_rds_ptp: Header file library changes for PEROUT Divya Koppera
2025-01-15 9:06 ` Divya Koppera [this message]
2025-01-15 9:06 ` [PATCH net-next v3 3/3] net: phy: microchip_rds_ptp : Add PEROUT feature library for RDS PTP supported Microchip phys Divya Koppera
2025-01-17 3:30 ` [PATCH net-next v3 0/3] Add PEROUT library for RDS PTP supported phys patchwork-bot+netdevbpf
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=20250115090634.12941-3-divya.koppera@microchip.com \
--to=divya.koppera@microchip.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=andrew@lunn.ch \
--cc=arun.ramadoss@microchip.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--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=richardcochran@gmail.com \
--cc=vadim.fedorenko@linux.dev \
/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