This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/DP83TC811S-Q1: PHY driver: clarification

Part Number: DP83TC811S-Q1

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

  • Hi Viktor,

    A1) It is up to you to enable or disable the SGMII operation.
    You can either do it through the driver or using bootstraps.

    A2) SGMII supports auto-negotiation. This is what that autoneg function is supporting. 100BASE-T1 PHY does not support auto-negotiation on the MDI.

    A3) You are correct about the POR enable interrupt. That must be cleared.

    A4) It is up to the implementor to use the interrupt function. It is just there as a guide.
  • Hu,

    1) My question is that why does config_init  turn off SGMII interface in case it was enabled before? What is the use case for that?

    2) my concern here is that the config_aneg function is about changing settings on 100BASE-T1 auto-negotiation. The driver sets bits regarding SGMII autoneg. Shouldn't these SGMII settings done in the init/probe instead? My understanding is that the autoneg bit in the SGMI_CTRL register corresponds to the behavior on the SGMII bus. Bits in BMCR control the behavior on Ethernet. Please clarify.

    Thanks,

    Viktor

  • A1) It is up to the implementor to enable or disable the SGMII function. I am not sure I understand your question. Can you not just modify it to meet your needs? The driver is not meant to be something that addresses all use cases. It is more of an example to get someone started.

    A2) SGMII has auto-negotiation. This is why there is a function controlling this. 100BASE-T1 does not support MDI auto-negotiation. If the concern is about the actual name of the function I am sorry it is confusing. This function is however only for SGMII control.