Skip to content

Enable interrupts on CM5 ethernet phy (again)#6963

Merged
pelwell merged 4 commits intoraspberrypi:rpi-6.12.yfrom
nbuchwitz:devel/fix-phy
Sep 5, 2025
Merged

Enable interrupts on CM5 ethernet phy (again)#6963
pelwell merged 4 commits intoraspberrypi:rpi-6.12.yfrom
nbuchwitz:devel/fix-phy

Conversation

@nbuchwitz
Copy link
Copy Markdown
Contributor

@nbuchwitz nbuchwitz commented Jul 18, 2025

Second attempt to enable interrupts on CM5's ethernet phy (see #6953). Took me some time, but I think I finally sorted it out:

  • Interrupt seems to be attached to LED4/INT_N, but was previously overridden by the led shadow patch (magically worked on my machine as I had a led_modes config which had link status on LED4 ...)
  • Interrupts were disable in ECR, but never re-enabled
  • Active low GPIO is missing a pull up, so just use the bias pull up in rp1

Happy for feedback and also some tests, so we won't missing anything out.

@nbuchwitz
Copy link
Copy Markdown
Contributor Author

Tested on cm5io (booted with cable attached, unplug, re-plug cable):

pi@rpicm5:~ $ grep ethernet /proc/interrupts
168:          2          0          0          0  pinctrl-rp1  37 Level     1f00100000.ethernet-ffffffff:00
pi@rpicm5:~ $ grep ethernet /proc/interrupts
168:          3          0          0          0  pinctrl-rp1  37 Level     1f00100000.ethernet-ffffffff:00
pi@rpicm5:~ $ grep ethernet /proc/interrupts
168:          5          0          0          0  pinctrl-rp1  37 Level     1f00100000.ethernet-ffffffff:00

2 interrupts when cable was attached make sense (probably one for link status + one for auto neg and other stuff)

@nbuchwitz nbuchwitz force-pushed the devel/fix-phy branch 3 times, most recently from 3dd58ca to 5493f44 Compare September 5, 2025 11:06
On CM5, the active-low interrupt pin (INT_N) of the Ethernet PHY is
connected to GPIO37. However, an internal pull-up resistor appears to
be missing, which causes the interrupt edge to be missed or not detected
reliably. Fix this by configuring a bias pull-up on the gpio controller.

Signed-off-by: Nicolai Buchwitz <nb@tipi-net.de>
On CM4/CM5, LED3 is used for ETH_LEDY, while LED4 may be unused or serve
as INT_N. Previously, both LEDs 3 and 4 were mirrored from LED1, which
overwrote the INT_N configuration on CM5.

Fix this by only shadowing LED1 to LED3, preserving the setting for
LED4/INT.

Fixes: 9704fab ("net: phy: broadcom: Allow ethernet LED mode to be set via device tree")
Signed-off-by: Nicolai Buchwitz <nb@tipi-net.de>
…onfig_init

The driver previously set the global interrupt mask in the ECR register
in bcm54xx_config_init(), disabling all interrupts. This conflicts with
the configuration in bcm_phy_config_intr(), which enables or disables the
global interrupt mask as needed and is called earlier. As a result,
interrupts may remain globally disabled even when the IMR is configured
to unmask specific events.

Remove the ECR handling from bcm54xx_config_init() so that interrupt
enable/disable is managed exclusively by bcm_phy_config_intr().

Signed-off-by: Nicolai Buchwitz <nb@tipi-net.de>
@pelwell pelwell merged commit 1d80b65 into raspberrypi:rpi-6.12.y Sep 5, 2025
11 of 12 checks passed
popcornmix added a commit to raspberrypi/firmware that referenced this pull request Sep 15, 2025
kernel: Enable interrupts on CM5 ethernet phy (again)
See: raspberrypi/linux#6963

kernel: media: i2c: imx500: input tensor injection
See: raspberrypi/linux#7040
popcornmix added a commit to raspberrypi/rpi-firmware that referenced this pull request Sep 15, 2025
kernel: Enable interrupts on CM5 ethernet phy (again)
See: raspberrypi/linux#6963

kernel: media: i2c: imx500: input tensor injection
See: raspberrypi/linux#7040
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants