Skip to content

Commit 8541fc1

Browse files
Divya-Kopperakuba-moo
authored andcommitted
net: phy: microchip_t1: Enable pin out specific to lan887x phy for PEROUT signal
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> Link: https://patch.msgid.link/20250115090634.12941-3-divya.koppera@microchip.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent bf356a6 commit 8541fc1

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

drivers/net/phy/microchip_t1.c

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,9 @@
238238
#define LAN887X_INT_MSK_LINK_UP_MSK BIT(1)
239239
#define LAN887X_INT_MSK_LINK_DOWN_MSK BIT(0)
240240

241+
#define LAN887X_MX_CHIP_TOP_REG_CONTROL1 0xF002
242+
#define LAN887X_MX_CHIP_TOP_REG_CONTROL1_EVT_EN BIT(8)
243+
241244
#define LAN887X_MX_CHIP_TOP_LINK_MSK (LAN887X_INT_MSK_LINK_UP_MSK |\
242245
LAN887X_INT_MSK_LINK_DOWN_MSK)
243246

@@ -1286,6 +1289,15 @@ static int lan887x_phy_init(struct phy_device *phydev)
12861289
if (IS_ERR(priv->clock))
12871290
return PTR_ERR(priv->clock);
12881291

1292+
/* Enable pin mux for EVT */
1293+
phy_modify_mmd(phydev, MDIO_MMD_VEND1,
1294+
LAN887X_MX_CHIP_TOP_REG_CONTROL1,
1295+
LAN887X_MX_CHIP_TOP_REG_CONTROL1_EVT_EN,
1296+
LAN887X_MX_CHIP_TOP_REG_CONTROL1_EVT_EN);
1297+
1298+
/* Initialize pin numbers specific to PEROUT */
1299+
priv->clock->event_pin = 3;
1300+
12891301
priv->init_done = true;
12901302
}
12911303

@@ -2154,7 +2166,7 @@ static struct phy_driver microchip_t1_phy_driver[] = {
21542166

21552167
module_phy_driver(microchip_t1_phy_driver);
21562168

2157-
static const struct mdio_device_id __maybe_unused microchip_t1_tbl[] = {
2169+
static struct mdio_device_id __maybe_unused microchip_t1_tbl[] = {
21582170
{ PHY_ID_MATCH_MODEL(PHY_ID_LAN87XX) },
21592171
{ PHY_ID_MATCH_MODEL(PHY_ID_LAN937X) },
21602172
{ PHY_ID_MATCH_MODEL(PHY_ID_LAN887X) },

0 commit comments

Comments
 (0)