Re: [PATCH v4 2/2] arm: dts: ti: Adds support for AM335x and AM437x
From: Andrew Lunn <andrew@lunn.ch>
Date: 2026-01-16 13:55:34
Also in:
linux-devicetree, linux-omap, lkml
On the AM335x board, the CPSW MDIO and PRUSS MDIO signals are routed to the same physical pins (as shown in the schematic, see page 10 “MII_MUX” in tmdxice3359_sch_3h0013_v2_1a.pdf from https://www.ti.com/lit/zip/TIDR336 ). Because of this shared routing, the pinmux configuration applied by U-Boot for CPSW MDIO remains active even if the CPSW MDIO node is later disabled in Linux, and Linux does not automatically revert the pins to their reset state.
It is generally a bad idea to rely on the bootloader. I would make the CPSW MDIO configure the pins how it needs it. The PRUSS MDIO should also configure the pins how it needs them. However, it is not as simple as that... Looking at the schematic, what you have is ugly. You literally wire the outputs together, without a hardware mux. For MDC you assume one is Hi-Z, while the other drives the line. For MDIO it does not matter, both are inputs. so Hi-Z. I actually think you might need to represent this in Linux, with something i would call a pinmux-mux. You give it two sets of pinmux configurations. The active device claims the mux and gets it to set the two sets of pinmux as needed. Also, just setting the pinmux to GPIO is not sufficient, you also need to ensure the GPIO is configured for input, so the lines go Hi-Z. Often pinmux and GPIO controllers are interconnected, so the pinmux subsystem might be able to do that for you. I don't know if a pinmux-mux already exists in Linux. You probably want to ask on the pinmux mailing list, or they might have a different idea how to cleanly do this. Andrew