Re: [PATCH net-next] net: phy: micrel: Add support for lan9645x internal phy

From
Andrew Lunn <andrew@lunn.ch>
Date
2026-01-23 16:11:47
Also in
lkml
Reply to
Jens Emil Schulz Østergaard, 2026-01-23
quoted hunk ↗ jump to hunk
+static int lan9645x_config_intr(struct phy_device *phydev)
+{
+	int err;
+
+	/* enable / disable interrupts */
+	if (phydev->interrupts == PHY_INTERRUPT_ENABLED) {
+		/* This is an internal PHY of lan9645x and is not possible to
+		 * change the polarity of irq sources in the OIC (CPU_INTR)
+		 * found in lan9645x. Therefore change the polarity of the
+		 * interrupt in the PHY from being active low instead of active
+		 * high.
+		 */
+		phy_write(phydev, LAN8804_CONTROL,
+			  LAN8804_CONTROL_INTR_POLARITY);
+
+		/* By default interrupt buffer is open-drain in which case the
+		 * interrupt can be active only low. Therefore change the
+		 * interrupt buffer to be push-pull to be able to change
+		 * interrupt polarity.
+		 */
It is not stated here, but i assume that there are multiple of these
PHYs in the switch, and each PHY has its own independent connection to
the parent interrupt controller? There is no interrupt sharing going
on, which is common with discreet PHYs.

	Andrew
Thread (7 messages) 7 messages, 4 authors, last reply 2026-01-27
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help