Tool/software: Linux
Hi,
1) in function dp83811_config_init(), the driver resets sgmii enable bit (DP83811_SGMII_EN) in register 0x09 (MII_DP83811_SGMII_CTRL) if it is already enabled. Is that the intended behavior? In our setup, this code turns SGMII interface off.
2) dp83811_config_aneg: my understanding is that this function is for adding/ device specific code to the auto-negotiation process of the phy framework. The driver code here sets bits regarding auto-negotiation over the sgmii bus (in register MII_DP83811_SGMII_CTRL) instead of auto-neg on Ethernet (this PHY even reports that it is not capable of doing auto-negotiation over Ethernet in register BMSR) . Please confirm if this is OK.
3) dp83811_ack_interrupt(): imho MII_DP83811_INT_STAT3 needs to be read as well because of the power on reset interrupt that is enabled by default. Please confirm.
4) dp83811_config_intr: this function enables several (basically all) interrupt sources. But there is seemingly nothin to handle these events. E.g. in case of an overvoltage event, interrupts occurs, generic phy interrupt is invoked and no action is taken. What is the intended behavior here?
Thanks,
Viktor