[PATCH] pinctrl: airoha: fix wrong MDIO function bitmaks

Benjamin Larsson benjamin.larsson at genexis.eu
Mon Sep 8 05:12:08 PDT 2025


On 2025-09-08 13:37, Christian Marangi wrote:
> With further testing with an attached Aeonsemi it was discovered that
> the pinctrl MDIO function applied the wrong bitmask. The error was
> probably caused by the confusing documentation related to these bits.
>
> Inspecting what the bootloader actually configure, the SGMII_MDIO_MODE
> is never actually set but instead it's set force enable to the 2 GPIO
> (gpio 1-2) for MDC and MDIO pin.
>
> Applying this configuration permits correct functionality of any
> externally attached PHY.


Hi, the hardware design guide mentions that gpio1 and gpio2 has some 
limitations when the mdio function is used and there is a chip errata 
for the 7581 that also mentions mdio. This indicates that the SoC has 
issues with mdio function to pin routing.

During my testing it seemed like the gpio1 and gpio2 pins where bridged 
to the mdc/mdio pins (they are not the same). When setting force enable 
on gpio1/gpio2 the bridging stopped and the pins seemed to return to the 
gpio1/2 function. Without the force enable set my guess is that the 
bridged gpio pins pull-up or pull-down is enough to interfere with mdio 
bus signal integrity causing the external phy issues.

Thus ACK from me to this change.

MvH

Benjamin Larsson




More information about the linux-arm-kernel mailing list