Hi Andrew, In reality, it is not the PHY having register in MMS12, and not even the MAC. These are really "chip-specific" registers, unrelated to networking (e.g., GPIOs, HW diagnostics, etc.). They are in MMS12 exactly because they cannot be considered PHY functions, nor MAC functions. And we have PHY specific registers in MMS4, just as you said. Although, I think it is a good idea anyway to allow the MACPHY drivers to hook into / extend the MDIO access functions. If anything, because of the hacks you mentioned. But also to allow vendor-specific extensions. Makes sense? Thanks, Piergiorgio -----Original Message----- From: Andrew Lunn <andrew@xxxxxxx> Sent: 24 May, 2024 23:27 To: Selvamani Rajagopal <Selvamani.Rajagopal@xxxxxxxxxx> Cc: Parthiban.Veerasooran@xxxxxxxxxxxxx; davem@xxxxxxxxxxxxx; edumazet@xxxxxxxxxx; kuba@xxxxxxxxxx; pabeni@xxxxxxxxxx; horms@xxxxxxxxxx; saeedm@xxxxxxxxxx; anthony.l.nguyen@xxxxxxxxx; netdev@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; corbet@xxxxxxx; linux-doc@xxxxxxxxxxxxxxx; robh+dt@xxxxxxxxxx; krzysztof.kozlowski+dt@xxxxxxxxxx; conor+dt@xxxxxxxxxx; devicetree@xxxxxxxxxxxxxxx; Horatiu.Vultur@xxxxxxxxxxxxx; ruanjinjie@xxxxxxxxxx; Steen.Hegelund@xxxxxxxxxxxxx; vladimir.oltean@xxxxxxx; UNGLinuxDriver@xxxxxxxxxxxxx; Thorsten.Kummermehr@xxxxxxxxxxxxx; Piergiorgio Beruto <Pier.Beruto@xxxxxxxxxx>; Nicolas.Ferre@xxxxxxxxxxxxx; benjamin.bigler@xxxxxxxxxxxxxxxxxxxxx Subject: Re: [PATCH net-next v4 00/12] Add support for OPEN Alliance 10BASE-T1x MACPHY Serial Interface [External Email]: This email arrived from an external source - Please exercise caution when opening any attachments or clicking on links. > In our MDIO functions, we do certain things based on PHY ID, also our > driver deal with vendor specific register, MMS 12 (refer Table 6 in > section 9.1 That is a bad design. Vendor specific PHY registers should be in MMS 4 which is MMD 31, where the PHY driver can access them. Table 6 says: "PHY – Vendor Specific" for MMS 4, so clearly that is where the standards committee expected PHY vendor registers to be. Anyway, does the PHY driver actually need to access MMS 12? Or can the MAC driver do it? That is the same question i asked Ramón about the Microchip part. We really should avoid layering violations as much as we can, and we should not have the framework make it easy to violate layering. We want all such horrible hacks hidden in the MAC driver which needs such horrible hacks because of bad design. Andrew