Skip to content

Add support for phy interrupts on BCM54213PE #6942

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: rpi-6.12.y
Choose a base branch
from

Conversation

nbuchwitz
Copy link
Contributor

While working on the eee support for rp1's macb driver, I noticed that CM5 defines a phy interrupt, but it isn't used at all. It's caused by missing pointers in the ops struct of BCM54213PE. Also the mdio address differes from pi5 (probably different strapping on the board?), which is fixed by this series.

Before:

[    3.501498] macb 1f00100000.ethernet eth0: PHY [1f00100000.ethernet-ffffffff:00] driver [Broadcom BCM54213PE] (irq=POLL)

After:

[    3.597582] macb 1f00100000.ethernet eth0: PHY [1f00100000.ethernet-ffffffff:00] driver [Broadcom BCM54213PE] (irq=168)
$ cat /proc/interrupts | grep 1f00100000.ethernet-ffffffff:00
168:     701264          0          0          0  pinctrl-rp1  37 Level     1f00100000.ethernet-ffffffff:00

nbuchwitz added 2 commits July 5, 2025 23:31
CM5 features the same Broadcom BCM54213PE phy for ethernet as present on
pi5, but with a different mdio address (0 instead of 1 on pi5).

Fix this and use correct mdio address 0. While at it set
interrupt_parent to rp1_gpio instead of gpio (which is an alias to the
former) as this is the handle already used in this block.

Signed-off-by: Nicolai Buchwitz <[email protected]>
The phy specific structure is missing the pointers for handling
interrupts and link change notification. This results in interrupt's
being polled on CM5:

Fix this and copy the existing pointers from BCM54210E, which match the
implementation.

Before:
[3.501498] macb 1f00100000.ethernet eth0: PHY [1f00100000.ethernet-ffffffff:00] driver [Broadcom BCM54213PE] (irq=POLL)

After:
[3.597582] macb 1f00100000.ethernet eth0: PHY [1f00100000.ethernet-ffffffff:00] driver [Broadcom BCM54213PE] (irq=168)

Signed-off-by: Nicolai Buchwitz <[email protected]>
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.

1 participant